public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0)
@ 2011-04-12 14:15 vincenzo.innocente at cern dot ch
  2011-04-12 14:49 ` [Bug c++/48574] " rguenth at gcc dot gnu.org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-04-12 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE (regression w.r.t. 4.6.0)
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincenzo.innocente@cern.ch


Created attachment 23963
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23963
unfiltered source file (after preprocessor) requires -mavx to compile

with 
data/newusr/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/data/newusr/bin/g++
COLLECT_LTO_WRAPPER=/data/newusr/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/data/newusr -enable-gold=yes
--enable-lto --with-fpmath=avx --with-build-config=bootstrap-lto
--with-gmp-lib=/usr/local/lib64 --with-mpfr-lib=/usr/local/lib64
-with-mpc-lib=/usr/local/lib64
Thread model: posix
gcc version 4.6.1 20110408 (prerelease) (GCC) 

(and 20110401) 

I get
/data/newusr/bin/g++ -c produceICE.ii -std=c++0x -Wall -mavx
In file included from
/data/CMSSW_4_2_0_pre6/src/CommonTools/RecoAlgos/plugins/EtaPtMinGsfElectronFullCloneSelector.cc:16:0:
/data/CMSSW_4_2_0_pre6/src/CommonTools/RecoAlgos/interface/GsfElectronSelector.h:
In member function 'void
helper::GsfElectronCollectionStoreManager::cloneAndStore(const I&, const I&,
edm::Event&)':
/data/CMSSW_4_2_0_pre6/src/CommonTools/RecoAlgos/interface/GsfElectronSelector.h:49:60:
internal compiler error: Segmentation fault

This the first serious ICE I got compiling many 1000 of source units.

It compiles fine with
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/build/460e/slc5_amd64_gcc460/external/gcc/4.6.0/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure
--prefix=/build/460e/slc5_amd64_gcc460/external/gcc/4.6.0
--enable-languages=c,c++,fortran
--with-gmp=/build/460e/slc5_amd64_gcc460/external/gcc/4.6.0
--with-mpfr=/build/460e/slc5_amd64_gcc460/external/gcc/4.6.0
--with-mpc=/build/460e/slc5_amd64_gcc460/external/gcc/4.6.0
--with-ppl=/build/460e/slc5_amd64_gcc460/external/gcc/4.6.0
--with-cloog=/build/460e/slc5_amd64_gcc460/external/gcc/4.6.0
--enable-cloog-backend=isl --enable-shared CC='gcc -fPIC' CXX='c++ -fPIC'
Thread model: posix
gcc version 4.6.0 (GCC)


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

* [Bug c++/48574] ICE (regression w.r.t. 4.6.0)
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
@ 2011-04-12 14:49 ` rguenth at gcc dot gnu.org
  2011-04-12 14:52 ` [Bug c++/48574] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-12 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.04.12 14:49:18
      Known to work|                            |4.6.0
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-12 14:49:18 UTC ---
Confirmed.  Works with r171596.

#0  0x00000000005fad6b in fixed_type_or_null (instance=0x7fffeb1116c0, 
    nonnull=0x0, cdtorp=0x7fffffffb25c)
    at /space/rguenther/src/svn/gcc-4_6-branch/gcc/cp/class.c:5828
#1  0x00000000005fc452 in fixed_type_or_null (instance=0x7fffeb10c460, 
    nonnull=0x0, cdtorp=0x7fffffffb25c)
    at /space/rguenther/src/svn/gcc-4_6-branch/gcc/cp/class.c:5947
#2  0x00000000005fae8e in fixed_type_or_null (instance=0x7fffeb111900, 
    nonnull=0x0, cdtorp=0x7fffffffb25c)
    at /space/rguenther/src/svn/gcc-4_6-branch/gcc/cp/class.c:5831
#3  0x00000000005fc5a9 in resolves_to_fixed_type_p (instance=0x7fffeb111900, 
    nonnull=0x0) at /space/rguenther/src/svn/gcc-4_6-branch/gcc/cp/class.c:5980
#4  0x00000000004c28f9 in build_new_method_call (instance=0x7fffeb111900, 
    fns=0x7fffebffbf00, args=0x7fffffffb888, conversion_path=0x7fffebff40d0, 
    flags=3, fn_p=0x0, complain=3)
    at /space/rguenther/src/svn/gcc-4_6-branch/gcc/cp/call.c:6978
(gdb) l
5823    #define RECUR(T) fixed_type_or_null((T), nonnull, cdtorp)
5824
5825      switch (TREE_CODE (instance))
5826        {
5827        case INDIRECT_REF:
5828          if (POINTER_TYPE_P (TREE_TYPE (instance)))
5829            return NULL_TREE;
5830          else
5831            return RECUR (TREE_OPERAND (instance, 0));
5832
(gdb) p instance->base.code
$3 = INDIRECT_REF
(gdb) p instance->common.type
$4 = (tree) 0x0


Reducing.


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE (regression w.r.t. 4.6.0)
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
  2011-04-12 14:49 ` [Bug c++/48574] " rguenth at gcc dot gnu.org
