[flang] Add default component initialization to some built-in types (#121416)

The standard requires EVENT_TYPE, LOCK_TYPE, NOTIFY_TYPE, and TEAM_TYPE
to have full default initialization for their nonallocatable private
components.
This commit is contained in:
Peter Klausler
2025-01-08 13:14:28 -08:00
committed by GitHub
parent 07b3bba901
commit b53bdc6101
2 changed files with 6 additions and 4 deletions

View File

@@ -43,15 +43,15 @@ module __fortran_builtins
end type
type, public :: __builtin_event_type
integer(kind=int64), private :: __count
integer(kind=int64), private :: __count = -1
end type
type, public :: __builtin_notify_type
integer(kind=int64), private :: __count
integer(kind=int64), private :: __count = -1
end type
type, public :: __builtin_lock_type
integer(kind=int64), private :: __count
integer(kind=int64), private :: __count = -1
end type
type, public :: __builtin_ieee_flag_type
@@ -91,7 +91,7 @@ module __fortran_builtins
__builtin_ieee_round_type(_FORTRAN_RUNTIME_IEEE_OTHER)
type, public :: __builtin_team_type
integer(kind=int64), private :: __id
integer(kind=int64), private :: __id = -1
end type
integer, parameter, public :: __builtin_atomic_int_kind = selected_int_kind(18)