public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/57479] New: [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list
@ 2013-05-30 23:43 bccheng at android dot com
  2013-05-30 23:44 ` [Bug rtl-optimization/57479] " bccheng at android dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bccheng at android dot com @ 2013-05-30 23:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57479
           Summary: [ARM][NEON] internal compiler error: Segmentation
                    fault in add_dependence_list
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bccheng at android dot com

I hit an ICE with GCC 4.7.2 and 4.7.3 on a function with lots of ARM NEON code.
The reduced input file is attached (I cannot seem to further reduce it) and
here are the cmdline options I used:

-march=armv7-a -mfloat-abi=softfp -mfpu=neon -mthumb-interwork -g
-frename-registers -O2 -c test.c

Here is the stack trace in gdb when the segfault happens:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000f3cbf2 in add_dependence_list (insn=0x7ffff70317e0, list=0x521, 
    uncond=1, dep_type=REG_DEP_ANTI)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-deps.c:1555
1555        add_dependence (insn, XEXP (list, 0), dep_type);
(gdb) bt
#0  0x0000000000f3cbf2 in add_dependence_list (insn=0x7ffff70317e0, 
    list=0x521, uncond=1, dep_type=REG_DEP_ANTI)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-deps.c:1555
#1  0x0000000000f3fb5c in sched_analyze_insn (deps=0x7fffffffca30, 
    x=0x7ffff7030780, insn=0x7ffff70317e0)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-deps.c:2982
#2  0x0000000000f4198d in deps_analyze_insn (deps=0x7fffffffca30, 
    insn=0x7ffff70317e0)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-deps.c:3505
#3  0x0000000000f41e67 in sched_analyze (deps=0x7fffffffca30, 
    head=0x7ffff702a0d8, tail=0x7ffff7032320)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-deps.c:3653
#4  0x00000000009c2155 in compute_block_dependences (bb=0)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-rgn.c:2702
#5  0x00000000009c35ae in sched_rgn_compute_dependencies (rgn=3)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-rgn.c:3140
#6  0x00000000009c2d2a in schedule_region (rgn=3)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-rgn.c:2915
#7  0x00000000009c3d0b in schedule_insns ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-rgn.c:3299
#8  0x00000000009c4613 in rest_of_handle_sched2 ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-rgn.c:3523
#9  0x0000000000942511 in execute_one_pass (pass=0x1a85ae0 <pass_sched2>)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/passes.c:2084
#10 0x00000000009426ea in execute_pass_list (pass=0x1a85ae0 <pass_sched2>)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/passes.c:2139
#11 0x000000000094270b in execute_pass_list (pass=0x1a84ec0 <pass_postreload>)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/passes.c:2140
#12 0x000000000094270b in execute_pass_list (
    pass=0x1a84e60 <pass_rest_of_compilation>)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/passes.c:2140
#13 0x0000000000a7c36c in tree_rest_of_compilation (fndecl=0x7ffff729dd00)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/tree-optimize.c:422
#14 0x00000000007372fa in cgraph_expand_function (node=0x7ffff72a3240)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/cgraphunit.c:1837
#15 0x00000000007374c5 in cgraph_expand_all_functions ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/cgraphunit.c:1904
#16 0x0000000000737dd1 in cgraph_optimize ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/cgraphunit.c:2218
#17 0x00000000007360e9 in cgraph_finalize_compilation_unit ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/cgraphunit.c:1344
#18 0x000000000063364b in c_write_global_declarations ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/c-decl.c:10032
#19 0x0000000000a121a4 in compile_file ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/toplev.c:573
#20 0x0000000000a141ab in do_compile ()
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/toplev.c:1938
#21 0x0000000000a1431b in toplev_main (argc=26, argv=0x7fffffffcec8)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/toplev.c:2014
#22 0x00000000006c0308 in main (argc=26, argv=0x7fffffffcec8)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/main.c:36
(gdb) f 0
#0  0x0000000000f3cbf2 in add_dependence_list (insn=0x7ffff70317e0, 
    list=0x521, uncond=1, dep_type=REG_DEP_ANTI)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-deps.c:1555
1555        add_dependence (insn, XEXP (list, 0), dep_type);
(gdb) up
#1  0x0000000000f3fb5c in sched_analyze_insn (deps=0x7fffffffca30, 
    x=0x7ffff7030780, insn=0x7ffff70317e0)
    at /tmp/AOSP-toolchain/build/../gcc/gcc-4.7/gcc/sched-deps.c:2982
2982          add_dependence_list (insn, reg_last->sets, 1, REG_DEP_ANTI);
(gdb) p reg_last->sets
$1 = (rtx) 0x521


Looks like reg_last->sets carries some garbage values. I also tried GCC 4.8.0
and it doesn't have the crash. However the code looks very different around
those functions. If there is a patch I can cherry-pick to 4.7 that will be
great.

Thanks!


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

* [Bug rtl-optimization/57479] [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list
  2013-05-30 23:43 [Bug rtl-optimization/57479] New: [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list bccheng at android dot com
@ 2013-05-30 23:44 ` bccheng at android dot com
  2013-06-01 11:26 ` mikpe at it dot uu.se
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bccheng at android dot com @ 2013-05-30 23:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from bccheng at android dot com ---
Created attachment 30232
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30232&action=edit
reduced test input


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

* [Bug rtl-optimization/57479] [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list
  2013-05-30 23:43 [Bug rtl-optimization/57479] New: [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list bccheng at android dot com
  2013-05-30 23:44 ` [Bug rtl-optimization/57479] " bccheng at android dot com
@ 2013-06-01 11:26 ` mikpe at it dot uu.se
  2013-06-03  6:03 ` bccheng at android dot com
  2013-06-07 10:24 ` mikpe at it dot uu.se
  3 siblings, 0 replies; 5+ messages in thread
From: mikpe at it dot uu.se @ 2013-06-01 11:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> ---
I can't reproduce the ICE with gcc-4.7.3 hosted on x86_64-linux configured as a
cross to either armv7l-unknown-linux-gnueabi or armv7l-unknown-eabi.

How was your gcc configured?


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

* [Bug rtl-optimization/57479] [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list
  2013-05-30 23:43 [Bug rtl-optimization/57479] New: [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list bccheng at android dot com
  2013-05-30 23:44 ` [Bug rtl-optimization/57479] " bccheng at android dot com
  2013-06-01 11:26 ` mikpe at it dot uu.se
@ 2013-06-03  6:03 ` bccheng at android dot com
  2013-06-07 10:24 ` mikpe at it dot uu.se
  3 siblings, 0 replies; 5+ messages in thread
From: bccheng at android dot com @ 2013-06-03  6:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from bccheng at android dot com ---
Here is my configuration:

--target=arm-linux-androideabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu

Please let me know if you need additional information.

Thanks!


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

* [Bug rtl-optimization/57479] [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list
  2013-05-30 23:43 [Bug rtl-optimization/57479] New: [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list bccheng at android dot com
                   ` (2 preceding siblings ...)
  2013-06-03  6:03 ` bccheng at android dot com
@ 2013-06-07 10:24 ` mikpe at it dot uu.se
  3 siblings, 0 replies; 5+ messages in thread
From: mikpe at it dot uu.se @ 2013-06-07 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Mikael Pettersson <mikpe at it dot uu.se> ---
I can reproduce the SEGV now, it was masked by my standard build's
--with-tune=cortex-a9 option.

The SEGV doesn't reproduce any more after r188742 + r188743, which changed the
way the ARM backend expands epilogues.  I don't immediately see the connection
between that change and the garbage reg_last->sets value.


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

end of thread, other threads:[~2013-06-07 10:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 23:43 [Bug rtl-optimization/57479] New: [ARM][NEON] internal compiler error: Segmentation fault in add_dependence_list bccheng at android dot com
2013-05-30 23:44 ` [Bug rtl-optimization/57479] " bccheng at android dot com
2013-06-01 11:26 ` mikpe at it dot uu.se
2013-06-03  6:03 ` bccheng at android dot com
2013-06-07 10:24 ` mikpe at it dot uu.se

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).