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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [overflow-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR optimization/13318 */
2
/* Origin: <bremner@unb.ca> */
3
/* Reduced testcase: Wolfgang Bangerth <bangerth@dealii.org> */
4
 
5
/* Verify that the big multiplier doesn't cause an integer
6
   overflow in the loop optimizer.  */
7
 
8
/* { dg-do compile } */
9
/* { dg-options "-O2" } */
10
 
11
struct S {
12
  int key;
13
  int rnext,rprev;
14
};
15
 
16
void foo(struct S* H)
17
{
18
  int i, k;
19
  for (i=0; i<2; i++){
20
    struct S* cell=H+k;
21
    cell->key=i*(0xffffffffUL/2);
22
    cell->rnext=k+(1-i);
23
    cell->rprev=k+(1-i);
24
  }
25
}

powered by: WebSVN 2.1.0

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