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/] [fixed-point/] [muldiv-warning.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 "-std=gnu99" } */
3
 
4
/* Check if GCC generates warnings when overflows for mul and div.  */
5
 
6
short _Fract sf0 = __SFRACT_MIN__ * __SFRACT_MIN__; /* { dg-warning "overflow" } */
7
_Fract f0 = __FRACT_MIN__ * __FRACT_MIN__; /* { dg-warning "overflow" } */
8
long _Fract lf0 = __LFRACT_MIN__ * __LFRACT_MIN__; /* { dg-warning "overflow" } */
9
long long _Fract llf0 = __LLFRACT_MIN__ * __LLFRACT_MIN__; /* { dg-warning "overflow" } */
10
short _Fract sf1 = __SFRACT_MAX__ * __SFRACT_MIN__;
11
_Fract f1 = __FRACT_MAX__ * __FRACT_MIN__;
12
long _Fract lf1 = __LFRACT_MAX__ * __LFRACT_MIN__;
13
long long _Fract llf1 = __LLFRACT_MAX__ * __LLFRACT_MIN__;
14
short _Fract sf2 = __SFRACT_MIN__ / __SFRACT_MIN__; /* { dg-warning "overflow" } */
15
_Fract f2 = __FRACT_MIN__ / __FRACT_MIN__; /* { dg-warning "overflow" } */
16
long _Fract lf2 = __LFRACT_MIN__ / __LFRACT_MIN__; /* { dg-warning "overflow" } */
17
long long _Fract llf2 = __LLFRACT_MIN__ / __LLFRACT_MIN__; /* { dg-warning "overflow" } */
18
short _Fract sf3 = __SFRACT_MAX__ / __SFRACT_MIN__;
19
_Fract f3 = __FRACT_MAX__ / __FRACT_MIN__;
20
long _Fract lf3 = __LFRACT_MAX__ / __LFRACT_MIN__;
21
long long _Fract llf3 = __LLFRACT_MAX__ / __LLFRACT_MIN__;
22
 
23
unsigned short _Fract usf0 = __USFRACT_MIN__ * __USFRACT_MIN__;
24
unsigned _Fract uf0 = __UFRACT_MIN__ * __UFRACT_MIN__;
25
unsigned long _Fract ulf0 = __ULFRACT_MIN__ * __ULFRACT_MIN__;
26
unsigned long long _Fract ullf0 = __ULLFRACT_MIN__ * __ULLFRACT_MIN__;
27
unsigned short _Fract usf1 = __USFRACT_MAX__ * __USFRACT_MIN__;
28
unsigned _Fract uf1 = __UFRACT_MAX__ * __UFRACT_MIN__;
29
unsigned long _Fract ulf1 = __ULFRACT_MAX__ * __ULFRACT_MIN__;
30
unsigned long long _Fract ullf1 = __ULLFRACT_MAX__ * __ULLFRACT_MIN__;
31
unsigned short _Fract usf2 = __USFRACT_MAX__ / __USFRACT_MAX__; /* { dg-warning "overflow" } */
32
unsigned _Fract uf2 = __UFRACT_MAX__ / __UFRACT_MAX__; /* { dg-warning "overflow" } */
33
unsigned long _Fract ulf2 = __ULFRACT_MAX__ / __ULFRACT_MAX__; /* { dg-warning "overflow" } */
34
unsigned long long _Fract ullf2 = __ULLFRACT_MAX__ / __ULLFRACT_MAX__; /* { dg-warning "overflow" } */
35
unsigned short _Fract usf3 = __USFRACT_MIN__ / __USFRACT_MAX__;
36
unsigned _Fract uf3 = __UFRACT_MIN__ / __UFRACT_MAX__;
37
unsigned long _Fract ulf3 = __ULFRACT_MIN__ / __ULFRACT_MAX__;
38
unsigned long long _Fract ullf3 = __ULLFRACT_MIN__ / __ULLFRACT_MAX__;
39
 
40
short _Accum sa0 = __SACCUM_MIN__ * __SACCUM_MIN__; /* { dg-warning "overflow" } */
41
_Accum a0 = __ACCUM_MIN__ * __ACCUM_MIN__; /* { dg-warning "overflow" } */
42
long _Accum la0 = __LACCUM_MIN__ * __LACCUM_MIN__; /* { dg-warning "overflow" } */
43
long long _Accum lla0 = __LLACCUM_MIN__ * __LLACCUM_MIN__; /* { dg-warning "overflow" } */
44
short _Accum sa1 = __SACCUM_MAX__ * 0.1hk;
45
_Accum a1 = __ACCUM_MAX__ * 0.1k;
46
long _Accum la1 = __LACCUM_MAX__ * 0.1lk;
47
long long _Accum lla1 = __LLACCUM_MAX__ * 0.1llk;
48
short _Accum sa2 = __SACCUM_MIN__ / 0.1hk; /* { dg-warning "overflow" } */
49
_Accum a2 = __ACCUM_MIN__ / 0.1k; /* { dg-warning "overflow" } */
50
long _Accum la2 = __LACCUM_MIN__ / 0.1lk; /* { dg-warning "overflow" } */
51
long long _Accum lla2 = __LLACCUM_MIN__ / 0.1llk; /* { dg-warning "overflow" } */
52
short _Accum sa3 = __SACCUM_MAX__ / __SACCUM_MIN__;
53
_Accum a3 = __ACCUM_MAX__ / __ACCUM_MIN__;
54
long _Accum la3 = __LACCUM_MAX__ / __LACCUM_MIN__;
55
long long _Accum lla3 = __LLACCUM_MAX__ / __LLACCUM_MIN__;
56
 
57
unsigned short _Accum usa0 = __USACCUM_MIN__ * __USACCUM_MIN__;
58
unsigned _Accum ua0 = __UACCUM_MIN__ * __UACCUM_MIN__;
59
unsigned long _Accum ula0 = __ULACCUM_MIN__ * __ULACCUM_MIN__;
60
unsigned long long _Accum ulla0 = __ULLACCUM_MIN__ * __ULLACCUM_MIN__;
61
unsigned short _Accum usa1 = __USACCUM_MAX__ * __USACCUM_MAX__; /* { dg-warning "overflow" } */
62
unsigned _Accum ua1 = __UACCUM_MAX__ * __UACCUM_MAX__; /* { dg-warning "overflow" } */
63
unsigned long _Accum ula1 = __ULACCUM_MAX__ * __ULACCUM_MAX__; /* { dg-warning "overflow" } */
64
unsigned long long _Accum ulla1 = __ULLACCUM_MAX__ * __ULLACCUM_MAX__; /* { dg-warning "overflow" } */
65
unsigned short _Accum usa2 = __USACCUM_MAX__ / 0.5hk; /* { dg-warning "overflow" } */
66
unsigned _Accum ua2 = __UACCUM_MAX__ / 0.5k; /* { dg-warning "overflow" } */
67
unsigned long _Accum ula2 = __ULACCUM_MAX__ / 0.5lk; /* { dg-warning "overflow" } */
68
unsigned long long _Accum ulla2 = __ULLACCUM_MAX__ / 0.5llk; /* { dg-warning "overflow" } */
69
unsigned short _Accum usa3 = __USACCUM_MIN__ / __USACCUM_MAX__;
70
unsigned _Accum ua3 = __UACCUM_MIN__ / __UACCUM_MAX__;
71
unsigned long _Accum ula3 = __ULACCUM_MIN__ / __ULACCUM_MAX__;
72
unsigned long long _Accum ulla3 = __ULLACCUM_MIN__ / __ULLACCUM_MAX__;

powered by: WebSVN 2.1.0

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