c++: constrained lambda error-recovery [PR108972]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr93366.f90
blob3cb6d1d16da96904319e426f6d37fd2707db2583
1 ! { dg-do compile }
3 ! PR fortran/93366 - ICE on invalid, reject invalid use of NULL() as argument
5 program p
6 print *, kind (null()) ! { dg-error "NULL at" }
7 print *, [ merge(null(), [1] ,.true.) ] ! { dg-error "NULL at" }
8 print *, [ merge([1] , null(),.true.) ] ! { dg-error "NULL at" }
9 print *, [ merge(null(), null(),.true.) ] ! { dg-error "NULL at" }
10 print *, shape (null()) ! { dg-error "NULL at" }
11 print *, sizeof (null()) ! { dg-error "NULL at" }
12 print *, spread (null(),1,1) ! { dg-error "NULL at" }
13 print *, transfer ( 1 , null()) ! { dg-error "NULL at" }
14 print *, transfer ([1], null()) ! { dg-error "NULL at" }
15 print *, transfer (null(), 1) ! { dg-error "NULL at" }
16 print *, transfer (null(), [1]) ! { dg-error "NULL at" }
17 print *, transfer (null(), null()) ! { dg-error "NULL at" }
18 end