public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50635] New: ICE on invalid code: segfault in vectorize_loops
@ 2011-10-06 17:32 Greta.Yorsh at arm dot com
  2011-10-06 18:08 ` [Bug target/50635] " Greta.Yorsh at arm dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Greta.Yorsh at arm dot com @ 2011-10-06 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50635
           Summary: ICE on invalid code: segfault in vectorize_loops
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Greta.Yorsh@arm.com
            Target: arm-none-eabi


Created attachment 25431
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25431
small_ice.c

arm-none-eabi/gcc2/gcc/cc1 small_ice.c -O3 -quiet -mcpu=cortex-a9
-mfloat-abi=softfp -mfpu=neon 

small_ice.c: In function 'f0a':
small_ice.c:5:6: internal compiler error: Segmentation fault

Trace:

#0  flow_bb_inside_loop_p (loop=0x7ffff7436f68, bb=0x0) at
/work/local-checkouts/main/gcc-fsf/gcc/cfgloop.c:776
#1  0x00000000009ef6ef in vect_is_simple_use (operand=0x7ffff74bfaa0,
loop_vinfo=<value optimised out>, bb_vinfo=0x0, def_stmt=0x7fffffffe008,
def=0x7fffffffe010, dt=0x7fffffffe01c) at
/work/local-checkouts/main/gcc-fsf/gcc/tree-vect-stmts.c:5595
#2  0x00000000009f93dc in process_use (stmt=0x7ffff74b7580, use=0x7ffff74bfaa0,
loop_vinfo=0x15077a0, live_p=<value optimised out>,
relevant=vect_used_in_scope, worklist=<value optimised out>) at
/work/local-checkouts/main/gcc-fsf/gcc/tree-vect-stmts.c:368
#3  0x00000000009f9e69 in vect_mark_stmts_to_be_vectorized
(loop_vinfo=0x15077a0) at
/work/local-checkouts/main/gcc-fsf/gcc/tree-vect-stmts.c:658
#4  0x0000000000a0bae1 in vect_analyze_loop_2 (loop=0x7ffff7436f68) at
/work/local-checkouts/main/gcc-fsf/gcc/tree-vect-loop.c:1504
#5  vect_analyze_loop (loop=0x7ffff7436f68) at
/work/local-checkouts/main/gcc-fsf/gcc/tree-vect-loop.c:1650
#6  0x0000000000a18e4e in vectorize_loops () at
/work/local-checkouts/main/gcc-fsf/gcc/tree-vectorizer.c:203
#7  0x00000000007d7859 in execute_one_pass (pass=0x129b760) at
/work/local-checkouts/main/gcc-fsf/gcc/passes.c:2064
#8  0x00000000007d7bd5 in execute_pass_list (pass=0x129b760) at
/work/local-checkouts/main/gcc-fsf/gcc/passes.c:2119
#9  0x00000000007d7be7 in execute_pass_list (pass=0x129b580) at
/work/local-checkouts/main/gcc-fsf/gcc/passes.c:2120
#10 0x00000000007d7be7 in execute_pass_list (pass=0x129ac80) at
/work/local-checkouts/main/gcc-fsf/gcc/passes.c:2120
#11 0x00000000008deca8 in tree_rest_of_compilation (fndecl=0x7ffff7437400) at
/work/local-checkouts/main/gcc-fsf/gcc/tree-optimize.c:420
#12 0x00000000005c09ce in cgraph_expand_function (node=0x7ffff75a4120) at
/work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:1805
#13 0x00000000005c3fca in cgraph_expand_all_functions () at
/work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:1864
#14 cgraph_optimize () at
/work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:2141
#15 0x00000000005c44ea in cgraph_finalize_compilation_unit () at
/work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:1312
#16 0x00000000004a6e08 in c_write_global_declarations () at
/work/local-checkouts/main/gcc-fsf/gcc/c-decl.c:9936
#17 0x000000000087bcca in compile_file (argc=7, argv=0x7fffffffe4b8) at
/work/local-checkouts/main/gcc-fsf/gcc/toplev.c:581
#18 do_compile (argc=7, argv=0x7fffffffe4b8) at
/work/local-checkouts/main/gcc-fsf/gcc/toplev.c:1925
#19 toplev_main (argc=7, argv=0x7fffffffe4b8) at
/work/local-checkouts/main/gcc-fsf/gcc/toplev.c:2001
#20 0x00007ffff7874c4d in __libc_start_main () from /lib/libc.so.6
#21 0x0000000000496da9 in _start ()

ICE does not occur without "-mfloat-abi=softfp -mfpu=neon".
This ICE happens with trunk version of end of August 2011 and perhaps earlier.
It does not appear in gcc4.6. 
The code is invalid because uninitialized variable temp_3 is used.


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

* [Bug target/50635] ICE on invalid code: segfault in vectorize_loops
  2011-10-06 17:32 [Bug target/50635] New: ICE on invalid code: segfault in vectorize_loops Greta.Yorsh at arm dot com
@ 2011-10-06 18:08 ` Greta.Yorsh at arm dot com
  2011-10-06 18:10 ` [Bug target/50635] ICE on valid: " Greta.Yorsh at arm dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Greta.Yorsh at arm dot com @ 2011-10-06 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Greta Yorsh <Greta.Yorsh at arm dot com> 2011-10-06 18:08:25 UTC ---
In fact, it's ICE on valid - see the testcase small_ice_init.c. The command
line and backtrace are the same.


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

* [Bug target/50635] ICE on valid: segfault in vectorize_loops
  2011-10-06 17:32 [Bug target/50635] New: ICE on invalid code: segfault in vectorize_loops Greta.Yorsh at arm dot com
  2011-10-06 18:08 ` [Bug target/50635] " Greta.Yorsh at arm dot com
