public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58451] New: ICE with segfault at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
@ 2013-09-17 23:40 su at cs dot ucdavis.edu
  2013-09-18 21:31 ` [Bug tree-optimization/58451] " su at cs dot ucdavis.edu
  0 siblings, 1 reply; 2+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-09-17 23:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58451
           Summary: ICE with segfault at -O3 on x86_64-linux-gnu (both
                    32-bit and 64-bit modes)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-O3 on x86_64-linux in both 32-bit and 64-bit modes. 

This is a regression from 4.8.x. 


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto
--with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk
--with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk
--prefix=/usr/local/gcc-trunk
Thread model: posix
gcc version 4.9.0 20130917 (experimental) [trunk revision 202643] (GCC) 
$ gcc-trunk -O2 -c small.c
$ gcc-4.8 -O3 -c small.c
$ gcc-trunk -O3 -c small.c
small.c: In function ‘foo’:
small.c:3:6: internal compiler error: Segmentation fault
 void foo ()
      ^
0x9249bf crash_signal
        ../../gcc-trunk/gcc/toplev.c:335
0xa2719d find_uses_to_rename_use
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:369
0xa273d6 find_uses_to_rename_bb
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:427
0xa27b6d find_uses_to_rename
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:451
0xa27b6d rewrite_into_loop_closed_ssa(bitmap_head_def*, unsigned int)
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:513
0x995070 tree_loop_distribution
        ../../gcc-trunk/gcc/tree-loop-distribution.c:1738
0x995070 execute
        ../../gcc-trunk/gcc/tree-loop-distribution.c:1781
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.
$ 



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


int *a[2], b, c, d, e;

void foo ()
{
  for (b = 1; b >= 0; b--)
    if (e)
      {
        a[b] = 0;
        c = d = 0;
      }
}
>From gcc-bugs-return-430038-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 17 23:46:43 2013
Return-Path: <gcc-bugs-return-430038-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14902 invoked by alias); 17 Sep 2013 23:46:43 -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 14849 invoked by uid 48); 17 Sep 2013 23:46:40 -0000
From: "meissner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/58452] New: GCC 4.8 and trunk do not compile simple powerpc-linuxpaired -O3 case
Date: Tue, 17 Sep 2013 23:46: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: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: meissner at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
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
Message-ID: <bug-58452-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-09/txt/msg01278.txt.bz2
Content-length: 3165

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

            Bug ID: 58452
           Summary: GCC 4.8 and trunk do not compile simple
                    powerpc-linuxpaired -O3 case
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: meissner at gcc dot gnu.org

While doing some work on power8, I wanted to make sure that for existing
systems, I was generating the same code.  So I built some code and ran it
through various -mcpu=xxxx options.  When I built a powerpc-linuxpaired
compiler, the compiler has trouble with a simple loop that should be
vectorized:

-bns-> ./xgcc -B./ -O3 -S -mcpu=750 foo3.c -mpaired
foo3.c: In function ‘float_extern_set3’:
foo3.c:8:26: internal compiler error: in expand_insn, at optabs.c:8274
     float_extern_mem3[i] = p[i];
                          ^
0x10514c5b expand_insn(insn_code, unsigned int, expand_operand*)
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/optabs.c:8274
0x1032c3e7 expand_assignment(tree_node*, tree_node*, bool)
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/expr.c:4668
0x1020b457 expand_gimple_stmt_1
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:2208
0x1020bb9f expand_gimple_stmt
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:2304
0x1020c427 expand_gimple_basic_block
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:4138
0x10210763 gimple_expand_cfg
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:4657
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.

In looking at it, it looks like Andrew and I missed modifying paired.md back in
April 2011, when the vectorizer started checking the predicates of movmisalign:

-bns-> ./xgcc -B./ -O3 -S -mcpu=750 foo3.c -mpaired
foo3.c: In function ‘float_extern_set3’:
foo3.c:8:26: internal compiler error: in expand_insn, at optabs.c:8274
     float_extern_mem3[i] = p[i];
                          ^
0x10514c5b expand_insn(insn_code, unsigned int, expand_operand*)
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/optabs.c:8274
0x1032c3e7 expand_assignment(tree_node*, tree_node*, bool)
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/expr.c:4668
0x1020b457 expand_gimple_stmt_1
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:2208
0x1020bb9f expand_gimple_stmt
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:2304
0x1020c427 expand_gimple_basic_block
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:4138
0x10210763 gimple_expand_cfg
        /home/meissner/fsf-src/gcc-4_8-branch/gcc/cfgexpand.c:4657
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.

Using the same fix as was used in vector.md to change the predicates.md fixes
the problem.
>From gcc-bugs-return-430039-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 17 23:47:04 2013
Return-Path: <gcc-bugs-return-430039-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15756 invoked by alias); 17 Sep 2013 23:47:04 -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 15716 invoked by uid 48); 17 Sep 2013 23:47:01 -0000
From: "meissner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/58452] GCC 4.8 and trunk do not compile simple powerpc-linuxpaired -O3 case
Date: Tue, 17 Sep 2013 23:47:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: meissner at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: meissner at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on assigned_to everconfirmed
Message-ID: <bug-58452-4-G348NaPWc4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58452-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58452-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: 2013-09/txt/msg01279.txt.bz2
Content-length: 494

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX452

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-09-17
           Assignee|unassigned at gcc dot gnu.org      |meissner at gcc dot gnu.org
     Ever confirmed|0                           |1


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

* [Bug tree-optimization/58451] ICE with segfault at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes)
  2013-09-17 23:40 [Bug tree-optimization/58451] New: ICE with segfault at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
@ 2013-09-18 21:31 ` su at cs dot ucdavis.edu
  0 siblings, 0 replies; 2+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-09-18 21:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Marek Polacek from comment #1)
> Should be already fixed by richi's r202644.

Verified (for 202680). Thanks.


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

end of thread, other threads:[~2013-09-18 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-17 23:40 [Bug tree-optimization/58451] New: ICE with segfault at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) su at cs dot ucdavis.edu
2013-09-18 21:31 ` [Bug tree-optimization/58451] " su at cs dot ucdavis.edu

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