@ 2011-04-12 14:52 ` rguenth at gcc dot gnu.org
  2011-04-12 14:54 ` [Bug c++/48574] " vincenzo.innocente at cern dot ch
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-12 14:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |4.6.1
            Summary|ICE (regression w.r.t.      |[4.6/4.7 Regression] ICE
                   |4.6.0)                      |(regression w.r.t. 4.6.0)
      Known to fail|                            |4.6.1, 4.7.0


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

* [Bug c++/48574] ICE (regression w.r.t. 4.6.0)
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
  2011-04-12 14:49 ` [Bug c++/48574] " rguenth at gcc dot gnu.org
  2011-04-12 14:52 ` [Bug c++/48574] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-04-12 14:54 ` vincenzo.innocente at cern dot ch
  2011-04-12 14:55 ` vincenzo.innocente at cern dot ch
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-04-12 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6/4.7 Regression] ICE    |ICE (regression w.r.t.
                   |(regression w.r.t. 4.6.0)   |4.6.0)
      Known to fail|4.6.1, 4.7.0                |

--- Comment #2 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-04-12 14:53:58 UTC ---
while looking for a work-around I discovered that
sed -i 's/const GsfElectron & ele =/GsfElectron ele =/g' produceICE.ii
that affects line
grep -n "const GsfElectron & ele =" produceICE.ii
185392: const GsfElectron & ele = * * i;

"make it compiling"


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

* [Bug c++/48574] ICE (regression w.r.t. 4.6.0)
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (2 preceding siblings ...)
  2011-04-12 14:54 ` [Bug c++/48574] " vincenzo.innocente at cern dot ch
@ 2011-04-12 14:55 ` vincenzo.innocente at cern dot ch
  2011-04-12 15:03 ` [Bug c++/48574] [4.6/4.7 Regression] ICE vincenzo.innocente at cern dot ch
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-04-12 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-04-12 14:55:26 UTC ---
sorry Richard,
I suspect I've overwritten your changes by mistake

vincenzo

On 12 Apr, 2011, at 4:52 PM, rguenth at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48574
> 
> Richard Guenther <rguenth at gcc dot gnu.org> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>           Priority|P3                          |P1
>   Target Milestone|---                         |4.6.1
>            Summary|ICE (regression w.r.t.      |[4.6/4.7 Regression] ICE
>                   |4.6.0)                      |(regression w.r.t. 4.6.0)
>      Known to fail|                            |4.6.1, 4.7.0
> 
> -- 
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (3 preceding siblings ...)
  2011-04-12 14:55 ` vincenzo.innocente at cern dot ch
@ 2011-04-12 15:03 ` vincenzo.innocente at cern dot ch
  2011-04-12 15:12 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-04-12 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |4.6.1
            Summary|ICE (regression w.r.t.      |[4.6/4.7 Regression] ICE
                   |4.6.0)                      |
      Known to fail|                            |4.6.1, 4.7.0
           Severity|normal                      |critical


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (4 preceding siblings ...)
  2011-04-12 15:03 ` [Bug c++/48574] [4.6/4.7 Regression] ICE vincenzo.innocente at cern dot ch
@ 2011-04-12 15:12 ` jakub at gcc dot gnu.org
  2011-04-12 16:53 ` jakub at gcc dot gnu.org
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-12 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-12 15:12:22 UTC ---
Likely constexpr related, running delta now to reduce it a little bit.


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (5 preceding siblings ...)
  2011-04-12 15:12 ` jakub at gcc dot gnu.org
@ 2011-04-12 16:53 ` jakub at gcc dot gnu.org
  2011-04-12 21:03 ` jakub at gcc dot gnu.org
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-12 16:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-12 16:53:27 UTC ---
Reduction is running slowly.
Anyway, this started with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171461
i.e. PR48289 fix.


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (6 preceding siblings ...)
  2011-04-12 16:53 ` jakub at gcc dot gnu.org
@ 2011-04-12 21:03 ` jakub at gcc dot gnu.org
  2011-04-13  7:48 ` jakub at gcc dot gnu.org
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-12 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-12 21:03:34 UTC ---
Reduced testcase (ICEs even with no options):

struct A
{
  virtual void foo ();
};

template <typename T>
void
bar (T x)
{
  A &b = *x;
  b.foo ();
}


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (7 preceding siblings ...)
  2011-04-12 21:03 ` jakub at gcc dot gnu.org
@ 2011-04-13  7:48 ` jakub at gcc dot gnu.org
  2011-04-13 10:32 ` dodji at gcc dot gnu.org
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-13  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-13 07:48:13 UTC ---
--- gcc/cp/class.c.jj 2011-03-31 08:50:52.000000000 +0200
+++ gcc/cp/class.c 2011-04-13 09:41:42.000000000 +0200
@@ -5827,7 +5827,8 @@ fixed_type_or_null (tree instance, int *
   switch (TREE_CODE (instance))
     {
     case INDIRECT_REF:
-      if (POINTER_TYPE_P (TREE_TYPE (instance)))
+      if ((processing_template_decl && TREE_TYPE (instance) == NULL_TREE)
+          || POINTER_TYPE_P (TREE_TYPE (instance)))
         return NULL_TREE;
       else
         return RECUR (TREE_OPERAND (instance, 0));

fixes the ICE, but I doubt it is the right fix.  I think other dependent
types (e.g. TEMPLATE_TYPE_PARM or TEMPLATE_TEMPLATE_PARM at least) can be
potentially a POINTER_TYPE_P too.  On the other side calling dependent_type_p
(TREE_TYPE (instance)) || POINTER_TYPE_P (TREE_TYPE (instance))) here would
return NULL even for dependent types that will certainly not be
POINTER_TYPE_Ps.


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (8 preceding siblings ...)
  2011-04-13  7:48 ` jakub at gcc dot gnu.org
@ 2011-04-13 10:32 ` dodji at gcc dot gnu.org
  2011-04-13 13:44 ` dodji at gcc dot gnu.org
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-04-13 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |dodji at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |dodji at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (9 preceding siblings ...)
  2011-04-13 10:32 ` dodji at gcc dot gnu.org
@ 2011-04-13 13:44 ` dodji at gcc dot gnu.org
  2011-04-13 15:10 ` dodji at gcc dot gnu.org
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-04-13 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-04-13 13:43:41 UTC ---
Candidate patch proposed at
http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00985.html


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (10 preceding siblings ...)
  2011-04-13 13:44 ` dodji at gcc dot gnu.org
@ 2011-04-13 15:10 ` dodji at gcc dot gnu.org
  2011-04-13 15:13 ` dodji at gcc dot gnu.org
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-04-13 15:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-04-13 15:09:29 UTC ---
Author: dodji
Date: Wed Apr 13 15:09:26 2011
New Revision: 172375

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172375
Log:
Fix PR c++/48574

gcc/cp/

    * class.c (fixed_type_or_null): We cannot determine the dynamic
    type of a reference variable if its initializer is dependent.

gcc/testsuite/

    * g++.dg/template/dependent-expr7.C: New test case.

Added:
    trunk/gcc/testsuite/g++.dg/template/dependent-expr7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (11 preceding siblings ...)
  2011-04-13 15:10 ` dodji at gcc dot gnu.org
@ 2011-04-13 15:13 ` dodji at gcc dot gnu.org
  2011-04-13 15:20 ` dodji at gcc dot gnu.org
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-04-13 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-04-13 15:12:21 UTC ---
Fixed in 4.7 (trunk)


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (12 preceding siblings ...)
  2011-04-13 15:13 ` dodji at gcc dot gnu.org
@ 2011-04-13 15:20 ` dodji at gcc dot gnu.org
  2011-04-13 15:21 ` dodji at gcc dot gnu.org
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-04-13 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-04-13 15:19:42 UTC ---
Author: dodji
Date: Wed Apr 13 15:19:40 2011
New Revision: 172376

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172376
Log:
Fix PR c++/48574

