Skip to content

[flang] Harden testcase by changing variable name. #142363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025
Merged

Conversation

abidh
Copy link
Contributor

@abidh abidh commented Jun 2, 2025

I noticed that this testcase was failing in a CI build because it has a CHECK-NOT: bbb while bbb could appear in the hashed global variable name. Improved the test by changing this name to ggg which can't appear in a hex string.

I noticed that this testcase was failing because it has a
`CHECK-NOT: bbb` while `bbb` could appear in the hashed global
variable name. Improved the test by changing this name to `ggg` which
can't appear in a hex string.
@abidh abidh requested review from skatrak, tblah and vdonaldson June 2, 2025 11:19
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jun 2, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 2, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Abid Qadeer (abidh)

Changes

I noticed that this testcase was failing in a CI build because it has a CHECK-NOT: bbb while bbb could appear in the hashed global variable name. Improved the test by changing this name to ggg which can't appear in a hex string.


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

1 Files Affected:

  • (modified) flang/test/Lower/namelist.f90 (+3-3)
diff --git a/flang/test/Lower/namelist.f90 b/flang/test/Lower/namelist.f90
index ea97a0957c35b..94b0ef11cb102 100644
--- a/flang/test/Lower/namelist.f90
+++ b/flang/test/Lower/namelist.f90
@@ -130,15 +130,15 @@ module mmm
 
 ! CHECK-LABEL: c.func @_QPrename_sub
 subroutine rename_sub
-  use mmm, bbb => aaa
+  use mmm, ggg => aaa
   rrr = 3.
   ! CHECK:     %[[V_4:[0-9]+]] = fir.call @_FortranAioBeginExternalListOutput
   ! CHECK:     %[[V_5:[0-9]+]] = fir.address_of(@_QMmmmNaaa) : !fir.ref<tuple<!fir.ref<i8>, i64, !fir.ref<!fir.array<1xtuple<!fir.ref<i8>, !fir.ref<!fir.box<none>>>>>, !fir.ref<none>>>
   ! CHECK:     %[[V_6:[0-9]+]] = fir.convert %[[V_5]] : (!fir.ref<tuple<!fir.ref<i8>, i64, !fir.ref<!fir.array<1xtuple<!fir.ref<i8>, !fir.ref<!fir.box<none>>>>>, !fir.ref<none>>>) -> !fir.ref<tuple<>>
   ! CHECK:     %[[V_7:[0-9]+]] = fir.call @_FortranAioOutputNamelist(%[[V_4]], %[[V_6]]) fastmath<contract> : (!fir.ref<i8>, !fir.ref<tuple<>>) -> i1
   ! CHECK:     %[[V_8:[0-9]+]] = fir.call @_FortranAioEndIoStatement(%[[V_4]]) fastmath<contract> : (!fir.ref<i8>) -> i32
-  write(*,bbb)
+  write(*,ggg)
 end
 
-! CHECK-NOT:   bbb
+! CHECK-NOT:   ggg
 ! CHECK:       fir.string_lit "aaa\00"(4) : !fir.char<1,4>

Copy link
Contributor

@tarunprabhu tarunprabhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM.

@abidh abidh merged commit 3374263 into llvm:main Jun 3, 2025
14 checks passed
sallto pushed a commit to sallto/llvm-project that referenced this pull request Jun 3, 2025
I noticed that this testcase was failing in a CI build because it has a
`CHECK-NOT: bbb` while `bbb` could appear in the hashed global variable
name. Improved the test by changing this name to `ggg` which can't
appear in a hex string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants