This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34953] New: ICC on destructor + noreturn-function at -O3
- From: "bisqwit at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2008 13:51:11 -0000
- Subject: [Bug c++/34953] New: ICC on destructor + noreturn-function at -O3
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code crashes GCC versions 4.1.2, 4.1.3, and 4.2.3, when compiled using the
-O3 option.
void B_CLEAR(void* ret);
void B_NeverReturns(void* ret) __attribute__((noreturn));
int main()
{
const struct AutoErrPop { ~AutoErrPop() { } } AutoErrPopper = { };
B_NeverReturns(0);
}
void B_NeverReturns(void* ret)
{
B_CLEAR(ret); /* Never returns (does a setjmp/goto) */
}
Tested on x86_64 and i386. To reproduce: g++ a.cc -O3
Expected result:
a.cc:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
--
Summary: ICC on destructor + noreturn-function at -O3
Product: gcc
Version: 4.1.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bisqwit at iki dot fi
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=34953