public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/56851] Segmentation Error using -O3 optimization
Date: Sat, 06 Apr 2013 09:58:00 -0000	[thread overview]
Message-ID: <bug-56851-4-93pCnBUT1D@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56851-4@http.gcc.gnu.org/bugzilla/>


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.


  reply	other threads:[~2013-04-06  9:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 21:01 [Bug c/56851] New: " john at jbeidl dot com
2013-04-06  9:58 ` mikpe at it dot uu.se [this message]
2013-04-06 11:57 ` [Bug c/56851] " mikpe at it dot uu.se
2013-04-08 11:07 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56851-4-93pCnBUT1D@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).