aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/dynamic-no-pic-1.c
blob: 070544c5fc81ff554f9be20333a1a567ef92e6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* APPLE LOCAL file Radar 4010664 */
/* { dg-do compile { target i?86*-*-darwin* } } */
/* { dg-options "-mdynamic-no-pic -march=pentium4" } */
/* { dg-final { scan-assembler-not "86.get_pc_thunk" } } */
#define TEST_STRING "test string %d"
#define TEST_STRING0 "test string 0"
#include <stdlib.h>
#include <stdio.h>
int globalvar_i;
main (int argc, char *argv[])
{
  char buf[90];

  sprintf (buf, TEST_STRING, globalvar_i);
  if (strcmp (buf, TEST_STRING0))
    abort ();
  exit (0);
}