Bug 52641 - Test cases fail for 16-bit int targets
Summary: Test cases fail for 16-bit int targets
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 7.0
: P5 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-20 19:35 UTC by Georg-Johann Lay
Modified: 2018-02-02 15:08 UTC (History)
2 users (show)

See Also:
Host:
Target: avr, m32c, m68k, stormy16, cr16, pdp11, h8300, rl78
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-03-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg-Johann Lay 2012-03-20 19:35:21 UTC
Many test cases fail because they assume sizeof(int) >= 4.

This PR is not for one specific test case, it's to have a PR to file respective fixes as new test cases enter the test suite.
Comment 1 Georg-Johann Lay 2012-03-20 19:38:57 UTC
Author: gjl
Date: Tue Mar 20 19:38:51 2012
New Revision: 185588

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185588
Log:
	PR testsuite/52641
	* gcc.dg/torture/pr48124-1.c: Add dg-require-effective-target
	int32plus.
	* gcc.dg/torture/pr48124-4.c: Ditto:
	* gcc.dg/torture/pr52530.c: Use long instead of int if int=16.
	


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/torture/pr48124-1.c
    trunk/gcc/testsuite/gcc.dg/torture/pr48124-4.c
    trunk/gcc/testsuite/gcc.dg/torture/pr52530.c
Comment 2 Georg-Johann Lay 2012-03-21 10:48:13 UTC
Author: gjl
Date: Wed Mar 21 10:48:08 2012
New Revision: 185602

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185602
Log:
	PR testsuite/52641
	* gcc.dg/misaligned-expand-1.c (cst): Cast to int.
	* gcc.dg/misaligned-expand-2.c (cst): Likewise.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/misaligned-expand-1.c
    trunk/gcc/testsuite/gcc.dg/misaligned-expand-2.c
Comment 3 Hans-Peter Nilsson 2012-03-21 17:46:17 UTC
FWIW, m68k if only for its option -mshort; by default that port has 32-bit integers.
Comment 4 Georg-Johann Lay 2012-04-24 17:08:28 UTC
Author: gjl
Date: Tue Apr 24 17:08:20 2012
New Revision: 186775

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186775
Log:
	PR testsuite/52641
	PR tree-optimizations/52891
	* gcc.c-torture/compile/pr52891-2.c: Fix test for 16-bit int.


Modified:
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr52891-2.c
Comment 5 Georg-Johann Lay 2012-04-24 17:19:03 UTC
Author: gjl
Date: Tue Apr 24 17:18:54 2012
New Revision: 186776

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186776
Log:
	PR testsuite/52641
	PR tree-optimizations/52891
	* gcc.c-torture/compile/pr52891-2.c: Fix test for 16-bit int.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.c-torture/compile/pr52891-2.c
Comment 6 Georg-Johann Lay 2012-05-16 12:46:41 UTC
Author: gjl
Date: Wed May 16 12:46:36 2012
New Revision: 187588

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187588
Log:
	PR testsuite/52641
	* gcc.dg/pr52549.c: Fix test for long != void*
	* gcc.c-torture/execute/pr52979-1.x: New file.
	* gcc.c-torture/execute/pr52979-2.x: New file.


Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x
    trunk/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr52549.c
Comment 7 Georg-Johann Lay 2012-11-23 10:08:54 UTC
Author: gjl
Date: Fri Nov 23 10:08:49 2012
New Revision: 193749

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193749
Log:
	PR testsuite/52641
	* gcc.dg/unroll_5.c: Add dg-require-effective-target int32plus.
	* gcc.dg/pr55150-1.c: Same.
	* gcc.dg/torture/pr54894.c: Add size32plus.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr55150-1.c
    trunk/gcc/testsuite/gcc.dg/torture/pr54894.c
    trunk/gcc/testsuite/gcc.dg/unroll_5.c
