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/] [fold-mod-1.c] - Blame information for rev 478

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target int32plus } */
3
/* { dg-options "-fdump-tree-gimple -fstrict-overflow" } */
4
 
5
#define ABS(x) (x > 0 ? x : -x)
6
 
7
unsigned int f (unsigned int a) {
8
        /* (unsigned)-8 is not a power of 2.  */
9
        return a % -8;
10
}
11
 
12
int g (int b) {
13
        return ABS (b) % -8;
14
}
15
 
16
int h (int c) {
17
        return ABS (c) % 8;
18
}
19
 
20
unsigned int k (unsigned int d) {
21
        return d % 8;
22
}
23
 
24
/* { dg-final { scan-tree-dump "a % (4294967288|0x0fffffff8)" "gimple" } } */
25
/* { dg-final { scan-tree-dump-times " & 7" 3 "gimple" } } */
26
/* { dg-final { cleanup-tree-dump "gimple" } } */

powered by: WebSVN 2.1.0

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