]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/38706 (../../../../src/libstdc++-v3/src/strstream.cc:419: internal compi...
authorUros Bizjak <ubizjak@gmail.com>
Wed, 7 Jan 2009 21:56:32 +0000 (22:56 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 7 Jan 2009 21:56:32 +0000 (22:56 +0100)
PR target/38706
* config/alpha/alpha.c (alpha_end_function): For TARGET_ABI_OSF, call
free_after_compilation when outputting a thunk.
(alpha_output_mi_thunk_osf): Assert that we are processing a thunk.
Do not call free_after_compilation here.

testsuite/ChangeLog:

PR target/38706
* g++.dg/other/pr38706.C: New test.

From-SVN: r143167

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/pr38706.C [new file with mode: 0644]

index 03338fcfa523fe27cad0c128886b7be4f5737a7d..92ffefea476b778be814efb3820cdc0d6db9bea2 100644 (file)
@@ -1,7 +1,14 @@
+2009-01-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/38706
+       * config/alpha/alpha.c (alpha_end_function): For TARGET_ABI_OSF, call
+       free_after_compilation when outputting a thunk.
+       (alpha_output_mi_thunk_osf): Assert that we are processing a thunk.
+       Do not call free_after_compilation here.
+
 2009-01-07  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (ix86_target_string): Use ARRAY_SIZE.
-       (ix86_target_string): Ditto.
        (ix86_valid_target_attribute_inner_p): Ditto.
 
 2009-01-07  Jan Sjodin  <jan.sjodin@amd.com>
index d9ed21fba497270e81dc0f01e9b1c550ba0e8ace..9c79f8883fc52f5a40d4d597b1916bf6000054d2 100644 (file)
@@ -1,6 +1,7 @@
 /* Subroutines used for code generation on the DEC Alpha.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 This file is part of GCC.
@@ -8272,6 +8273,11 @@ alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED)
   if (GET_CODE (insn) == CALL_INSN)
     output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL);
 
+#if TARGET_ABI_OSF
+  if (crtl->is_thunk)
+    free_after_compilation (cfun);
+#endif
+
 #if TARGET_ABI_OPEN_VMS
   alpha_write_linkage (file, fnname, decl);
 #endif
@@ -8311,6 +8317,8 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
   HOST_WIDE_INT hi, lo;
   rtx this_rtx, insn, funexp;
 
+  gcc_assert (crtl->is_thunk);
+
   /* We always require a valid GP.  */
   emit_insn (gen_prologue_ldgp ());
   emit_note (NOTE_INSN_PROLOGUE_END);
@@ -8392,7 +8400,6 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
   final_start_function (insn, file, 1);
   final (insn, file, 1);
   final_end_function ();
-  free_after_compilation (cfun);
 }
 #endif /* TARGET_ABI_OSF */
 \f
index 0e605d0e98f13b4e69d5a75e24a4a2d8e2304376..e0fb09524d236da9cb0c07265c6b67bb06201d4c 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/38706
+       * g++.dg/other/pr38706.C: New test.
+
 2009-01-07  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/cpp0x/variadic92.C: New test.
diff --git a/gcc/testsuite/g++.dg/other/pr38706.C b/gcc/testsuite/g++.dg/other/pr38706.C
new file mode 100644 (file)
index 0000000..ec10d90
--- /dev/null
@@ -0,0 +1,19 @@
+// PR target/38706
+// { dg-do compile }
+// { dg-options "-O2" }
+
+class ios_base
+{
+public:
+  virtual ~ios_base ();
+
+};
+
+class istrstream:virtual public ios_base
+{
+public:
+  virtual ~istrstream ();
+
+};
+
+istrstream::~istrstream () {}