diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-09-19 00:05:55 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-09-19 00:05:55 -0700 |
commit | 737fc2a978ff2364d91e634a6b990979df60058f (patch) | |
tree | 84c85df96be29864d792721aa5505b3f941aa20d /gcc-4.6 | |
parent | b6f4708104b7ccb10e2b7e4f58d82f409418ad36 (diff) | |
download | toolchain_gcc-737fc2a978ff2364d91e634a6b990979df60058f.tar.gz toolchain_gcc-737fc2a978ff2364d91e634a6b990979df60058f.tar.bz2 toolchain_gcc-737fc2a978ff2364d91e634a6b990979df60058f.zip |
Fix crash on null context in GCC 4.6 cp/mangle.c::write_unscoped_name
Compiler may crash when context == NULL and dereferenced in TREE_CODE
Change-Id: I8630e98bc4df04fd9cc18a4432e7e82bf2968755
Diffstat (limited to 'gcc-4.6')
-rw-r--r-- | gcc-4.6/gcc/cp/mangle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc-4.6/gcc/cp/mangle.c b/gcc-4.6/gcc/cp/mangle.c index 3f9996b64..5852150ac 100644 --- a/gcc-4.6/gcc/cp/mangle.c +++ b/gcc-4.6/gcc/cp/mangle.c @@ -872,7 +872,7 @@ write_unscoped_name (const tree decl) /* If not, it should be either in the global namespace, or directly in a local function scope. */ gcc_assert (context == global_namespace - || context != NULL + || context == NULL || TREE_CODE (context) == FUNCTION_DECL); write_unqualified_name (decl); |