[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
Loading
Please sign in to comment