This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix one type mismatch in the C++ front-end (PR 22358)


The problem here is that we don't convert BINFO_OFFSET to ptrdiff_type_node as the
other side of the cond_expr is that type and the type of cond_expr is declared as
that type.


This patch fixes the problem by calling convert on BINFO_OFFSET which fixes the
problem.


OK? Bootstrapped and tested on powerpc-darwin with no regressions.

The testcase was reduced from complex_io.cc in libstdc++ using the patch in PR 22368
to find this.


Thanks,
Andrew Pinski

ChangeLog:
	* class.c (build_base_path): Convert BINFO_OFFSET to the correct type.


Attachment: t.diff.txt
Description: Text document




Testcase: struct a { virtual ~a(); }; struct b : virtual a { }; b a11;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]