comparison gcc/testsuite/c-c++-common/pr41779.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* PR41779: Wconversion cannot see through real*integer promotions. */ 1 /* PR41779: Wconversion cannot see through real*integer promotions. */
2 /* { dg-do compile } */ 2 /* { dg-do compile } */
3 /* { dg-skip-if "doubles are floats" { "avr-*-*" } } */ 3 /* { dg-skip-if "doubles are floats" { avr-*-* } } */
4 /* { dg-options "-std=c99 -Wconversion" { target c } } */ 4 /* { dg-options "-std=c99 -Wconversion" { target c } } */
5 /* { dg-options "-Wconversion" { target c++ } } */ 5 /* { dg-options "-Wconversion" { target c++ } } */
6 /* { dg-require-effective-target large_double } */ 6 /* { dg-require-effective-target large_double } */
7 7
8 float f1(float x, unsigned short y) 8 float f1(float x, unsigned short y)
25 return x * y; 25 return x * y;
26 } 26 }
27 27
28 float f5(float x, int y) 28 float f5(float x, int y)
29 { 29 {
30 return x * y; /* { dg-warning "conversion" } */ 30 return x * y; /* { dg-warning "conversion" "" { target int_eq_float } } */
31 } 31 }
32 32
33 double c1(float x, unsigned short y, int z) 33 double c1(float x, unsigned short y, int z)
34 { 34 {
35 return z ? x + x : y; 35 return z ? x + x : y;
50 return z ? x + x : y; 50 return z ? x + x : y;
51 } 51 }
52 52
53 double c5(float x, int y, int z) 53 double c5(float x, int y, int z)
54 { 54 {
55 return z ? x + x : y; /* { dg-warning "conversion" } */ 55 return z ? x + x : y; /* { dg-warning "conversion" "" { target int_eq_float } } */
56 } 56 }