public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61384] New: ICE on valid code at -O3 on x86_64-linux-gnu
@ 2014-06-02  4:30 su at cs dot ucdavis.edu
  2014-06-02  8:09 ` [Bug tree-optimization/61384] [4.10 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: su at cs dot ucdavis.edu @ 2014-06-02  4:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61384
           Summary: ICE on valid code at -O3 on x86_64-linux-gnu
           Product: gcc
           Version: unknown
            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-gnu in both 32-bit and 64-bit modes.

It is a regression from 4.9.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.10.0/lto-wrapper
Target: x86_64-unknown-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 4.10.0 20140601 (experimental) [trunk revision 211115] (GCC) 
$ 
$ gcc-trunk -O2 small.c; a.out
$ gcc-4.9.0 -O3 small.c; a.out
$ 
$ gcc-trunk -O3 small.c
small.c: In function ‘fn2’:
small.c:11:1: internal compiler error: in check_probability, at
basic-block.h:953
 fn2 ()
 ^
0xb8f066 check_probability
        ../../gcc-trunk/gcc/basic-block.h:953
0xb8c78f check_probability
        ../../gcc-trunk/gcc/tree.h:2842
0xb8c78f combine_probabilities
        ../../gcc-trunk/gcc/basic-block.h:962
0xb8c78f slpeel_tree_peel_loop_to_edge
        ../../gcc-trunk/gcc/tree-vect-loop-manip.c:1371
0xb8cbd4 vect_do_peeling_for_loop_bound(_loop_vec_info*, tree_node*,
tree_node*, unsigned int, bool)
        ../../gcc-trunk/gcc/tree-vect-loop-manip.c:1761
0xb7dba6 vect_transform_loop(_loop_vec_info*)
        ../../gcc-trunk/gcc/tree-vect-loop.c:5852
0xb9ac16 vectorize_loops()
        ../../gcc-trunk/gcc/tree-vectorizer.c:476
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, b, d, e, g, h;
static int c = 1, f[5]; 

int
fn1 (int p1, int p2)
{
  return p1 && p2 && p2;
}

void
fn2 ()
{
  for (d = 0; d < 1; d++)
    {
      g = f[0];
      e = 0;
      h = fn1 (1, (a && c) ^ b);
    }
  for (; e < 5; e++)
    f[e] = 1;
}

int
main ()
{
  fn2 (); 
  return 0;
}
>From gcc-bugs-return-452945-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 02 06:23:52 2014
Return-Path: <gcc-bugs-return-452945-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19762 invoked by alias); 2 Jun 2014 06:23:51 -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 19709 invoked by uid 48); 2 Jun 2014 06:23:45 -0000
From: "gcc.hall at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug inline-asm/49611] Inline asm should support input/output of flags
Date: Mon, 02 Jun 2014 06:23:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: inline-asm
X-Bugzilla-Version: 4.5.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: gcc.hall at gmail 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:
Message-ID: <bug-49611-4-LY0RK4CefI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-49611-4@http.gcc.gnu.org/bugzilla/>
References: <bug-49611-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: 2014-06/txt/msg00027.txt.bz2
Content-length: 182

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

--- Comment #8 from Jeremy <gcc.hall at gmail dot com> ---
Asm goto does not allow any outputs, which does limit its usefulness.


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

* [Bug tree-optimization/61384] [4.10 Regression] ICE on valid code at -O3 on x86_64-linux-gnu
  2014-06-02  4:30 [Bug tree-optimization/61384] New: ICE on valid code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2014-06-02  8:09 ` rguenth at gcc dot gnu.org
  2014-06-02  9:16 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-02  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-06-02
      Known to work|                            |4.9.0
            Version|unknown                     |4.10.0
   Target Milestone|---                         |4.10.0
            Summary|ICE on valid code at -O3 on |[4.10 Regression] ICE on
                   |x86_64-linux-gnu            |valid code at -O3 on
                   |                            |x86_64-linux-gnu
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.


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

* [Bug tree-optimization/61384] [4.10 Regression] ICE on valid code at -O3 on x86_64-linux-gnu
  2014-06-02  4:30 [Bug tree-optimization/61384] New: ICE on valid code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2014-06-02  8:09 ` [Bug tree-optimization/61384] [4.10 Regression] " rguenth at gcc dot gnu.org
@ 2014-06-02  9:16 ` jakub at gcc dot gnu.org
  2014-06-02 14:50 ` dehao at gcc dot gnu.org
  2014-11-19 13:43 ` [Bug tree-optimization/61384] [5 " rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-06-02  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dehao at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Caused by r210538.


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

* [Bug tree-optimization/61384] [4.10 Regression] ICE on valid code at -O3 on x86_64-linux-gnu
  2014-06-02  4:30 [Bug tree-optimization/61384] New: ICE on valid code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2014-06-02  8:09 ` [Bug tree-optimization/61384] [4.10 Regression] " rguenth at gcc dot gnu.org
  2014-06-02  9:16 ` jakub at gcc dot gnu.org
@ 2014-06-02 14:50 ` dehao at gcc dot gnu.org
  2014-11-19 13:43 ` [Bug tree-optimization/61384] [5 " rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dehao at gcc dot gnu.org @ 2014-06-02 14:50 UTC (permalink / raw)
  To: gcc-bugs

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

dehao at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #3 from dehao at gcc dot gnu.org ---
We need to rebuild frequency after vrp, otherwise the following code in
tree-ssa-threadupdate.c will make the frequency larger than upper-bound.

          /* Excessive jump threading may make frequencies large enough so
             the computation overflows.  */
          if (rd->dup_blocks[0]->frequency < BB_FREQ_MAX * 2)
            rd->dup_blocks[0]->frequency += EDGE_FREQUENCY (e);

I'll send out a patch for this.


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

* [Bug tree-optimization/61384] [5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu
  2014-06-02  4:30 [Bug tree-optimization/61384] New: ICE on valid code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2014-06-02 14:50 ` dehao at gcc dot gnu.org
@ 2014-11-19 13:43 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-19 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Seems to be fixed (can't reproduce anymore).


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

end of thread, other threads:[~2014-11-19 13:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02  4:30 [Bug tree-optimization/61384] New: ICE on valid code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2014-06-02  8:09 ` [Bug tree-optimization/61384] [4.10 Regression] " rguenth at gcc dot gnu.org
2014-06-02  9:16 ` jakub at gcc dot gnu.org
2014-06-02 14:50 ` dehao at gcc dot gnu.org
2014-11-19 13:43 ` [Bug tree-optimization/61384] [5 " 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).