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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20000801-4.c] - Blame information for rev 841

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

Line No. Rev Author Line
1 149 jeremybenn
/* Origin: PR c/128 from Martin Sebor <sebor@roguewave.com>, adapted
2
   as a testcase by Joseph Myers <jsm28@cam.ac.uk>.
3
*/
4
/* Character arrays initialized by a string literal must have
5
   uninitialized elements zeroed.  This isn't clear in the 1990
6
   standard, but was fixed in TC2 and C99; see DRs #060, #092.
7
*/
8
extern void abort (void);
9
 
10
int
11
foo (void)
12
{
13
  char s[2] = "";
14
  return 0 == s[1];
15
}
16
 
17
char *t;
18
 
19
int
20
main (void)
21
{
22
  {
23
    char s[] = "x";
24
    t = s;
25
  }
26
  if (foo ())
27
    exit (0);
28
  else
29
    abort ();
30
}

powered by: WebSVN 2.1.0

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