OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr17112-1.c] - Blame information for rev 645

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

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

powered by: WebSVN 2.1.0

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