[flang-commits] [PATCH] D128009: [flang] Add semantics test for image_status and add a check

Katherine Rasmussen via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Jun 29 15:20:54 PDT 2022


ktras added a comment.

@jeanPerier and @klausler Thank you for your feedback.

I have moved the check for non positive values to `ApplySpecificChecks()`. Is this an appropriate place for the type of check I am trying to add?

@jeanPerier The `image` argument of `image_status` and the `size` argument of `ishftc` were the only arguments to intrinsic functions that I could find that had that type of restriction, requiring them to be greater than 0. Though it is possible I missed 
something. Also, yes, I knew that you could pass arrays but I definitely spaced on that when writing the new error check, so thank you for pointing that out to me. I spent some time trying to account for the case when the argument is an array, but was unable to find a way to do so. I believe the class I am dealing with when I unwrap the expression inside of the argument is `Expr<SomeType>`. I am not sure how to ask this question, but if I have an instance of `Expr<SomeType>` and I know that it is an array (through checking the rank of the argument) , is there a way to unpack the `Expr<SomeType>` so that I have something like an array of `Expr<SomeType>`, so that I can iterate over the array and do the check for a non-positive value? This is what I was trying to track down and I couldn't find. I would appreciate any advice or pointing towards portions of code that might be helpful for me to look at, thanks!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128009/new/

https://reviews.llvm.org/D128009



More information about the flang-commits mailing list