[PATCH] Fix PR80334

Richard Biener rguenther@suse.de
Fri Apr 7 08:45:00 GMT 2017


On Fri, 7 Apr 2017, Rainer Orth wrote:

> Hi Richard,
> 
> >> > Any suggestion how to mitigate that?  Possible solution includes
> >> > adding { target { ! ... } } to dg-do run.
> >> 
> >> No idea.  However, according to gcc-testresults there are other
> >> failures: s390-ibm-inux-gnu and s390x-ibm-linux-gnu so far.
> >> 
> >> This might argue against just excluding a random list of failing targets.
> >
> > Hmm.  Does using __BIGGEST_ALIGNMENT__, thus
> >
> > int
> > main()
> > {
> >   alignas(__BIGGEST_ALIGNMENT__) B b[3];
> > ...
> >
> > work for you?
> 
> it does: the test now PASSes on sparc-sun-solaris2.12 and continues to
> do so in i386-pc-solaris2.12, both 32 and 64-bit.

Tested on x86_64-unknwon-linux-gnu, applied.

Richard.

2017-04-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80334
	* g++.dg/torture/pr80334.C: Use __BIGGEST_ALIGNMENT__ for
	alignas on stack.

Index: gcc/testsuite/g++.dg/torture/pr80334.C
===================================================================
--- gcc/testsuite/g++.dg/torture/pr80334.C	(revision 246752)
+++ gcc/testsuite/g++.dg/torture/pr80334.C	(working copy)
@@ -8,7 +8,7 @@ char x;
 int
 main()
 {
-  alignas(16) B b[3];
+  alignas(__BIGGEST_ALIGNMENT__) B b[3];
   for (int i = 0; i < 3; i++) b[i].unpacked.c = 'a' + i;
   for (int i = 0; i < 3; i++)
     {



More information about the Gcc-patches mailing list