Hi!

-Wpsabi actually is a warning option, i386 backend (the only user of it)
uses warning_at, the option is enabled by -Wabi which is Warning, and if
one uses -Werror and some -Wpsabi warning is printed, then we mention
there -Werror=psabi, which doesn't work right now.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?

2016-06-10  Jakub Jelinek  <ja...@redhat.com>

        PR c/68657
        * c.opt (Wpsabi): Add Warning flag.

        * gcc.target/i386/pr68657.c: New test.

--- gcc/c-family/c.opt.jj       2016-05-12 09:46:39.000000000 +0200
+++ gcc/c-family/c.opt  2016-06-10 09:13:16.377973844 +0200
@@ -265,7 +265,7 @@ C++ ObjC++ Var(warn_abi_tag) Warning
 Warn if a subobject has an abi_tag attribute that the complete object type 
does not have.
 
 Wpsabi
-C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Undocumented LangEnabledBy(C 
ObjC C++ ObjC++,Wabi)
+C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Warning Undocumented 
LangEnabledBy(C ObjC C++ ObjC++,Wabi)
 
 Waddress
 C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ 
ObjC++,Wall)
--- gcc/testsuite/gcc.target/i386/pr68657.c.jj  2016-06-10 09:19:12.267290632 
+0200
+++ gcc/testsuite/gcc.target/i386/pr68657.c     2016-06-10 09:25:01.414763259 
+0200
@@ -0,0 +1,15 @@
+/* PR c/68657 */
+/* { dg-options "-mno-avx512f -Werror=psabi" } */
+
+typedef int V __attribute__((vector_size (64)));
+
+void foo (V x, V *y) { /* { dg-error "AVX512F vector argument without AVX512F 
enabled" } */
+  *y = x;
+}
+
+V bar (V *x) {         /* { dg-error "AVX512F vector return without AVX512F 
enabled" } */
+  return *x;
+}
+
+/* { dg-message "The ABI for passing parameters with 64-byte alignment has 
changed" "" { target *-*-* } 6 } */
+/* { dg-message "some warnings being treated as errors" "" { target *-*-* } 0 
} */

        Jakub

Reply via email to