public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51700] New: Cannot subscript packed vector type in g++ (works in C)
@ 2011-12-29 10:15 nicholasbishop at gmail dot com
  2011-12-29 10:32 ` [Bug c++/51700] " marc.glisse at normalesup dot org
  2011-12-29 14:35 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: nicholasbishop at gmail dot com @ 2011-12-29 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51700
           Summary: Cannot subscript packed vector type in g++ (works in
                    C)
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nicholasbishop@gmail.com


Example code (full program):

typedef int v4si __attribute__ ((vector_size (16)));
int main() {
    v4si x;
    x[0] = 33;
    return 0;
}

Compiling with gcc produces a working program and no console output, but g++
complains:
$ gcc -Wall -Wextra vecbug.c 
$ g++ -Wall -Wextra vecbug.c 
vecbug.c: In function ‘int main()’:
vecbug.c:4:5: error: invalid types ‘v4si {aka __vector(4) int}[int]’ for array
subscript

Verbose output:
$ g++ -v -Wall -Wextra vecbug.c

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 
COLLECT_GCC_OPTIONS='-v' '-Wall' '-Wextra' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1plus -quiet -v -imultilib . -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE vecbug.c -quiet -dumpbase vecbug.c
-mtune=generic -march=x86-64 -auxbase vecbug -Wall -Wextra -version
-fstack-protector -o /tmp/ccNwRhl7.s
GNU C++ (Ubuntu/Linaro 4.6.1-9ubuntu3) version 4.6.1 (x86_64-linux-gnu)
    compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.6
 /usr/include/c++/4.6/x86_64-linux-gnu/.
 /usr/include/c++/4.6/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (Ubuntu/Linaro 4.6.1-9ubuntu3) version 4.6.1 (x86_64-linux-gnu)
    compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 63a745aba0054d1605090177d8e4bbb4
vecbug.c: In function ‘int main()’:
vecbug.c:4:5: error: invalid types ‘v4si {aka __vector(4) int}[int]’ for array
subscript


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

* [Bug c++/51700] Cannot subscript packed vector type in g++ (works in C)
  2011-12-29 10:15 [Bug c++/51700] New: Cannot subscript packed vector type in g++ (works in C) nicholasbishop at gmail dot com
@ 2011-12-29 10:32 ` marc.glisse at normalesup dot org
  2011-12-29 14:35 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-12-29 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #1 from Marc Glisse <marc.glisse at normalesup dot org> 2011-12-29 10:16:38 UTC ---
Dup of Bug 51033 ?


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

* [Bug c++/51700] Cannot subscript packed vector type in g++ (works in C)
  2011-12-29 10:15 [Bug c++/51700] New: Cannot subscript packed vector type in g++ (works in C) nicholasbishop at gmail dot com
  2011-12-29 10:32 ` [Bug c++/51700] " marc.glisse at normalesup dot org
@ 2011-12-29 14:35 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-29 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-29 10:31:30 UTC ---
Yes, thanks.

*** This bug has been marked as a duplicate of bug 51033 ***


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

end of thread, other threads:[~2011-12-29 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-29 10:15 [Bug c++/51700] New: Cannot subscript packed vector type in g++ (works in C) nicholasbishop at gmail dot com
2011-12-29 10:32 ` [Bug c++/51700] " marc.glisse at normalesup dot org
2011-12-29 14:35 ` 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).