gcc/cp/

    * class.c (fixed_type_or_null): We cannot determine the dynamic
    type of a reference variable if its initializer is dependent.

gcc/testsuite/

    * g++.dg/template/dependent-expr7.C: New test case.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/template/dependent-expr7.C
Modified:
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/class.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (13 preceding siblings ...)
  2011-04-13 15:20 ` dodji at gcc dot gnu.org
@ 2011-04-13 15:21 ` dodji at gcc dot gnu.org
  2011-05-04 10:06 ` vincenzo.innocente at cern dot ch
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-04-13 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

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

--- Comment #12 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-04-13 15:21:01 UTC ---
Fixed in 4.6.1


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (14 preceding siblings ...)
  2011-04-13 15:21 ` dodji at gcc dot gnu.org
@ 2011-05-04 10:06 ` vincenzo.innocente at cern dot ch
  2011-05-04 10:28 ` paolo.carlini at oracle dot com
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-05-04 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-05-04 10:00:02 UTC ---
is this really fixed?
with gcc version 4.6.1 20110422 (prerelease) (GCC) 
the reduced test do compile but
I still get 

g++  -c produceICE.ii -std=c++0x -Wall -mavx
In file included from
/data/CMSSW_4_2_0_pre6/src/CommonTools/RecoAlgos/plugins/EtaPtMinGsfElectronFullCloneSelector.cc:16:0:
/data/CMSSW_4_2_0_pre6/src/CommonTools/RecoAlgos/interface/GsfElectronSelector.h:
In member function 'void
helper::GsfElectronCollectionStoreManager::cloneAndStore(const I&, const I&,
edm::Event&)':
/data/CMSSW_4_2_0_pre6/src/CommonTools/RecoAlgos/interface/GsfElectronSelector.h:54:36:
internal compiler error: Segmentation fault
Please submit a full bug report,


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (15 preceding siblings ...)
  2011-05-04 10:06 ` vincenzo.innocente at cern dot ch
@ 2011-05-04 10:28 ` paolo.carlini at oracle dot com
  2011-05-04 11:04 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-04 10:28 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #14 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-04 10:13:37 UTC ---
I can confirm that the original testcase still ICEs, both mainline and branch.


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (16 preceding siblings ...)
  2011-05-04 10:28 ` paolo.carlini at oracle dot com
@ 2011-05-04 11:04 ` jakub at gcc dot gnu.org
  2011-05-04 21:40 ` dodji at seketeli dot org
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-04 11:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-04 10:54:48 UTC ---
Indeed, unlike the reduced testcase, for the original one it triggers during
fold_non_dependent_expr_sfinae which means that processing_template_decl is 0
and thus type_dependent_expression_p check Dodji added returns false
immediately.

Related to PR48749, where processing_template_decl is 1, but
type_dependent_expression_p is still false, because the COMPONENT_REF has
non-dependent type, yet its operands are dependent (it was created using
build_min_non_dep).


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (17 preceding siblings ...)
  2011-05-04 11:04 ` jakub at gcc dot gnu.org
@ 2011-05-04 21:40 ` dodji at seketeli dot org
  2011-05-05 20:20 ` dodji at gcc dot gnu.org
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at seketeli dot org @ 2011-05-04 21:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from dodji at seketeli dot org <dodji at seketeli dot org> 2011-05-04 21:28:49 UTC ---
Indeed.  I haven't re-checked the initial test case; I have only
considered the reduced one.  Sorry, my bad.  I am looking into this.


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (18 preceding siblings ...)
  2011-05-04 21:40 ` dodji at seketeli dot org
@ 2011-05-05 20:20 ` dodji at gcc dot gnu.org
  2011-05-06 11:42 ` dodji at gcc dot gnu.org
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-05-05 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-05-05 20:14:09 UTC ---
I think the reduced test case below reflects the ICE of the original
test case.  It needs the -std=c++0x option.

struct A
{
  virtual int foo();
};

void baz (int);

template <typename T>
void
bar(T x)
{
  A &b = *x;
  baz (b.foo ());
}

void
foo()
{
  A a;
  bar(&a);
}


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (19 preceding siblings ...)
  2011-05-05 20:20 ` dodji at gcc dot gnu.org
