public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51141] New: [4.7 regression] rev181359 causes Chromium build failure
@ 2011-11-15 14:10 markus at trippelsdorf dot de
  2011-11-15 15:16 ` [Bug c++/51141] " fabien at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-15 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51141
           Summary: [4.7 regression] rev181359 causes Chromium build
                    failure
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


Please consider:

 % cat test.ii
typedef int size_t;
template < size_t, size_t > struct AlignedBuffer;
template < size_t size > struct AlignedBuffer 
         < size, 8 > {
};

template < typename > class VectorBufferBase
{
public:
    allocateBuffer (size_t) {
    }
    buffer () {
    }
    *m_buffer;
    size_t m_capacity;
};

template < typename T, size_t > class VectorBuffer:VectorBufferBase < T >
{
    typedef VectorBufferBase < T > Base;

public:
    VectorBuffer () {
    }
    allocateBuffer (size_t) {
        m_capacity = 0;
    }
    Base::buffer;
    Base::m_buffer;
    Base::m_capacity;
    size_t m_inlineBufferSize;

    AlignedBuffer < 0, __alignof__ (T) > m_inlineBuffer;
};

template < typename T, size_t > class Vector
{
    typedef VectorBuffer < T,
            0 > Buffer;
public:
    void shrinkCapacity (size_t);

    clear () {
        shrinkCapacity (0);
    }
    Buffer m_buffer;
};

template < typename T, size_t inlineCapacity > void Vector < T,
         inlineCapacity >::shrinkCapacity (size_t)
{
    m_buffer.allocateBuffer (0);
}

struct PatternDisjunction;
struct YarrPattern {
    reset () {
        m_disjunctions.clear ();
    }
    Vector < PatternDisjunction *, 0 > m_disjunctions;
};

 % g++ -S -fpermissive -w -Werror -O0 -pipe -c test.ii -o /dev/null
test.ii: In instantiation of ‘int VectorBuffer<T, <anonymous>
>::allocateBuffer(size_t) [with T = PatternDisjunction*; int <anonymous> = 0;
size_t = int]’:
test.ii:52:5:   required from ‘void Vector<T, <anonymous>
>::shrinkCapacity(size_t) [with T = PatternDisjunction*; int <anonymous> = 0;
size_t = int]’
test.ii:44:9:   required from ‘int Vector<T, <anonymous> >::clear() [with T =
PatternDisjunction*; int <anonymous> = 0]’
test.ii:58:31:   required from here
test.ii:26:9: error: no match for ‘operator=’ in ‘#‘using_decl’ not supported
by dump_expr#<expression error> = 0’
test.ii:26:9: note: candidate is:
test.ii:7:29: note: VectorBufferBase<PatternDisjunction*>&
VectorBufferBase<PatternDisjunction*>::operator=(const
VectorBufferBase<PatternDisjunction*>&)
test.ii:7:29: note:   no known conversion for argument 1 from ‘int’ to ‘const
VectorBufferBase<PatternDisjunction*>&’


This happens because of:
commit 807f85cfb63c455ad591e9786293e05fe725b9ab
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Nov 14 17:55:57 2011 +0000

        PR c++/6936
        PR c++/25994
        PR c++/26256
        PR c++/30195
        * search.c (lookup_field_1): Look through USING_DECL.
        (lookup_field_r): Call lookup_fnfields_slot instead of
        lookup_fnfields_1.
        * semantics.c (finish_member_declaration): Remove the check that
        prevents USING_DECLs from being verified by
        pushdecl_class_level. Call add_method for using declarations that
        designates functions if the using declaration is in a template
        class. Set DECL_IGNORED_P on class-scope using declarations.
        * typeck.c (build_class_member_access_expr): Handle USING_DECLs.
        * class.c (check_field_decls): Keep using declarations.
        (add_method): Remove two diagnostics about conflicting using
        declarations.
        * parser.c (cp_parser_nonclass_name): Handle USING_DECLs.
        * decl.c (start_enum): Call xref_tag whenever possible.
        * cp-tree.h (strip_using_decl): Declare, and reident the previous
        function.
        * name-lookup.c (strip_using_decl): New function.
        (supplement_binding_1): Call strip_using_decl on decl and
        bval. Perform most of the checks with USING_DECLs stripped.  Also
        check that the target decl and the target bval does not refer to
        the same declaration. Allow pushing an enum multiple times in a
        template class. Adjustment to diagnose using redeclarations. Call
        diagnose_name_conflict.
        (push_class_level_binding): Call strip_using_decl on decl and
        bval. Perform most of the checks with USING_DECLs stripped. Return
        true if both decl and bval refer to USING_DECLs and are dependent.
        (diagnose_name_conflict): New function.

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181359
138bc75d-0d04-0410-961f-82ee72b054a4


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

* [Bug c++/51141] [4.7 regression] rev181359 causes Chromium build failure
  2011-11-15 14:10 [Bug c++/51141] New: [4.7 regression] rev181359 causes Chromium build failure markus at trippelsdorf dot de
@ 2011-11-15 15:16 ` fabien at gcc dot gnu.org
  2011-11-16 14:19 ` fabien at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fabien at gcc dot gnu.org @ 2011-11-15 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |fabien at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #1 from fabien at gcc dot gnu.org 2011-11-15 14:29:26 UTC ---
I'll look into it this evening.


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

* [Bug c++/51141] [4.7 regression] rev181359 causes Chromium build failure
  2011-11-15 14:10 [Bug c++/51141] New: [4.7 regression] rev181359 causes Chromium build failure markus at trippelsdorf dot de
  2011-11-15 15:16 ` [Bug c++/51141] " fabien at gcc dot gnu.org
@ 2011-11-16 14:19 ` fabien at gcc dot gnu.org
  2011-11-17 21:11 ` fabien at gcc dot gnu.org
  2011-11-18 19:04 ` fabien at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: fabien at gcc dot gnu.org @ 2011-11-16 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-11-16
     Ever Confirmed|0                           |1

--- Comment #2 from fabien at gcc dot gnu.org 2011-11-16 13:51:26 UTC ---
Confirmed. I am testing a patch...


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

* [Bug c++/51141] [4.7 regression] rev181359 causes Chromium build failure
  2011-11-15 14:10 [Bug c++/51141] New: [4.7 regression] rev181359 causes Chromium build failure markus at trippelsdorf dot de
  2011-11-15 15:16 ` [Bug c++/51141] " fabien at gcc dot gnu.org
  2011-11-16 14:19 ` fabien at gcc dot gnu.org
@ 2011-11-17 21:11 ` fabien at gcc dot gnu.org
  2011-11-18 19:04 ` fabien at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: fabien at gcc dot gnu.org @ 2011-11-17 21:11 UTC (permalink / raw)
  To: gcc-bugs

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

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #3 from fabien at gcc dot gnu.org 2011-11-17 21:01:06 UTC ---
Marked as duplicate.

*** This bug has been marked as a duplicate of bug 51188 ***


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

* [Bug c++/51141] [4.7 regression] rev181359 causes Chromium build failure
  2011-11-15 14:10 [Bug c++/51141] New: [4.7 regression] rev181359 causes Chromium build failure markus at trippelsdorf dot de
                   ` (2 preceding siblings ...)
  2011-11-17 21:11 ` fabien at gcc dot gnu.org
@ 2011-11-18 19:04 ` fabien at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: fabien at gcc dot gnu.org @ 2011-11-18 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from fabien at gcc dot gnu.org 2011-11-18 18:44:25 UTC ---
Author: fabien
Date: Fri Nov 18 18:44:23 2011
New Revision: 181490

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181490
Log:
gcc/testsuite/ChangeLog

2011-11-18  Fabien Chene  <fabien@gcc.gnu.org>

    PR c++/51141
    * g++.dg/lookup/using46.C: New.
    * g++.dg/lookup/using47.C: New.
    * g++.dg/lookup/using48.C: New.
    * g++.dg/lookup/using49.C: New.
    * g++.dg/lookup/using50.C: New.

gcc/cp/ChangeLog

2011-11-18  Fabien Chene  <fabien@gcc.gnu.org>

    PR c++/51141
    * search.c (lookup_field_1): Handle USING_DECLs for the storted
    case.

Added:
    trunk/gcc/testsuite/g++.dg/debug/using6.C
    trunk/gcc/testsuite/g++.dg/lookup/using46.C
    trunk/gcc/testsuite/g++.dg/lookup/using47.C
    trunk/gcc/testsuite/g++.dg/lookup/using48.C
    trunk/gcc/testsuite/g++.dg/lookup/using49.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/search.c
    trunk/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2011-11-18 18:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-15 14:10 [Bug c++/51141] New: [4.7 regression] rev181359 causes Chromium build failure markus at trippelsdorf dot de
2011-11-15 15:16 ` [Bug c++/51141] " fabien at gcc dot gnu.org
2011-11-16 14:19 ` fabien at gcc dot gnu.org
2011-11-17 21:11 ` fabien at gcc dot gnu.org
2011-11-18 19:04 ` fabien 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).