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/] [forwprop-6.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 "-O2 -fdump-tree-forwprop1 -W -Wall" } */
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
intflt b;
12
void f(void)
13
{
14
  float a;
15
  a = 1;
16
  b = *(intflt*)&a; /* { dg-warning "aliasing" } */
17
}
18
 
19
/* We should be able to convert the cast to a VCE in forwprop1,
20
   even if there is an aliasing violation.
21
   ???  While this would be useful and nice to our users in this
22
   particular situation before doing this transformation we have to
23
   assure that a is killed by a dominating store via type float for
24
   it to be valid.  Then we might as well handle the situation by
25
   value-numbering, removing the load alltogether.  */
26
/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "forwprop1" { xfail *-*-* } } } */
27
/* { dg-final { cleanup-tree-dump "forwprop1" } } */

powered by: WebSVN 2.1.0

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