There is no counter part of x32 in MS ABI. Issue an error when ms_abi
attribute is used with x32.
gcc/
PR target/64409
* config/i386/i386.c (ix86_function_type_abi): Issue an error
when ms_abi attribute is used with x32.
gcc/testsuite/
PR target/64409
* gcc.target/i386/pr64409.c: New test.
From-SVN: r219081
+2014-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/64409
+ * config/i386/i386.c (ix86_function_type_abi): Issue an error
+ when ms_abi attribute is used with x32.
+
2014-12-27 Anthony Green <green@moxielogic.com>
* config/moxie/moxie-protos.h (moxie_offset_address_p): Define.
if (abi == SYSV_ABI)
{
if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)))
- abi = MS_ABI;
+ {
+ if (TARGET_X32)
+ {
+ static bool warned = false;
+ if (!warned)
+ {
+ error ("X32 does not support ms_abi attribute");
+ warned = true;
+ }
+ }
+ abi = MS_ABI;
+ }
}
else if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype)))
abi = SYSV_ABI;
+2014-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/64409
+ * gcc.target/i386/pr64409.c: New test.
+
2014-12-24 Segher Boessenkool <segher@kernel.crashing.org>
* gcc.target/powerpc/405-dlmzb-strlen-1.c: Explicitly align arg.
--- /dev/null
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O0 -mx32" } */
+
+int a;
+int* __attribute__ ((ms_abi)) fn1 () { return &a; } /* { dg-error "X32 does not support ms_abi attribute" } */