public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56851] New: Segmentation Error using -O3 optimization
@ 2013-04-05 21:01 john at jbeidl dot com
  2013-04-06  9:58 ` [Bug c/56851] " mikpe at it dot uu.se
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: john at jbeidl dot com @ 2013-04-05 21:01 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56851
           Summary: Segmentation Error using -O3 optimization
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: john@jbeidl.com


Created attachment 29810
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29810
GCC Configuration, Output error and sensor.i file

internal compiler error: Segmentation fault building sensor.c

I have attached a zip file thta includes the GCC configuration, compiler output
log and the sensor.i file.

I am using CooCox CoIDE 1.7.1 to edit, build and debug.

This error only happens with -O3, all other levels of optimization work fine. 
I plan to use -Os, I was just trying to compare final build sizes.

If additional information is need, please advise.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/56851] Segmentation Error using -O3 optimization
  2013-04-05 21:01 [Bug c/56851] New: Segmentation Error using -O3 optimization john at jbeidl dot com
@ 2013-04-06  9:58 ` mikpe at it dot uu.se
  2013-04-06 11:57 ` mikpe at it dot uu.se
  2013-04-08 11:07 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mikpe at it dot uu.se @ 2013-04-06  9:58 UTC (permalink / raw)
  To: gcc-bugs


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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2013-04-06 09:58:19 UTC ---
Some important information was hidden in that attached zip file.

First, the target is arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb, with the host
being mingw32.

Second, the version is wrong; it's not 4.7.0 but ARM/embedded-4_7-branch
revision 196615 (I can't tell if it's vanilla or patched).

However, I can reproduce the cc1 SEGV in a cross from x86_64-linux to
arm-linux-gnueabi with gcc-4.7-20130330:

> /tmp/objdir/gcc/xgcc -B/tmp/objdir/gcc -mcpu=cortex-m3 -mthumb -O3 -S sensors.i
C:\Radio Control\OpenAero32\src\sensors.c: In function 'ACC_getADC':
C:\Radio Control\OpenAero32\src\sensors.c:251:6: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Re-running under gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x00000000007f5baf in rename_use_op (op_p=0x7ffff7611330) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:55
55        if (TREE_CODE (USE_FROM_PTR (op_p)) != SSA_NAME)
Missing separate debuginfos, use: debuginfo-install glibc-2.15-58.fc17.x86_64
(gdb) bt
#0  0x00000000007f5baf in rename_use_op (op_p=0x7ffff7611330) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:55
#1  rename_variables_in_bb (bb=0x7ffff76103a8) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:95
#2  0x00000000007f5bee in rename_variables_in_loop (loop=0x7ffff7551440) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:111
#3  0x00000000007155aa in copy_loop_before (loop=0x7ffff7551330) at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:182
#4  generate_loops_for_partition (copy_p=1 '\001', partition=0x12c4e30,
loop=0x7ffff7551330) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:216
#5  generate_code_for_partition (copy_p=1 '\001', partition=0x12c4e30,
loop=<optimized out>) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:446
#6  ldist_gen (starting_vertices=0x12da6d0, rdg=0x1288840, loop=<optimized
out>) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1142
#7  distribute_loop (stmts=<optimized out>, loop=<optimized out>) at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1228
#8  distribute_loop (loop=<optimized out>, stmts=<optimized out>) at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1170
#9  0x0000000000715b8d in tree_loop_distribution () at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1284
#10 0x0000000000646f53 in execute_one_pass (pass=0x108ee20) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2084
#11 0x0000000000647265 in execute_pass_list (pass=0x108ee20) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2139
#12 0x0000000000647277 in execute_pass_list (pass=0x108ff00) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2140
#13 0x0000000000647277 in execute_pass_list (pass=0x108f180) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2140
#14 0x000000000071cd16 in tree_rest_of_compilation (fndecl=0x7ffff749c300) at
/tmp/gcc-4.7-20130330/gcc/tree-optimize.c:422
#15 0x00000000004d1aba in cgraph_expand_function (node=0x7ffff77a26c0) at
/tmp/gcc-4.7-20130330/gcc/cgraphunit.c:1837
#16 0x00000000004d320a in cgraph_expand_all_functions () at
/tmp/gcc-4.7-20130330/gcc/cgraphunit.c:1904
#17 cgraph_optimize () at /tmp/gcc-4.7-20130330/gcc/cgraphunit.c:2218
#18 0x00000000004d371a in cgraph_finalize_compilation_unit () at
/tmp/gcc-4.7-20130330/gcc/cgraphunit.c:1344
#19 0x00000000004195a0 in c_write_global_declarations () at
/tmp/gcc-4.7-20130330/gcc/c-decl.c:10032
#20 0x00000000006d73a1 in compile_file () at
/tmp/gcc-4.7-20130330/gcc/toplev.c:573
#21 do_compile () at /tmp/gcc-4.7-20130330/gcc/toplev.c:1929
#22 toplev_main (argc=15, argv=0x7fffffffdae8) at
/tmp/gcc-4.7-20130330/gcc/toplev.c:2005
#23 0x00007ffff7a47735 in __libc_start_main () from /lib64/libc.so.6
#24 0x0000000000408861 in _start ()

gcc 4.8-20130404 and 4.6-20130405 both successfully compile this test case.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/56851] Segmentation Error using -O3 optimization
  2013-04-05 21:01 [Bug c/56851] New: Segmentation Error using -O3 optimization john at jbeidl dot com
  2013-04-06  9:58 ` [Bug c/56851] " mikpe at it dot uu.se
@ 2013-04-06 11:57 ` mikpe at it dot uu.se
  2013-04-08 11:07 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mikpe at it dot uu.se @ 2013-04-06 11:57 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2013-04-06 11:57:13 UTC ---
The SEGV stopped on trunk with r195239 aka PR55964 fix.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/56851] Segmentation Error using -O3 optimization
  2013-04-05 21:01 [Bug c/56851] New: Segmentation Error using -O3 optimization john at jbeidl dot com
  2013-04-06  9:58 ` [Bug c/56851] " mikpe at it dot uu.se
  2013-04-06 11:57 ` mikpe at it dot uu.se
@ 2013-04-08 11:07 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-08 11:07 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-08 11:07:55 UTC ---
Dup.

*** This bug has been marked as a duplicate of bug 55964 ***


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-08 11:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-05 21:01 [Bug c/56851] New: Segmentation Error using -O3 optimization john at jbeidl dot com
2013-04-06  9:58 ` [Bug c/56851] " mikpe at it dot uu.se
2013-04-06 11:57 ` mikpe at it dot uu.se
2013-04-08 11:07 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).