@ 2011-05-06 11:42 ` dodji at gcc dot gnu.org
  2011-05-09 12:35 ` dodji at gcc dot gnu.org
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-05-06 11:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-05-06 11:31:07 UTC ---
Candidate patch posted to 
http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00474.html


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (20 preceding siblings ...)
  2011-05-06 11:42 ` dodji at gcc dot gnu.org
@ 2011-05-09 12:35 ` dodji at gcc dot gnu.org
  2011-05-09 12:46 ` dodji at gcc dot gnu.org
  2011-05-09 13:05 ` jakub at gcc dot gnu.org
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-05-09 12:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-05-09 12:32:11 UTC ---
Author: dodji
Date: Mon May  9 12:32:06 2011
New Revision: 173570

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173570
Log:
Fix PR c++/48574

gcc/cp/

    PR c++/48574
    * class.c (fixed_type_or_null): Use type_dependent_p_push to test
    if the instance has a dependent initializer.

gcc/testsuite/

    PR c++/48574
    * g++.dg/template/dependent-expr8.C: New test case.

Added:
    trunk/gcc/testsuite/g++.dg/template/dependent-expr8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (21 preceding siblings ...)
  2011-05-09 12:35 ` dodji at gcc dot gnu.org
@ 2011-05-09 12:46 ` dodji at gcc dot gnu.org
  2011-05-09 13:05 ` jakub at gcc dot gnu.org
  23 siblings, 0 replies; 25+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-05-09 12:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-05-09 12:34:22 UTC ---
Author: dodji
Date: Mon May  9 12:34:19 2011
New Revision: 173571

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173571
Log:
Fix PR c++/48574

gcc/cp/

    PR c++/48574
    * class.c (fixed_type_or_null): Use type_dependent_p_push to test
    if the instance has a dependent initializer.

gcc/testsuite/

    PR c++/48574
    * g++.dg/template/dependent-expr8.C: New test case.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/template/dependent-expr8.C
Modified:
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/class.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/48574] [4.6/4.7 Regression] ICE
  2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
                   ` (22 preceding siblings ...)
  2011-05-09 12:46 ` dodji at gcc dot gnu.org
@ 2011-05-09 13:05 ` jakub at gcc dot gnu.org
  23 siblings, 0 replies; 25+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-09 13:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-09 12:56:14 UTC ---
Fixed.


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

end of thread, other threads:[~2011-05-09 13:05 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12 14:15 [Bug c++/48574] New: ICE (regression w.r.t. 4.6.0) vincenzo.innocente at cern dot ch
2011-04-12 14:49 ` [Bug c++/48574] " rguenth at gcc dot gnu.org
2011-04-12 14:52 ` [Bug c++/48574] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
2011-04-12 14:54 ` [Bug c++/48574] " vincenzo.innocente at cern dot ch
2011-04-12 14:55 ` vincenzo.innocente at cern dot ch
2011-04-12 15:03 ` [Bug c++/48574] [4.6/4.7 Regression] ICE vincenzo.innocente at cern dot ch
2011-04-12 15:12 ` jakub at gcc dot gnu.org
2011-04-12 16:53 ` jakub at gcc dot gnu.org
2011-04-12 21:03 ` jakub at gcc dot gnu.org
2011-04-13  7:48 ` jakub at gcc dot gnu.org
2011-04-13 10:32 ` dodji at gcc dot gnu.org
2011-04-13 13:44 ` dodji at gcc dot gnu.org
2011-04-13 15:10 ` dodji at gcc dot gnu.org
2011-04-13 15:13 ` dodji at gcc dot gnu.org
2011-04-13 15:20 ` dodji at gcc dot gnu.org
2011-04-13 15:21 ` dodji at gcc dot gnu.org
2011-05-04 10:06 ` vincenzo.innocente at cern dot ch
2011-05-04 10:28 ` paolo.carlini at oracle dot com
2011-05-04 11:04 ` jakub at gcc dot gnu.org
2011-05-04 21:40 ` dodji at seketeli dot org
2011-05-05 20:20 ` dodji at gcc dot gnu.org
2011-05-06 11:42 ` dodji at gcc dot gnu.org
2011-05-09 12:35 ` dodji at gcc dot gnu.org
2011-05-09 12:46 ` dodji at gcc dot gnu.org
2011-05-09 13:05 ` jakub 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).