Bug 79356 - XPASS in attr-alloc_size-11.c
Summary: XPASS in attr-alloc_size-11.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 7.0
: P4 minor
Target Milestone: 7.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-03 12:30 UTC by Dominik Vogt
Modified: 2023-02-28 01:15 UTC (History)
6 users (show)

See Also:
Host:
Target: s390x-*-*, powerpc*-*-*, ia64-*-*, aarch64-*-*, sparc*-*-*, mips*-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-02-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Vogt 2017-02-03 12:30:51 UTC
The test has two xfails that do pass on s390x with --with-arch=zEC12 (not tested without that):

--
/* The following tests fail because of missing range information.  */ 
TEST (signed char, SCHAR_MIN + 2, ALLOC_MAX);   /* { dg-warning "argument 1 ran\
ge \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for\
 signed char" { xfail *-*-* } } */ 
TEST (short, SHRT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13\
, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for short" {\
 xfail *-*-* } } */ 
--

The test was added in r244290:

--
    PR tree-optimization/78775 - [7 Regression] ICE in maybe_warn_alloc_args_ove

    gcc/ChangeLog:

        PR tree-optimization/78775
        * builtins.c (get_size_range): Move...
        * calls.c: ...to here.
        (alloc_max_size): Accept zero argument.
        (operand_signed_p): Remove.
        (maybe_warn_alloc_args_overflow): Call get_size_range.
        * calls.h (get_size_range): Declare.

    gcc/testsuite/ChangeLog:

        PR tree-optimization/78775
        * gcc.dg/attr-alloc_size-4.c: Add test cases.
        * gcc.dg/attr-alloc_size-10.c: New test.
        * gcc.dg/attr-alloc_size-11.c: New test.
        * gcc.dg/builtin-stringop-chk-7.c: New test.
        * gcc.dg/pr78775.c: New test.
        * gcc.dg/pr78973-2.c: New test.
        * gcc.dg/pr78973.c: New test.


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244290 138bc75d-0d04-0410-96
--
Comment 1 Martin Sebor 2017-02-03 23:13:08 UTC
Confirmed. It seems that the XFAIL target could be restricted to exclude s390x.
Comment 2 Martin Sebor 2017-02-04 02:42:58 UTC
Looks like the assertions are also XPASSing on powerpc64le-linux:
  https://gcc.gnu.org/ml/gcc-testresults/2017-02/msg00390.html
Comment 3 Andreas Schwab 2017-02-04 08:38:46 UTC
Also on all other powerpc targets and ia64 and aarch64.
Comment 4 Segher Boessenkool 2017-02-09 10:44:37 UTC
I have a patch.
Comment 5 Rainer Orth 2017-02-10 10:59:17 UTC
Also on SPARC as mentioned in PR tree-optimization/78775.
Comment 6 Segher Boessenkool 2017-02-10 14:50:10 UTC
Patch withdrawn.
Comment 7 Dominik Vogt 2017-02-15 17:03:28 UTC
Patch with all reported targets in a negative list:
https://gcc.gnu.org/ml/gcc-patches/2017-02/msg01006.html

Can you please double check that the xfail selectors are correct for your targets?
Comment 8 Segher Boessenkool 2017-03-10 15:23:38 UTC
Author: segher
Date: Fri Mar 10 15:23:06 2017
New Revision: 246032

URL: https://gcc.gnu.org/viewcvs?rev=246032&root=gcc&view=rev
Log:
testsuite: attr-alloc_size-11.c (PR79356)

As stated in the PR (and elsewhere), this test now passes on aarch64,
ia64, mips, powerpc, sparc, and s390x.  This patch disables the xfails
for those targets.


	PR testsuite/79356
	* gcc.dg/attr-alloc_size-11.c: Don't xfail on aarch64, ia64, mips,
	powerpc, sparc, or s390x.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/attr-alloc_size-11.c
Comment 9 Segher Boessenkool 2017-03-10 16:46:50 UTC
This is fixed on all identified targets now.
Comment 10 Jiong Wang 2017-03-15 15:33:44 UTC
Author: jiwang
Date: Wed Mar 15 15:33:12 2017
New Revision: 246167

URL: https://gcc.gnu.org/viewcvs?rev=246167&root=gcc&view=rev
Log:
[gcc, testsuite] Don't xfail on arm

	PR testsuite/79356
	* gcc.dg/attr-alloc_size-11.c: Don't xfail on arm.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/attr-alloc_size-11.c
Comment 11 Martin Sebor 2017-03-15 16:25:15 UTC
Bug 80006 tracks the problem that's behind the failure discussed here.  It looks as though it might be specific to the x86 target so perhaps rather than listing all the targets where the xfail should not apply it might be simpler to list x86 as the one where it does.
Comment 12 Dominik Vogt 2017-03-29 10:13:02 UTC
Still XPASSes on s390 (but not s390x with -m31 or -m64).
Comment 13 Dominik Vogt 2017-03-29 10:31:15 UTC
Patch: https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01468.html
Comment 14 Andreas Krebbel 2017-04-03 10:58:13 UTC
Author: krebbel
Date: Mon Apr  3 10:57:41 2017
New Revision: 246645

URL: https://gcc.gnu.org/viewcvs?rev=246645&root=gcc&view=rev
Log:
Don't xfail on s390.

The attached patch removes the XFAIL in attr-alloc_size-11.c on
s390.  (PR 79356).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79356

gcc/testsuite/ChangeLog:

2017-04-03  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR testsuite/79356
	* gcc.dg/attr-alloc_size-11.c: Don't xfail on s390.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/attr-alloc_size-11.c
Comment 15 uros 2017-04-10 18:52:14 UTC
Author: uros
Date: Mon Apr 10 18:51:42 2017
New Revision: 246816

URL: https://gcc.gnu.org/viewcvs?rev=246816&root=gcc&view=rev
Log:
	PR testsuite/79356
	* gcc.dg/attr-alloc_size-11.c: Don't xfail on alpha.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/attr-alloc_size-11.c
Comment 16 GCC Commits 2023-02-28 01:14:07 UTC
The master branch has been updated by Hans-Peter Nilsson <hp@gcc.gnu.org>:

https://gcc.gnu.org/g:2f2c0bc57be12ca92d3e2cc74f6cca048da9ed55

commit r13-6365-g2f2c0bc57be12ca92d3e2cc74f6cca048da9ed55
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Mon Feb 27 17:22:44 2023 +0100

    testsuite: Add CRIS to targets not xfailing gcc.dg/attr-alloc_size-11.c:50,51
    
    Reacting to a long-standing XPASS for CRIS.  Maybe better do
    as https://gcc.gnu.org/PR79356#c11 suggests: xfail it for
    x86 only ...except I see m68k also does not xpass.
    
    testsuite:
            PR testsuite/79356
            * gcc.dg/attr-alloc_size-11.c: Add CRIS to the list
            of targets excluding xfail on lines 50 and 51.