public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
@ 2014-03-25 17:51 doko at gcc dot gnu.org
  2014-03-25 18:50 ` [Bug ipa/60659] " trippels at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2014-03-25 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60659
           Summary: [4.9 Regression] ICE in get_polymorphic_call_info, at
                    ipa-devirt.c:1292
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

Created attachment 32453
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32453&action=edit
preprocessed source

seen with trunk r208764 on powerpc64le-linux-gnu, works with the 4.8 ibm branch
(which is pending the merge to the 4.8 fsf branch)

$ g++ -c -O2 script.ii
In file included from /usr/include/c++/4.9/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/4.9/memory:62,
                 from src/mlib/ptr.h:25,
                 from src/mbase/project/_extlibs_.h:36,
                 from src/mgui/_extlibs_.h:31,
                 from src/mgui/_pc_.h:29,
                 from src/mgui/author/script.cpp:22:
/usr/include/c++/4.9/bits/stl_iterator_base_funcs.h: In function 'typename
std::iterator_traits<_Iterator>::difference_type
std::__distance(_InputIterator, _InputIterator, std::input_iterator_tag) [with
_InputIterator = adobe::iter<boost::intrusive_ptr<Project::VideoMD>,
boost::intrusive_ptr<Project::VideoMD>, long int>; typename
std::iterator_traits<_Iterator>::difference_type = long int]':
/usr/include/c++/4.9/bits/stl_iterator_base_funcs.h:82:4: internal compiler
error: in get_polymorphic_call_info, at ipa-devirt.c:1292
    ++__first;
    ^
Please submit a full bug report,
with preprocessed source if appropriate.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/powerpc64le-linux-gnu/4.9/lto-wrapper
Target: powerpc64le-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9-20140322-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-ppc64el/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-ppc64el
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-ppc64el
--with-arch-directory=ppc64el --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-secureplt --with-cpu=power7 --with-tune=power8
--disable-multilib --enable-multiarch --disable-werror --with-long-double-128
--enable-checking=release --build=powerpc64le-linux-gnu
--host=powerpc64le-linux-gnu --target=powerpc64le-linux-gnu
Thread model: posix
gcc version 4.9.0 20140322 (experimental) [trunk revision 208764] (Ubuntu
4.9-20140322-1ubuntu1)


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
@ 2014-03-25 18:50 ` trippels at gcc dot gnu.org
  2014-03-25 18:57 ` hubicka at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-03-25 18:50 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-25
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |trippels at gcc dot gnu.org
          Component|target                      |ipa
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Also happens on x86_64.

markus@x4 tmp % cat test.ii
template <typename _InputIterator> void __distance (_InputIterator);
template <typename _InputIterator>
void distance (_InputIterator, _InputIterator p2)
{
  __distance (p2);
}

namespace boost
{
template <class Iterator> struct A
{
  typedef typename Iterator::difference_type type;
};
template <class T> typename T::const_iterator end (T &);
template <class T> typename T::const_iterator begin (T &);
template <class T> struct D : A<typename T::const_iterator>
{
};
template <class T> typename D<T>::type distance (const T &p1)
{
  distance (boost::begin (p1), boost::end (p1));
  return 0;
}
template <class IteratorT> class B
{
public:
  typedef B type;
  typedef IteratorT const_iterator;
};
}

typedef int storage_t[];
struct F;
template <template <typename> class> struct G
{
  G (const G &p1) { p1.m_fn1 ().m_fn1 (0); }
  const F &m_fn1 () const
  {
    const void *a;
    a = &data_m;
    return *static_cast<const F *>(a);
  }
  storage_t *data_m;
};

struct F
{
  virtual F *m_fn1 (void *) const;
};
template <typename> struct H;
struct C : G<H>
{
  typedef int difference_type;
};
boost::B<C> AllTransVideos ();
int b = boost::distance (AllTransVideos ());


markus@x4 tmp % g++ -c -O2 test.ii
test.ii: In function ‘void distance(_InputIterator, _InputIterator) [with
_InputIterator = C]’:
test.ii:5:17: internal compiler error: in get_polymorphic_call_info, at
ipa-devirt.c:1292
   __distance (p2);
                 ^
Please submit a full bug report,
>From gcc-bugs-return-447448-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 25 18:55:15 2014
Return-Path: <gcc-bugs-return-447448-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27928 invoked by alias); 25 Mar 2014 18:55: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 27880 invoked by uid 48); 25 Mar 2014 18:55:11 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/60654] format warnings don't work with PROGMEM/PSTR
Date: Tue, 25 Mar 2014 18:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
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: cc
Message-ID: <bug-60654-4-6KGQnUorqP@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60654-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60654-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: 2014-03/txt/msg02317.txt.bz2
Content-length: 414

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`654

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
What is PSTR?  What is PGM_P?


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
  2014-03-25 18:50 ` [Bug ipa/60659] " trippels at gcc dot gnu.org
@ 2014-03-25 18:57 ` hubicka at gcc dot gnu.org
  2014-03-26 12:50 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-03-25 18:57 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |hubicka at gcc dot gnu.org

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Mine. And I was about to declare ipa-devirt to be officially 100% bug free :)


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
  2014-03-25 18:50 ` [Bug ipa/60659] " trippels at gcc dot gnu.org
  2014-03-25 18:57 ` hubicka at gcc dot gnu.org
@ 2014-03-26 12:50 ` rguenth at gcc dot gnu.org
  2014-03-26 13:50 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-26 12:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-03-26 12:50 ` rguenth at gcc dot gnu.org
@ 2014-03-26 13:50 ` jakub at gcc dot gnu.org
  2014-03-28 20:10 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-26 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r205019.


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-03-26 13:50 ` jakub at gcc dot gnu.org
@ 2014-03-28 20:10 ` hubicka at gcc dot gnu.org
  2014-03-31  4:54 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-03-28 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, this is ICE on type inconsistent program (it looks up virtual function in
non-virtual type). I forgot gcc_unreacable on that code path from earlier
sanity checking.
I will arrange such inconsistent calls to be builtin_unreachable.


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-03-28 20:10 ` hubicka at gcc dot gnu.org
@ 2014-03-31  4:54 ` hubicka at gcc dot gnu.org
  2014-03-31  9:57 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-03-31  4:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 32494
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32494&action=edit
Patch I am testing

This is patch that makes us to redirect those type inconsistent calls to
builtin_unreachable.  It seems to match surprisingly often on firefox, so I
will try to also test libreoffice's unit tests before comiting.


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-03-31  4:54 ` hubicka at gcc dot gnu.org
@ 2014-03-31  9:57 ` rguenth at gcc dot gnu.org
  2014-04-03  3:56 ` hubicka at gcc dot gnu.org
  2014-04-03  5:59 ` trippels at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-31  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-03-31  9:57 ` rguenth at gcc dot gnu.org
@ 2014-04-03  3:56 ` hubicka at gcc dot gnu.org
  2014-04-03  5:59 ` trippels at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-04-03  3:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Thu Apr  3 03:55:59 2014
New Revision: 209048

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

    PR ipa/60659
    * ipa-devirt.c (get_polymorphic_call_info): Do not ICE on type inconsistent
    code and instead mark the context inconsistent.
    (possible_polymorphic_call_targets): For inconsistent contexts
    return empty complete list.
    * testsuite/g++.dg/torture/pr60659.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr60659.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-devirt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug ipa/60659] [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292
  2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-04-03  3:56 ` hubicka at gcc dot gnu.org
@ 2014-04-03  5:59 ` trippels at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-04-03  5:59 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2014-04-03  5:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 17:51 [Bug target/60659] New: [4.9 Regression] ICE in get_polymorphic_call_info, at ipa-devirt.c:1292 doko at gcc dot gnu.org
2014-03-25 18:50 ` [Bug ipa/60659] " trippels at gcc dot gnu.org
2014-03-25 18:57 ` hubicka at gcc dot gnu.org
2014-03-26 12:50 ` rguenth at gcc dot gnu.org
2014-03-26 13:50 ` jakub at gcc dot gnu.org
2014-03-28 20:10 ` hubicka at gcc dot gnu.org
2014-03-31  4:54 ` hubicka at gcc dot gnu.org
2014-03-31  9:57 ` rguenth at gcc dot gnu.org
2014-04-03  3:56 ` hubicka at gcc dot gnu.org
2014-04-03  5:59 ` trippels 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).