1 // RUN: %clang_cc1 -Wdouble-promotion -Wimplicit-float-conversion %s -triple x86_64-apple-macosx10.12 -verify=x86,expected
2 // RUN: %clang_cc1 -Wdouble-promotion -Wimplicit-float-conversion %s -triple armv7-apple-ios9.0 -verify=arm,expected
4 // On ARM, long double and double both map to double precision 754s, so there
5 // isn't any reason to warn on conversions back and forth.
12 ld
= d
; // x86-warning {{implicit conversion increases floating-point precision: 'double' to 'long double'}}
13 d
= ld
; // x86-warning {{implicit conversion loses floating-point precision: 'long double' to 'double'}}
15 ld
+= d
; // x86-warning {{implicit conversion increases floating-point precision: 'double' to 'long double'}}
16 d
+= ld
; // x86-warning {{implicit conversion when assigning computation result loses floating-point precision: 'long double' to 'double'}}
18 f16
= ld
; // expected-warning {{implicit conversion loses floating-point precision: 'long double' to '_Float16'}}
19 ld
= f16
; // expected-warning {{implicit conversion increases floating-point precision: '_Float16' to 'long double'}}
21 f16
+= ld
; // expected-warning {{implicit conversion when assigning computation result loses floating-point precision: 'long double' to '_Float16'}}
22 ld
+= f16
; // expected-warning {{implicit conversion increases floating-point precision: '_Float16' to 'long double'}}