d: Set doing_semantic_analysis_p before calling functionSemantic3
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Jan 2023 20:17:47 +0000 (21:17 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 21 Feb 2023 14:12:19 +0000 (15:12 +0100)
commit8063de4a8cde958c34fbd2af4a25080709263c74
tree8f90f098f89977e542b3898d81885ca0481fcd98
parentdfd39ed30dd69a3613d47a83d3739923051734aa
d: Set doing_semantic_analysis_p before calling functionSemantic3

As functions which have semantic analysis ran late may still require
the use of CTFE built-ins to be evaluated.

gcc/d/ChangeLog:

* decl.cc (DeclVisitor::visit (FuncDeclaration *)): Set
doing_semantic_analysis_p before calling functionSemantic3.

gcc/testsuite/ChangeLog:

* gdc.dg/ctfeintrinsics.d: New test.
gcc/d/decl.cc
gcc/testsuite/gdc.dg/ctfeintrinsics.d [new file with mode: 0644]