OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [enum9.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// { dg-options "-fshort-enums" }
3
 
4
// On ARM EABI targets this testcase will cause a warning to be emitted
5
// whilst EABI attributes are being merged at link time unless
6
// the --no-enum-size-warning option is passed to the linker.  Whilst the
7
// enum-size attributes should only be emitted if there are values of
8
// enum type that can escape the compilation unit, gcc cannot currently
9
// detect this; if this facility is added then this linker option should
10
// not be needed.  arm-*-linux*eabi should be a good approximation to
11
// those platforms where the EABI supplement defines enum values to be
12
// 32 bits wide.
13
// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } }
14
 
15
// GROUPS passed enums
16
  extern "C" int printf (const char *, ...);
17
 
18
  enum E { A = 0x80000000, B = 0 };
19
 
20
  main()
21
  {
22
    if (sizeof (E) != 4)
23
        { printf ("FAIL\n"); return 1; }
24
    else
25
        printf ("PASS\n");
26
    return 0;
27
  }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.