1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-unknown-nacl | FileCheck %s 2*0a6a1f1dSLionel Sambuc // Check that i686-nacl essentially has -malign-double, which aligns 3*0a6a1f1dSLionel Sambuc // double, long double, and long long to 64-bits. 4*0a6a1f1dSLionel Sambuc 5*0a6a1f1dSLionel Sambuc int checksize[sizeof(long double) == 8 ? 1 : -1]; 6*0a6a1f1dSLionel Sambuc int checkalign[__alignof(long double) == 8 ? 1 : -1]; 7*0a6a1f1dSLionel Sambuc 8*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define void @s1(double %a) s1(long double a)9*0a6a1f1dSLionel Sambucvoid s1(long double a) {} 10*0a6a1f1dSLionel Sambuc 11*0a6a1f1dSLionel Sambuc struct st_ld { 12*0a6a1f1dSLionel Sambuc char c; 13*0a6a1f1dSLionel Sambuc long double ld; 14*0a6a1f1dSLionel Sambuc }; 15*0a6a1f1dSLionel Sambuc int checksize2[sizeof(struct st_ld) == 16 ? 1 : -1]; 16*0a6a1f1dSLionel Sambuc int checkalign2[__alignof(struct st_ld) == 8 ? 1 : -1]; 17*0a6a1f1dSLionel Sambuc 18*0a6a1f1dSLionel Sambuc int checksize3[sizeof(double) == 8 ? 1 : -1]; 19*0a6a1f1dSLionel Sambuc int checkalign3[__alignof(double) == 8 ? 1 : -1]; 20*0a6a1f1dSLionel Sambuc 21*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define void @s2(double %a) s2(double a)22*0a6a1f1dSLionel Sambucvoid s2(double a) {} 23*0a6a1f1dSLionel Sambuc 24*0a6a1f1dSLionel Sambuc struct st_d { 25*0a6a1f1dSLionel Sambuc char c; 26*0a6a1f1dSLionel Sambuc double d; 27*0a6a1f1dSLionel Sambuc }; 28*0a6a1f1dSLionel Sambuc int checksize4[sizeof(struct st_d) == 16 ? 1 : -1]; 29*0a6a1f1dSLionel Sambuc int checkalign4[__alignof(struct st_d) == 8 ? 1 : -1]; 30*0a6a1f1dSLionel Sambuc 31*0a6a1f1dSLionel Sambuc 32*0a6a1f1dSLionel Sambuc int checksize5[sizeof(long long) == 8 ? 1 : -1]; 33*0a6a1f1dSLionel Sambuc int checkalign5[__alignof(long long) == 8 ? 1 : -1]; 34*0a6a1f1dSLionel Sambuc 35*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define void @s3(i64 %a) s3(long long a)36*0a6a1f1dSLionel Sambucvoid s3(long long a) {} 37*0a6a1f1dSLionel Sambuc 38*0a6a1f1dSLionel Sambuc struct st_ll { 39*0a6a1f1dSLionel Sambuc char c; 40*0a6a1f1dSLionel Sambuc long long ll; 41*0a6a1f1dSLionel Sambuc }; 42*0a6a1f1dSLionel Sambuc int checksize6[sizeof(struct st_ll) == 16 ? 1 : -1]; 43*0a6a1f1dSLionel Sambuc int checkalign6[__alignof(struct st_ll) == 8 ? 1 : -1]; 44