public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36066]  New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
@ 2008-04-27 20:58 martin dot drab at fjfi dot cvut dot cz
  2008-04-27 20:59 ` [Bug tree-optimization/36066] " martin dot drab at fjfi dot cvut dot cz
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: martin dot drab at fjfi dot cvut dot cz @ 2008-04-27 20:58 UTC (permalink / raw)
  To: gcc-bugs

The attached example, when compiled with
   gcc version 4.4.0 20080426 (experimental) (GCC)
using
---------
   gcc -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations -c
stream_encoder.c.c -o stream_encoder.o
---------
produces the following ICE.

---------
stream_encoder.c: In function 'process_frame_':
stream_encoder.c:1844: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
---------

When any of the CFLAGS are removed, it passes. Tested on x86_64.


-- 
           Summary: ICE with -O1 -finline-small-functions -ftree-vrp -
                    funsafe-loop-optimizations
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin dot drab at fjfi dot cvut dot cz
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug tree-optimization/36066] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
@ 2008-04-27 20:59 ` martin dot drab at fjfi dot cvut dot cz
  2008-04-27 21:11 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: martin dot drab at fjfi dot cvut dot cz @ 2008-04-27 20:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from martin dot drab at fjfi dot cvut dot cz  2008-04-27 20:58 -------
Created an attachment (id=15537)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15537&action=view)
Example that triggers the bug.


-- 


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


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

* [Bug tree-optimization/36066] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
  2008-04-27 20:59 ` [Bug tree-optimization/36066] " martin dot drab at fjfi dot cvut dot cz
@ 2008-04-27 21:11 ` rguenth at gcc dot gnu dot org
  2008-04-27 21:31 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-04-27 21:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-04-27 21:11 -------
Confirmed.

Program received signal SIGSEGV, Segmentation fault.
0x0829ba29 in operand_equal_p (arg0=0xb7b248f0, arg1=0xb7c6fd68, flags=0)
    at /home/richard/src/trunk/gcc/fold-const.c:3037
3037      if (TYPE_UNSIGNED (TREE_TYPE (arg0)) != TYPE_UNSIGNED (TREE_TYPE
(arg1)))
(gdb) print arg0->common.type
$2 = (tree) 0x0

#0  0x0829ba29 in operand_equal_p (arg0=0xb7b248f0, arg1=0xb7c6fd68, flags=0)
    at /home/richard/src/trunk/gcc/fold-const.c:3037
#1  0x08623ccf in simplify_replace_tree (expr=0xb7b248f0, old=0xb7c6fd68, 
    new_tree=0xb7c4ec64)
    at /home/richard/src/trunk/gcc/tree-ssa-loop-niter.c:1347
#2  0x08623e50 in simplify_replace_tree (expr=0xb7774318, old=0xb7c6fd68, 
    new_tree=0xb7c4ec64)
    at /home/richard/src/trunk/gcc/tree-ssa-loop-niter.c:1358
#3  0x0862ba0e in substitute_in_loop_info (loop=0xb78bb898, name=0xb7c6fd68, 
    val=0xb7c4ec64) at /home/richard/src/trunk/gcc/tree-ssa-loop-niter.c:3070
#4  0x084abab2 in replace_uses_by (name=0xb7c6fd68, val=0xb7c4ec64)
    at /home/richard/src/trunk/gcc/tree-cfg.c:1273
#5  0x084ad00a in tree_merge_blocks (a=0xb7b3d30c, b=0xb7b3d744)
    at /home/richard/src/trunk/gcc/tree-cfg.c:1337
#6  0x0819f781 in merge_blocks (a=0xb7b3d30c, b=0xb7b3d744)
    at /home/richard/src/trunk/gcc/cfghooks.c:660
#7  0x084cfbbe in cleanup_tree_cfg_bb (bb=0xb7b3d30c)
    at /home/richard/src/trunk/gcc/tree-cfgcleanup.c:568
#8  0x084cfc76 in cleanup_tree_cfg_1 ()
    at /home/richard/src/trunk/gcc/tree-cfgcleanup.c:601
#9  0x084cfdf8 in cleanup_tree_cfg_noloop ()
    at /home/richard/src/trunk/gcc/tree-cfgcleanup.c:657
#10 0x084cff49 in cleanup_tree_cfg ()
#11 0x0870f68f in execute_vrp () at /home/richard/src/trunk/gcc/tree-vrp.c:6758
#12 0x083ec77e in execute_one_pass (pass=0x8c6b538)
    at /home/richard/src/trunk/gcc/passes.c:1133


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-04-27 21:11:09
               date|                            |


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


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

* [Bug tree-optimization/36066] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
  2008-04-27 20:59 ` [Bug tree-optimization/36066] " martin dot drab at fjfi dot cvut dot cz
  2008-04-27 21:11 ` rguenth at gcc dot gnu dot org
