Files
clang-p2996/flang/test/Semantics/data14.f90
Peter Klausler 63a2987d51 [flang] Allow initialization in blank COMMON
This is nonconformant usage, but widely accepted as an extension.
Downgrade the error message to a warning.

Differential Revision: https://reviews.llvm.org/D117152
2022-01-13 15:07:37 -08:00

17 lines
468 B
Fortran

! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s
! Verify varnings on nonconforming DATA statements
! As a common extension, C876 violations are not errors.
program main
type :: seqType
sequence
integer :: number
end type
type(seqType) :: x
integer :: j
common j, x, y
!CHECK: Blank COMMON object 'j' in a DATA statement is not standard
data j/1/
!CHECK: Blank COMMON object 'x' in a DATA statement is not standard
data x%number/2/
end