+2017-08-22 Daniel Santos <daniel.santos@pobox.com>
+
+ * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
+ is combined with -mabi=ms.
+ (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
+ ms_abi.
+
2017-08-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/81488
if (!opts_set->x_ix86_abi)
opts->x_ix86_abi = DEFAULT_ABI;
+ if (opts->x_ix86_abi == MS_ABI && TARGET_X32_P (opts->x_ix86_isa_flags))
+ error ("-mabi=ms not supported with X32 ABI");
+ gcc_assert (opts->x_ix86_abi == SYSV_ABI || opts->x_ix86_abi == MS_ABI);
+
/* For targets using ms ABI enable ms-extensions, if not
explicit turned off. For non-ms ABI we turn off this
option. */
if (abi == SYSV_ABI
&& lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)))
{
- if (TARGET_X32)
- error ("X32 does not support ms_abi attribute");
+ static int warned;
+ if (TARGET_X32 && !warned)
+ {
+ error ("X32 does not support ms_abi attribute");
+ warned = 1;
+ }
abi = MS_ABI;
}
+2017-08-22 Daniel Santos <daniel.santos@pobox.com>
+
+ * gcc.target/i386/pr71958.c: New test to verify error on -mx32 and
+ -mabi=ms
+ * gcc.target/i386/pr64409.c: Modify to only run on x32.
+ * gcc.target/i386/pr46470.c: Modify to skip x32 target.
+ * gcc.target/i386/pr66275.c: Likewise.
+ * gcc.target/i386/pr68018.c: Likewise.
+
2017-08-22 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-sums-int.c: New.
-/* { dg-do compile } */
+/* { dg-do compile { target { ! x32 } } } */
/* The pic register save adds unavoidable stack pointer references. */
/* { dg-skip-if "" { ia32 && { ! nonpic } } } */
/* These options are selected to ensure 1 word needs to be allocated
-/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-do compile { target x32 } } */
/* { dg-require-effective-target maybe_x32 } */
/* { dg-options "-O0 -mx32" } */
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target { *-*-linux* && lp64 } } } */
/* { dg-options "-mabi=ms -fdump-rtl-dfinit" } */
void
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target { *-*-linux* && lp64 } } } */
/* { dg-options "-O -mabi=ms -mstackrealign" } */
typedef float V __attribute__ ((vector_size (16)));
--- /dev/null
+/* { dg-do compile { target { x32 } } } */
+/* { dg-options "-mabi=ms" } */
+/* { dg-error "-mabi=ms not supported with X32 ABI" "" { target *-*-* } 0 } */
+
+void main ()
+{
+}