public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
@ 2011-02-08  1:23 zsojka at seznam dot cz
  2011-02-08  2:11 ` [Bug tree-optimization/47639] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2011-02-08  1:23 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.5/4.6 Regression] ICE: verify_stmts failed:
                    statement marked for throw, but doesn't with
                    -fstack-check=generic -fexceptions
                    -fnon-call-exceptions
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 23272
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23272
reduced testcase

Compiler output:
$ gcc -fstack-check=generic -fexceptions -fnon-call-exceptions testcase.c 
testcase.c: In function 'foo':
testcase.c:7:1: error: statement marked for throw, but doesn't
D.2691_8 = {D.2701_15, D.2704_18};

testcase.c:7:1: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Tested revisions:
r169824 - crash
r169519 - crash
4.5 r168785 - crash
4.4 r168785 - OK


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

* [Bug tree-optimization/47639] [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
  2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
@ 2011-02-08  2:11 ` hjl.tools at gmail dot com
  2011-02-08 10:20 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2011-02-08  2:11 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.02.08 02:04:09
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.5.3
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-02-08 02:04:09 UTC ---
It is caused by revision 151676:

http://gcc.gnu.org/ml/gcc-cvs/2009-09/msg00423.html


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

* [Bug tree-optimization/47639] [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
  2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
  2011-02-08  2:11 ` [Bug tree-optimization/47639] " hjl.tools at gmail dot com
@ 2011-02-08 10:20 ` rguenth at gcc dot gnu.org
  2011-02-08 12:12 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-08 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-08 10:18:21 UTC ---
Well.  Mine then.


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

* [Bug tree-optimization/47639] [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
  2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
  2011-02-08  2:11 ` [Bug tree-optimization/47639] " hjl.tools at gmail dot com
  2011-02-08 10:20 ` rguenth at gcc dot gnu.org
@ 2011-02-08 12:12 ` rguenth at gcc dot gnu.org
  2011-02-08 14:22 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-08 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-08 12:09:09 UTC ---
Ugh.  We lower

  [LP 1] D.2691_8 = v1_6(D) / v2_7(D);

to

  D.2699_13 = BIT_FIELD_REF <v1_6(D), 32, 0>;
  D.2700_14 = BIT_FIELD_REF <v2_7(D), 32, 0>;
  D.2701_15 = D.2699_13 / D.2700_14;
  D.2702_16 = BIT_FIELD_REF <v1_6(D), 32, 32>;
  D.2703_17 = BIT_FIELD_REF <v2_7(D), 32, 32>;
  D.2704_18 = D.2702_16 / D.2703_17;
  [LP 1] D.2691_8 = {D.2701_15, D.2704_18};

now the most ugly part of that is we construct a big tree with
the CONSTRUCTOR and then feed that to force_gimple_operand ...

What I did in the patch that caused this is to make
{D.2701_15, D.2704_18} not throw - which exposes this bug.

We can hide this issue again by properly clearing EH info on
the CONSTRUCTOR statement, leaving the issue alone that we'd
really need to move EH info to the piecewise computations,
split the block, add new EH edges, etc.

Not worthwhile for stage4 and not a regression.

C++ testcase that fails with -fnon-call-exceptions only:

typedef int __attribute__ ((vector_size (8))) vec;

vec foo (vec v1, vec v2)
{
  try
    {
      return v1 / v2;
    } 
  catch (...)
    {
      throw;
    } 
}


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

* [Bug tree-optimization/47639] [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
  2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-02-08 12:12 ` rguenth at gcc dot gnu.org
@ 2011-02-08 14:22 ` rguenth at gcc dot gnu.org
  2011-02-08 15:08 ` [Bug tree-optimization/47639] [4.5 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-08 14:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-08 14:16:53 UTC ---
Author: rguenth
Date: Tue Feb  8 14:16:50 2011
New Revision: 169926

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169926
Log:
2011-02-08  Richard Guenther  <rguenther@suse.de>

    PR middle-end/47639
    * tree-vect-generic.c (expand_vector_operations_1): Update
    stmts here ...
    (expand_vector_operations): ... not here.  Cleanup EH info
    and the CFG if required.

    * g++.dg/opt/pr47639.c: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/opt/pr47639.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-generic.c


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

* [Bug tree-optimization/47639] [4.5 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
  2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-02-08 14:22 ` rguenth at gcc dot gnu.org
@ 2011-02-08 15:08 ` rguenth at gcc dot gnu.org
  2011-03-01 17:06 ` rguenth at gcc dot gnu.org
  2011-03-01 17:07 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-08 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.6.0
            Summary|[4.5/4.6 Regression] ICE:   |[4.5 Regression] ICE:
                   |verify_stmts failed:        |verify_stmts failed:
                   |statement marked for throw, |statement marked for throw,
                   |but doesn't with            |but doesn't with
                   |-fstack-check=generic       |-fstack-check=generic
                   |-fexceptions                |-fexceptions
                   |-fnon-call-exceptions       |-fnon-call-exceptions
      Known to fail|4.6.0                       |

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-08 15:06:25 UTC ---
Fixed on trunk sofar.


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

* [Bug tree-optimization/47639] [4.5 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
  2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-02-08 15:08 ` [Bug tree-optimization/47639] [4.5 " rguenth at gcc dot gnu.org
@ 2011-03-01 17:06 ` rguenth at gcc dot gnu.org
  2011-03-01 17:07 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 17:06:45 UTC ---
Author: rguenth
Date: Tue Mar  1 17:06:41 2011
New Revision: 170596

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170596
Log:
2011-03-01  Richard Guenther  <rguenther@suse.de>

        Backport from mainline
        2011-02-08  Richard Guenther  <rguenther@suse.de>

    PR middle-end/47639
    * tree-vect-generic.c (expand_vector_operations_1): Update
    stmts here ...
    (expand_vector_operations): ... not here.  Cleanup EH info
    and the CFG if required.

    * g++.dg/opt/pr47639.c: New testcase.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/opt/pr47639.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_5-branch/gcc/tree-vect-generic.c


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

* [Bug tree-optimization/47639] [4.5 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions
  2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-03-01 17:06 ` rguenth at gcc dot gnu.org
@ 2011-03-01 17:07 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 17:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 17:07:17 UTC ---
Fixed.


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

end of thread, other threads:[~2011-03-01 17:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-08  1:23 [Bug tree-optimization/47639] New: [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -fstack-check=generic -fexceptions -fnon-call-exceptions zsojka at seznam dot cz
2011-02-08  2:11 ` [Bug tree-optimization/47639] " hjl.tools at gmail dot com
2011-02-08 10:20 ` rguenth at gcc dot gnu.org
2011-02-08 12:12 ` rguenth at gcc dot gnu.org
2011-02-08 14:22 ` rguenth at gcc dot gnu.org
2011-02-08 15:08 ` [Bug tree-optimization/47639] [4.5 " rguenth at gcc dot gnu.org
2011-03-01 17:06 ` rguenth at gcc dot gnu.org
2011-03-01 17:07 ` 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).