aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-12-22 16:46:38 -0500
committerJason Merrill <jason@gcc.gnu.org>2015-12-22 16:46:38 -0500
commitd2889b14274f623af7022b060cd49b08ada66038 (patch)
tree82266f9e7233337816409fce56882967750604cf /gcc/cp
parentd6dd2c8e29213be6d5f95106bcb9b2cb7cbabb48 (diff)
downloadgcc-d2889b14274f623af7022b060cd49b08ada66038.zip
gcc-d2889b14274f623af7022b060cd49b08ada66038.tar.gz
gcc-d2889b14274f623af7022b060cd49b08ada66038.tar.bz2
re PR c++/67339 (Segfault when parsing a typename involving a template-alias)
PR c++/67339 * parser.c (cp_parser_elaborated_type_specifier): Use CLASS_TYPE_P rather than check for RECORD_TYPE. From-SVN: r231912
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1d4714a..dbc7b3e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2015-12-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/67339
+ * parser.c (cp_parser_elaborated_type_specifier): Use CLASS_TYPE_P
+ rather than check for RECORD_TYPE.
+
2015-12-22 Patrick Palka <ppalka@gcc.gnu.org>
* pt.c (make_pack_expansion): Make sure to initialize
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index c1948c4..262bfb2 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -16880,7 +16880,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
{
/* Indicate whether this class was declared as a `class' or as a
`struct'. */
- if (TREE_CODE (type) == RECORD_TYPE)
+ if (CLASS_TYPE_P (type))
CLASSTYPE_DECLARED_CLASS (type) = (tag_type == class_type);
cp_parser_check_class_key (tag_type, type);
}