]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/69969 (Function attribute no-vsx)
authorJakub Jelinek <jakub@redhat.com>
Fri, 26 Feb 2016 22:35:00 +0000 (23:35 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 26 Feb 2016 22:35:00 +0000 (23:35 +0100)
PR target/69969
* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
complain about -mallow-movmisalign without -mvsx if
TARGET_ALLOW_MOVMISALIGN was not set explicitly.

* gcc.target/powerpc/pr69969.c: New test.

From-SVN: r233767

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr69969.c [new file with mode: 0644]

index 9c74fe25e51aae29ed7dfdcb88f9435d59a5ebd9..471fea533e993ba72aadc790fa1f7829ae2ce8bf 100644 (file)
@@ -1,3 +1,10 @@
+2016-02-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/69969
+       * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
+       complain about -mallow-movmisalign without -mvsx if
+       TARGET_ALLOW_MOVMISALIGN was not set explicitly.
+
 2016-02-26  Joel Sherrill <joel@rtems.org>
 
        * config.gcc: Add x86_64-*-rtems*.
index c7bad3f583a2c14612847239d6dd235d8e70ba6f..5b03f9e7d37f7591cf25c989b5038fde077c480f 100644 (file)
@@ -4207,7 +4207,8 @@ rs6000_option_override_internal (bool global_init_p)
 
   else if (TARGET_ALLOW_MOVMISALIGN && !TARGET_VSX)
     {
-      if (TARGET_ALLOW_MOVMISALIGN > 0)
+      if (TARGET_ALLOW_MOVMISALIGN > 0
+         && global_options_set.x_TARGET_ALLOW_MOVMISALIGN)
        error ("-mallow-movmisalign requires -mvsx");
 
       TARGET_ALLOW_MOVMISALIGN = 0;
index 6d72390e38a29d080e901e1497d31fb4e019213d..65ee2281c29d60e9b5871cd80e9a76c8f4be6369 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/69969
+       * gcc.target/powerpc/pr69969.c: New test.
+
 2016-02-26  Martin Sebor  <msebor@redhat.com>
 
        PR c++/15766
diff --git a/gcc/testsuite/gcc.target/powerpc/pr69969.c b/gcc/testsuite/gcc.target/powerpc/pr69969.c
new file mode 100644 (file)
index 0000000..1ca2c75
--- /dev/null
@@ -0,0 +1,7 @@
+/* PR target/69969 */
+/* { dg-do compile } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8" } */
+
+int bar (int x) { return x; }
+__attribute__((__target__("no-vsx"))) int foo (int x) { return x; } /* { dg-bogus "-mallow-movmisalign requires -mvsx" } */