This is an archive of the discontinued LLVM Phabricator instance.

[flang] emit warning when encountering a non-variable actual argument when its corresponding dummy argument expects a VOLATILE variable
ClosedPublic

Authored by cabreraam on Dec 1 2022, 12:07 PM.

Details

Summary

This patch implements @klausler's suggestion in llvm-project issue #58973; encountering the VOLATILE attribute should produce a warning, not a fatal error.

When tested on the following Fortran program snem0601_012_.f90:

fortran
  module mod
    contains
    subroutine sub(m6,error)
    integer,intent(inout) :: error

    integer,volatile :: m6

    if (any ((/m6/).ne.(/6/))) &
   & then
       error = 1
    end if
    end subroutine
  end module

  program fe1nvol12

    use mod
    integer :: error = 0

    call sub(6,error)

    if (error .ne. 0) then
      print *,'NG: snem0601_012'
    end if

    print *,'pass: snem0601_012'

  end program fe1nvol12

the following output is produced:

bash
$ flang-new -fc1 snem0601_012_.f90
/noback/93u/Sandbox/issue_58973_volatile_dummy_arg/snem0601_012_.f90:21:12: warning: actual argument associated with VOLATILE dummy argument 'm6=' is not a variable
    call sub(6,error)
             ^

Diff Detail

Event Timeline

cabreraam created this revision.Dec 1 2022, 12:07 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 1 2022, 12:07 PM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
cabreraam edited the summary of this revision. (Show Details)Dec 1 2022, 12:11 PM
cabreraam added reviewers: clementval, klausler.
cabreraam added a subscriber: klausler.
cabreraam published this revision for review.Dec 1 2022, 12:17 PM
cabreraam edited the summary of this revision. (Show Details)
cabreraam edited the summary of this revision. (Show Details)Dec 1 2022, 12:19 PM
clementval requested changes to this revision.Dec 1 2022, 12:23 PM

I don't think you have change the correct message. The one you removed is a TODO in lowering and the issue is about an error message in semantics. This is the one that should be updated for VOLATILE - https://github.com/llvm/llvm-project/blob/23ffadcf3143ab6291ec3b4be3ff46c8b9f7f78e/flang/lib/Semantics/check-call.cpp#L407

This revision now requires changes to proceed.Dec 1 2022, 12:23 PM

When I compile without my fix, this is the output I get:

error: loc("/noback/93u/Sandbox/issue_58973_volatile_dummy_arg/snem0601_012_.f90":3:3): /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:884: not yet implemented: VOLATILE in procedure interface
LLVM ERROR: aborting

I'll look into the line that you pointed out, though, and report back.

When I compile without my fix, this is the output I get:

error: loc("/noback/93u/Sandbox/issue_58973_volatile_dummy_arg/snem0601_012_.f90":3:3): /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:884: not yet implemented: VOLATILE in procedure interface
LLVM ERROR: aborting

I'll look into the line that you pointed out, though, and report back.

This is expected since VOLATILE is not implemented in lowering and the TODO raise the error. You should test your fix with a semantic test like flang/test/Semantics/assign09.f90. See the run line use a specific python script.

At the end of this post are the stack frames that get dumped upon erroring out. I don't any calls to that line or that file (flang/lib/Semantics/check-call.cpp), but I do see some calls to functions that are within the Fortran::semantics namespace:

  • #29 0x0000000002d19d48 Fortran::lower::LoweringBridge::lower(Fortran::parser::Program const&, Fortran::semantics::SemanticsContext const&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/Bridge.cpp:3706:1
  • #10 0x0000000002f4c84d Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::handleExplicitDummy(Fortran::evaluate::characteristics::DummyArgument const*, Fortran::evaluate::characteristics::DummyDataObject const&, std::optional<Fortran::common::Reference<Fortran::semantics::Symbol const>> const&, bool) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:886:23

Should I be hitting the https://github.com/llvm/llvm-project/blob/23ffadcf3143ab6291ec3b4be3ff46c8b9f7f78e/flang/lib/Semantics/check-call.cpp#L407 at somepoint in the call stack?

I have just seen your most recent post and will try testing with flang/test/Semantics/assign09.f90.

