public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57196] New: [4.8 regression] Bogus "aggregate ... has incomplete type and cannot be defined"
@ 2013-05-07 19:58 ppluzhnikov at google dot com
  2013-05-07 20:52 ` [Bug c++/57196] " daniel.kruegler at googlemail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2013-05-07 19:58 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57196

             Bug #: 57196
           Summary: [4.8 regression] Bogus "aggregate ... has incomplete
                    type and cannot be defined"
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ppluzhnikov@google.com


Google ref: b/8853908

Test case reduced from gUnit.

#include <set>
#include <string>

using std::set;
using std::string;

int& IsNullLiteralHelper(...);

template <size_t> struct EqHelper { };

void Fn() {
  EqHelper<sizeof IsNullLiteralHelper(set<int>{1})>        eq1;  // ok
  EqHelper<sizeof IsNullLiteralHelper(set<string>())>      eq2;  // ok
  EqHelper<sizeof IsNullLiteralHelper(set<string>{"foo"})> eq3;  // error
}


Using trunk built at r198689:


g++  -std=c++11 -c tt.cc
tt.cc: In function ‘void Fn()’:
tt.cc:14:60: error: aggregate ‘EqHelper<sizeof
(IsNullLiteralHelper(std::set<std::basic_string<char>
>(std::initializer_list<std::basic_string<char> >{((const
std::basic_string<char>*)(& const std::basic_string<char>
[1]{std::basic_string<char>(((const char*)"foo"), (*(const
std::allocator<char>*)(& std::allocator<char>())))})), 1u}, (*(const
std::less<std::basic_string<char> >*)(& std::less<std::basic_string<char>
>())), (*(const std::allocator<std::basic_string<char> >*)(&
std::allocator<std::basic_string<char> >())))))> eq3’ has incomplete type and
cannot be defined
   EqHelper<sizeof IsNullLiteralHelper(set<string>{"foo"})> eq3;
                                                            ^
>From gcc-bugs-return-421775-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue May 07 20:11:15 2013
Return-Path: <gcc-bugs-return-421775-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7076 invoked by alias); 7 May 2013 20:11:15 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7023 invoked by uid 48); 7 May 2013 20:11:10 -0000
From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
Date: Tue, 07 May 2013 20:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: wschmidt at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Changed-Fields: Status CC Resolution
Message-ID: <bug-57192-4-T9dfzam3oA@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57192-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57192-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg00448.txt.bz2
Content-length: 796


http://gcc.gnu.org/bugzilla/show_bug.cgi?idW192

Bill Schmidt <wschmidt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |wschmidt at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #6 from Bill Schmidt <wschmidt at gcc dot gnu.org> 2013-05-07 20:11:09 UTC ---
OK, thanks!  Current trunk has a half-good fix that I put in this morning.  The
proposed patch fixes it the right way.  Good to hear that both versions appear
to solve this problem!

Closing as resolved.  Please feel free to re-open if the problem comes back.


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

end of thread, other threads:[~2013-05-13 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07 19:58 [Bug c++/57196] New: [4.8 regression] Bogus "aggregate ... has incomplete type and cannot be defined" ppluzhnikov at google dot com
2013-05-07 20:52 ` [Bug c++/57196] " daniel.kruegler at googlemail dot com
2013-05-10 14:32 ` jason at gcc dot gnu.org
2013-05-13 19:34 ` jason at gcc dot gnu.org

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).