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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [fixed-point/] [addsub.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-std=gnu99" } */
3
 
4
/* Check if GCC generates warnings when overflows.  */
5
 
6
_Fract a0 = 0.5r + 0.5r; /* { dg-warning "overflow" } */
7
_Fract a1 = 0.5r + 0.6r; /* { dg-warning "overflow" } */
8
_Fract a2 = 0.5r + -0.6r;
9
_Fract a3 = -0.5r + 0.6r;
10
_Fract a4 = -0.5r + -0.5r;
11
_Fract a5 = -0.5r + -0.6r; /* { dg-warning "overflow" } */
12
_Fract a6 = 0.0r + __FRACT_MIN__;
13
_Fract a7 = 0.1r + __FRACT_MIN__;
14
_Fract a8 = -0.1r + __FRACT_MIN__; /* { dg-warning "overflow" } */
15
_Fract a9 = 0.0r + __FRACT_MAX__;
16
_Fract a10 = 0.1r + __FRACT_MAX__; /* { dg-warning "overflow" } */
17
_Fract a11 = -0.1r + __FRACT_MAX__;
18
 
19
_Fract b0 = 0.5r - 0.5r;
20
_Fract b1 = 0.5r - 0.6r;
21
_Fract b2 = 0.5r - -0.6r; /* { dg-warning "overflow" } */
22
_Fract b3 = -0.5r - 0.6r; /* { dg-warning "overflow" } */
23
_Fract b4 = -0.5r - -0.5r;
24
_Fract b5 = -0.5r - -0.6r;
25
_Fract b6 = 0.0r - __FRACT_MIN__; /* { dg-warning "overflow" } */
26
_Fract b7 = 0.1r - __FRACT_MIN__; /* { dg-warning "overflow" } */
27
_Fract b8 = -0.1r - __FRACT_MIN__;
28
_Fract b9 = 0.0r - __FRACT_MAX__;
29
_Fract b10 = 0.1r - __FRACT_MAX__;
30
_Fract b11 = -0.1r - __FRACT_MAX__; /* { dg-warning "overflow" } */

powered by: WebSVN 2.1.0

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