public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57248] New: string parameter to constexpr functions
@ 2013-05-10 23:26 sutambe at yahoo dot com
  2013-05-11  0:21 ` [Bug c++/57248] " paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sutambe at yahoo dot com @ 2013-05-10 23:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57248
           Summary: string parameter to constexpr functions
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sutambe at yahoo dot com

Created attachment 30098
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30098&action=edit
compiler output

g++ 4.9 spits out an internal error on the following code.

#include <tuple>
constexpr bool strmatch(const char *s1, const char *s2)
{
  return (*s1==*s2) ? 
            (*s1=='\0') ? 
               true
               : strmatch(s1+1, s2+1) 
            : false;
}

template <unsigned N>
constexpr int index(const char (&array)[N])
{
  return strmatch(array, "m0") ? 0 : -1;
}

template<unsigned N>
constexpr int extract(const std::tuple<int, int> & t1, const char (&array)[N])
{
  return std::get<index(array)>(t1);
}

int main(void)
{
  constexpr int i = strmatch("m0", "m0");  // OK
  constexpr int j = index("m0");  // OK
  constexpr int k = extract(std::make_tuple(10, 20), "m0"); // compiler fault

  return 0;
}


Configuration:
==============================
COLLECT_GCC=g++49
COLLECT_LTO_WRAPPER=/project/mySVN/gcc-4.9-20130421/libexec/gcc/i686-pc-linux-gnu/4.9.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/project/mySVN/gcc-4.9-20130421
--with-mpfr=/project/mpfr-3.0.0 --with-gmp=/project/gmp-4.3.2
--with-mpc=/project/mpc-0.8.2 --enable-languages=c,cpp --enable-lto
--enable-languages=c --enable-languages=c++
Thread model: posix
gcc version 4.9.0 20130421 (experimental) (GCC)


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
@ 2013-05-11  0:21 ` paolo.carlini at oracle dot com
  2013-05-23 19:07 ` sutambe at yahoo dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-05-11  0:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-05-11
             Blocks|                            |55004
     Ever confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Current mainline doesn't ICE, just rejects the testcase.

<tuple> and std::get don't play any special role, the issue is that array in
index(array) appears not to be a constant expression.


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
  2013-05-11  0:21 ` [Bug c++/57248] " paolo.carlini at oracle dot com
@ 2013-05-23 19:07 ` sutambe at yahoo dot com
  2013-05-23 21:23 ` daniel.kruegler at googlemail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sutambe at yahoo dot com @ 2013-05-23 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sumant Tambe <sutambe at yahoo dot com> ---
I'm a bit confused. Is the program illformed or supposed to compile but does
not.


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
  2013-05-11  0:21 ` [Bug c++/57248] " paolo.carlini at oracle dot com
  2013-05-23 19:07 ` sutambe at yahoo dot com
@ 2013-05-23 21:23 ` daniel.kruegler at googlemail dot com
  2013-05-23 22:44 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-05-23 21:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
The code looks valid to me. I think that Paolo just wanted to point out that
the library implementation does not cause this. I agree with him and can
confirm that the code is also rejected when emulating the library such as in
the following way:

template<bool, class>
struct enable_if{};

template<class T>
struct enable_if<true, T>{ typedef T type; };

template<class T1, class T2>
struct tuple
{
  T1 t1;
  T2 t2;
};

template<unsigned I, class T1, class T2>
constexpr
typename enable_if<I == 0, T1>::type
get(tuple<T1, T2> t) { return t.t1; }

template<unsigned I, class T1, class T2>
constexpr
typename enable_if<I == 1, T1>::type
get(tuple<T1, T2> t) { return t.t2; }

template<class T1, class T2>
constexpr tuple<T1, T2> make_tuple(T1 t1, T2 t2)
{
  return tuple<T1, T2>{t1, t2};
}

Same error here.
>From gcc-bugs-return-422995-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 23 21:34:47 2013
Return-Path: <gcc-bugs-return-422995-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19574 invoked by alias); 23 May 2013 21:34:47 -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 19511 invoked by uid 48); 23 May 2013 21:34:41 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux
Date: Thu, 23 May 2013 21:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
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-57359-4-u4neS71Qb1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57359-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57359-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: 2013-05/txt/msg01668.txt.bz2
Content-length: 448

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW359

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> ---
NP, and thanks a lot for the bugreports, they are very much appreciated.


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
                   ` (2 preceding siblings ...)
  2013-05-23 21:23 ` daniel.kruegler at googlemail dot com
@ 2013-05-23 22:44 ` paolo.carlini at oracle dot com
  2014-09-05 10:51 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-05-23 22:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Thanks Daniel. In fact - I should have attached some code - nothing about
<tuple> & co matters, you can remove it completely and replace std::get with,
say,

template <int N>
constexpr int get() { return 1; }


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
                   ` (3 preceding siblings ...)
  2013-05-23 22:44 ` paolo.carlini at oracle dot com
