re PR tree-optimization/60002 (ICE: SIGSEGV in skip_artificial_parms_for() with ...
authorJakub Jelinek <jakub@redhat.com>
Tue, 4 Feb 2014 13:38:13 +0000 (14:38 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 4 Feb 2014 13:38:13 +0000 (14:38 +0100)
PR tree-optimization/60002
* cgraphclones.c (build_function_decl_skip_args): Clear
DECL_LANG_SPECIFIC.

* g++.dg/opt/pr60002.C: New test.

From-SVN: r207465

gcc/ChangeLog
gcc/cgraphclones.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr60002.C [new file with mode: 0644]

index 17a62621325e227f2daaf894ed5836370c69c0c7..98f38c2fb95ba46c8573e533da9cf0af3adbc8ef 100644 (file)
@@ -1,5 +1,9 @@
 2014-02-04  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/60002
+       * cgraphclones.c (build_function_decl_skip_args): Clear
+       DECL_LANG_SPECIFIC.
+
        PR tree-optimization/60023
        * tree-if-conv.c (predicate_mem_writes): Pass true instead of
        false to gsi_replace.
index a87f77c628a90bc1e103004bc34a77980bce5ba4..ca69033ddde402c3aa5bcc6911802b6d69d31ed6 100644 (file)
@@ -390,6 +390,9 @@ build_function_decl_skip_args (tree orig_decl, bitmap args_to_skip,
       DECL_BUILT_IN_CLASS (new_decl) = NOT_BUILT_IN;
       DECL_FUNCTION_CODE (new_decl) = (enum built_in_function) 0;
     }
+  /* The FE might have information and assumptions about the other
+     arguments.  */
+  DECL_LANG_SPECIFIC (new_decl) = NULL;
   return new_decl;
 }
 
index 4c49fc3c2a7b702217d6c6bb4233a00dbc8e6561..b85f335dbcef675160666fb74a2697c903b0af71 100644 (file)
@@ -1,5 +1,8 @@
 2014-02-04  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/60002
+       * g++.dg/opt/pr60002.C: New test.
+
        PR tree-optimization/60023
        * g++.dg/vect/pr60023.cc: New test.
 
diff --git a/gcc/testsuite/g++.dg/opt/pr60002.C b/gcc/testsuite/g++.dg/opt/pr60002.C
new file mode 100644 (file)
index 0000000..753f579
--- /dev/null
@@ -0,0 +1,12 @@
+// PR tree-optimization/60002
+// { dg-do compile }
+// { dg-options "-O2 -fcompare-debug -fdeclone-ctor-dtor -fipa-cp-clone" }
+
+struct A {};
+
+struct B : virtual A { B (); ~B (); };
+
+B::~B ()
+{
+  B ();
+}