public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/64688] [4.9 Regression] internal compiler error: Max. number of generated reload insns per insn is achieved (90)
Date: Wed, 22 Apr 2015 12:22:00 -0000	[thread overview]
Message-ID: <bug-64688-4-cptrYDeiVG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64688-4@http.gcc.gnu.org/bugzilla/>

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|5.2                         |4.9.3

--- Comment #21 from Uroš Bizjak <ubizjak at gmail dot com> ---
Backport was committed some time ago.
>From gcc-bugs-return-484345-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 22 12:35:48 2015
Return-Path: <gcc-bugs-return-484345-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 87145 invoked by alias); 22 Apr 2015 12:35:48 -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 87097 invoked by uid 48); 22 Apr 2015 12:35:42 -0000
From: "laszlo.bodor at citi dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65845] New: typeid doesn't work consistently on pure virtual classes
Date: Wed, 22 Apr 2015 12:35: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: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: laszlo.bodor at citi 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
Message-ID: <bug-65845-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-04/txt/msg01897.txt.bz2
Content-length: 2210

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

            Bug ID: 65845
           Summary: typeid doesn't work consistently on pure virtual
                    classes
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: laszlo.bodor at citi dot com

#include <typeinfo>

class Interface {
public:
  virtual int size() const = 0;
};

template <class T>
class Vector {
public:
  void resize(unsigned n, T val = T()); //C++03 style resize
//  void resize(unsigned n, const T& val); //C++11 style resize
private:
  T* data;
};

int main()
{
  typeid(Interface).name();
  typeid(Interface()).name(); //GCC 4.9.2 and VS2013: doesn't compile

  typedef Interface* PtrInterf;
  PtrInterf p1 = 0;
  typeid(PtrInterf).name();
  typeid(PtrInterf()).name();
  typeid(p1).name();

  //typeid(Vector<Interface>).name(); //GCC 4.9.2 and icc 13.0.1: doesn't
compile
  typeid(Vector<Interface>()).name();

  typedef Vector<Interface>* PtrVecInterf;
  PtrVecInterf p2 = 0;
  typeid(PtrVecInterf).name(); //GCC 4.9.2: doesn't compile
  typeid(PtrVecInterf()).name();
  typeid(p2).name(); //GCC 4.9.2: doesn't compile

  return 0;
}

Compiler version:

Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.9.2/configure --disable-nls --prefix=/home/gcc4.9
--with-gnu-as --with-gnu-ld --enable-languages=c,c++,fortran --disable-multilib
--with-system-zlib --enable-checking=release --enable-__cxa_atexit
Thread model: posix
gcc version 4.9.2 (GCC)

and

Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-src/configure --disable-nls --prefix=/home/gcc5-trunk
--with-gnu-as --with-gnu-ld --enable-languages=c,c++,fortran --disable-multilib
--with-system-zlib --enable-checking=release --enable-__cxa_atexit
Thread model: posix
gcc version 6.0.0 20150421 (experimental) (GCC)


Description:
The above code compiles on GCC 4.7.3, but it doesn't compile on GCC 4.9.2 and
on a recent GCC trunk. Clang 3.7 compiles the code.
The standard doesn't seem to be very clear on this issue but we would prefer if
typeid work as many cases as possible.


      parent reply	other threads:[~2015-04-22 12:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 12:34 [Bug target/64688] New: " trippels at gcc dot gnu.org
2015-01-20 16:50 ` [Bug target/64688] [5 Regression] " jakub at gcc dot gnu.org
2015-01-21 20:52 ` vmakarov at gcc dot gnu.org
2015-01-22  8:09 ` ubizjak at gmail dot com
2015-01-22 14:45 ` uros at gcc dot gnu.org
2015-01-22 20:26 ` uros at gcc dot gnu.org
2015-01-23 23:05 ` jakub at gcc dot gnu.org
2015-01-24 10:31 ` trippels at gcc dot gnu.org
2015-01-24 10:40 ` trippels at gcc dot gnu.org
2015-01-24 10:42 ` ubizjak at gmail dot com
2015-01-24 14:40 ` trippels at gcc dot gnu.org
2015-01-25 16:00 ` [Bug rtl-optimization/64688] " ubizjak at gmail dot com
2015-01-30 22:23 ` [Bug rtl-optimization/64688] [4.9/5 " vmakarov at gcc dot gnu.org
2015-01-31  2:48 ` law at redhat dot com
2015-01-31  7:18 ` trippels at gcc dot gnu.org
2015-01-31  8:53 ` [Bug rtl-optimization/64688] [4.9 " jakub at gcc dot gnu.org
2015-02-03 16:31 ` law at redhat dot com
2015-02-04 18:26 ` vmakarov at gcc dot gnu.org
2015-03-27 20:13 ` vmakarov at gcc dot gnu.org
2015-04-22 12:02 ` jakub at gcc dot gnu.org
2015-04-22 12:22 ` ubizjak at gmail dot com [this message]

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-64688-4-cptrYDeiVG@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).