public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53011] New: ice in verify_loop_structure: bad sizes
@ 2012-04-16 18:33 dcb314 at hotmail dot com
  2012-04-16 19:36 ` [Bug c++/53011] " markus at trippelsdorf dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2012-04-16 18:33 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53011
           Summary: ice in verify_loop_structure: bad sizes
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dcb314@hotmail.com


Created attachment 27171
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27171
C++ source code

I just tried to compile the package libwvstreams-4.6.1-4
on gcc-4.8 trunk dated 20120415 on an AMD x86_64 box.

The compiler said

linuxstreams/wvinterface.cc: In member function 'int
WvInterface::delroute(const WvIPNet&, const WvIPAddr&, int, WvStringParm)':
linuxstreams/wvinterface.cc:479:5: error: size of loop 2 should be 0, not 1
 int WvInterface::delroute(const WvIPNet &dest, const WvIPAddr &gw,
     ^
linuxstreams/wvinterface.cc:479:5: error: bb 89 do not belong to loop 2
 int WvInterface::delroute(const WvIPNet &dest, const WvIPAddr &gw,
     ^
linuxstreams/wvinterface.cc:479:5: error: loop 2's header does not belong
directly to it
 int WvInterface::delroute(const WvIPNet &dest, const WvIPAddr &gw,
     ^
linuxstreams/wvinterface.cc:479:5: internal compiler error: in
verify_loop_structure, at cfgloop.c:1567
 int WvInterface::delroute(const WvIPNet &dest, const WvIPAddr &gw,
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O2 required.


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

* [Bug c++/53011] ice in verify_loop_structure: bad sizes
  2012-04-16 18:33 [Bug c++/53011] New: ice in verify_loop_structure: bad sizes dcb314 at hotmail dot com
@ 2012-04-16 19:36 ` markus at trippelsdorf dot de
  2012-04-16 20:00 ` markus at trippelsdorf dot de
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2012-04-16 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-04-16 19:35:42 UTC ---
Somewhat reduced:

 % cat test.ii
extern "C" class WvFastString;
typedef WvFastString& WvStringParm;
struct WvFastString {
  ~WvFastString();
  operator char* () {}
};
class WvString : WvFastString {};
class WvAddr {};
class WvIPAddr : WvAddr {};
struct WvIPNet : WvIPAddr {
  bool is_default() {}
};
template<class T, bool> struct WvTraits_Helper {
  static void release(T *obj) {
    delete obj;
  }
};
template<class From> struct WvTraits {
  static void release(From *obj) {
    WvTraits_Helper<From, 0>::release(obj);
  }
};
struct WvLink {
  void   *data;
  WvLink *next;
  bool    autofree;
  WvLink(bool, int) : autofree() {}
  bool get_autofree() {}

  void unlink() {
    delete this;
  }
};
struct WvListBase {
  WvLink head, *tail;
  WvListBase() : head(0, 0) {}
};
template<class T> struct WvList : WvListBase {
  ~WvList() {
    zap();
  }

  void zap(bool destroy = 1) {
    while (head.next) unlink_after(&head, destroy);
  }

  void unlink_after(WvLink *after, bool destroy) {
    WvLink *next = 0;
    T *obj       = (destroy && next->get_autofree()) ? 
                   static_cast<T*>(next->data) : 0;

    if (tail) tail = after;
    next->unlink();
    WvTraits<T>::release(obj);
  }
};
typedef WvList<WvString>WvStringListBase;
class WvStringList : WvStringListBase {};
class WvSubProc {
  WvStringList last_args, env;
};
void addroute(WvIPNet& dest, WvStringParm table) {
  if (dest.is_default() || (table != "default")) WvSubProc checkProc;
}

 % g++ -c -O1 test.ii
test.ii: In function ‘void addroute(WvIPNet&, WvStringParm)’:
test.ii:64:1: internal compiler error: Segmentation fault


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

* [Bug c++/53011] ice in verify_loop_structure: bad sizes
  2012-04-16 18:33 [Bug c++/53011] New: ice in verify_loop_structure: bad sizes dcb314 at hotmail dot com
  2012-04-16 19:36 ` [Bug c++/53011] " markus at trippelsdorf dot de
@ 2012-04-16 20:00 ` markus at trippelsdorf dot de
  2012-04-17  8:51 ` [Bug rtl-optimization/53011] [4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2012-04-16 20:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-04-16 19:59:38 UTC ---
create_preheader (loop=0x7ffff7452440, flags=<optimized out>) at
/home/markus/gcc/gcc/cfgloopmanip.c:1391
1391      latch_edge_was_fallthru = (mfb_kj_edge->flags & EDGE_FALLTHRU) != 0;
(gdb) bt
#0  create_preheader (loop=0x7ffff7452440, flags=<optimized out>) at
/home/markus/gcc/gcc/cfgloopmanip.c:1391
#1  0x0000000000607838 in create_preheaders (flags=1) at
/home/markus/gcc/gcc/cfgloopmanip.c:1443
#2  0x000000000074e417 in loop_optimizer_init (flags=flags@entry=7) at
/home/markus/gcc/gcc/loop-init.c:89
#3  0x000000000074e4ef in rtl_loop_init () at
/home/markus/gcc/gcc/loop-init.c:210
#4  0x000000000078dec8 in execute_one_pass (pass=pass@entry=0x1074880) at
/home/markus/gcc/gcc/passes.c:2176
#5  0x000000000078e225 in execute_pass_list (pass=0x1074880) at
/home/markus/gcc/gcc/passes.c:2231
#6  0x000000000078e237 in execute_pass_list (pass=0x10748e0) at
/home/markus/gcc/gcc/passes.c:2232
#7  0x000000000078e237 in execute_pass_list (pass=0x1074cc0) at
/home/markus/gcc/gcc/passes.c:2232
#8  0x0000000000612c69 in tree_rest_of_compilation (node=<error reading
variable: Unhandled dwarf expression opcode 0xfa>)
    at /home/markus/gcc/gcc/cgraphunit.c:1898
