blob: 6c5de5dac9276c6126e272deaa84ec212f8c555d [file] [log] [blame]
/* { dg-options "-mcompact-branches=never -mno-abicalls -G4" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-O1" "-Os" } { "" } } */
/* { dg-final { scan-assembler "beq.*\n\tlw" } } */
/* { dg-final { scan-assembler-times "\\(foo\\)" 2 } } */
/* Test that when compact branches are explicitly disabled, that a non-compact
branch is produced. 'foo' should be referenced twice in the program text as the
eager delay slot filler will duplicate the load of foo. */
struct list
{
struct list *next;
int element;
};
struct list *gr;
int foo;
extern void t (int, int, int*);
void
f (struct list **ptr)
{
if (gr)
*ptr = gr->next;
t (1, foo, &gr->element);
}