+2008-05-06 Mark Shinwell <shinwell@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Andrew Jenner <andrew@codesourcery.com>
+
+ * 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 <tromey@redhat.com>
PR preprocessor/35313, PR preprocessor/36088:
// { 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 <limits.h>
enum A { a1 = 0x7fffffff };
// { 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 *, ...);
// { dg-do run }
// { dg-options "-fshort-enums" }
+
// Origin: Mark Mitchell <mark@codesourcery.com>
+// 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
};
! { 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.
! { 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