preproc: need to look at mmac->in_progress not mstk->in_progress

mstk.mstk reflects %rep conditions as well as actual expanded
macros. However, in_progress is undefined for %rep loops; we instead
want to look at the underlying mmacro, if there is one.

Discovered trying to compile x264.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2020-06-08 13:29:06 -07:00
parent ae0e50c491
commit bacf04a3e0

View file

@ -6394,8 +6394,9 @@ static Token *pp_tokline(void)
* condition, in which case we don't want to meddle with
* anything.
*/
if (!defining && !(istk->conds && !emitting(istk->conds->state))
&& !(istk->mstk.mstk && !istk->mstk.mstk->in_progress)) {
if (!defining &&
!(istk->conds && !emitting(istk->conds->state)) &&
!(istk->mstk.mmac && !istk->mstk.mmac->in_progress)) {
tline = expand_mmac_params(tline);
}