OSDN Git Service

2004-10-05 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Oct 2004 22:09:25 +0000 (22:09 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Oct 2004 22:09:25 +0000 (22:09 +0000)
        PR c++/17368
        * semantics.c (finish_asm_stmt): Asm expressions need cleanup
        also.

2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/17368
        * g++.dg/ext/asm6.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88627 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/asm6.C [new file with mode: 0644]

index 13117b8..20a6a2d 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-05  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/17368
+       * semantics.c (finish_asm_stmt): Asm expressions need cleanup
+       also.
+
 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        Convert diagnostics to use quoting flag q 6/n
index 5bb6f3b..78d2683 100644 (file)
@@ -1178,6 +1178,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
                  output_operands, input_operands,
                  clobbers);
   ASM_VOLATILE_P (r) = volatile_p;
+  r = maybe_cleanup_point_expr (r);
   return add_stmt (r);
 }
 
index f684e7f..8e23309 100644 (file)
@@ -1,6 +1,11 @@
+2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/17368
+       * g++.dg/ext/asm6.C: New test.
+
 2004-10-06  Kenneth Zadeck <zadeck@naturalbridge.com>
 
-       gcc.dg/20011119-1.c : Added memory attribute to asm sequence.
+       gcc.dg/20011119-1.c : Added memory attribute to asm sequence.
 
 2004-10-06  Paul Brook  <paul@codesourcery.com>
 
diff --git a/gcc/testsuite/g++.dg/ext/asm6.C b/gcc/testsuite/g++.dg/ext/asm6.C
new file mode 100644 (file)
index 0000000..eaf79f4
--- /dev/null
@@ -0,0 +1,11 @@
+struct A
+{
+    ~A();
+};
+int foo(A);
+void bar()
+{
+    A a;
+    asm("" : : "r"(foo(a)) );//<-- cleanup needed here.
+};
+