Carlos Seo
Carlos Seo
I did some digging on this and found out two things: 1. This doesn't fail at any optimization level above -O0. 2. This doesn't fail if the variables in the...
I think I figured out what's going on. The test executes the functions in this order: ``` int main() { int *data = 0; foo(&data); bar(); xoo(); yoo(&data); } ```...
> Is this fixed with a3c0f70, or did you see the issue on non-darwin platform? It's Linux. If I apply the same rationale from Darwin, the tests pass. But looking...
Since the testcase workaround fixed the problem, I'll close this. When I have a better understanding about the weird codegen observed here, I'll open a new issue against the AArch64...
The problem here is not the intrinsic, it's the nested call. Here is a smaller reproducer: ``` program main call bar(foo) end program main subroutine foo(x) x=x+1 end subroutine foo...
Oh, correct! I'll keep digging the original testcase then. Thanks!
> > The problem here is not the intrinsic, it's the nested call. Here is a smaller reproducer: > > In your reproducer, `call bar(foo)` passes the address of an...
@jeanPerier I think I have an idea of what's going on. The original reproducer declares a language standard intrinsic inside a module. If I understand correctly how `genIntrinsicRef` works, it...
Investigating this. What seems to be happening is that `gfortran` creates a temp integer variable and passes that to `sizeof()` when compiling this code (`sizeof(a)` returns `4` in `gfortran`). Flang...
The current Flang implementation is based on the Fortran 2018 standard, so calling the subroutine with no argument, and therefore, `sizeof()` with no argument is expected to be an error....