aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2013-11-04 16:01:49 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2013-11-04 16:01:49 +0000
commit55a7f02f06688ffea709e2b3de25004f10b8708d (patch)
tree952180c09b0ffdf1d4908fcd85304a3777b25c17
parent9193fb05957b1602d175e8aef0a09bd4c4251d82 (diff)
downloadgcc-55a7f02f06688ffea709e2b3de25004f10b8708d.zip
gcc-55a7f02f06688ffea709e2b3de25004f10b8708d.tar.gz
gcc-55a7f02f06688ffea709e2b3de25004f10b8708d.tar.bz2
re PR c++/58979 (ICE with invalid use of pointer-to-member)
PR c++/58979 c-family/ * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case. testsuite/ * g++.dg/diagnostic/pr58979.C: New test. From-SVN: r204352
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-common.c5
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/pr58979.C4
4 files changed, 19 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 6747bdd..067c134 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-04 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58979
+ * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
+
2013-11-04 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index b01b9d0..030ee5a 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -9934,6 +9934,11 @@ invalid_indirection_error (location_t loc, tree type, ref_operator errstring)
"invalid type argument of %<->%> (have %qT)",
type);
break;
+ case RO_ARROW_STAR:
+ error_at (loc,
+ "invalid type argument of %<->*%> (have %qT)",
+ type);
+ break;
case RO_IMPLICIT_CONVERSION:
error_at (loc,
"invalid type argument of implicit conversion (have %qT)",
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3ebaf82..4da6480 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-04 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58979
+ * g++.dg/diagnostic/pr58979.C: New test.
+
2013-11-04 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/iec-559-macros-1.c, gcc.dg/iec-559-macros-2.c,
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr58979.C b/gcc/testsuite/g++.dg/diagnostic/pr58979.C
new file mode 100644
index 0000000..6be3f14
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/pr58979.C
@@ -0,0 +1,4 @@
+// PR c++/58979
+// { dg-do compile }
+
+int i = 0->*0; // { dg-error "invalid type argument of" }