diff options
author | Jason Merrill <jason@redhat.com> | 2010-02-17 17:51:34 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-02-17 17:51:34 -0500 |
commit | 85a52ea58cdcfe9c292d62b3e06149eea2f49eb9 (patch) | |
tree | fc88bd34be884a75dcce770218fb93feab9fb749 /gcc | |
parent | d29760adf92616716f04f958eacb9cceae2a0acf (diff) | |
download | gcc-85a52ea58cdcfe9c292d62b3e06149eea2f49eb9.zip gcc-85a52ea58cdcfe9c292d62b3e06149eea2f49eb9.tar.gz gcc-85a52ea58cdcfe9c292d62b3e06149eea2f49eb9.tar.bz2 |
re PR c++/43093 (internal compiler error: Segmentation fault when compiling Firefox)
PR c++/43093
* cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
have an INIT_EXPR anymore.
From-SVN: r156840
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/cp-gimplify.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/attrib37.C | 14 |
4 files changed, 24 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 40d7334..ab5fbe5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2010-02-17 Jason Merrill <jason@redhat.com> + PR c++/43093 + * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't + have an INIT_EXPR anymore. + PR c++/43079 * pt.c (convert_nontype_argument): Change assert to test. diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index cf81350..df09b60 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -552,7 +552,9 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) 25979. */ case INIT_EXPR: cp_gimplify_init_expr (expr_p, pre_p, post_p); - /* Fall through. */ + if (TREE_CODE (*expr_p) != INIT_EXPR) + return GS_OK; + /* Otherwise fall through. */ case MODIFY_EXPR: { /* If the back end isn't clever enough to know that the lhs and rhs diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 87e442e..34729bc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2010-02-17 Jason Merrill <jason@redhat.com> + PR c++/43093 + * g++.dg/ext/attrib37.C: New. + PR c++/43079 * g++.dg/template/ptrmem20.C: New. diff --git a/gcc/testsuite/g++.dg/ext/attrib37.C b/gcc/testsuite/g++.dg/ext/attrib37.C new file mode 100644 index 0000000..ac35587 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/attrib37.C @@ -0,0 +1,14 @@ +// PR c++/43093 +// { dg-do compile { target i?86-*-* } } + +struct S { + int x; + S(const S &s) {} +}; + +S __attribute__((__stdcall__)) getS(); + +void test() +{ + S s = getS(); +} |