LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 17453 - support for __attribute__((mode())) with vector types
Summary: support for __attribute__((mode())) with vector types
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Frontend (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Alexey Frolov
URL:
Keywords: missing-feature
Depends on:
Blocks:
 
Reported: 2013-10-02 17:30 PDT by reed kotler
Modified: 2015-06-19 02:49 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
gcc test (3.65 KB, text/x-csrc)
2013-10-02 17:30 PDT, reed kotler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description reed kotler 2013-10-02 17:30:26 PDT
Created attachment 11330 [details]
gcc test

rkotler@mipssw006:~/rt-rk-4doug/tmp$  ~/llvmw/install/bin/clang ../tests-c/pr23135.c -std=gnu89 -lm
../tests-c/pr23135.c:10:28: error: mode attribute only supported for integer
      and floating-point types
typedef int __attribute__((mode(SI))) __attribute__((vector_size (8))) vecint;
                           ^
../tests-c/pr23135.c:13:19: warning: excess elements in scalar initializer
vecint i = { 150, 100 };
                  ^~~
../tests-c/pr23135.c:14:18: warning: excess elements in scalar initializer
vecint j = { 10, 13 };
                 ^~
../tests-c/pr23135.c:27:5: warning: implicitly declaring library function
      'abort' with type 'void (void) __attribute__((noreturn))'
    abort ();
    ^
../tests-c/pr23135.c:27:5: note: please include the header <stdlib.h> or
      explicitly provide a declaration for 'abort'
../tests-c/pr23135.c:133:3: warning: implicitly declaring library function
      'exit' with type 'void (int) __attribute__((noreturn))'
  exit (0);
  ^
../tests-c/pr23135.c:133:3: note: please include the header <stdlib.h> or
      explicitly provide a declaration for 'exit'
4 warnings and 1 error generated.
rkotler@mipssw006:~/rt-rk-4doug/tmp$
Comment 1 Chris Lattner 2013-10-03 00:26:27 PDT
It isn't clear that we want to support this.  Our goal is not to pass the GCC testsuite.
Comment 2 Alexey Frolov 2015-05-26 04:23:03 PDT
Reproducable in trunk. Mode attribute is not working with vector types.
I'm going to handle this one if there are no objections.

Alexey Frolov
=============
Software Engineer
Intel Compiler Team
Intel
Comment 3 Alexey Frolov 2015-06-19 02:49:00 PDT
Fixed in r240125.

Alexey Frolov
=============
Software Engineer
Intel Compiler Team
Intel