public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61381] New: constexpr non captured by template lambda
@ 2014-06-01 14:54 vincenzo.innocente at cern dot ch
  2014-06-03 14:28 ` [Bug c++/61381] " daniel.kruegler at googlemail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2014-06-01 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61381
           Summary: constexpr non captured by template lambda
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch

cat ceLambda.cc 
struct Bar {  constexpr Bar(float i):f(i){}; float f;};
float foo1(float x) {
   constexpr Bar z{0};

   auto f = [=](auto a, auto b) -> Bar { return z;};

   return f(x,x).f;

}

float foo2(float x) {
   const Bar z{0};

   auto f = [=](auto a, auto b) -> Bar { return z;};

   return f(x,x).f;

}

float foo3(float x) {
   constexpr Bar z{0};

   auto f = [=](float a, float b) -> Bar { return z;};

   return f(x,x).f;

}

b-d-128-141-131-42:ctest innocent$ c++ -O2 -std=c++1y -S ceLambda.cc 
ceLambda.cc: In instantiation of ‘foo1(float)::<lambda(auto:1, auto:2)> [with
auto:1 = float; auto:2 = float]’:
ceLambda.cc:7:16:   required from here
ceLambda.cc:5:49: error: ‘z’ was not declared in this scope
    auto f = [=](auto a, auto b) -> Bar { return z;};
                                                 ^
>From gcc-bugs-return-452928-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jun 01 16:04:41 2014
Return-Path: <gcc-bugs-return-452928-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 684 invoked by alias); 1 Jun 2014 16:04:40 -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 606 invoked by uid 48); 1 Jun 2014 16:04:35 -0000
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60732] FAIL: g++.dg/ext/altivec-7.C -std=*  scan-assembler _Z3fooDv*
Date: Sun, 01 Jun 2014 16:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dominiq at lps dot ens.fr
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:
Message-ID: <bug-60732-4-JJr7IiW3nK@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60732-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60732-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-06/txt/msg00010.txt.bz2
Content-length: 2571

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`732

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Therefore, I concur that the correct action is to have two tests - one for each
> ABI and run both tests on all targets.

Is the following patch what you have in mind (tested on powerpc-apple-darwin9)?

--- ../_gcc_clean/gcc/testsuite/g++.dg/ext/altivec-7.C    2013-10-13
00:58:24.000000000 +0200
+++ gcc/testsuite/g++.dg/ext/altivec-7.C    2014-06-01 17:56:01.000000000 +0200
@@ -2,6 +2,7 @@
 /* { dg-do compile { target powerpc*-*-* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
 /* { dg-options "-maltivec" } */
+/* { dg-additional-options "-fabi-version=4" { target powerpc*-*-darwin* } }
*/

 #include <altivec.h>

gcc/testsuite/g++.dg/ext/altivec-7a.C
--- ../_gcc_clean/gcc/testsuite/g++.dg/ext/altivec-7a.C    1970-01-01
01:00:00.000000000 +0100
+++ gcc/testsuite/g++.dg/ext/altivec-7a.C    2014-06-01 17:56:22.000000000
+0200
@@ -0,0 +1,37 @@
+/* Test for AltiVec type overloading and name mangling.  */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec" } */
+/* { dg-additional-options "-fabi-version=2" { target powerpc*-*-darwin* } }
*/
+
+#include <altivec.h>
+
+void foo(vector unsigned char) { }
+void foo(vector signed char) { }
+void foo(vector bool     char) { }
+void foo(vector unsigned short) { }
+void foo(vector signed short) { }
+void foo(vector bool short) { }
+void foo(vector unsigned int) { }
+void foo(vector signed int) { }
+void foo(vector bool int) { }
+void foo(vector float) { }
+void foo(vector pixel) { }
+void foo(int) { }
+void foo(unsigned int) { }
+void foo(float) { }
+
+/* { dg-final { scan-assembler "_Z3fooU8__vectorh" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectora" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__boolc" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectort" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectors" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__bools" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectorj" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectori" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__booli" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectorf" } } */
+/* { dg-final { scan-assembler "_Z3fooU8__vectoru7__pixel" } } */
+/* { dg-final { scan-assembler "_Z3fooi" } } */
+/* { dg-final { scan-assembler "_Z3fooj" } } */
+/* { dg-final { scan-assembler "_Z3foof" } } */


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

* [Bug c++/61381] constexpr non captured by template lambda
  2014-06-01 14:54 [Bug c++/61381] New: constexpr non captured by template lambda vincenzo.innocente at cern dot ch
@ 2014-06-03 14:28 ` daniel.kruegler at googlemail dot com
  2014-06-03 15:37 ` vincenzo.innocente at cern dot ch
  2014-06-03 16:55 ` vincenzo.innocente at cern dot ch
  2 siblings, 0 replies; 4+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-06-03 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

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> ---
Recent gcc 4.10 trunk (20140602) accepts the code
>From gcc-bugs-return-453099-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 03 14:45:35 2014
Return-Path: <gcc-bugs-return-453099-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30643 invoked by alias); 3 Jun 2014 14:45:35 -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 30590 invoked by uid 48); 3 Jun 2014 14:45:31 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60848] [4.7/4.8/4.9/4.10 Regression] Crash while experimenting with c++-0x initializer lists
Date: Tue, 03 Jun 2014 14:45: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.1
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.10.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution target_milestone
Message-ID: <bug-60848-4-tA3pwYZunV@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60848-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60848-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-06/txt/msg00181.txt.bz2
Content-length: 487

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`848

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.7.4                       |4.10.0

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed on trunk.


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

* [Bug c++/61381] constexpr non captured by template lambda
  2014-06-01 14:54 [Bug c++/61381] New: constexpr non captured by template lambda vincenzo.innocente at cern dot ch
  2014-06-03 14:28 ` [Bug c++/61381] " daniel.kruegler at googlemail dot com
@ 2014-06-03 15:37 ` vincenzo.innocente at cern dot ch
  2014-06-03 16:55 ` vincenzo.innocente at cern dot ch
  2 siblings, 0 replies; 4+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2014-06-03 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from vincenzo Innocente <vincenzo.innocente at cern dot ch> ---
I am still at "trunk revision 210507"
will update and test again


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

* [Bug c++/61381] constexpr non captured by template lambda
  2014-06-01 14:54 [Bug c++/61381] New: constexpr non captured by template lambda vincenzo.innocente at cern dot ch
  2014-06-03 14:28 ` [Bug c++/61381] " daniel.kruegler at googlemail dot com
  2014-06-03 15:37 ` vincenzo.innocente at cern dot ch
@ 2014-06-03 16:55 ` vincenzo.innocente at cern dot ch
  2 siblings, 0 replies; 4+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2014-06-03 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from vincenzo Innocente <vincenzo.innocente at cern dot ch> ---
confirmed it compile with
[trunk revision 211189]
a back port to 4.9.1. would be appreciated


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

end of thread, other threads:[~2014-06-03 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-01 14:54 [Bug c++/61381] New: constexpr non captured by template lambda vincenzo.innocente at cern dot ch
2014-06-03 14:28 ` [Bug c++/61381] " daniel.kruegler at googlemail dot com
2014-06-03 15:37 ` vincenzo.innocente at cern dot ch
2014-06-03 16:55 ` vincenzo.innocente at cern dot ch

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