]> gcc.gnu.org Git - gcc.git/commitdiff
error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands don't have types.
authorMark Mitchell <mark@codesourcery.com>
Thu, 8 Apr 1999 20:16:51 +0000 (20:16 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 8 Apr 1999 20:16:51 +0000 (20:16 +0000)
* error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
don't have types.

From-SVN: r26300

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/g++.old-deja/g++.pt/crash35.C [new file with mode: 0644]

index 21cf5a909f9ec74d9145bc441aab499db732d946..c1c04e797f7fd5424ce9d3d642b78b32b17683c1 100644 (file)
@@ -1,5 +1,8 @@
 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
 
+       * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
+       don't have types.
+
        * search.c (template_self_reference_p): Tweak.
 
 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
index 45b96d7ef401ffe3438e0d453eaed19801d3c0a3..055f92accb0eddbcf810c8b7c524677f9d5893c5 100644 (file)
@@ -1564,6 +1564,7 @@ dump_expr (t, nop)
       else
        {
          if (TREE_OPERAND (t,0) != NULL_TREE
+             && TREE_TYPE (TREE_OPERAND (t, 0))
              && NEXT_CODE (TREE_OPERAND (t, 0)) == REFERENCE_TYPE)
            dump_expr (TREE_OPERAND (t, 0), nop);
          else
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash35.C b/gcc/testsuite/g++.old-deja/g++.pt/crash35.C
new file mode 100644 (file)
index 0000000..d4084fe
--- /dev/null
@@ -0,0 +1,11 @@
+// Build don't link:
+// Origin: Miniussi <miniussi@ilog.fr>
+
+template <class O>
+struct Str {
+  Str(int& val= (*new int())); 
+};
+
+template<class O>
+Str<O>::Str(int& val) {}
+
This page took 0.085158 seconds and 5 git commands to generate.