@ 2011-10-06 18:10 ` Greta.Yorsh at arm dot com
  2011-10-06 19:15 ` [Bug tree-optimization/50635] " irar at il dot ibm.com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Greta.Yorsh at arm dot com @ 2011-10-06 18:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Greta Yorsh <Greta.Yorsh at arm dot com> 2011-10-06 18:09:51 UTC ---
Created attachment 25432
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25432
small testcase for ice on valid code


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

* [Bug tree-optimization/50635] ICE on valid: segfault in vectorize_loops
  2011-10-06 17:32 [Bug target/50635] New: ICE on invalid code: segfault in vectorize_loops Greta.Yorsh at arm dot com
  2011-10-06 18:08 ` [Bug target/50635] " Greta.Yorsh at arm dot com
  2011-10-06 18:10 ` [Bug target/50635] ICE on valid: " Greta.Yorsh at arm dot com
@ 2011-10-06 19:15 ` irar at il dot ibm.com
  2011-10-09 15:09 ` irar at gcc dot gnu.org
  2011-10-10 13:02 ` irar at il dot ibm.com
  4 siblings, 0 replies; 6+ messages in thread
From: irar at il dot ibm.com @ 2011-10-06 19:15 UTC (permalink / raw)
  To: gcc-bugs

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

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-10-06
                 CC|                            |irar at il dot ibm.com
          Component|target                      |tree-optimization
         AssignedTo|unassigned at gcc dot       |irar at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #3 from Ira Rosen <irar at il dot ibm.com> 2011-10-06 19:14:58 UTC ---
I'll test this fix next week.

Index: tree-vect-patterns.c
===================================================================
--- tree-vect-patterns.c        (revision 179447)
+++ tree-vect-patterns.c        (working copy)
@@ -385,6 +385,7 @@ vect_handle_widen_mult_by_const (gimple stmt, tree
           || TREE_TYPE (gimple_assign_lhs (new_stmt)) != new_type)
         return false;

+      VEC_safe_push (gimple, heap, *stmts, def_stmt);
       *oprnd = gimple_assign_lhs (new_stmt);
     }
   else


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

* [Bug tree-optimization/50635] ICE on valid: segfault in vectorize_loops
  2011-10-06 17:32 [Bug target/50635] New: ICE on invalid code: segfault in vectorize_loops Greta.Yorsh at arm dot com
                   ` (2 preceding siblings ...)
  2011-10-06 19:15 ` [Bug tree-optimization/50635] " irar at il dot ibm.com
@ 2011-10-09 15:09 ` irar at gcc dot gnu.org
  2011-10-10 13:02 ` irar at il dot ibm.com
  4 siblings, 0 replies; 6+ messages in thread
From: irar at gcc dot gnu.org @ 2011-10-09 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from irar at gcc dot gnu.org 2011-10-09 15:09:04 UTC ---
Author: irar
Date: Sun Oct  9 15:09:00 2011
New Revision: 179724

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179724
Log:

        PR tree-optimization/50635
        * tree-vect-patterns.c (vect_handle_widen_mult_by_const): Add
        DEF_STMT to the list of statements to be replaced by the
        pattern statements.
        (vect_handle_widen_mult_by_const): Don't check TYPE_OUT.


Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr50635.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-patterns.c


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

* [Bug tree-optimization/50635] ICE on valid: segfault in vectorize_loops
  2011-10-06 17:32 [Bug target/50635] New: ICE on invalid code: segfault in vectorize_loops Greta.Yorsh at arm dot com
                   ` (3 preceding siblings ...)
  2011-10-09 15:09 ` irar at gcc dot gnu.org
@ 2011-10-10 13:02 ` irar at il dot ibm.com
  4 siblings, 0 replies; 6+ messages in thread
From: irar at il dot ibm.com @ 2011-10-10 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Ira Rosen <irar at il dot ibm.com> 2011-10-10 13:02:10 UTC ---
Fixed.


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

end of thread, other threads:[~2011-10-10 13:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-06 17:32 [Bug target/50635] New: ICE on invalid code: segfault in vectorize_loops Greta.Yorsh at arm dot com
2011-10-06 18:08 ` [Bug target/50635] " Greta.Yorsh at arm dot com
2011-10-06 18:10 ` [Bug target/50635] ICE on valid: " Greta.Yorsh at arm dot com
2011-10-06 19:15 ` [Bug tree-optimization/50635] " irar at il dot ibm.com
2011-10-09 15:09 ` irar at gcc dot gnu.org
2011-10-10 13:02 ` irar at il dot ibm.com

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