aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-10-07 13:48:27 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-10-07 06:48:27 -0700
commitca05904340457c4c7dbdb15bc589ab980434fa53 (patch)
tree38ae969b5770c6884d7c5f028679561fc8a65cbf
parent93348822aafe18b25b303aef21697c8e52149975 (diff)
downloadgcc-ca05904340457c4c7dbdb15bc589ab980434fa53.zip
gcc-ca05904340457c4c7dbdb15bc589ab980434fa53.tar.gz
gcc-ca05904340457c4c7dbdb15bc589ab980434fa53.tar.bz2
parser.c (cp_parser_asm_definition): Look passed the CLEANUP_POINT_EXPR to get the asm expression.
cp/ChangeLog: * parser.c (cp_parser_asm_definition): Look passed the CLEANUP_POINT_EXPR to get the asm expression. testsuite/ChangeLog: * g++.dg/ext/asm6.C: Remove extraneous semicolon. From-SVN: r88688
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/parser.c8
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/ext/asm6.C2
4 files changed, 18 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 20a6a2d..364d1be 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,9 @@
-2004-10-05 Andrew Pinski <pinskia@physics.uc.edu>
+2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * parser.c (cp_parser_asm_definition): Look passed the
+ CLEANUP_POINT_EXPR to get the asm expression.
+
+2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17368
* semantics.c (finish_asm_stmt): Asm expressions need cleanup
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 79342db..9bd3f18 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -10389,7 +10389,13 @@ cp_parser_asm_definition (cp_parser* parser)
inputs, clobbers);
/* If the extended syntax was not used, mark the ASM_EXPR. */
if (!extended_p)
- ASM_INPUT_P (asm_stmt) = 1;
+ {
+ tree temp = asm_stmt;
+ if (TREE_CODE (temp) == CLEANUP_POINT_EXPR)
+ temp = TREE_OPERAND (temp, 0);
+
+ ASM_INPUT_P (temp) = 1;
+ }
}
else
assemble_asm (string);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1087adb..03e569e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * g++.dg/ext/asm6.C: Remove extraneous semicolon.
+
2004-10-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/17115
diff --git a/gcc/testsuite/g++.dg/ext/asm6.C b/gcc/testsuite/g++.dg/ext/asm6.C
index eaf79f4..96ef9d3 100644
--- a/gcc/testsuite/g++.dg/ext/asm6.C
+++ b/gcc/testsuite/g++.dg/ext/asm6.C
@@ -7,5 +7,5 @@ void bar()
{
A a;
asm("" : : "r"(foo(a)) );//<-- cleanup needed here.
-};
+}