This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, testsuite]: Fix gcc.dg/pr34351.c failure
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: "gcc patches" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Feb 2008 10:39:33 +0100
- Subject: [PATCH, testsuite]: Fix gcc.dg/pr34351.c failure
Hello!
Attached patch fixes gcc.dg/pr34315.c failure on !x86_64 targets. The
patch limits compilation to x86 targets and uses a register that is
known to be non-call clobbered on both targets. Since we already have
similar case, where warning w.r.t register name is checked only on x86
target (gcc.dg/register-var-1.c), so I think that we still have enough
of test coverage ;).
2008-02-28 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/pr34351.c: Compile for x86 targets only. Use %ebx register.
Checked on i686-pc-linux-gnu, committed to SVN mainline.
Uros.
Index: gcc.dg/pr34351.c
===================================================================
--- gcc.dg/pr34351.c (revision 132737)
+++ gcc.dg/pr34351.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-Wall" } */
-register int * volatile x asm ("r13"); /* { dg-warning "optimization
may eliminate reads and/or writes to register variables" } */
+register int * volatile x asm ("ebx"); /* { dg-warning "optimization
may eliminate reads and/or writes to register variables" } */