@@ -66,8 +66,8 @@ void ActualArgument::Parenthesize() {
6666
6767SpecificIntrinsic::SpecificIntrinsic (
6868 IntrinsicProcedure n, characteristics::Procedure &&chars)
69- : name{n}, characteristics{
70- new characteristics::Procedure{std::move (chars)}} {}
69+ : name{n},
70+ characteristics{ new characteristics::Procedure{std::move (chars)}} {}
7171
7272DEFINE_DEFAULT_CONSTRUCTORS_AND_ASSIGNMENTS (SpecificIntrinsic)
7373
@@ -98,7 +98,7 @@ std::optional<DynamicType> ProcedureDesignator::GetType() const {
9898}
9999
100100int ProcedureDesignator::Rank () const {
101- if (const Symbol * symbol{GetSymbol ()}) {
101+ if (const Symbol *symbol{GetSymbol ()}) {
102102 // Subtle: will be zero for functions returning procedure pointers
103103 return symbol->Rank ();
104104 }
@@ -116,7 +116,7 @@ int ProcedureDesignator::Rank() const {
116116}
117117
118118const Symbol *ProcedureDesignator::GetInterfaceSymbol () const {
119- if (const Symbol * symbol{GetSymbol ()}) {
119+ if (const Symbol *symbol{GetSymbol ()}) {
120120 const Symbol &ultimate{symbol->GetUltimate ()};
121121 if (const auto *proc{ultimate.detailsIf <semantics::ProcEntityDetails>()}) {
122122 return proc->procInterface ();
@@ -131,9 +131,9 @@ const Symbol *ProcedureDesignator::GetInterfaceSymbol() const {
131131}
132132
133133bool ProcedureDesignator::IsElemental () const {
134- if (const Symbol * interface{GetInterfaceSymbol ()}) {
134+ if (const Symbol *interface{GetInterfaceSymbol ()}) {
135135 return IsElementalProcedure (*interface);
136- } else if (const Symbol * symbol{GetSymbol ()}) {
136+ } else if (const Symbol *symbol{GetSymbol ()}) {
137137 return IsElementalProcedure (*symbol);
138138 } else if (const auto *intrinsic{std::get_if<SpecificIntrinsic>(&u)}) {
139139 return intrinsic->characteristics .value ().attrs .test (
@@ -145,9 +145,9 @@ bool ProcedureDesignator::IsElemental() const {
145145}
146146
147147bool ProcedureDesignator::IsPure () const {
148- if (const Symbol * interface{GetInterfaceSymbol ()}) {
148+ if (const Symbol *interface{GetInterfaceSymbol ()}) {
149149 return IsPureProcedure (*interface);
150- } else if (const Symbol * symbol{GetSymbol ()}) {
150+ } else if (const Symbol *symbol{GetSymbol ()}) {
151151 return IsPureProcedure (*symbol);
152152 } else if (const auto *intrinsic{std::get_if<SpecificIntrinsic>(&u)}) {
153153 return intrinsic->characteristics .value ().attrs .test (
@@ -158,6 +158,20 @@ bool ProcedureDesignator::IsPure() const {
158158 return false ;
159159}
160160
161+ bool ProcedureDesignator::IsSimple () const {
162+ if (const Symbol *interface{GetInterfaceSymbol ()}) {
163+ return IsSimpleProcedure (*interface);
164+ } else if (const Symbol *symbol{GetSymbol ()}) {
165+ return IsSimpleProcedure (*symbol);
166+ } else if (const auto *intrinsic{std::get_if<SpecificIntrinsic>(&u)}) {
167+ return intrinsic->characteristics .value ().attrs .test (
168+ characteristics::Procedure::Attr::Simple);
169+ } else {
170+ DIE (" ProcedureDesignator::IsSimple(): no case" );
171+ }
172+ return false ;
173+ }
174+
161175const SpecificIntrinsic *ProcedureDesignator::GetSpecificIntrinsic () const {
162176 return std::get_if<SpecificIntrinsic>(&u);
163177}
0 commit comments