brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 7d2b5e9 Raw
22 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic2! Testing for pointer constant, along with :3! C751 A component shall not have both the ALLOCATABLE and POINTER attributes.4! C752 If the CONTIGUOUS attribute is specified, the component shall be an 5!   array with the POINTER attribute.6! C753 The * char-length option is permitted only if the component is of type 7!   character.8subroutine s()9  !ERROR: 'nullint' may not have both the POINTER and PARAMETER attributes10  integer, pointer, parameter :: nullint => null()11  type derivedType12    !ERROR: 'pointerallocatablefield' may not have both the POINTER and ALLOCATABLE attributes13    real, pointer, allocatable :: pointerAllocatableField14    real, dimension(:), contiguous, pointer :: goodContigField15    !PORTABILITY: CONTIGUOUS component 'badcontigfield' should be an array with the POINTER attribute [-Wredundant-contiguous]16    real, dimension(:), contiguous, allocatable :: badContigField17    character :: charField * 318    !ERROR: A length specifier cannot be used to declare the non-character entity 'realfield'19    real :: realField * 320  end type derivedType21end subroutine s22