This is an archive of the discontinued LLVM Phabricator instance.

[flang] Perform default value initialization on abstract type if needed
ClosedPublic

Authored by clementval on Feb 23 2023, 12:31 PM.

Details

Summary

Abstract derived-type components can have default value so perform
the default value initialization if necessary.

type, abstract :: a
  integer :: b = 10
end type

type, extends(a) :: b
  integer :: d
end type

Diff Detail

Event Timeline

clementval created this revision.Feb 23 2023, 12:31 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 23 2023, 12:31 PM
clementval requested review of this revision.Feb 23 2023, 12:31 PM
klausler accepted this revision.Feb 23 2023, 12:34 PM

Thanks for digging into the type table construction code and figuring this bug out.

flang/lib/Semantics/runtime-type-info.cpp
616–617

The parentheses around the conjunction are no longer required.

This revision is now accepted and ready to land.Feb 23 2023, 12:34 PM

Remove extra parentheses