From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2892 invoked by alias); 4 Feb 2003 18:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 2872 invoked by uid 71); 4 Feb 2003 18:26:01 -0000 Resent-Date: 4 Feb 2003 18:26:01 -0000 Resent-Message-ID: <20030204182601.2871.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, stefaandr@hotmail.com Received: (qmail 2799 invoked by uid 48); 4 Feb 2003 18:25:49 -0000 Message-Id: <20030204182549.2798.qmail@sources.redhat.com> Date: Tue, 04 Feb 2003 18:26:00 -0000 From: stefaandr@hotmail.com Reply-To: stefaandr@hotmail.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9573: typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class X-SW-Source: 2003-02/txt/msg00208.txt.bz2 List-Id: >Number: 9573 >Category: c++ >Synopsis: typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Feb 04 18:26:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: stefaandr@hotmail.com >Release: gcc version 3.4 20030204 (experimental) >Organization: >Environment: Redhat 8.0 Reading specs from /esat/quendi/stefaan/install/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs Configured with: ../../src/gcc/configure --enable-languages=c,c++ --prefix=/esat/quendi/stefaan/install Thread model: posix gcc version 3.4 20030204 (experimental) /esat/quendi/stefaan/install/lib/gcc-lib/i686-pc-linux-gnu/3.4/cc1plus -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=4 -D__GNUC_PATCHLEVEL__=0 -D_GNU_SOURCE test16.cpp -D__GNUG__=3 -quiet -dumpbase test16.cpp -msse -auxbase-strip test16.s -O3 -version -o test16.s GNU C++ version 3.4 20030204 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 3.2.1. ignoring nonexistent directory "/esat/quendi/stefaan/install/i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /esat/quendi/stefaan/install/include/c++/3.4 /esat/quendi/stefaan/install/include/c++/3.4/i686-pc-linux-gnu /esat/quendi/stefaan/install/include/c++/3.4/backward /usr/local/include /esat/quendi/stefaan/install/include /esat/quendi/stefaan/install/lib/gcc-lib/i686-pc-linux-gnu/3.4/include /usr/include End of search list. >Description: Compiling this code: (g++ -msse) struct v8qi { typedef int T __attribute__ ((mode(V8QI))); v8qi() { long long int tmp; __builtin_ia32_punpckhbw((T) tmp, (T) tmp); }; }; does NOT work. The error is: test16.cpp:5: error: cannot convert `int' to `vector signed char' for argument `1' to `vector signed char __builtin_ia32_punpckhbw(vector signed char, vector signed char)' But when you move the typedef out of the struct, you get this: typedef int T __attribute__ ((mode(V8QI))); struct v8qi { v8qi() { long long int tmp; __builtin_ia32_punpckhbw((T) tmp, (T) tmp); }; }; which DOES compile!! It seems that using __attribute__ ((mode(..))) on a typedef inside a struct/class does not work. Any ideas? >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: