diff options
author | Dodji Seketeli <dodji@seketeli.org> | 2013-05-29 15:53:11 +0200 |
---|---|---|
committer | Dodji Seketeli <dodji@seketeli.org> | 2013-05-29 15:53:11 +0200 |
commit | 1ac3253e4a42a3ff5bca99bb99f0a69022b048d9 (patch) | |
tree | f56b5c24202ff91bfb88115185c20462528a2641 | |
parent | aaf4bb709b9dc4cd32f1a4f2e58b225e4d36f267 (diff) | |
download | gcc-1ac3253e4a42a3ff5bca99bb99f0a69022b048d9.tar.gz |
Don't crash trying to get location on type w/o TYPE_DECL.
gcc/cp
* abi-instr.cc (get_location): Don't crash on type that don't have
TYPE_DECL.
-rw-r--r-- | gcc/cp/abi-instr.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/abi-instr.cc b/gcc/cp/abi-instr.cc index 6baa58e05b4..2896e120eac 100644 --- a/gcc/cp/abi-instr.cc +++ b/gcc/cp/abi-instr.cc @@ -243,7 +243,7 @@ get_location (const_tree t) { if (DECL_P (t)) return convert_location (DECL_SOURCE_LOCATION (t)); - if (TYPE_P (t)) + if (TYPE_P (t) && TYPE_NAME (t)) return convert_location (DECL_SOURCE_LOCATION (TYPE_NAME (t))); if (EXPR_P (t) && EXPR_HAS_LOCATION (t)) return convert_location (EXPR_LOCATION (t)); |