Comment 8 Georg-Johann Lay 2012-11-26 18:46:25 UTC
Author: gjl
Date: Mon Nov 26 18:46:12 2012
New Revision: 193826

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193826
Log:
	PR testsuite/52641
	* gcc.c-torture/execute/20120919-1.x: New file (int32plus).
	* gcc.dg/pr54676.c: Make work for 16-bit int.


Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/20120919-1.x
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr54676.c
Comment 9 Georg-Johann Lay 2013-03-04 11:12:42 UTC
Author: gjl
Date: Mon Mar  4 11:12:30 2013
New Revision: 196428

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196428
Log:
	PR testsuite/52641
	PR tree-optimization/52631
	* gcc.dg/tree-ssa/pr52631.c: Fix 16-bit int.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr52631.c
Comment 11 Jakub Jelinek 2013-08-29 13:15:01 UTC
Author: jakub
Date: Thu Aug 29 13:14:59 2013
New Revision: 202074

URL: http://gcc.gnu.org/viewcvs?rev=202074&root=gcc&view=rev
Log:
	Backported from mainline
	2013-07-22  Georg-Johann Lay  <avr@gjlay.de>

	PR testsuite/52641
	* gcc.dg/torture/pr57381.c: Add dg-require-effective-target int32plus.

	2013-05-27  Richard Biener  <rguenther@suse.de>

	PR middle-end/57381
	PR tree-optimization/57417
	* tree-ssa-sccvn.c (vn_reference_fold_indirect): Fix test
	for unchanged base.
	(set_ssa_val_to): Compare addresses using
	get_addr_base_and_unit_offset.

	PR tree-optimization/57417
	* gcc.dg/torture/pr57417.c: New testcase.

	2013-05-23  Richard Biener  <rguenther@suse.de>

	PR middle-end/57381
	* gcc.dg/torture/pr57381.c: New testcase.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57381.c
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57417.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/gcc/tree-ssa-sccvn.c
Comment 12 Georg-Johann Lay 2016-12-21 13:50:43 UTC
Author: gjl
Date: Wed Dec 21 13:50:11 2016
New Revision: 243854

URL: https://gcc.gnu.org/viewcvs?rev=243854&root=gcc&view=rev
Log:
gcc/testsuite/
	PR testsuite/52641
	* gcc.dg/builtin-object-size-16.c (ia0, ia1, ia9): Handle case
	where neither short nor int has a size of 4; use long.
	* gcc.dg/builtin-object-size-17.c: Same.
	* gcc.dg/builtin-stringop-chk-1.c (test2) <struct S>: Use int32_t
	for components as 4 components are supposed to occupy 16 bytes.
	* gcc.dg/pr78408-1.c: Require target size32plus.
	* gcc.dg/pr78408-2.c: Same.
	* gcc.dg/tree-ssa/pr78428.c. Require target int32plus.
	* gcc.dg/tree-ssa/tailcall-7.c: Require target trampolines.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/builtin-object-size-16.c
    trunk/gcc/testsuite/gcc.dg/builtin-object-size-17.c
    trunk/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
    trunk/gcc/testsuite/gcc.dg/pr78408-1.c
    trunk/gcc/testsuite/gcc.dg/pr78408-2.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr78428.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7.c
Comment 13 Georg-Johann Lay 2016-12-22 12:43:07 UTC
Author: gjl
Date: Thu Dec 22 12:42:35 2016
New Revision: 243885

