public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58522] New: ICE with segfault at -O3 on x86_64-linux-gnu
@ 2013-09-24 20:28 su at cs dot ucdavis.edu
  2013-09-24 21:25 ` [Bug tree-optimization/58522] [4.9 Regression] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-09-24 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58522
           Summary: ICE with segfault at -O3 on x86_64-linux-gnu
           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 --enable-checking=release
--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 20130924 (experimental) [trunk revision 202859] (GCC) 
$ 
$ gcc-trunk -O2 small.c   
$ gcc-4.8 -O3 small.c  
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:13:1: internal compiler error: Segmentation fault
 main ()
 ^
0x8108ef crash_signal
    ../../gcc-trunk/gcc/toplev.c:335
0x83b957 ssa_default_def(function*, tree_node*)
    ../../gcc-trunk/gcc/tree-dfa.c:310
0x83bcc0 get_or_create_ssa_default_def(function*, tree_node*)
    ../../gcc-trunk/gcc/tree-dfa.c:362
0x8569ec get_reaching_def
    ../../gcc-trunk/gcc/tree-into-ssa.c:1184
0x85ca82 maybe_replace_use
    ../../gcc-trunk/gcc/tree-into-ssa.c:1791
0x85ca82 rewrite_update_stmt
    ../../gcc-trunk/gcc/tree-into-ssa.c:1974
0x85ca82 rewrite_update_dom_walker::before_dom_children(basic_block_def*)
    ../../gcc-trunk/gcc/tree-into-ssa.c:2150
0xb99ed7 dom_walker::walk(basic_block_def*)
    ../../gcc-trunk/gcc/domwalk.c:176
0x85560c rewrite_blocks
    ../../gcc-trunk/gcc/tree-into-ssa.c:2209
0x85bce6 update_ssa(unsigned int)
    ../../gcc-trunk/gcc/tree-into-ssa.c:3294
0x9826bd insert_range_assertions
    ../../gcc-trunk/gcc/tree-vrp.c:6103
0x9826bd execute_vrp
    ../../gcc-trunk/gcc/tree-vrp.c:9572
0x9826bd execute
    ../../gcc-trunk/gcc/tree-vrp.c:9673
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.
$ 



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


static int a, b;
char *c;
short *d, e;
int f;

short
foo (int p1, int p2)
{
  return p2 >= 0 || p1 > 1 >> p2 ? p1 : p1 << p2;
}

int
main ()
{
  int *g = &f, h;

  for (b = 4; b; b--)
    {
      for (a = 0; a < 5; a++)
        {
      e = foo (h != 0, *d);
      *g |= e;
      *d = 0;
        }
      *c = 0;
    }

  return 0;
}
>From gcc-bugs-return-430487-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 24 21:23:08 2013
Return-Path: <gcc-bugs-return-430487-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32007 invoked by alias); 24 Sep 2013 21:23:08 -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 31938 invoked by uid 48); 24 Sep 2013 21:23:03 -0000
From: "schaub.johannes at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/36587] Feature: add warning for constructor call with discarded return.
Date: Tue, 24 Sep 2013 21:23:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: schaub.johannes at googlemail dot com
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: cc
Message-ID: <bug-36587-4-3Wm8IML86C@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-36587-4@http.gcc.gnu.org/bugzilla/>
References: <bug-36587-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/msg01727.txt.bz2
Content-length: 882

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

Johannes Schaub <schaub.johannes at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schaub.johannes@googlemail.
                   |                            |com

--- Comment #7 from Johannes Schaub <schaub.johannes at googlemail dot com> ---
(In reply to Jonathan Wakely from comment #3)
> This would have prevented bugs I've dealt with where critical sections where
> not protected:
> {
>   lock_guard (mutex);
>   // mutex NOT locked here!
> }
>

Jonathan, unfortunately that code won't create and discard a temporary object,
so I am not sure whether this patch would have caught the mistake of creating a
default constructed lock_guard (whatever that means).


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

* [Bug tree-optimization/58522] [4.9 Regression] ICE with segfault at -O3 on x86_64-linux-gnu
  2013-09-24 20:28 [Bug tree-optimization/58522] New: ICE with segfault at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2013-09-24 21:25 ` jakub at gcc dot gnu.org
  2013-09-24 23:00 ` su at cs dot ucdavis.edu
  2013-09-25  0:58 ` su at cs dot ucdavis.edu
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-09-24 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.9.0
            Summary|ICE with segfault at -O3 on |[4.9 Regression] ICE with
                   |x86_64-linux-gnu            |segfault at -O3 on
                   |                            |x86_64-linux-gnu

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r199048, so sounds like one of the many dups of the reassoc
scheduling bugs.


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

* [Bug tree-optimization/58522] [4.9 Regression] ICE with segfault at -O3 on x86_64-linux-gnu
  2013-09-24 20:28 [Bug tree-optimization/58522] New: ICE with segfault at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2013-09-24 21:25 ` [Bug tree-optimization/58522] [4.9 Regression] " jakub at gcc dot gnu.org
@ 2013-09-24 23:00 ` su at cs dot ucdavis.edu
  2013-09-25  0:58 ` su at cs dot ucdavis.edu
  2 siblings, 0 replies; 4+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-09-24 23:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Jakub Jelinek from comment #1)
> Started with r199048, so sounds like one of the many dups of the reassoc
> scheduling bugs.

Jakub, I think you are right. I somehow forgot to check it against the proposed
patch for 57393, which makes this ICE disappear.


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

* [Bug tree-optimization/58522] [4.9 Regression] ICE with segfault at -O3 on x86_64-linux-gnu
  2013-09-24 20:28 [Bug tree-optimization/58522] New: ICE with segfault at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2013-09-24 21:25 ` [Bug tree-optimization/58522] [4.9 Regression] " jakub at gcc dot gnu.org
  2013-09-24 23:00 ` su at cs dot ucdavis.edu
@ 2013-09-25  0:58 ` su at cs dot ucdavis.edu
  2 siblings, 0 replies; 4+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-09-25  0:58 UTC (permalink / raw)
  To: gcc-bugs

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

Zhendong Su <su at cs dot ucdavis.edu> changed:

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

--- Comment #3 from Zhendong Su <su at cs dot ucdavis.edu> ---
Dup.

*** This bug has been marked as a duplicate of bug 57393 ***


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

end of thread, other threads:[~2013-09-25  0:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-24 20:28 [Bug tree-optimization/58522] New: ICE with segfault at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2013-09-24 21:25 ` [Bug tree-optimization/58522] [4.9 Regression] " jakub at gcc dot gnu.org
2013-09-24 23:00 ` su at cs dot ucdavis.edu
2013-09-25  0:58 ` 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).