public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load
@ 2012-05-02  6:10 gary at intrepid dot com
  2012-05-02  6:11 ` [Bug tree-optimization/53185] " gary at intrepid dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gary at intrepid dot com @ 2012-05-02  6:10 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53185
           Summary: segmentation fault in vectorizable_load
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gary@intrepid.com
                CC: nenad@intrepid.com
            Target: x86_64


Created attachment 27280
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27280
script to demonstrate compiler segfault

GCC 4.8 trunk revision r187034 encounters a segfault when compiling the
attached test case.  This appears to be a relatively recent regression.

Here's the back trace.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000d93153 in vectorizable_load (stmt=0x7ffff1889460,
    gsi=0x7fffffffd680, vec_stmt=0x7fffffffd5a0, slp_node=0x0,
    slp_node_instance=0x0)
    at gcc/tree-vect-stmts.c:4563
4563          ivstep = fold_build2 (MULT_EXPR, TREE_TYPE (ivstep), ivstep,
(gdb) where
#0  0x0000000000d93153 in vectorizable_load (stmt=0x7ffff1889460,
    gsi=0x7fffffffd680, vec_stmt=0x7fffffffd5a0, slp_node=0x0,
    slp_node_instance=0x0)
    at gcc/tree-vect-stmts.c:4563
#1  0x0000000000d978e4 in vect_transform_stmt (stmt=0x7ffff1889460,
    gsi=0x7fffffffd680, grouped_store=0x7fffffffd677 "", slp_node=0x0,
    slp_node_instance=0x0)
    at gcc/tree-vect-stmts.c:5639
#2  0x0000000000dac324 in vect_transform_loop (loop_vinfo=0x1cd0630)
    at gcc/tree-vect-loop.c:5461
#3  0x0000000000dbfd08 in vectorize_loops ()
    at gcc/tree-vectorizer.c:214
#4  0x0000000000cbf6b4 in tree_vectorize ()
    at gcc/tree-ssa-loop.c:218
#5  0x0000000000a22eb0 in execute_one_pass (pass=0x19fdc40)
    at gcc/passes.c:2181
#6  0x0000000000a23096 in execute_pass_list (pass=0x19fdc40)
    at gcc/passes.c:2236
#7  0x0000000000a230b7 in execute_pass_list (pass=0x19fda60)
    at gcc/passes.c:2237

To reproduce, copy the attached do-fail script and gasnet_core.i file to the
gcc build directory, and run do-fail.

The compiler was configured with --disable-bootstrap --disable-multilib and
--enable-checking, however, the failure occurred after a full bootstrap and
with various other configure switches as well.


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

* [Bug tree-optimization/53185] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
@ 2012-05-02  6:11 ` gary at intrepid dot com
  2012-05-02  6:43 ` markus at trippelsdorf dot de
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gary at intrepid dot com @ 2012-05-02  6:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Gary Funck <gary at intrepid dot com> 2012-05-02 06:11:21 UTC ---
Created attachment 27281
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27281
pre-processed source that demonstrates compiler segfault


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

* [Bug tree-optimization/53185] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
  2012-05-02  6:11 ` [Bug tree-optimization/53185] " gary at intrepid dot com
@ 2012-05-02  6:43 ` markus at trippelsdorf dot de
  2012-05-02 10:47 ` markus at trippelsdorf dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-02  6:43 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-02 06:42:19 UTC ---
 % cat test.i
unsigned short a, e;
int *b, *d;
int c;
extern int fn2();
void fn1 () {
  void *f;
  for (;;) {
    fn2 ();
    b = f;
    e = 0;
    for (; e < a; ++e)
      b[e] = d[e * c];
  }
}

 % gcc -O3 test.i
test.i: In function ‘fn1’:
test.i:5:6: internal compiler error: in vectorizable_load, at
tree-vect-stmts.c:4544
 void fn1 () {
      ^


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

* [Bug tree-optimization/53185] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
  2012-05-02  6:11 ` [Bug tree-optimization/53185] " gary at intrepid dot com
  2012-05-02  6:43 ` markus at trippelsdorf dot de
@ 2012-05-02 10:47 ` markus at trippelsdorf dot de
  2012-05-02 11:28 ` [Bug tree-optimization/53185] [4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-02 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at gcc dot gnu.org

--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-02 10:47:10 UTC ---
Started with revision 186530.


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

* [Bug tree-optimization/53185] [4.8 Regression] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
                   ` (2 preceding siblings ...)
  2012-05-02 10:47 ` markus at trippelsdorf dot de
@ 2012-05-02 11:28 ` rguenth at gcc dot gnu.org
  2012-05-03 10:59 ` markus at trippelsdorf dot de
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-02 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0
            Summary|segmentation fault in       |[4.8 Regression]
                   |vectorizable_load           |segmentation fault in
                   |                            |vectorizable_load


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

* [Bug tree-optimization/53185] [4.8 Regression] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
                   ` (3 preceding siblings ...)
  2012-05-02 11:28 ` [Bug tree-optimization/53185] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-05-03 10:59 ` markus at trippelsdorf dot de
  2012-05-08 16:03 ` gary at intrepid dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-03 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-03 10:59:05 UTC ---
The testcase now (trunk@187082) segfaults in fold_binary_loc:

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 29611]
0x00000000009cb27d in fold_binary_loc(unsigned int, tree_code, tree_node*,
tree_node*, tree_node*) ()
(gdb) bt
#0  0x00000000009cb27d in fold_binary_loc(unsigned int, tree_code, tree_node*,
tree_node*, tree_node*) ()
#1  0x0000000000b574fa in fold_build2_stat_loc(unsigned int, tree_code,
tree_node*, tree_node*, tree_node*) ()
#2  0x00000000006e29ae in ?? ()
#3  0x0000000000700f28 in vect_transform_stmt(gimple_statement_d*,
gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*) ()
#4  0x000000000052a273 in vect_transform_loop(_loop_vec_info*) ()
#5  0x00000000004ffef0 in vectorize_loops() ()


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

