aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-05-28 13:04:25 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2024-05-28 13:04:25 -0400
commitb544ff88560e100e53ed8966d38f172c5bafce8d (patch)
tree0ee6a5d8e8e9c40c2b684cea37864be80ac42702 /gcc/cp/error.cc
parent236116068151bbc72aaaf53d0f223fe06f7e3bac (diff)
downloadgcc-b544ff88560e100e53ed8966d38f172c5bafce8d.zip
gcc-b544ff88560e100e53ed8966d38f172c5bafce8d.tar.gz
gcc-b544ff88560e100e53ed8966d38f172c5bafce8d.tar.bz2
Fix bootstrap on AIX by adding c-family/c-type-mismatch.cc [PR115167]
PR bootstrap/115167 reports a bootstrap failure on AIX triggered by r15-636-g770657d02c986c whilst building f951 in stage 2, due to the linker not being able to find symbols for: vtable for range_label_for_type_mismatch range_label_for_type_mismatch::get_text(unsigned int) const The only users of the class range_label_for_type_mismatch are in the C/C++ frontends, each of which supply their own implementation of: range_label_for_type_mismatch::get_text(unsigned int) const i.e. we had a cluster of symbols that was disconnnected from any users on f951. The above patch added a new range_label::get_effects vfunc to the base class. My hunch is that we were getting away with not defining the symbol for Fortran with AIX's linker before (since none of the users are used), but adding the get_effects vfunc has somehow broken things (possibly because there's an empty implementation in the base class in the *header*). The following patch moves all of the code in gcc/gcc-rich-location.[cc,h,o} defining and using range_label_for_type_mismatch to a new gcc/c-family/c-type-mismatch.{cc,h,o}, to help the linker ignore this cluster of symbols when it's disconnected from users. I was able to reproduce the failure without the patch, and then successfully bootstrap with this patch on powerpc-ibm-aix7.3.1.0 (cfarm119). gcc/ChangeLog: PR bootstrap/115167 * Makefile.in (C_COMMON_OBJS): Add c-family/c-type-mismatch.o. * gcc-rich-location.cc (maybe_range_label_for_tree_type_mismatch::get_text): Move to c-family/c-type-mismatch.cc. (binary_op_rich_location::binary_op_rich_location): Likewise. (binary_op_rich_location::use_operator_loc_p): Likewise. * gcc-rich-location.h (class range_label_for_type_mismatch): Likewise. (class maybe_range_label_for_tree_type_mismatch): Likewise. (class op_location_t): Likewise for forward decl. (class binary_op_rich_location): Likewise. gcc/c-family/ChangeLog: PR bootstrap/115167 * c-format.cc: Replace include of "gcc-rich-location.h" with "c-family/c-type-mismatch.h". * c-type-mismatch.cc: New file, taking material from gcc-rich-location.cc. * c-type-mismatch.h: New file, taking material from gcc-rich-location.h. * c-warn.cc: Replace include of "gcc-rich-location.h" with "c-family/c-type-mismatch.h". gcc/c/ChangeLog: PR bootstrap/115167 * c-objc-common.cc: Replace include of "gcc-rich-location.h" with "c-family/c-type-mismatch.h". * c-typeck.cc: Likewise. gcc/cp/ChangeLog: PR bootstrap/115167 PR bootstrap/115167 * call.cc: Replace include of "gcc-rich-location.h" with "c-family/c-type-mismatch.h". * error.cc: Likewise. * typeck.cc: Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/cp/error.cc')
-rw-r--r--gcc/cp/error.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc
index 37987cc..0ff7f9d 100644
--- a/gcc/cp/error.cc
+++ b/gcc/cp/error.cc
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "c-family/c-objc.h"
#include "ubsan.h"
#include "internal-fn.h"
-#include "gcc-rich-location.h"
+#include "c-family/c-type-mismatch.h"
#include "cp-name-hint.h"
#include "attribs.h"