public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67054] New: Constructor inheritance with non-default constructible members
@ 2015-07-29 10:37 alltaken380 at gmail dot com
  2015-07-29 15:01 ` [Bug c++/67054] " redi at gcc dot gnu.org
  2021-08-12  1:55 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: alltaken380 at gmail dot com @ 2015-07-29 10:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67054

            Bug ID: 67054
           Summary: Constructor inheritance with non-default constructible
                    members
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alltaken380 at gmail dot com
  Target Milestone: ---

Created attachment 36086
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36086&action=edit
Preprocessed source code

Following code won't compile:

struct NonDefault
{
    NonDefault(int) {}
};

struct Base
{   
    Base(int) {}
};

struct Derived : public Base
{
    NonDefault foo = 4;    

    using Base::Base;
};

auto test()
{
    auto d = Derived{ 5 };
}


$ g++ -std=c++14 -c test.cpp
test.cpp: In function ‘auto test()’:
test.cpp:20:25: error: use of deleted function ‘Derived::Derived(int)’
     auto d = Derived{ 5 };
                         ^
test.cpp:15:17: note: ‘Derived::Derived(int)’ is implicitly deleted because the
default definition would be ill-formed:
     using Base::Base;
                 ^
test.cpp:15:17: error: no matching function for call to
‘NonDefault::NonDefault()’
test.cpp:3:5: note: candidate: NonDefault::NonDefault(int)
     NonDefault(int) {}
     ^
test.cpp:3:5: note:   candidate expects 1 argument, 0 provided
test.cpp:1:8: note: candidate: constexpr NonDefault::NonDefault(const
NonDefault&)
 struct NonDefault
        ^
test.cpp:1:8: note:   candidate expects 1 argument, 0 provided
test.cpp:1:8: note: candidate: constexpr NonDefault::NonDefault(NonDefault&&)
test.cpp:1:8: note:   candidate expects 1 argument, 0 provided


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5.2.0/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.2.0 (GCC)
>From gcc-bugs-return-493635-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 29 10:46:45 2015
Return-Path: <gcc-bugs-return-493635-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25007 invoked by alias); 29 Jul 2015 10:46:45 -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 24953 invoked by uid 48); 29 Jul 2015 10:46:42 -0000
From: "izamyatin at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
Date: Wed, 29 Jul 2015 10:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: izamyatin at gmail dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-66752-4-SxT0S8kVGY@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66752-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66752-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg02525.txt.bz2
Content-length: 416

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf752

Igor Zamyatin <izamyatin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |izamyatin at gmail dot com

--- Comment #13 from Igor Zamyatin <izamyatin at gmail dot com> ---
Why the patch has been reverted?


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

* [Bug c++/67054] Constructor inheritance with non-default constructible members
  2015-07-29 10:37 [Bug c++/67054] New: Constructor inheritance with non-default constructible members alltaken380 at gmail dot com
@ 2015-07-29 15:01 ` redi at gcc dot gnu.org
  2021-08-12  1:55 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-29 15:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67054

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-07-29
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed.

(The testcase is valid C++11 too, except for the unnecessary auto return type.)


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

* [Bug c++/67054] Constructor inheritance with non-default constructible members
  2015-07-29 10:37 [Bug c++/67054] New: Constructor inheritance with non-default constructible members alltaken380 at gmail dot com
  2015-07-29 15:01 ` [Bug c++/67054] " redi at gcc dot gnu.org
@ 2021-08-12  1:55 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12  1:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67054

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |devgs at ukr dot net

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 80851 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2021-08-12  1:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-29 10:37 [Bug c++/67054] New: Constructor inheritance with non-default constructible members alltaken380 at gmail dot com
2015-07-29 15:01 ` [Bug c++/67054] " redi at gcc dot gnu.org
2021-08-12  1:55 ` pinskia 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).