https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78468

--- Comment #11 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
(In reply to r...@cebitec.uni-bielefeld.de from comment #9)
> > 2) Replace "p7" in foo with just "7".  If it still fails we know the bug is 
> > not
> > triggered by the dynamic allocation of a or b.
> 
> ... but stays this way.

Good, the assembly diff has shrunk a lot:

--
@@ -8,7 +8,7 @@
        ld      [%i0+4], %g4
        add     %g4, 1, %i3
        sll     %i3, 2, %g1
-       add     %g1, 10, %g1
+       add     %g1, 7, %g1     <------- add (8 - 1) bytes
        and     %g1, -8, %g1    <------- round down to multiple of 8
        mov     0, %g2
        sub     %sp, %g1, %sp
@@ -25,7 +25,6 @@
         add    %g1, 4, %g1
        add     %g3, 1, %i2
        sll     %i2, 3, %g1
-       add     %g1, 8, %g1     < ------ what was this good for?
        mov     0, %g2
        sub     %sp, %g1, %sp
        add     %sp, 96, %i5
--

The marked instructions in the first chunk do look like the calculations of the
dynamic stack area's address.  The reduced source code does not have dynamic
stack allocation, so that must come from libgomp.  The next step is to figure
out how libgomp generates instructions.  Can you provide tree dumps for both
Gccs?

Reply via email to