@ 2014-09-05 10:51 ` paolo.carlini at oracle dot com
  2014-09-05 11:02 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-09-05 10:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot com

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
It would be nice if Daniel could have another look to this, because his reduced
testcase in Comment #3 doesn't work anymore as a reproducer, is simply accepted
by eg, the released 4.9.0.

Also, I note that all the compilers I have at hand reject the original testcase
and also, eg:

constexpr bool strmatch(const char *s1, const char *s2)
{
  return (*s1==*s2) ? 
            (*s1=='\0') ? 
               true
               : strmatch(s1+1, s2+1) 
            : false;
}

template <unsigned N>
constexpr int index(const char (&array)[N])
{
  return strmatch(array, "m0") ? 0 : -1;
}

template <int N>
constexpr int get() { return 1; }

template<unsigned N>
constexpr int extract(const char (&array)[N]) {
  return get<index(array)>();
}

int main(void)
{
  constexpr int i = strmatch("m0", "m0");  // OK
  constexpr int j = index("m0");  // OK
  constexpr int k = extract("m0"); // Not OK
}


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
                   ` (4 preceding siblings ...)
  2014-09-05 10:51 ` paolo.carlini at oracle dot com
@ 2014-09-05 11:02 ` paolo.carlini at oracle dot com
  2014-10-02 20:40 ` daniel.kruegler at googlemail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-09-05 11:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Sorry, I made a mistake, the original testcase with <tuple> replaced by the
code in Comment #3 is still rejected. However, it's true that all the up to
date compilers I have at hand reject it with the same kind of error about get
at:

   return std::get<index(array)>(t1);

like for my reduced testcase in Comment #5.


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
                   ` (5 preceding siblings ...)
  2014-09-05 11:02 ` paolo.carlini at oracle dot com
@ 2014-10-02 20:40 ` daniel.kruegler at googlemail dot com
  2014-10-03 20:41 ` sutambe at yahoo dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-10-02 20:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Paolo Carlini from comment #6)
> However, it's true that all the up to
> date compilers I have at hand reject it with the same kind of error about
> get at:
> 
>    return std::get<index(array)>(t1);
> 
> like for my reduced testcase in Comment #5.

Ouch, you are right - I overlooked the very important fact that *within*
function extract the expression

index(array)

cannot be a constant expression, because we have an argument value involved! In
the context of a constexpr function any argument value itself cannot be a
constant expression, because the decision for something being a constant
expression is always context-independent.

I'm very sorry for having mislead Paolo with my original remark, indeed the
original test case is *invalid* because it is based on the assumption that a
constexpr function argument itself could be a constant expression.
>From gcc-bugs-return-463140-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 02 20:52:46 2014
Return-Path: <gcc-bugs-return-463140-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30859 invoked by alias); 2 Oct 2014 20:52:45 -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 30808 invoked by uid 48); 2 Oct 2014 20:52:36 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57460] [C++11] Sfinae doesn't respect dependent context
Date: Thu, 02 Oct 2014 20:52: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.9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.kruegler at googlemail 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:
Message-ID: <bug-57460-4-IRJ72AX2gQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg00161.txt.bz2
Content-length: 410

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

--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Jason Merrill from comment #1)
> But there is no T that would cause check<(EXPR,T())> to be valid, so no
> valid specialization can be generated for the template, so the program is
> ill-formed (no diagnostic required).

After rethinking about it, I agree.
>From gcc-bugs-return-463141-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 02 20:53:58 2014
Return-Path: <gcc-bugs-return-463141-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31710 invoked by alias); 2 Oct 2014 20:53:57 -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 31666 invoked by uid 48); 2 Oct 2014 20:53:51 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57460] [C++11] Sfinae doesn't respect dependent context
Date: Thu, 02 Oct 2014 20:53: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.9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.kruegler at googlemail 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:
Message-ID: <bug-57460-4-7khsKiv9B2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg00162.txt.bz2
Content-length: 225

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

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
I tried to close the issue as INVALID, but it seems that I cannot do that by
myself.
>From gcc-bugs-return-463142-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 02 21:22:48 2014
Return-Path: <gcc-bugs-return-463142-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11720 invoked by alias); 2 Oct 2014 21:22:47 -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 11661 invoked by uid 48); 2 Oct 2014 21:22:38 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57460] [C++11] Sfinae doesn't respect dependent context
Date: Thu, 02 Oct 2014 21:22: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.9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
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_status resolution
Message-ID: <bug-57460-4-cB44JH552L@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg00163.txt.bz2
Content-length: 606

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Daniel Krügler from comment #3)
> I tried to close the issue as INVALID, but it seems that I cannot do that by
> myself.

Strange, as the reporter you should be able to.
>From gcc-bugs-return-463143-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 02 21:29:28 2014
Return-Path: <gcc-bugs-return-463143-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15855 invoked by alias); 2 Oct 2014 21:29:28 -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 15814 invoked by uid 48); 2 Oct 2014 21:29:19 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57460] [C++11] Sfinae doesn't respect dependent context
Date: Thu, 02 Oct 2014 21:29: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.9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.kruegler at googlemail dot com
X-Bugzilla-Status: RESOLVED
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-57460-4-88quo2sZCO@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57460-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg00164.txt.bz2
Content-length: 516

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

--- Comment #5 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Marc Glisse from comment #4)
> (In reply to Daniel Krügler from comment #3)
> > I tried to close the issue as INVALID, but it seems that I cannot do that by
> > myself.
> 
> Strange, as the reporter you should be able to.

Thanks Marc, for your help. I might have been looking at the wrong place,
because when trying to do it now, it would seem to work.
>From gcc-bugs-return-463144-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 02 21:35:21 2014
Return-Path: <gcc-bugs-return-463144-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19476 invoked by alias); 2 Oct 2014 21:35:21 -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 19445 invoked by uid 48); 2 Oct 2014 21:35:12 -0000
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/37131] inline matmul for small matrix sizes
Date: Thu, 02 Oct 2014 21:35: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.4.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: tkoenig at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: cf_reconfirmed_on
Message-ID: <bug-37131-4-c4JRI5s1M4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-37131-4@http.gcc.gnu.org/bugzilla/>
References: <bug-37131-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-10/txt/msg00165.txt.bz2
Content-length: 550

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2008-08-16 22:55:22         |2014-10-2

--- Comment #15 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Hi Mikael,

do you think you can do this using the scalarizer?

If not, I might try to do it using front-end
optimization, because I don't know what the scalarizer
is really about :-)


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
                   ` (6 preceding siblings ...)
  2014-10-02 20:40 ` daniel.kruegler at googlemail dot com
@ 2014-10-03 20:41 ` sutambe at yahoo dot com
  2014-10-03 20:47 ` daniel.kruegler at googlemail dot com
  2014-10-22  9:30 ` paolo.carlini at oracle dot com
  9 siblings, 0 replies; 11+ messages in thread
