[all-commits] [llvm/llvm-project] b2c96d: [flang] Don't emit faulty warnings for illegal COM...
Emil Kieri via All-commits
all-commits at lists.llvm.org
Sat Aug 27 09:19:57 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b2c96d7855b8d5f4123ea0e19126bafbdc1bbcea
https://github.com/llvm/llvm-project/commit/b2c96d7855b8d5f4123ea0e19126bafbdc1bbcea
Author: Emil Kieri <j.emil.kieri at gmail.com>
Date: 2022-08-27 (Sat, 27 Aug 2022)
Changed paths:
M flang/lib/Semantics/compute-offsets.cpp
Log Message:
-----------
[flang] Don't emit faulty warnings for illegal COMMON blocks
SAVE statements referencing COMMON block names are not allowed in BLOCK
constructs. If they occur, an error is correctly emitted, but then flang
gets confused by the illegal SAVE and produces a faulty warning. This
patch removes that warning.
Consider this piece of Fortran (from the test blockconstruct02.f90):
program main
real r, s, t
common /argmnt2/ r, s, t
block
save /argmnt2/
end block
end program
Here flang (in addition to the error about the illegal SAVE) emits a
portability warning saying that the two definitions of argmnt2 have
different size, which does not make much sense.
This patch is a prerequisite for D125804, which in turn will make
blockconstruct02.f90 test this patch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D132403
More information about the All-commits
mailing list