flang-new version 16.0.0 (git@code.ornl.gov:apg/llvm-project.git 5bc443f5a2461f33079e9737f89eb6057da7d73b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /noback/93u/Research/secretariat/llvm-project/build_debug_gcc/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/noback/93u/Research/secretariat/llvm-project/build_debug_gcc/bin/flang-new" -fc1 -triple x86_64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -pic-is-pie -o /tmp/snem0601_012_-c2b5e4.o -x f95-cpp-input /noback/93u/Sandbox/issue_58973_volatile_dummy_arg/snem0601_012_.f90
error: loc("/noback/93u/Sandbox/issue_58973_volatile_dummy_arg/snem0601_012_.f90":3:3): /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:884: not yet implemented: not yet implemented: VOLATILE in procedure interface
LLVM ERROR: aborting
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /noback/93u/Research/secretariat/llvm-project/build_debug_gcc/bin/flang-new -fc1 -triple x86_64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -pic-is-pie -o /tmp/snem0601_012_-c2b5e4.o -x f95-cpp-input /noback/93u/Sandbox/issue_58973_volatile_dummy_arg/snem0601_012_.f90
 #0 0x0000000002453bb5 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /noback/93u/Research/secretariat/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:22
 #1 0x0000000002453c78 PrintStackTraceSignalHandler(void*) /noback/93u/Research/secretariat/llvm-project/llvm/lib/Support/Unix/Signals.inc:641:1
 #2 0x0000000002451ab3 llvm::sys::RunSignalHandlers() /noback/93u/Research/secretariat/llvm-project/llvm/lib/Support/Signals.cpp:104:20
 #3 0x00000000024535ed SignalHandler(int) /noback/93u/Research/secretariat/llvm-project/llvm/lib/Support/Unix/Signals.inc:412:1
 #4 0x00007ffff7f9e420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #5 0x00007ffff79e500b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #6 0x00007ffff79c4859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #7 0x00000000023bce90 llvm::report_fatal_error(llvm::Twine const&, bool) /noback/93u/Research/secretariat/llvm-project/llvm/lib/Support/ErrorHandling.cpp:125:9
 #8 0x00000000023bccae llvm::report_fatal_error(llvm::StringRef, bool) /noback/93u/Research/secretariat/llvm-project/llvm/lib/Support/ErrorHandling.cpp:86:68
 #9 0x0000000002d363d1 (/noback/93u/Research/secretariat/llvm-project/build_debug_gcc/bin/flang-new+0x2d363d1)
#10 0x0000000002f4c84d Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::handleExplicitDummy(Fortran::evaluate::characteristics::DummyArgument const*, Fortran::evaluate::characteristics::DummyDataObject const&, std::optional<Fortran::common::Reference<Fortran::semantics::Symbol const>> const&, bool) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:886:23
#11 0x0000000002f48997 Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&)::operator()(Fortran::evaluate::characteristics::DummyDataObject const&) const /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:647:15
#12 0x0000000002f56505 void std::__invoke_impl<void, Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>, Fortran::evaluate::characteristics::DummyDataObject const&>(std::__invoke_other, Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>&&, Fortran::evaluate::characteristics::DummyDataObject const&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/bits/invoke.h:61:67
#13 0x0000000002f53104 std::__invoke_result<Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>, Fortran::evaluate::characteristics::DummyDataObject const&>::type std::__invoke<Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>, Fortran::evaluate::characteristics::DummyDataObject const&>(Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>&&, Fortran::evaluate::characteristics::DummyDataObject const&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/bits/invoke.h:97:36
#14 0x0000000002f4d382 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>&&, std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&)>, std::integer_sequence<unsigned long, 0ul>>::__visit_invoke(Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>&&, std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/variant:1033:38
#15 0x0000000002f4d4e5 decltype(auto) std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>, std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&>(Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>&&, std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/variant:1783:5
#16 0x0000000002f4d596 std::invoke_result<Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>, std::__conditional<is_lvalue_reference_v<std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&>>::type<std::variant_alternative<0ul, std::remove_reference<decltype(__as(declval<std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&>()))>::type>::type&, std::variant_alternative<0ul, std::remove_reference<decltype(__as(declval<std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&>()))>::type>::type&&>>::type std::visit<Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>, std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&>(Fortran::common::visitors<Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda'(Fortran::evaluate::characteristics::DummyDataObject const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda0'(Fortran::evaluate::characteristics::DummyProcedure const&), Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&)::'lambda1'(Fortran::evaluate::characteristics::AlternateReturn const&)>&&, std::variant<Fortran::evaluate::characteristics::DummyDataObject, Fortran::evaluate::characteristics::DummyProcedure, Fortran::evaluate::characteristics::AlternateReturn> const&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/variant:1848:39
#17 0x0000000002f48c6c Fortran::lower::CallInterfaceImpl<Fortran::lower::CalleeInterface>::buildExplicitInterface(Fortran::evaluate::characteristics::Procedure const&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:642:5
#18 0x0000000002f43b0e Fortran::lower::CallInterface<Fortran::lower::CalleeInterface>::determineInterface(bool, Fortran::evaluate::characteristics::Procedure const&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:1163:13
#19 0x0000000002f43cf1 Fortran::lower::CallInterface<Fortran::lower::CalleeInterface>::declare() /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:474:12
#20 0x0000000002d3db90 Fortran::lower::CalleeInterface::CalleeInterface(Fortran::lower::pft::FunctionLikeUnit&, Fortran::lower::AbstractConverter&) /noback/93u/Research/secretariat/llvm-project/flang/include/flang/Lower/CallInterface.h:367:3
#21 0x0000000002d085f6 (anonymous namespace)::FirConverter::declareFunction(Fortran::lower::pft::FunctionLikeUnit&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/Bridge.cpp:372:23
#22 0x0000000002d08098 (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&)::operator()(Fortran::lower::pft::ModuleLikeUnit&) const /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/Bridge.cpp:305:31
#23 0x0000000002d2d152 void std::__invoke_impl<void, Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>, Fortran::lower::pft::ModuleLikeUnit&>(std::__invoke_other, Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>&&, Fortran::lower::pft::ModuleLikeUnit&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/bits/invoke.h:61:67
#24 0x0000000002d2639d std::__invoke_result<Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>, Fortran::lower::pft::ModuleLikeUnit&>::type std::__invoke<Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>, Fortran::lower::pft::ModuleLikeUnit&>(Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>&&, Fortran::lower::pft::ModuleLikeUnit&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/bits/invoke.h:97:36
#25 0x0000000002d1a650 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>&&, std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&)>, std::integer_sequence<unsigned long, 1ul>>::__visit_invoke(Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>&&, std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/variant:1033:38
#26 0x0000000002d1a7f2 decltype(auto) std::__do_visit<std::__detail::__variant::__deduce_visit_result<void>, Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>, std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&>(Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>&&, std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/variant:1784:5
#27 0x0000000002d1a8a3 std::invoke_result<Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>, std::__conditional<is_lvalue_reference_v<std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&>>::type<std::variant_alternative<0ul, std::remove_reference<decltype(__as(declval<std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&>()))>::type>::type&, std::variant_alternative<0ul, std::remove_reference<decltype(__as(declval<std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&>()))>::type>::type&&>>::type std::visit<Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>, std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&>(Fortran::common::visitors<(anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda'(Fortran::lower::pft::FunctionLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda0'(Fortran::lower::pft::ModuleLikeUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda1'(Fortran::lower::pft::BlockDataUnit&), (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&)::'lambda2'(Fortran::lower::pft::CompilerDirectiveUnit&)>&&, std::variant<Fortran::lower::pft::FunctionLikeUnit, Fortran::lower::pft::ModuleLikeUnit, Fortran::lower::pft::BlockDataUnit, Fortran::lower::pft::CompilerDirectiveUnit>&) /auto/software/swtree/ubuntu20.04/x86_64/gcc/12.1.0/include/c++/12.1.0/variant:1848:39
#28 0x0000000002d08373 (anonymous namespace)::FirConverter::run(Fortran::lower::pft::Program&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/Bridge.cpp:295:64
#29 0x0000000002d19d48 Fortran::lower::LoweringBridge::lower(Fortran::parser::Program const&, Fortran::semantics::SemanticsContext const&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/Bridge.cpp:3706:1
#30 0x0000000002b1464a Fortran::frontend::CodeGenAction::beginSourceFileAction() /noback/93u/Research/secretariat/llvm-project/flang/lib/Frontend/FrontendActions.cpp:187:77
#31 0x000000000248d2c2 Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&, Fortran::frontend::FrontendInputFile const&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Frontend/FrontendAction.cpp:95:7
#32 0x0000000002477457 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) /noback/93u/Research/secretariat/llvm-project/flang/lib/Frontend/CompilerInstance.cpp:166:5
#33 0x00000000024932ed Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) /noback/93u/Research/secretariat/llvm-project/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:172:38
#34 0x0000000001e397a6 fc1_main(llvm::ArrayRef<char const*>, char const*) /noback/93u/Research/secretariat/llvm-project/flang/tools/flang-driver/fc1_main.cpp:67:38
#35 0x0000000001e3118e executeFC1Tool(llvm::SmallVectorImpl<char const*>&) /noback/93u/Research/secretariat/llvm-project/flang/tools/flang-driver/driver.cpp:66:57
#36 0x0000000001e315f2 main /noback/93u/Research/secretariat/llvm-project/flang/tools/flang-driver/driver.cpp:109:28
#37 0x00007ffff79c6083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#38 0x0000000001e30f2e _start (/noback/93u/Research/secretariat/llvm-project/build_debug_gcc/bin/flang-new+0x1e30f2e)

flang/test/Semantics/assign09.f90 is just an example of a semantic test that check for expected error/warning messages. Can you reproduce the same error as described in the issue?

cabreraam added a comment.EditedDec 1 2022, 1:22 PM

flang/test/Semantics/assign09.f90 is just an example of a semantic test that check for expected error/warning messages.

Ahhh, okay, I see. I'll need to create a new test to check for volatile.

Can you reproduce the same error as described in the issue?

Ah, that's a good question. The short answer is no.

I tried building with the commit hash specified by the OP of the GitHub issue, and the terminal hangs, but the output I get is below:

$ flang-new -flang-experimental-exec snem0601_012_.f90 -v                                                                                                     
flang-new version 16.0.0 (git@code.ornl.gov:apg/llvm-project.git e0fb01e97b6b7d2fe66b17b36eeb98aa78c6e3bb)                                                    
Target: x86_64-unknown-linux-gnu                                                                                                                              
Thread model: posix                                                                                                                                           
InstalledDir: /noback/93u/Research/secretariat/llvm-project/build_fujitsu/bin                                                                                 
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9                                                                                             
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9                                                                                                    
Candidate multilib: .;@m64                                                                                                                                    
Selected multilib: .;@m64                                                                                                                                     
 "/noback/93u/Research/secretariat/llvm-project/build_fujitsu/bin/flang-new" -fc1 -triple x86_64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-
model pic -pic-level 2 -pic-is-pie -o /tmp/snem0601_012_-fb7a35.o -x f95-cpp-input snem0601_012_.f90                                                          
error: loc("./snem0601_012_.f90":3:3): /noback/93u/Research/secretariat/llvm-project/flang/lib/Lower/CallInterface.cpp:872: not yet implemented: VOLATILE in p
rocedure interface                                                                                                                                            
LLVM ERROR: aborting                                                                                                                                          
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.                                                   
Stack dump:                                                                                                                                                   
0.      Program arguments: /noback/93u/Research/secretariat/llvm-project/build_fujitsu/bin/flang-new -fc1 -triple x86_64-unknown-linux-gnu -emit-obj -fcolor-d
iagnostics -mrelocation-model pic -pic-level 2 -pic-is-pie -o /tmp/snem0601_012_-fb7a35.o -x f95-cpp-input snem0601_012_.f90     
<hangs here>

So, I'm not sure how to recreate that issue.

This is expected since VOLATILE is not implemented in lowering and the TODO raise the error. You should test your fix with a semantic test like flang/test/Semantics/assign09.f90. See the run line use a specific python script.

Okay, I took a look at this and ran

bash
"/noback/93u/anaconda3/bin/python3.8" /noback/93u/Research/secretariat/llvm-project/flang/test/Semantics/test_errors.py /noback/93u/Research/secretariat/llvm-project/flang/test/Semantics/assign09.f90 /noback/93u/Research/secretariat/llvm-project/build_debug_gcc/bin/flang-new -fc1

I see what you mean. You want to catch the volatile attribute during semantic analysis, not when executing the binary, which is what I did. I will step through the assign09.f90 example tomorrow as a guide to do something similar for producing an appropriate warning. Thanks @clementval!

The issue is not triggered with the latest build. So you might want to ask the author of the issue how you can reproduce it before spending too much time on this.

The issue is not triggered with the latest build. So you might want to ask the author of the issue how you can reproduce it before spending too much time on this.

I will ask the issue author if they can reproduce, but FWIW, I'm still getting the error when I supply -flang-experimental-exec as of commit hash 04ac0a3ffc11e0e1ac49a3c2b092a66252b2a3ce.

FWIW, I'm still getting the error when I supply -flang-experimental-exec as of commit hash 04ac0a3ffc11e0e1ac49a3c2b092a66252b2a3ce.

That's not the issue mentioned and not an actual issue or a bug but a TODO as mentioned in previous comment. TODOs in lowering help to give a meaningful message on what is not implemented instead of crashing elsewhere.

FWIW, I'm still getting the error when I supply -flang-experimental-exec as of commit hash 04ac0a3ffc11e0e1ac49a3c2b092a66252b2a3ce.

That's not the issue mentioned and not an actual issue or a bug but a TODO as mentioned in previous comment. TODOs in lowering help to give a meaningful message on what is not implemented instead of crashing elsewhere.

Wait, I thought that -flang-experimental-exec was the issue? That's what the GitHub author mentioned the problem was. But I do understand the TODO aspect of the volatile keyword in this context, thanks for the clarification.

FWIW, I'm still getting the error when I supply -flang-experimental-exec as of commit hash 04ac0a3ffc11e0e1ac49a3c2b092a66252b2a3ce.

That's not the issue mentioned and not an actual issue or a bug but a TODO as mentioned in previous comment. TODOs in lowering help to give a meaningful message on what is not implemented instead of crashing elsewhere.

Wait, I thought that -flang-experimental-exec was the issue? That's what the GitHub author mentioned the problem was. But I do understand the TODO aspect of the volatile keyword in this context, thanks for the clarification.

-flang-experimental-exec is the only way currently to have an exectuable with flang so it is not triggering the issue.

-flang-experimental-exec is the only way currently to have an exectuable with flang so it is not triggering the issue.

Right, gotcha. Just compiling with -fc1 does not result in an error (I have verified this many times!) but the experimental flag to create binaries (-flang-experimental-exec) is not actually supported.

A final thought: I'm going to try to spend a little more time to implement the semantic check because I think it'd still be useful to spit out a compiler warning if the volatile attribute is encountered -- similar to the test you pointed out. I won't spend too much time though!

cabreraam updated this revision to Diff 480227.EditedDec 5 2022, 1:45 PM
cabreraam edited the summary of this revision. (Show Details)

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

Emitting warning during semantic analysis instead of at run-time.

@clementval and @klausler, would y'all take a look at this? Based on y'all's suggestions, I think I'm now catching the volatile keyword at the right time.

Now, when I compile the sample code from the GitHub issue with fc1, I observe the following:

bash
$ flang-new -fc1 snem0601_012_.f90
/path/to/file/snem0601_012_.f90:21:12: warning: VOLATILE keyword is not yet supported so this may lead to undefined behavior dummy argument 'm6='
    call sub(6,error)
             ^

Running check-flang makes two tests "fail":

  • Semantics/call03.f90
  • Semantics/call08.f90

but only because they both have variables declared with volatile, so, assuming this fix is appropriate, I'd just need to add some comments to these tests so that test_errors.py knows to expect that warnings are emitted for volatile now.

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

Emitting warning during semantic analysis instead of at run-time.

@clementval and @klausler, would y'all take a look at this? Based on y'all's suggestions, I think I'm now catching the volatile keyword at the right time.

Now, when I compile the sample code from the GitHub issue with fc1, I observe the following:

bash
$ flang-new -fc1 snem0601_012_.f90
/path/to/file/snem0601_012_.f90:21:12: warning: VOLATILE keyword is not yet supported so this may lead to undefined behavior dummy argument 'm6='
    call sub(6,error)
             ^

Running check-flang makes two tests "fail":

  • Semantics/call03.f90
  • Semantics/call08.f90

but only because they both have variables declared with volatile, so, assuming this fix is appropriate, I'd just need to add some comments to these tests so that test_errors.py knows to expect that warnings are emitted for volatile now.

Whoops; this solution is also incorrect.

I misunderstood the original GitHub issue. My assumption was that this was an issue with how volatile was handled during the lowering phase. This is incorrect. The problem is that, in the test from the GitHub issue, the dummy argument is marked as volatile, but the actual argument that gets supplied is a constant (i.e., not a variable). Will update this diff with the appropriate fix.

cabreraam updated this revision to Diff 480633.Dec 6 2022, 2:34 PM

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

cabreraam updated this revision to Diff 480634.EditedDec 6 2022, 2:37 PM

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

Here's the output of the original GitHub issue code:

$ flang-new -fc1 snem0601_012_.f90
/noback/93u/Sandbox/issue_58973_volatile_dummy_arg/snem0601_012_.f90:21:12: warning: actual argument associated with VOLATILE dummy argument dummy argument 'm6=' is not a variable
    call sub(6,error)
             ^

I addressed my issue from yesterday. @klausler and @clementval, please have a look.

klausler added inline comments.Dec 6 2022, 3:26 PM
flang/lib/Semantics/check-call.cpp
423

This is obviously going to work only for non-variables that also happen to be constant expressions. It will fail for non-variables that are runtime expressions. Try !IsVariable(actual).

cabreraam updated this revision to Diff 480692.Dec 6 2022, 4:44 PM

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

cabreraam marked an inline comment as done.Dec 6 2022, 4:45 PM
cabreraam added inline comments.
flang/lib/Semantics/check-call.cpp
423

That makes sense. I've updated accordingly

Looks pretty good. Needs a test. Be sure to run clang-format before continuing.

cabreraam marked an inline comment as done.Dec 6 2022, 4:57 PM

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

cabreraam added inline comments.Dec 12 2022, 12:21 PM
flang/test/Semantics/call30.f90
65

An interesting thing about flang/test/Semantics/test_errors.py is that the python script won't check the stderr output _unless_ there's an error. For context, my contribution just checks for warnings, so stderr wasn't being inspected by test_errors.py. So, I just added a known error to check for from flang/test/Semantics/call02.f90. I thought this would be better than editing the test_errors.py script. If folks take issue with this, let me know.

cabreraam added inline comments.Dec 12 2022, 12:39 PM
flang/test/Semantics/call30.f90
65

RE: the test_errors.py only checking upon encountering a warning: look here.

klausler added inline comments.Dec 12 2022, 2:10 PM
flang/test/Semantics/call30.f90
65

could use -Werror

cabreraam added inline comments.Dec 12 2022, 2:46 PM
flang/test/Semantics/call30.f90
65

nice! I'm going to just append that to the end of the RUN: script and take out that (now) superfluous test. thanks for the assist!

cabreraam updated this revision to Diff 482282.Dec 12 2022, 3:06 PM

Updating D139134: [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute

cabreraam marked an inline comment as done.Dec 12 2022, 3:07 PM
cabreraam added inline comments.Dec 12 2022, 7:03 PM
flang/test/Semantics/call30.f90
65

Done now

You need to run clang-format on the modified file. The pre-commit test is failing right now.

cabreraam added a comment.EditedDec 13 2022, 6:47 AM

You need to run clang-format on the modified file. The pre-commit test is failing right now.

I can do that. I had been getting a warning from phabricator that clang-format wasn't in my $PATH, but I fixed that. I assumed when I landed the patch, it would clang-format it for me but I can explicitly run it on the modified file.

Where can I find the results pre-commit test?

If the results are in the diff detail, where can I find where it says the patch is failing to merge because of formatting issues?

Where can I find the results pre-commit test?

At the top of this page. You have a "details" block and then a "Diff Detail" after it with the "Build status". It will not clang-format your file when you land it if it did not when you updated the diff.

cabreraam updated this revision to Diff 482471.EditedDec 13 2022, 7:26 AM
  • [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute
  • [flang] adding test for addressing warning fix for llvm-project issue #58973

I also ran clang-format

  • [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute
  • [flang] adding test for addressing warning fix for llvm-project issue #58973

I also ran clang-format

pre-merge checks now passing.

Ready to land @clementval @klausler?

klausler accepted this revision.Dec 13 2022, 10:32 AM
cabreraam updated this revision to Diff 482557.EditedDec 13 2022, 10:47 AM
  • [flang] adding test for addressing warning fix for llvm-project issue #58973

There was a piece of that (now unnecessary) test that I hadn't yet removed, but now I've removed it.

@klausler @clementval

clementval accepted this revision.Dec 13 2022, 11:29 AM

You might want to change the title of your patch if you are using acranist because it will become your commit message.

This revision is now accepted and ready to land.Dec 13 2022, 11:29 AM
cabreraam retitled this revision from [flang] RE: llvm-project issue #58973, replace fatal error with warning when encountering explicit volatile attribute to [flang] emit warning when encountering a non-variable actual argument when its corresponding dummy argument expects a VOLATILE variable.Dec 13 2022, 11:42 AM
cabreraam edited the summary of this revision. (Show Details)Dec 13 2022, 11:46 AM
cabreraam edited the summary of this revision. (Show Details)