[Darwin,X86,testsuite] Test for expected error on exceeding ofile alignment.

Message ID B447ADEA-06DA-4A7C-B888-6E60E58D441D@sandoe.co.uk
State New
Headers show
Series
  • [Darwin,X86,testsuite] Test for expected error on exceeding ofile alignment.
Related show

Commit Message

Iain Sandoe May 25, 2019, 7:54 p.m.
The test requests an alignment which exceeds the maximum object
file aligment for Darwin.  Rather than skipping it - test that we see the
expected error.

tested on x86_64-darwin16 and x86_64-linux-gnu (--target_board=unix\{-m32,-m64\}\{,-fpic\})
aplied to mainline,
thanks
Iain

2019-05-25  Iain Sandoe  <iain@sandoe.co.uk>

        * gcc.target/i386/pr89261.c: Test that the alignment required
        by the test correctly produces the expected error on Darwin.

Patch

diff --git a/gcc/testsuite/gcc.target/i386/pr89261.c b/gcc/testsuite/gcc.target/i386/pr89261.c
index 63882c0..c5c4273 100644
--- a/gcc/testsuite/gcc.target/i386/pr89261.c
+++ b/gcc/testsuite/gcc.target/i386/pr89261.c
@@ -5,5 +5,6 @@ 
 typedef double __v2df __attribute__ ((vector_size (16), aligned (1 << 28)));
 
 __v2df foo = { 1.0, 2.0 };
+/* { dg-error {alignment of 'foo' is greater than maximum object file alignment 32768} "" { target *-*-darwin* } .-1 } */
 
-/* { dg-final { scan-assembler "\.align\[ \t]+268435456" } } */
+/* { dg-final { scan-assembler "\.align\[ \t]+268435456" { target { ! *-*-darwin* } } } } */