public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution
@ 2011-03-20 15:23 danglin at gcc dot gnu.org
  2011-03-20 19:38 ` [Bug middle-end/48209] " jakub at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: danglin at gcc dot gnu.org @ 2011-03-20 15:23 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: FAIL: gcc.c-torture/execute/pr47917.c execution
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: danglin@gcc.gnu.org
                CC: jakub@gcc.gnu.org
              Host: hppa2.0w-hp-hpux11.11
            Target: hppa2.0w-hp-hpux11.11
             Build: hppa2.0w-hp-hpux11.11


Executing on host: /test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/
/te
st/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr47917.c  -w  -O0   -lm  
-o
 /test/gnu/gcc/objdir/gcc/testsuite/gcc/pr47917.x0    (timeout = 300)
PASS: gcc.c-torture/execute/pr47917.c compilation,  -O0 
Setting LD_LIBRARY_PATH to :/test/gnu/gcc/objdir/gcc::/test/gnu/gcc/objdir/gcc
FAIL: gcc.c-torture/execute/pr47917.c execution,  -O0 

The second and fourth uses of snprintf are not optimized..  The HP-UX
11.11 version of snprintf returns a negative value when the result doesn't
fit in the supplied buffer.  This causes the test to fail.


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

* [Bug middle-end/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
@ 2011-03-20 19:38 ` jakub at gcc dot gnu.org
  2011-03-21 21:49 ` [Bug target/48209] " sje at cup dot hp.com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-20 19:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-20 18:53:09 UTC ---
That's a clear violation of ISO C99, so you probably want to xfail the testcase
for hpux.


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
  2011-03-20 19:38 ` [Bug middle-end/48209] " jakub at gcc dot gnu.org
@ 2011-03-21 21:49 ` sje at cup dot hp.com
  2011-03-22  0:30 ` dave at hiauly1 dot hia.nrc.ca
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp.com @ 2011-03-21 21:49 UTC (permalink / raw)
  To: gcc-bugs

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

Steve Ellcey <sje at cup dot hp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sje at cup dot hp.com

--- Comment #2 from Steve Ellcey <sje at cup dot hp.com> 2011-03-21 21:42:02 UTC ---
It looks like this is broken for HP-UX 11.11 and 11.23.  On 11.31 there is a
object that can be linked in (unix2003.o) to fix this.   Just like we currently
link in unix95.0 or unix98.o for UNIX 1995 or UNIX 1998 standards, if you link
in unix2003.o then you will get the UNIX 2003 standard and the correct C99
handling of snprintf.


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
  2011-03-20 19:38 ` [Bug middle-end/48209] " jakub at gcc dot gnu.org
  2011-03-21 21:49 ` [Bug target/48209] " sje at cup dot hp.com
@ 2011-03-22  0:30 ` dave at hiauly1 dot hia.nrc.ca
  2011-03-22 16:57 ` sje at cup dot hp.com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dave at hiauly1 dot hia.nrc.ca @ 2011-03-22  0:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from dave at hiauly1 dot hia.nrc.ca 2011-03-21 23:03:11 UTC ---
> It looks like this is broken for HP-UX 11.11 and 11.23.  On 11.31 there is a
> object that can be linked in (unix2003.o) to fix this.   Just like we currently
> link in unix95.0 or unix98.o for UNIX 1995 or UNIX 1998 standards, if you link
> in unix2003.o then you will get the UNIX 2003 standard and the correct C99
> handling of snprintf.

That's good to know.  We should add 11.31 support and make lonking
with unix2003.o the default.

So, we have:
HP-UX 10.*: no snprintf
HP-UX 11.[0-2]*": non standard snprintf
HP-UX 11.31: C99 snprintf with unix2003.o

In my opinion, the testcase should be testing the GCC implementation
of snprintf.  If any of the four cases are not optimized by GCC, they
should be removed.  The HP-UX issues with snprintf aren't unique from
what I see on the net.

Dave


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-03-22  0:30 ` dave at hiauly1 dot hia.nrc.ca
@ 2011-03-22 16:57 ` sje at cup dot hp.com
  2011-03-22 17:05 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp.com @ 2011-03-22 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Steve Ellcey <sje at cup dot hp.com> 2011-03-22 16:20:15 UTC ---
I agree.  The test is not verifying whether or not snprintf is getting inlined
and that was what bug 47917 was about.  This should be a compile test that
looks for snprintf in the assembly code after compilation to verify that the
call was inlined.

In running this test on IA64 and x86, the first call is the only one that I see
getting inlined on both platforms at all optimization levels.


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-03-22 16:57 ` sje at cup dot hp.com
@ 2011-03-22 17:05 ` jakub at gcc dot gnu.org
  2011-03-22 17:13 ` sje at cup dot hp.com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-22 17:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-22 16:31:12 UTC ---
I strongly disagree.  The test is testing also whether the optimization works
correctly.  Feel free to xfail the test on targets that don't have C99
compliant snprintf, but on targets that do have it the test should test it as
it does currently.


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-03-22 17:05 ` jakub at gcc dot gnu.org
@ 2011-03-22 17:13 ` sje at cup dot hp.com
  2011-03-22 17:59 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp.com @ 2011-03-22 17:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Steve Ellcey <sje at cup dot hp.com> 2011-03-22 16:59:03 UTC ---

I guess we disagree on what the test should be doing.  I agree that it is a
valid test for showing that nothing gets broken when doing the optimization,
but it is not a test that shows that the optimization is actually happening
(unless I am missing something).  If something were to change in GCC and we
stopped inlining snprintf, this test would continue to pass and we would not
know that we had a performance regression.


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-03-22 17:13 ` sje at cup dot hp.com
@ 2011-03-22 17:59 ` jakub at gcc dot gnu.org
  2011-03-22 18:51 ` sje at cup dot hp.com
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-22 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-22 17:07:08 UTC ---
We have gcc.dg/pr47917.c test for that purpose.


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-03-22 17:59 ` jakub at gcc dot gnu.org
@ 2011-03-22 18:51 ` sje at cup dot hp.com
  2011-03-22 20:07 ` dave at hiauly1 dot hia.nrc.ca
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp.com @ 2011-03-22 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Steve Ellcey <sje at cup dot hp.com> 2011-03-22 17:13:29 UTC ---
OK, that is what I was missing.  I didn't notice there was a second test to
check for that, sorry for the confusion.


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-03-22 18:51 ` sje at cup dot hp.com
@ 2011-03-22 20:07 ` dave at hiauly1 dot hia.nrc.ca
  2011-03-22 20:16 ` sje at cup dot hp.com
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dave at hiauly1 dot hia.nrc.ca @ 2011-03-22 20:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from dave at hiauly1 dot hia.nrc.ca 2011-03-22 19:01:21 UTC ---
On Tue, 22 Mar 2011, sje at cup dot hp.com wrote:

