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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr36489.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR c/36489 */
2
/* { dg-do compile } */
3
/* { dg-options "-Woverride-init" } */
4
 
5
struct A { int a; int b[3]; };
6
union B { int a; int b[3]; };
7
int t1[10][10]
8
  = { [1][2] = 11, [1][3] = 12 };
9
int t2[10][10]
10
  = { [1][2] = 11, [1] = { [3] = 12 } };        /* { dg-warning "initializ" } */
11
int t3[10][10]
12
  = { [1][2] = 11, [1][2] = 12 };               /* { dg-warning "initializ" } */
13
struct A t4[2]
14
  = { [0].b[0] = 1, [0].b[1] = 2, [0].b[2] = 3 };
15
struct A t5[2]
16
  = { [0].b[0] = 1, [0].b[1] = 2, [0].b = { 3 } }; /* { dg-warning "initializ" } */
17
union B t6
18
  = { .b[0] = 1, .b[1] = 2, .b[2] = 3 };
19
union B t7
20
  = { .b[0] = 1, .b[1] = 2, .b = { 2 } };        /* { dg-warning "initializ" } */
21
union B t8
22
  = { .b[0] = 1, .b[1] = 2, .b[1] = 3 }; /* { dg-warning "initializ" } */

powered by: WebSVN 2.1.0

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