[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2022-01-27 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

--- Comment #12 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:66b86171188dcb61d2d0e0a4a98a7467e58a84a7

commit r12-6904-g66b86171188dcb61d2d0e0a4a98a7467e58a84a7
Author: Jason Merrill 
Date:   Thu Jan 27 16:12:18 2022 -0500

c++: dependent and non-dependent attributes [PR104245]

A flaw in my patch for PR51344 was that cplus_decl_attributes calls
decl_attributes after save_template_attributes, which messes up the
ordering
that save_template_attributes set up.  Fixed by splitting
save_template_attributes around the call to decl_attributes.

PR c++/104245
PR c++/51344

gcc/cp/ChangeLog:

* decl2.cc (save_template_attributes): Take late attrs as parm.
(cplus_decl_attributes): Call it after decl_attributes,
splice_template_attributes before.

gcc/testsuite/ChangeLog:

* g++.dg/lto/alignas1_0.C: New test.

[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2021-04-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

--- Comment #11 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:a0fdff3cf33f72848d3f894272431a5d49fe6a16

commit r12-299-ga0fdff3cf33f72848d3f894272431a5d49fe6a16
Author: Jason Merrill 
Date:   Fri Feb 5 10:36:49 2021 -0500

c++: Fix friend attributes [PR51344]

51344 was a problem with calling save_template_attributes twice for the
same
friend function: once from do_friend and once from grokmethod.  The 2012
patch for the bug avoided creating an infinite loop when this happens, but
it's better to avoid the duplication in the first place.  This also
restores
the dependent attributes to the beginning of the attribute list, as
originally intended.  And then apply_late_template_attributes can avoid
copying the non-dependent attributes.

gcc/cp/ChangeLog:

PR c++/51344
* decl2.c (grokfield): Call cplus_decl_attributes for friend.
(save_template_attributes): Use chainon.
* friend.c (do_friend): Remove attrlist parm.
* cp-tree.h (do_friend): Adjust.
* class.c (add_implicitly_declared_members): Adjust.
* decl.c (grokdeclarator): Adjust.
* pt.c (apply_late_template_attributes): Optimize.

[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2012-01-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||rejects-valid
   Priority|P3  |P2
   Target Milestone|--- |4.4.7


[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2012-01-19 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

--- Comment #6 from Kai Tietz ktietz at gcc dot gnu.org 2012-01-19 22:15:30 
UTC ---
Author: ktietz
Date: Thu Jan 19 22:15:26 2012
New Revision: 183313

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=183313
Log:
2012-01-19  Kai Tietz  kti...@redhat.com

PR c++/51344
* decl2.c (save_template_attributes): Use merge_attributes
instead of chaining up via TREE_CHAIN.

2012-01-19  Kai Tietz  kti...@redhat.com

* g++.dg/torture/pr51344.C: New test.


Added:
trunk/gcc/testsuite/g++.dg/torture/pr51344.C   (with props)
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/g++.dg/torture/pr51344.C
('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/g++.dg/torture/pr51344.C
('svn:mime-type' added)


[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2012-01-19 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

--- Comment #7 from Kai Tietz ktietz at gcc dot gnu.org 2012-01-19 22:34:35 
UTC ---
Author: ktietz
Date: Thu Jan 19 22:34:29 2012
New Revision: 183315

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=183315
Log:
Backport from trunk
PR c++/51344
* decl2.c (save_template_attributes): Use merge_attributes
instead of chaining up via TREE_CHAIN.

* g++.dg/torture/pr51344.C: New test.

Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/torture/pr51344.C   (with
props)
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/decl2.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog

Propchange: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/torture/pr51344.C
('svn:eol-style' added)

Propchange: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/torture/pr51344.C
('svn:mime-type' added)


[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2012-01-19 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

--- Comment #8 from Kai Tietz ktietz at gcc dot gnu.org 2012-01-19 22:57:39 
UTC ---
Author: ktietz
Date: Thu Jan 19 22:57:31 2012
New Revision: 183318

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=183318
Log:
Backmerged from trunk
PR c++/51344
* decl2.c (save_template_attributes): Use merge_attributes
instead of chaining up via TREE_CHAIN.

* g++.dg/torture/pr51344.C: New test.


Added:
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/torture/pr51344.C
Modified:
branches/gcc-4_5-branch/gcc/cp/ChangeLog
branches/gcc-4_5-branch/gcc/cp/decl2.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2012-01-19 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

--- Comment #9 from Kai Tietz ktietz at gcc dot gnu.org 2012-01-19 23:07:09 
UTC ---
Author: ktietz
Date: Thu Jan 19 23:07:01 2012
New Revision: 183319

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=183319
Log:
Backmerged from trunk
PR c++/51344
* decl2.c (save_template_attributes): Use merge_attributes
instead of chaining up via TREE_CHAIN.

* g++.dg/torture/pr51344.C: New test.

Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr51344.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/decl2.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2012-01-19 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #10 from Kai Tietz ktietz at gcc dot gnu.org 2012-01-19 23:09:04 
UTC ---
Fixed.


[Bug c++/51344] [4.4/4.5/4.6/4.7 regression] cc1plus hangs when compiling

2012-01-18 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51344

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
  Known to work||4.2.5
Summary|cc1plus hangs when  |[4.4/4.5/4.6/4.7
   |compiling   |regression] cc1plus hangs
   ||when compiling
  Known to fail||4.3.6, 4.4.7, 4.5.4, 4.6.3,
   ||4.7.0

--- Comment #5 from Jason Merrill jason at gcc dot gnu.org 2012-01-18 
20:06:48 UTC ---
The testcase compiles in 4.2; I think that is because we silently ignored the
attribute.