Commit b859a98d by Joseph Myers Committed by Joseph Myers

20010114-1.c: New test.

	* gcc.c-torture/compile/20010114-1.c: New test.
	* gcc.c-torture/compile/20010114-1.x: Xfail.
	* gcc.c-torture/compile/20010114-2.c: New test.
	* gcc.c-torture/execute/20010114-1.c: New test.
	* gcc.dg/trunc-1.c: New test.
	* gcc.dg/uninit-B.c: New test.

From-SVN: r39009
parent bd0f0717
2001-01-14 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.c-torture/compile/20010114-1.c: New test.
* gcc.c-torture/compile/20010114-1.x: Xfail.
* gcc.c-torture/compile/20010114-2.c: New test.
* gcc.c-torture/execute/20010114-1.c: New test.
* gcc.dg/trunc-1.c: New test.
* gcc.dg/uninit-B.c: New test.
2001-01-13 Nick Clifton <nickc@redhat.com> 2001-01-13 Nick Clifton <nickc@redhat.com>
* gcc.c-torture/execute/bf64-1.x: Expect to fail on M*Core * gcc.c-torture/execute/bf64-1.x: Expect to fail on M*Core
......
/* Origin: PR c/166 from Joerg Czeranski <jc@joerch.org>. */
/* In the declaration of proc, x cannot be parsed as a typedef name,
so it must be parsed as a parameter name. */
typedef int x;
void proc(int (*x)(void)) {}
set torture_compile_xfail "*-*-*"
return 0
/* Origin: <URL:http://gcc.gnu.org/ml/gcc-patches/2000-12/msg01384.html>
from Fred Fish <fnf@geekgadgets.org>. See also PR c/1625. */
#include <stdbool.h>
struct { int x; bool y; } foo = { 0, false };
/* Origin: PR c/1540 from Mattias Lampe <lampe@tu-harburg.de>,
adapted to a testcase by Joseph Myers <jsm28@cam.ac.uk>.
GCC 2.95.2 fails, CVS GCC of 2001-01-13 passes. */
extern void abort (void);
extern void exit (int);
int
main (void)
{
int array1[1] = { 1 };
int array2[2][1]= { { 1 }, { 0 } };
if (array1[0] != 1)
abort ();
exit (0);
}
/* Origin: PR c/675 from aj@suse.de. */
/* { dg-do compile } */
/* { dg-options "-Wall" } */
#include <stddef.h>
int
main (void)
{
size_t len;
len = ~(sizeof (size_t) - 1); /* { dg-bogus "truncated" "bogus truncation warning" } */
return 0;
}
/* Origin: PR c/179 from Gray Watson <gray@256.com>, adapted as a testcase
by Joseph Myers <jsm28@cam.ac.uk>. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */
extern void foo (int *);
extern void bar (int);
void
baz (void)
{
int i;
if (i) /* { dg-warning "uninit" "uninit i warning" { xfail *-*-* } } */
bar (i);
foo (&i);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment