aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr95740.c
blob: 7ecd71ba8c16d5d46a896b477456b8a88b84558b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-msse2 -O2 -mtune=generic -mtune-ctrl=use_incdec -masm=att -mfpmath=sse" } */
/* { dg-final { scan-assembler-times {(?n)movd[\t ]*%xmm0.*%eax} 1 } } */
/* { dg-final { scan-assembler-times {(?n)incl[\t ]*%eax} 1 } } */
/* { dg-final { scan-assembler-times {(?n)movq[\t ]*%xmm0.*%rax} 1 } } */
/* { dg-final { scan-assembler-times {(?n)incq[\t ]*%rax} 1 } } */

int
foo (float a)
{
  union{
    int b;
    float a;}u;
  u.a = a;
  return u.b + 1;
}

long long
foo1 (double a)
{
  union{
    long long b;
    double a;}u;
  u.a = a;
  return u.b + 1;
}