public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/25158]  New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
@ 2005-11-29 18:26 danglin at gcc dot gnu dot org
  2005-11-29 20:44 ` [Bug middle-end/25158] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: danglin at gcc dot gnu dot org @ 2005-11-29 18:26 UTC (permalink / raw)
  To: gcc-bugs

At all optimizations:

Executing on host: /mnt/gnu/gcc-3.3/objdir/gcc/xgcc
-B/mnt/gnu/gcc-3.3/objdir/gc
c/ /mnt/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.c
/
mnt/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf-lib.c
/
mnt/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c  -w
 -O0  -fno-show-column  -lm   -o
/mnt/gnu/gcc-3.3/objdir/gcc/testsuite/fprintf.x
0    (timeout = 300)
/usr/bin/ld: Unsatisfied symbols:
   fputs_unlocked (first referenced in /var/tmp//ccgYoZcc.o) (code)
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/bin/ld: Unsatisfied symbols:
   fputs_unlocked (first referenced in /var/tmp//ccgYoZcc.o) (code)
collect2: ld returned 1 exit status

FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation,  -O0
UNRESOLVED: gcc.c-torture/execute/builtins/fprintf.c execution,  -O0


-- 
           Summary: FAIL: gcc.c-torture/execute/builtins/fprintf.c
                    compilation
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa2.0w-hp-hpux11.11
  GCC host triplet: hppa2.0w-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11


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


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
@ 2005-11-29 20:44 ` pinskia at gcc dot gnu dot org
  2005-11-29 21:46 ` ghazi at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-29 20:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-29 20:44 -------
I would assume this was caused by the patch which fixed PR 25022.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ghazi at gcc dot gnu dot org


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


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
  2005-11-29 20:44 ` [Bug middle-end/25158] " pinskia at gcc dot gnu dot org
@ 2005-11-29 21:46 ` ghazi at gcc dot gnu dot org
  2005-12-01  0:05 ` ghazi at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-11-29 21:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ghazi at gcc dot gnu dot org  2005-11-29 21:46 -------
Hmm this is convoluted, but I think I know what's going on:

We're running the builtin fprintf check.  I recently added a small sanity check
to ensure that fprintf_unlocked also works.  Now we're getting an unresolved
symbol calling fputs_unlocked.

But to ensure that these _unlocked style calls don't result in unresolved
symbols I had only added cases that should have been completely optimized away.
 E.g. fprintf_unlocked(stream, "") which should become nothing.

Now hpux defines DONT_HAVE_FPUTC_UNLOCKED, notice that's fputC_unlocked not
fputS_unlocked which is the unresolved symbol we get.  But we have this code at
the top of fold_builtin_fputs:

  /* If the return value is used, or the replacement _DECL isn't
     initialized, don't do the transformation.  */
  if (!ignore || !fn_fputc || !fn_fwrite)
    return 0;

So the solution is to split these checks and move the !fn_fputc || !fn_fwrite
check later on where we actually attempt to use them.  That way the path which
eliminates zero-length strings will still be executed.

I'll put together 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-29 21:46:13
               date|                            |


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


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
  2005-11-29 20:44 ` [Bug middle-end/25158] " pinskia at gcc dot gnu dot org
  2005-11-29 21:46 ` ghazi at gcc dot gnu dot org
@ 2005-12-01  0:05 ` ghazi at gcc dot gnu dot org
  2005-12-01  2:31 ` ghazi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-01  0:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ghazi at gcc dot gnu dot org  2005-12-01 00:05 -------
Patch here:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg02127.html


-- 

ghazi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |11/msg02127.html
      Known to fail|                            |4.1.0 4.2.0


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


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-12-01  0:05 ` ghazi at gcc dot gnu dot org
@ 2005-12-01  2:31 ` ghazi at gcc dot gnu dot org
  2005-12-01  2:33 ` ghazi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-01  2:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ghazi at gcc dot gnu dot org  2005-12-01 02:31 -------
Subject: Bug 25158

Author: ghazi
Date: Thu Dec  1 02:31:49 2005
New Revision: 107762

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107762
Log:
        PR middle-end/25158
        * builtins.c (fold_builtin_fputs): Defer check for missing
        replacement functions.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c


-- 


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


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-12-01  2:31 ` ghazi at gcc dot gnu dot org
@ 2005-12-01  2:33 ` ghazi at gcc dot gnu dot org
  2005-12-01 22:24 ` ghazi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-01  2:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ghazi at gcc dot gnu dot org  2005-12-01 02:33 -------
Subject: Bug 25158

Author: ghazi
Date: Thu Dec  1 02:32:58 2005
New Revision: 107763

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107763
Log:
        PR middle-end/25158
        * builtins.c (fold_builtin_fputs): Defer check for missing
        replacement functions.


Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/builtins.c


-- 


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


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-12-01  2:33 ` ghazi at gcc dot gnu dot org
@ 2005-12-01 22:24 ` ghazi at gcc dot gnu dot org
  2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
  2005-12-12 20:13 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2005-12-01 22:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ghazi at gcc dot gnu dot org  2005-12-01 22:24 -------
Fixed, clean test results here:
http://gcc.gnu.org/ml/gcc-testresults/2005-12/msg00028.html


-- 

ghazi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/gcc-  |
                   |patches/2005-               |
                   |11/msg02127.html            |
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-12-01 22:24 ` ghazi at gcc dot gnu dot org
@ 2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
  2005-12-12 20:13 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ 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 25158

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=25158


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

* [Bug middle-end/25158] FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation
  2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
@ 2005-12-12 20:13 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-12 20:13 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.3


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


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

end of thread, other threads:[~2005-12-12 20:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-29 18:26 [Bug middle-end/25158] New: FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation danglin at gcc dot gnu dot org
2005-11-29 20:44 ` [Bug middle-end/25158] " pinskia at gcc dot gnu dot org
2005-11-29 21:46 ` ghazi at gcc dot gnu dot org
2005-12-01  0:05 ` ghazi at gcc dot gnu dot org
2005-12-01  2:31 ` ghazi at gcc dot gnu dot org
2005-12-01  2:33 ` ghazi at gcc dot gnu dot org
2005-12-01 22:24 ` ghazi at gcc dot gnu dot org
2005-12-02 14:05 ` ghazi at gcc dot gnu dot org
2005-12-12 20:13 ` pinskia 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).