Bug 54694 - [4.7/4.8 Regression] internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2out.c:2387
Summary: [4.7/4.8 Regression] internal compiler error: in dwarf2out_frame_debug_expr, ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.6.3
: P3 normal
Target Milestone: 4.7.4
Assignee: Richard Henderson
URL:
Keywords:
: 59763 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-24 21:10 UTC by Toralf Förster
Modified: 2015-09-05 02:49 UTC (History)
7 users (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work: 4.4.7, 4.9.0
Known to fail: 4.7.0, 4.8.0
Last reconfirmed: 2012-09-25 00:00:00


Attachments
cc -E (124.59 KB, application/x-object)
2012-09-25 15:26 UTC, Toralf Förster
Details
cc -E -v (124.59 KB, text/plain)
2012-09-26 17:18 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster 2012-09-24 21:10:17 UTC
I originally reported it here https://bugs.gentoo.org/show_bug.cgi?id=434908 but t could not be reproduced by one gentoo dev, nevertheless here again :


n22 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 # make V=1
make  BUILD_DIR=/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 -C libhw64 V="1" TARGET_DIR="libhw64/" all
make[1]: Entering directory `/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/libhw64'
make[1]: Leaving directory `/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/libhw64'
make  BUILD_DIR=/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 -C libdis V="1" TARGET_DIR="libdis/" all
make[1]: Entering directory `/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/libdis'
make[1]: Leaving directory `/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/libdis'
make  BUILD_DIR=/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 -C i386-softmmu V="1" TARGET_DIR="i386-softmmu/" all
make[1]: Entering directory `/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/i386-softmmu'
i686-pc-linux-gnu-gcc -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/slirp -I. -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/linux-headers -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg/i386  -fPIE -DPIE -m32 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing  -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -I/usr/include/libpng15   -DHAS_AUDIO -DHAS_AUDIO_CHOICE  -DTARGET_PHYS_ADDR_BITS=64 -I../linux-headers -I.. -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include    -I/usr/include/libpng15   -fomit-frame-pointer -MMD -MP -MT op_helper.o -MF ./op_helper.d -O2 -O2 -march=native -pipe -c -o op_helper.o /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c
/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c: In function ‘helper_flds_FT0’:
/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c:3650:1: internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2out.c:2387
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
{standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
make[1]: *** [op_helper.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/i386-softmmu'
make: *** [subdir-i386-softmmu] Error 2
Comment 1 Richard Biener 2012-09-25 07:33:56 UTC
Please attach preprocessed source and provide the output of the compiler
command with -v appended.
Comment 2 Toralf Förster 2012-09-25 15:26:25 UTC
Created attachment 28271 [details]
cc -E

n22 ~ # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/i686-pc-linux-gnu/gcc-bin/4.6.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.6.3 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.6.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.6.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.6.3/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.6.3/python --enable-checking=release --disable-libgcj --with-arch=i686 --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.6, pie-0.5.2'
Thread model: posix
gcc version 4.6.3 (Gentoo 4.6.3 p1.6, pie-0.5.2) 
n
Comment 3 Richard Biener 2012-09-26 09:10:23 UTC
(In reply to comment #1)
> Please attach preprocessed source and provide the output of the compiler
> command with -v appended.

The "compiler command".  I cannot reproduce it with

gcc -S t.i -m32 -march=i686 -fomit-frame-pointer -O2 -fPIE -fstack-protector-all

but I have no idea what -march=native expands to.  It would have told me
if you _added_ "-v" to the command that produces the error (not only "gcc").
Comment 4 Toralf Förster 2012-09-26 17:18:53 UTC
Created attachment 28287 [details]
cc -E -v

attached the output of 
n22 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/i386-softmmu # i686-pc-linux-gnu-gcc -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/slirp -I. -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/linux-headers -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg/i386  -fPIE -DPIE -m32 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing  -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -I/usr/include/libpng15   -DHAS_AUDIO -DHAS_AUDIO_CHOICE  -DTARGET_PHYS_ADDR_BITS=64 -I../linux-headers -I.. -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include    -I/usr/include/libpng15   -fomit-frame-pointer -MMD -MP -MT op_helper.o -MF ./op_helper.d -O2 -O2 -march=native -pipe -c -v -E -o op_helper.o /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c
Using built-in specs.
COLLECT_GCC=/usr/i686-pc-linux-gnu/gcc-bin/4.6.3/i686-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.6.3 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.6.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.6.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.6.3/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.6.3/python --enable-checking=release --disable-libgcj --with-arch=i686 --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.6, pie-0.5.2'
Thread model: posix
gcc version 4.6.3 (Gentoo 4.6.3 p1.6, pie-0.5.2) 
COLLECT_GCC_OPTIONS='-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/slirp' '-I' '.' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/linux-headers' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg/i386' '-fPIE' '-DPIE' '-m32' '-D_FORTIFY_SOURCE=2' '-D_GNU_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_LARGEFILE_SOURCE' '-Wstrict-prototypes' '-Wredundant-decls' '-Wall' '-Wundef' '-Wwrite-strings' '-Wmissing-prototypes' '-fno-strict-aliasing' '-fstack-protector-all' '-Wendif-labels' '-Wmissing-include-dirs' '-Wempty-body' '-Wnested-externs' '-Wformat-security' '-Wformat-y2k' '-Winit-self' '-Wignored-qualifiers' '-Wold-style-declaration' '-Wold-style-definition' '-Wtype-limits' '-I' '/usr/include/libpng15' '-DHAS_AUDIO' '-DHAS_AUDIO_CHOICE' '-DTARGET_PHYS_ADDR_BITS=64' '-I' '../linux-headers' '-I' '..' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386' '-DNEED_CPU_H' '-pthread' '-I' '/usr/include/glib-2.0' '-I' '/usr/lib/glib-2.0/include' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include' '-I' '/usr/include/libpng15' '-fomit-frame-pointer' '-MMD' '-MP' '-MT' 'op_helper.o' '-MF' './op_helper.d' '-O2' '-O2' '-march=native' '-pipe' '-c' '-v' '-E' '-o' 'op_helper.o'
 /usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/cc1 -E -quiet -v -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/slirp -I . -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/linux-headers -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg/i386 -I /usr/include/libpng15 -I ../linux-headers -I .. -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -I /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include -I /usr/include/libpng15 -MMD op_helper.d -MF ./op_helper.d -MP -MT op_helper.o -D_REENTRANT -DPIE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DTARGET_PHYS_ADDR_BITS=64 -DNEED_CPU_H /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c -o op_helper.o -march=corei7-avx -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mavx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7-avx -m32 -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fPIE -fno-strict-aliasing -fstack-protector-all -fomit-frame-pointer -O2 -O2
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory "../linux-headers"
ignoring duplicate directory ".."
ignoring duplicate directory "/usr/include/libpng15"
#include "..." search starts here:
#include <...> search starts here:
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/slirp
 .
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/linux-headers
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg/i386
 /usr/include/libpng15
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386
 /usr/include/glib-2.0
 /usr/lib/glib-2.0/include
 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed
 /usr/include
End of search list.
COMPILER_PATH=/usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/:/usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/:/usr/libexec/gcc/i686-pc-linux-gnu/:/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/:/usr/lib/gcc/i686-pc-linux-gnu/:/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../i686-pc-linux-gnu/bin/
LIBRARY_PATH=/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/:/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../i686-pc-linux-gnu/lib/../lib/:/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../i686-pc-linux-gnu/lib/:/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/slirp' '-I' '.' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/linux-headers' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg/i386' '-fPIE' '-DPIE' '-m32' '-D_FORTIFY_SOURCE=2' '-D_GNU_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_LARGEFILE_SOURCE' '-Wstrict-prototypes' '-Wredundant-decls' '-Wall' '-Wundef' '-Wwrite-strings' '-Wmissing-prototypes' '-fno-strict-aliasing' '-fstack-protector-all' '-Wendif-labels' '-Wmissing-include-dirs' '-Wempty-body' '-Wnested-externs' '-Wformat-security' '-Wformat-y2k' '-Winit-self' '-Wignored-qualifiers' '-Wold-style-declaration' '-Wold-style-definition' '-Wtype-limits' '-I' '/usr/include/libpng15' '-DHAS_AUDIO' '-DHAS_AUDIO_CHOICE' '-DTARGET_PHYS_ADDR_BITS=64' '-I' '../linux-headers' '-I' '..' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386' '-DNEED_CPU_H' '-pthread' '-I' '/usr/include/glib-2.0' '-I' '/usr/lib/glib-2.0/include' '-I' '/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include' '-I' '/usr/include/libpng15' '-fomit-frame-pointer' '-MMD' '-MP' '-MT' 'op_helper.o' '-MF' './op_helper.d' '-O2' '-O2' '-march=native' '-pipe' '-c' '-v' '-E' '-o' 'op_helper.o'
Comment 5 Markus Trippelsdorf 2012-09-26 17:58:44 UTC
gcc-4.7 and 4.8 are also affected.

Reduced:

markus@x4 tmp % cat test.i
typedef struct
{
}
floatx80;
register struct CPUX86State *env asm ("ebp");
floatx80 float64_to_floatx80 (int, int);
typedef struct
{
    floatx80 d;
}
FPReg;
struct CPUX86State
{
    FPReg fpregs[0];
};
void
helper_fldl_ST0 ()
{
    env->fpregs[0].d = float64_to_floatx80 (0, 0);
}

markus@x4 tmp % gcc -mavx -m32 -c test.i
test.i: In function ‘helper_fldl_ST0’:
test.i:20:1: internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2out.c:2387
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 6 Toralf Förster 2013-01-03 19:35:16 UTC
As long as no fixed gcc version is released - in Gentoo land we do have this work around for now :

https://bugs.gentoo.org/show_bug.cgi?id=434908#c11

(Workaround: Append -mno-avx to CFLAGS.)
Comment 7 Valentin Ilie 2013-11-16 21:46:11 UTC
I can reproduce this issue with gcc-4.8
Comment 8 Markus Trippelsdorf 2013-11-28 11:44:57 UTC
Ping.
All supported gcc versions are affected. Can someone
please have a look?
Comment 9 Joost VandeVondele 2013-11-28 12:08:08 UTC
works with a gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) fails with trunk.

seems like a debug rather than preprocessor problem.
Comment 10 H.J. Lu 2013-11-28 12:15:45 UTC
"ebp" is a frame pointer and used by GCC internally.
It shouldn't be marked as fixed.  If

register struct CPUX86State *env asm ("ebp");

has to be used, -mno-avx is a reasonable workaround.
Comment 11 H.J. Lu 2013-11-28 12:17:20 UTC
I won't call it exactly a regression since -mavx is a new
option and -march=native adds -mavx implicitly.
Comment 12 H.J. Lu 2014-01-10 19:12:23 UTC
*** Bug 59763 has been marked as a duplicate of this bug. ***
Comment 13 Uroš Bizjak 2014-01-10 19:17:20 UTC
(In reply to H.J. Lu from comment #12)
> *** Bug 59763 has been marked as a duplicate of this bug. ***

Are you sure this is a duplicate? The ICE is at different location and adding -mno-avx doesn't help. In fact, -march=corei7 was not used in the testcase at all.
Comment 14 H.J. Lu 2014-01-10 19:26:40 UTC
(In reply to Uroš Bizjak from comment #13)
> (In reply to H.J. Lu from comment #12)
> > *** Bug 59763 has been marked as a duplicate of this bug. ***
> 
> Are you sure this is a duplicate? The ICE is at different location and
> adding -mno-avx doesn't help. In fact, -march=corei7 was not used in the
> testcase at all.

This bug is against GCC 4.6. For GCC 4.9, I got

[hjl@gnu-6 pr54694]$ cat x.i 
typedef struct
{
}
floatx80;
register struct CPUX86State *env asm ("ebp");
floatx80 float64_to_floatx80 (int, int);
typedef struct
{
    floatx80 d;
}
FPReg;
struct CPUX86State
{
    FPReg fpregs[0];
};
void
helper_fldl_ST0 ()
{
    env->fpregs[0].d = float64_to_floatx80 (0, 0);
}
[hjl@gnu-6 pr54694]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -mavx -m32 -S x.i
x.i: In function ‘helper_fldl_ST0’:
x.i:20:1: internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2cfi.c:1550
 }
 ^
0x766175 dwarf2out_frame_debug_expr
	/export/gnu/import/git/gcc/gcc/dwarf2cfi.c:1548
0x767355 dwarf2out_frame_debug
	/export/gnu/import/git/gcc/gcc/dwarf2cfi.c:2043
0x767e58 scan_insn_after
	/export/gnu/import/git/gcc/gcc/dwarf2cfi.c:2369
0x768414 scan_trace
	/export/gnu/import/git/gcc/gcc/dwarf2cfi.c:2526
0x768527 create_cfi_notes
	/export/gnu/import/git/gcc/gcc/dwarf2cfi.c:2565
0x768ff9 execute_dwarf2_frame
	/export/gnu/import/git/gcc/gcc/dwarf2cfi.c:2925
0x769d40 execute
	/export/gnu/import/git/gcc/gcc/dwarf2cfi.c:3421
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [x.s] Error 1
[hjl@gnu-6 pr54694]$ 

-maccumulate-outgoing-args can be used as a workaround.
Comment 15 Richard Henderson 2014-01-13 19:32:15 UTC
I'm tempted to simply say this is user-error.  It's the use of the global
register of EBP that's causing the problem.  And honestly I don't see a
way around it.

The only possible resolution I could see is to generate an error or sorry
earlier, before the ICE.  But it still wouldn't let the test case compile.

Anyway that's exactly why current QEMU does not do this anymore.  So one
can also fix the "problem" by upgrading from qemu-kvm-1.1 to qemu-1.7.
Comment 16 Toralf Förster 2014-01-13 19:42:05 UTC
(In reply to Richard Henderson from comment #15)
> So one
> can also fix the "problem" by upgrading from qemu-kvm-1.1 to qemu-1.7.
app-emulation/qemu1.4.2 doesn't show the error
Comment 17 Richard Henderson 2014-01-15 21:41:35 UTC
Author: rth
Date: Wed Jan 15 21:41:03 2014
New Revision: 206647

URL: http://gcc.gnu.org/viewcvs?rev=206647&root=gcc&view=rev
Log:
PR debug/54694

Diagnose frame_pointer_required vs fixed hfp

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr54694.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira.c
    trunk/gcc/reginfo.c
    trunk/gcc/rtl.h
Comment 18 Richard Henderson 2014-01-15 21:47:08 UTC
Fixed for 4.9.
Comment 19 Richard Henderson 2014-01-16 16:24:26 UTC
Author: rth
Date: Thu Jan 16 16:23:54 2014
New Revision: 206666

URL: http://gcc.gnu.org/viewcvs?rev=206666&root=gcc&view=rev
Log:
PR debug/54694

Diagnose frame_pointer_required vs fixed hfp

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr54694.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/ira.c
    branches/gcc-4_8-branch/gcc/reginfo.c
    branches/gcc-4_8-branch/gcc/rtl.h
Comment 20 Richard Henderson 2014-01-16 16:34:01 UTC
Author: rth
Date: Thu Jan 16 16:33:30 2014
New Revision: 206667

URL: http://gcc.gnu.org/viewcvs?rev=206667&root=gcc&view=rev
Log:
PR debug/54694

Diagnose frame_pointer_required vs fixed hfp

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr54694.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/ira.c
    branches/gcc-4_7-branch/gcc/reginfo.c
    branches/gcc-4_7-branch/gcc/rtl.h
Comment 21 Richard Henderson 2014-01-16 16:35:21 UTC
Fixed.
Comment 22 Jakub Jelinek 2014-01-16 19:16:18 UTC
Author: jakub
Date: Thu Jan 16 19:15:46 2014
New Revision: 206679

URL: http://gcc.gnu.org/viewcvs?rev=206679&root=gcc&view=rev
Log:
	PR debug/54694
	* gcc.target/i386/pr9771-1.c (main): Rename to...
	(real_main): ... this.  Add __asm name "main".
	(ASMNAME, ASMNAME2, STRING): Define.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/pr9771-1.c
Comment 23 Jakub Jelinek 2014-01-16 19:21:21 UTC
Author: jakub
Date: Thu Jan 16 19:20:50 2014
New Revision: 206680

URL: http://gcc.gnu.org/viewcvs?rev=206680&root=gcc&view=rev
Log:
	PR debug/54694
	* gcc.target/i386/pr9771-1.c (main): Rename to...
	(real_main): ... this.  Add __asm name "main".
	(ASMNAME, ASMNAME2, STRING): Define.

Modified:
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr9771-1.c
Comment 24 Jakub Jelinek 2014-01-16 19:22:39 UTC
Author: jakub
Date: Thu Jan 16 19:22:08 2014
New Revision: 206681

URL: http://gcc.gnu.org/viewcvs?rev=206681&root=gcc&view=rev
Log:
	PR debug/54694
	* gcc.target/i386/pr9771-1.c (main): Rename to...
	(real_main): ... this.  Add __asm name "main".
	(ASMNAME, ASMNAME2, STRING): Define.

Modified:
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr9771-1.c
Comment 25 Chen Gang 2015-09-05 02:49:09 UTC
(In reply to Richard Henderson from comment #20)
> Author: rth
> Date: Thu Jan 16 16:33:30 2014
> New Revision: 206667
> 
> URL: http://gcc.gnu.org/viewcvs?rev=206667&root=gcc&view=rev
> Log:
> PR debug/54694
> 
> Diagnose frame_pointer_required vs fixed hfp
> 
> Added:
>     branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr54694.c
> Modified:
>     branches/gcc-4_7-branch/gcc/ChangeLog
>     branches/gcc-4_7-branch/gcc/ira.c
>     branches/gcc-4_7-branch/gcc/reginfo.c
>     branches/gcc-4_7-branch/gcc/rtl.h


After this git commit, the current blackfin kernel code can not pass building when enable FUNCTION_TRACER. The related bug number is Bug65804

I want to consult: Is it the original gcc and current kernel issue? or our related git commit "e52beba PR debug/54694" need be improved?

Thanks.