aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-08-30 19:12:45 -0400
committerJason Merrill <jason@gcc.gnu.org>2008-08-30 19:12:45 -0400
commit0257eee5bd4700647061f61b13a2f89b2a4b4f28 (patch)
tree42cc01ec157540732a29f1cb9640ce21a951ea3a /gcc/cp
parenta4cbe62dd936932edfad78846388ad36942f51ba (diff)
downloadgcc-0257eee5bd4700647061f61b13a2f89b2a4b4f28.zip
gcc-0257eee5bd4700647061f61b13a2f89b2a4b4f28.tar.gz
gcc-0257eee5bd4700647061f61b13a2f89b2a4b4f28.tar.bz2
re PR c++/37288 (ICE using auto as function return type or parameter)
PR c++/37288 * pt.c (dependent_type_p): Don't abort on auto outside of a template. From-SVN: r139811
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index debbaba..7802e7e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/37288
+ * pt.c (dependent_type_p): Don't abort on auto outside of a template.
+
2008-08-29 Jason Merrill <jason@redhat.com>
Implement C++0x 'auto' semantics.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 3b345f1..5bb18d9 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -15892,7 +15892,7 @@ dependent_type_p (tree type)
/* If we are not processing a template, then nobody should be
providing us with a dependent type. */
gcc_assert (type);
- gcc_assert (TREE_CODE (type) != TEMPLATE_TYPE_PARM);
+ gcc_assert (TREE_CODE (type) != TEMPLATE_TYPE_PARM || is_auto (type));
return false;
}