diff --git a/flang/module/__fortran_builtins.f90 b/flang/module/__fortran_builtins.f90 index ef206dfd94310..503633489b575 100644 --- a/flang/module/__fortran_builtins.f90 +++ b/flang/module/__fortran_builtins.f90 @@ -40,15 +40,15 @@ 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 @@ -88,7 +88,7 @@ __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) diff --git a/flang/test/Semantics/get_team.f90 b/flang/test/Semantics/get_team.f90 index 7e4886703d17c..a5b49a83f95f5 100644 --- a/flang/test/Semantics/get_team.f90 +++ b/flang/test/Semantics/get_team.f90 @@ -10,6 +10,8 @@ program get_team_test type(team_type) :: result_team logical wrong_result_type, non_integer + result_team = team_type() + !___ standard-conforming statement with no optional arguments present ___ result_team = get_team()