aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorvdonaldson <37090318+vdonaldson@users.noreply.github.com>2024-12-23 11:07:20 -0500
committerGitHub <noreply@github.com>2024-12-23 11:07:20 -0500
commitdcb7f44cd6419325b62ff5fbbd971bb0dd0b32b1 (patch)
treecd5e64e70431e51daedf3712f7472e0487329963 /clang/lib/Sema/SemaChecking.cpp
parent711419e3025678511e3d26c4c30d757f9029d598 (diff)
downloadllvm-dcb7f44cd6419325b62ff5fbbd971bb0dd0b32b1.zip
llvm-dcb7f44cd6419325b62ff5fbbd971bb0dd0b32b1.tar.gz
llvm-dcb7f44cd6419325b62ff5fbbd971bb0dd0b32b1.tar.bz2
[flang] Modifications to ieee_support_halting (#120976)
The F23 standard requires that a call to intrinsic module procedure ieee_support_halting be foldable to a constant at compile time in some contexts. See for example F23 Clause 10.1.11 [Specification expression] list item (13), Clause 1.1.12 [Constant expression] list item (11), and references to specification and constant expressions elsewhere, such as constraints C1012, C853, and C704. Some Arm processors allow a user to control processor behavior when an arithmetic exception is signaled, and some Arm processors do not have this capability. An Arm executable will run on either type of processor, so it is effectively unknown at compile time whether or not this support will be available at runtime. This is in conflict with the standard requirement. This patch addresses this conflict by implementing ieee_support_halting calls on Arm processors to check if this capability is present at runtime. A call to ieee_support_halting in a constant context, such as in the specification part of a program unit, will generate a compile time "cannot be computed as a constant value" error. The expectation is that such calls are unlikely to appear in production code. Code generation for other processors will continue to generate a compile time constant result for ieee_support_halting calls.
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
0 files changed, 0 insertions, 0 deletions