aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-02-03 18:23:11 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-02-03 18:23:11 +0100
commita36c33ebfc595336528780a71a2897d2b8dbdb94 (patch)
tree011eb09844de95f4520d4764bb49797c837dd5ca /gcc/cp
parente350dbbd73b6e76f8c4e32307c759d978038c6dc (diff)
downloadgcc-a36c33ebfc595336528780a71a2897d2b8dbdb94.zip
gcc-a36c33ebfc595336528780a71a2897d2b8dbdb94.tar.gz
gcc-a36c33ebfc595336528780a71a2897d2b8dbdb94.tar.bz2
re PR c++/39056 ([c++0x] ICE with invalid initializer list for complex variable)
PR c++/39056 * typeck2.c (digest_init_r): Don't call process_init_constructor for COMPLEX_TYPE. * g++.dg/cpp0x/initlist13.C: New test. From-SVN: r143899
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/typeck2.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 39a5eb8..c84de88 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39056
+ * typeck2.c (digest_init_r): Don't call process_init_constructor
+ for COMPLEX_TYPE.
+
2009-02-03 Paolo Bonzini <bonzini@gnu.org>
PR c++/36897
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index a19a999..526f780 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -789,7 +789,8 @@ digest_init_r (tree type, tree init, bool nested)
}
/* Handle scalar types (including conversions) and references. */
- if (TREE_CODE (type) != COMPLEX_TYPE
+ if ((TREE_CODE (type) != COMPLEX_TYPE
+ || BRACE_ENCLOSED_INITIALIZER_P (init))
&& (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE))
{
tree *exp;