public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "webmatematika at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65291] protected using constructor default arguments not recognized
Date: Tue, 03 Mar 2015 05:26:00 -0000	[thread overview]
Message-ID: <bug-65291-4-5MiCbF2lPr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65291-4@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5222 bytes --]

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

--- Comment #1 from webmatematika at hotmail dot com ---
Here is compile error output:  

(I added in c.cpp line 4 "public:" in class C)





voja@vojaws:~/coding$ gcc c.cpp -std=c++11
c.cpp: In constructor ‘C::C()’:
c.cpp:5:11: error: no matching function for call to ‘B::B()’
   C() : B() {}
           ^
c.cpp:5:11: note: candidates are:
In file included from c.cpp:1:0:
b.h:7:12: note: B::B(int)
   using A::A;
            ^
b.h:7:12: note:   candidate expects 1 argument, 0 provided
b.h:5:3: note: B::B(int, int)
   B(int b1, int b2) : A(b1) {}
   ^
b.h:5:3: note:   candidate expects 2 arguments, 0 provided
b.h:3:7: note: constexpr B::B(const B&)
 class B : public A {
       ^
b.h:3:7: note:   candidate expects 1 argument, 0 provided
b.h:3:7: note: constexpr B::B(B&&)
b.h:3:7: note:   candidate expects 1 argument, 0 provided
>From gcc-bugs-return-479100-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 03 05:48:40 2015
Return-Path: <gcc-bugs-return-479100-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14246 invoked by alias); 3 Mar 2015 05:48:40 -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 14229 invoked by uid 48); 3 Mar 2015 05:48:37 -0000
From: "raj.khem at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65292] New: Template function not emitted
Date: Tue, 03 Mar 2015 05:48:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: raj.khem at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-65292-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-03/txt/msg00244.txt.bz2
Content-length: 2494

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

            Bug ID: 65292
           Summary: Template function not emitted
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raj.khem at gmail dot com

Created attachment 34932
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4932&actioníit
testcase

Attached code from webkit, shows that when compiling it for arm with gcc -O2, a
function goes missing in the object file

   case NonArrayWithInt32: case ArrayWithInt32: {
        putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i,
value);
        break;
    }

    case NonArrayWithDouble: case ArrayWithDouble: {
        putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i,
value);
        break;
    }

    case NonArrayWithContiguous: case ArrayWithContiguous: {
        putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i,
value);
        break;
    }

Out of those calls, putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>
is not emitted into .s file, when compiled with -O1 the function is emitted


This problem is not happening on 4.8.x or 4.9.x

gcc-5.0 - O2
=============
readelf -sW JSObject.o | c++filt | grep
putByIndexBeyondVectorLengthWithoutAttributes
   298: 00000000   284 FUNC    WEAK   HIDDEN    43 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)22>(JSC::ExecState*, unsigned int, JSC::JSValue)
   300: 00000000   264 FUNC    WEAK   HIDDEN    45 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)26>(JSC::ExecState*, unsigned int, JSC::JSValue)

gcc-5.0 - O1
===========
readelf -sW a.o | c++filt | grep putByIndexBeyondVectorLengthWithoutAttributes
   505: 00000000   224 FUNC    WEAK   DEFAULT  128 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)20>(JSC::ExecState*, unsigned int, JSC::JSValue)
   507: 00000000   252 FUNC    WEAK   DEFAULT  138 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)22>(JSC::ExecState*, unsigned int, JSC::JSValue)
   510: 00000000   224 FUNC    WEAK   DEFAULT  147 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)26>(JSC::ExecState*, unsigned int, JSC::JSValue)


version I am at is gcc version 5.0.0 20150301 (experimental) (GCC)


  reply	other threads:[~2015-03-03  5:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03  5:17 [Bug c++/65291] New: " webmatematika at hotmail dot com
2015-03-03  5:26 ` webmatematika at hotmail dot com [this message]
2015-03-03 12:51 ` [Bug c++/65291] mention that default arguments of constructors are not inherited manu at gcc dot gnu.org
2015-03-03 14:26 ` redi at gcc dot gnu.org
2015-03-03 16:43 ` redi at gcc dot gnu.org
2015-03-03 16:55 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65291-4-5MiCbF2lPr@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).