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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20000801-4.c] - Diff between revs 297 and 338

Only display areas with differences | Details | Blame | View Log

Rev 297 Rev 338
/* Origin: PR c/128 from Martin Sebor <sebor@roguewave.com>, adapted
/* Origin: PR c/128 from Martin Sebor <sebor@roguewave.com>, adapted
   as a testcase by Joseph Myers <jsm28@cam.ac.uk>.
   as a testcase by Joseph Myers <jsm28@cam.ac.uk>.
*/
*/
/* Character arrays initialized by a string literal must have
/* Character arrays initialized by a string literal must have
   uninitialized elements zeroed.  This isn't clear in the 1990
   uninitialized elements zeroed.  This isn't clear in the 1990
   standard, but was fixed in TC2 and C99; see DRs #060, #092.
   standard, but was fixed in TC2 and C99; see DRs #060, #092.
*/
*/
extern void abort (void);
extern void abort (void);
 
 
int
int
foo (void)
foo (void)
{
{
  char s[2] = "";
  char s[2] = "";
  return 0 == s[1];
  return 0 == s[1];
}
}
 
 
char *t;
char *t;
 
 
int
int
main (void)
main (void)
{
{
  {
  {
    char s[] = "x";
    char s[] = "x";
    t = s;
    t = s;
  }
  }
  if (foo ())
  if (foo ())
    exit (0);
    exit (0);
  else
  else
    abort ();
    abort ();
}
}
 
 

powered by: WebSVN 2.1.0

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