[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#267206: marked as done (gcc-3.4: vector op code generation regression)



Your message dated Sun, 21 Nov 2004 10:18:42 +0100
with message-id <16800.23922.64785.357879@gargle.gargle.HOWL>
and subject line fixed in gcc-3.4.3: vector op code generation regression
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 21 Aug 2004 05:44:18 +0000
>From jivera@flame.org Fri Aug 20 22:44:17 2004
Return-path: <jivera@flame.org>
Received: from kechara-p.flame.org (kechara.flame.org) [204.152.189.135] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1ByOfp-0000fE-00; Fri, 20 Aug 2004 22:44:17 -0700
Received: (qmail 27593 invoked by uid 323); 21 Aug 2004 05:43:47 -0000
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gcc-3.4: vector op code generation regression
X-Debbugs-CC: Matthew Dempsky <jivera@flame.org>
From: Matthew Dempsky <jivera@flame.org>
Date: Sat, 21 Aug 2004 00:44:03 -0500
Message-ID: <87pt5lavvg.fsf@flame.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	X_DEBBUGS_CC autolearn=ham version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: gcc-3.4
Version: 3.4.1-4sarge1
Severity: normal

I'm compiling the following code example under both gcc 3.3.4-2 and
3.4.1-4sarge1:

    #include <stdio.h>
    
    typedef int v4si __attribute__ ((mode(V4SI)));
    
    static void
    print_v4si (const char * name, v4si val)
    {
      int x;
    
      printf ("%s:\n", name);
      for (x = 0; x < 4; ++x)
        printf ("  vals[%d] = %d\n", x, ((int *)&val)[x]);
      printf ("\n");
    }
    
    int
    main ()
    {
      v4si a = { 1, 2, 3, 4 };
      v4si b = { 2, 3, 4, 5 };
    
      print_v4si ("a", a);
      print_v4si ("b", b);
      print_v4si ("a+b", a + b);
    
      return 0;
    }

And here are some shell outputs compiling with 3.3 and 3.4 with and
without sse (along with running the results and commentary):

    $ gcc-3.3 foo.c -o foo-3.3
    foo.c: In function `print_v4si':
    foo.c:14: internal compiler error: in ix86_function_arg_boundary, at config/i386/i386.c:2476
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://gcc.gnu.org/bugs.html> for instructions.
    For Debian GNU/Linux specific bug reporting instructions, see
    <URL:file:///usr/share/doc/gcc-3.3/README.Bugs>.

This is wrong, but it seems fixed in 3.4:

    $ gcc-3.4 foo.c -o foo-3.4
    foo.c: In function `print_v4si':
    foo.c:7: warning: SSE vector argument without SSE enabled changes the ABI
    foo.c: In function `main':
    foo.c:22: warning: SSE vector argument without SSE enabled changes the ABI
    foo.c:23: warning: SSE vector argument without SSE enabled changes the ABI
    foo.c:24: warning: SSE vector argument without SSE enabled changes the ABI
    $ ./foo-3.4
    a:
      vals[0] = 1
      vals[1] = 2
      vals[2] = 3
      vals[3] = 4
    
    b:
      vals[0] = 2
      vals[1] = 3
      vals[2] = 4
      vals[3] = 5
    
    a+b:
      vals[0] = 3
      vals[1] = 5
      vals[2] = 7
      vals[3] = 9

Only nuissance is that the warnings seems superfluous (others may
disagree).

    $ gcc-3.3 foo.c -o foo-3.3-sse -msse
    $ ./foo-3.3-sse
    a:
      vals[0] = 1
      vals[1] = 2
      vals[2] = 3
      vals[3] = 4
    
    b:
      vals[0] = 2
      vals[1] = 3
      vals[2] = 4
      vals[3] = 5
    
    a+b:
      vals[0] = 3
      vals[1] = 5
      vals[2] = 7
      vals[3] = 9

This is correct.

    $ gcc-3.4 foo.c -o foo-3.4-sse -msse
    $ ./foo-3.4-sse
    a:
      vals[0] = 1
      vals[1] = 2
      vals[2] = 1
      vals[3] = -1073743580
    
    b:
      vals[0] = 2
      vals[1] = 3
      vals[2] = 1
      vals[3] = -1073743580
    
    a+b:
      vals[0] = 3
      vals[1] = 5
      vals[2] = 1
      vals[3] = -1073743580

No warning, but the generated code seems incorrect (or at least a
regression from 3.3) unless ((int *)&val)[x] isn't the correct
portable way to access a vector element, but there doesn't seem to be
an alternative that I've been able to deduce (and the documentation
doesn't list any).

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages gcc-3.4 depends on:
ii  binutils                 2.14.90.0.7-8   The GNU assembler, linker and bina
ii  cpp-3.4                  3.4.1-4sarge1   The GNU C preprocessor
ii  gcc-3.4-base             3.4.1-4sarge1   The GNU Compiler Collection (base 
ii  libc6                    2.3.2.ds1-13    GNU C Library: Shared libraries an
ii  libgcc1                  1:3.4.1-4sarge1 GCC support library

-- no debconf information

---------------------------------------
Received: (at 267206-done) by bugs.debian.org; 21 Nov 2004 09:18:46 +0000
>From doko@cs.tu-berlin.de Sun Nov 21 01:18:46 2004
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [130.149.17.13] (root)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CVnrp-0005MW-00; Sun, 21 Nov 2004 01:18:46 -0800
Received: from mailhost.cs.tu-berlin.de (postfix@mail.cs.tu-berlin.de [130.149.17.13])
	by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id KAA16982
	for <267206-done@bugs.debian.org>; Sun, 21 Nov 2004 10:18:43 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
	by mailhost.cs.tu-berlin.de (Postfix) with ESMTP id 1719BF21A
	for <267206-done@bugs.debian.org>; Sun, 21 Nov 2004 10:18:43 +0100 (MET)
Received: from mailhost.cs.tu-berlin.de ([127.0.0.1])
 by localhost (bueno [127.0.0.1]) (amavisd-new, port 10224) with ESMTP
 id 04389-06 for <267206-done@bugs.debian.org>;
 Sun, 21 Nov 2004 10:18:42 +0100 (MET)
Received: from bolero.cs.tu-berlin.de (bolero.cs.tu-berlin.de [130.149.19.1])
	by mailhost.cs.tu-berlin.de (Postfix) with ESMTP
	for <267206-done@bugs.debian.org>; Sun, 21 Nov 2004 10:18:42 +0100 (MET)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.12.10+Sun/8.12.8/Submit) id iAL9IgJ3003021;
	Sun, 21 Nov 2004 10:18:42 +0100 (MET)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <16800.23922.64785.357879@gargle.gargle.HOWL>
Date: Sun, 21 Nov 2004 10:18:42 +0100
To: 267206-done@bugs.debian.org
Subject: fixed in gcc-3.4.3: vector op code generation regression
X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid
X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de
Delivered-To: 267206-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

fixed in gcc-3.4.3: vector op code generation regression



Reply to: