* [Bug c++/52918] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
@ 2012-04-09 20:30 ` bscottm at ieee dot org
2012-04-09 20:32 ` bscottm at ieee dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bscottm at ieee dot org @ 2012-04-09 20:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
B. Scott Michel <bscottm at ieee dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/52918] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
2012-04-09 20:30 ` [Bug c++/52918] " bscottm at ieee dot org
@ 2012-04-09 20:32 ` bscottm at ieee dot org
2012-04-10 12:25 ` [Bug target/52918] [4.8 Regression] " rguenth at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bscottm at ieee dot org @ 2012-04-09 20:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #1 from B. Scott Michel <bscottm at ieee dot org> 2012-04-09 20:31:53 UTC ---
Patch to check bb->loop_father is relatively obvious, but not clear that the
patch would do the right thing.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
2012-04-09 20:30 ` [Bug c++/52918] " bscottm at ieee dot org
2012-04-09 20:32 ` bscottm at ieee dot org
@ 2012-04-10 12:25 ` rguenth at gcc dot gnu.org
2012-04-10 12:32 ` ktietz at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-10 12:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |target
Target Milestone|--- |4.8.0
Summary|ICE: Invalid |[4.8 Regression] ICE:
|bb->loop_father (NULL) in |Invalid bb->loop_father
|add_bb_to_loop |(NULL) in add_bb_to_loop
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-10 12:25:22 UTC ---
The bug is that bb has no loop_father. Without preprocessed source I cannot
verify with a cross compiler.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (2 preceding siblings ...)
2012-04-10 12:25 ` [Bug target/52918] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-04-10 12:32 ` ktietz at gcc dot gnu.org
2012-04-10 21:28 ` bscottm at ieee dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-04-10 12:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-04-10
CC| |ktietz at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-04-10 12:31:39 UTC ---
I am on it. It is related to target's use of SjLj's exception, but target hook
TARGET_EXCEPT_UNWIND_INFO isn't set and so DWARF2 is used. I am just about
testing a patch for it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (3 preceding siblings ...)
2012-04-10 12:32 ` ktietz at gcc dot gnu.org
@ 2012-04-10 21:28 ` bscottm at ieee dot org
2012-04-10 21:31 ` bscottm at ieee dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bscottm at ieee dot org @ 2012-04-10 21:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #4 from B. Scott Michel <bscottm at ieee dot org> 2012-04-10 21:28:25 UTC ---
Created attachment 27128
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27128
Preprocessed eh_alloc.cc, for reference
Per request, preprocessed source attached.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (4 preceding siblings ...)
2012-04-10 21:28 ` bscottm at ieee dot org
@ 2012-04-10 21:31 ` bscottm at ieee dot org
2012-04-11 9:32 ` ktietz at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bscottm at ieee dot org @ 2012-04-10 21:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #5 from B. Scott Michel <bscottm at ieee dot org> 2012-04-10 21:31:13 UTC ---
I deduced that add_bb_to_loop and a null bb->loop_father meant that the
enclosing basic block was either missing or incorrectly annotated. The fix,
however, is not obvious without getting heavily involved in gcc development.
Preprocessed source uploaded for additional insight.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (5 preceding siblings ...)
2012-04-10 21:31 ` bscottm at ieee dot org
@ 2012-04-11 9:32 ` ktietz at gcc dot gnu.org
2012-04-11 10:45 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-04-11 9:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-04-11 09:31:58 UTC ---
Created attachment 27129
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27129
Preprocessed eh_allocator.cc
With patch posted to ML, this shows new error (compile with -O2):
../../../../../gcc/libstdc++-v3/src/c++98/bitmap_allocator.cc: In member
functio
n 'std::size_t* __gnu_cxx::free_list::_M_get(std::size_t)':
../../../../../gcc/libstdc++-v3/src/c++98/bitmap_allocator.cc:104:3: error:
loop
4's latch does not belong directly to it
../../../../../gcc/libstdc++-v3/src/c++98/bitmap_allocator.cc:104:3: internal
co
mpiler error: in verify_loop_structure, at cfgloop.c:1567
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] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (6 preceding siblings ...)
2012-04-11 9:32 ` ktietz at gcc dot gnu.org
@ 2012-04-11 10:45 ` rguenth at gcc dot gnu.org
2012-04-11 11:12 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-11 10:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-11 10:44:41 UTC ---
Reduced testcase for the first source:
typedef __SIZE_TYPE__ size_t;
void* __cxa_allocate_exception(size_t) throw();
typedef struct { } __gthread_mutex_t;
extern int __gthr_win32_mutex_unlock (__gthread_mutex_t *);
int __gthread_mutex_lock (__gthread_mutex_t *__mutex);
int __gthread_mutex_unlock (__gthread_mutex_t *__mutex);
void __throw_concurrence_lock_error();
void __throw_concurrence_unlock_error();
class __mutex {
__gthread_mutex_t _M_mutex;
public:
void lock() {
if (__gthread_mutex_lock(&_M_mutex) != 0)
__throw_concurrence_lock_error();
}
void unlock() {
if (__gthread_mutex_unlock(&_M_mutex) != 0)
__throw_concurrence_unlock_error();
}
};
class __scoped_lock {
typedef __mutex __mutex_type;
__mutex_type& _M_device;
public:
explicit __scoped_lock(__mutex_type& __name) : _M_device(__name) {
_M_device.lock();
}
~__scoped_lock() throw() {
_M_device.unlock();
}
};
__mutex emergency_mutex;
void * __cxa_allocate_exception(size_t thrown_size) throw()
{
void *ret;
if (! ret)
__scoped_lock sentry(emergency_mutex);
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (7 preceding siblings ...)
2012-04-11 10:45 ` rguenth at gcc dot gnu.org
@ 2012-04-11 11:12 ` rguenth at gcc dot gnu.org
2012-04-11 11:27 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-11 11:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-11 11:11:45 UTC ---
And for the 2nd:
typedef __SIZE_TYPE__ size_t;
class bad_alloc { };
typedef struct {
} __gthread_mutex_t;
int __gthread_mutex_unlock (__gthread_mutex_t *__mutex);
class __concurrence_unlock_error {
};
inline void __throw_concurrence_unlock_error() {
throw __concurrence_unlock_error();
}
class __mutex {
__gthread_mutex_t _M_mutex;
public:
void unlock() {
if (__gthread_mutex_unlock(&_M_mutex) != 0)
__throw_concurrence_unlock_error();
}
};
class free_list {
typedef __mutex __mutex_type;
__mutex_type& _M_get_mutex();
void _M_get(size_t __sz) throw(bad_alloc);
};
void free_list::_M_get(size_t __sz) throw(bad_alloc)
{
__mutex_type& __bfl_mutex = _M_get_mutex();
__bfl_mutex.unlock();
int __ctr = 2;
while (__ctr) {
size_t* __ret = 0;
--__ctr;
try {
__ret = (size_t*) (::operator new(__sz + sizeof(size_t)));
}
catch(const bad_alloc&) { }
}
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (8 preceding siblings ...)
2012-04-11 11:12 ` rguenth at gcc dot gnu.org
@ 2012-04-11 11:27 ` rguenth at gcc dot gnu.org
2012-04-11 12:05 ` ktietz at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-11 11:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
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 #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-11 11:26:48 UTC ---
Created attachment 27132
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27132
patch
Can you test the attached?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (9 preceding siblings ...)
2012-04-11 11:27 ` rguenth at gcc dot gnu.org
@ 2012-04-11 12:05 ` ktietz at gcc dot gnu.org
2012-04-11 14:03 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-04-11 12:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #10 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-04-11 12:05:27 UTC ---
(In reply to comment #9)
> Created attachment 27132 [details]
> patch
>
> Can you test the attached?
Bootstrap and regression test passes. Thanks
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (10 preceding siblings ...)
2012-04-11 12:05 ` ktietz at gcc dot gnu.org
@ 2012-04-11 14:03 ` rguenth at gcc dot gnu.org
2012-04-11 14:20 ` rguenth at gcc dot gnu.org
2012-04-11 18:38 ` bscottm at ieee dot org
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-11 14:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-11 14:02:37 UTC ---
Author: rguenth
Date: Wed Apr 11 14:02:26 2012
New Revision: 186320
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186320
Log:
2012-04-11 Richard Guenther <rguenther@suse.de>
PR middle-end/52918
* except.c (sjlj_emit_dispatch_table): Properly update loop
structure.
* g++.dg/torture/pr52918-1.C: New testcase.
* g++.dg/torture/pr52918-2.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr52918-1.C
trunk/gcc/testsuite/g++.dg/torture/pr52918-2.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/except.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (11 preceding siblings ...)
2012-04-11 14:03 ` rguenth at gcc dot gnu.org
@ 2012-04-11 14:20 ` rguenth at gcc dot gnu.org
2012-04-11 18:38 ` bscottm at ieee dot org
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-11 14:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-11 14:19:35 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52918] [4.8 Regression] ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop
2012-04-09 20:29 [Bug c++/52918] New: ICE: Invalid bb->loop_father (NULL) in add_bb_to_loop bscottm at ieee dot org
` (12 preceding siblings ...)
2012-04-11 14:20 ` rguenth at gcc dot gnu.org
@ 2012-04-11 18:38 ` bscottm at ieee dot org
13 siblings, 0 replies; 15+ messages in thread
From: bscottm at ieee dot org @ 2012-04-11 18:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52918
--- Comment #13 from B. Scott Michel <bscottm at ieee dot org> 2012-04-11 18:38:24 UTC ---
Thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread