From: Jakub Jelinek Date: Wed, 17 Apr 2019 08:30:44 +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=fc2b685884a2a3812b2961091d6943f9a310973f;p=gcc.git re PR target/89093 (C++ exception handling clobbers d8 VFP register) PR target/89093 * config/arm/arm.c (arm_valid_target_attribute_rec): Don't skip whitespace at the start of target attribute string. * gcc.target/arm/pr89093-2.c: New test. From-SVN: r270404 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 437159728a2..231bb83c4f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-04-17 Jakub Jelinek + + PR target/89093 + * config/arm/arm.c (arm_valid_target_attribute_rec): Don't skip + whitespace at the start of target attribute string. + 2019-04-16 Pat Haugen PR target/84369 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 9cda96ae84a..731150d7c18 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -30871,8 +30871,6 @@ arm_valid_target_attribute_rec (tree args, struct gcc_options *opts) while ((q = strtok (argstr, ",")) != NULL) { - while (ISSPACE (*q)) ++q; - argstr = NULL; if (!strcmp (q, "thumb")) opts->x_target_flags |= MASK_THUMB; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6abbc572ded..23f77ec781a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-17 Jakub Jelinek + + PR target/89093 + * gcc.target/arm/pr89093-2.c: New test. + 2019-04-16 Jakub Jelinek PR c++/86953 diff --git a/gcc/testsuite/gcc.target/arm/pr89093-2.c b/gcc/testsuite/gcc.target/arm/pr89093-2.c new file mode 100644 index 00000000000..08de748e0ba --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr89093-2.c @@ -0,0 +1,9 @@ +/* PR target/89093 */ +/* { dg-do compile } */ + +__attribute__((target (" arm"))) void f1 (void) {} /* { dg-error "unknown target attribute or pragma ' arm'" } */ +__attribute__((target (" thumb"))) void f2 (void) {} /* { dg-error "unknown target attribute or pragma ' thumb'" } */ +__attribute__((target ("arm, thumb"))) void f3 (void) {} /* { dg-error "unknown target attribute or pragma ' thumb'" } */ +__attribute__((target ("thumb, arm"))) void f4 (void) {} /* { dg-error "unknown target attribute or pragma ' arm'" } */ +#pragma GCC target (" arm") /* { dg-error "unknown target attribute or pragma ' arm'" } */ +void f5 (void) {}