From: Mark Shinwell Date: Tue, 6 May 2008 18:34:53 +0000 (+0000) Subject: enum6.C, [...]: Broaden dg-options pattern. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85b56a901cbf2bd02fb545f0aecce61b0f3bf405;p=gcc.git enum6.C, [...]: Broaden dg-options pattern. * g++.old-deja/g++.jason/enum6.C, g++.old-deja/g++.law/enum9.C, g++.old-deja/g++.other/enum4.C, gfortran/enum_9.f90, gfortran.dg/enum_10.f90: Broaden dg-options pattern. Co-Authored-By: Andrew Jenner Co-Authored-By: Daniel Jacobowitz From-SVN: r134993 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4aacdf2112b..7e4386ef380 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2008-05-06 Mark Shinwell + Daniel Jacobowitz + Andrew Jenner + + * g++.old-deja/g++.jason/enum6.C, g++.old-deja/g++.law/enum9.C, + g++.old-deja/g++.other/enum4.C, gfortran/enum_9.f90, + gfortran.dg/enum_10.f90: Broaden dg-options pattern. + 2008-05-06 Tom Tromey PR preprocessor/35313, PR preprocessor/36088: diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum6.C b/gcc/testsuite/g++.old-deja/g++.jason/enum6.C index 586b4ce5486..7be0cd868cc 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/enum6.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/enum6.C @@ -1,6 +1,17 @@ // { dg-do run } // { dg-options "-fshort-enums" } +// On ARM EABI targets this testcase will cause a warning to be emitted +// whilst EABI attributes are being merged at link time unless +// the --no-enum-size-warning option is passed to the linker. Whilst the +// enum-size attributes should only be emitted if there are values of +// enum type that can escape the compilation unit, gcc cannot currently +// detect this; if this facility is added then this linker option should +// not be needed. arm-*-linux*eabi should be a good approximation to +// those platforms where the EABI supplement defines enum values to be +// 32 bits wide. +// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } + #include enum A { a1 = 0x7fffffff }; diff --git a/gcc/testsuite/g++.old-deja/g++.law/enum9.C b/gcc/testsuite/g++.old-deja/g++.law/enum9.C index 9713e4b90e5..5a74b2f6fdd 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/enum9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/enum9.C @@ -1,5 +1,17 @@ // { dg-do run } // { dg-options "-fshort-enums" } + +// On ARM EABI targets this testcase will cause a warning to be emitted +// whilst EABI attributes are being merged at link time unless +// the --no-enum-size-warning option is passed to the linker. Whilst the +// enum-size attributes should only be emitted if there are values of +// enum type that can escape the compilation unit, gcc cannot currently +// detect this; if this facility is added then this linker option should +// not be needed. arm-*-linux*eabi should be a good approximation to +// those platforms where the EABI supplement defines enum values to be +// 32 bits wide. +// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } + // GROUPS passed enums extern "C" int printf (const char *, ...); diff --git a/gcc/testsuite/g++.old-deja/g++.other/enum4.C b/gcc/testsuite/g++.old-deja/g++.other/enum4.C index 6dd025c4fa6..429e8127c2b 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/enum4.C +++ b/gcc/testsuite/g++.old-deja/g++.other/enum4.C @@ -1,7 +1,19 @@ // { dg-do run } // { dg-options "-fshort-enums" } + // Origin: Mark Mitchell +// On ARM EABI targets this testcase will cause a warning to be emitted +// whilst EABI attributes are being merged at link time unless +// the --no-enum-size-warning option is passed to the linker. Whilst the +// enum-size attributes should only be emitted if there are values of +// enum type that can escape the compilation unit, gcc cannot currently +// detect this; if this facility is added then this linker option should +// not be needed. arm-*-linux*eabi should be a good approximation to +// those platforms where the EABI supplement defines enum values to be +// 32 bits wide. +// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } + enum E { a = -312 }; diff --git a/gcc/testsuite/gfortran.dg/enum_10.f90 b/gcc/testsuite/gfortran.dg/enum_10.f90 index 6bfd819097e..99a16901c4b 100644 --- a/gcc/testsuite/gfortran.dg/enum_10.f90 +++ b/gcc/testsuite/gfortran.dg/enum_10.f90 @@ -1,6 +1,7 @@ ! { dg-do run } ! { dg-additional-sources enum_10.c } ! { dg-options "-fshort-enums -w" } +! { dg-options "-fshort-enums -w -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } ! Make sure short enums are indeed interoperable with the ! corresponding C type. diff --git a/gcc/testsuite/gfortran.dg/enum_9.f90 b/gcc/testsuite/gfortran.dg/enum_9.f90 index e735cf87772..8a5c60a10f4 100644 --- a/gcc/testsuite/gfortran.dg/enum_9.f90 +++ b/gcc/testsuite/gfortran.dg/enum_9.f90 @@ -1,5 +1,6 @@ ! { dg-do run } ! { dg-options "-fshort-enums" } +! { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } ! Program to test enumerations when option -fshort-enums is given program main