The following line of code is accepted: typedef double AlignedDoubleType __attribute__((aligned(16))); However, if I replace 'double' with a template parameter inside a template function, then I get the following error message: error: alignment of array elements is greater than element size I think that the template version of the typedef should be allowed also, as it is in 4.4.
Created attachment 19425 [details] A testcase. To reproduce the error, compile the file (test5.C) with this command line: % g++-4.5 -c test5.C -O3
Also, I just noticed that the error occurs only if -ftree-vectorize is turned on.
It is caused by revision 155246: http://gcc.gnu.org/ml/gcc-cvs/2009-12/msg00390.html
I can't reproduce this with the current 4.5 sources.
(In reply to comment #4) > I can't reproduce this with the current 4.5 sources. > I still saw it with today's gcc 4.5. You need -O3 -msse2 on Linux/x86 to see it.
Subject: Bug 42555 Author: jason Date: Mon Jan 4 17:53:37 2010 New Revision: 155628 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155628 Log: PR c++/42555 * pt.c (tsubst_decl): Don't apply type attributes in place. Added: trunk/gcc/testsuite/g++.dg/ext/attrib35.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
Fixed.
Subject: Bug 42555 Author: hjl Date: Thu Jan 7 22:22:32 2010 New Revision: 155713 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155713 Log: Backport tests from mainline 2010-01-07 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline: 2010-01-06 Richard Guenther <rguenther@suse.de> * gcc.c-torture/compile/pr42632.c: New testcase. 2010-01-05 Martin Jambor <mjambor@suse.cz> PR tree-optimization/42462 * g++.dg/torture/pr42462.C: New test. 2010-01-05 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/42508 * g++.dg/opt/pr42508.C: New test. 2010-01-04 Martin Jambor <mjambor@suse.cz> PR tree-optimization/42398 * gcc.c-torture/compile/pr42398.c: New test. 2010-01-04 Jason Merrill <jason@redhat.com> PR c++/42555 * g++.dg/ext/attrib35.C: New. 2010-01-01 Richard Guenther <rguenther@suse.de> PR c/42570 * gcc.c-torture/execute/pr42570.c: New testcase. 2010-01-01 Richard Guenther <rguenther@suse.de> PR middle-end/42559 * gcc.c-torture/compile/pr42559.c: New testcase. 2009-12-30 Joseph Myers <joseph@codesourcery.com> PR c/42439 * gcc.dg/bitfld-19.c: New test. 2009-12-28 Jason Merrill <jason@redhat.com> PR c++/42447 * g++.dg/template/array21.C: New. Added: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ext/attrib35.C - copied unchanged from r155711, trunk/gcc/testsuite/g++.dg/ext/attrib35.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/opt/pr42508.C - copied unchanged from r155711, trunk/gcc/testsuite/g++.dg/opt/pr42508.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/array21.C - copied unchanged from r155710, trunk/gcc/testsuite/g++.dg/template/array21.C branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr42462.C - copied unchanged from r155711, trunk/gcc/testsuite/g++.dg/torture/pr42462.C branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr42398.c - copied unchanged from r155711, trunk/gcc/testsuite/gcc.c-torture/compile/pr42398.c branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr42559.c - copied unchanged from r155712, trunk/gcc/testsuite/gcc.c-torture/compile/pr42559.c branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr42632.c - copied unchanged from r155710, trunk/gcc/testsuite/gcc.c-torture/compile/pr42632.c branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr42570.c - copied unchanged from r155712, trunk/gcc/testsuite/gcc.c-torture/execute/pr42570.c branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/bitfld-19.c - copied unchanged from r155710, trunk/gcc/testsuite/gcc.dg/bitfld-19.c Modified: branches/gcc-4_4-branch/gcc/testsuite/ChangeLog