public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60767] New: [ICE] [c++11] [4.8.2] use of "using" inside template causes failure in retreive_specialization
@ 2014-04-05  0:30 zreed1 at gmail dot com
  2014-04-05 14:54 ` [Bug c++/60767] [ICE] " daniel.kruegler at googlemail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zreed1 at gmail dot com @ 2014-04-05  0:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60767
           Summary: [ICE] [c++11] [4.8.2] use of "using" inside template
                    causes failure in retreive_specialization
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zreed1 at gmail dot com

The follow code fails on g++4.8.2, but compiles successfully with clang.

=========================================================================
template <typename _T, int _N>
  struct Impl;

template <typename _T>
  struct Impl<_T,0>
{};

template < typename _Tag, typename _T>
  typename _Tag::template impl< _T > get_impl();

template <int _N>
  struct Tag 
{
  template <typename _T>
    using impl = Impl<_T,_N>;
};

int main()
{ 
  get_impl< Tag<0>, void >();
}

=========================================================================

test.cpp: In substitution of ‘template<class _T> using impl = Impl<_T, 0> [with
_T = 0]’:                                                                     
│  ~                                                                            
test.cpp:9:38:   required by substitution of ‘template<class _Tag, class _T>
typename _Tag::impl<_T> get_impl() [with _Tag = Tag<0>; _T = void]’            
  │  ~                                                                          
test.cpp:22:28:   required from here                                           
                                                                              
│  ~                                                                            
test.cpp:16:29: internal compiler error: in retrieve_specialization, at
cp/pt.c:1021                                                                   
       │  ~                                                                     
     using impl = Impl<_T,_N>;             


=========================================================================

the following similar code compiles successfuly 


=========================================================================
template <typename _T, int _N>
  struct Impl;

template <typename _T>
  struct Impl<_T,0>
{};

template < typename _Tag, typename _T>
  typename _Tag::template impl< _T >::type get_impl();

template <int _N>
  struct Tag 
{
  template <typename _T>
    struct impl
  { typedef Impl<_T,_N> type; };
};

int main()
{

  get_impl< Tag<0>, void >();

}
>From gcc-bugs-return-448348-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 05 01:28:04 2014
Return-Path: <gcc-bugs-return-448348-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17975 invoked by alias); 5 Apr 2014 01:28:03 -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 17377 invoked by uid 55); 5 Apr 2014 01:27:58 -0000
From: "congh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/60656] [4.8/4.9 regression] x86 vectorization produces wrong code
Date: Sat, 05 Apr 2014 01:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: congh at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60656-4-ZX7E8sZaoJ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60656-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60656-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-04/txt/msg00368.txt.bz2
Content-length: 841

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

--- Comment #8 from Cong Hou <congh at gcc dot gnu.org> ---
Author: congh
Date: Sat Apr  5 01:27:21 2014
New Revision: 209138

URL: http://gcc.gnu.org/viewcvs?rev 9138&root=gcc&view=rev
Log:
2014-04-04  Cong Hou  <congh@google.com>

    PR tree-optimization/60656
    * tree-vect-stmts.c (supportable_widening_operation):
      Fix a bug that elements in a vector with vect_used_by_reduction
      property are incorrectly reordered when the operation on it is not
      consistant with the one in reduction operation.

2014-04-04  Cong Hou  <congh@google.com>

    PR tree-optimization/60656
    * gcc.dg/vect/pr60656.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr60656.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c


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

* [Bug c++/60767] [ICE] use of "using" inside template causes failure in retreive_specialization
  2014-04-05  0:30 [Bug c++/60767] New: [ICE] [c++11] [4.8.2] use of "using" inside template causes failure in retreive_specialization zreed1 at gmail dot com
@ 2014-04-05 14:54 ` daniel.kruegler at googlemail dot com
  2014-12-14 14:26 ` [Bug c++/60767] " ville.voutilainen at gmail dot com
  2014-12-18 12:18 ` ktietz at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-04-05 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler@googlemail.
                   |                            |com

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
The code fails also for gcc 4.9.0 trunk
>From gcc-bugs-return-448372-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 05 15:03:16 2014
Return-Path: <gcc-bugs-return-448372-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13583 invoked by alias); 5 Apr 2014 15:03: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 13558 invoked by uid 48); 5 Apr 2014 15:03:10 -0000
From: "w6ws at earthlink dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60751] Extra comma in WRITE statement not diagnosed
Date: Sat, 05 Apr 2014 15:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: w6ws at earthlink dot net
X-Bugzilla-Status: WAITING
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:
Message-ID: <bug-60751-4-x3uFd9wQDE@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60751-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60751-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-04/txt/msg00392.txt.bz2
Content-length: 567

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

--- Comment #5 from Walter Spector <w6ws at earthlink dot net> ---
> It seems quite trivial to fix, but does it really worth the work?

Well, we had an instance where this accidentally slipped into our code.  Later
on, our nightly regression runs crashed with several non-gfortran (and
non-Intel) compilers.

The extension itself is pretty gratuitous.  It adds nothing to the language,
yet can quietly promote incompatibilities.  Since g95 also accepts it, I am
assuming it came into the compiler before the split.


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

* [Bug c++/60767] use of "using" inside template causes failure in retreive_specialization
  2014-04-05  0:30 [Bug c++/60767] New: [ICE] [c++11] [4.8.2] use of "using" inside template causes failure in retreive_specialization zreed1 at gmail dot com
  2014-04-05 14:54 ` [Bug c++/60767] [ICE] " daniel.kruegler at googlemail dot com
@ 2014-12-14 14:26 ` ville.voutilainen at gmail dot com
  2014-12-18 12:18 ` ktietz at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-14 14:26 UTC (permalink / raw)
  To: gcc-bugs

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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-14
                 CC|                            |ville.voutilainen at gmail dot com
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.2, 4.9.1, 5.0

--- Comment #2 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Clang accepts the code.


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

* [Bug c++/60767] use of "using" inside template causes failure in retreive_specialization
  2014-04-05  0:30 [Bug c++/60767] New: [ICE] [c++11] [4.8.2] use of "using" inside template causes failure in retreive_specialization zreed1 at gmail dot com
  2014-04-05 14:54 ` [Bug c++/60767] [ICE] " daniel.kruegler at googlemail dot com
  2014-12-14 14:26 ` [Bug c++/60767] " ville.voutilainen at gmail dot com
@ 2014-12-18 12:18 ` ktietz at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-12-18 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ktietz at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Duplicate

*** This bug has been marked as a duplicate of bug 61198 ***


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

end of thread, other threads:[~2014-12-18 12:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-05  0:30 [Bug c++/60767] New: [ICE] [c++11] [4.8.2] use of "using" inside template causes failure in retreive_specialization zreed1 at gmail dot com
2014-04-05 14:54 ` [Bug c++/60767] [ICE] " daniel.kruegler at googlemail dot com
2014-12-14 14:26 ` [Bug c++/60767] " ville.voutilainen at gmail dot com
2014-12-18 12:18 ` ktietz 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).