public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
@ 2013-08-30 15:26 vries at gcc dot gnu.org
2013-08-30 15:29 ` [Bug tree-optimization/58282] " vries at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-08-30 15:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
Bug ID: 58282
Summary: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in
gimple_build_eh_must_not_throw
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
$ arm-none-linux-gnueabi-g++ gcc/testsuite/g++.dg/tm/noexcept-1.C
-fno-diagnostics-show-caret -fdiagnostics-color=never -fno-exceptions
-fmessage-length=0 -fgnu-tm -O -std=c++0x -fdump-tree-tmmark
-fdump-tree-tmlower -S -o noexcept-1.s
gcc/testsuite/g++.dg/tm/noexcept-1.C: In function 'int foo() [with T =
TrueFalse]':^M
gcc/testsuite/g++.dg/tm/noexcept-1.C:13:43: internal compiler error:
Segmentation fault^M
0x8951d05 crash_signal^M
gcc/toplev.c:335^M
0x8707b50 gimple_build_eh_must_not_throw(tree_node*)^M
gcc/gimple.c:730^M
0x8448b8a gimplify_must_not_throw_expr^M
gcc/cp/cp-gimplify.c:503^M
0x844917a cp_gimplify_expr(tree_node**, gimple_statement_d**,
gimple_statement_d**)^M
gcc/cp/cp-gimplify.c:571^M
0x874de93 gimplify_expr(tree_node**, gimple_statement_d**,
gimple_statement_d**, bool (*)(tree_node*), int)^M
gcc/gimplify.c:7241^M
0x87470ba gimplify_stmt(tree_node**, gimple_statement_d**)^M
gcc/gimplify.c:5699^M
0x87351b9 gimplify_bind_expr^M
gcc/gimplify.c:1213^M
0x874eb0e gimplify_expr(tree_node**, gimple_statement_d**,
gimple_statement_d**, bool (*)(tree_node*), int)^M
gcc/gimplify.c:7493^M
0x87470ba gimplify_stmt(tree_node**, gimple_statement_d**)^M
gcc/gimplify.c:5699^M
0x8732bfe gimplify_and_add(tree_node*, gimple_statement_d**)^M
gcc/gimplify.c:329^M
0x8732c2d gimplify_and_return_first^M
gcc/gimplify.c:341^M
0x874d8cf gimplify_transaction^M
gcc/gimplify.c:7042^M
0x874fcb6 gimplify_expr(tree_node**, gimple_statement_d**,
gimple_statement_d**, bool (*)(tree_node*), int)^M
gcc/gimplify.c:7803^M
0x87470ba gimplify_stmt(tree_node**, gimple_statement_d**)^M
gcc/gimplify.c:5699^M
0x87363fe gimplify_statement_list^M
gcc/gimplify.c:1525^M
0x874f95d gimplify_expr(tree_node**, gimple_statement_d**,
gimple_statement_d**, bool (*)(tree_node*), int)^M
gcc/gimplify.c:7711^M
0x87470ba gimplify_stmt(tree_node**, gimple_statement_d**)^M
gcc/gimplify.c:5699^M
0x8751d46 gimplify_body(tree_node*, bool)^M
gcc/gimplify.c:8356^M
0x87524b2 gimplify_function_tree(tree_node*)^M
gcc/gimplify.c:8488^M
0x8572c9a analyze_function^M
gcc/cgraphunit.c:630^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
Please include the complete backtrace with any bug report.^M
See <http://gcc.gnu.org/bugs.html> for instructions.^M
compiler exited with status 1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
@ 2013-08-30 15:29 ` vries at gcc dot gnu.org
2013-08-30 15:47 ` vries at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-08-30 15:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #1 from vries at gcc dot gnu.org ---
svn revision 202105
Configured with: src/gcc-mainline/configure --build=i686-pc-linux-gnu
--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads
--disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as
--with-gnu-ld --enable-languages=c,c++,fortran --enable-shared --enable-lto
--enable-symvers=gnu --enable-__cxa_atexit --disable-nls --prefix=install
--with-sysroot=install/arm-none-linux-gnueabi/libc
--with-gmp=obj/pkg-mainline-0-arm-none-linux-gnueabi/fsf-mainline-0-arm-none-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr
--with-mpfr=obj/pkg-mainline-0-arm-none-linux-gnueabi/fsf-mainline-0-arm-none-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr
--with-mpc=obj/pkg-mainline-0-arm-none-linux-gnueabi/fsf-mainline-0-arm-none-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--with-isl=obj/pkg-mainline-0-arm-none-linux-gnueabi/fsf-mainline-0-arm-none-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr
--with-cloog=obj/pkg-mainline-0-arm-none-linux-gnueabi/fsf-mainline-0-arm-none-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr
--with-libelf=obj/pkg-mainline-0-arm-none-linux-gnueabi/fsf-mainline-0-arm-none-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr
--disable-libgomp --disable-libitm --enable-poison-system-directories
--with-build-time-tools=install/arm-none-linux-gnueabi/bin
--with-build-time-tools=install/arm-none-linux-gnueabi/bin SED=sed
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
2013-08-30 15:29 ` [Bug tree-optimization/58282] " vries at gcc dot gnu.org
@ 2013-08-30 15:47 ` vries at gcc dot gnu.org
2013-08-30 16:26 ` vries at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-08-30 15:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #2 from vries at gcc dot gnu.org ---
It seems terminate_node is NULL
...
Program received signal SIGSEGV, Segmentation fault.
0x08707b50 in gimple_build_eh_must_not_throw (decl=0x0) at
/home/vries/local/fsf_gcc_mainline_arm_none_linux_gnueabi/src/gcc-mainline/gcc/gimple.c:730
730 gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
(gdb) up
#1 0x08448b8b in gimplify_must_not_throw_expr (expr_p=0xf7dd8030,
pre_p=0xffffc73c)
at
/home/vries/local/fsf_gcc_mainline_arm_none_linux_gnueabi/src/gcc-mainline/gcc/cp/cp-gimplify.c:503
503 mnt = gimple_build_eh_must_not_throw (terminate_node);
...
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
2013-08-30 15:29 ` [Bug tree-optimization/58282] " vries at gcc dot gnu.org
2013-08-30 15:47 ` vries at gcc dot gnu.org
@ 2013-08-30 16:26 ` vries at gcc dot gnu.org
2013-09-02 10:31 ` vries at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-08-30 16:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #3 from vries at gcc dot gnu.org ---
also reproduces with x86_64
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
` (2 preceding siblings ...)
2013-08-30 16:26 ` vries at gcc dot gnu.org
@ 2013-09-02 10:31 ` vries at gcc dot gnu.org
2013-09-03 10:47 ` [Bug c++/58282] " vries at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-09-02 10:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #4 from vries at gcc dot gnu.org ---
Tentative fix:
...
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index ee3503c..c8b328c 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5189,7 +5189,7 @@ finish_transaction_stmt (tree stmt, tree compound_stmt,
int flags, tree noex)
/* noexcept specifications are not allowed for function transactions. */
gcc_assert (!(noex && compound_stmt));
- if (noex)
+ if (noex && flag_exceptions)
{
tree body = build_must_not_throw_expr (TRANSACTION_EXPR_BODY (stmt),
noex);
@@ -5210,7 +5210,7 @@ tree
build_transaction_expr (location_t loc, tree expr, int flags, tree noex)
{
tree ret;
- if (noex)
+ if (noex && flag_exceptions)
{
expr = build_must_not_throw_expr (expr, noex);
SET_EXPR_LOCATION (expr, loc);
...
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
` (3 preceding siblings ...)
2013-09-02 10:31 ` vries at gcc dot gnu.org
@ 2013-09-03 10:47 ` vries at gcc dot gnu.org
2013-09-07 23:31 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-09-03 10:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |EH, ice-on-valid-code,
| |patch, trans-mem
--- Comment #5 from vries at gcc dot gnu.org ---
http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00119.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
` (4 preceding siblings ...)
2013-09-03 10:47 ` [Bug c++/58282] " vries at gcc dot gnu.org
@ 2013-09-07 23:31 ` vries at gcc dot gnu.org
2013-09-07 23:32 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-09-07 23:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #6 from vries at gcc dot gnu.org ---
Author: vries
Date: Sat Sep 7 23:31:48 2013
New Revision: 202359
URL: http://gcc.gnu.org/viewcvs?rev=202359&root=gcc&view=rev
Log:
Handle noexcept on transactions with -fno-exceptions
2013-09-08 Tom de Vries <tom@codesourcery.com>
PR c++/58282
* except.c (build_must_not_throw_expr): Handle
flag_exceptions.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/except.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
` (5 preceding siblings ...)
2013-09-07 23:31 ` vries at gcc dot gnu.org
@ 2013-09-07 23:32 ` vries at gcc dot gnu.org
2013-10-24 10:27 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-09-07 23:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #7 from vries at gcc dot gnu.org ---
Author: vries
Date: Sat Sep 7 23:31:58 2013
New Revision: 202360
URL: http://gcc.gnu.org/viewcvs?rev=202360&root=gcc&view=rev
Log:
Testcase for PR58282
2013-09-08 Tom de Vries <tom@codesourcery.com>
PR c++/58282
* g++.dg/tm/noexcept-6.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/tm/noexcept-6.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
` (6 preceding siblings ...)
2013-09-07 23:32 ` vries at gcc dot gnu.org
@ 2013-10-24 10:27 ` vries at gcc dot gnu.org
2013-10-25 14:20 ` vries at gcc dot gnu.org
2013-10-25 14:36 ` vries at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-10-24 10:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #8 from vries at gcc dot gnu.org ---
Also required for 4.7 and 4.8.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
` (7 preceding siblings ...)
2013-10-24 10:27 ` vries at gcc dot gnu.org
@ 2013-10-25 14:20 ` vries at gcc dot gnu.org
2013-10-25 14:36 ` vries at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-10-25 14:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
--- Comment #10 from vries at gcc dot gnu.org ---
Author: vries
Date: Fri Oct 25 14:20:06 2013
New Revision: 204069
URL: http://gcc.gnu.org/viewcvs?rev=204069&root=gcc&view=rev
Log:
2013-10-25 Tom de Vries <tom@codesourcery.com>
PR c++/58282
* except.c (build_must_not_throw_expr): Handle
flag_exceptions.
* g++.dg/tm/noexcept-6.C: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/tm/noexcept-6.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/except.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
` (8 preceding siblings ...)
2013-10-25 14:20 ` vries at gcc dot gnu.org
@ 2013-10-25 14:36 ` vries at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2013-10-25 14:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from vries at gcc dot gnu.org ---
Fixed in trunk, and 4.7 and 4.8 branches.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-10-25 14:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 15:26 [Bug tree-optimization/58282] New: g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw vries at gcc dot gnu.org
2013-08-30 15:29 ` [Bug tree-optimization/58282] " vries at gcc dot gnu.org
2013-08-30 15:47 ` vries at gcc dot gnu.org
2013-08-30 16:26 ` vries at gcc dot gnu.org
2013-09-02 10:31 ` vries at gcc dot gnu.org
2013-09-03 10:47 ` [Bug c++/58282] " vries at gcc dot gnu.org
2013-09-07 23:31 ` vries at gcc dot gnu.org
2013-09-07 23:32 ` vries at gcc dot gnu.org
2013-10-24 10:27 ` vries at gcc dot gnu.org
2013-10-25 14:20 ` vries at gcc dot gnu.org
2013-10-25 14:36 ` vries 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).