re PR target/89093 (C++ exception handling clobbers d8 VFP register)
authorJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 Apr 2019 12:07:27 +0000 (14:07 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 Apr 2019 12:07:27 +0000 (14:07 +0200)
PR target/89093
* config/aarch64/aarch64.c (aarch64_process_one_target_attr): Don't skip
whitespace at the start of target attribute string.

* gcc.target/aarch64/pr89093.c: New test.
* gcc.target/aarch64/pr63304_1.c: Remove space from target string.

From-SVN: r270690

gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/pr63304_1.c
gcc/testsuite/gcc.target/aarch64/pr89093.c [new file with mode: 0644]

index 471a96f..4ed2fc4 100644 (file)
@@ -1,8 +1,14 @@
+2019-04-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/89093
+       * config/aarch64/aarch64.c (aarch64_process_one_target_attr): Don't skip
+       whitespace at the start of target attribute string.
+
 2019-04-30  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
 
        PR target/86538
        * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
-       Define __ARM_FEATURE_ATOMICS
+       Define __ARM_FEATURE_ATOMICS.
 
 2019-04-30  Martin Liska  <mliska@suse.cz>
 
index 1425943..c3c88c8 100644 (file)
@@ -12536,10 +12536,6 @@ aarch64_process_one_target_attr (char *arg_str)
   char *str_to_check = (char *) alloca (len + 1);
   strcpy (str_to_check, arg_str);
 
-  /* Skip leading whitespace.  */
-  while (*str_to_check == ' ' || *str_to_check == '\t')
-    str_to_check++;
-
   /* We have something like __attribute__ ((target ("+fp+nosimd"))).
      It is easier to detect and handle it explicitly here rather than going
      through the machinery for the rest of the target attributes in this
index b1f2585..b3908ea 100644 (file)
@@ -1,5 +1,9 @@
 2019-04-30  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/89093
+       * gcc.target/aarch64/pr89093.c: New test.
+       * gcc.target/aarch64/pr63304_1.c: Remove space from target string.
+
        PR tree-optimization/89475
        * gcc.dg/tree-ssa/pr89475.c: New test.
 
index b00f9a6..99b1552 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do assemble } */
 /* { dg-options "-O1 --save-temps" } */
 #pragma GCC push_options
-#pragma GCC target ("+nothing+simd, cmodel=small")
+#pragma GCC target ("+nothing+simd,cmodel=small")
 
 int
 cal (double a)
diff --git a/gcc/testsuite/gcc.target/aarch64/pr89093.c b/gcc/testsuite/gcc.target/aarch64/pr89093.c
new file mode 100644 (file)
index 0000000..08a3f41
--- /dev/null
@@ -0,0 +1,7 @@
+/* PR target/89093 */
+/* { dg-do compile } */
+
+__attribute__((target ("  no-strict-align"))) void f1 (void) {} /* { dg-error "is not valid" } */
+__attribute__((target ("       general-regs-only"))) void f2 (void) {} /* { dg-error "is not valid" } */
+#pragma GCC target ("    general-regs-only")   /* { dg-error "is not valid" } */
+void f3 (void) {}