This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/16640] In function `__floattidf':, libgcc2.c:1292: internal compiler error: in expand_shift, at expmed.c:2111


------- Additional Comments From john dot spelis at 3dlabs dot com  2004-07-20 17:13 -------
john.spelis@3dlabs writes:
 I have changed the status to "minor" as i have now found a workaround for this
problem ...

Bug Workaround (background):

I think the actual problem is somewhere in the
pre-processor because i've noticed that
#define's are not preserved across #include's
so for instance when compiling libgcov.c
a #define from gcov-io.h called IN_LIBGCOV which
get's set in that include file appears unset
immediately after the file is included in
libgcov.c

The 'gcc' code is heavily conditionally compiled and
so unless #define's are being preserved, chaos
is likely.

The smallest code fragment which reproduces this fault is


 --- b.h ---
#define ball 1

 --- b.c ---

#include "b.h"

int main()
{
#if !ball
 ball() ;
#endif
return(0);
}

This fails to compile with xgcc at the same stage xgcc goes on to
report an internal compiler failure.

# xgcc -o b b.c   # fails if #defines's not being preserved

 Bug Workaround:

I was using a previously built 3.0.3 gcc to compile
3.4.1 and it failed at the stage where it's using it's
own cc1 and xgcc to compile it's own code. This resulted
in the internal compiler fault.

I tracked back gnu gcc versions until one compiled on
solaris 2.8, sparcv9 and and got 3.0.3 to compile
3.2.3 successfully.

Via the 3.2.3 compiler i have got 3.4.1 (yipee) to
compile.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16640


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]