@ 2008-04-27 21:31 ` rguenth at gcc dot gnu dot org
  2008-04-27 21:32 ` [Bug tree-optimization/36066] [4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-04-27 21:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-04-27 21:31 -------
Created an attachment (id=15538)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15538&action=view)
somehwat reduced testcase


-- 


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


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

* [Bug tree-optimization/36066] [4.4 Regression] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
                   ` (2 preceding siblings ...)
  2008-04-27 21:31 ` rguenth at gcc dot gnu dot org
@ 2008-04-27 21:32 ` rguenth at gcc dot gnu dot org
  2008-04-27 21:44 ` martin dot drab at fjfi dot cvut dot cz
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-04-27 21:32 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ICE with -O1 -finline-small-|[4.4 Regression] ICE with -
                   |functions -ftree-vrp -      |O1 -finline-small-functions
                   |funsafe-loop-optimizations  |-ftree-vrp -funsafe-loop-
                   |                            |optimizations
   Target Milestone|---                         |4.4.0


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


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

* [Bug tree-optimization/36066] [4.4 Regression] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
                   ` (3 preceding siblings ...)
  2008-04-27 21:32 ` [Bug tree-optimization/36066] [4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-04-27 21:44 ` martin dot drab at fjfi dot cvut dot cz
  2008-04-27 22:54 ` martin dot drab at fjfi dot cvut dot cz
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: martin dot drab at fjfi dot cvut dot cz @ 2008-04-27 21:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from martin dot drab at fjfi dot cvut dot cz  2008-04-27 21:43 -------
The test cases also fail with

   -O1 -finline-small-functions -ftree-vrp -fprefetch-loop-arrays


-- 


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


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

* [Bug tree-optimization/36066] [4.4 Regression] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
                   ` (4 preceding siblings ...)
  2008-04-27 21:44 ` martin dot drab at fjfi dot cvut dot cz
@ 2008-04-27 22:54 ` martin dot drab at fjfi dot cvut dot cz
  2008-04-28  9:10 ` rguenth at gcc dot gnu dot org
  2008-04-28  9:10 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: martin dot drab at fjfi dot cvut dot cz @ 2008-04-27 22:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from martin dot drab at fjfi dot cvut dot cz  2008-04-27 22:54 -------
And the test cases also fail with

   -O1 -finline-small-functions -ftree-vrp -m32

so if you compile it for 32-bit target, naither the -funsafe-loop-optimizations
nor the -fprefetch-loop-arrays needs to be specified. Haven't tested it on a
native 32-bit host, so, hard to say whether it would ICE there as well, just
like this. However, natively on a 64-bit host with just "-O1
-finline-small-functions -ftree-vrp" it works without an ICE.


-- 


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


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

* [Bug tree-optimization/36066] [4.4 Regression] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
                   ` (6 preceding siblings ...)
  2008-04-28  9:10 ` rguenth at gcc dot gnu dot org
@ 2008-04-28  9:10 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-04-28  9:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-04-28 09:09 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/36066] [4.4 Regression] ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations
  2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
                   ` (5 preceding siblings ...)
  2008-04-27 22:54 ` martin dot drab at fjfi dot cvut dot cz
@ 2008-04-28  9:10 ` rguenth at gcc dot gnu dot org
  2008-04-28  9:10 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-04-28  9:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2008-04-28 09:10 -------
Subject: Bug 36066

Author: rguenth
Date: Mon Apr 28 09:09:19 2008
New Revision: 134745

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134745
Log:
2008-04-28  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/36066
        * tree-vrp.c (execute_vrp): Cleanup the CFG only after finalizing
        SCEV and loop.

        * gcc.dg/torture/pr36066.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr36066.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vrp.c


-- 


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


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

end of thread, other threads:[~2008-04-28  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-27 20:58 [Bug tree-optimization/36066] New: ICE with -O1 -finline-small-functions -ftree-vrp -funsafe-loop-optimizations martin dot drab at fjfi dot cvut dot cz
2008-04-27 20:59 ` [Bug tree-optimization/36066] " martin dot drab at fjfi dot cvut dot cz
2008-04-27 21:11 ` rguenth at gcc dot gnu dot org
2008-04-27 21:31 ` rguenth at gcc dot gnu dot org
2008-04-27 21:32 ` [Bug tree-optimization/36066] [4.4 Regression] " rguenth at gcc dot gnu dot org
2008-04-27 21:44 ` martin dot drab at fjfi dot cvut dot cz
2008-04-27 22:54 ` martin dot drab at fjfi dot cvut dot cz
2008-04-28  9:10 ` rguenth at gcc dot gnu dot org
2008-04-28  9:10 ` rguenth at gcc dot gnu dot 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).