URL: https://gcc.gnu.org/viewcvs?rev=243885&root=gcc&view=rev
Log:
gcc/testsuite/
	PR testsuite/52641
	* gcc.dg/pr35258.c (main) <temp>: Use an integer value that has
	at least a size of 4.
	* gcc.dg/Walloca-1.c (foo1): Use alloca with 30000 (instead of 90000).
	* gcc.dg/graphite/pr46185.c: Require int32plus, size32plus.
	* gcc.dg/graphite/isl-ast-op-select.c: Same.
	* gcc.dg/graphite/pr42205-1.c: Require int32plus.
	* gcc.dg/graphite/pr42221.c: Same.
	* gcc.dg/tree-ssa/pr65136.c: Same.
	* gcc.dg/tree-ssa/sra-20.c: Same.
	* gcc.dg/graphite/scop-0.c: Require size32plus.
	* gcc.dg/graphite/scop-22.c: Same.
	* gcc.dg/graphite/scop-3.c: Same.
	* gcc.dg/graphite/scop-dsyr2k.c: Same.
	* gcc.dg/graphite/scop-dsyrk.c: Same.
	* gcc.dg/graphite/scop-mvt.c: Same.
	* gcc.dg/graphite/scop-sor.c: Same.
	* gcc.dg/tree-ssa/pr68529-3.c: Same.
	* gcc.dg/tree-ssa/pr66449.c [long != pointer]: Use intptr_t if.
	* gcc.dg/tree-ssa/pr70919.c [int <= 2]: Use 32-bit int as needed.
	* gcc.dg/tree-ssa/pr71408.c: Same.
	* gcc.dg/tree-ssa/ssa-dom-thread-8.c (f2) [long != pointer]: Use
	uintptr_t instead of long for int representation of address.
	* gcc.dg/tree-ssa/tailcall-7-run.c: Require trampolines.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/Walloca-1.c
    trunk/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c
    trunk/gcc/testsuite/gcc.dg/graphite/pr42205-1.c
    trunk/gcc/testsuite/gcc.dg/graphite/pr42221.c
    trunk/gcc/testsuite/gcc.dg/graphite/pr46185.c
    trunk/gcc/testsuite/gcc.dg/graphite/scop-0.c
    trunk/gcc/testsuite/gcc.dg/graphite/scop-22.c
    trunk/gcc/testsuite/gcc.dg/graphite/scop-3.c
    trunk/gcc/testsuite/gcc.dg/graphite/scop-dsyr2k.c
    trunk/gcc/testsuite/gcc.dg/graphite/scop-dsyrk.c
    trunk/gcc/testsuite/gcc.dg/graphite/scop-mvt.c
    trunk/gcc/testsuite/gcc.dg/graphite/scop-sor.c
    trunk/gcc/testsuite/gcc.dg/pr35258.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr65136.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66449.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr68529-3.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr70919.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr71408.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/sra-20.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7-run.c
Comment 14 Georg-Johann Lay 2016-12-22 15:03:15 UTC
Author: gjl
Date: Thu Dec 22 15:02:43 2016
New Revision: 243889

URL: https://gcc.gnu.org/viewcvs?rev=243889&root=gcc&view=rev
Log:
gcc/testsuite/
	PR testsuite/52641
	* gcc.dg/fold-and-rshift-2.c [int <= 2]: Use 32-bit int as needed.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/fold-and-rshift-2.c
Comment 15 Georg-Johann Lay 2018-02-02 11:37:26 UTC
Author: gjl
Date: Fri Feb  2 11:36:54 2018
New Revision: 257327

