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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [pr46788.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-options "-mthumb -O2" }  */
2
/* { dg-require-effective-target arm_thumb2_ok } */
3
/* { dg-final { scan-assembler-not "-32768" } } */
4
 
5
typedef union
6
{
7
  unsigned long int u_32_value;
8
  struct
9
  {
10
    unsigned short int u_16_value_0;
11
    unsigned short int u_16_value_1;
12
  } u_16_values;
13
} my_union;
14
 
15
 
16
unsigned long int Test(const unsigned short int wXe)
17
{
18
  my_union dwCalcVal;
19
 
20
  dwCalcVal.u_16_values.u_16_value_0=wXe;
21
  dwCalcVal.u_16_values.u_16_value_1=0x8000u;
22
 
23
  dwCalcVal.u_32_value /=3;
24
 
25
  return (dwCalcVal.u_32_value);
26
}

powered by: WebSVN 2.1.0

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