public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/53094] constexpr vector subscripting
Date: Mon, 03 Dec 2012 22:05:00 -0000	[thread overview]
Message-ID: <bug-53094-4-5DiH8CAPSD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53094-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #12 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-12-03 22:05:29 UTC ---
about subscripting I get an ICE (set fault)
with
constexpr V4 v = {1,1,1,0};
constexpr V4 m[3] = { (V4){1,0,0,0}, (V4){0,1,0,0}, (V4){0,0,1,0}};
constexpr V4 r = v[0]*m[0] +  v[1]*m[1] + v[2]*m[2];



constexpr V4 r = v[0]*m[0] +  v[1]*m[1] + v[2]*m[2];
                                                   ^

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
cxx_eval_constant_expression (call=0x0, t=0x1425961b0,
allow_non_constant=<value temporarily unavailable, due to optimizations>,
addr=<value temporarily unavailable, due to optimizations>,
non_constant_p=0x7fff5fbff31e, overflow_p=0x7fff5fbff31f) at
../.././gcc/cp/semantics.c:7122
7122          if (TREE_CODE (ce->index) == COMPONENT_REF)
(gdb) were
Undefined command: "were".  Try "help".
(gdb) where
#0  cxx_eval_constant_expression (call=0x0, t=0x1425961b0,
allow_non_constant=<value temporarily unavailable, due to optimizations>,
addr=<value temporarily unavailable, due to optimizations>,
non_constant_p=0x7fff5fbff31e, overflow_p=0x7fff5fbff31f) at
../.././gcc/cp/semantics.c:7122
#1  0x00000001001bdbb2 in cxx_eval_constant_expression (call=0x0, t=0x0,
allow_non_constant=<value temporarily unavailable, due to optimizations>,
addr=<value temporarily unavailable, due to optimizations>,
non_constant_p=0x14242fee8, overflow_p=0x14258dc40) at
../.././gcc/cp/semantics.c:6791


  parent reply	other threads:[~2012-12-03 22:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23 20:14 [Bug c++/53094] New: vector literal marc.glisse at normalesup dot org
2012-11-26 23:18 ` [Bug c++/53094] " glisse at gcc dot gnu.org
2012-11-28 17:26 ` glisse at gcc dot gnu.org
2012-11-28 21:11 ` glisse at gcc dot gnu.org
2012-11-28 21:53 ` glisse at gcc dot gnu.org
2012-11-29 15:40 ` glisse at gcc dot gnu.org
2012-11-29 15:45 ` [Bug c++/53094] constexpr vector subscripting glisse at gcc dot gnu.org
2012-12-03 14:30 ` vincenzo.innocente at cern dot ch
2012-12-03 14:54 ` glisse at gcc dot gnu.org
2012-12-03 19:15 ` vincenzo.innocente at cern dot ch
2012-12-03 19:53 ` glisse at gcc dot gnu.org
2012-12-03 21:58 ` vincenzo.innocente at cern dot ch
2012-12-03 22:05 ` vincenzo.innocente at cern dot ch [this message]
2012-12-03 22:31 ` glisse at gcc dot gnu.org
2012-12-11 20:20 ` glisse at gcc dot gnu.org
2013-07-09 16:02 ` glisse at gcc dot gnu.org
2013-07-09 16:10 ` glisse at gcc dot gnu.org

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-53094-4-5DiH8CAPSD@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).