public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109413] New: [OpenMP] ICE for 'OMP ERROR at(compilation)' when using a named constant/parameter
@ 2023-04-04 17:28 burnus at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2023-04-04 17:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109413

            Bug ID: 109413
           Summary: [OpenMP] ICE for 'OMP ERROR at(compilation)' when
                    using a named constant/parameter
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

The following gives an ICE in gfc_enforce_clean_symbol_state.

character(*), parameter :: pt = "hkgj"
!$omp error at(compilation) message(pt)
end


The current wording implies that this is valid.

TODO: Check what C/C++ do for non-literals.

Note: OpenMP Spec Issue 3558 might change what is permitted.

* * *

Possibly, the printing needs to me moved from directly after parsing to later:

It sounds as if code placed in non-executable context (→ declaration part),
metadirectives needs to be honored – which may imply a delayed printing after
evaluating the static context selector?

For executable context, the 'at' clause has the following, but not when used in
declarative/non-executable context:

"If _action-time_ is **compilation** and the directive appears in an executable
context that is not reachable at runtime, the action may or may not be
performed."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-04 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04 17:28 [Bug fortran/109413] New: [OpenMP] ICE for 'OMP ERROR at(compilation)' when using a named constant/parameter burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).