annotate gcc/testsuite/gfortran.dg/array_constructor_18.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-Wzerotrip" }
kono
parents:
diff changeset
3 ! Tests the fix for PR32875, in which the character length for the
kono
parents:
diff changeset
4 ! array constructor would get lost in simplification and would lead
kono
parents:
diff changeset
5 ! the error 'Not Implemented: complex character array constructor'.
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
kono
parents:
diff changeset
8 !
kono
parents:
diff changeset
9 call foo ((/(S1(i),i=1,3,-1)/)) ! { dg-warning "will be executed zero times" }
kono
parents:
diff changeset
10 CONTAINS
kono
parents:
diff changeset
11 FUNCTION S1(i)
kono
parents:
diff changeset
12 CHARACTER(LEN=1) :: S1
kono
parents:
diff changeset
13 INTEGER :: I
kono
parents:
diff changeset
14 S1="123456789"(i:i)
kono
parents:
diff changeset
15 END FUNCTION S1
kono
parents:
diff changeset
16 subroutine foo (chr)
kono
parents:
diff changeset
17 character(1) :: chr(:)
kono
parents:
diff changeset
18 print *, chr
kono
parents:
diff changeset
19 end subroutine
kono
parents:
diff changeset
20 END