Add guality testcase for RTL alias analysis fix

gcc/testsuite/
	* gcc.dg/guality/param-6.c: New test.
This commit is contained in:
Eric Botcazou 2022-11-09 12:27:34 +01:00
parent 8d7a55b7f4
commit 50ebb5e611

View File

@ -0,0 +1,20 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-g" } */
void __attribute__((noipa)) bar (void *p)
{}
void __attribute__((noipa)) foo (int i)
{
void *p = __builtin_alloca (i);
asm volatile ("" : : : "ebx");
bar (p); /* { dg-final { gdb-test . "i" "5" } } */
}
int main (void)
{
foo (5);
return 0;
}