public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/67109] New: ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793
@ 2015-08-04  6:33 su at cs dot ucdavis.edu
  2015-08-04 11:58 ` [Bug tree-optimization/67109] [6 Regression] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-08-04  6:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67109

            Bug ID: 67109
           Summary: ICE at -O3 on x86_64-linux-gnu in
                    vect_analyze_slp_instance, at tree-vect-slp.c:1793
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk at
-O3 on x86_64-linux-gnu in the 64-bit mode (but not in the 32-bit mode). 

It is a regression from 5.1.x (I didn't check 5.2.x). 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20150803 (experimental) [trunk revision 226526] (GCC) 
$ 
$ gcc-trunk -m64 -O2 -c small.c
small.c: In function ‘fn1’:
small.c:12:9: warning: iteration 1u invokes undefined behavior
[-Waggressive-loop-optimizations]
    b[a] ^= 1;
         ^
small.c:10:7: note: containing loop
       for (; c < 5; c++)
       ^
$ gcc-trunk -m32 -O3 -c small.c
small.c: In function ‘fn1’:
small.c:12:9: warning: iteration 1u invokes undefined behavior
[-Waggressive-loop-optimizations]
    b[a] ^= 1;
         ^
small.c:10:7: note: containing loop
       for (; c < 5; c++)
       ^
$ 
$ gcc-5.1 -m64 -O3 -c small.c
small.c: In function ‘fn1’:
small.c:12:9: warning: iteration 1u invokes undefined behavior
[-Waggressive-loop-optimizations]
    b[a] ^= 1;
         ^
small.c:10:7: note: containing loop
       for (; c < 5; c++)
       ^
$ 
$ gcc-trunk -m64 -O3 -c small.c
small.c: In function ‘fn1’:
small.c:12:9: warning: iteration 1u invokes undefined behavior
[-Waggressive-loop-optimizations]
    b[a] ^= 1;
         ^
small.c:10:7: note: containing loop
       for (; c < 5; c++)
       ^
small.c:5:1: internal compiler error: in vect_analyze_slp_instance, at
tree-vect-slp.c:1793
 fn1 ()
 ^
0xcf91c5 vect_analyze_slp_instance
        ../../gcc-trunk/gcc/tree-vect-slp.c:1793
0xcf9ab7 vect_analyze_slp(_loop_vec_info*, _bb_vec_info*, unsigned int)
        ../../gcc-trunk/gcc/tree-vect-slp.c:1879
0xcf9eee vect_slp_analyze_bb_1
        ../../gcc-trunk/gcc/tree-vect-slp.c:2426
0xcf9eee vect_slp_analyze_bb(basic_block_def*)
        ../../gcc-trunk/gcc/tree-vect-slp.c:2552
0xcfce22 execute
        ../../gcc-trunk/gcc/tree-vectorizer.c:702
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ 


---------------------------


unsigned int a;
int b[1], c, d;

void
fn1 ()
{
  for (; d;)
    {
      a = c = 0;
      for (; c < 5; c++)
        {
          b[a] ^= 1;
          a--;
        }
    }
}
>From gcc-bugs-return-494017-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 04 06:38:45 2015
Return-Path: <gcc-bugs-return-494017-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 54323 invoked by alias); 4 Aug 2015 06:38:44 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 54308 invoked by uid 48); 4 Aug 2015 06:38:40 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67110] New: gcc.target/i386/iamcu/test_struct_returning.c execution test FAILs with -fpic
Date: Tue, 04 Aug 2015 06:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-67110-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-08/txt/msg00159.txt.bz2
Content-length: 3076

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg110

            Bug ID: 67110
           Summary: gcc.target/i386/iamcu/test_struct_returning.c
                    execution test FAILs with -fpic
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com
  Target Milestone: ---

As seen in [1], gcc.target/i386/iamcu/test_struct_returning.c execution test
FAILs with -fpic

/ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/iamcu/test_struct_returning.c
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/iamcu/asm-support.S
-m32  -O2 -fpic  -miamcu

Program received signal SIGSEGV, Segmentation fault.
0x08048385 in main () at
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/iamcu/test_struct_returning.c:336
336       D(1) D(2) D(3) D(4) D(5) D(6) D(7)
(gdb) list
331     }
332
333     int
334     main (void)
335     {
336       D(1) D(2) D(3) D(4) D(5) D(6) D(7)
337
338       D(30)
339
340       D(50) D(51) D(52) D(53) D(54) D(55) D(56) D(57) D(58) D(59)

(gdb) disass
Dump of assembler code for function main:
   0x08048300 <+0>:     push   %ebp
   0x08048301 <+1>:     push   %edi
   0x08048302 <+2>:     mov    $0x18,%ecx
   0x08048307 <+7>:     push   %esi
   0x08048308 <+8>:     push   %ebx
   0x08048309 <+9>:     xor    %edx,%edx
   0x0804830b <+11>:    call   0x80499c0 <__x86.get_pc_thunk.bx>
   0x08048310 <+16>:    add    $0x4cf0,%ebx
   0x08048316 <+22>:    sub    $0x108,%esp
   0x0804831c <+28>:    lea    0x2f0(%ebx),%edi
   0x08048322 <+34>:    lea    0x2ce(%ebx),%eax
   0x08048328 <+40>:    lea    0x2ec(%ebx),%ebp
   0x0804832e <+46>:    lea    0x304(%ebx),%esi
   0x08048334 <+52>:    mov    %eax,(%edi)
   0x08048336 <+54>:    lea    0x2fc(%ebx),%eax
   0x0804833c <+60>:    movl   $0x1,0x0(%ebp)
   0x08048343 <+67>:    movl   $0x0,(%esi)
   0x08048349 <+73>:    mov    %eax,(%esp)
   0x0804834c <+76>:    movl   $0x0,(%eax)
   0x08048352 <+82>:    lea    0x2f8(%ebx),%eax
   0x08048358 <+88>:    mov    %eax,0x4(%esp)
   0x0804835c <+92>:    movl   $0x0,(%eax)
   0x08048362 <+98>:    lea    0x2d4(%ebx),%eax
   0x08048368 <+104>:   mov    %eax,0x8(%esp)
   0x0804836c <+108>:   call   0x804ac30 <iamcu_memset>
   0x08048371 <+113>:   xor    %edx,%ebx
   0x08048373 <+115>:   xor    %ecx,%ecx
   0x08048375 <+117>:   lea    0x2f4(%ebx),%edx
   0x0804837b <+123>:   lea    -0x3550(%ebx),%eax
   0x08048381 <+129>:   mov    %edx,0xc(%esp)
=> 0x08048385 <+133>:   mov    %eax,(%edx)
   0x08048387 <+135>:   call   0x804ab00 <snapshot_ret>
   0x0804838c <+140>:   mov    %al,0x2ce(%ebx)
   0x08048392 <+146>:   lea    0xf8(%ebx),%eax
   0x08048398 <+152>:   mov    $0x1,%edx
   0x0804839d <+157>:   mov    (%eax),%eax
   0x0804839f <+159>:   call   0x804a950 <check_all>

(gdb) i r edx
edx            0x5c8    1480

[1] https://gcc.gnu.org/ml/gcc-testresults/2015-08/msg00271.html


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

* [Bug tree-optimization/67109] [6 Regression] ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793
  2015-08-04  6:33 [Bug tree-optimization/67109] New: ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793 su at cs dot ucdavis.edu
@ 2015-08-04 11:58 ` mpolacek at gcc dot gnu.org
  2015-08-04 12:01 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-08-04 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67109

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-08-04
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |6.0
            Summary|ICE at -O3 on               |[6 Regression] ICE at -O3
                   |x86_64-linux-gnu in         |on x86_64-linux-gnu in
                   |vect_analyze_slp_instance,  |vect_analyze_slp_instance,
                   |at tree-vect-slp.c:1793     |at tree-vect-slp.c:1793
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug tree-optimization/67109] [6 Regression] ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793
  2015-08-04  6:33 [Bug tree-optimization/67109] New: ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793 su at cs dot ucdavis.edu
  2015-08-04 11:58 ` [Bug tree-optimization/67109] [6 Regression] " mpolacek at gcc dot gnu.org
@ 2015-08-04 12:01 ` mpolacek at gcc dot gnu.org
  2015-08-04 13:05 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-08-04 12:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67109

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r224077.


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

* [Bug tree-optimization/67109] [6 Regression] ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793
  2015-08-04  6:33 [Bug tree-optimization/67109] New: ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793 su at cs dot ucdavis.edu
  2015-08-04 11:58 ` [Bug tree-optimization/67109] [6 Regression] " mpolacek at gcc dot gnu.org
  2015-08-04 12:01 ` mpolacek at gcc dot gnu.org
@ 2015-08-04 13:05 ` rguenth at gcc dot gnu.org
  2015-08-05  7:49 ` rguenth at gcc dot gnu.org
  2015-08-05  8:02 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-04 13:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67109

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.


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

* [Bug tree-optimization/67109] [6 Regression] ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793
  2015-08-04  6:33 [Bug tree-optimization/67109] New: ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793 su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2015-08-04 13:05 ` rguenth at gcc dot gnu.org
@ 2015-08-05  7:49 ` rguenth at gcc dot gnu.org
  2015-08-05  8:02 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-05  7:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67109

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Aug  5 07:48:34 2015
New Revision: 226610

URL: https://gcc.gnu.org/viewcvs?rev=226610&root=gcc&view=rev
Log:
2015-08-05  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67109
        * tree-vect-data-refs.c (vect_analyze_group_access_1): Check
        against too big groups.  Print whether this is a load or store
        group.  Rename from ...
        (vect_analyze_group_access): ... this which is now a wrapper
        dissolving an invalid group.
        (vect_analyze_data_ref_accesses): Print whether this is a load
        or store group.

        * gcc.dg/torture/pr67109.c: New testcase.
        * gcc.dg/vect/vect-119.c: Adjust.

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


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

* [Bug tree-optimization/67109] [6 Regression] ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793
  2015-08-04  6:33 [Bug tree-optimization/67109] New: ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793 su at cs dot ucdavis.edu
                   ` (3 preceding siblings ...)
  2015-08-05  7:49 ` rguenth at gcc dot gnu.org
@ 2015-08-05  8:02 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-05  8:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67109

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

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-08-05  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04  6:33 [Bug tree-optimization/67109] New: ICE at -O3 on x86_64-linux-gnu in vect_analyze_slp_instance, at tree-vect-slp.c:1793 su at cs dot ucdavis.edu
2015-08-04 11:58 ` [Bug tree-optimization/67109] [6 Regression] " mpolacek at gcc dot gnu.org
2015-08-04 12:01 ` mpolacek at gcc dot gnu.org
2015-08-04 13:05 ` rguenth at gcc dot gnu.org
2015-08-05  7:49 ` rguenth at gcc dot gnu.org
2015-08-05  8:02 ` 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).