diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-04-13 17:20:46 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-04-13 17:20:46 +0200 |
commit | 6cf5881044dcf60e556c9667a878bcb7e5834017 (patch) | |
tree | 19fa2ceacecbdf98c717f900f9f2266f1376d131 | |
parent | 917971706faf51ccb0c7e369e139dbd63c3160a7 (diff) | |
download | gcc-6cf5881044dcf60e556c9667a878bcb7e5834017.zip gcc-6cf5881044dcf60e556c9667a878bcb7e5834017.tar.gz gcc-6cf5881044dcf60e556c9667a878bcb7e5834017.tar.bz2 |
re PR target/89093 (C++ exception handling clobbers d8 VFP register)
PR target/89093
* config/arm/arm.c (arm_valid_target_attribute_rec): Use strcmp
instead of strncmp when checking for thumb and arm. Formatting fixes.
* gcc.target/arm/pr89093.c: New test.
From-SVN: r270339
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/pr89093.c | 7 |
4 files changed, 24 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83e5954..6a394b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-04-13 Jakub Jelinek <jakub@redhat.com> + + PR target/89093 + * config/arm/arm.c (arm_valid_target_attribute_rec): Use strcmp + instead of strncmp when checking for thumb and arm. Formatting fixes. + 2019-04-12 Iain Buclaw <ibuclaw@gdcproject.org> * doc/install.texi: Document --with-target-system-zlib. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 12ccb7d..9cda96a 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -30874,16 +30874,16 @@ arm_valid_target_attribute_rec (tree args, struct gcc_options *opts) while (ISSPACE (*q)) ++q; argstr = NULL; - if (!strncmp (q, "thumb", 5)) - opts->x_target_flags |= MASK_THUMB; + if (!strcmp (q, "thumb")) + opts->x_target_flags |= MASK_THUMB; - else if (!strncmp (q, "arm", 3)) - opts->x_target_flags &= ~MASK_THUMB; + else if (!strcmp (q, "arm")) + opts->x_target_flags &= ~MASK_THUMB; else if (!strncmp (q, "fpu=", 4)) { int fpu_index; - if (! opt_enum_arg_to_value (OPT_mfpu_, q+4, + if (! opt_enum_arg_to_value (OPT_mfpu_, q + 4, &fpu_index, CL_TARGET)) { error ("invalid fpu for target attribute or pragma %qs", q); @@ -30901,7 +30901,7 @@ arm_valid_target_attribute_rec (tree args, struct gcc_options *opts) } else if (!strncmp (q, "arch=", 5)) { - char* arch = q+5; + char *arch = q + 5; const arch_option *arm_selected_arch = arm_parse_arch_option_name (all_architectures, "arch", arch); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2951fc8..1f3dd43 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-13 Jakub Jelinek <jakub@redhat.com> + + PR target/89093 + * gcc.target/arm/pr89093.c: New test. + 2019-04-12 Jakub Jelinek <jakub@redhat.com> PR c/89933 diff --git a/gcc/testsuite/gcc.target/arm/pr89093.c b/gcc/testsuite/gcc.target/arm/pr89093.c new file mode 100644 index 0000000..2efefcf --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr89093.c @@ -0,0 +1,7 @@ +/* PR target/89093 */ +/* { dg-do compile } */ + +__attribute__((target ("arm.foobar"))) void f1 (void) {} /* { dg-error "unknown target attribute or pragma 'arm.foobar'" } */ +__attribute__((target ("thumbozoo1"))) void f2 (void) {} /* { dg-error "unknown target attribute or pragma 'thumbozoo1'" } */ +__attribute__((target ("arm,thumbique"))) void f3 (void) {} /* { dg-error "unknown target attribute or pragma 'thumbique'" } */ +__attribute__((target ("thumb981,arm"))) void f4 (void) {} /* { dg-error "unknown target attribute or pragma 'thumb981'" } */ |