Bug 4315 - With Fedora Core 5 GCC, js/source/jscpucfg.c causes internal compiler error: in dwarf2out_finish, at dwarf2out.c:14116
: With Fedora Core 5 GCC, js/source/jscpucfg.c causes internal compiler error: ...
Status: RESOLVED FIXED
: C WS Core
Bindings Generation
: 4.0.1
: PC Linux
: P3 major
: 4.0.2
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2006-03-29 19:50 by
Modified: 2006-09-15 14:53 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-03-29 19:50:58
Internal compiler error occurred in building GT 4.0.1 in Fedora Core 5.

Following terminal log indicates the problem.

========================================================================
$ uname -a
Linux ********.********.org 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006
i686 i686 i386 GNU/Linux
$ yum list fedora-release basesystem gcc
(snip)
basesystem.noarch                        8.0-5.1                installed
fedora-release.noarch                    5-5                    installed
gcc.i386                                 4.1.0-3                installed
$ cd gt4.0.1-all-source-installer/source-trees/wsrf/c/tools/js/source
$ make
/usr/bin/gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"globus_js\"
-DVERSION=\"0.3\"  -I.
-I/home/********/gt4.0.1-all-source-installer/source-trees/wsrf/c/tools/js/source
  -I/usr/local/gt401/include -I/usr/local/gt401/include/gcc32dbg  -g   -Wall
-DXP_UNIX -c jscpucfg.c
jscpucfg.c:376: internal compiler error: in dwarf2out_finish, at
dwarf2out.c:14116
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccidtucd.out file, please attach this to
your bugreport.
make: *** [jscpucfg.o] Error 1
========================================================================

I found source of problem is ll. 257-280, codes begin with
"if (sizeof(long) == 8) {" .  In PC, we can dike these codes
safely, or to get behind, omit "-g", or add "-O1", in compile
option.

Following is the minimal sample code that cause the problem.

========================================================================
int
foo(void)
{
   if (sizeof(long) == 8) {
      typedef union {
         long i;
         char c[8];
      } comm;
      static volatile comm u;
      u.i = 0x01020304;
      u.i <<= 16, u.i <<= 16;
      u.i |= 0x05060708;
      return u.c[0] == 0x01 && u.c[1] == 0x02;
   }
   return 2;
}
========================================================================
------- Comment #1 From 2006-04-10 09:44:14 -------
Traced this problem back to gcc bugzilla:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26881
------- Comment #2 From 2006-04-10 10:42:21 -------
I've committed a workaround to configure with -O1 if that package is built with
the buggy gcc.

joe
------- Comment #3 From 2006-04-19 11:21:25 -------
*** Bug 4357 has been marked as a duplicate of this bug. ***
------- Comment #4 From 2006-07-14 00:09:43 -------
*** Bug 4590 has been marked as a duplicate of this bug. ***
------- Comment #5 From 2006-09-15 14:53:53 -------
Added a new configure test to detect this independent of the compiler version,
as this problem has been seen on SuSE as well. The updates is vailable at
http://www-unix.globus.org/ftppub/gt4/4.0/4.0.3/updates/src/globus_js-0.5.tar.gz

joe