Bug 49656 - internal compiler error on Mac OS 10.7.0
Summary: internal compiler error on Mac OS 10.7.0
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.6.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 23:53 UTC by andreas
Modified: 2011-11-11 04:56 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-elf
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed main.c (314 bytes, application/octet-stream)
2011-07-05 23:53 UTC, andreas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreas 2011-07-05 23:53:52 UTC
Created attachment 24698 [details]
Preprocessed main.c

Target: x86_64-elf
Configured with: --target=x86_64-elf --without-headers --enable-languages=c,c++ --disable-nls
And then build with: make all-gcc
Version: 4.6.1

Command line: x86_64-elf-gcc -m32 -g -nostdlib -nostdinc -fno-builtin -fno-stack-protector -std=gnu99 -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wstrict-prototypes  -DARCH_X86 -DDEBUG -Iinclude -c src/main.c -o obj/main.o

Error message:
src/main.c:30:1: internal compiler error: in execute_ipa_pass_list, at passes.c:2426
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [obj/main.o] Error 1

main.i is attached

I also tried this with GCC 4.6.0 and 4.5.0. Same error.
Comment 1 Richard Biener 2011-07-06 08:08:57 UTC
Works for me on native x86_64.

Also passes.c from 4.6.1 does only have 2052 lines, so your version information cannot be correct.
Comment 2 andreas 2011-07-06 08:30:52 UTC
(In reply to comment #1)
> Also passes.c from 4.6.1 does only have 2052 lines, so your version information
> cannot be correct.

Oh, I'm sorry. You are totally right.
I accidentally used a 4.7 snapshot which, obviously, breaks for me in the same manner.

Here is the error with a real 4.6.1:
x86_64-elf-gcc -m32 -g -nostdlib -nostdinc -fno-builtin -fno-stack-protector -std=gnu99 -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wstrict-prototypes  -DARCH_X86 -DDEBUG -Iinclude -c src/main.c -o obj/main.o
src/main.c:30:1: internal compiler error: in execute_ipa_pass_list, at passes.c:1921
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [obj/main.o] Error 1

Everything else is the same.
I just downloaded 4.6.1, build it and executed it and this is result.
Comment 3 andreas 2011-07-13 22:09:11 UTC
I just compiled GCC 4.6.1 again without clang after I found out how to do that.

By defining
CC = /usr/bin/gcc-4.2
CPP = /usr/bin/cpp-4.2
CXX = /usr/bin/g++-4.2
LD = /usr/bin/gcc-4.2
before the configure step the Apple GCC is used for compilation.

If you don't do that, clang will be used on Mac OS with XCode >4 and this leads to this "internal compiler error".
So, it doesn't seem to be a GCC issue.