+2004-11-13 Zak Kipling <zak@transversal.com>
+
+ PR target/18300
+ * config/i386/i386.c (classify_argument): Fix infinite loop when
+ passing object with 3 or more base classes by value.
+
2004-11-13 Eric Botcazou <ebotcazou@libertysurf.fr>
* doc/md.texi (constraints) <% modifier>: Mention that it is
* doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove.
2004-11-13 James A. Morrison <phython@gcc.gnu.org>
- Eric Botcazou <ebotcazou@libertysurf.fr>
+ Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/18230
* config/sparc/sparc.c (sparc_rtx_costs): Handle the NAND vector
if (TYPE_BINFO (type))
{
tree binfo, base_binfo;
- int i;
+ int basenum;
- for (binfo = TYPE_BINFO (type), i = 0;
- BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
+ for (binfo = TYPE_BINFO (type), basenum = 0;
+ BINFO_BASE_ITERATE (binfo, basenum, base_binfo); basenum++)
{
int num;
int offset = tree_low_cst (BINFO_OFFSET (base_binfo), 0) * 8;
if (TYPE_BINFO (type))
{
tree binfo, base_binfo;
- int i;
+ int basenum;
- for (binfo = TYPE_BINFO (type), i = 0;
- BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
+ for (binfo = TYPE_BINFO (type), basenum = 0;
+ BINFO_BASE_ITERATE (binfo, basenum, base_binfo); basenum++)
{
int num;
int offset = tree_low_cst (BINFO_OFFSET (base_binfo), 0) * 8;
--- /dev/null
+// PR 18300: This sends old compilers into an infinite loop on x86_64
+// Testcase and patch contributed by Zak Kipling <zak@transversal.com>
+
+struct base1 { };
+struct base2 { };
+struct base3 { };
+
+struct derived : base1, base2, base3 { };
+
+void foo(derived);
+
+int main()
+{
+ foo(derived());
+}
+