3ad64f53da
destringize_and_run forgets to initialize all the fields of the cpp_context that it pushes. Later _cpp_pop_context then gets confused when it accesses context->tokens_kind via the call to macro_of_context on context->prev. The first hunk of this patch is the real obvious fix. The second hunk is just an assert that I am adding to err on the safe side. Tested by on x86_64-unknown-linux-gnu against trunk by running the test gcc.dg/gomp/macro-4.c under Valgrind, and bootstrapped. libcpp/ * directives.c (destringize_and_run): Properly initialize the new context. * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop the initial base context, which has the same life time as the current instance of cpp_file. From-SVN: r187054 |
||
---|---|---|
.. | ||
include | ||
po | ||
aclocal.m4 | ||
ChangeLog | ||
charset.c | ||
config.in | ||
configure | ||
configure.ac | ||
directives-only.c | ||
directives.c | ||
errors.c | ||
expr.c | ||
files.c | ||
identifiers.c | ||
init.c | ||
internal.h | ||
lex.c | ||
line-map.c | ||
macro.c | ||
Makefile.in | ||
makeucnid.c | ||
mkdeps.c | ||
pch.c | ||
symtab.c | ||
system.h | ||
traditional.c | ||
ucnid.h | ||
ucnid.tab |