public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Re: [c++-concepts] Fix assertion failure with cp_maybe_constrained_type_specifier
@ 2014-06-24 19:27 Ed Smith-Rowland
  2014-06-25 14:03 ` Andrew Sutton
  0 siblings, 1 reply; 16+ messages in thread
From: Ed Smith-Rowland @ 2014-06-24 19:27 UTC (permalink / raw)
  To: andrew.n.sutton, 3dw4rd; +Cc: gcc-patches, admin

 
 

On 06/24/14, Andrew Sutton wrote:

Weird. Any chance you're doing a bootstrap build?

There was an earlier bootstrapping issue with this branch. We had
turned on -std=c++1y by default, and it was causing some conversion
errors with lvalue references to bitfields in libasan.

This doesn't *look* like a regression caused by concepts -- I don't
think I'm touching the initializer code at all.

Andrew Sutton


Andrew,

I did a full 3-stage bootstrap which is the default these days.
I'll try --disable-bootstrap and see what happens.

In other news: I think the lvalue to bitfield issue is resolved in 4.9 and trunk.
Note to self: Add a testcase for that if not done already.

Ed

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [c++-concepts] Fix assertion failure with cp_maybe_constrained_type_specifier
@ 2014-06-24 12:07 Ed Smith-Rowland
  2014-06-24 12:28 ` Andrew Sutton
  0 siblings, 1 reply; 16+ messages in thread
From: Ed Smith-Rowland @ 2014-06-24 12:07 UTC (permalink / raw)
  To: gcc-patches, Andrew Sutton, admin

I saw this during bootstrap.  I've verified that the patch works (I was 
working on similar).

Ed

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [c++-concepts] Fix assertion failure with cp_maybe_constrained_type_specifier
@ 2014-06-17  8:54 Braden Obrzut
  2014-06-24 11:40 ` Andrew Sutton
  0 siblings, 1 reply; 16+ messages in thread
From: Braden Obrzut @ 2014-06-17  8:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Sutton

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

cp_maybe_constrained_type_specifier asserted that the decl passed in 
would be of type OVERLOAD, however a clean build of the compiler was 
broken since it could also be a BASELINK.  I'm not entirely sure when 
this is the case, except that it seems to happen with class member 
templates as it also caused a test case in my next patch to fail.  The 
solution is to check for a BASELINK and extract the functions from it.

The possibility of decl being a BASELINK is asserted near the call in 
cp_parser_template_id (cp_maybe_partial_concept_id just calls the 
function in question at this time).

2014-06-17  Braden Obrzut  <admin@maniacsvault.net>
     * gcc/cp/parser.c (cp_maybe_constrained_type_specifier): Fix assertion
     failure if baselink was passed in as decl.


[-- Attachment #2: baselink-fix.diff --]
[-- Type: text/x-patch, Size: 479 bytes --]

diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 1eaf863..40d1d63 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -15175,6 +15175,9 @@ cp_parser_allows_constrained_type_specifier (cp_parser *parser)
 static tree
 cp_maybe_constrained_type_specifier (cp_parser *parser, tree decl, tree args)
 {
+  if (BASELINK_P (decl))
+    decl = BASELINK_FUNCTIONS (decl);
+
   gcc_assert (TREE_CODE (decl) == OVERLOAD);
   gcc_assert (args ? TREE_CODE (args) == TREE_VEC : true);
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-06-27 20:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-24 19:27 Re: [c++-concepts] Fix assertion failure with cp_maybe_constrained_type_specifier Ed Smith-Rowland
2014-06-25 14:03 ` Andrew Sutton
2014-06-26 15:15   ` Ed Smith-Rowland
2014-06-26 16:23     ` Jason Merrill
2014-06-26 18:16       ` Jason Merrill
2014-06-27  1:38         ` Ed Smith-Rowland
2014-06-27  3:28           ` Jason Merrill
2014-06-27 13:41             ` Ed Smith-Rowland
2014-06-27 20:41               ` Jason Merrill
  -- strict thread matches above, loose matches on Subject: below --
2014-06-24 12:07 Ed Smith-Rowland
2014-06-24 12:28 ` Andrew Sutton
2014-06-24 15:31   ` Ed Smith-Rowland
2014-06-24 15:43     ` Ed Smith-Rowland
2014-06-24 16:16       ` Andrew Sutton
2014-06-17  8:54 Braden Obrzut
2014-06-24 11:40 ` Andrew Sutton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).