Skip to content

Conversation

@klausler
Copy link
Contributor

I added a new test with warnings, but warnings are now emitted with hints. Add them to the new test.

I added a new test with warnings, but warnings are now emitted
with hints.  Add them to the new test.
@klausler klausler requested a review from akuhlens June 30, 2025 18:18
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:semantics labels Jun 30, 2025
@klausler klausler merged commit 2d825cc into llvm:main Jun 30, 2025
8 of 10 checks passed
@klausler klausler deleted the fix-test branch June 30, 2025 18:19
@llvmbot
Copy link
Member

llvmbot commented Jun 30, 2025

@llvm/pr-subscribers-flang-semantics

Author: Peter Klausler (klausler)

Changes

I added a new test with warnings, but warnings are now emitted with hints. Add them to the new test.


Full diff: https://github.com/llvm/llvm-project/pull/146399.diff

1 Files Affected:

  • (modified) flang/test/Semantics/bug1046.f90 (+6-8)
diff --git a/flang/test/Semantics/bug1046.f90 b/flang/test/Semantics/bug1046.f90
index a266651f90c31..dc5c470621387 100644
--- a/flang/test/Semantics/bug1046.f90
+++ b/flang/test/Semantics/bug1046.f90
@@ -1,17 +1,15 @@
 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic -Werror
-!WARNING: INTEGER(4) 0**0 is not defined
+!WARNING: INTEGER(4) 0**0 is not defined [-Wfolding-exception]
 print *, 0**0
-!WARNING: REAL/COMPLEX 0**0 is not defined
+!WARNING: REAL/COMPLEX 0**0 is not defined [-Wfolding-exception]
 print *, 0**0.
-!WARNING: invalid argument on power with INTEGER exponent
+!WARNING: invalid argument on power with INTEGER exponent [-Wfolding-exception]
 print *, 0.0**0
-!WARNING: REAL/COMPLEX 0**0 is not defined
+!WARNING: REAL/COMPLEX 0**0 is not defined [-Wfolding-exception]
 print *, 0.0**0.
-!WARNING: invalid argument on power with INTEGER exponent
+!WARNING: invalid argument on power with INTEGER exponent [-Wfolding-exception]
 print *, (0.0, 0.0)**0
-!WARNING: REAL/COMPLEX 0**0 is not defined
+!WARNING: REAL/COMPLEX 0**0 is not defined [-Wfolding-exception]
 print *, (0.0, 0.0)**0.
 print *, (0.0, 0.0)**2.5
 end
-
-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:semantics flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants