public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53017] New: Integer constant not constant enough for vector_size
@ 2012-04-17 11:15 marc.glisse at normalesup dot org
  2012-04-17 11:25 ` [Bug c++/53017] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: marc.glisse at normalesup dot org @ 2012-04-17 11:15 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53017
           Summary: Integer constant not constant enough for vector_size
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


In the following code, s is apparently not an acceptable parameter for the
vector_size attribute, but s+0 is.

constexpr int s=32;
typedef double VEC __attribute__ ((__vector_size__ (s
#ifndef BUG
        + 0
#endif
        )));

VEC a={2.,3.,4.};



$ g++ -std=c++0x v.cc -Wall -W -c -O3 
$ g++ -std=c++0x v.cc -Wall -W -c -O3 -DBUG
v.cc:6:4: warning: '__vector_size__' attribute ignored [-Wattributes]
v.cc:8:16: error: scalar object 'a' requires one element in initializer


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

* [Bug c++/53017] Integer constant not constant enough for vector_size
  2012-04-17 11:15 [Bug c++/53017] New: Integer constant not constant enough for vector_size marc.glisse at normalesup dot org
@ 2012-04-17 11:25 ` rguenth at gcc dot gnu.org
  2014-02-03 19:08 ` [Bug c++/53017] Integer constant expression " glisse at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-17 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-17
     Ever Confirmed|0                           |1
      Known to fail|                            |4.6.0

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-17 11:24:15 UTC ---
Confirmed.  Fails since constexpr.


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

* [Bug c++/53017] Integer constant expression not constant enough for vector_size
  2012-04-17 11:15 [Bug c++/53017] New: Integer constant not constant enough for vector_size marc.glisse at normalesup dot org
  2012-04-17 11:25 ` [Bug c++/53017] " rguenth at gcc dot gnu.org
@ 2014-02-03 19:08 ` glisse at gcc dot gnu.org
  2014-02-03 19:10 ` glisse at gcc dot gnu.org
  2015-03-25 19:51 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-02-03 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Mon Feb  3 19:07:55 2014
New Revision: 207436

URL: http://gcc.gnu.org/viewcvs?rev=207436&root=gcc&view=rev
Log:
2014-02-03  Marc Glisse  <marc.glisse@inria.fr>

    PR c++/53017
    PR c++/59211
gcc/c-family/
    * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
    handle_vector_size_attribute, handle_nonnull_attribute): Call
    default_conversion on the attribute argument.
    (handle_nonnull_attribute): Increment the argument number.
gcc/cp/
    * tree.c (handle_init_priority_attribute): Call default_conversion on
    the attribute argument.
gcc/
    * doc/extend.texi (Function Attributes): Typo.
gcc/testsuite/
    * c-c++-common/attributes-1.c: New testcase.
    * g++.dg/cpp0x/constexpr-attribute2.C: Likewise.


Added:
    trunk/gcc/testsuite/c-c++-common/attributes-1.c   (with props)
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C   (with props)
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/doc/extend.texi
    trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/c-c++-common/attributes-1.c
            ('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/c-c++-common/attributes-1.c
            ('svn:keywords' added)

Propchange: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C
            ('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C
            ('svn:keywords' added)


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

* [Bug c++/53017] Integer constant expression not constant enough for vector_size
  2012-04-17 11:15 [Bug c++/53017] New: Integer constant not constant enough for vector_size marc.glisse at normalesup dot org
  2012-04-17 11:25 ` [Bug c++/53017] " rguenth at gcc dot gnu.org
  2014-02-03 19:08 ` [Bug c++/53017] Integer constant expression " glisse at gcc dot gnu.org
@ 2014-02-03 19:10 ` glisse at gcc dot gnu.org
  2015-03-25 19:51 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-02-03 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.9.0
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
.


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

* [Bug c++/53017] Integer constant expression not constant enough for vector_size
  2012-04-17 11:15 [Bug c++/53017] New: Integer constant not constant enough for vector_size marc.glisse at normalesup dot org
                   ` (2 preceding siblings ...)
  2014-02-03 19:10 ` glisse at gcc dot gnu.org
@ 2015-03-25 19:51 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-25 19:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aanisimov at inbox dot ru

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
*** Bug 55382 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2015-03-25 19:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 11:15 [Bug c++/53017] New: Integer constant not constant enough for vector_size marc.glisse at normalesup dot org
2012-04-17 11:25 ` [Bug c++/53017] " rguenth at gcc dot gnu.org
2014-02-03 19:08 ` [Bug c++/53017] Integer constant expression " glisse at gcc dot gnu.org
2014-02-03 19:10 ` glisse at gcc dot gnu.org
2015-03-25 19:51 ` 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).