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 Ada bootstrap on ppc-darwin (PR 18572)


On PPC we generate a constant decl with the initialization which contains
casts and an add. When we have to gimplify the expression when SRAing
the struct copy, we don't copy the expression but gimplify the expression
that is inside the DECL's INITIAL which causes a problem after we come
out of SSA because the constant decl now contains a SSA_NAME which no
longer exist but we should have copied the expression before gimplifying
the expression. This patch does just that unshares the expression
and fixes the Ada bootstrap at the same time, this is the first time
since the tree-ssa was merged in I am able to bootstrap the Ada compiler
on powerpc-darwin.


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

Thanks,
Andrew Pinski

ChangeLog:

	* tree-sra.c (scalarize_init): Unshare the rhs before gimplifying
	it.


Attachment: fixAda.diff.txt
Description: Text document


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