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 c/54357] New: ICE in output_pic_addr_const


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

             Bug #: 54357
           Summary: ICE in output_pic_addr_const
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: alexander.adam@informatik.tu-chemnitz.de


Created attachment 28070
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28070
File demonstrating the bug.

In the attachment is a very stripped down version of the code that makes gcc
ICE. I tested with version:
     4.1.2.20070115 (prerelease) on SuSE Linux 32 bit
     4.7.1 on Debian (4.7.1-2) 64 bit with -m32-Flag

The command line used to compile the code was:
     gcc -O1 -fPIC -c -m32 -o test.o asm_p_flag_ice.c

This is a very minimalistic example.
It works fine if we use the function address as argument.
It works with other modifiers for the assembler.
It works if -fPIC is ommitted or -O0 is used.

I give here the options that were used to build the gcc bit on Debian:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-2)

$ uname -a
Linux dimensio0 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64
GNU/Linux

The output, if the file is compiled:

$ gcc -O1 -fPIC -c -m32 -o test.o asm_p_flag_ice.c 
asm_p_flag_ice.c: In function âICE_funcâ:
asm_p_flag_ice.c:15:1: internal compiler error: in output_pic_addr_const, at
config/i386/i386.c:13099
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccLvrTP3.out file, please attach this to
your bugreport.


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