http://llvm.org/bugs/show_bug.cgi?id=2301
Summary: Internal compiler error when doing inline optimization
in llvm-gcc4.2-2.2
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
Created an attachment (id=1626)
--> (http://llvm.org/bugs/attachment.cgi?id=1626)
Test code for reproducing the error.
When compiling file without -fno-inline switch, internal compiler error
occures.
e.g. this one works:
[EMAIL PROTECTED]:~/Downloads/bugzillatesting$
/home/elhigu/stow_repo/llvm-gcc4.2-2.2.sources/bin/gcc --emit-llvm -O5
-ffreestanding -fno-unit-at-a-time -c -c -DNDEBUG -DHOST_EXAMPLE_CODE=0
-DARCH_IS_32BIT -DARCH_IS_GENERIC stripped_motion_est_2.c -fno-inline
This does not:
[EMAIL PROTECTED]:~/Downloads/bugzillatesting$
/home/elhigu/stow_repo/llvm-gcc4.2-2.2.sources/bin/gcc --emit-llvm -O5
-ffreestanding -fno-unit-at-a-time -c -c -DNDEBUG -DHOST_EXAMPLE_CODE=0
-DARCH_IS_32BIT -DARCH_IS_GENERIC stripped_motion_est_2.c
stripped_motion_est_2.c: In function âSomeFunctionâ:
stripped_motion_est_2.c:18: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
[EMAIL PROTECTED]:~/Downloads/bugzillatesting$
More specific test run with gdb and cc1:
[EMAIL PROTECTED]:~/Downloads/bugzillatesting$ gdb --args
/home/elhigu/stow_repo/llvm-gcc4.2-2.2.sources/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1
-quiet stripped_motion_est_2.c -emit-llvm-bc -o stripped_motion_est_2.o -quiet
-dumpbase stripped_motion_est_2.c -auxbase stripped_motion_est_2 -O2
-ffreestanding -fno-unit-at-a-time
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program:
/home/elhigu/stow_repo/llvm-gcc4.2-2.2.sources/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1
-quiet stripped_motion_est_2.c -emit-llvm-bc -o stripped_motion_est_2.o -quiet
-dumpbase stripped_motion_est_2.c -auxbase stripped_motion_est_2 -O2
-ffreestanding -fno-unit-at-a-time
[Thread debugging using libthread_db enabled]
[New Thread 0xb7cc76c0 (LWP 1473)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7cc76c0 (LWP 1473)]
optimize_inline_calls (fn=0xb7beaf00) at
../../llvm-gcc4.2-2.2.source/gcc/tree-inline.c:1248
1248 if (!DECL_P (base_m))
Current language: auto; currently c
(gdb) backtrace
#0 optimize_inline_calls (fn=0xb7beaf00) at
../../llvm-gcc4.2-2.2.source/gcc/tree-inline.c:1248
#1 0x080bb19a in tree_rest_of_compilation (fndecl=0xb7beaf00) at
../../llvm-gcc4.2-2.2.source/gcc/tree-optimize.c:449
#2 0x08056cb1 in c_expand_body (fndecl=0xb7beaf00) at
../../llvm-gcc4.2-2.2.source/gcc/c-decl.c:7141
#3 0x0836ed2d in cgraph_expand_function (node=0xb7bf8e0c) at
../../llvm-gcc4.2-2.2.source/gcc/cgraphunit.c:1305
#4 0x083703b5 in cgraph_assemble_pending_functions () at
../../llvm-gcc4.2-2.2.source/gcc/cgraphunit.c:376
#5 0x08370115 in cgraph_finalize_function (decl=0xb7beaf00, nested=false) at
../../llvm-gcc4.2-2.2.source/gcc/cgraphunit.c:511
#6 0x08057060 in finish_function () at
../../llvm-gcc4.2-2.2.source/gcc/c-decl.c:7110
#7 0x08099a65 in c_parser_declaration_or_fndef (parser=0xb7bf3000,
fndef_ok=true, empty_ok=true, nested=false, start_attr_ok=<value optimized
out>, foreach_elem=0x0)
at ../../llvm-gcc4.2-2.2.source/gcc/c-parser.c:1621
#8 0x080a40d8 in c_parser_external_declaration (parser=0xb7bf3000) at
../../llvm-gcc4.2-2.2.source/gcc/c-parser.c:1334
#9 0x080a4a58 in c_parse_file () at
../../llvm-gcc4.2-2.2.source/gcc/c-parser.c:1220
#10 0x0808b99a in c_common_parse_file (set_yydebug=0) at
../../llvm-gcc4.2-2.2.source/gcc/c-opts.c:1284
#11 0x082ca782 in toplev_main (argc=14, argv=0xbff93154) at
../../llvm-gcc4.2-2.2.source/gcc/toplev.c:1108
#12 0x080aa302 in main (argc=0, argv=0xb7bdff60) at
../../llvm-gcc4.2-2.2.source/gcc/llvm-main.cpp:39
(gdb)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs