This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/70584] constexpr variables cannot be used as intrinsic arguments where an immediate is expected


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-04-09
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |5.3.0, 6.0

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed with the following reduced test case. The code compiles in C++ 11
mode but not in C++ 14 mode.  Removing the parentheses around index also seems
to work as shown below.

$ cat t.c && /home/msebor/build/gcc-trunk-git/gcc/xgcc
-B/home/msebor/build/gcc-trunk-git/gcc -S -Wall -Wextra -Wpedantic -m32 -maes
-xc++ t.ctypedef long long __m128i __attribute__ ((__vector_size__ (16),
__may_alias__));

int main()
{
    constexpr char index = 1;

    __m128i r = { };

    r = __builtin_ia32_aeskeygenassist128 (r, (int)index);
    r = __builtin_ia32_aeskeygenassist128 (r, (int)(index));
}

t.c: In function âint main()â:
t.c:10:60: error: the last argument must be an 8-bit immediate
     r = __builtin_ia32_aeskeygenassist128 (r, (int)(index));
                                                            ^

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]