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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [pr17112-1.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* PR middle-end/17112 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
 
5
extern void abort(void);
6
 
7
typedef struct {
8
  int int24:24  __attribute__ ((packed)); /* { dg-warning "attribute ignored" "" { target { default_packed && { ! pcc_bitfield_type_matters } } } } */
9
} myint24;
10
 
11
myint24 x[3] = {
12
  0x123456,
13
  0x789abc,
14
  0xdef012
15
};
16
 
17
myint24 y[3];  // starts out as zeros
18
 
19
void foo()
20
{
21
  y[1] = x[1];
22
}
23
 
24
int main()
25
{
26
  foo();
27
 
28
  if (y[0].int24 != 0 || y[2].int24 != 0)
29
    abort();
30
  return 0;
31
}
32
 

powered by: WebSVN 2.1.0

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