* [Bug tree-optimization/53185] [4.8 Regression] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
                   ` (4 preceding siblings ...)
  2012-05-03 10:59 ` markus at trippelsdorf dot de
@ 2012-05-08 16:03 ` gary at intrepid dot com
  2012-05-09 16:21 ` matz at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gary at intrepid dot com @ 2012-05-08 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Gary Funck <gary at intrepid dot com> 2012-05-08 16:01:50 UTC ---
Ping.  Is there an ETA for a fix for this bug?  It is preventing us from being
able to merge from the GCC trunk.  Thanks.


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

* [Bug tree-optimization/53185] [4.8 Regression] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
                   ` (5 preceding siblings ...)
  2012-05-08 16:03 ` gary at intrepid dot com
@ 2012-05-09 16:21 ` matz at gcc dot gnu.org
  2012-05-09 16:44 ` matz at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: matz at gcc dot gnu.org @ 2012-05-09 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Michael Matz <matz at gcc dot gnu.org> 2012-05-09 16:08:37 UTC ---
Author: matz
Date: Wed May  9 16:08:26 2012
New Revision: 187340

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187340
Log:
    PR tree-optimization/53185
    * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Disable
    peeling when we see strided loads.

testsuite/
    * gcc.dg/vect/pr53185.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr53185.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-data-refs.c


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

* [Bug tree-optimization/53185] [4.8 Regression] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
                   ` (6 preceding siblings ...)
  2012-05-09 16:21 ` matz at gcc dot gnu.org
@ 2012-05-09 16:44 ` matz at gcc dot gnu.org
  2012-05-09 22:17 ` gary at intrepid dot com
  2013-02-05 15:34 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: matz at gcc dot gnu.org @ 2012-05-09 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Matz <matz at gcc dot gnu.org> changed:

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

--- Comment #7 from Michael Matz <matz at gcc dot gnu.org> 2012-05-09 16:40:31 UTC ---
Fixed.


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

* [Bug tree-optimization/53185] [4.8 Regression] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
                   ` (7 preceding siblings ...)
  2012-05-09 16:44 ` matz at gcc dot gnu.org
@ 2012-05-09 22:17 ` gary at intrepid dot com
  2013-02-05 15:34 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: gary at intrepid dot com @ 2012-05-09 22:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Gary Funck <gary at intrepid dot com> 2012-05-09 21:43:28 UTC ---
(In reply to comment #7)
> Fixed.

Confirmed.  We're able to rebuild our app. without encountering the
segmentation fault.

Thanks!


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

* [Bug tree-optimization/53185] [4.8 Regression] segmentation fault in vectorizable_load
  2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
                   ` (8 preceding siblings ...)
  2012-05-09 22:17 ` gary at intrepid dot com
@ 2013-02-05 15:34 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-05 15:34 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-05 15:33:48 UTC ---
Author: rguenth
Date: Tue Feb  5 15:33:35 2013
New Revision: 195759

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195759
Log:
2013-02-05  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/53342
    PR tree-optimization/53185
    * tree-vectorizer.h (vect_check_strided_load): Remove.
    * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Do
    not disallow peeling for vectorized strided loads.
    (vect_check_strided_load): Make static and simplify.
    (vect_analyze_data_refs): Adjust.
    * tree-vect-stmts.c (vectorizable_load): Handle peeled loops
    correctly when vectorizing strided loads.

    * gcc.dg/vect/pr53185-2.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr53185-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-data-refs.c
    trunk/gcc/tree-vect-stmts.c
    trunk/gcc/tree-vectorizer.h


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

end of thread, other threads:[~2013-02-05 15:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02  6:10 [Bug tree-optimization/53185] New: segmentation fault in vectorizable_load gary at intrepid dot com
2012-05-02  6:11 ` [Bug tree-optimization/53185] " gary at intrepid dot com
2012-05-02  6:43 ` markus at trippelsdorf dot de
2012-05-02 10:47 ` markus at trippelsdorf dot de
2012-05-02 11:28 ` [Bug tree-optimization/53185] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-05-03 10:59 ` markus at trippelsdorf dot de
2012-05-08 16:03 ` gary at intrepid dot com
2012-05-09 16:21 ` matz at gcc dot gnu.org
2012-05-09 16:44 ` matz at gcc dot gnu.org
2012-05-09 22:17 ` gary at intrepid dot com
2013-02-05 15:34 ` 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).