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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-fre-7.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details -fdump-tree-optimized" } */
3
#if (__SIZEOF_INT__ == __SIZEOF_FLOAT__)
4
typedef int intflt;
5
#elif (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
6
typedef long intflt;
7
#else
8
#error Add target support here for type that will union float size
9
#endif
10
 
11
struct X {
12
  int i;
13
  union {
14
    intflt j;
15
    intflt k;
16
    float f;
17
  } u;
18
};
19
 
20
intflt foo(intflt j)
21
{
22
  struct X a;
23
 
24
  a.u.j = j;
25
  a.u.f = a.u.f;
26
  a.u.f = a.u.f;
27
  a.u.j = a.u.j;
28
  a.u.f = a.u.f;
29
  return a.u.k;
30
}
31
 
32
/* { dg-final { scan-tree-dump-times "Inserted pretmp" 1 "fre" } } */
33
/* { dg-final { scan-tree-dump-times "Replaced a.u.f with pretmp" 3 "fre" } } */
34
/* { dg-final { scan-tree-dump-times "Replaced a.u.k with j" 1 "fre" } } */
35
/* { dg-final { scan-tree-dump "= VIEW_CONVERT_EXPR<float>\\\(j_" "fre" } } */
36
/* { dg-final { scan-tree-dump "return j" "optimized" } } */
37
/* { dg-final { cleanup-tree-dump "fre" } } */
38
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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