This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/705: Performance regression with glibc's strcpy macro
- To: gcc-gnats at gcc dot gnu dot org
- Subject: optimization/705: Performance regression with glibc's strcpy macro
- From: Joseph Myers <jsm28 at cam dot ac dot uk>
- Date: Sun, 29 Oct 2000 00:07:19 +0000
- Cc: jsm28 at cam dot ac dot uk
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, Joseph Myers <jsm28@cam.ac.uk>
>Number: 705
>Category: optimization
>Synopsis: Performance regression with glibc's strcpy macro
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Sat Oct 28 17:16:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Joseph S. Myers
>Release: 2.97 20001028 (experimental)
>Organization:
none
>Environment:
System: Linux decomino 2.2.17 #1 Mon Sep 4 20:22:16 UTC 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
>Description:
GCC has a code quality regression relative to 2.95.2 in its handling
of glibc's strcpy macro.
>How-To-Repeat:
See preprocessed source and sample assembler output at
http://gcc.gnu.org/ml/gcc-bugs/2000-10/msg00571.html
>Fix:
Fix constant folding for
(((char *)&"Foobar"[1]) - (char *)&"Foobar"[0]) == 1
(Desirable as well but not needed as part of the fix for this PR and
listed as projects in projects.html: make GCC's builtin strcpy do what
the macro tries to do; avoid output of unused string constants,
including those that get eliminated from macros or builtins like this.
Even if GCC gets a good builtin, the constant folding problem should
be fixed as well.)
>Release-Note:
>Audit-Trail:
>Unformatted: