Commit b8d7f9fe by Richard Sandiford Committed by Richard Sandiford

re PR c/22061 (internal compiler error: in find_function_data, at function.c:317)

	PR c/22061
	* gcc.c-torture/execute/pr22061-1.c,
	* gcc.c-torture/execute/pr22061-2.c,
	* gcc.c-torture/execute/pr22061-3.c,
	* gcc.c-torture/execute/pr22061-4.c: New tests.

From-SVN: r103772
parent f805670f
2005-09-02 Richard Sandiford <richard@codesourcery.com>
PR c/22061
* gcc.c-torture/execute/pr22061-1.c,
* gcc.c-torture/execute/pr22061-2.c,
* gcc.c-torture/execute/pr22061-3.c,
* gcc.c-torture/execute/pr22061-4.c: New tests.
2005-09-01 Craig Rodrigues <rodrigc@gcc.gnu.org> 2005-09-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
* gcc.dg/Wredundant-decls-2.c: New test to check that * gcc.dg/Wredundant-decls-2.c: New test to check that
int N = 1;
void foo() {} /* Necessary to trigger the original ICE. */
void bar (char a[2][N]) { a[1][0] = N; }
int
main (void)
{
void *x;
N = 4;
x = alloca (2 * N);
memset (x, 0, 2 * N);
bar (x);
if (N[(char *) x] != N)
abort ();
exit (0);
}
int *x;
static void bar (char a[2][(*x)++]) {}
int
main (void)
{
exit (0);
}
void
bar (int N)
{
int foo (char a[2][++N]) { N += 4; return sizeof (a[0]); }
if (foo (0) != 2)
abort ();
if (foo (0) != 7)
abort ();
if (N != 11)
abort ();
}
int
main()
{
bar (1);
exit (0);
}
void
bar (int N)
{
void foo (int a[2][N++]) {}
int a[2][N];
foo (a);
int b[2][N];
foo (b);
if (sizeof (a) != sizeof (int) * 2 * 1)
abort ();
if (sizeof (b) != sizeof (int) * 2 * 2)
abort ();
if (N != 3)
abort ();
}
int
main (void)
{
bar (1);
exit (0);
}
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