This is the mail archive of the 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]

Re: unable to detect exception model

On Sun, 25 Jun 2006, Andrew Pinski wrote:

> On Jun 24, 2006, at 6:58 AM, Andrew Pinski wrote:
> >I can reproduce this, something is miscompiling cc1plus.
> If I revert:
> 2006-06-23  Richard Guenther  <>
>        * ggc-page.c (init_ggc): Do not round up the extra_order_size_table
>        sizes to MAX_ALIGNMENT.  Fix the size_lookup table to honour
>        alignment requests instead.  Add verification code.
>        Add struct tree_function_decl and struct tree_binfo size to
>        extra_order_size_table.  Add missing element to size_lookup
>        table.
> Bootstrap works.

How does size_loopup look like?  And object_size_table?  Does

Index: ggc-page.c
--- ggc-page.c  (revision 114974)
+++ ggc-page.c  (working copy)
@@ -1574,8 +1574,9 @@ init_ggc (void)

   /* Verify we got everything right with respect to alignment requests.  
   for (order = 1; order < 512; ++order)
-    gcc_assert (ffs (OBJECT_SIZE (size_lookup [order]))
-               >= ffs (order | MAX_ALIGNMENT));
+    gcc_assert ((ffs (OBJECT_SIZE (size_lookup [order]))
+                >= ffs (order | MAX_ALIGNMENT))
+               && order >= OBJECT_SIZE (size_lookup [order]));

   G.depth_in_use = 0;
   G.depth_max = 10;

pass?  What is MAX_ALIGNMENT on ppc-darwin?  It's defined as

struct max_alignment {
  char c;
  union {
    long double d;
  } u;

/* The biggest alignment required.  */

#define MAX_ALIGNMENT (offsetof (struct max_alignment, u))

I would guess this exposes a latent GC problem, do you have a testcase
or a .o file that is miscompiled?  Does it reproduce with different
gc --parms?  Does ppc-darwin use the USING_MMAP variant?

It would be nice if you can track down this some more, as I do not
have access to ppc-darwin.


Richard Guenther <>
Novell / SUSE Labs

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