From: sutambe at yahoo dot com @ 2014-10-03 20:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Sumant Tambe <sutambe at yahoo dot com> ---
Bummer! My assumption/expectation (probably due to my ignorance) is that any
transformation/result obtained using a constexpr function should be usable
(perhaps recursively) in the caller constexpr function. How does the recursive
strmatch function work then?


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
                   ` (7 preceding siblings ...)
  2014-10-03 20:41 ` sutambe at yahoo dot com
@ 2014-10-03 20:47 ` daniel.kruegler at googlemail dot com
  2014-10-22  9:30 ` paolo.carlini at oracle dot com
  9 siblings, 0 replies; 11+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-10-03 20:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Sumant Tambe from comment #8)
> How does the recursive strmatch function work then?

It works, because the function implementation does not contain any expression
that would depend on being a constant expression. And it would be perfectly
fine to invoke this function with non-constant arguments. From begin with it
was an important design decision that constexpr functions can always be called
like any other function.
>From gcc-bugs-return-463240-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 03 21:28:53 2014
Return-Path: <gcc-bugs-return-463240-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19328 invoked by alias); 3 Oct 2014 21:28:53 -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 19264 invoked by uid 48); 3 Oct 2014 21:28:48 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/23684] Combine stores for non strict alignment targets
Date: Fri, 03 Oct 2014 21:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.1.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: pinskia 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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-23684-4-LAK1tC0VK1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-23684-4@http.gcc.gnu.org/bugzilla/>
References: <bug-23684-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-10/txt/msg00261.txt.bz2
Content-length: 443

https://gcc.gnu.org/bugzilla/show_bug.cgi?id#684

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carrot at google dot com

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 63447 has been marked as a duplicate of this bug. ***


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

* [Bug c++/57248] string parameter to constexpr functions
  2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
                   ` (8 preceding siblings ...)
  2014-10-03 20:47 ` daniel.kruegler at googlemail dot com
@ 2014-10-22  9:30 ` paolo.carlini at oracle dot com
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-10-22  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Let's close this then. The diagnostics could be better, but that's another
issue.


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

end of thread, other threads:[~2014-10-22  9:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-10 23:26 [Bug c++/57248] New: string parameter to constexpr functions sutambe at yahoo dot com
2013-05-11  0:21 ` [Bug c++/57248] " paolo.carlini at oracle dot com
2013-05-23 19:07 ` sutambe at yahoo dot com
2013-05-23 21:23 ` daniel.kruegler at googlemail dot com
2013-05-23 22:44 ` paolo.carlini at oracle dot com
2014-09-05 10:51 ` paolo.carlini at oracle dot com
2014-09-05 11:02 ` paolo.carlini at oracle dot com
2014-10-02 20:40 ` daniel.kruegler at googlemail dot com
2014-10-03 20:41 ` sutambe at yahoo dot com
2014-10-03 20:47 ` daniel.kruegler at googlemail dot com
2014-10-22  9:30 ` paolo.carlini at oracle dot com

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).