[all-commits] [llvm/llvm-project] 82ecbe: [flang][semantics] add semantic check that STAT an...

Andre Kuhlenschmidt via All-commits all-commits at lists.llvm.org
Fri Oct 31 10:26:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82ecbeb278edfbe4015d2f0a62eb92ddc2d674b2
      https://github.com/llvm/llvm-project/commit/82ecbeb278edfbe4015d2f0a62eb92ddc2d674b2
  Author: Andre Kuhlenschmidt <andre.kuhlenschmidt at gmail.com>
  Date:   2025-10-31 (Fri, 31 Oct 2025)

  Changed paths:
    M flang/lib/Semantics/check-allocate.cpp
    M flang/lib/Semantics/check-allocate.h
    M flang/lib/Semantics/check-deallocate.cpp
    A flang/test/Semantics/allocate14.f90

  Log Message:
  -----------
  [flang][semantics] add semantic check that STAT and ERRMSG are not (de)allocated by same statement (#164529)

Almost all compilers statically error on the following case even though
it isn't a numbered constraint. Now we do to instead segfaulting at
runtime.

```fortran
integer,pointer:: i
allocate(i,stat=i)
end
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list