fccf984850
* config/sparc/sparc.md (nonlocal_goto_receiver): Remove. (prologue, exception_receiver, builtin_setjmp_receiver): New patterns. * config/sparc/sparc.h (FINALIZE_PIC): Remove. * config/sparc/sparc-protos.h (finalize_pic): Remove. (load_pic_register): New prototype. * config/sparc/sparc.c (pic_setup_code): Remove. (finalize_pic): Rename to... (load_pic_register): ...this function. Don't look for nonlocal_goto_receivers and emit pic setup code directly. Don't check current_function_uses_pic_offset_table. * gcc.dg/20001012-1.c: New test. * gcc.dg/20001012-2.c: New test. From-SVN: r36859
34 lines
572 B
C
34 lines
572 B
C
/* { dg-do run { target sparc*-*-* } } */
|
|
/* { dg-options "-O2 -fpic" } */
|
|
|
|
void foo (char *x, const char *y, ...)
|
|
{
|
|
}
|
|
|
|
double bar (const char *x, long y)
|
|
{
|
|
return 0.0;
|
|
}
|
|
|
|
typedef __SIZE_TYPE__ size_t;
|
|
extern size_t strlen (const char *);
|
|
|
|
double baz (const char *x)
|
|
{
|
|
if (x[0] != '\0')
|
|
{
|
|
char y[6 + strlen (x)];
|
|
foo (y, "FOO", x);
|
|
return bar (y, 0);
|
|
}
|
|
|
|
return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
|
|
}
|
|
|
|
main ()
|
|
{
|
|
if (baz("") != 1.0)
|
|
abort ();
|
|
exit (0);
|
|
}
|