URL: https://gcc.gnu.org/viewcvs?rev=257327&root=gcc&view=rev
Log:
	PR testsuite/52641
	* gcc.c-torture/execute/pr81913.c: Use types that also work for int16.
	* gcc.c-torture/execute/20180112-1.c: Dito.
	* gcc.c-torture/execute/pr81503.c: Dito.
	* gcc.dg/store_merging_12.c: Dito.
	* gcc.dg/tree-ssa/loop-niter-1.c: Dito.
	* gcc.dg/tree-ssa/loop-niter-2.c: Dito.
	* gcc.dg/tree-ssa/pr80898.c: Dito.
	* gcc.dg/tree-ssa/pr82363.c: Dito.
	* gcc.dg/utf16-4.c: Also allow "short unsigned int" in dg-warning.
	* gcc.dg/tree-ssa/pr81346-5.c: Special-case int16.
	* gcc.dg/tree-ssa/ssa-sink-11.c: Dito.
	* gcc.dg/tree-ssa/ssa-sink-12.c: Dito.
	* gcc.dg/torture/pr81814.c: Restrict to int32plus.
	* gcc.dg/tree-ssa/pr80803.c: Dito.
	* gcc.dg/tree-ssa/pr80898-2.c: Dito.
	* gcc.dg/tree-ssa/pr81346-4.c: Dito.
	* gcc.dg/tree-ssa/vrp114.c: Dito.
	* gcc.dg/tree-ssa/pr82574.c: Restrict to size32plus.
	* gcc.dg/tree-ssa/ssa-dom-thread-13.c: Dito.
	* gcc.dg/tree-ssa/ssa-sink-15.c: Dito.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.c-torture/execute/20180112-1.c
    trunk/gcc/testsuite/gcc.c-torture/execute/pr81503.c
    trunk/gcc/testsuite/gcc.c-torture/execute/pr81913.c
    trunk/gcc/testsuite/gcc.dg/store_merging_12.c
    trunk/gcc/testsuite/gcc.dg/torture/pr81814.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-niter-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-niter-2.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr80803.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr80898-2.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr80898.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr81346-4.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr81346-5.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr82363.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr82574.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-13.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-11.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-12.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-15.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/vrp114.c
    trunk/gcc/testsuite/gcc.dg/utf16-4.c
Comment 16 Georg-Johann Lay 2018-02-02 15:08:09 UTC
Author: gjl
Date: Fri Feb  2 15:07:37 2018
New Revision: 257333

URL: https://gcc.gnu.org/viewcvs?rev=257333&root=gcc&view=rev
Log:
	PR testsuite/52641
	* gcc.c-torture/execute/pr83362.c: Make work for int16.
	* gcc.dg/Wsign-conversion.c: Dito.
	* gcc.dg/attr-alloc_size-4.c: Dito.
	* gcc.dg/pr81020.c: Dito.
	* gcc.dg/pr81192.c: Dito.
	* gcc.dg/pr83463.c (dg-options): Add -Wno-pointer-to-int-cast.
	* gcc.dg/attr-alloc_size-11.c: Also special-case avr.
	* gcc.dg/pr83844.c: Restrict to int32plus.
	* gcc.dg/attr-alloc_size-3.c: Restrict to size32plus.
	* gcc.dg/tree-ssa/ldist-25.c: Dito.
	* gcc.dg/tree-ssa/ldist-27.c: Dito.
	* gcc.dg/tree-ssa/ldist-28.c: Dito.
	* gcc.dg/tree-ssa/ldist-29.c: Dito.
	* gcc.dg/tree-ssa/ldist-30.c: Dito.
	* gcc.dg/tree-ssa/ldist-31.c: Dito.
	* gcc.dg/tree-ssa/ldist-32.c: Dito.
	* gcc.dg/tree-ssa/ldist-33.c: Dito.
	* gcc.dg/tree-ssa/ldist-34.c: Dito.
	* gcc.dg/tree-ssa/ldist-35.c: Dito.
	* gcc.dg/tree-ssa/ldist-36.c: Dito.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.c-torture/execute/pr83362.c
    trunk/gcc/testsuite/gcc.dg/Wsign-conversion.c
    trunk/gcc/testsuite/gcc.dg/attr-alloc_size-11.c
    trunk/gcc/testsuite/gcc.dg/attr-alloc_size-3.c
    trunk/gcc/testsuite/gcc.dg/attr-alloc_size-4.c
    trunk/gcc/testsuite/gcc.dg/pr81020.c
    trunk/gcc/testsuite/gcc.dg/pr81192.c
    trunk/gcc/testsuite/gcc.dg/pr83463.c
    trunk/gcc/testsuite/gcc.dg/pr83844.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-25.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-27.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-28.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-29.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-30.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-31.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-32.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-33.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-34.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-35.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ldist-36.c