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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [attrib3.C] - Blame information for rev 696

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test that attributes work in a variety of situations.
2
// { dg-options -O }
3
// { dg-do run }
4
 
5
#define attrib __attribute ((mode (QI)))
6
 
7
attrib signed int a;            // attributes before type are broken
8
static attrib unsigned int b;
9
 
10
int foo(attrib int o)           // attribute arguments are broken
11
{
12
  return (sizeof (a) != 1
13
          || sizeof (b) != 1
14
          || sizeof (o) != 1
15
          || sizeof ((attrib signed int) b) != 1);
16
}
17
 
18
int main ()
19
{
20
  return foo (42);
21
}

powered by: WebSVN 2.1.0

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