#9  0x00000000006157d2 in cgraph_expand_function (node=0x7ffff7412720) at
/home/markus/gcc/gcc/cgraphunit.c:1968
#10 0x0000000000616c28 in cgraph_expand_all_functions () at
/home/markus/gcc/gcc/cgraphunit.c:2033
#11 cgraph_optimize () at /home/markus/gcc/gcc/cgraphunit.c:2724
#12 0x000000000061749a in cgraph_finalize_compilation_unit () at
/home/markus/gcc/gcc/cgraphunit.c:2809
#13 0x00000000004f1b2f in cp_write_global_declarations () at
/home/markus/gcc/gcc/cp/decl2.c:4072
#14 0x000000000081fbd8 in compile_file () at /home/markus/gcc/gcc/toplev.c:572
#15 do_compile () at /home/markus/gcc/gcc/toplev.c:1938
#16 toplev_main (argc=13, argv=0x7fffffffe438) at
/home/markus/gcc/gcc/toplev.c:2014
#17 0x00007ffff7893675 in __libc_start_main (main=0x5c1b40 <main>, argc=13,
ubp_av=0x7fffffffe438, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe428) at libc-start.c:225
#18 0x0000000000492369 in _start () at ../sysdeps/x86_64/start.S:116


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

* [Bug rtl-optimization/53011] [4.8 Regression] ice in verify_loop_structure: bad sizes
  2012-04-16 18:33 [Bug c++/53011] New: ice in verify_loop_structure: bad sizes dcb314 at hotmail dot com
  2012-04-16 19:36 ` [Bug c++/53011] " markus at trippelsdorf dot de
  2012-04-16 20:00 ` markus at trippelsdorf dot de
@ 2012-04-17  8:51 ` rguenth at gcc dot gnu.org
  2012-04-17 11:07 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-17  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-*
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-04-17
          Component|c++                         |rtl-optimization
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.8.0
            Summary|ice in                      |[4.8 Regression] ice in
                   |verify_loop_structure: bad  |verify_loop_structure: bad
                   |sizes                       |sizes
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-17 08:50:30 UTC ---
Sigh.  Mine.


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

* [Bug rtl-optimization/53011] [4.8 Regression] ice in verify_loop_structure: bad sizes
  2012-04-16 18:33 [Bug c++/53011] New: ice in verify_loop_structure: bad sizes dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2012-04-17  8:51 ` [Bug rtl-optimization/53011] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-04-17 11:07 ` rguenth at gcc dot gnu.org
  2012-04-17 13:49 ` rguenth at gcc dot gnu.org
  2012-04-17 13:49 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-17 11:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-17 11:00:36 UTC ---
EH cleanup turns a loop nest of two into a single loop with multiple latches
by forwarding through an empty EH region.


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

* [Bug rtl-optimization/53011] [4.8 Regression] ice in verify_loop_structure: bad sizes
  2012-04-16 18:33 [Bug c++/53011] New: ice in verify_loop_structure: bad sizes dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2012-04-17 11:07 ` rguenth at gcc dot gnu.org
@ 2012-04-17 13:49 ` rguenth at gcc dot gnu.org
  2012-04-17 13:49 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-17 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-17 13:43:36 UTC ---
Fixed.


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

* [Bug rtl-optimization/53011] [4.8 Regression] ice in verify_loop_structure: bad sizes
  2012-04-16 18:33 [Bug c++/53011] New: ice in verify_loop_structure: bad sizes dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2012-04-17 13:49 ` rguenth at gcc dot gnu.org
@ 2012-04-17 13:49 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-17 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-17 13:42:56 UTC ---
Author: rguenth
Date: Tue Apr 17 13:42:48 2012
New Revision: 186529

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

    PR middle-end/53011
    * tree-eh.c (cleanup_empty_eh_merge_phis): Properly discard
    loops when redirecting an entry or latch edge.

    * g++.dg/torture/pr53011.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr53011.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-eh.c


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

end of thread, other threads:[~2012-04-17 13:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-16 18:33 [Bug c++/53011] New: ice in verify_loop_structure: bad sizes dcb314 at hotmail dot com
2012-04-16 19:36 ` [Bug c++/53011] " markus at trippelsdorf dot de
2012-04-16 20:00 ` markus at trippelsdorf dot de
2012-04-17  8:51 ` [Bug rtl-optimization/53011] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-04-17 11:07 ` rguenth at gcc dot gnu.org
2012-04-17 13:49 ` rguenth at gcc dot gnu.org
2012-04-17 13:49 ` 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).