public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57248] string parameter to constexpr functions
Date: Thu, 02 Oct 2014 20:40:00 -0000	[thread overview]
Message-ID: <bug-57248-4-nnqEhyFAQx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57248-4@http.gcc.gnu.org/bugzilla/>

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


  parent reply	other threads:[~2014-10-02 20:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 23:26 [Bug c++/57248] New: " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-57248-4-nnqEhyFAQx@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).