summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/final.c6
-rw-r--r--gcc/testsuite/ChangeLog23
-rw-r--r--gcc/testsuite/gcc.target/arm/cond-asm.c13
4 files changed, 36 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ddd2e67edce..5d6f9d5255a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-10 Paul Brook <paul@codesourcery.com>
+
+ * final.c (final_scan_insn): Clear current_insn_predicate before
+ outputting inline asm.
+
2006-08-10 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/26197
diff --git a/gcc/final.c b/gcc/final.c
index 13f724ace8e..80b3913cbf4 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1953,6 +1953,10 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
int insn_code_number;
const char *template;
+#ifdef HAVE_conditional_execution
+ /* Reset this early so it is correct for ASM statements. */
+ current_insn_predicate = NULL_RTX;
+#endif
/* An INSN, JUMP_INSN or CALL_INSN.
First check for special kinds that recog doesn't recognize. */
@@ -2388,8 +2392,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
#ifdef HAVE_conditional_execution
if (GET_CODE (PATTERN (insn)) == COND_EXEC)
current_insn_predicate = COND_EXEC_TEST (PATTERN (insn));
- else
- current_insn_predicate = NULL_RTX;
#endif
#ifdef HAVE_cc0
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 55c187cad32..f08c34c63ef 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,19 +1,24 @@
+2006-08-10 Paul Brook <paul@codesourcery.com>
+
+ * gcc.target/arm/cond-asm.c: New test.
+
2006-08-10 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/26197
* g++.dg/vect/param-max-aliased-pr26197.cc: New test.
- * g++.dg/vect/vect.exp: Compile the new testxs with --param max-aliased-vops=0.
+ * g++.dg/vect/vect.exp: Compile the new tests with
+ --param max-aliased-vops=0.
2006-08-09 Lee Millward <lee.millward@codesourcery.com>
- PR c++/28637
- * g++.dg/template/void3.C: New test.
+ PR c++/28637
+ * g++.dg/template/void3.C: New test.
- PR c++/28638
- * g++.dg/template/void4.C: New test.
+ PR c++/28638
+ * g++.dg/template/void4.C: New test.
-` PR c++/28640
- * g++.dg/template/void5.C: New test.
+ PR c++/28640
+ * g++.dg/template/void5.C: New test.
2006-08-07 Danny Smith <dannysmith@users.sourceforge.net>
@@ -23,9 +28,9 @@
2006-08-07 Victor Kaplansky <victork@il.ibm.com>
PR tree-optimizations/26969
- * gcc.dg/vect/vect.exp: Compile tests prefixed with
+ * gcc.dg/vect/vect.exp: Compile tests prefixed with
"unswitch-loops" with -funswitch-loops.
- * gcc.dg/vect/unswitch-loops-pr26969.c: New test.
+ * gcc.dg/vect/unswitch-loops-pr26969.c: New test.
2006-08-07 Eric Botcazou <ebotcazou@libertysurf.fr>
diff --git a/gcc/testsuite/gcc.target/arm/cond-asm.c b/gcc/testsuite/gcc.target/arm/cond-asm.c
new file mode 100644
index 00000000000..450bd9d6a82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/cond-asm.c
@@ -0,0 +1,13 @@
+/* Check that %? in inline asm expands to nothing. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm32 } */
+int b;
+int foo(int a)
+{
+ if (a)
+ b = 42;
+ asm ("test%?me":"=r"(a):"0"(a));
+ return a;
+}
+/* { dg-final { scan-assembler "testme" } } */
OpenPOWER on IntegriCloud