c++: dependent conversion operator lookup [PR106179]
[official-gcc.git] / gcc / testsuite / gfortran.dg / structure_constructor_16.f90
blob93e8a3f77634b0ff9e0579299dde9e8ae3bfa488
1 ! { dg-do compile }
2 ! { dg-additional-options "-Wcharacter-truncation" }
3 ! PR 82743 - warnings were missing on truncation of structure
4 ! constructors.
5 ! Original test case by Simon Klüpfel
6 PROGRAM TEST
7 TYPE A
8 CHARACTER(LEN=1) :: C
9 END TYPE A
10 TYPE(A) :: A1
11 A1=A("123") ! { dg-warning "CHARACTER expression will be truncated" }
12 A1=A(C="123") ! { dg-warning "CHARACTER expression will be truncated" }
13 A1%C="123" ! { dg-warning "CHARACTER expression will be truncated" }
14 END PROGRAM TEST