From: Jakub Jelinek Date: Tue, 30 Apr 2019 12:07:27 +0000 (+0200) Subject: re PR target/89093 (C++ exception handling clobbers d8 VFP register) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7b0896b2392b803679ac5ca88087b5c3ecede7e;p=gcc.git re PR target/89093 (C++ exception handling clobbers d8 VFP register) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 471a96f4f65..4ed2fc4dbfc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,8 +1,14 @@ +2019-04-30 Jakub Jelinek + + 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 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 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 14259439c90..c3c88c80bbe 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b1f25858315..b3908ea49c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-04-30 Jakub Jelinek + 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. diff --git a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c index b00f9a68621..99b155269aa 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c +++ b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c @@ -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 index 00000000000..08a3f411766 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr89093.c @@ -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) {}