> In running this test on IA64 and x86, the first call is the only one that I see
> getting inlined on both platforms at all optimization levels.

Interesting, the revised test below passes on hppa64-hp-hpux11.11.  So,
there is some variation in optimization from target to target.

Steve, could you xfail of the hpux targets where this fails.

Dave


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-03-22 20:07 ` dave at hiauly1 dot hia.nrc.ca
@ 2011-03-22 20:16 ` sje at cup dot hp.com
  2011-03-22 22:06 ` dave at hiauly1 dot hia.nrc.ca
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp.com @ 2011-03-22 20:16 UTC (permalink / raw)
  To: gcc-bugs

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

Steve Ellcey <sje at cup dot hp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |sje at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #10 from Steve Ellcey <sje at cup dot hp.com> 2011-03-22 19:42:54 UTC ---
Yes, I can do that.  Do you know how the test fails on HP-UX 10.*?
Does it fail to compile or does it compile and then fail during execution like
it does on HP-UX 11.*?


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-03-22 20:16 ` sje at cup dot hp.com
@ 2011-03-22 22:06 ` dave at hiauly1 dot hia.nrc.ca
  2011-03-24 16:43 ` sje at gcc dot gnu.org
  2011-03-24 16:54 ` sje at cup dot hp.com
  12 siblings, 0 replies; 14+ messages in thread
From: dave at hiauly1 dot hia.nrc.ca @ 2011-03-22 22:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from dave at hiauly1 dot hia.nrc.ca 2011-03-22 21:05:32 UTC ---
> Yes, I can do that.  Do you know how the test fails on HP-UX 10.*?
> Does it fail to compile or does it compile and then fail during execution like
> it does on HP-UX 11.*?

It will fail to compile because all four cases are not optimized.
So, test should be skipped.

Dave


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2011-03-22 22:06 ` dave at hiauly1 dot hia.nrc.ca
@ 2011-03-24 16:43 ` sje at gcc dot gnu.org
  2011-03-24 16:54 ` sje at cup dot hp.com
  12 siblings, 0 replies; 14+ messages in thread
From: sje at gcc dot gnu.org @ 2011-03-24 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Steve Ellcey <sje at gcc dot gnu.org> 2011-03-24 16:29:24 UTC ---
Author: sje
Date: Thu Mar 24 16:29:18 2011
New Revision: 171404

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171404
Log:
2011-03-24  Steve Ellcey  <sje@cup.hp.com>

    PR target/48209
    * gcc.c-torture/execute/pr47917.c: Move this...
    * gcc.dg/torture/pr47917.c: to here and add xfails.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr47917.c
      - copied, changed from r171278,
trunk/gcc/testsuite/gcc.c-torture/execute/pr47917.c
Removed:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr47917.c
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/48209] FAIL: gcc.c-torture/execute/pr47917.c execution
  2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2011-03-24 16:43 ` sje at gcc dot gnu.org
@ 2011-03-24 16:54 ` sje at cup dot hp.com
  12 siblings, 0 replies; 14+ messages in thread
From: sje at cup dot hp.com @ 2011-03-24 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

Steve Ellcey <sje at cup dot hp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #13 from Steve Ellcey <sje at cup dot hp.com> 2011-03-24 16:37:01 UTC ---
Resolved by XFAIL'ing test on *-*-hpux10* and *-*-hpux1[12]*.


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

end of thread, other threads:[~2011-03-24 16:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20 15:23 [Bug middle-end/48209] New: FAIL: gcc.c-torture/execute/pr47917.c execution danglin at gcc dot gnu.org
2011-03-20 19:38 ` [Bug middle-end/48209] " jakub at gcc dot gnu.org
2011-03-21 21:49 ` [Bug target/48209] " sje at cup dot hp.com
2011-03-22  0:30 ` dave at hiauly1 dot hia.nrc.ca
2011-03-22 16:57 ` sje at cup dot hp.com
2011-03-22 17:05 ` jakub at gcc dot gnu.org
2011-03-22 17:13 ` sje at cup dot hp.com
2011-03-22 17:59 ` jakub at gcc dot gnu.org
2011-03-22 18:51 ` sje at cup dot hp.com
2011-03-22 20:07 ` dave at hiauly1 dot hia.nrc.ca
2011-03-22 20:16 ` sje at cup dot hp.com
2011-03-22 22:06 ` dave at hiauly1 dot hia.nrc.ca
2011-03-24 16:43 ` sje at gcc dot gnu.org
2011-03-24 16:54 ` sje at cup dot hp.com

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).