OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20070801-1.c] - Blame information for rev 149

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* This failed on s390x due to a back end bug.  */
2
 
3
/* { dg-do compile { target fpic } } */
4
/* { dg-options "-O2 -fpic" } */
5
 
6
typedef long unsigned int size_t;
7
typedef enum
8
{
9
  TYPE_SCHAR, TYPE_LONGDOUBLE
10
}
11
arg_type;
12
 
13
typedef struct
14
{
15
  arg_type type;
16
  union
17
  {
18
    signed char a_schar;
19
    long double a_longdouble;
20
  }
21
  a;
22
}
23
argument;
24
 
25
typedef struct
26
{
27
  argument *arg;
28
}
29
arguments;
30
 
31
int ind;
32
 
33
extern void foo (arguments *a);
34
 
35
void
36
bar ()
37
{
38
  arguments a;
39
  char *buf;
40
  char *result;
41
  int uninitialized;
42
  int count, i;
43
  int retcount;
44
 
45
  foo (&a);
46
 
47
  switch (a.arg[ind].type)
48
    {
49
    case TYPE_SCHAR:
50
      {
51
        if (uninitialized == 0)
52
          __builtin___snprintf_chk (result, 10, 1, 10, buf, 1, &count);
53
      }
54
    case TYPE_LONGDOUBLE:
55
      {
56
        long double arg = a.arg[ind].a.a_longdouble;
57
 
58
        if (uninitialized == 0)
59
          __builtin___snprintf_chk (result, 10, 1, 10, buf, arg, &count);
60
      }
61
    }
62
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.