Fortran: fix passing of optional dummy as actual to optional argument [PR55978]
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / enum4.C
blob3cda57ca2f3bb3c0762a08ef7456465dde92d08f
1 // { dg-do run  }
2 // { dg-options "-fshort-enums" }
4 // Origin: Mark Mitchell <mark@codesourcery.com>
6 // On ARM EABI targets this testcase will cause a warning to be emitted
7 // whilst EABI attributes are being merged at link time unless
8 // the --no-enum-size-warning option is passed to the linker.  Whilst the
9 // enum-size attributes should only be emitted if there are values of
10 // enum type that can escape the compilation unit, gcc cannot currently
11 // detect this; if this facility is added then this linker option should
12 // not be needed.
13 // { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm_eabi } }
15 enum E { 
16   a = -312
19 E e = a;
21 int main () {
22   if ((int) e != -312)
23     return 1;