PR target/69969
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 26 Feb 2016 22:35:00 +0000 (22:35 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 26 Feb 2016 22:35:00 +0000 (22:35 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233767 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 9c74fe2..471fea5 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 c7bad3f..5b03f9e 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 6d72390..65ee228 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" } */