public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls
@ 2005-11-24 16:47 ghazi at gcc dot gnu dot org
2005-11-24 16:51 ` [Bug middle-end/25022] " ghazi at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-11-24 16:47 UTC (permalink / raw)
To: gcc-bugs
Given the following program:
#define _GNU_SOURCE
#include <stdio.h>
int main ()
{
fputs_unlocked("\n", stdout);
return 0;
}
GCC fails to turn fputs_unlocked into fputc_unlocked. This fails in all GCC
versions as of 3.4 through mainline, but works in gcc-3.3 so it's a regression.
The regular "locked" stdio transformation fputs->fputc works.
--
Summary: [4.2,4.1,4.0,3.4 regression] failure to transform the
unlocked stdio calls
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ghazi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
@ 2005-11-24 16:51 ` ghazi at gcc dot gnu dot org
2005-11-24 16:59 ` [Bug middle-end/25022] [3.4/4.0/4.1/4.2 " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-11-24 16:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from ghazi at gcc dot gnu dot org 2005-11-24 16:51 -------
This happens because the replacement functions are obtained in builtins.c from
the array implicit_built_in_decls. This array is initialized to null when the
replacement function is an "extension" builtin, as are all _unlocked stdio
calls. Therefore, no _unlocked calls will ever be replaced with another
_unlocked call.
I'm testing a patch.
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ghazi at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-24 16:51:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4/4.0/4.1/4.2 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
2005-11-24 16:51 ` [Bug middle-end/25022] " ghazi at gcc dot gnu dot org
@ 2005-11-24 16:59 ` pinskia at gcc dot gnu dot org
2005-11-26 1:25 ` ghazi at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-24 16:59 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2,4.1,4.0,3.4 regression]|[3.4/4.0/4.1/4.2 regression]
|failure to transform the |failure to transform the
|unlocked stdio calls |unlocked stdio calls
Target Milestone|--- |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4/4.0/4.1/4.2 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
2005-11-24 16:51 ` [Bug middle-end/25022] " ghazi at gcc dot gnu dot org
2005-11-24 16:59 ` [Bug middle-end/25022] [3.4/4.0/4.1/4.2 " pinskia at gcc dot gnu dot org
@ 2005-11-26 1:25 ` ghazi at gcc dot gnu dot org
2005-11-26 1:31 ` ghazi at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-11-26 1:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ghazi at gcc dot gnu dot org 2005-11-26 01:25 -------
Subject: Bug 25022
Author: ghazi
Date: Sat Nov 26 01:25:20 2005
New Revision: 107535
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107535
Log:
PR middle-end/25022
* builtins.c (expand_builtin_printf, expand_builtin_fprintf,
fold_builtin_fputs, fold_builtin_printf, fold_builtin_fprintf):
Lookup the explicit replacement functions for any unlocked
stdio builtin transformations.
testsuite:
* gcc.c-torture/execute/builtins/fprintf.c,
gcc.c-torture/execute/builtins/fputs-lib.c,
gcc.c-torture/execute/builtins/fputs.c,
gcc.c-torture/execute/builtins/lib/fprintf.c,
gcc.c-torture/execute/builtins/lib/printf.c,
gcc.c-torture/execute/builtins/printf.c: Test the unlocked style.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.c
trunk/gcc/testsuite/gcc.c-torture/execute/builtins/fputs-lib.c
trunk/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.c
trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/fprintf.c
trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/printf.c
trunk/gcc/testsuite/gcc.c-torture/execute/builtins/printf.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4/4.0/4.1/4.2 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-11-26 1:25 ` ghazi at gcc dot gnu dot org
@ 2005-11-26 1:31 ` ghazi at gcc dot gnu dot org
2005-11-26 3:27 ` [Bug middle-end/25022] [3.4/4.0 " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-11-26 1:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ghazi at gcc dot gnu dot org 2005-11-26 01:31 -------
Subject: Bug 25022
Author: ghazi
Date: Sat Nov 26 01:31:54 2005
New Revision: 107536
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107536
Log:
PR middle-end/25022
* builtins.c (expand_builtin_printf, expand_builtin_fprintf,
fold_builtin_fputs, fold_builtin_printf, fold_builtin_fprintf):
Lookup the explicit replacement functions for any unlocked
stdio builtin transformations.
testsuite:
* gcc.c-torture/execute/builtins/fprintf.c,
gcc.c-torture/execute/builtins/fputs-lib.c,
gcc.c-torture/execute/builtins/fputs.c,
gcc.c-torture/execute/builtins/lib/fprintf.c,
gcc.c-torture/execute/builtins/lib/printf.c,
gcc.c-torture/execute/builtins/printf.c: Test the unlocked style.
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/builtins.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/builtins/fputs-lib.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/builtins/lib/fprintf.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/builtins/lib/printf.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/builtins/printf.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4/4.0 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-11-26 1:31 ` ghazi at gcc dot gnu dot org
@ 2005-11-26 3:27 ` pinskia at gcc dot gnu dot org
2005-11-27 14:47 ` ghazi at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-26 3:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-11-26 03:27 -------
Fixed at least on the 4.1 branch and the mainline.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.1.0 4.2.0
Summary|[3.4/4.0/4.1/4.2 regression]|[3.4/4.0 regression] failure
|failure to transform the |to transform the unlocked
|unlocked stdio calls |stdio calls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4/4.0 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-11-26 3:27 ` [Bug middle-end/25022] [3.4/4.0 " pinskia at gcc dot gnu dot org
@ 2005-11-27 14:47 ` ghazi at gcc dot gnu dot org
2005-12-01 22:45 ` ghazi at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-11-27 14:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ghazi at gcc dot gnu dot org 2005-11-27 14:47 -------
4.0 patch here:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01845.html
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL|http://gcc.gnu.org/ml/gcc- |http://gcc.gnu.org/ml/gcc-
|patches/2005- |patches/2005-
|11/msg01772.html |11/msg01845.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4/4.0 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-11-27 14:47 ` ghazi at gcc dot gnu dot org
@ 2005-12-01 22:45 ` ghazi at gcc dot gnu dot org
2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-01 22:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ghazi at gcc dot gnu dot org 2005-12-01 22:45 -------
Updated 4.0 patch here:
http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00089.html
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL|http://gcc.gnu.org/ml/gcc- |http://gcc.gnu.org/ml/gcc-
|patches/2005- |patches/2005-
|11/msg01845.html |12/msg00089.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4/4.0 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-12-01 22:45 ` ghazi at gcc dot gnu dot org
@ 2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
2005-12-03 23:32 ` [Bug middle-end/25022] [3.4 " ghazi at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-02 14:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ghazi at gcc dot gnu dot org 2005-12-02 14:05 -------
Subject: Bug 25022
Author: ghazi
Date: Fri Dec 2 14:05:09 2005
New Revision: 107891
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107891
Log:
2005-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR middle-end/25022
* builtins.c (expand_builtin_printf, expand_builtin_fprintf,
fold_builtin_fputs): Lookup the explicit replacement functions
for any unlocked stdio builtin transformations.
PR middle-end/25158
* builtins.c (fold_builtin_fputs): Defer check for missing
replacement functions.
testsuite:
* gcc.c-torture/execute/builtins/fprintf.c,
gcc.c-torture/execute/builtins/fputs-lib.c,
gcc.c-torture/execute/builtins/fputs.c,
gcc.c-torture/execute/builtins/lib/fprintf.c,
gcc.c-torture/execute/builtins/lib/printf.c,
gcc.c-torture/execute/builtins/printf.c: Test the unlocked style.
Modified:
branches/gcc-4_0-branch/gcc/ChangeLog
branches/gcc-4_0-branch/gcc/builtins.c
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.c
branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/execute/builtins/fputs-lib.c
branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.c
branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/execute/builtins/lib/fprintf.c
branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/execute/builtins/lib/printf.c
branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/execute/builtins/printf.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
@ 2005-12-03 23:32 ` ghazi at gcc dot gnu dot org
2005-12-04 1:37 ` ghazi at gcc dot gnu dot org
2005-12-04 1:54 ` [Bug middle-end/25022] " ghazi at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-03 23:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from ghazi at gcc dot gnu dot org 2005-12-03 23:32 -------
3.4 patch here:
http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00284.html
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |12/msg00284.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] [3.4 regression] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-12-03 23:32 ` [Bug middle-end/25022] [3.4 " ghazi at gcc dot gnu dot org
@ 2005-12-04 1:37 ` ghazi at gcc dot gnu dot org
2005-12-04 1:54 ` [Bug middle-end/25022] " ghazi at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-04 1:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ghazi at gcc dot gnu dot org 2005-12-04 01:37 -------
Subject: Bug 25022
Author: ghazi
Date: Sun Dec 4 01:37:23 2005
New Revision: 108010
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108010
Log:
2005-12-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR middle-end/25022
* builtins.c (expand_builtin_fputs, expand_builtin_printf,
expand_builtin_fprintf): Lookup the explicit replacement functions
for any unlocked stdio builtin transformations.
* builtins.c (expand_builtin_fputs): Defer check for missing
replacement functions.
testsuite:
* gcc.c-torture/execute/stdio-opt-1.c,
gcc.c-torture/execute/stdio-opt-2.c,
gcc.c-torture/execute/stdio-opt-3.c: Test the unlocked style.
Modified:
branches/gcc-3_4-branch/gcc/ChangeLog
branches/gcc-3_4-branch/gcc/builtins.c
branches/gcc-3_4-branch/gcc/testsuite/ChangeLog
branches/gcc-3_4-branch/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c
branches/gcc-3_4-branch/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c
branches/gcc-3_4-branch/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/25022] failure to transform the unlocked stdio calls
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-12-04 1:37 ` ghazi at gcc dot gnu dot org
@ 2005-12-04 1:54 ` ghazi at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-04 1:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from ghazi at gcc dot gnu dot org 2005-12-04 01:54 -------
Fixed on all active branches
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL|http://gcc.gnu.org/ml/gcc- |
|patches/2005- |
|12/msg00284.html |
Status|ASSIGNED |RESOLVED
Known to fail|3.4.5 |
Known to work|4.0.3 4.1.0 4.2.0 |3.4.5 4.0.3 4.1.0 4.2.0
Resolution| |FIXED
Summary|[3.4 regression] failure to |failure to transform the
|transform the unlocked stdio|unlocked stdio calls
|calls |
Target Milestone|4.0.3 |3.4.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25022
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-12-04 1:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-24 16:47 [Bug middle-end/25022] New: [4.2,4.1,4.0,3.4 regression] failure to transform the unlocked stdio calls ghazi at gcc dot gnu dot org
2005-11-24 16:51 ` [Bug middle-end/25022] " ghazi at gcc dot gnu dot org
2005-11-24 16:59 ` [Bug middle-end/25022] [3.4/4.0/4.1/4.2 " pinskia at gcc dot gnu dot org
2005-11-26 1:25 ` ghazi at gcc dot gnu dot org
2005-11-26 1:31 ` ghazi at gcc dot gnu dot org
2005-11-26 3:27 ` [Bug middle-end/25022] [3.4/4.0 " pinskia at gcc dot gnu dot org
2005-11-27 14:47 ` ghazi at gcc dot gnu dot org
2005-12-01 22:45 ` ghazi at gcc dot gnu dot org
2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
2005-12-03 23:32 ` [Bug middle-end/25022] [3.4 " ghazi at gcc dot gnu dot org
2005-12-04 1:37 ` ghazi at gcc dot gnu dot org
2005-12-04 1:54 ` [Bug middle-end/25022] " ghazi at gcc dot gnu dot org
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).