public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions
@ 2012-09-22 10:41 zsojka at seznam dot cz
  2012-09-22 13:31 ` [Bug middle-end/54669] " polacek at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2012-09-22 10:41 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54669
           Summary: [4.8 Regression] ICE: verify_flow_info failed: BB 5
                    last statement has incorrectly set lp with
                    -fnon-call-exceptions
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


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

Compiler output:
$ gcc -O2 -fexceptions -fnon-call-exceptions testcase.c         
testcase.c: In function 'foo':
testcase.c:4:1: error: BB 5 last statement has incorrectly set lp
 foo (void)
 ^
testcase.c:4:1: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Backtrace:
(gdb) bt
#0  0x000000000111f2e0 in internal_error(char const*, ...) ()
#1  0x000000000069d48e in verify_flow_info() () at
/mnt/svn/gcc-trunk/gcc/cfghooks.c:260
#2  0x0000000000a06825 in cleanup_tree_cfg() () at
/mnt/svn/gcc-trunk/gcc/tree-cfgcleanup.c:693
#3  0x00000000010ea8d9 in tree_unroll_loops_completely(bool, bool) () at
/mnt/svn/gcc-trunk/gcc/tree-ssa-loop-ivcanon.c:648
#4  0x0000000000ad64f2 in tree_complete_unroll_inner() ()
#5  0x00000000008fb90d in execute_one_pass(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2199
#6  0x00000000008fbcc5 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2254
#7  0x00000000008fbcd7 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2255
#8  0x00000000006c0098 in expand_function(cgraph_node*) () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1601
#9  0x00000000006c1f42 in compile() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1705
#10 0x00000000006c2535 in finalize_compilation_unit() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2080
#11 0x000000000059f930 in c_write_global_declarations() () at
/mnt/svn/gcc-trunk/gcc/c/c-decl.c:10116
#12 0x00000000009e0a85 in compile_file() () at
/mnt/svn/gcc-trunk/gcc/toplev.c:560
#13 0x00000000009e265a in toplev_main(int, char**) () at
/mnt/svn/gcc-trunk/gcc/toplev.c:1863
#14 0x00007ffff69594bd in __libc_start_main () from /lib64/libc.so.6
#15 0x0000000000586611 in _start ()


Version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-191586-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-191586-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 4.8.0 20120920 (experimental) (GCC) 


Tested revisions:
r191586 - crash
4.7 r188682 - OK


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

* [Bug middle-end/54669] [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
@ 2012-09-22 13:31 ` polacek at redhat dot com
  2012-09-22 14:24 ` polacek at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: polacek at redhat dot com @ 2012-09-22 13:31 UTC (permalink / raw)
  To: gcc-bugs


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

Marek Polacek <polacek at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |polacek at redhat dot com

--- Comment #1 from Marek Polacek <polacek at redhat dot com> 2012-09-22 13:30:11 UTC ---
Started with http://gcc.gnu.org/viewcvs?view=revision&revision=191387


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

* [Bug middle-end/54669] [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
  2012-09-22 13:31 ` [Bug middle-end/54669] " polacek at redhat dot com
@ 2012-09-22 14:24 ` polacek at redhat dot com
  2012-09-22 19:50 ` [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling " ebotcazou at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: polacek at redhat dot com @ 2012-09-22 14:24 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Marek Polacek <polacek at redhat dot com> 2012-09-22 14:22:46 UTC ---
With very slightly modified testcase:
int a[10];

void
foo (void)
{
  int x;
  int i;
  for (i = 0; i < 1;)
    {
      int b[3];
      for (i = 0; i < 4; i++)
    b[i] = a[i];
      if (&x)
    a[0] = b[0];
    }
}

we get:

x.c: In function ‘foo’:
x.c:4:1: error: statement marked for throw, but doesn’t
 foo (void)
 ^
# VUSE <.MEM_15>
_16 = a[0];

x.c:4:1: error: statement marked for throw, but doesn’t
# .MEM_17 = VDEF <.MEM_15>
b[0] = _16;

x.c:4:1: error: statement marked for throw, but doesn’t
# VUSE <.MEM_17>
_21 = a[1];

x.c:4:1: error: statement marked for throw, but doesn’t
# .MEM_22 = VDEF <.MEM_17>
b[1] = _21;

x.c:4:1: error: statement marked for throw, but doesn’t
# VUSE <.MEM_22>
_26 = a[2];

x.c:4:1: error: statement marked for throw, but doesn’t
# .MEM_27 = VDEF <.MEM_22>
b[2] = _26;

x.c:4:1: error: statement marked for throw, but doesn’t
# VUSE <.MEM_27>
_31 = a[3];

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


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

* [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
  2012-09-22 13:31 ` [Bug middle-end/54669] " polacek at redhat dot com
  2012-09-22 14:24 ` polacek at redhat dot com
@ 2012-09-22 19:50 ` ebotcazou at gcc dot gnu.org
  2012-09-22 19:52 ` ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-09-22 19:50 UTC (permalink / raw)
  To: gcc-bugs


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-22
          Component|middle-end                  |tree-optimization
   Target Milestone|---                         |4.8.0
            Summary|[4.8 Regression] ICE:       |[4.8 regression]
                   |verify_flow_info failed: BB |verify_flow_info failure
                   |5 last statement has        |after loop unrolling with
                   |incorrectly set lp with     |-fnon-call-exceptions
                   |-fnon-call-exceptions       |
     Ever Confirmed|0                           |1

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-09-22 19:50:11 UTC ---
I guess it's the transformation of array accesses with variable index into
array accesses with fixed index in conjunction with -fnon-call-exceptions.


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

* [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-09-22 19:50 ` [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling " ebotcazou at gcc dot gnu.org
@ 2012-09-22 19:52 ` ebotcazou at gcc dot gnu.org
  2012-09-22 20:04 ` polacek at redhat dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-09-22 19:52 UTC (permalink / raw)
  To: gcc-bugs


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

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

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-09-22 19:51:45 UTC ---
Fixing.


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

* [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2012-09-22 19:52 ` ebotcazou at gcc dot gnu.org
@ 2012-09-22 20:04 ` polacek at redhat dot com
  2012-09-22 20:35 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: polacek at redhat dot com @ 2012-09-22 20:04 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Marek Polacek <polacek at redhat dot com> 2012-09-22 20:03:59 UTC ---
It happens in cunrolli pass.  It might be propagate_constants_for_unrolling. 
It seems we eventually end up removing BB 9 and 11, which might be wrong.


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

* [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2012-09-22 20:04 ` polacek at redhat dot com
@ 2012-09-22 20:35 ` ebotcazou at gcc dot gnu.org
  2012-09-23 20:38 ` ebotcazou at gcc dot gnu.org
  2012-09-23 20:40 ` ebotcazou at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-09-22 20:35 UTC (permalink / raw)
  To: gcc-bugs


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-09/msg01595.htm
                   |                            |l

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-09-22 20:34:50 UTC ---
> It happens in cunrolli pass.  It might be propagate_constants_for_unrolling. 
> It seems we eventually end up removing BB 9 and 11, which might be wrong.

We just need to update the EH info after the transformation.


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

* [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2012-09-22 20:35 ` ebotcazou at gcc dot gnu.org
@ 2012-09-23 20:38 ` ebotcazou at gcc dot gnu.org
  2012-09-23 20:40 ` ebotcazou at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-09-23 20:38 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-09-23 20:37:40 UTC ---
Author: ebotcazou
Date: Sun Sep 23 20:37:37 2012
New Revision: 191654

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191654
Log:
    PR tree-optimization/54669
    * tree-ssa-loop-ivcanon.c (propagate_into_all_uses): Invoke
    maybe_clean_or_replace_eh_stmt on the modified use statements.

Added:
    trunk/gcc/testsuite/gcc.dg/pr54669.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-loop-ivcanon.c


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

* [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling with -fnon-call-exceptions
  2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2012-09-23 20:38 ` ebotcazou at gcc dot gnu.org
@ 2012-09-23 20:40 ` ebotcazou at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-09-23 20:40 UTC (permalink / raw)
  To: gcc-bugs


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

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

--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-09-23 20:39:43 UTC ---
Thanks for reporting the problem.


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

end of thread, other threads:[~2012-09-23 20:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-22 10:41 [Bug middle-end/54669] New: [4.8 Regression] ICE: verify_flow_info failed: BB 5 last statement has incorrectly set lp with -fnon-call-exceptions zsojka at seznam dot cz
2012-09-22 13:31 ` [Bug middle-end/54669] " polacek at redhat dot com
2012-09-22 14:24 ` polacek at redhat dot com
2012-09-22 19:50 ` [Bug tree-optimization/54669] [4.8 regression] verify_flow_info failure after loop unrolling " ebotcazou at gcc dot gnu.org
2012-09-22 19:52 ` ebotcazou at gcc dot gnu.org
2012-09-22 20:04 ` polacek at redhat dot com
2012-09-22 20:35 ` ebotcazou at gcc dot gnu.org
2012-09-23 20:38 ` ebotcazou at gcc dot gnu.org
2012-09-23 20:40 ` ebotcazou 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).