[test-suite] r374156 - Add GCC Torture Suite Sources
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 9 04:01:53 PDT 2019
Author: lenary
Date: Wed Oct 9 04:01:46 2019
New Revision: 374156
URL: http://llvm.org/viewvc/llvm-project?rev=374156&view=rev
Log:
Add GCC Torture Suite Sources
Added:
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000113-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000121-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000205-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000217-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000223-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000224-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000225-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000227-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000313-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000402-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000403-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000419-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000422-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000503-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000511-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000523-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000528-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000603-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000622-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000703-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000707-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000722-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000726-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000808-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000815-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000818-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000819-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000822-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000914-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000917-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001011-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001013-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001024-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001026-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001027-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001101.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001108-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001111-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001121-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001124-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001221-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001228-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001229-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010106-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010114-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010116-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010118-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010119-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010122-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010123-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010129-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010206-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010209-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010221-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010222-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010224-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010325-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010329-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010403-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010409-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010422-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010520-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010604-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010711-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010717-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010723-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010910-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010915-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010924-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010925-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011008-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011019-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011024-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011113-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011114-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011115-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011121-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011128-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011217-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011219-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011223-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020103-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020107-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020108-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020118-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020127-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020129-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020201-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020213-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020215-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020216-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020219-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020226-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020227-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020307-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020314-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020320-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020321-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020328-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020404-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020406-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020411-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020412-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020413-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020418-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020423-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020503-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020506-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020510-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020529-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020611-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020614-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020615-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020619-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020716-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020720-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020805-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020810-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020819-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020904-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020911-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020916-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020920-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021011-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021015-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021024-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021111-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021113-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021119-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021127-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021204-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021219-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030105-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030109-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030117-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030125-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030128-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030203-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030209-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030216-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030218-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030221-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030222-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030224-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030307-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030313-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030316-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030323-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030330-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030401-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030403-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030404-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030408-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030501-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030606-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030613-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030714-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030715-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030717-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030718-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030811-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030821-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030903-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030909-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030910-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030913-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030916-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030920-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030928-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031003-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031010-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031011-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031012-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031020-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031201-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031204-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031214-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031215-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031216-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040208-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040218-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040223-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040302-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040307-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040308-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040309-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040311-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040313-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040319-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040331-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1w.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2w.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3w.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040423-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040520-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040625-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040703-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040704-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040706-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040707-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040805-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040811-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040820-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040823-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040831-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040917-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041011-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041019-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041113-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041114-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041124-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041126-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041201-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041210-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041212-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041213-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041214-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050104-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050106-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050107-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050111-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050121-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050124-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050125-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050131-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050203-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050215-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050218-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050224-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050410-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050604-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050607-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050613-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050713-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050929-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051012-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051021-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051104-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051113-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051215-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060102-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060127-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060412-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060420-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060905-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060910-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060929-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061031-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061220-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070201-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070424-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070517-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070614-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070623-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070724-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070824-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070919-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071011-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071018-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071029-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071030-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071108-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071120-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071202-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071205-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071210-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071211-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071213-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071216-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071219-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080117-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080122-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080222-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080408-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080424-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080502-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080519-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080522-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080529-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080604-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080719-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080813-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081103-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081117-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081218-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090207-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090219-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090527-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090623-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090711-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090814-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20091229-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100209-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100316-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100416-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100430-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100708-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100805-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100827-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101011-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101013-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101025-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20110418-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111208-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111212-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111227-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120105-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120111-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120207-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120615-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120808-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120817-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120919-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20121108-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20131127-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140326-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140425-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140622-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141022-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141107-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141125-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20150611-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170111-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170419-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20171008-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180131-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180226-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180921-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20181120-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190228-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190820-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/900409-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920202-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920302-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920409-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920410-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920411-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920415-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920429-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-8.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-9.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920506-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920520-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920603-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920604-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920618-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920625-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920710-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920711-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920726-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920728-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920730-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920731-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920810-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920812-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920829-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920909-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920922-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920929-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921006-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921007-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921013-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921016-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921017-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921029-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921104-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921110-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921113-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921117-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921124-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921204-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921207-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921215-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930106-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930111-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930123-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930208-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930406-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930408-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930518-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930526-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930527-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930529-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930608-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930621-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930628-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930630-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930702-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930713-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930718-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930719-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930725-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930818-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930916-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930921-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930929-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931002-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-10.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-11.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-12.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-13.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-14.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-8.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-9.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931005-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931009-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931012-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931017-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931018-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931031-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931208-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931228-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940115-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940122-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941015-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941021-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941025-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941031-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941101-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941110-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941202-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950221-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950322-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950503-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950511-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950512-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950605-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950612-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950621-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950628-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950704-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950706-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950710-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950714-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950809-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950906-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950915-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950929-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951003-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951115-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951204-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960116-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960117-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960209-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960215-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960218-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960219-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960301-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960302-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960312-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960317-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960321-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960326-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960327-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960402-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960405-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960416-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960512-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960513-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960521-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960608-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960801-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960802-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960830-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960909-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961004-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961026-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961125-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961206-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961213-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961223-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970217-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970923-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980205.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980223.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980424-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980604-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980605-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980608-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980612-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980617-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980618-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980701-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980707-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980709-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980716-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980929-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981001-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981019-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981130-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981206-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990117-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990128-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990130-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990208-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990211-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990222-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990324-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990326-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990404-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990413-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990513-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990524-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990527-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990531-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990604-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990628-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990804-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990811-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990826-0.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990827-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990829-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990923-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991014-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991016-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991019-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991023-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991030-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991112-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991118-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991201-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991221-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991227-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991228-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-access-path-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-nest.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alloca-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/anon-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand-ll.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashldi-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashrdi-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bcp-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-layout-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-pack-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf64-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bitfld-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bitfld-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bitfld-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bitfld-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bitfld-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bitfld-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bitfld-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bswap-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bswap-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/built-in-setjmp.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-bitops-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-constant.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-prefetch-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-prefetch-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-prefetch-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-prefetch-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-prefetch-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-prefetch-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtin-types-compatible-p.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/20010124-1-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/20010124-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/20010124-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/abs-1-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/abs-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/abs-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/abs-2-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/abs-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/abs-3-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/abs-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/builtins.exp
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/chk.h
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/complex-1-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/complex-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/fprintf-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/fprintf.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/fprintf.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/fputs-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/fputs.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/fputs.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/abs.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/bfill.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/bzero.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/fprintf.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/main.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/memchr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/memcmp.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/memmove.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/mempcpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/memset.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/printf.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/sprintf.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/stpcpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strcat.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strchr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strcmp.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strcpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strcspn.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strlen.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strncat.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strncmp.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strncpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strnlen.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strpbrk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strrchr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strspn.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/lib/strstr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memchr-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memchr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memcmp-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memcmp.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memcpy-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memcpy-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memcpy-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memmove-2-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memmove-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memmove-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memmove-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memmove-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memmove-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memmove.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memops-asm-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memops-asm.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memops-asm.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/mempcpy-2-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/mempcpy-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/mempcpy-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/mempcpy-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/mempcpy-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/mempcpy-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/mempcpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memset-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memset-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memset-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memset-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/memset.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/pr22237-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/pr22237.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/pr23484-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/pr23484-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/pr23484-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/printf-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/printf.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/snprintf-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/snprintf-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/snprintf-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/sprintf-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/sprintf-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/sprintf-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/sprintf-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/sprintf.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/stpcpy-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/stpcpy-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/stpcpy-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/stpncpy-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/stpncpy-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/stpncpy-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcat-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcat-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcat-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcat-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcat.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strchr-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strchr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcmp-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcmp.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcpy-2-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcpy-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcpy-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcpy-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcpy-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcpy-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcspn-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strcspn.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strlen-2-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strlen-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strlen-3-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strlen-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strlen-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strlen.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncat-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncat-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncat-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncat-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncat.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncmp-2-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncmp-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncmp-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncmp.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncpy-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncpy-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncpy-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncpy-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strncpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strnlen-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strnlen.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strnlen.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strpbrk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strpbrk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strpcpy-2-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strpcpy-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strpcpy-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strpcpy.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strrchr-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strrchr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strspn-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strspn.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strstr-asm-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strstr-asm.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strstr-asm.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strstr-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/strstr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/vsnprintf-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/vsnprintf-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/vsnprintf-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/vsprintf-chk-lib.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/vsprintf-chk.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/builtins/vsprintf-chk.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/call-trap-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/cbrt.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/cmpdi-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/cmpsf-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/cmpsi-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/cmpsi-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/comp-goto-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/comp-goto-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/compare-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/compare-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/compare-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/complex-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/complex-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/complex-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/complex-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/complex-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/complex-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/complex-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/compndlit-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/const-addr-expr-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/conversion.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/cvt-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/dbra-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divcmp-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divcmp-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divcmp-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divcmp-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divcmp-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divconst-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divconst-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divconst-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/divmod-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/doloop-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/doloop-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/eeprof-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/enum-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/enum-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/enum-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/execute.exp
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/extzvsi.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ffs-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ffs-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/float-floor.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/floatunsisf-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/fprintf-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/fprintf-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/fprintf-chk-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/frame-address.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/func-ptr-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/gofast.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20000320-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20000320-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20001122-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20010114-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20010114-2.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20010226-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20011123-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20030331-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20030331-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/20041213-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/920518-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/920518-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/920810-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/920810-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/930529-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/980619-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/980619-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/acc1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/acc2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/builtin-nan-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/compare-fp-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/compare-fp-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/compare-fp-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/compare-fp-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/compare-fp-3.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/compare-fp-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/compare-fp-4.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/copysign1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/copysign2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-2.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-3.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-4e.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-4f.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-4f.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-4l.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-6.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-7.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-8.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-8e.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-8f.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-8f.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/fp-cmp-8l.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/hugeval.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/hugeval.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/ieee.exp
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/inf-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/inf-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/inf-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/minuszero.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mul-subnormal-single-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mul-subnormal-single-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mzero2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mzero2.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mzero3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mzero4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mzero5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/mzero6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr28634.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr29302-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr29302-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr30704.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr30704.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr36332.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr38016.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr38016.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr50310.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr67218.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr72824-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr72824.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/pr84235.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/rbug.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/rbug.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/unsafe-fp-assoc-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/unsafe-fp-assoc-1.x
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ieee/unsafe-fp-assoc.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ifcvt-onecmpl-abs-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/index-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/inst-check.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/int-compare.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ipa-sra-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ipa-sra-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/longlong.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-10.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-11.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-12.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-13.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-14.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-15.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-2b.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-2c.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-2d.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-2e.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-2f.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-2g.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-3b.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-3c.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-4b.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-8.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-9.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-ivopts-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/loop-ivopts-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/lshrdi-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/lto-tbaa-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/mayalias-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/mayalias-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/mayalias-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/medce-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memchr-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memcpy-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memcpy-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memcpy-bi.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memset-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memset-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memset-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/memset-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/mod-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/mode-dependent-address.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/multdi-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/multi-ix.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nest-align-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nest-stdar-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nestfunc-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nestfunc-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nestfunc-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nestfunc-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nestfunc-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nestfunc-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/nestfunc-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/noinit-attribute.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/p18298.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/packed-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/packed-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pending-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/postmod-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr15262-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr15262-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr15262.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr15296.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr16790-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr17078-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr17133.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr17252.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr17377.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr19005.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr19449.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr19515.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr19606.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr19687.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr19689.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr20100-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr20187-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr20466-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr20527-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr20601-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr20621-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr21173.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr21331.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr21964-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22061-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22061-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22061-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22061-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22098-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22098-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22098-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22141-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22141-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22348.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22429.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22493-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr22630.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr23047.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr23135.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr23324.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr23467.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr23604.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr23941.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr24135.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr24141.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr24142.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr24716.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr24851.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr25125.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr25737.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr27073.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr27260.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr27285.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr27364.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr27671-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr28289.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr28403.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr28651.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr28778.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr28865.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr28982a.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr28982b.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr29006.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr29156.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr29695-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr29695-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr29797-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr29797-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr29798.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr30185.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr30778.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr31072.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr31136.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr31169.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr31448-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr31448.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr31605.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr32244-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr32500.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33142.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33382.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33631.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33669.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33779-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33779-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33870-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33870.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr33992.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34070-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34070-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34099-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34099.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34130.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34154.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34176.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34415.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34456.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34768-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34768-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34971.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr34982.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr35163.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr35231.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr35390.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr35456.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr35472.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr35800.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36034-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36034-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36038.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36077.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36093.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36321.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36339.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36343.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36691.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr36765.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr37102.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr37125.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr37573.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr37780.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr37882.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr37924.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr37931.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38048-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38048-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38051.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38151.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38212.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38236.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38422.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38533.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38819.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr38969.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr39100.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr39120.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr39228.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr39233.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr39240.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr39339.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr39501.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40022.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40057.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40386.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40404.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40493.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40579.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40657.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40668.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr40747.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41239.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41317.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41395-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41395-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41463.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41750.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41917.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41919.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr41935.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42006.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42142.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42154.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42231.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42248.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42269-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42512.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42544.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42570.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42614.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42691.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42721.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr42833.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43008.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43220.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43236.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43269.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43385.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43438.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43560.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43629.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43783.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43784.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43835.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr43987.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44164.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44202-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44468.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44555.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44575.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44683.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44828.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44852.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44858.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr44942.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr45034.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr45070.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr45262.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr45695.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr46019.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr46309.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr46316.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr46909-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr46909-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr47148.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr47155.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr47237.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr47299.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr47337.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr47538.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr47925.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48197.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48571-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48717.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48809.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48814-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48814-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48973-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr48973-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49039.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49073.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49123.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49161.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49186.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49218.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49279.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49281.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49390.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49419.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49644.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49712.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49768.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr49886.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr50865.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51023.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51323.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51447.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51466.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51581-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51581-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51877.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr51933.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr52129.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr52209.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr52286.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr52760.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr52979-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr52979-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr53084.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr53160.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr53465.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr53645-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr53645.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr53688.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr54471.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr54937.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr54985.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr55137.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr55750.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr55875.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56051.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56205.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56250.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56799.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56837.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56866.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56899.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56962.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr56982.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57124.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57130.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57131.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57144.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57281.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57321.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57568.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57829.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57860.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57861.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57875.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57876.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr57877.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58209.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58277-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58277-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58364.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58365.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58385.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58387.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58419.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58431.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58564.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58570.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58574.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58640-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58640.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58662.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58726.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58831.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58943.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr58984.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59014-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59014.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59101.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59221.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59229.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59358.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59387.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59388.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59413.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59643.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr59747.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr60003.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr60017.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr60062.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr60072.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr60454.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr60822.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr60960.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61306-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61306-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61306-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61375.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61517.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61673.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61682.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr61725.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr62151.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr63209.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr63302.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr63641.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr63659.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr63843.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64006.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64242.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64255.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64260.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64682.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64718.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64756.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64957.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr64979.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65053-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65053-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65170.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65215-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65215-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65215-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65215-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65215-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65216.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65369.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65401.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65418-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65418-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65427.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65648.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr65956.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr66187.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr66233.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr66556.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr66757.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr66940.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr67037.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr67226.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr67714.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr67781.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr67929_1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68143_1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68185.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68249.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68250.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68321.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68328.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68376-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68376-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68381.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68390.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68506.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68532.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68624.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68648.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68841.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr68911.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69097-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69097-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69320-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69320-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69320-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69320-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69403.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69447.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr69691.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70005.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70127.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70222-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70222-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70429.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70460.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70566.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70586.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70602.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr70903.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71083.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71335.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71494.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71550.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71554.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71626-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71626-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71631.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr71700.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr7284-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr77718.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr77766.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr77767.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78170.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78378.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78436.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78438.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78477.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78559.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78586.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78617.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78622.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78675.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78720.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78726.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78791.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr78856.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79043.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79121.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79286.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79327.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79354.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79388.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79450.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79737-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr79737-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr80153.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr80421.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr80501.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr80692.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr81281.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr81423.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr81503.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr81555.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr81556.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr81588.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr81913.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr82192.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr82210.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr82387.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr82388.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr82524.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr82954.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr83269.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr83298.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr83362.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr83383.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr83477.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr84169.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr84339.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr84478.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr84521.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr84524.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr84748.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85095.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85156.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85169.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85331.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85529-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85529-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85582-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85582-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85582-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr85756.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr86231.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr86492.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr86528.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr86714.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr86844.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr87053.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr87290.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr87623.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr88693.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr88714.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr88739.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr88904.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr89195.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr89369.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr89434.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr89634.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr89826.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr90025.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr90949.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pr91137.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/printf-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/printf-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/printf-chk-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pta-field-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pta-field-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ptr-arith-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pure-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/pushpop_macro.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/regstack-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/restrict-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/return-addr.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/scal-to-vec1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/scal-to-vec2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/scal-to-vec3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/scope-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/shiftdi-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/shiftdi.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/shiftopt-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/simd-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/simd-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/simd-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/simd-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/simd-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ssad-run.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/stdarg-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/stdarg-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/stdarg-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/stdarg-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/stkalign.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strcmp-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strcpy-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strcpy-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strct-pack-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strct-pack-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strct-pack-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strct-pack-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strct-stdarg-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strct-varg-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/string-opt-17.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/string-opt-18.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/string-opt-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strlen-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strlen-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strlen-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strlen-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strlen-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strlen-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strlen-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/strncmp-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-aliasing-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-cpy-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-ini-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-ini-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-ini-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-ini-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-ret-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/struct-ret-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/switch-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/tstdi-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/unroll-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/usad-run.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/user-printf.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/usmul.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-10.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-11.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-12.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-13.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-14.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-15.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-16.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-17.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-18.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-19.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-20.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-21.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-22.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-23.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-24.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-26.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-8.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-9.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-pack-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/va-arg-trap-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vfprintf-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vfprintf-chk-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vla-dealloc-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vprintf-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vprintf-chk-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vrp-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vrp-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vrp-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vrp-4.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vrp-5.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vrp-6.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/vrp-7.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/wchar_t-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/widechar-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/widechar-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/widechar-3.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/zero-struct-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/zero-struct-2.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/zerolen-1.c
test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/zerolen-2.c
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+#include <string.h>
+
+static int
+special_format (fmt)
+ const char *fmt;
+{
+ return (strchr (fmt, '*') != 0
+ || strchr (fmt, 'V') != 0
+ || strchr (fmt, 'S') != 0
+ || strchr (fmt, 'n') != 0);
+}
+
+main()
+{
+ if (special_format ("ee"))
+ abort ();
+ if (!special_format ("*e"))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000113-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000113-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000113-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000113-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+struct x {
+ unsigned x1:1;
+ unsigned x2:2;
+ unsigned x3:3;
+};
+
+foobar (int x, int y, int z)
+{
+ struct x a = {x, y, z};
+ struct x b = {x, y, z};
+ struct x *c = &b;
+
+ c->x3 += (a.x2 - a.x1) * c->x2;
+ if (a.x1 != 1 || c->x3 != 5)
+ abort ();
+ exit (0);
+}
+
+main()
+{
+ foobar (1, 2, 3);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000121-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000121-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000121-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000121-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+void big(long long u) { }
+
+void doit(unsigned int a,unsigned int b,char *id)
+{
+ big(*id);
+ big(a);
+ big(b);
+}
+
+int main(void)
+{
+ doit(1,1,"\n");
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000205-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000205-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000205-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000205-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+static int f (int a)
+{
+ if (a == 0)
+ return 0;
+ do
+ if (a & 128)
+ return 1;
+ while (f (0));
+ return 0;
+}
+
+int main(void)
+{
+ if (f (~128))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000217-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000217-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000217-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000217-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+unsigned short int showbug(unsigned short int *a, unsigned short int *b)
+{
+ *a += *b -8;
+ return (*a >= 8);
+}
+
+int main()
+{
+ unsigned short int x = 0;
+ unsigned short int y = 10;
+
+ if (showbug(&x, &y) != 0)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000223-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000223-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000223-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000223-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,61 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Nathan Sidwell 23 Feb 2000 <nathan at codesourcery.com> */
+
+/* __alignof__ should never return a non-power of 2
+ eg, sizeof(long double) might be 12, but that means it must be alignable
+ on a 4 byte boundary. */
+
+void check (char const *type, int align)
+{
+ if ((align & -align) != align)
+ {
+ abort ();
+ }
+}
+
+#define QUOTE_(s) #s
+#define QUOTE(s) QUOTE_(s)
+
+#define check(t) check(QUOTE(t), __alignof__(t))
+
+// This struct should have an alignment of the lcm of all the types. If one of
+// the base alignments is not a power of two, then A cannot be power of two
+// aligned.
+struct A
+{
+ char c;
+ signed short ss;
+ unsigned short us;
+ signed int si;
+ unsigned int ui;
+ signed long sl;
+ unsigned long ul;
+ signed long long sll;
+ unsigned long long ull;
+ float f;
+ double d;
+ long double ld;
+ void *dp;
+ void (*fp)();
+};
+
+int main ()
+{
+ check (void);
+ check (char);
+ check (signed short);
+ check (unsigned short);
+ check (signed int);
+ check (unsigned int);
+ check (signed long);
+ check (unsigned long);
+ check (signed long long);
+ check (unsigned long long);
+ check (float);
+ check (double);
+ check (long double);
+ check (void *);
+ check (void (*)());
+ check (struct A);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000224-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000224-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000224-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000224-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+int loop_1 = 100;
+int loop_2 = 7;
+int flag = 0;
+
+int test (void)
+{
+ int i;
+ int counter = 0;
+
+ while (loop_1 > counter) {
+ if (flag & 1) {
+ for (i = 0; i < loop_2; i++) {
+ counter++;
+ }
+ }
+ flag++;
+ }
+ return 1;
+}
+
+int main()
+{
+ if (test () != 1)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000225-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000225-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000225-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000225-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+int main ()
+{
+ int nResult;
+ int b=0;
+ int i = -1;
+
+ do
+ {
+ if (b!=0) {
+ abort ();
+ nResult=1;
+ } else {
+ nResult=0;
+ }
+ i++;
+ b=(i+2)*4;
+ } while (i < 0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000227-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000227-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000227-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000227-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+static const unsigned char f[] = "\0\377";
+static const unsigned char g[] = "\0ÿ";
+
+int main(void)
+{
+ if (sizeof f != 3 || sizeof g != 3)
+ abort ();
+ if (f[0] != g[0])
+ abort ();
+ if (f[1] != g[1])
+ abort ();
+ if (f[2] != g[2])
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000313-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000313-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000313-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000313-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+unsigned int buggy (unsigned int *param)
+{
+ unsigned int accu, zero = 0, borrow;
+ accu = - *param;
+ borrow = - (accu > zero);
+ *param += accu;
+ return borrow;
+}
+
+int main (void)
+{
+ unsigned int param = 1;
+ unsigned int borrow = buggy (¶m);
+
+ if (param != 0)
+ abort ();
+ if (borrow + 1 != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+int main ()
+{
+ long winds = 0;
+
+ while (winds != 0)
+ {
+ if (*(char *) winds)
+ break;
+ }
+
+ if (winds == 0 || winds != 0 || *(char *) winds)
+ exit (0);
+
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+typedef unsigned long long uint64;
+const uint64 bigconst = 1ULL << 34;
+
+int a = 1;
+
+static
+uint64 getmask(void)
+{
+ if (a)
+ return bigconst;
+ else
+ return 0;
+}
+
+main()
+{
+ uint64 f = getmask();
+ if (sizeof (long long) == 8
+ && f != bigconst) abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000314-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+extern void abort (void);
+
+static char arg0[] = "arg0";
+static char arg1[] = "arg1";
+
+static void attr_rtx (char *, char *);
+static char *attr_string (char *);
+static void attr_eq (char *, char *);
+
+static void
+attr_rtx (char *varg0, char *varg1)
+{
+ if (varg0 != arg0)
+ abort ();
+
+ if (varg1 != arg1)
+ abort ();
+
+ return;
+}
+
+static void
+attr_eq (name, value)
+ char *name, *value;
+{
+ return attr_rtx (attr_string (name),
+ attr_string (value));
+}
+
+static char *
+attr_string (str)
+ char *str;
+{
+ return str;
+}
+
+int main()
+{
+ attr_eq (arg0, arg1);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000402-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000402-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000402-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000402-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+#include <limits.h>
+
+#if ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull
+int main(void) { exit (0); }
+#else
+#if ULONG_MAX != 18446744073709551615ull
+typedef unsigned long long ull;
+#else
+typedef unsigned long ull;
+#endif
+
+#include <stdio.h>
+
+void checkit(int);
+
+main () {
+ const ull a = 0x1400000000ULL;
+ const ull b = 0x80000000ULL;
+ const ull c = a/b;
+ const ull d = 0x1400000000ULL / 0x80000000ULL;
+
+ checkit ((int) c);
+ checkit ((int) d);
+
+ exit(0);
+}
+
+void checkit (int a)
+{
+ if (a != 40)
+ abort();
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000403-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000403-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000403-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000403-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+extern unsigned long aa[], bb[];
+
+int seqgt (unsigned long a, unsigned short win, unsigned long b);
+
+int seqgt2 (unsigned long a, unsigned short win, unsigned long b);
+
+main()
+{
+ if (! seqgt (*aa, 0x1000, *bb) || ! seqgt2 (*aa, 0x1000, *bb))
+ abort ();
+
+ exit (0);
+}
+
+int
+seqgt (unsigned long a, unsigned short win, unsigned long b)
+{
+ return (long) ((a + win) - b) > 0;
+}
+
+int
+seqgt2 (unsigned long a, unsigned short win, unsigned long b)
+{
+ long l = ((a + win) - b);
+ return l > 0;
+}
+
+unsigned long aa[] = { (1UL << (sizeof (long) * 8 - 1)) - 0xfff };
+unsigned long bb[] = { (1UL << (sizeof (long) * 8 - 1)) - 0xfff };
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+short int i = -1;
+const char * const wordlist[207];
+
+const char * const *
+foo(void)
+{
+ register const char * const *wordptr = &wordlist[207u + i];
+ return wordptr;
+}
+
+int
+main()
+{
+ if (foo() != &wordlist[206])
+ abort ();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+int f(int a,int *y)
+{
+ int x = a;
+
+ if (a==0)
+ return *y;
+
+ return f(a-1,&x);
+}
+
+int main(int argc,char **argv)
+{
+ if (f (100, (int *) 0) != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+typedef struct {
+ char y;
+ char x[32];
+} X;
+
+int z (void)
+{
+ X xxx;
+ xxx.x[0] =
+ xxx.x[31] = '0';
+ xxx.y = 0xf;
+ return f (xxx, xxx);
+}
+
+int main (void)
+{
+ int val;
+
+ val = z ();
+ if (val != 0x60)
+ abort ();
+ exit (0);
+}
+
+int f(X x, X y)
+{
+ if (x.y != y.y)
+ return 'F';
+
+ return x.x[0] + y.x[0];
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+ void f(int i, int j, int radius, int width, int N)
+ {
+ const int diff = i-radius;
+ const int lowk = (diff>0 ? diff : 0 );
+ int k;
+
+ for(k=lowk; k<= 2; k++){
+ int idx = ((k-i+radius)*width-j+radius);
+ if (idx < 0)
+ abort ();
+ }
+
+ for(k=lowk; k<= 2; k++);
+ }
+
+
+ int main(int argc, char **argv)
+ {
+ int exc_rad=2;
+ int N=8;
+ int i;
+ for(i=1; i<4; i++)
+ f(i,1,exc_rad,2*exc_rad + 1, N);
+ exit (0);
+ }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-5.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-5.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-5.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-5.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+int main( void ) {
+ struct {
+ int node;
+ int type;
+ } lastglob[1] = { { 0 , 1 } };
+
+ if (lastglob[0].node != 0 || lastglob[0].type != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-6.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-6.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-6.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000412-6.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+unsigned bug (unsigned short value, unsigned short *buffer,
+ unsigned short *bufend);
+
+unsigned short buf[] = {1, 4, 16, 64, 256};
+int main()
+{
+ if (bug (512, buf, buf + 3) != 491)
+ abort ();
+
+ exit (0);
+}
+
+unsigned
+bug (unsigned short value, unsigned short *buffer, unsigned short *bufend)
+{
+ unsigned short *tmp;
+
+ for (tmp = buffer; tmp < bufend; tmp++)
+ value -= *tmp;
+
+ return value;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000419-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000419-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000419-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000419-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+struct foo { int a, b, c; };
+
+void
+brother (int a, int b, int c)
+{
+ if (a)
+ abort ();
+}
+
+void
+sister (struct foo f, int b, int c)
+{
+ brother ((f.b == b), b, c);
+}
+
+int
+main ()
+{
+ struct foo f = { 7, 8, 9 };
+ sister (f, 1, 2);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000422-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000422-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000422-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000422-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+int ops[13] =
+{
+ 11, 12, 46, 3, 2, 2, 3, 2, 1, 3, 2, 1, 2
+};
+
+int correct[13] =
+{
+ 46, 12, 11, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1
+};
+
+int num = 13;
+
+int main()
+{
+ int i;
+
+ for (i = 0; i < num; i++)
+ {
+ int j;
+
+ for (j = num - 1; j > i; j--)
+ {
+ if (ops[j-1] < ops[j])
+ {
+ int op = ops[j];
+ ops[j] = ops[j-1];
+ ops[j-1] = op;
+ }
+ }
+ }
+
+
+ for (i = 0; i < num; i++)
+ if (ops[i] != correct[i])
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000503-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000503-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000503-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000503-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+unsigned long
+sub (int a)
+{
+ return ((0 > a - 2) ? 0 : a - 2) * sizeof (long);
+}
+
+main ()
+{
+ if (sub (0) != 0)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000511-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000511-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000511-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000511-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+void f (int value, int expect)
+{
+ if (value != expect)
+ abort ();
+}
+
+int main()
+{
+ int a = 7, b = 6, c = 4, d = 7, e = 2;
+
+ f (a||b%c, 1);
+ f (a?b%c:0, 2);
+ f (a=b%c, 2);
+ f (a*=b%c, 4);
+ f (a/=b%c, 2);
+ f (a%=b%c, 0);
+ f (a+=b%c, 2);
+ f (d||c&&e, 1);
+ f (d?c&&e:0, 1);
+ f (d=c&&e, 1);
+ f (d*=c&&e, 1);
+ f (d%=c&&e, 0);
+ f (d+=c&&e, 1);
+ f (d-=c&&e, 0);
+ f (d||c||e, 1);
+ f (d?c||e:0, 0);
+ f (d=c||e, 1);
+ f (d*=c||e, 1);
+ f (d%=c||e, 0);
+ f (d+=c||e, 1);
+ f (d-=c||e, 0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+#include <stdarg.h>
+
+int
+bar (int a, va_list ap)
+{
+ int b;
+
+ do
+ b = va_arg (ap, int);
+ while (b > 10);
+
+ return a + b;
+}
+
+int
+foo (int a, ...)
+{
+ va_list ap;
+
+ va_start (ap, a);
+ return bar (a, ap);
+}
+
+int
+main ()
+{
+ if (foo (1, 2, 3) != 3)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000519-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+long x = -1L;
+
+int main()
+{
+ long b = (x != -1L);
+
+ if (b)
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000523-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000523-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000523-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000523-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+int
+main (void)
+{
+ long long x;
+ int n;
+
+ if (sizeof (long long) < 8)
+ exit (0);
+
+ n = 9;
+ x = (((long long) n) << 55) / 0xff;
+
+ if (x == 0)
+ abort ();
+
+ x = (((long long) 9) << 55) / 0xff;
+
+ if (x == 0)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000528-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000528-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000528-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000528-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+/* Copyright (C) 2000 Free Software Foundation */
+/* Contributed by Alexandre Oliva <aoliva at cygnus.com> */
+
+unsigned long l = (unsigned long)-2;
+unsigned short s;
+
+int main () {
+ long t = l;
+ s = t;
+ if (s != (unsigned short)-2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000603-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000603-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000603-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000603-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* It is not clear whether this test is conforming. See DR#236
+ http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_236.htm. However,
+ there seems to be consensus that the presence of a union to aggregate
+ struct s1 and struct s2 should make it conforming. */
+struct s1 { double d; };
+struct s2 { double d; };
+union u { struct s1 x; struct s2 y; };
+
+double f(struct s1 *a, struct s2 *b)
+{
+ a->d = 1.0;
+ return b->d + 1.0;
+}
+
+int main()
+{
+ union u a;
+ a.x.d = 0.0;
+ if (f (&a.x, &a.y) != 2.0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,48 @@
+typedef struct _RenderInfo RenderInfo;
+struct _RenderInfo
+{
+ int y;
+ float scaley;
+ int src_y;
+};
+
+static void bar(void) { }
+
+static int
+render_image_rgb_a (RenderInfo * info)
+{
+ int y, ye;
+ float error;
+ float step;
+
+ y = info->y;
+ ye = 256;
+
+ step = 1.0 / info->scaley;
+
+ error = y * step;
+ error -= ((int) error) - step;
+
+ for (; y < ye; y++) {
+ if (error >= 1.0) {
+ info->src_y += (int) error;
+ error -= (int) error;
+ bar();
+ }
+ error += step;
+ }
+ return info->src_y;
+}
+
+int main (void)
+{
+ RenderInfo info;
+
+ info.y = 0;
+ info.src_y = 0;
+ info.scaley = 1.0;
+
+ if (render_image_rgb_a(&info) != 256)
+ abort ();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+struct F { int i; };
+
+void f1(struct F *x, struct F *y)
+{
+ int timeout = 0;
+ for (; ((const struct F*)x)->i < y->i ; x->i++)
+ if (++timeout > 5)
+ abort ();
+}
+
+main()
+{
+ struct F x, y;
+ x.i = 0;
+ y.i = 1;
+ f1 (&x, &y);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000605-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+struct F { int x; int y; };
+
+int main()
+{
+ int timeout = 0;
+ int x = 0;
+ while (1)
+ {
+ const struct F i = { x++, };
+ if (i.x > 0)
+ break;
+ if (++timeout > 5)
+ goto die;
+ }
+ return 0;
+ die:
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000622-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000622-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000622-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000622-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+long foo(long a, long b, long c)
+{
+ if (a != 12 || b != 1 || c != 11)
+ abort();
+ return 0;
+}
+long bar (long a, long b)
+{
+ return b;
+}
+void baz (long a, long b, void *c)
+{
+ long d;
+ d = (long)c;
+ foo(d, bar (a, 1), b);
+}
+int main()
+{
+ baz (10, 11, (void *)12);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000703-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000703-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000703-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000703-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+void abort(void);
+void exit(int);
+struct baz
+{
+ char a[17];
+ char b[3];
+ unsigned int c;
+ unsigned int d;
+};
+
+void foo(struct baz *p, unsigned int c, unsigned int d)
+{
+ __builtin_memcpy (p->b, "abc", 3);
+ p->c = c;
+ p->d = d;
+}
+
+void bar(struct baz *p, unsigned int c, unsigned int d)
+{
+ ({ void *s = (p);
+ __builtin_memset (s, '\0', sizeof (struct baz));
+ s; });
+ __builtin_memcpy (p->a, "01234567890123456", 17);
+ __builtin_memcpy (p->b, "abc", 3);
+ p->c = c;
+ p->d = d;
+}
+
+int main()
+{
+ struct baz p;
+ foo(&p, 71, 18);
+ if (p.c != 71 || p.d != 18)
+ abort();
+ bar(&p, 59, 26);
+ if (p.c != 59 || p.d != 26)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+extern void abort(void);
+extern void exit(int);
+
+struct baz {
+ int a, b, c, d, e;
+};
+
+void bar(struct baz *x, int f, int g, int h, int i, int j)
+{
+ if (x->a != 1 || x->b != 2 || x->c != 3 || x->d != 4 || x->e != 5 ||
+ f != 6 || g != 7 || h != 8 || i != 9 || j != 10)
+ abort();
+}
+
+void foo(struct baz x, char **y)
+{
+ bar(&x,6,7,8,9,10);
+}
+
+int main()
+{
+ struct baz x;
+
+ x.a = 1;
+ x.b = 2;
+ x.c = 3;
+ x.d = 4;
+ x.e = 5;
+ foo(x,(char **)0);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+extern void abort(void);
+extern void exit(int);
+
+struct baz {
+ int a, b, c, d, e;
+};
+
+void bar(struct baz *x, int f, int g, int h, int i, int j)
+{
+ if (x->a != 1 || x->b != 2 || x->c != 3 || x->d != 4 || x->e != 5 ||
+ f != 6 || g != 7 || h != 8 || i != 9 || j != 10)
+ abort();
+}
+
+void foo(char *z, struct baz x, char *y)
+{
+ bar(&x,6,7,8,9,10);
+}
+
+int main()
+{
+ struct baz x;
+
+ x.a = 1;
+ x.b = 2;
+ x.c = 3;
+ x.d = 4;
+ x.e = 5;
+ foo((char *)0,x,(char *)0);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+extern void abort(void);
+extern void exit(int);
+
+int c;
+
+void baz(int *p)
+{
+ c = *p;
+}
+
+void bar(int b)
+{
+ if (c != 1 || b != 2)
+ abort();
+}
+
+void foo(int a, int b)
+{
+ baz(&a);
+ bar(b);
+}
+
+int main()
+{
+ foo(1, 2);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+extern void abort(void);
+extern void exit(int);
+
+int *c;
+
+void bar(int b)
+{
+ if (*c != 1 || b != 2)
+ abort();
+}
+
+void foo(int a, int b)
+{
+ c = &a;
+ bar(b);
+}
+
+int main()
+{
+ foo(1, 2);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-5.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-5.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-5.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000706-5.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+extern void abort(void);
+extern void exit(int);
+
+struct baz { int a, b, c; };
+
+struct baz *c;
+
+void bar(int b)
+{
+ if (c->a != 1 || c->b != 2 || c->c != 3 || b != 4)
+ abort();
+}
+
+void foo(struct baz a, int b)
+{
+ c = &a;
+ bar(b);
+}
+
+int main()
+{
+ struct baz a;
+ a.a = 1;
+ a.b = 2;
+ a.c = 3;
+ foo(a, 4);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000707-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000707-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000707-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000707-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+extern void abort(void);
+extern void exit(int);
+
+struct baz {
+ int a, b, c;
+};
+
+void
+foo (int a, int b, int c)
+{
+ if (a != 4)
+ abort ();
+}
+
+void
+bar (struct baz x, int b, int c)
+{
+ foo (x.b, b, c);
+}
+
+int
+main ()
+{
+ struct baz x = { 3, 4, 5 };
+ bar (x, 1, 2);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,118 @@
+void abort(void);
+void exit(int);
+
+void
+test1(void)
+{
+ int x = 3, y = 2;
+
+ if ((x < y ? x++ : y++) != 2)
+ abort ();
+
+ if (x != 3)
+ abort ();
+
+ if (y != 3)
+ abort ();
+}
+
+void
+test2(void)
+{
+ int x = 3, y = 2, z;
+
+ z = (x < y) ? x++ : y++;
+ if (z != 2)
+ abort ();
+
+ if (x != 3)
+ abort ();
+
+ if (y != 3)
+ abort ();
+}
+
+void
+test3(void)
+{
+ int x = 3, y = 2;
+ int xx = 3, yy = 2;
+
+ if ((xx < yy ? x++ : y++) != 2)
+ abort ();
+
+ if (x != 3)
+ abort ();
+
+ if (y != 3)
+ abort ();
+}
+
+int x, y;
+
+static void
+init_xy(void)
+{
+ x = 3;
+ y = 2;
+}
+
+void
+test4(void)
+{
+ init_xy();
+ if ((x < y ? x++ : y++) != 2)
+ abort ();
+
+ if (x != 3)
+ abort ();
+
+ if (y != 3)
+ abort ();
+}
+
+void
+test5(void)
+{
+ int z;
+
+ init_xy();
+ z = (x < y) ? x++ : y++;
+ if (z != 2)
+ abort ();
+
+ if (x != 3)
+ abort ();
+
+ if (y != 3)
+ abort ();
+}
+
+void
+test6(void)
+{
+ int xx = 3, yy = 2;
+ int z;
+
+ init_xy();
+ z = (xx < y) ? x++ : y++;
+ if (z != 2)
+ abort ();
+
+ if (x != 3)
+ abort ();
+
+ if (y != 3)
+ abort ();
+}
+
+int
+main(){
+ test1 ();
+ test2 ();
+ test3 ();
+ test4 ();
+ test5 ();
+ test6 ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000715-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+extern void abort(void);
+extern void exit(int);
+
+unsigned int foo(unsigned int a)
+{
+ return ((unsigned char)(a + 1)) * 4;
+}
+
+int main(void)
+{
+ if (foo((unsigned char)~0))
+ abort ();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+typedef struct trio { int a, b, c; } trio;
+
+int
+bar (int i, trio t)
+{
+ if (t.a == t.b || t.a == t.c)
+ abort ();
+}
+
+int
+foo (trio t, int i)
+{
+ return bar (i, t);
+}
+
+main ()
+{
+ trio t = { 1, 2, 3 };
+
+ foo (t, 4);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+static void
+compare (long long foo)
+{
+ if (foo < 4294967297LL)
+ abort();
+}
+int main(void)
+{
+ compare (8589934591LL);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+int c = -1;
+
+foo (p)
+ int *p;
+{
+ int x;
+ int a;
+
+ a = p[0];
+ x = a + 5;
+ a = c;
+ p[0] = x - 15;
+ return a;
+}
+
+int main()
+{
+ int b = 1;
+ int a = foo(&b);
+
+ if (a != -1 || b != (1 + 5 - 15))
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+/* Extracted from gas. Incorrectly generated non-pic code at -O0 for
+ IA-64, which produces linker errors on some operating systems. */
+
+struct
+{
+ int offset;
+ struct slot
+ {
+ int field[6];
+ }
+ slot[4];
+} s;
+
+int
+x ()
+{
+ int toggle = 0;
+ int r = s.slot[0].field[!toggle];
+ return r;
+}
+
+int
+main ()
+{
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-5.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-5.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-5.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000717-5.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+typedef struct trio { int a, b, c; } trio;
+
+int
+bar (int i, int j, int k, trio t)
+{
+ if (t.a != 1 || t.b != 2 || t.c != 3 ||
+ i != 4 || j != 5 || k != 6)
+ abort ();
+}
+
+int
+foo (trio t, int i, int j, int k)
+{
+ return bar (i, j, k, t);
+}
+
+main ()
+{
+ trio t = { 1, 2, 3 };
+
+ foo (t, 4, 5, 6);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000722-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000722-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000722-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000722-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+struct s { char *p; int t; };
+
+extern void bar (void);
+extern void foo (struct s *);
+
+int main(void)
+{
+ bar ();
+ bar ();
+ exit (0);
+}
+
+void
+bar (void)
+{
+ foo (& (struct s) { "hi", 1 });
+}
+
+void foo (struct s *p)
+{
+ if (p->t != 1)
+ abort();
+ p->t = 2;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000726-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000726-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000726-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000726-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+void adjust_xy (short *, short *);
+
+struct adjust_template
+{
+ short kx_x;
+ short kx_y;
+ short kx;
+ short kz;
+};
+
+static struct adjust_template adjust = {0, 0, 1, 1};
+
+main ()
+{
+ short x = 1, y = 1;
+
+ adjust_xy (&x, &y);
+
+ if (x != 1)
+ abort ();
+
+ exit (0);
+}
+
+void
+adjust_xy (x, y)
+ short *x;
+ short *y;
+{
+ *x = adjust.kx_x * *x + adjust.kx_y * *y + adjust.kx;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+double
+foo (void)
+{
+ return 0.0;
+}
+
+void
+do_sibcall (void)
+{
+ (void) foo ();
+}
+
+int
+main (void)
+{
+ double x;
+
+ for (x = 0; x < 20; x++)
+ do_sibcall ();
+ if (!(x >= 10))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000731-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+int
+main()
+{
+ int i = 1;
+ int j = 0;
+
+ while (i != 1024 || j <= 0) {
+ i *= 2;
+ ++ j;
+ }
+
+ if (j != 10)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+extern void abort(void);
+extern void exit(int);
+
+void
+foo (char *bp, unsigned n)
+{
+ register char c;
+ register char *ep = bp + n;
+ register char *sp;
+
+ while (bp < ep)
+ {
+ sp = bp + 3;
+ c = *sp;
+ *sp = *bp;
+ *bp++ = c;
+ sp = bp + 1;
+ c = *sp;
+ *sp = *bp;
+ *bp++ = c;
+ bp += 2;
+ }
+}
+
+int main(void)
+{
+ int one = 1;
+
+ if (sizeof(int) != 4 * sizeof(char))
+ exit(0);
+
+ foo((char *)&one, sizeof(one));
+ foo((char *)&one, sizeof(one));
+
+ if (one != 1)
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+extern void abort(void);
+extern void exit(int);
+int bar(void);
+int baz(void);
+
+struct foo {
+ struct foo *next;
+};
+
+struct foo *test(struct foo *node)
+{
+ while (node) {
+ if (bar() && !baz())
+ break;
+ node = node->next;
+ }
+ return node;
+}
+
+int bar (void)
+{
+ return 0;
+}
+
+int baz (void)
+{
+ return 0;
+}
+
+int main(void)
+{
+ struct foo a, b, *c;
+
+ a.next = &b;
+ b.next = (struct foo *)0;
+ c = test(&a);
+ if (c)
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* Origin: PR c/92 from Simon Marlow <t-simonm at microsoft.com>, adapted
+ to a testcase by Joseph Myers <jsm28 at cam.ac.uk>.
+*/
+
+typedef struct { } empty;
+
+typedef struct {
+ int i;
+ empty e;
+ int i2;
+} st;
+
+st s = { .i = 0, .i2 = 1 };
+
+extern void abort (void);
+
+int
+main (void)
+{
+ if (s.i2 == 1)
+ exit (0);
+ else
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000801-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* Origin: PR c/128 from Martin Sebor <sebor at roguewave.com>, adapted
+ as a testcase by Joseph Myers <jsm28 at cam.ac.uk>.
+*/
+/* Character arrays initialized by a string literal must have
+ uninitialized elements zeroed. This isn't clear in the 1990
+ standard, but was fixed in TC2 and C99; see DRs #060, #092.
+*/
+extern void abort (void);
+
+int
+foo (void)
+{
+ char s[2] = "";
+ return 0 == s[1];
+}
+
+char *t;
+
+int
+main (void)
+{
+ {
+ char s[] = "x";
+ t = s;
+ }
+ if (foo ())
+ exit (0);
+ else
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000808-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000808-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000808-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000808-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,56 @@
+typedef struct {
+ long int p_x, p_y;
+} Point;
+
+void
+bar ()
+{
+}
+
+void
+f (p0, p1, p2, p3, p4, p5)
+ Point p0, p1, p2, p3, p4, p5;
+{
+ if (p0.p_x != 0 || p0.p_y != 1
+ || p1.p_x != -1 || p1.p_y != 0
+ || p2.p_x != 1 || p2.p_y != -1
+ || p3.p_x != -1 || p3.p_y != 1
+ || p4.p_x != 0 || p4.p_y != -1
+ || p5.p_x != 1 || p5.p_y != 0)
+ abort ();
+}
+
+void
+foo ()
+{
+ Point p0, p1, p2, p3, p4, p5;
+
+ bar();
+
+ p0.p_x = 0;
+ p0.p_y = 1;
+
+ p1.p_x = -1;
+ p1.p_y = 0;
+
+ p2.p_x = 1;
+ p2.p_y = -1;
+
+ p3.p_x = -1;
+ p3.p_y = 1;
+
+ p4.p_x = 0;
+ p4.p_y = -1;
+
+ p5.p_x = 1;
+ p5.p_y = 0;
+
+ f (p0, p1, p2, p3, p4, p5);
+}
+
+int
+main()
+{
+ foo();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000815-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000815-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000815-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000815-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,70 @@
+struct table_elt
+{
+ void *exp;
+ struct table_elt *next_same_hash;
+ struct table_elt *prev_same_hash;
+ struct table_elt *next_same_value;
+ struct table_elt *prev_same_value;
+ struct table_elt *first_same_value;
+ struct table_elt *related_value;
+ int cost;
+ int mode;
+ char in_memory;
+ char in_struct;
+ char is_const;
+ char flag;
+};
+
+struct write_data
+{
+ int sp : 1;
+ int var : 1;
+ int nonscalar : 1;
+ int all : 1;
+};
+
+int cse_rtx_addr_varies_p(void *);
+void remove_from_table(struct table_elt *, int);
+static struct table_elt *table[32];
+
+void
+invalidate_memory (writes)
+ struct write_data *writes;
+{
+ register int i;
+ register struct table_elt *p, *next;
+ int all = writes->all;
+ int nonscalar = writes->nonscalar;
+
+ for (i = 0; i < 31; i++)
+ for (p = table[i]; p; p = next)
+ {
+ next = p->next_same_hash;
+ if (p->in_memory
+ && (all
+ || (nonscalar && p->in_struct)
+ || cse_rtx_addr_varies_p (p->exp)))
+ remove_from_table (p, i);
+ }
+}
+
+int cse_rtx_addr_varies_p(void *x) { return 0; }
+void remove_from_table(struct table_elt *x, int y) { abort (); }
+
+int
+main()
+{
+ struct write_data writes;
+ struct table_elt elt;
+
+ __builtin_memset(&elt, 0, sizeof(elt));
+ elt.in_memory = 1;
+ table[0] = &elt;
+
+ __builtin_memset(&writes, 0, sizeof(writes));
+ writes.var = 1;
+ writes.nonscalar = 1;
+
+ invalidate_memory(&writes);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000818-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000818-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000818-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000818-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,60 @@
+/* Copyright (C) 2000 Free Software Foundation.
+
+ by Manfred Hollstein <manfredh at redhat.com> */
+
+void *temporary_obstack;
+
+static int input (void);
+static int ISALNUM (int ch);
+static void obstack_1grow (void **ptr, int ch);
+
+int yylex (void);
+int main (void);
+
+int main (void)
+{
+ int ch = yylex ();
+
+ exit (0);
+}
+
+int yylex (void)
+{
+ int ch;
+
+#ifndef WORK_AROUND
+ for (;;)
+ {
+ ch = input ();
+ if (ISALNUM (ch))
+ obstack_1grow (&temporary_obstack, ch);
+ else if (ch != '_')
+ break;
+ }
+#else
+ do
+ {
+ ch = input ();
+ if (ISALNUM (ch))
+ obstack_1grow (&temporary_obstack, ch);
+ } while (ch == '_');
+#endif
+
+ return ch;
+}
+
+static int input (void)
+{
+ return 0;
+}
+
+static int ISALNUM (int ch)
+{
+ return ((ch >= 'A' && ch <= 'Z')
+ || (ch >= 'a' && ch <= 'z')
+ || (ch >= '0' && ch <= '0'));
+}
+
+static void obstack_1grow (void **ptr, int ch)
+{
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000819-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000819-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000819-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000819-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+int a[2] = { 2, 0 };
+
+void foo(int *sp, int cnt)
+{
+ int *p, *top;
+
+ top = sp; sp -= cnt;
+
+ for(p = sp; p <= top; p++)
+ if (*p < 2) exit(0);
+}
+
+int main()
+{
+ foo(a + 1, 1);
+ abort();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000822-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000822-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000822-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000822-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+/* { dg-require-effective-target trampolines } */
+
+int f0(int (*fn)(int *), int *p)
+{
+ return (*fn) (p);
+}
+
+int f1(void)
+{
+ int i = 0;
+
+ int f2(int *p)
+ {
+ i = 1;
+ return *p + 1;
+ }
+
+ return f0(f2, &i);
+}
+
+int main()
+{
+ if (f1() != 2)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+/* Copyright (C) 2000 Free Software Foundation */
+/* by Alexandre Oliva <aoliva at redhat.com> */
+
+#include <stdlib.h>
+
+void bar (int);
+void foo (int *);
+
+int main () {
+ static int a[] = { 0, 1, 2 };
+ int *i = &a[sizeof(a)/sizeof(*a)];
+
+ while (i-- > a)
+ foo (i);
+
+ exit (0);
+}
+
+void baz (int, int);
+
+void bar (int i) { baz (i, i); }
+void foo (int *i) { bar (*i); }
+
+void baz (int i, int j) {
+ if (i != j)
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000910-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* Copyright (C) 2000 Free Software Foundation */
+/* by Alexandre Oliva <aoliva at redhat.com> */
+
+#include <stdlib.h>
+#include <string.h>
+
+char *list[] = { "*", "e" };
+
+static int bar (const char *fmt) {
+ return (strchr (fmt, '*') != 0);
+}
+
+static void foo () {
+ int i;
+ for (i = 0; i < sizeof (list) / sizeof (*list); i++) {
+ const char *fmt = list[i];
+ if (bar (fmt))
+ continue;
+ if (i == 0)
+ abort ();
+ else
+ exit (0);
+ }
+}
+
+int main () {
+ foo ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000914-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000914-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000914-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000914-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,292 @@
+extern void *malloc(__SIZE_TYPE__);
+
+enum tree_code {
+ERROR_MARK,
+IDENTIFIER_NODE,
+OP_IDENTIFIER,
+TREE_LIST,
+TREE_VEC,
+BLOCK,
+VOID_TYPE,
+INTEGER_TYPE,
+REAL_TYPE,
+COMPLEX_TYPE,
+VECTOR_TYPE,
+ENUMERAL_TYPE,
+BOOLEAN_TYPE,
+CHAR_TYPE,
+POINTER_TYPE,
+OFFSET_TYPE,
+REFERENCE_TYPE,
+METHOD_TYPE,
+FILE_TYPE,
+ARRAY_TYPE,
+SET_TYPE,
+RECORD_TYPE,
+UNION_TYPE,
+QUAL_UNION_TYPE,
+FUNCTION_TYPE,
+LANG_TYPE,
+INTEGER_CST,
+REAL_CST,
+COMPLEX_CST,
+STRING_CST,
+FUNCTION_DECL,
+LABEL_DECL,
+CONST_DECL,
+TYPE_DECL,
+VAR_DECL,
+PARM_DECL,
+RESULT_DECL,
+FIELD_DECL,
+NAMESPACE_DECL,
+COMPONENT_REF,
+BIT_FIELD_REF,
+INDIRECT_REF,
+BUFFER_REF,
+ARRAY_REF,
+CONSTRUCTOR,
+COMPOUND_EXPR,
+MODIFY_EXPR,
+INIT_EXPR,
+TARGET_EXPR,
+COND_EXPR,
+BIND_EXPR,
+CALL_EXPR,
+METHOD_CALL_EXPR,
+WITH_CLEANUP_EXPR,
+CLEANUP_POINT_EXPR,
+PLACEHOLDER_EXPR,
+WITH_RECORD_EXPR,
+PLUS_EXPR,
+MINUS_EXPR,
+MULT_EXPR,
+TRUNC_DIV_EXPR,
+CEIL_DIV_EXPR,
+FLOOR_DIV_EXPR,
+ROUND_DIV_EXPR,
+TRUNC_MOD_EXPR,
+CEIL_MOD_EXPR,
+FLOOR_MOD_EXPR,
+ROUND_MOD_EXPR,
+RDIV_EXPR,
+EXACT_DIV_EXPR,
+FIX_TRUNC_EXPR,
+FIX_CEIL_EXPR,
+FIX_FLOOR_EXPR,
+FIX_ROUND_EXPR,
+FLOAT_EXPR,
+EXPON_EXPR,
+NEGATE_EXPR,
+MIN_EXPR,
+MAX_EXPR,
+ABS_EXPR,
+FFS_EXPR,
+LSHIFT_EXPR,
+RSHIFT_EXPR,
+LROTATE_EXPR,
+RROTATE_EXPR,
+BIT_IOR_EXPR,
+BIT_XOR_EXPR,
+BIT_AND_EXPR,
+BIT_ANDTC_EXPR,
+BIT_NOT_EXPR,
+TRUTH_ANDIF_EXPR,
+TRUTH_ORIF_EXPR,
+TRUTH_AND_EXPR,
+TRUTH_OR_EXPR,
+TRUTH_XOR_EXPR,
+TRUTH_NOT_EXPR,
+LT_EXPR,
+LE_EXPR,
+GT_EXPR,
+GE_EXPR,
+EQ_EXPR,
+NE_EXPR,
+UNORDERED_EXPR,
+ORDERED_EXPR,
+UNLT_EXPR,
+UNLE_EXPR,
+UNGT_EXPR,
+UNGE_EXPR,
+UNEQ_EXPR,
+IN_EXPR,
+SET_LE_EXPR,
+CARD_EXPR,
+RANGE_EXPR,
+CONVERT_EXPR,
+NOP_EXPR,
+NON_LVALUE_EXPR,
+SAVE_EXPR,
+UNSAVE_EXPR,
+RTL_EXPR,
+ADDR_EXPR,
+REFERENCE_EXPR,
+ENTRY_VALUE_EXPR,
+COMPLEX_EXPR,
+CONJ_EXPR,
+REALPART_EXPR,
+IMAGPART_EXPR,
+PREDECREMENT_EXPR,
+PREINCREMENT_EXPR,
+POSTDECREMENT_EXPR,
+POSTINCREMENT_EXPR,
+VA_ARG_EXPR,
+TRY_CATCH_EXPR,
+TRY_FINALLY_EXPR,
+GOTO_SUBROUTINE_EXPR,
+POPDHC_EXPR,
+POPDCC_EXPR,
+LABEL_EXPR,
+GOTO_EXPR,
+RETURN_EXPR,
+EXIT_EXPR,
+LOOP_EXPR,
+LABELED_BLOCK_EXPR,
+EXIT_BLOCK_EXPR,
+EXPR_WITH_FILE_LOCATION,
+SWITCH_EXPR,
+ LAST_AND_UNUSED_TREE_CODE
+};
+typedef union tree_node *tree;
+struct tree_common
+{
+ union tree_node *chain;
+ union tree_node *type;
+ enum tree_code code : 8;
+ unsigned side_effects_flag : 1;
+ unsigned constant_flag : 1;
+ unsigned permanent_flag : 1;
+ unsigned addressable_flag : 1;
+ unsigned volatile_flag : 1;
+ unsigned readonly_flag : 1;
+ unsigned unsigned_flag : 1;
+ unsigned asm_written_flag: 1;
+ unsigned used_flag : 1;
+ unsigned nothrow_flag : 1;
+ unsigned static_flag : 1;
+ unsigned public_flag : 1;
+ unsigned private_flag : 1;
+ unsigned protected_flag : 1;
+ unsigned bounded_flag : 1;
+ unsigned lang_flag_0 : 1;
+ unsigned lang_flag_1 : 1;
+ unsigned lang_flag_2 : 1;
+ unsigned lang_flag_3 : 1;
+ unsigned lang_flag_4 : 1;
+ unsigned lang_flag_5 : 1;
+ unsigned lang_flag_6 : 1;
+};
+union tree_node
+{
+ struct tree_common common;
+ };
+enum c_tree_code {
+ C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE,
+SRCLOC,
+SIZEOF_EXPR,
+ARROW_EXPR,
+ALIGNOF_EXPR,
+EXPR_STMT,
+COMPOUND_STMT,
+DECL_STMT,
+IF_STMT,
+FOR_STMT,
+WHILE_STMT,
+DO_STMT,
+RETURN_STMT,
+BREAK_STMT,
+CONTINUE_STMT,
+SWITCH_STMT,
+GOTO_STMT,
+LABEL_STMT,
+ASM_STMT,
+SCOPE_STMT,
+CASE_LABEL,
+STMT_EXPR,
+ LAST_C_TREE_CODE
+};
+enum cplus_tree_code {
+ CP_DUMMY_TREE_CODE = LAST_C_TREE_CODE,
+OFFSET_REF,
+PTRMEM_CST,
+NEW_EXPR,
+VEC_NEW_EXPR,
+DELETE_EXPR,
+VEC_DELETE_EXPR,
+SCOPE_REF,
+MEMBER_REF,
+TYPE_EXPR,
+AGGR_INIT_EXPR,
+THROW_EXPR,
+EMPTY_CLASS_EXPR,
+TEMPLATE_DECL,
+TEMPLATE_PARM_INDEX,
+TEMPLATE_TYPE_PARM,
+TEMPLATE_TEMPLATE_PARM,
+BOUND_TEMPLATE_TEMPLATE_PARM,
+TYPENAME_TYPE,
+TYPEOF_TYPE,
+USING_DECL,
+DEFAULT_ARG,
+TEMPLATE_ID_EXPR,
+CPLUS_BINDING,
+OVERLOAD,
+WRAPPER,
+LOOKUP_EXPR,
+FUNCTION_NAME,
+MODOP_EXPR,
+CAST_EXPR,
+REINTERPRET_CAST_EXPR,
+CONST_CAST_EXPR,
+STATIC_CAST_EXPR,
+DYNAMIC_CAST_EXPR,
+DOTSTAR_EXPR,
+TYPEID_EXPR,
+PSEUDO_DTOR_EXPR,
+SUBOBJECT,
+CTOR_STMT,
+CLEANUP_STMT,
+START_CATCH_STMT,
+CTOR_INITIALIZER,
+RETURN_INIT,
+TRY_BLOCK,
+HANDLER,
+TAG_DEFN,
+IDENTITY_CONV,
+LVALUE_CONV,
+QUAL_CONV,
+STD_CONV,
+PTR_CONV,
+PMEM_CONV,
+BASE_CONV,
+REF_BIND,
+USER_CONV,
+AMBIG_CONV,
+RVALUE_CONV,
+ LAST_CPLUS_TREE_CODE
+};
+
+blah(){}
+
+convert_like_real (convs)
+ tree convs;
+{
+ switch (((enum tree_code) (convs)->common.code))
+ {
+ case AMBIG_CONV:
+ return blah();
+ default:
+ break;
+ };
+ abort ();
+}
+
+main()
+{
+ tree convs = (void *)malloc (sizeof (struct tree_common));;
+
+ convs->common.code = AMBIG_CONV;
+ convert_like_real (convs);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000917-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000917-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000917-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20000917-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,42 @@
+/* This bug exists in gcc-2.95, egcs-1.1.2, gcc-2.7.2 and probably
+ every other version as well. */
+
+typedef struct int3 { int a, b, c; } int3;
+
+int3
+one (void)
+{
+ return (int3) { 1, 1, 1 };
+}
+
+int3
+zero (void)
+{
+ return (int3) { 0, 0, 0 };
+}
+
+int
+main (void)
+{
+ int3 a;
+
+ /* gcc allocates a temporary for the inner expression statement
+ to store the return value of `one'.
+
+ gcc frees the temporaries for the inner expression statement.
+
+ gcc realloates the same temporary slot to store the return
+ value of `zero'.
+
+ gcc expands the call to zero ahead of the expansion of the
+ statement expressions. The temporary gets the value of `zero'.
+
+ gcc expands statement expressions and the stale temporary is
+ clobbered with the value of `one'. The bad value is copied from
+ the temporary into *&a. */
+
+ *({ ({ one (); &a; }); }) = zero ();
+ if (a.a && a.b && a.c)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+int a,b;
+main()
+{
+ int c=-2;
+ int d=0xfe;
+ int e=a&1;
+ int f=b&2;
+ if ((char)(c|(e&f)) == (char)d)
+ return 0;
+ else
+ abort();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001009-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+int b=1;
+int foo()
+{
+ int a;
+ int c;
+ a=0xff;
+ for (;b;b--)
+ {
+ c=1;
+ asm(""::"r"(c));
+ c=(signed char)a;
+ }
+ if (c!=-1)
+ abort();
+ return c;
+}
+int main()
+{
+ foo();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001011-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001011-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001011-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001011-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+extern void abort(void);
+extern int strcmp(const char *, const char *);
+
+int foo(const char *a)
+{
+ return strcmp(a, "main");
+}
+
+int main(void)
+{
+ if(foo(__FUNCTION__))
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001013-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001013-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001013-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001013-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+struct x {
+ int a, b;
+} z = { -4028, 4096 };
+
+int foo(struct x *p, int y)
+{
+ if ((y & 0xff) != y || -p->b >= p->a)
+ return 1;
+ return 0;
+}
+
+main()
+{
+ if (foo (&z, 10))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+
+void bug (double *Cref, char transb, int m, int n, int k,
+ double a, double *A, int fdA, double *B, int fdB,
+ double b, double *C, int fdC)
+{
+ if (C != Cref) abort ();
+}
+
+int main (void)
+{
+ double A[1], B[1], C[1];
+
+ bug (C, 'B', 1, 2, 3, 4.0, A, 5, B, 6, 7.0, C, 8);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001017-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+void
+fn_4parms (unsigned char a, long *b, long *c, unsigned int *d)
+{
+ if (*b != 1 || *c != 2 || *d != 3)
+ abort ();
+}
+
+int
+main ()
+{
+ unsigned char a = 0;
+ unsigned long b = 1, c = 2;
+ unsigned int d = 3;
+
+ fn_4parms (a, &b, &c, &d);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001024-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001024-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001024-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001024-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+struct a;
+
+extern int baz (struct a *__restrict x);
+
+struct a {
+ long v;
+ long w;
+};
+
+struct b {
+ struct a c;
+ struct a d;
+};
+
+int bar (int x, const struct b *__restrict y, struct b *__restrict z)
+{
+ if (y->c.v || y->c.w != 250000 || y->d.v || y->d.w != 250000)
+ abort();
+}
+
+void foo(void)
+{
+ struct b x;
+ x.c.v = 0;
+ x.c.w = 250000;
+ x.d = x.c;
+ bar(0, &x, ((void *)0));
+}
+
+int main()
+{
+ foo();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001026-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001026-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001026-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001026-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,44 @@
+extern void abort (void);
+
+typedef struct {
+ long r[(19 + sizeof (long))/(sizeof (long))];
+} realvaluetype;
+
+typedef void *tree;
+
+static realvaluetype
+real_value_from_int_cst (tree x, tree y)
+{
+ realvaluetype r;
+ int i;
+ for (i = 0; i < sizeof(r.r)/sizeof(long); ++i)
+ r.r[i] = -1;
+ return r;
+}
+
+struct brfic_args
+{
+ tree type;
+ tree i;
+ realvaluetype d;
+};
+
+static void
+build_real_from_int_cst_1 (data)
+ void * data;
+{
+ struct brfic_args *args = (struct brfic_args *) data;
+ args->d = real_value_from_int_cst (args->type, args->i);
+}
+
+int main()
+{
+ struct brfic_args args;
+
+ __builtin_memset (&args, 0, sizeof(args));
+ build_real_from_int_cst_1 (&args);
+
+ if (args.d.r[0] == 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001027-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001027-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001027-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001027-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+int x,*p=&x;
+
+int main()
+{
+ int i=0;
+ x=1;
+ p[i]=2;
+ if (x != 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+extern void abort (void);
+extern void exit (int);
+
+void t1 (int x)
+{
+ if (x != 4100)
+ abort ();
+}
+
+int t2 (void)
+{
+ int i;
+ t1 ((i = 4096) + 4);
+ return i;
+}
+
+void t3 (long long x)
+{
+ if (x != 0x80000fffULL)
+ abort ();
+}
+
+long long t4 (void)
+{
+ long long i;
+ t3 ((i = 4096) + 0x7fffffffULL);
+ return i;
+}
+
+main ()
+{
+ if (t2 () != 4096)
+ abort ();
+ if (t4 () != 4096)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001101.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001101.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001101.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001101.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+/* { dg-require-effective-target untyped_assembly } */
+extern void abort(void);
+
+typedef struct
+{
+ unsigned int unchanging : 1;
+} struc, *rtx;
+
+rtx dummy ( int *a, rtx *b)
+{
+ *a = 1;
+ *b = (rtx)7;
+ return (rtx)1;
+}
+
+void bogus (insn, thread, delay_list)
+ rtx insn;
+ rtx thread;
+ rtx delay_list;
+{
+ rtx new_thread;
+ int must_annul;
+
+ delay_list = dummy ( &must_annul, &new_thread);
+ if (delay_list == 0 && new_thread )
+ {
+ thread = new_thread;
+ }
+ if (delay_list && must_annul)
+ insn->unchanging = 1;
+ if (new_thread != thread )
+ abort();
+}
+
+int main()
+{
+ struc baz;
+ bogus (&baz, (rtx)7, 0);
+ exit(0);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001108-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001108-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001108-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001108-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+long long
+signed_poly (long long sum, long x)
+{
+ sum += (long long) (long) sum * (long long) x;
+ return sum;
+}
+
+unsigned long long
+unsigned_poly (unsigned long long sum, unsigned long x)
+{
+ sum += (unsigned long long) (unsigned long) sum * (unsigned long long) x;
+ return sum;
+}
+
+int
+main (void)
+{
+ if (signed_poly (2LL, -3) != -4LL)
+ abort ();
+
+ if (unsigned_poly (2ULL, 3) != 8ULL)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001111-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001111-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001111-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001111-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+
+static int next_buffer = 0;
+void bar (void);
+
+static int t = 1, u = 0;
+
+long
+foo (unsigned int offset)
+{
+ unsigned i, buffer;
+ int x;
+ char *data;
+
+ i = u;
+ if (i)
+ return i * 0xce2f;
+
+ buffer = next_buffer;
+ data = buffer * 0xce2f;
+ for (i = 0; i < 2; i++)
+ bar ();
+ buffer = next_buffer;
+ return buffer * 0xce2f + offset;
+
+}
+
+void
+bar (void)
+{
+}
+
+int
+main ()
+{
+ if (foo (3) != 3)
+ abort ();
+ next_buffer = 1;
+ if (foo (2) != 0xce2f + 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+int main ()
+{
+ long long i = 1;
+
+ i = i * 2 + 1;
+
+ if (i != 3)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001121-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001121-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001121-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001121-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* { dg-options "-fgnu89-inline" } */
+
+extern void abort (void);
+extern void exit (int);
+
+double d;
+
+__inline__ double foo (void)
+{
+ return d;
+}
+
+__inline__ int bar (void)
+{
+ foo();
+ return 0;
+}
+
+int main (void)
+{
+ if (bar ())
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001124-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001124-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001124-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001124-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,76 @@
+
+struct inode {
+ long long i_size;
+ struct super_block *i_sb;
+};
+
+struct file {
+ long long f_pos;
+};
+
+struct super_block {
+ int s_blocksize;
+ unsigned char s_blocksize_bits;
+ int s_hs;
+};
+
+static char *
+isofs_bread(unsigned int block)
+{
+ if (block)
+ abort ();
+ exit(0);
+}
+
+static int
+do_isofs_readdir(struct inode *inode, struct file *filp)
+{
+ int bufsize = inode->i_sb->s_blocksize;
+ unsigned char bufbits = inode->i_sb->s_blocksize_bits;
+ unsigned int block, offset;
+ char *bh = 0;
+ int hs;
+
+ if (filp->f_pos >= inode->i_size)
+ return 0;
+
+ offset = filp->f_pos & (bufsize - 1);
+ block = filp->f_pos >> bufbits;
+ hs = inode->i_sb->s_hs;
+
+ while (filp->f_pos < inode->i_size) {
+ if (!bh)
+ bh = isofs_bread(block);
+
+ hs += block << bufbits;
+
+ if (hs == 0)
+ filp->f_pos++;
+
+ if (offset >= bufsize)
+ offset &= bufsize - 1;
+
+ if (*bh)
+ filp->f_pos++;
+
+ filp->f_pos++;
+ }
+ return 0;
+}
+
+struct super_block s;
+struct inode i;
+struct file f;
+
+int
+main(int argc, char **argv)
+{
+ s.s_blocksize = 512;
+ s.s_blocksize_bits = 9;
+ i.i_size = 2048;
+ i.i_sb = &s;
+ f.f_pos = 0;
+
+ do_isofs_readdir(&i,&f);
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+static inline int bar(void) { return 1; }
+static int mem[3];
+
+static int foo(int x)
+{
+ if (x != 0)
+ return x;
+
+ mem[x++] = foo(bar());
+
+ if (x != 1)
+ abort();
+
+ return 0;
+}
+
+int main()
+{
+ foo(0);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001130-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+static int which_alternative = 3;
+
+static const char *i960_output_ldconst (void);
+
+static const char *
+output_25 (void)
+{
+ switch (which_alternative)
+ {
+ case 0:
+ return "mov %1,%0";
+ case 1:
+ return i960_output_ldconst ();
+ case 2:
+ return "ld %1,%0";
+ case 3:
+ return "st %1,%0";
+ }
+}
+
+static const char *i960_output_ldconst (void)
+{
+ return "foo";
+}
+int main(void)
+{
+ const char *s = output_25 () ;
+ if (s[0] != 's')
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* Origin: PR c/410 from Jan Echternach
+ <jan.echternach at informatik.uni-rostock.de>,
+ adapted to a testcase by Joseph Myers <jsm28 at cam.ac.uk>.
+*/
+
+extern void exit (int);
+
+static void
+foo (void)
+{
+ struct {
+ long a;
+ char b[1];
+ } x = { 2, { 0 } };
+}
+
+int
+main (void)
+{
+ int tmp;
+ foo ();
+ tmp = 1;
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001203-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,123 @@
+struct obstack
+{
+ long chunk_size;
+ struct _obstack_chunk *chunk;
+ char *object_base;
+ char *next_free;
+ char *chunk_limit;
+ int alignment_mask;
+ unsigned maybe_empty_object;
+};
+
+struct objfile
+ {
+ struct objfile *next;
+ struct obstack type_obstack;
+ };
+
+struct type
+ {
+ unsigned length;
+ struct objfile *objfile;
+ short nfields;
+ struct field
+ {
+ union field_location
+ {
+ int bitpos;
+ unsigned long physaddr;
+ char *physname;
+ }
+ loc;
+ int bitsize;
+ struct type *type;
+ char *name;
+ }
+ *fields;
+ };
+
+struct type *alloc_type (void);
+void * xmalloc (unsigned int z);
+void _obstack_newchunk (struct obstack *o, int i);
+void get_discrete_bounds (long long *lowp, long long *highp);
+
+extern void *memset(void *, int, __SIZE_TYPE__);
+
+struct type *
+create_array_type (struct type *result_type, struct type *element_type)
+{
+ long long low_bound, high_bound;
+ if (result_type == ((void *)0))
+ {
+ result_type = alloc_type ();
+ }
+ get_discrete_bounds (&low_bound, &high_bound);
+ (result_type)->length =
+ (element_type)->length * (high_bound - low_bound + 1);
+ (result_type)->nfields = 1;
+ (result_type)->fields =
+ (struct field *) ((result_type)->objfile != ((void *)0)
+ ? (
+ {
+ struct obstack *__h =
+ (&(result_type)->objfile -> type_obstack);
+ {
+ struct obstack *__o = (__h);
+ int __len = ((sizeof (struct field)));
+ if (__o->chunk_limit - __o->next_free < __len)
+ _obstack_newchunk (__o, __len);
+ __o->next_free += __len; (void) 0;
+ };
+ ({
+ struct obstack *__o1 = (__h);
+ void *value;
+ value = (void *) __o1->object_base;
+ if (__o1->next_free == value)
+ __o1->maybe_empty_object = 1;
+ __o1->next_free = (((((__o1->next_free) - (char *) 0)
+ +__o1->alignment_mask)
+ & ~ (__o1->alignment_mask))
+ + (char *) 0);
+ if (__o1->next_free - (char *)__o1->chunk
+ > __o1->chunk_limit - (char *)__o1->chunk)
+ __o1->next_free = __o1->chunk_limit;
+ __o1->object_base = __o1->next_free;
+ value;
+ });
+ }) : xmalloc (sizeof (struct field)));
+ return (result_type);
+}
+
+struct type *
+alloc_type (void)
+{
+ abort ();
+}
+void * xmalloc (unsigned int z)
+{
+ return 0;
+}
+void _obstack_newchunk (struct obstack *o, int i)
+{
+ abort ();
+}
+void
+get_discrete_bounds (long long *lowp, long long *highp)
+{
+ *lowp = 0;
+ *highp = 2;
+}
+
+int main(void)
+{
+ struct type element_type;
+ struct type result_type;
+
+ memset (&element_type, 0, sizeof (struct type));
+ memset (&result_type, 0, sizeof (struct type));
+ element_type.length = 4;
+ create_array_type (&result_type, &element_type);
+ if (result_type.length != 12)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001221-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001221-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001221-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001221-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,7 @@
+int main ()
+{
+ unsigned long long a;
+ if (! (a = 0xfedcba9876543210ULL))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001228-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001228-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001228-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001228-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+int foo1(void)
+{
+ union {
+ char a[sizeof (unsigned)];
+ unsigned b;
+ } u;
+
+ u.b = 0x01;
+ return u.a[0];
+}
+
+int foo2(void)
+{
+ volatile union {
+ char a[sizeof (unsigned)];
+ unsigned b;
+ } u;
+
+ u.b = 0x01;
+ return u.a[0];
+}
+
+int main(void)
+{
+ if (foo1() != foo2())
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001229-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001229-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001229-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20001229-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+/* This testcase originally provoked an unaligned access fault on Alpha.
+
+ Since Digital Unix and Linux (and probably others) by default fix
+ these up in the kernel, the failure was not visible unless one
+ is sitting at the console examining logs.
+
+ So: If we know how, ask the kernel to deliver SIGBUS instead so
+ that the test case visibly fails. */
+
+#if defined(__alpha__) && defined(__linux__)
+#include <asm/sysinfo.h>
+#include <asm/unistd.h>
+
+static inline int
+setsysinfo(unsigned long op, void *buffer, unsigned long size,
+ int *start, void *arg, unsigned long flag)
+{
+ syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag);
+}
+
+static void __attribute__((constructor))
+trap_unaligned(void)
+{
+ unsigned int buf[2];
+ buf[0] = SSIN_UACPROC;
+ buf[1] = UAC_SIGBUS | UAC_NOPRINT;
+ setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0, 0);
+}
+#endif /* alpha */
+
+void foo(char *a, char *b) { }
+
+void showinfo()
+{
+ char uname[33] = "", tty[38] = "/dev/";
+ foo(uname, tty);
+}
+
+int main()
+{
+ showinfo ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010106-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010106-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010106-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010106-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* Copyright 2001 Free Software Foundation
+ Contributed by Alexandre Oliva <aoliva at redhat.com> */
+
+int f(int i) {
+ switch (i)
+ {
+ case -2:
+ return 33;
+ case -1:
+ return 0;
+ case 0:
+ return 7;
+ case 1:
+ return 4;
+ case 2:
+ return 3;
+ case 3:
+ return 15;
+ case 4:
+ return 9;
+ default:
+ abort ();
+ }
+}
+
+int main() {
+ if (f(-1))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010114-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010114-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010114-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010114-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+/* Origin: PR c/1540 from Mattias Lampe <lampe at tu-harburg.de>,
+ adapted to a testcase by Joseph Myers <jsm28 at cam.ac.uk>.
+ GCC 2.95.2 fails, CVS GCC of 2001-01-13 passes. */
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+ int array1[1] = { 1 };
+ int array2[2][1]= { { 1 }, { 0 } };
+ if (array1[0] != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010116-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010116-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010116-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010116-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* Distilled from optimization/863. */
+
+extern void abort (void);
+extern void exit (int);
+extern void ok (int);
+
+typedef struct
+{
+ int x, y, z;
+} Data;
+
+void find (Data *first, Data *last)
+{
+ int i;
+ for (i = (last - first) >> 2; i > 0; --i)
+ ok(i);
+ abort ();
+}
+
+void ok(int i)
+{
+ if (i != 1)
+ abort ();
+ exit (0);
+}
+
+int
+main ()
+{
+ Data DataList[4];
+ find (DataList + 0, DataList + 4);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010118-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010118-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010118-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010118-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+typedef struct {
+ int a, b, c, d, e, f;
+} A;
+
+void foo (A *v, int w, int x, int *y, int *z)
+{
+}
+
+void
+bar (A *v, int x, int y, int w, int h)
+{
+ if (v->a != x || v->b != y) {
+ int oldw = w;
+ int oldh = h;
+ int e = v->e;
+ int f = v->f;
+ int dx, dy;
+ foo(v, 0, 0, &w, &h);
+ dx = (oldw - w) * (double) e/2.0;
+ dy = (oldh - h) * (double) f/2.0;
+ x += dx;
+ y += dy;
+ v->a = x;
+ v->b = y;
+ v->c = w;
+ v->d = h;
+ }
+}
+
+int main ()
+{
+ A w = { 100, 110, 20, 30, -1, -1 };
+ bar (&w,400,420,50,70);
+ if (w.d != 70)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010119-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010119-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010119-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010119-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+#ifdef __OPTIMIZE__
+extern void undef (void);
+
+void bar (unsigned x) { }
+void baz (unsigned x) { }
+
+extern inline void foo (int a, int b)
+{
+ int c = 0;
+ while (c++ < b)
+ (__builtin_constant_p (a) ? ((a) > 20000 ? undef () : bar (a)) : baz (a));
+}
+#else
+void foo (int a, int b)
+{
+}
+#endif
+
+int main (void)
+{
+ foo(10, 100);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010122-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010122-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010122-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010122-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,204 @@
+/* { dg-skip-if "requires frame pointers" { *-*-* } "-fomit-frame-pointer" "" } */
+/* { dg-require-effective-target return_address } */
+
+extern void exit (int);
+extern void abort (void);
+extern void *alloca (__SIZE_TYPE__);
+char *dummy (void);
+
+#define NOINLINE __attribute__((noinline)) __attribute__ ((noclone))
+
+void *save_ret1[6];
+void *test4a (char *);
+void *test5a (char *);
+void *test6a (char *);
+
+void NOINLINE *test1 (void)
+{
+ void * temp;
+ temp = __builtin_return_address (0);
+ return temp;
+}
+
+void NOINLINE *test2 (void)
+{
+ void * temp;
+ dummy ();
+ temp = __builtin_return_address (0);
+ return temp;
+}
+
+void NOINLINE *test3 (void)
+{
+ void * temp;
+ temp = __builtin_return_address (0);
+ dummy ();
+ return temp;
+}
+
+void NOINLINE *test4 (void)
+{
+ char * save = (char*) alloca (4);
+
+ return test4a (save);
+}
+
+void *NOINLINE test4a (char * p)
+{
+ void * temp;
+ temp = __builtin_return_address (1);
+ return temp;
+}
+
+void NOINLINE *test5 (void)
+{
+ char * save = (char*) alloca (4);
+
+ return test5a (save);
+}
+
+void NOINLINE *test5a (char * p)
+{
+ void * temp;
+ dummy ();
+ temp = __builtin_return_address (1);
+ return temp;
+}
+
+void NOINLINE *test6 (void)
+{
+ char * save = (char*) alloca (4);
+
+ return test6a (save);
+}
+
+void NOINLINE *test6a (char * p)
+{
+ void * temp;
+ temp = __builtin_return_address (1);
+ dummy ();
+ return temp;
+}
+
+void *(*func1[6])(void) = { test1, test2, test3, test4, test5, test6 };
+
+char * NOINLINE call_func1 (int i)
+{
+ save_ret1[i] = func1[i] ();
+}
+
+static void *ret_addr;
+void *save_ret2[6];
+void test10a (char *);
+void test11a (char *);
+void test12a (char *);
+
+void NOINLINE test7 (void)
+{
+ ret_addr = __builtin_return_address (0);
+ return;
+}
+
+void NOINLINE test8 (void)
+{
+ dummy ();
+ ret_addr = __builtin_return_address (0);
+ return;
+}
+
+void NOINLINE test9 (void)
+{
+ ret_addr = __builtin_return_address (0);
+ dummy ();
+ return;
+}
+
+void NOINLINE test10 (void)
+{
+ char * save = (char*) alloca (4);
+
+ test10a (save);
+}
+
+void NOINLINE test10a (char * p)
+{
+ ret_addr = __builtin_return_address (1);
+ return;
+}
+
+void NOINLINE test11 (void)
+{
+ char * save = (char*) alloca (4);
+
+ test11a (save);
+}
+
+void NOINLINE test11a (char * p)
+{
+ dummy ();
+ ret_addr = __builtin_return_address (1);
+ return;
+}
+
+void NOINLINE test12 (void)
+{
+ char * save = (char*) alloca (4);
+
+ test12a (save);
+}
+
+void NOINLINE test12a (char * p)
+{
+ ret_addr = __builtin_return_address (1);
+ dummy ();
+ return;
+}
+
+char * dummy (void)
+{
+ char * save = (char*) alloca (4);
+
+ return save;
+}
+
+void (*func2[6])(void) = { test7, test8, test9, test10, test11, test12 };
+
+void NOINLINE call_func2 (int i)
+{
+ func2[i] ();
+ save_ret2[i] = ret_addr;
+}
+
+int main (void)
+{
+ int i;
+
+ for (i = 0; i < 6; i++) {
+ call_func1(i);
+ }
+
+ if (save_ret1[0] != save_ret1[1]
+ || save_ret1[1] != save_ret1[2])
+ abort ();
+ if (save_ret1[3] != save_ret1[4]
+ || save_ret1[4] != save_ret1[5])
+ abort ();
+ if (save_ret1[3] && save_ret1[0] != save_ret1[3])
+ abort ();
+
+
+ for (i = 0; i < 6; i++) {
+ call_func2(i);
+ }
+
+ if (save_ret2[0] != save_ret2[1]
+ || save_ret2[1] != save_ret2[2])
+ abort ();
+ if (save_ret2[3] != save_ret2[4]
+ || save_ret2[4] != save_ret2[5])
+ abort ();
+ if (save_ret2[3] && save_ret2[0] != save_ret2[3])
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010123-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010123-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010123-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010123-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+extern void abort ();
+extern void exit (int);
+
+struct s
+{
+ int value;
+ char *string;
+};
+
+int main (void)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ struct s *t = & (struct s) { 3, "hey there" };
+ if (t->value != 3)
+ abort();
+ t->value = 4;
+ if (t->value != 4)
+ abort();
+ }
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010129-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010129-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010129-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010129-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+/* { dg-options "-mtune=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+
+extern void abort (void);
+extern void exit (int);
+
+long baz1 (void *a)
+{
+ static long l;
+ return l++;
+}
+
+int baz2 (const char *a)
+{
+ return 0;
+}
+
+int baz3 (int i)
+{
+ if (!i)
+ abort ();
+ return 1;
+}
+
+void **bar;
+
+int foo (void *a, long b, int c)
+{
+ int d = 0, e, f = 0, i;
+ char g[256];
+ void **h;
+
+ g[0] = '\n';
+ g[1] = 0;
+
+ while (baz1 (a) < b) {
+ if (g[0] != ' ' && g[0] != '\t') {
+ f = 1;
+ e = 0;
+ if (!d && baz2 (g) == 0) {
+ if ((c & 0x10) == 0)
+ continue;
+ e = d = 1;
+ }
+ if (!((c & 0x10) && (c & 0x4000) && e) && (c & 2))
+ continue;
+ if ((c & 0x2000) && baz2 (g) == 0)
+ continue;
+ if ((c & 0x1408) && baz2 (g) == 0)
+ continue;
+ if ((c & 0x200) && baz2 (g) == 0)
+ continue;
+ if (c & 0x80) {
+ for (h = bar, i = 0; h; h = (void **)*h, i++)
+ if (baz3 (i))
+ break;
+ }
+ f = 0;
+ }
+ }
+ return 0;
+}
+
+int main ()
+{
+ void *n = 0;
+ bar = &n;
+ foo (&n, 1, 0xc811);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010206-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010206-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010206-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010206-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+int foo (void)
+{
+ int i;
+#line 1 "20010206-1.c"
+ if (0) i = 1; else i
+#line 1 "20010206-1.c"
+ = 26;
+ return i;
+}
+
+int main ()
+{
+ if (foo () != 26)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010209-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010209-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010209-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010209-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* { dg-require-effective-target alloca } */
+int b;
+int foo (void)
+{
+ int x[b];
+ int bar (int t[b])
+ {
+ int i;
+ for (i = 0; i < b; i++)
+ t[i] = i + (i > 0 ? t[i-1] : 0);
+ return t[b-1];
+ }
+ return bar (x);
+}
+
+int main ()
+{
+ b = 6;
+ if (foo () != 15)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010221-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010221-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010221-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010221-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+
+int n = 2;
+
+main ()
+{
+ int i, x = 45;
+
+ for (i = 0; i < n; i++)
+ {
+ if (i != 0)
+ x = ( i > 0 ) ? i : 0;
+ }
+
+ if (x != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010222-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010222-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010222-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010222-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,9 @@
+int a[2] = { 18, 6 };
+
+int main ()
+{
+ int b = (-3 * a[0] -3 * a[1]) / 12;
+ if (b != -6)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010224-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010224-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010224-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010224-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+extern void abort (void);
+
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+
+int16_t logadd (int16_t *a, int16_t *b);
+void ba_compute_psd (int16_t start);
+
+int16_t masktab[6] = { 1, 2, 3, 4, 5};
+int16_t psd[6] = { 50, 40, 30, 20, 10};
+int16_t bndpsd[6] = { 1, 2, 3, 4, 5};
+
+void ba_compute_psd (int16_t start)
+{
+ int i,j,k;
+ int16_t lastbin = 4;
+
+ j = start;
+ k = masktab[start];
+
+ bndpsd[k] = psd[j];
+ j++;
+
+ for (i = j; i < lastbin; i++) {
+ bndpsd[k] = logadd(&bndpsd[k], &psd[j]);
+ j++;
+ }
+}
+
+int16_t logadd (int16_t *a, int16_t *b)
+{
+ return *a + *b;
+}
+
+int main (void)
+{
+ int i;
+
+ ba_compute_psd (0);
+
+ if (bndpsd[1] != 140) abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010325-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010325-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010325-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010325-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+/* Origin: Joseph Myers <jsm28 at cam.ac.uk>.
+
+ This tests for inconsistency in whether wide STRING_CSTs use the host
+ or the target endianness. */
+
+extern void exit (int);
+extern void abort (void);
+
+int
+main (void)
+{
+ if (L"a" "b"[1] != L'b')
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010329-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010329-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010329-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010329-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+#include <limits.h>
+
+int main (void)
+{
+ void *x = ((void *)((unsigned int)INT_MAX + 2));
+ void *y = ((void *)((unsigned long)LONG_MAX + 2));
+ if (x >= ((void *)((unsigned int)INT_MAX + 1))
+ && x <= ((void *)((unsigned int)INT_MAX + 6))
+ && y >= ((void *)((unsigned long)LONG_MAX + 1))
+ && y <= ((void *)((unsigned long)LONG_MAX + 6)))
+ exit (0);
+ else
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010403-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010403-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010403-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010403-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+void b (int *);
+void c (int, int);
+void d (int);
+
+int e;
+
+void a (int x, int y)
+{
+ int f = x ? e : 0;
+ int z = y;
+
+ b (&y);
+ c (z, y);
+ d (f);
+}
+
+void b (int *y)
+{
+ (*y)++;
+}
+
+void c (int x, int y)
+{
+ if (x == y)
+ abort ();
+}
+
+void d (int x)
+{
+}
+
+int main (void)
+{
+ a (0, 0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010409-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010409-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010409-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010409-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+typedef __SIZE_TYPE__ size_t;
+extern size_t strlen (const char *s);
+
+typedef struct A {
+ int a, b;
+} A;
+
+typedef struct B {
+ struct A **a;
+ int b;
+} B;
+
+A *a;
+int b = 1, c;
+B d[1];
+
+void foo (A *x, const char *y, int z)
+{
+ c = y[4] + z * 25;
+}
+
+A *bar (const char *v, int w, int x, const char *y, int z)
+{
+ if (w)
+ abort ();
+ exit (0);
+}
+
+void test (const char *x, int *y)
+{
+ foo (d->a[d->b], "test", 200);
+ d->a[d->b] = bar (x, b ? 0 : 65536, strlen (x), "test", 201);
+ d->a[d->b]->a++;
+ if (y)
+ d->a[d->b]->b = *y;
+}
+
+int main ()
+{
+ d->b = 0;
+ d->a = &a;
+ test ("", 0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010422-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010422-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010422-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010422-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+unsigned int foo(unsigned int x)
+{
+ if (x < 5)
+ x = 4;
+ else
+ x = 8;
+ return x;
+}
+
+int main(void)
+{
+ if (foo (8) != 8)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* Leaf functions with many arguments. */
+
+int
+add (int a,
+ int b,
+ int c,
+ int d,
+ int e,
+ int f,
+ int g,
+ int h,
+ int i,
+ int j,
+ int k,
+ int l,
+ int m)
+{
+ return a+b+c+d+e+f+g+h+i+j+k+l+m;
+}
+
+int
+main(void)
+{
+ if (add (1,2,3,4,5,6,7,8,9,10,11,12,13) != 91)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010518-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+/* Mis-aligned packed structures. */
+
+typedef struct
+{
+ char b0;
+ char b1;
+ char b2;
+ char b3;
+ char b4;
+ char b5;
+} __attribute__ ((packed)) b_struct;
+
+
+typedef struct
+{
+ short a;
+ long b;
+ short c;
+ short d;
+ b_struct e;
+} __attribute__ ((packed)) a_struct;
+
+
+int
+main(void)
+{
+ volatile a_struct *a;
+ volatile a_struct b;
+
+ a = &b;
+ *a = (a_struct){1,2,3,4};
+ a->e.b4 = 'c';
+
+ if (a->a != 1 || a->b != 2 || a->c != 3 || a->d != 4 || a->e.b4 != 'c')
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010520-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010520-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010520-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010520-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+static unsigned int expr_hash_table_size = 1;
+
+int
+main ()
+{
+ int del = 1;
+ unsigned int i = 0;
+
+ if (i < expr_hash_table_size && del)
+ exit (0);
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010604-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010604-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010604-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010604-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+#include <stdbool.h>
+
+int f (int a, int b, int c, _Bool d, _Bool e, _Bool f, char g)
+{
+ if (g != 1 || d != true || e != true || f != true) abort ();
+ return a + b + c;
+}
+
+int main (void)
+{
+ if (f (1, 2, -3, true, true, true, '\001'))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+int main ()
+{
+ int v = 42;
+
+ inline int fff (int x)
+ {
+ return x*10;
+ }
+
+ return (fff (v) != 420);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010605-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+void foo (), bar (), baz ();
+int main ()
+{
+ __complex__ double x;
+ __complex__ float y;
+ __complex__ long double z;
+ __real__ x = 1.0;
+ __imag__ x = 2.0;
+ foo (x);
+ __real__ y = 3.0f;
+ __imag__ y = 4.0f;
+ bar (y);
+ __real__ z = 5.0L;
+ __imag__ z = 6.0L;
+ baz (z);
+ exit (0);
+}
+
+void foo (__complex__ double x)
+{
+ if (__real__ x != 1.0 || __imag__ x != 2.0)
+ abort ();
+}
+
+void bar (__complex__ float x)
+{
+ if (__real__ x != 3.0f || __imag__ x != 4.0f)
+ abort ();
+}
+
+void baz (__complex__ long double x)
+{
+ if (__real__ x != 5.0L || __imag__ x != 6.0L)
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010711-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010711-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010711-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010711-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+void foo (int *a) {}
+
+int main ()
+{
+ int a;
+ if (&a == 0)
+ abort ();
+ else
+ {
+ foo (&a);
+ exit (0);
+ }
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010717-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010717-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010717-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010717-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+extern void abort (void);
+
+int
+main ()
+{
+ int i, j;
+ unsigned long u, r1, r2;
+
+ i = -16;
+ j = 1;
+ u = i + j;
+
+ /* no sign extension upon shift */
+ r1 = u >> 1;
+ /* sign extension upon shift, but there shouldn't be */
+ r2 = ((unsigned long) (i + j)) >> 1;
+
+ if (r1 != r2)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010723-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010723-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010723-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010723-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+int
+test ()
+{
+ int biv,giv;
+ for (biv = 0, giv = 0; giv != 8; biv++)
+ giv = biv*8;
+ return giv;
+}
+
+
+main()
+{
+ if (test () != 8)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* If some target has a Max alignment less than 32, please create
+ a #ifdef around the alignment and add your alignment. */
+#ifdef __pdp11__
+#define alignment 2
+#else
+#define alignment 32
+#endif
+
+typedef struct x { int a; int b; } __attribute__((aligned(alignment))) X;
+typedef struct y { X x[32]; int c; } Y;
+
+Y y[2];
+
+int main(void)
+{
+ if (((char *)&y[1] - (char *)&y[0]) & 31)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010904-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* If some target has a Max alignment less than 32, please create
+ a #ifdef around the alignment and add your alignment. */
+#ifdef __pdp11__
+#define alignment 2
+#else
+#define alignment 32
+#endif
+
+typedef struct x { int a; int b; } __attribute__((aligned(alignment))) X;
+typedef struct y { X x; X y[31]; int c; } Y;
+
+Y y[2];
+
+int main(void)
+{
+ if (((char *)&y[1] - (char *)&y[0]) & 31)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010910-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010910-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010910-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010910-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,59 @@
+/* Test case contributed by Ingo Rohloff <rohloff at in.tum.de>.
+ Code distilled from Linux kernel. */
+
+/* Compile this program with a gcc-2.95.2 using
+ "gcc -O2" and run it. The result will be that
+ rx_ring[1].next == 0 (it should be == 14)
+ and
+ ep.skbuff[4] == 5 (it should be 0)
+*/
+
+extern void abort(void);
+
+struct epic_rx_desc
+{
+ unsigned int next;
+};
+
+struct epic_private
+{
+ struct epic_rx_desc *rx_ring;
+ unsigned int rx_skbuff[5];
+};
+
+static void epic_init_ring(struct epic_private *ep)
+{
+ int i;
+
+ for (i = 0; i < 5; i++)
+ {
+ ep->rx_ring[i].next = 10 + (i+1)*2;
+ ep->rx_skbuff[i] = 0;
+ }
+ ep->rx_ring[i-1].next = 10;
+}
+
+static int check_rx_ring[5] = { 12,14,16,18,10 };
+
+int main(void)
+{
+ struct epic_private ep;
+ struct epic_rx_desc rx_ring[5];
+ int i;
+
+ for (i=0;i<5;i++)
+ {
+ rx_ring[i].next=0;
+ ep.rx_skbuff[i]=5;
+ }
+
+ ep.rx_ring=rx_ring;
+ epic_init_ring(&ep);
+
+ for (i=0;i<5;i++)
+ {
+ if ( rx_ring[i].next != check_rx_ring[i] ) abort();
+ if ( ep.rx_skbuff[i] != 0 ) abort();
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010915-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010915-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010915-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010915-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,71 @@
+/* Bug in reorg.c, deleting the "++" in the last loop in main.
+ Origin: <hp at axis.com>. */
+
+extern void f (void);
+extern int x (int, char **);
+extern int r (const char *);
+extern char *s (char *, char **);
+extern char *m (char *);
+char *u;
+char *h;
+int check = 0;
+int o = 0;
+
+int main (int argc, char **argv)
+{
+ char *args[] = {"a", "b", "c", "d", "e"};
+ if (x (5, args) != 0 || check != 2 || o != 5)
+ abort ();
+ exit (0);
+}
+
+int x (int argc, char **argv)
+{
+ int opt = 0;
+ char *g = 0;
+ char *p = 0;
+
+ if (argc > o && argc > 2 && argv[o])
+ {
+ g = s (argv[o], &p);
+ if (g)
+ {
+ *g++ = '\0';
+ h = s (g, &p);
+ if (g == p)
+ h = m (g);
+ }
+ u = s (argv[o], &p);
+ if (argv[o] == p)
+ u = m (argv[o]);
+ }
+ else
+ abort ();
+
+ while (++o < argc)
+ if (r (argv[o]) == 0)
+ return 1;
+
+ return 0;
+}
+
+char *m (char *x) { abort (); }
+char *s (char *v, char **pp)
+{
+ if (strcmp (v, "a") != 0 || check++ > 1)
+ abort ();
+ *pp = v+1;
+ return 0;
+}
+
+int r (const char *f)
+{
+ static char c[2] = "b";
+ static int cnt = 0;
+
+ if (*f != *c || f[1] != c[1] || cnt > 3)
+ abort ();
+ c[0]++;
+ cnt++;
+ return 1;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010924-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010924-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010924-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010924-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,71 @@
+/* Verify that flexible arrays can be initialized from STRING_CST
+ constructors. */
+
+/* Baselines. */
+struct {
+ char a1c;
+ char *a1p;
+} a1 = {
+ '4',
+ "62"
+};
+
+struct {
+ char a2c;
+ char a2p[2];
+} a2 = {
+ 'v',
+ "cq"
+};
+
+/* The tests. */
+struct {
+ char a3c;
+ char a3p[];
+} a3 = {
+ 'o',
+ "wx"
+};
+
+struct {
+ char a4c;
+ char a4p[];
+} a4 = {
+ '9',
+ { 'e', 'b' }
+};
+
+main()
+{
+ if (a1.a1c != '4')
+ abort();
+ if (a1.a1p[0] != '6')
+ abort();
+ if (a1.a1p[1] != '2')
+ abort();
+ if (a1.a1p[2] != '\0')
+ abort();
+
+ if (a2.a2c != 'v')
+ abort();
+ if (a2.a2p[0] != 'c')
+ abort();
+ if (a2.a2p[1] != 'q')
+ abort();
+
+ if (a3.a3c != 'o')
+ abort();
+ if (a3.a3p[0] != 'w')
+ abort();
+ if (a3.a3p[1] != 'x')
+ abort();
+
+ if (a4.a4c != '9')
+ abort();
+ if (a4.a4p[0] != 'e')
+ abort();
+ if (a4.a4p[1] != 'b')
+ abort();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010925-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010925-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010925-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20010925-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+extern void exit(int);
+extern void abort (void);
+
+extern void * memcpy (void *, const void *, __SIZE_TYPE__);
+int foo (void *, void *, unsigned int c);
+
+int src[10];
+int dst[10];
+
+int main()
+{
+ if (foo (dst, src, 10) != 0)
+ abort();
+ exit(0);
+}
+
+int foo (void *a, void *b, unsigned int c)
+{
+ if (c == 0)
+ return 1;
+
+ memcpy (a, b, c);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011008-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011008-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011008-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011008-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,107 @@
+/* { dg-add-options stack_size } */
+
+extern void exit (int);
+extern void abort (void);
+
+typedef unsigned int u_int32_t;
+typedef unsigned char u_int8_t;
+typedef int int32_t;
+
+typedef enum {
+ TXNLIST_DELETE,
+ TXNLIST_LSN,
+ TXNLIST_TXNID,
+ TXNLIST_PGNO
+} db_txnlist_type;
+
+struct __db_lsn; typedef struct __db_lsn DB_LSN;
+struct __db_lsn {
+ u_int32_t file;
+ u_int32_t offset;
+};
+struct __db_txnlist; typedef struct __db_txnlist DB_TXNLIST;
+
+struct __db_txnlist {
+ db_txnlist_type type;
+ struct { struct __db_txnlist *le_next; struct __db_txnlist **le_prev; } links;
+ union {
+ struct {
+ u_int32_t txnid;
+ int32_t generation;
+ int32_t aborted;
+ } t;
+ struct {
+
+
+ u_int32_t flags;
+ int32_t fileid;
+ u_int32_t count;
+ char *fname;
+ } d;
+ struct {
+ int32_t ntxns;
+ int32_t maxn;
+ DB_LSN *lsn_array;
+ } l;
+ struct {
+ int32_t nentries;
+ int32_t maxentry;
+ char *fname;
+ int32_t fileid;
+ void *pgno_array;
+ u_int8_t uid[20];
+ } p;
+ } u;
+};
+
+int log_compare (const DB_LSN *a, const DB_LSN *b)
+{
+ return 1;
+}
+
+
+int
+__db_txnlist_lsnadd(int val, DB_TXNLIST *elp, DB_LSN *lsnp, u_int32_t flags)
+{
+ int i;
+
+ for (i = 0; i < (!(flags & (0x1)) ? 1 : elp->u.l.ntxns); i++)
+ {
+ int __j;
+ DB_LSN __tmp;
+ val++;
+ for (__j = 0; __j < elp->u.l.ntxns - 1; __j++)
+ if (log_compare(&elp->u.l.lsn_array[__j], &elp->u.l.lsn_array[__j + 1]) < 0)
+ {
+ __tmp = elp->u.l.lsn_array[__j];
+ elp->u.l.lsn_array[__j] = elp->u.l.lsn_array[__j + 1];
+ elp->u.l.lsn_array[__j + 1] = __tmp;
+ }
+ }
+
+ *lsnp = elp->u.l.lsn_array[0];
+ return val;
+}
+
+#if defined (STACK_SIZE) && STACK_SIZE < 12350
+#define VLEN (STACK_SIZE/10)
+#else
+#define VLEN 1235
+#endif
+
+int main (void)
+{
+ DB_TXNLIST el;
+ DB_LSN lsn, lsn_a[VLEN];
+
+ el.u.l.ntxns = VLEN-1;
+ el.u.l.lsn_array = lsn_a;
+
+ if (__db_txnlist_lsnadd (0, &el, &lsn, 0) != 1)
+ abort ();
+
+ if (__db_txnlist_lsnadd (0, &el, &lsn, 1) != VLEN-1)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011019-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011019-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011019-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011019-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+extern void exit (int);
+extern void abort (void);
+
+struct { int a; int b[5]; } x;
+int *y;
+
+int foo (void)
+{
+ return y - x.b;
+}
+
+int main (void)
+{
+ y = x.b;
+ if (foo ())
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011024-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011024-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011024-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011024-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* Test whether store motion recognizes pure functions as potentially reading
+ any memory. */
+
+typedef __SIZE_TYPE__ size_t;
+extern void *memcpy (void *dest, const void *src, size_t n);
+extern size_t strlen (const char *s);
+extern int strcmp (const char *s1, const char *s2) __attribute__((pure));
+
+char buf[50];
+
+static void foo (void)
+{
+ if (memcpy (buf, "abc", 4) != buf) abort ();
+ if (strcmp (buf, "abc")) abort ();
+ memcpy (buf, "abcdefgh", strlen ("abcdefgh") + 1);
+}
+
+int main (void)
+{
+ foo ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,58 @@
+void fail1(void)
+{
+ abort ();
+}
+void fail2(void)
+{
+ abort ();
+}
+void fail3(void)
+{
+ abort ();
+}
+void fail4(void)
+{
+ abort ();
+}
+
+
+void foo(long x)
+{
+ switch (x)
+ {
+ case -6:
+ fail1 (); break;
+ case 0:
+ fail2 (); break;
+ case 1: case 2:
+ break;
+ case 3: case 4: case 5:
+ fail3 ();
+ break;
+ default:
+ fail4 ();
+ break;
+ }
+ switch (x)
+ {
+
+ case -3:
+ fail1 (); break;
+ case 0: case 4:
+ fail2 (); break;
+ case 1: case 3:
+ break;
+ case 2: case 8:
+ abort ();
+ break;
+ default:
+ fail4 ();
+ break;
+ }
+}
+
+int main(void)
+{
+ foo (1);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011109-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+int main(void)
+{
+ char *c1 = "foo";
+ char *c2 = "foo";
+ int i;
+ for (i = 0; i < 3; i++)
+ if (c1[i] != c2[i])
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011113-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011113-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011113-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011113-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,55 @@
+typedef __SIZE_TYPE__ size_t;
+extern void *memcpy (void *__restrict, const void *__restrict, size_t);
+extern void abort (void);
+extern void exit (int);
+
+typedef struct t
+{
+ unsigned a : 16;
+ unsigned b : 8;
+ unsigned c : 8;
+ long d[4];
+} *T;
+
+typedef struct {
+ long r[3];
+} U;
+
+T bar (U, unsigned int);
+
+T foo (T x)
+{
+ U d, u;
+
+ memcpy (&u, &x->d[1], sizeof u);
+ d = u;
+ return bar (d, x->b);
+}
+
+T baz (T x)
+{
+ U d, u;
+
+ d.r[0] = 0x123456789;
+ d.r[1] = 0xfedcba987;
+ d.r[2] = 0xabcdef123;
+ memcpy (&u, &x->d[1], sizeof u);
+ d = u;
+ return bar (d, x->b);
+}
+
+T bar (U d, unsigned int m)
+{
+ if (d.r[0] != 21 || d.r[1] != 22 || d.r[2] != 23)
+ abort ();
+ return 0;
+}
+
+struct t t = { 26, 0, 0, { 0, 21, 22, 23 }};
+
+int main (void)
+{
+ baz (&t);
+ foo (&t);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011114-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011114-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011114-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011114-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+char foo(char bar[])
+{
+ return bar[1];
+}
+extern char foo(char *);
+int main(void)
+{
+ if (foo("xy") != 'y')
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011115-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011115-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011115-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011115-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+extern void exit (int);
+
+static inline int
+foo (void)
+{
+#ifdef __OPTIMIZE__
+ extern int undefined_reference;
+ return undefined_reference;
+#else
+ return 0;
+#endif
+}
+
+static inline int
+bar (void)
+{
+ if (foo == foo)
+ return 1;
+ else
+ return foo ();
+}
+
+int main (void)
+{
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011121-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011121-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011121-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011121-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+struct s
+{
+ int i[18];
+ char f;
+ char b[2];
+};
+
+struct s s1;
+
+int
+main()
+{
+ struct s s2;
+ s2.b[0] = 100;
+ __builtin_memcpy(&s2, &s1, ((unsigned int) &((struct s *)0)->b));
+ if (s2.b[0] != 100)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* Produced a overflow in ifcvt.c, causing S to contain 0xffffffff7fffffff. */
+
+int a = 1;
+
+int main ()
+{
+ long long s;
+
+ s = a;
+ if (s < 0)
+ s = -2147483648LL;
+ else
+ s = 2147483647LL;
+
+ if (s < 0)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011126-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+/* Problem originally visible on ia64.
+
+ There is a partial redundancy of "in + 1" that makes GCSE want to
+ transform the final while loop to
+
+ p = in + 1;
+ tmp = p;
+ ...
+ goto start;
+ top:
+ tmp = tmp + 1;
+ start:
+ in = tmp;
+ if (in < p) goto top;
+
+ We miscalculate the number of loop iterations as (p - tmp) = 0
+ instead of (p - in) = 1, which results in overflow in the doloop
+ optimization. */
+
+static const char *
+test (const char *in, char *out)
+{
+ while (1)
+ {
+ if (*in == 'a')
+ {
+ const char *p = in + 1;
+ while (*p == 'x')
+ ++p;
+ if (*p == 'b')
+ return p;
+ while (in < p)
+ *out++ = *in++;
+ }
+ }
+}
+
+int main ()
+{
+ char out[4];
+ test ("aab", out);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011128-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011128-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011128-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011128-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,5 @@
+main()
+{
+ char blah[33] = "01234567890123456789";
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011217-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011217-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011217-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011217-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+int
+main()
+{
+ double x = 1.0;
+ double y = 2.0;
+
+ if ((y > x--) != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011219-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011219-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011219-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011219-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,49 @@
+/* This testcase failed on IA-32 at -O and above, because combine attached
+ a REG_LABEL note to jump instruction already using JUMP_LABEL. */
+
+extern void abort (void);
+extern void exit (int);
+
+enum X { A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q };
+
+void
+bar (const char *x, int y, const char *z)
+{
+}
+
+long
+foo (enum X x, const void *y)
+{
+ long a;
+
+ switch (x)
+ {
+ case K:
+ a = *(long *)y;
+ break;
+ case L:
+ a = *(long *)y;
+ break;
+ case M:
+ a = *(long *)y;
+ break;
+ case N:
+ a = *(long *)y;
+ break;
+ case O:
+ a = *(long *)y;
+ break;
+ default:
+ bar ("foo", 1, "bar");
+ }
+ return a;
+}
+
+int
+main ()
+{
+ long i = 24;
+ if (foo (N, &i) != 24)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011223-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011223-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011223-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20011223-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* Origin: Joseph Myers <jsm28 at cam.ac.uk>. */
+/* Case labels in a switch statement are converted to the promoted
+ type of the controlling expression, not an unpromoted version.
+ Reported as PR c/2454 by
+ Andreas Krakowczyk <Andreas.Krakowczyk at fujitsu-siemens.com>. */
+
+extern void exit (int);
+extern void abort (void);
+
+static int i;
+
+int
+main (void)
+{
+ i = -1;
+ switch ((signed char) i) {
+ case 255:
+ abort ();
+ default:
+ exit (0);
+ }
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020103-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020103-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020103-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020103-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* On h8300 port, the following used to be broken with -mh or -ms. */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned long
+foo (unsigned long a)
+{
+ return a ^ 0x0000ffff;
+}
+
+unsigned long
+bar (unsigned long a)
+{
+ return a ^ 0xffff0000;
+}
+
+int
+main ()
+{
+ if (foo (0) != 0x0000ffff)
+ abort ();
+
+ if (bar (0) != 0xffff0000)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020107-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020107-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020107-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020107-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* This testcase failed because - 1 - buf was simplified into ~buf and when
+ later expanding it back into - buf + -1, -1 got lost. */
+/* { dg-options "-fgnu89-inline" } */
+
+extern void abort (void);
+extern void exit (int);
+
+static void
+bar (int x)
+{
+ if (!x)
+ abort ();
+}
+
+char buf[10];
+
+inline char *
+foo (char *tmp)
+{
+ asm ("" : "=r" (tmp) : "0" (tmp));
+ return tmp + 2;
+}
+
+int
+main (void)
+{
+ bar ((foo (buf) - 1 - buf) == 1);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020108-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020108-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020108-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020108-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,203 @@
+/* This file tests shifts in various integral modes. */
+
+#include <limits.h>
+
+#define CAT(A, B) A ## B
+
+#define REPEAT_8 \
+REPEAT_FN ( 0) \
+REPEAT_FN ( 1) \
+REPEAT_FN ( 2) \
+REPEAT_FN ( 3) \
+REPEAT_FN ( 4) \
+REPEAT_FN ( 5) \
+REPEAT_FN ( 6) \
+REPEAT_FN ( 7)
+
+#define REPEAT_16 \
+REPEAT_8 \
+REPEAT_FN ( 8) \
+REPEAT_FN ( 9) \
+REPEAT_FN (10) \
+REPEAT_FN (11) \
+REPEAT_FN (12) \
+REPEAT_FN (13) \
+REPEAT_FN (14) \
+REPEAT_FN (15)
+
+#define REPEAT_32 \
+REPEAT_16 \
+REPEAT_FN (16) \
+REPEAT_FN (17) \
+REPEAT_FN (18) \
+REPEAT_FN (19) \
+REPEAT_FN (20) \
+REPEAT_FN (21) \
+REPEAT_FN (22) \
+REPEAT_FN (23) \
+REPEAT_FN (24) \
+REPEAT_FN (25) \
+REPEAT_FN (26) \
+REPEAT_FN (27) \
+REPEAT_FN (28) \
+REPEAT_FN (29) \
+REPEAT_FN (30) \
+REPEAT_FN (31)
+
+/* Define 8-bit shifts. */
+#if CHAR_BIT == 8
+typedef unsigned int u8 __attribute__((mode(QI)));
+typedef signed int s8 __attribute__((mode(QI)));
+
+#define REPEAT_FN(COUNT) \
+u8 CAT (ashift_qi_, COUNT) (u8 n) { return n << COUNT; }
+REPEAT_8
+#undef REPEAT_FN
+
+#define REPEAT_FN(COUNT) \
+u8 CAT (lshiftrt_qi_, COUNT) (u8 n) { return n >> COUNT; }
+REPEAT_8
+#undef REPEAT_FN
+
+#define REPEAT_FN(COUNT) \
+s8 CAT (ashiftrt_qi_, COUNT) (s8 n) { return n >> COUNT; }
+REPEAT_8
+#undef REPEAT_FN
+#endif /* CHAR_BIT == 8 */
+
+/* Define 16-bit shifts. */
+#if CHAR_BIT == 8 || CHAR_BIT == 16
+#if CHAR_BIT == 8
+typedef unsigned int u16 __attribute__((mode(HI)));
+typedef signed int s16 __attribute__((mode(HI)));
+#elif CHAR_BIT == 16
+typedef unsigned int u16 __attribute__((mode(QI)));
+typedef signed int s16 __attribute__((mode(QI)));
+#endif
+
+#define REPEAT_FN(COUNT) \
+u16 CAT (ashift_hi_, COUNT) (u16 n) { return n << COUNT; }
+REPEAT_16
+#undef REPEAT_FN
+
+#define REPEAT_FN(COUNT) \
+u16 CAT (lshiftrt_hi_, COUNT) (u16 n) { return n >> COUNT; }
+REPEAT_16
+#undef REPEAT_FN
+
+#define REPEAT_FN(COUNT) \
+s16 CAT (ashiftrt_hi_, COUNT) (s16 n) { return n >> COUNT; }
+REPEAT_16
+#undef REPEAT_FN
+#endif /* CHAR_BIT == 8 || CHAR_BIT == 16 */
+
+/* Define 32-bit shifts. */
+#if CHAR_BIT == 8 || CHAR_BIT == 16 || CHAR_BIT == 32
+#if CHAR_BIT == 8
+typedef unsigned int u32 __attribute__((mode(SI)));
+typedef signed int s32 __attribute__((mode(SI)));
+#elif CHAR_BIT == 16
+typedef unsigned int u32 __attribute__((mode(HI)));
+typedef signed int s32 __attribute__((mode(HI)));
+#elif CHAR_BIT == 32
+typedef unsigned int u32 __attribute__((mode(QI)));
+typedef signed int s32 __attribute__((mode(QI)));
+#endif
+
+#define REPEAT_FN(COUNT) \
+u32 CAT (ashift_si_, COUNT) (u32 n) { return n << COUNT; }
+REPEAT_32
+#undef REPEAT_FN
+
+#define REPEAT_FN(COUNT) \
+u32 CAT (lshiftrt_si_, COUNT) (u32 n) { return n >> COUNT; }
+REPEAT_32
+#undef REPEAT_FN
+
+#define REPEAT_FN(COUNT) \
+s32 CAT (ashiftrt_si_, COUNT) (s32 n) { return n >> COUNT; }
+REPEAT_32
+#undef REPEAT_FN
+#endif /* CHAR_BIT == 8 || CHAR_BIT == 16 || CHAR_BIT == 32 */
+
+extern void abort (void);
+extern void exit (int);
+
+int
+main ()
+{
+ /* Test 8-bit shifts. */
+#if CHAR_BIT == 8
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashift_qi_, COUNT) (0xff) != (u8) ((u8)0xff << COUNT)) abort ();
+ REPEAT_8;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (lshiftrt_qi_, COUNT) (0xff) != (u8) ((u8)0xff >> COUNT)) abort ();
+ REPEAT_8;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashiftrt_qi_, COUNT) (-1) != -1) abort ();
+ REPEAT_8;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashiftrt_qi_, COUNT) (0) != 0) abort ();
+ REPEAT_8;
+# undef REPEAT_FN
+#endif /* CHAR_BIT == 8 */
+
+ /* Test 16-bit shifts. */
+#if CHAR_BIT == 8 || CHAR_BIT == 16
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashift_hi_, COUNT) (0xffff) \
+ != (u16) ((u16) 0xffff << COUNT)) abort ();
+ REPEAT_16;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (lshiftrt_hi_, COUNT) (0xffff) \
+ != (u16) ((u16) 0xffff >> COUNT)) abort ();
+ REPEAT_16;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashiftrt_hi_, COUNT) (-1) != -1) abort ();
+ REPEAT_16;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashiftrt_hi_, COUNT) (0) != 0) abort ();
+ REPEAT_16;
+# undef REPEAT_FN
+#endif /* CHAR_BIT == 8 || CHAR_BIT == 16 */
+
+ /* Test 32-bit shifts. */
+#if CHAR_BIT == 8 || CHAR_BIT == 16 || CHAR_BIT == 32
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashift_si_, COUNT) (0xffffffff) \
+ != (u32) ((u32) 0xffffffff << COUNT)) abort ();
+ REPEAT_32;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (lshiftrt_si_, COUNT) (0xffffffff) \
+ != (u32) ((u32) 0xffffffff >> COUNT)) abort ();
+ REPEAT_32;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashiftrt_si_, COUNT) (-1) != -1) abort ();
+ REPEAT_32;
+# undef REPEAT_FN
+
+# define REPEAT_FN(COUNT) \
+ if (CAT (ashiftrt_si_, COUNT) (0) != 0) abort ();
+ REPEAT_32;
+# undef REPEAT_FN
+#endif /* CHAR_BIT == 8 || CHAR_BIT == 16 || CHAR_BIT == 32 */
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020118-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020118-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020118-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020118-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* This tests an insn length of sign extension on h8300 port. */
+
+extern void exit (int);
+
+volatile signed char *q;
+volatile signed int n;
+
+void
+foo (void)
+{
+ signed char *p;
+
+ for (;;)
+ {
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ p = (signed char *) q; n = p[2];
+ }
+}
+
+int
+main ()
+{
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020127-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020127-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020127-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020127-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* This used to fail on h8300. */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned long
+foo (unsigned long n)
+{
+ return (~n >> 3) & 1;
+}
+
+int
+main ()
+{
+ if (foo (1 << 3) != 0)
+ abort ();
+
+ if (foo (0) != 1)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020129-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020129-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020129-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020129-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,51 @@
+/* This testcase failed at -O2 on IA-64, because scheduling did not take
+ into account conditional execution when using cselib for alias
+ analysis. */
+
+struct D { int d1; struct D *d2; };
+struct C { struct D c1; long c2, c3, c4, c5, c6; };
+struct A { struct A *a1; struct C *a2; };
+struct B { struct C b1; struct A *b2; };
+
+extern void abort (void);
+extern void exit (int);
+
+void
+foo (struct B *x, struct B *y)
+{
+ if (x->b2 == 0)
+ {
+ struct A *a;
+
+ x->b2 = a = y->b2;
+ y->b2 = 0;
+ for (; a; a = a->a1)
+ a->a2 = &x->b1;
+ }
+
+ if (y->b2 != 0)
+ abort ();
+
+ if (x->b1.c3 == -1)
+ {
+ x->b1.c3 = y->b1.c3;
+ x->b1.c4 = y->b1.c4;
+ y->b1.c3 = -1;
+ y->b1.c4 = 0;
+ }
+
+ if (y->b1.c3 != -1)
+ abort ();
+}
+
+struct B x, y;
+
+int main ()
+{
+ y.b1.c1.d1 = 6;
+ y.b1.c3 = 145;
+ y.b1.c4 = 2448;
+ x.b1.c3 = -1;
+ foo (&x, &y);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020201-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020201-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020201-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020201-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* Test whether division by constant works properly. */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned char cx = 7;
+unsigned short sx = 14;
+unsigned int ix = 21;
+unsigned long lx = 28;
+unsigned long long Lx = 35;
+
+int
+main ()
+{
+ unsigned char cy;
+ unsigned short sy;
+ unsigned int iy;
+ unsigned long ly;
+ unsigned long long Ly;
+
+ cy = cx / 6; if (cy != 1) abort ();
+ cy = cx % 6; if (cy != 1) abort ();
+
+ sy = sx / 6; if (sy != 2) abort ();
+ sy = sx % 6; if (sy != 2) abort ();
+
+ iy = ix / 6; if (iy != 3) abort ();
+ iy = ix % 6; if (iy != 3) abort ();
+
+ ly = lx / 6; if (ly != 4) abort ();
+ ly = lx % 6; if (ly != 4) abort ();
+
+ Ly = Lx / 6; if (Ly != 5) abort ();
+ Ly = Lx % 6; if (Ly != 5) abort ();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+struct A {
+ unsigned int a, b, c;
+};
+
+extern void abort (void);
+extern void exit (int);
+
+struct A bar (void)
+{
+ return (struct A) { 176, 52, 31 };
+}
+
+void baz (struct A *a)
+{
+ if (a->a != 176 || a->b != 52 || a->c != 31)
+ abort ();
+}
+
+int main ()
+{
+ struct A d;
+
+ d = ({ ({ bar (); }); });
+ baz (&d);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020206-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* Origin: PR c/5420 from David Mosberger <davidm at hpl.hp.com>.
+ This testcase was miscompiled when tail call optimizing, because a
+ compound literal initialization was emitted only in the tail call insn
+ chain, not in the normal call insn chain. */
+
+typedef struct { unsigned short a; } A;
+
+extern void abort (void);
+extern void exit (int);
+
+void foo (unsigned int x)
+{
+ if (x != 0x800 && x != 0x810)
+ abort ();
+}
+
+int
+main (int argc, char **argv)
+{
+ int i;
+ for (i = 0; i < 2; ++i)
+ foo (((A) { ((!(i >> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020213-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020213-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020213-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020213-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+/* PR c/5681
+ This testcase failed on IA-32 at -O0, because safe_from_p
+ incorrectly assumed it is safe to first write into a.a2 b-1
+ and then read the original value from it. */
+
+int bar (float);
+
+struct A {
+ float a1;
+ int a2;
+} a;
+
+int b;
+
+void foo (void)
+{
+ a.a2 = bar (a.a1);
+ a.a2 = a.a2 < b - 1 ? a.a2 : b - 1;
+ if (a.a2 >= b - 1)
+ abort ();
+}
+
+int bar (float x)
+{
+ return 2241;
+}
+
+int main()
+{
+ a.a1 = 1.0f;
+ b = 3384;
+ foo ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020215-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020215-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020215-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020215-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* Test failed on an architecture that:
+
+ - had 16-bit registers,
+ - passed 64-bit structures in registers,
+ - only allowed SImode values in even numbered registers.
+
+ Before reload, s.i2 in foo() was represented as:
+
+ (subreg:SI (reg:DI 0) 2)
+
+ find_dummy_reload would return (reg:SI 1) for the subreg reload,
+ despite that not being a valid register. */
+
+struct s
+{
+ short i1;
+ long i2;
+ short i3;
+};
+
+struct s foo (struct s s)
+{
+ s.i2++;
+ return s;
+}
+
+int main ()
+{
+ struct s s = foo ((struct s) { 1000, 2000L, 3000 });
+ if (s.i1 != 1000 || s.i2 != 2001L || s.i3 != 3000)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020216-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020216-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020216-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020216-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* PR c/3444
+ This used to fail because bitwise xor was improperly computed in char type
+ and sign extended to int type. */
+
+extern void abort ();
+extern void exit (int);
+
+signed char c = (signed char) 0xffffffff;
+
+int foo (void)
+{
+ return (unsigned short) c ^ (signed char) 0x99999999;
+}
+
+int main (void)
+{
+ if ((unsigned char) -1 != 0xff
+ || sizeof (short) != 2
+ || sizeof (int) != 4)
+ exit (0);
+ if (foo () != (int) 0xffff0066)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020219-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020219-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020219-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020219-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* PR c/4308
+ This testcase failed because 0x8000000000000000 >> 0
+ was incorrectly folded into 0xffffffff00000000. */
+
+extern void abort (void);
+extern void exit (int);
+
+long long foo (void)
+{
+ long long C = 1ULL << 63, X;
+ int Y = 32;
+ X = C >> (Y & 31);
+ return X;
+}
+
+int main (void)
+{
+ if (foo () != 1ULL << 63)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* This testcase failed at -O2 on powerpc64 due to andsi3 writing
+ nonzero bits to the high 32 bits of a 64 bit register. */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned long foo (unsigned long base, unsigned int val)
+{
+ return base + (val & 0x80000001);
+}
+
+int main (void)
+{
+ if (foo (0L, 0x0ffffff0) != 0L)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020225-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+static int
+test(int x)
+{
+ union
+ {
+ int i;
+ double d;
+ } a;
+ a.d = 0;
+ a.i = 1;
+ return x >> a.i;
+}
+
+int main(void)
+{
+ if (test (5) != 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020226-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020226-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020226-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020226-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,104 @@
+/* This tests the rotate patterns that some machines support. */
+
+#include <limits.h>
+
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
+#define ROR(a,b) (((a) >> (b)) | ((a) << ((sizeof (a) * CHAR_BIT) - (b))))
+#define ROL(a,b) (((a) << (b)) | ((a) >> ((sizeof (a) * CHAR_BIT) - (b))))
+
+#define CHAR_VALUE ((unsigned char)0x1234U)
+#define SHORT_VALUE ((unsigned short)0x1234U)
+#define INT_VALUE 0x1234U
+#define LONG_VALUE 0x12345678LU
+#define LL_VALUE 0x12345678abcdef0LLU
+
+#define SHIFT1 4
+#define SHIFT2 ((sizeof (long long) * CHAR_BIT) - SHIFT1)
+
+unsigned char uc = CHAR_VALUE;
+unsigned short us = SHORT_VALUE;
+unsigned int ui = INT_VALUE;
+unsigned long ul = LONG_VALUE;
+unsigned long long ull = LL_VALUE;
+int shift1 = SHIFT1;
+int shift2 = SHIFT2;
+
+main ()
+{
+ if (ROR (uc, shift1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (uc, SHIFT1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (us, shift1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (us, SHIFT1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ui, shift1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ui, SHIFT1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ul, shift1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ul, SHIFT1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ull, shift1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ull, SHIFT1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ull, shift2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROR (ull, SHIFT2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (uc, shift1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (uc, SHIFT1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (us, shift1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (us, SHIFT1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ui, shift1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ui, SHIFT1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ul, shift1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ul, SHIFT1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ull, shift1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ull, SHIFT1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ull, shift2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (ull, SHIFT2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020227-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020227-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020227-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020227-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* This testcase failed on mmix-knuth-mmixware. Problem was with storing
+ to an unaligned mem:SC, gcc tried doing it by parts from a (concat:SC
+ (reg:SF 293) (reg:SF 294)). */
+
+typedef __complex__ float cf;
+struct x { char c; cf f; } __attribute__ ((__packed__));
+extern void f2 (struct x*);
+extern void f1 (void);
+int
+main (void)
+{
+ f1 ();
+ exit (0);
+}
+
+void
+f1 (void)
+{
+ struct x s;
+ s.f = 1;
+ s.c = 42;
+ f2 (&s);
+}
+
+void
+f2 (struct x *y)
+{
+ if (y->f != 1 || y->c != 42)
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020307-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020307-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020307-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020307-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+#define MASK(N) ((1UL << (N)) - 1)
+#define BITS(N) ((1UL << ((N) - 1)) + 2)
+
+#define FUNC(N) void f##N(long j) { if ((j & MASK(N)) >= BITS(N)) abort();}
+
+FUNC(3)
+FUNC(4)
+FUNC(5)
+FUNC(6)
+FUNC(7)
+FUNC(8)
+FUNC(9)
+FUNC(10)
+FUNC(11)
+FUNC(12)
+FUNC(13)
+FUNC(14)
+FUNC(15)
+FUNC(16)
+FUNC(17)
+FUNC(18)
+FUNC(19)
+FUNC(20)
+FUNC(21)
+FUNC(22)
+FUNC(23)
+FUNC(24)
+FUNC(25)
+FUNC(26)
+FUNC(27)
+FUNC(28)
+FUNC(29)
+FUNC(30)
+FUNC(31)
+
+int main ()
+{
+ f3(0);
+ f4(0);
+ f5(0);
+ f6(0);
+ f7(0);
+ f8(0);
+ f9(0);
+ f10(0);
+ f11(0);
+ f12(0);
+ f13(0);
+ f14(0);
+ f15(0);
+ f16(0);
+ f17(0);
+ f18(0);
+ f19(0);
+ f20(0);
+ f21(0);
+ f22(0);
+ f23(0);
+ f24(0);
+ f25(0);
+ f26(0);
+ f27(0);
+ f28(0);
+ f29(0);
+ f30(0);
+ f31(0);
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020314-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020314-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020314-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020314-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* { dg-require-effective-target alloca } */
+void f(void * a, double y)
+{
+}
+
+double g (double a, double b, double c, double d)
+{
+ double x, y, z;
+ void *p;
+
+ x = a + b;
+ y = c * d;
+
+ p = alloca (16);
+
+ f(p, y);
+ z = x * y * a;
+
+ return z + b;
+}
+
+main ()
+{
+ double a, b, c, d;
+ a = 1.0;
+ b = 0.0;
+ c = 10.0;
+ d = 0.0;
+
+ if (g (a, b, c, d) != 0.0)
+ abort ();
+
+ if (a != 1.0 || b != 0.0 || c != 10.0 || d != 0.0)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020320-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020320-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020320-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020320-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* PR c/5354 */
+/* Verify that GCC preserves relevant stack slots. */
+
+extern void abort(void);
+extern void exit(int);
+
+struct large { int x, y[9]; };
+
+int main()
+{
+ int fixed;
+
+ fixed = ({ int temp1 = 2; temp1; }) - ({ int temp2 = 1; temp2; });
+ if (fixed != 1)
+ abort();
+
+ fixed = ({ struct large temp3; temp3.x = 2; temp3; }).x
+ - ({ struct large temp4; temp4.x = 1; temp4; }).x;
+ if (fixed != 1)
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020321-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020321-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020321-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020321-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+/* PR 3177 */
+/* Produced a SIGILL on ia64 with sibcall from F to G. We hadn't
+ widened the register window to allow for the fourth outgoing
+ argument as an "in" register. */
+
+float g (void *a, void *b, int e, int c, float d)
+{
+ return d;
+}
+
+float f (void *a, void *b, int c, float d)
+{
+ return g (a, b, 0, c, d);
+}
+
+int main ()
+{
+ f (0, 0, 1, 1);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020328-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020328-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020328-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020328-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+int b = 0;
+
+func () { }
+
+void
+testit(int x)
+{
+ if (x != 20)
+ abort ();
+}
+
+int
+main()
+
+{
+ int a = 0;
+
+ if (b)
+ func();
+
+ /* simplify_and_const_int would incorrectly omit the mask in
+ the line below. */
+ testit ((a + 23) & 0xfffffffc);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+/* derived from PR c/2100 */
+
+extern void abort ();
+extern void exit (int);
+
+#define SMALL_N 2
+#define NUM_ELEM 4
+
+int main(void)
+{
+ int listElem[NUM_ELEM]={30,2,10,5};
+ int listSmall[SMALL_N];
+ int i, j;
+ int posGreatest=-1, greatest=-1;
+
+ for (i=0; i<SMALL_N; i++) {
+ listSmall[i] = listElem[i];
+ if (listElem[i] > greatest) {
+ posGreatest = i;
+ greatest = listElem[i];
+ }
+ }
+
+ for (i=SMALL_N; i<NUM_ELEM; i++) {
+ if (listElem[i] < greatest) {
+ listSmall[posGreatest] = listElem[i];
+ posGreatest = 0;
+ greatest = listSmall[0];
+ for (j=1; j<SMALL_N; j++)
+ if (listSmall[j] > greatest) {
+ posGreatest = j;
+ greatest = listSmall[j];
+ }
+ }
+ }
+
+ if (listSmall[0] != 5 || listSmall[1] != 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,230 @@
+/* PR 3967
+
+ local-alloc screwed up consideration of high+lo_sum and created
+ reg_equivs that it shouldn't have, resulting in lo_sum with
+ uninitialized data, resulting in segv. The test has to remain
+ relatively large, since register spilling is required to twig
+ the bug. */
+
+unsigned long *Local1;
+unsigned long *Local2;
+unsigned long *Local3;
+unsigned long *RDbf1;
+unsigned long *RDbf2;
+unsigned long *RDbf3;
+unsigned long *IntVc1;
+unsigned long *IntVc2;
+unsigned long *IntCode3;
+unsigned long *IntCode4;
+unsigned long *IntCode5;
+unsigned long *IntCode6;
+unsigned long *Lom1;
+unsigned long *Lom2;
+unsigned long *Lom3;
+unsigned long *Lom4;
+unsigned long *Lom5;
+unsigned long *Lom6;
+unsigned long *Lom7;
+unsigned long *Lom8;
+unsigned long *Lom9;
+unsigned long *Lom10;
+unsigned long *RDbf11;
+unsigned long *RDbf12;
+
+typedef struct
+ {
+ long a1;
+ unsigned long n1;
+ unsigned long local1;
+ unsigned long local2;
+ unsigned long local3;
+ unsigned long rdbf1;
+ unsigned long rdbf2;
+ unsigned long milli;
+ unsigned long frames1;
+ unsigned long frames2;
+ unsigned long nonShared;
+ long newPrivate;
+ long freeLimit;
+ unsigned long cache1;
+ unsigned long cache2;
+ unsigned long cache3;
+ unsigned long cache4;
+ unsigned long cache5;
+ unsigned long time6;
+ unsigned long frames7;
+ unsigned long page8;
+ unsigned long ot9;
+ unsigned long data10;
+ unsigned long bm11;
+ unsigned long misc12;
+ }
+ShrPcCommonStatSType;
+
+
+typedef struct
+ {
+ unsigned long sharedAttached;
+ unsigned long totalAttached;
+ long avgPercentShared;
+ unsigned long numberOfFreeFrames;
+ unsigned long localDirtyPageCount;
+ unsigned long globalDirtyPageCount;
+ long wakeupInterval;
+ unsigned long numActiveProcesses;
+ unsigned long numRecentActiveProcesses;
+ unsigned long gemDirtyPageKinds[10];
+ unsigned long stoneDirtyPageKinds[10];
+ unsigned long gemsInCacheCount;
+ long targetFreeFrameCount;
+ }
+ShrPcMonStatSType;
+
+typedef struct
+ {
+ unsigned long c1;
+ unsigned long c2;
+ unsigned long c3;
+ unsigned long c4;
+ unsigned long c5;
+ unsigned long c6;
+ unsigned long c7;
+ unsigned long c8;
+ unsigned long c9;
+ unsigned long c10;
+ unsigned long c11;
+ unsigned long c12;
+ unsigned long a1;
+ unsigned long a2;
+ unsigned long a3;
+ unsigned long a4;
+ unsigned long a5;
+ unsigned long a6;
+ unsigned long a7;
+ unsigned long a8;
+ unsigned long a9;
+ unsigned long a10;
+ unsigned long a11;
+ unsigned long a12;
+ unsigned long a13;
+ unsigned long a14;
+ unsigned long a15;
+ unsigned long a16;
+ unsigned long a17;
+ unsigned long a18;
+ unsigned long a19;
+ unsigned long sessionStats[40];
+ }
+ShrPcGemStatSType;
+
+union ShrPcStatUnion
+ {
+ ShrPcMonStatSType monitor;
+ ShrPcGemStatSType gem;
+ };
+
+typedef struct
+ {
+ int processId;
+ int sessionId;
+ ShrPcCommonStatSType cmn;
+ union ShrPcStatUnion u;
+ } ShrPcStatsSType;
+
+typedef struct
+ {
+ unsigned long *p1;
+ unsigned long *p2;
+ unsigned long *p3;
+ unsigned long *p4;
+ unsigned long *p5;
+ unsigned long *p6;
+ unsigned long *p7;
+ unsigned long *p8;
+ unsigned long *p9;
+ unsigned long *p10;
+ unsigned long *p11;
+ }
+WorkEntrySType;
+
+WorkEntrySType Workspace;
+
+static void
+setStatPointers (ShrPcStatsSType * statsPtr, long sessionId)
+{
+ statsPtr->sessionId = sessionId;
+ statsPtr->cmn.a1 = 0;
+ statsPtr->cmn.n1 = 5;
+
+ Local1 = &statsPtr->cmn.local1;
+ Local2 = &statsPtr->cmn.local2;
+ Local3 = &statsPtr->cmn.local3;
+ RDbf1 = &statsPtr->cmn.rdbf1;
+ RDbf2 = &statsPtr->cmn.rdbf2;
+ RDbf3 = &statsPtr->cmn.milli;
+ *RDbf3 = 1;
+
+ IntVc1 = &statsPtr->u.gem.a1;
+ IntVc2 = &statsPtr->u.gem.a2;
+ IntCode3 = &statsPtr->u.gem.a3;
+ IntCode4 = &statsPtr->u.gem.a4;
+ IntCode5 = &statsPtr->u.gem.a5;
+ IntCode6 = &statsPtr->u.gem.a6;
+
+ {
+ WorkEntrySType *workSpPtr;
+ workSpPtr = &Workspace;
+ workSpPtr->p1 = &statsPtr->u.gem.a7;
+ workSpPtr->p2 = &statsPtr->u.gem.a8;
+ workSpPtr->p3 = &statsPtr->u.gem.a9;
+ workSpPtr->p4 = &statsPtr->u.gem.a10;
+ workSpPtr->p5 = &statsPtr->u.gem.a11;
+ workSpPtr->p6 = &statsPtr->u.gem.a12;
+ workSpPtr->p7 = &statsPtr->u.gem.a13;
+ workSpPtr->p8 = &statsPtr->u.gem.a14;
+ workSpPtr->p9 = &statsPtr->u.gem.a15;
+ workSpPtr->p10 = &statsPtr->u.gem.a16;
+ workSpPtr->p11 = &statsPtr->u.gem.a17;
+ }
+ Lom1 = &statsPtr->u.gem.c1;
+ Lom2 = &statsPtr->u.gem.c2;
+ Lom3 = &statsPtr->u.gem.c3;
+ Lom4 = &statsPtr->u.gem.c4;
+ Lom5 = &statsPtr->u.gem.c5;
+ Lom6 = &statsPtr->u.gem.c6;
+ Lom7 = &statsPtr->u.gem.c7;
+ Lom8 = &statsPtr->u.gem.c8;
+ Lom9 = &statsPtr->u.gem.c9;
+ Lom10 = &statsPtr->u.gem.c10;
+ RDbf11 = &statsPtr->u.gem.c11;
+ RDbf12 = &statsPtr->u.gem.c12;
+}
+
+typedef struct
+{
+ ShrPcStatsSType stats;
+} ShrPcPteSType;
+
+ShrPcPteSType MyPte;
+
+static void
+initPte (void *shrpcPtr, long sessionId)
+{
+ ShrPcPteSType *ptePtr;
+
+ ptePtr = &MyPte;
+ setStatPointers (&ptePtr->stats, sessionId);
+}
+
+void
+InitCache (int sessionId)
+{
+ initPte (0, sessionId);
+}
+
+int
+main (int argc, char *argv[])
+{
+ InitCache (5);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020402-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,81 @@
+/* extracted from gdb sources */
+
+typedef unsigned long long CORE_ADDR;
+
+struct blockvector;
+
+struct symtab {
+ struct blockvector *blockvector;
+};
+
+struct sec {
+ void *unused;
+};
+
+struct symbol {
+ int len;
+ char *name;
+};
+
+struct block {
+ CORE_ADDR startaddr, endaddr;
+ struct symbol *function;
+ struct block *superblock;
+ unsigned char gcc_compile_flag;
+ int nsyms;
+ struct symbol syms[1];
+};
+
+struct blockvector {
+ int nblocks;
+ struct block *block[2];
+};
+
+struct blockvector *blockvector_for_pc_sect(register CORE_ADDR pc,
+ struct symtab *symtab)
+{
+ register struct block *b;
+ register int bot, top, half;
+ struct blockvector *bl;
+
+ bl = symtab->blockvector;
+ b = bl->block[0];
+
+ bot = 0;
+ top = bl->nblocks;
+
+ while (top - bot > 1)
+ {
+ half = (top - bot + 1) >> 1;
+ b = bl->block[bot + half];
+ if (b->startaddr <= pc)
+ bot += half;
+ else
+ top = bot + half;
+ }
+
+ while (bot >= 0)
+ {
+ b = bl->block[bot];
+ if (b->endaddr > pc)
+ {
+ return bl;
+ }
+ bot--;
+ }
+ return 0;
+}
+
+int main(void)
+{
+ struct block a = { 0, 0x10000, 0, 0, 1, 20 };
+ struct block b = { 0x10000, 0x20000, 0, 0, 1, 20 };
+ struct blockvector bv = { 2, { &a, &b } };
+ struct symtab s = { &bv };
+
+ struct blockvector *ret;
+
+ ret = blockvector_for_pc_sect(0x500, &s);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020404-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020404-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020404-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020404-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,104 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-skip-if "pointers can be truncated" { m32c-*-* } } */
+/* Extracted from GDB sources. */
+
+typedef long long bfd_signed_vma;
+typedef bfd_signed_vma file_ptr;
+
+typedef enum bfd_boolean {false, true} boolean;
+
+typedef unsigned long long bfd_size_type;
+
+typedef unsigned int flagword;
+
+typedef unsigned long long CORE_ADDR;
+typedef unsigned long long bfd_vma;
+
+struct bfd_struct {
+ int x;
+};
+
+struct asection_struct {
+ unsigned int user_set_vma : 1;
+ bfd_vma vma;
+ bfd_vma lma;
+ unsigned int alignment_power;
+ unsigned int entsize;
+};
+
+typedef struct bfd_struct bfd;
+typedef struct asection_struct asection;
+
+static bfd *
+bfd_openw_with_cleanup (char *filename, const char *target, char *mode);
+
+static asection *
+bfd_make_section_anyway (bfd *abfd, const char *name);
+
+static boolean
+bfd_set_section_size (bfd *abfd, asection *sec, bfd_size_type val);
+
+static boolean
+bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags);
+
+static boolean
+bfd_set_section_contents (bfd *abfd, asection *section, void * data, file_ptr offset, bfd_size_type count);
+
+static void
+dump_bfd_file (char *filename, char *mode,
+ char *target, CORE_ADDR vaddr,
+ char *buf, int len)
+{
+ bfd *obfd;
+ asection *osection;
+
+ obfd = bfd_openw_with_cleanup (filename, target, mode);
+ osection = bfd_make_section_anyway (obfd, ".newsec");
+ bfd_set_section_size (obfd, osection, len);
+ (((osection)->vma = (osection)->lma= (vaddr)), ((osection)->user_set_vma = (boolean)true), true);
+ (((osection)->alignment_power = (0)),true);
+ bfd_set_section_flags (obfd, osection, 0x203);
+ osection->entsize = 0;
+ bfd_set_section_contents (obfd, osection, buf, 0, len);
+}
+
+static bfd *
+bfd_openw_with_cleanup (char *filename, const char *target, char *mode)
+{
+ static bfd foo_bfd = { 0 };
+ return &foo_bfd;
+}
+
+static asection *
+bfd_make_section_anyway (bfd *abfd, const char *name)
+{
+ static asection foo_section = { false, 0x0, 0x0, 0 };
+
+ return &foo_section;
+}
+
+static boolean
+bfd_set_section_size (bfd *abfd, asection *sec, bfd_size_type val)
+{
+ return true;
+}
+
+static boolean
+bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags)
+{
+}
+
+static boolean
+bfd_set_section_contents (bfd *abfd, asection *section, void * data, file_ptr offset, bfd_size_type count)
+{
+ if (count != (bfd_size_type)0x1eadbeef)
+ abort();
+}
+
+static char hello[] = "hello";
+
+int main(void)
+{
+ dump_bfd_file(0, 0, 0, (CORE_ADDR)0xdeadbeef, hello, (int)0x1eadbeef);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020406-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020406-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020406-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020406-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,126 @@
+// Origin: abbott at dima.unige.it
+// PR c/5120
+
+extern void * malloc (__SIZE_TYPE__);
+extern void * calloc (__SIZE_TYPE__, __SIZE_TYPE__);
+
+typedef unsigned int FFelem;
+
+FFelem FFmul(const FFelem x, const FFelem y)
+{
+ return x;
+}
+
+
+struct DUPFFstruct
+{
+ int maxdeg;
+ int deg;
+ FFelem *coeffs;
+};
+
+typedef struct DUPFFstruct *DUPFF;
+
+
+int DUPFFdeg(const DUPFF f)
+{
+ return f->deg;
+}
+
+
+DUPFF DUPFFnew(const int maxdeg)
+{
+ DUPFF ans = (DUPFF)malloc(sizeof(struct DUPFFstruct));
+ ans->coeffs = 0;
+ if (maxdeg >= 0) ans->coeffs = (FFelem*)calloc(maxdeg+1,sizeof(FFelem));
+ ans->maxdeg = maxdeg;
+ ans->deg = -1;
+ return ans;
+}
+
+void DUPFFfree(DUPFF x)
+{
+}
+
+void DUPFFswap(DUPFF x, DUPFF y)
+{
+}
+
+
+DUPFF DUPFFcopy(const DUPFF x)
+{
+ return x;
+}
+
+
+void DUPFFshift_add(DUPFF f, const DUPFF g, int deg, const FFelem coeff)
+{
+}
+
+
+DUPFF DUPFFexgcd(DUPFF *fcofac, DUPFF *gcofac, const DUPFF f, const DUPFF g)
+{
+ DUPFF u, v, uf, ug, vf, vg;
+ FFelem q, lcu, lcvrecip, p;
+ int df, dg, du, dv;
+
+ printf("DUPFFexgcd called on degrees %d and %d\n", DUPFFdeg(f), DUPFFdeg(g));
+ if (DUPFFdeg(f) < DUPFFdeg(g)) return DUPFFexgcd(gcofac, fcofac, g, f); /*** BUG IN THIS LINE ***/
+ if (DUPFFdeg(f) != 2 || DUPFFdeg(g) != 1) abort();
+ if (f->coeffs[0] == 0) return f;
+ /****** NEVER REACH HERE IN THE EXAMPLE ******/
+ p = 2;
+
+ df = DUPFFdeg(f); if (df < 0) df = 0; /* both inputs are zero */
+ dg = DUPFFdeg(g); if (dg < 0) dg = 0; /* one input is zero */
+ u = DUPFFcopy(f);
+ v = DUPFFcopy(g);
+
+ uf = DUPFFnew(dg); uf->coeffs[0] = 1; uf->deg = 0;
+ ug = DUPFFnew(df);
+ vf = DUPFFnew(dg);
+ vg = DUPFFnew(df); vg->coeffs[0] = 1; vg->deg = 0;
+
+ while (DUPFFdeg(v) > 0)
+ {
+ dv = DUPFFdeg(v);
+ lcvrecip = FFmul(1, v->coeffs[dv]);
+ while (DUPFFdeg(u) >= dv)
+ {
+ du = DUPFFdeg(u);
+ lcu = u->coeffs[du];
+ q = FFmul(lcu, lcvrecip);
+ DUPFFshift_add(u, v, du-dv, p-q);
+ DUPFFshift_add(uf, vf, du-dv, p-q);
+ DUPFFshift_add(ug, vg, du-dv, p-q);
+ }
+ DUPFFswap(u, v);
+ DUPFFswap(uf, vf);
+ DUPFFswap(ug, vg);
+ }
+ if (DUPFFdeg(v) == 0)
+ {
+ DUPFFswap(u, v);
+ DUPFFswap(uf, vf);
+ DUPFFswap(ug, vg);
+ }
+ DUPFFfree(vf);
+ DUPFFfree(vg);
+ DUPFFfree(v);
+ *fcofac = uf;
+ *gcofac = ug;
+ return u;
+}
+
+
+
+int main()
+{
+ DUPFF f, g, cf, cg, h;
+ f = DUPFFnew(1); f->coeffs[1] = 1; f->deg = 1;
+ g = DUPFFnew(2); g->coeffs[2] = 1; g->deg = 2;
+
+ printf("calling DUPFFexgcd on degrees %d and %d\n", DUPFFdeg(f), DUPFFdeg(g)) ;
+ h = DUPFFexgcd(&cf, &cg, f, g);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020411-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020411-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020411-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020411-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* PR optimization/6177
+ This testcase ICEd because expr.c did not expect to see a CONCAT
+ as array rtl. */
+
+extern void abort (void);
+extern void exit (int);
+
+__complex__ float foo (void)
+{
+ __complex__ float f[1];
+ __real__ f[0] = 1.0;
+ __imag__ f[0] = 1.0;
+ f[0] = __builtin_conjf (f[0]);
+ return f[0];
+}
+
+int main (void)
+{
+ __complex__ double d[1];
+ d[0] = foo ();
+ if (__real__ d[0] != 1.0
+ || __imag__ d[0] != -1.0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020412-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020412-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020412-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020412-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,57 @@
+/* PR c/3711
+ This testcase ICEd on IA-32 at -O0 and was miscompiled otherwise,
+ because std_expand_builtin_va_arg didn't handle variable size types. */
+/* { dg-require-effective-target alloca } */
+
+#include <stdarg.h>
+
+extern void abort (void);
+extern void exit (int);
+
+void bar (int c)
+{
+ static int d = '0';
+
+ if (c != d++)
+ abort ();
+ if (c < '0' || c > '9')
+ abort ();
+}
+
+void foo (int size, ...)
+{
+ struct
+ {
+ char x[size];
+ } d;
+ va_list ap;
+ int i;
+
+ va_start (ap, size);
+ d = va_arg (ap, typeof (d));
+ for (i = 0; i < size; i++)
+ bar (d.x[i]);
+ d = va_arg (ap, typeof (d));
+ for (i = 0; i < size; i++)
+ bar (d.x[i]);
+ va_end (ap);
+}
+
+int main (void)
+{
+ int z = 5;
+ struct { char a[z]; } x, y;
+
+ x.a[0] = '0';
+ x.a[1] = '1';
+ x.a[2] = '2';
+ x.a[3] = '3';
+ x.a[4] = '4';
+ y.a[0] = '5';
+ y.a[1] = '6';
+ y.a[2] = '7';
+ y.a[3] = '8';
+ y.a[4] = '9';
+ foo (z, x, y);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020413-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020413-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020413-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020413-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+void test(long double val, int *eval)
+{
+ long double tmp = 1.0l;
+ int i = 0;
+
+ if (val < 0.0l)
+ val = -val;
+
+ if (val >= tmp)
+ while (tmp < val)
+ {
+ tmp *= 2.0l;
+ if (i++ >= 10)
+ abort ();
+ }
+ else if (val != 0.0l)
+ while (val < tmp)
+ {
+ tmp /= 2.0l;
+ if (i++ >= 10)
+ abort ();
+ }
+
+ *eval = i;
+}
+
+int main(void)
+{
+ int eval;
+
+ test(3.0, &eval);
+ test(3.5, &eval);
+ test(4.0, &eval);
+ test(5.0, &eval);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020418-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020418-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020418-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020418-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* ifcvt accidentally deletes a referenced label while generating
+ conditional traps on machines having such patterns */
+
+struct foo { int a; };
+
+void gcc_crash(struct foo *p)
+{
+ if (__builtin_expect(p->a < 52, 0))
+ __builtin_trap();
+ top:
+ p->a++;
+ if (p->a >= 62)
+ goto top;
+}
+
+int main(void)
+{
+ struct foo x;
+
+ x.a = 53;
+ gcc_crash(&x);
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020423-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020423-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020423-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020423-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* PR c/5430 */
+/* Verify that the multiplicative folding code is not fooled
+ by the mix between signed variables and unsigned constants. */
+
+extern void abort (void);
+extern void exit (int);
+
+int main (void)
+{
+ int my_int = 924;
+ unsigned int result;
+
+ result = ((my_int*2 + 4) - 8U) / 2;
+ if (result != 922U)
+ abort();
+
+ result = ((my_int*2 - 4U) + 2) / 2;
+ if (result != 923U)
+ abort();
+
+ result = (((my_int + 2) * 2) - 8U - 4) / 2;
+ if (result != 920U)
+ abort();
+ result = (((my_int + 2) * 2) - (8U + 4)) / 2;
+ if (result != 920U)
+ abort();
+
+ result = ((my_int*4 + 2U) - 4U) / 2;
+ if (result != 1847U)
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020503-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020503-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020503-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020503-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+/* PR 6534 */
+/* GCSE unified the two i<0 tests, but if-conversion to ui=abs(i)
+ insertted the code at the wrong place corrupting the i<0 test. */
+
+void abort (void);
+static char *
+inttostr (long i, char buf[128])
+{
+ unsigned long ui = i;
+ char *p = buf + 127;
+ *p = '\0';
+ if (i < 0)
+ ui = -ui;
+ do
+ *--p = '0' + ui % 10;
+ while ((ui /= 10) != 0);
+ if (i < 0)
+ *--p = '-';
+ return p;
+}
+
+int
+main ()
+{
+ char buf[128], *p;
+
+ p = inttostr (-1, buf);
+ if (*p != '-')
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020506-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020506-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020506-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020506-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,332 @@
+/* Copyright (C) 2002 Free Software Foundation.
+
+ Test that (A & C1) op C2 optimizations behave correctly where C1 is
+ a constant power of 2, op is == or !=, and C2 is C1 or zero.
+
+ Written by Roger Sayle, 5th May 2002. */
+
+#include <limits.h>
+
+extern void abort (void);
+
+void test1 (signed char c, int set);
+void test2 (unsigned char c, int set);
+void test3 (short s, int set);
+void test4 (unsigned short s, int set);
+void test5 (int i, int set);
+void test6 (unsigned int i, int set);
+void test7 (long long l, int set);
+void test8 (unsigned long long l, int set);
+
+#ifndef LONG_LONG_MAX
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#endif
+#ifndef LONG_LONG_MIN
+#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
+#endif
+#ifndef ULONG_LONG_MAX
+#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
+#endif
+
+
+void
+test1 (signed char c, int set)
+{
+ if ((c & (SCHAR_MAX+1)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((c & (SCHAR_MAX+1)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((c & (SCHAR_MAX+1)) == (SCHAR_MAX+1))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((c & (SCHAR_MAX+1)) != (SCHAR_MAX+1))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+void
+test2 (unsigned char c, int set)
+{
+ if ((c & (SCHAR_MAX+1)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((c & (SCHAR_MAX+1)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((c & (SCHAR_MAX+1)) == (SCHAR_MAX+1))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((c & (SCHAR_MAX+1)) != (SCHAR_MAX+1))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+void
+test3 (short s, int set)
+{
+ if ((s & (SHRT_MAX+1)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((s & (SHRT_MAX+1)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((s & (SHRT_MAX+1)) == (SHRT_MAX+1))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((s & (SHRT_MAX+1)) != (SHRT_MAX+1))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+void
+test4 (unsigned short s, int set)
+{
+ if ((s & (SHRT_MAX+1)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((s & (SHRT_MAX+1)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((s & (SHRT_MAX+1)) == (SHRT_MAX+1))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((s & (SHRT_MAX+1)) != (SHRT_MAX+1))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+void
+test5 (int i, int set)
+{
+ if ((i & (INT_MAX+1U)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((i & (INT_MAX+1U)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((i & (INT_MAX+1U)) == (INT_MAX+1U))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((i & (INT_MAX+1U)) != (INT_MAX+1U))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+void
+test6 (unsigned int i, int set)
+{
+ if ((i & (INT_MAX+1U)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((i & (INT_MAX+1U)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((i & (INT_MAX+1U)) == (INT_MAX+1U))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((i & (INT_MAX+1U)) != (INT_MAX+1U))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+void
+test7 (long long l, int set)
+{
+ if ((l & (LONG_LONG_MAX+1ULL)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((l & (LONG_LONG_MAX+1ULL)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((l & (LONG_LONG_MAX+1ULL)) == (LONG_LONG_MAX+1ULL))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((l & (LONG_LONG_MAX+1ULL)) != (LONG_LONG_MAX+1ULL))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+void
+test8 (unsigned long long l, int set)
+{
+ if ((l & (LONG_LONG_MAX+1ULL)) == 0)
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+
+ if ((l & (LONG_LONG_MAX+1ULL)) != 0)
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((l & (LONG_LONG_MAX+1ULL)) == (LONG_LONG_MAX+1ULL))
+ {
+ if (!set) abort ();
+ }
+ else
+ if (set) abort ();
+
+ if ((l & (LONG_LONG_MAX+1ULL)) != (LONG_LONG_MAX+1ULL))
+ {
+ if (set) abort ();
+ }
+ else
+ if (!set) abort ();
+}
+
+int
+main ()
+{
+ test1 (0, 0);
+ test1 (SCHAR_MAX, 0);
+ test1 (SCHAR_MIN, 1);
+ test1 (UCHAR_MAX, 1);
+
+ test2 (0, 0);
+ test2 (SCHAR_MAX, 0);
+ test2 (SCHAR_MIN, 1);
+ test2 (UCHAR_MAX, 1);
+
+ test3 (0, 0);
+ test3 (SHRT_MAX, 0);
+ test3 (SHRT_MIN, 1);
+ test3 (USHRT_MAX, 1);
+
+ test4 (0, 0);
+ test4 (SHRT_MAX, 0);
+ test4 (SHRT_MIN, 1);
+ test4 (USHRT_MAX, 1);
+
+ test5 (0, 0);
+ test5 (INT_MAX, 0);
+ test5 (INT_MIN, 1);
+ test5 (UINT_MAX, 1);
+
+ test6 (0, 0);
+ test6 (INT_MAX, 0);
+ test6 (INT_MIN, 1);
+ test6 (UINT_MAX, 1);
+
+ test7 (0, 0);
+ test7 (LONG_LONG_MAX, 0);
+ test7 (LONG_LONG_MIN, 1);
+ test7 (ULONG_LONG_MAX, 1);
+
+ test8 (0, 0);
+ test8 (LONG_LONG_MAX, 0);
+ test8 (LONG_LONG_MIN, 1);
+ test8 (ULONG_LONG_MAX, 1);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,104 @@
+/* This tests the rotate patterns that some machines support. */
+
+#include <limits.h>
+
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
+#define ROR(a,b) (((a) >> (b)) | ((a) << ((sizeof (a) * CHAR_BIT) - (b))))
+#define ROL(a,b) (((a) << (b)) | ((a) >> ((sizeof (a) * CHAR_BIT) - (b))))
+
+#define CHAR_VALUE ((unsigned char)0xf234U)
+#define SHORT_VALUE ((unsigned short)0xf234U)
+#define INT_VALUE 0xf234U
+#define LONG_VALUE 0xf2345678LU
+#define LL_VALUE 0xf2345678abcdef0LLU
+
+#define SHIFT1 4
+#define SHIFT2 ((sizeof (long long) * CHAR_BIT) - SHIFT1)
+
+unsigned char uc = CHAR_VALUE;
+unsigned short us = SHORT_VALUE;
+unsigned int ui = INT_VALUE;
+unsigned long ul = LONG_VALUE;
+unsigned long long ull = LL_VALUE;
+int shift1 = SHIFT1;
+int shift2 = SHIFT2;
+
+main ()
+{
+ if (ROR (uc, shift1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (uc, SHIFT1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (us, shift1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (us, SHIFT1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ui, shift1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ui, SHIFT1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ul, shift1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ul, SHIFT1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ull, shift1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ull, SHIFT1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ull, shift2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROR (ull, SHIFT2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (uc, shift1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (uc, SHIFT1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (us, shift1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (us, SHIFT1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ui, shift1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ui, SHIFT1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ul, shift1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ul, SHIFT1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ull, shift1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ull, SHIFT1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ull, shift2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (ull, SHIFT2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,102 @@
+#include <limits.h>
+
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
+#define ROR(a,b) (((a) >> (b)) | ((a) << ((sizeof (a) * CHAR_BIT) - (b))))
+#define ROL(a,b) (((a) << (b)) | ((a) >> ((sizeof (a) * CHAR_BIT) - (b))))
+
+#define CHAR_VALUE ((char)0x1234)
+#define SHORT_VALUE ((short)0x1234)
+#define INT_VALUE ((int)0x1234)
+#define LONG_VALUE ((long)0x12345678L)
+#define LL_VALUE ((long long)0x12345678abcdef0LL)
+
+#define SHIFT1 4
+#define SHIFT2 ((sizeof (long long) * CHAR_BIT) - SHIFT1)
+
+char c = CHAR_VALUE;
+short s = SHORT_VALUE;
+int i = INT_VALUE;
+long l = LONG_VALUE;
+long long ll = LL_VALUE;
+int shift1 = SHIFT1;
+int shift2 = SHIFT2;
+
+main ()
+{
+ if (ROR (c, shift1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (c, SHIFT1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (s, shift1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (s, SHIFT1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (i, shift1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (i, SHIFT1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (l, shift1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (l, SHIFT1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ll, shift1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ll, SHIFT1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ll, shift2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROR (ll, SHIFT2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (c, shift1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (c, SHIFT1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (s, shift1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (s, SHIFT1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (i, shift1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (i, SHIFT1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (l, shift1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (l, SHIFT1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ll, shift1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ll, SHIFT1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ll, shift2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (ll, SHIFT2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020508-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,102 @@
+#include <limits.h>
+
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
+#define ROR(a,b) (((a) >> (b)) | ((a) << ((sizeof (a) * CHAR_BIT) - (b))))
+#define ROL(a,b) (((a) << (b)) | ((a) >> ((sizeof (a) * CHAR_BIT) - (b))))
+
+#define CHAR_VALUE ((char)0xf234)
+#define SHORT_VALUE ((short)0xf234)
+#define INT_VALUE ((int)0xf234)
+#define LONG_VALUE ((long)0xf2345678L)
+#define LL_VALUE ((long long)0xf2345678abcdef0LL)
+
+#define SHIFT1 4
+#define SHIFT2 ((sizeof (long long) * CHAR_BIT) - SHIFT1)
+
+char c = CHAR_VALUE;
+short s = SHORT_VALUE;
+int i = INT_VALUE;
+long l = LONG_VALUE;
+long long ll = LL_VALUE;
+int shift1 = SHIFT1;
+int shift2 = SHIFT2;
+
+main ()
+{
+ if (ROR (c, shift1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (c, SHIFT1) != ROR (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (s, shift1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (s, SHIFT1) != ROR (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (i, shift1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (i, SHIFT1) != ROR (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (l, shift1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (l, SHIFT1) != ROR (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ll, shift1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ll, SHIFT1) != ROR (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROR (ll, shift2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROR (ll, SHIFT2) != ROR (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (c, shift1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (c, SHIFT1) != ROL (CHAR_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (s, shift1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (s, SHIFT1) != ROL (SHORT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (i, shift1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (i, SHIFT1) != ROL (INT_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (l, shift1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (l, SHIFT1) != ROL (LONG_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ll, shift1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ll, SHIFT1) != ROL (LL_VALUE, SHIFT1))
+ abort ();
+
+ if (ROL (ll, shift2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ if (ROL (ll, SHIFT2) != ROL (LL_VALUE, SHIFT2))
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020510-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020510-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020510-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020510-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,84 @@
+/* Copyright (C) 2002 Free Software Foundation.
+
+ Test that optimizing ((c>=1) && (c<=127)) into (signed char)c < 0
+ doesn't cause any problems for the compiler and behaves correctly.
+
+ Written by Roger Sayle, 8th May 2002. */
+
+#include <limits.h>
+
+extern void abort (void);
+
+void
+testc (unsigned char c, int ok)
+{
+ if ((c>=1) && (c<=SCHAR_MAX))
+ {
+ if (!ok) abort ();
+ }
+ else
+ if (ok) abort ();
+}
+
+void
+tests (unsigned short s, int ok)
+{
+ if ((s>=1) && (s<=SHRT_MAX))
+ {
+ if (!ok) abort ();
+ }
+ else
+ if (ok) abort ();
+}
+
+void
+testi (unsigned int i, int ok)
+{
+ if ((i>=1) && (i<=INT_MAX))
+ {
+ if (!ok) abort ();
+ }
+ else
+ if (ok) abort ();
+}
+
+void
+testl (unsigned long l, int ok)
+{
+ if ((l>=1) && (l<=LONG_MAX))
+ {
+ if (!ok) abort ();
+ }
+ else
+ if (ok) abort ();
+}
+
+int
+main ()
+{
+ testc (0, 0);
+ testc (1, 1);
+ testc (SCHAR_MAX, 1);
+ testc (SCHAR_MAX+1, 0);
+ testc (UCHAR_MAX, 0);
+
+ tests (0, 0);
+ tests (1, 1);
+ tests (SHRT_MAX, 1);
+ tests (SHRT_MAX+1, 0);
+ tests (USHRT_MAX, 0);
+
+ testi (0, 0);
+ testi (1, 1);
+ testi (INT_MAX, 1);
+ testi (INT_MAX+1U, 0);
+ testi (UINT_MAX, 0);
+
+ testl (0, 0);
+ testl (1, 1);
+ testl (LONG_MAX, 1);
+ testl (LONG_MAX+1UL, 0);
+ testl (ULONG_MAX, 0);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020529-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020529-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020529-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020529-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,82 @@
+/* PR target/6838 from cato at df.lth.se.
+ cris-elf got an ICE with -O2: the insn matching
+ (insn 49 48 52 (parallel[
+ (set (mem/s:HI (plus:SI (reg/v/f:SI 0 r0 [24])
+ (const_int 8 [0x8])) [5 <variable>.c+0 S2 A8])
+ (reg:HI 2 r2 [27]))
+ (set (reg/f:SI 2 r2 [31])
+ (plus:SI (reg/v/f:SI 0 r0 [24])
+ (const_int 8 [0x8])))
+ ] ) 24 {*mov_sidehi_mem} (nil)
+ (nil))
+ forced a splitter through the output pattern "#", but there was no
+ matching splitter. */
+
+/* The ptx assembler appears to clobber 'b' inside foo during the f1 call.
+ Reported to nvidia 2016-05-18. */
+/* { dg-skip-if "PTX assembler bug" { nvptx-*-* } { "-O0" } { "" } } */
+
+struct xx
+ {
+ int a;
+ struct xx *b;
+ short c;
+ };
+
+int f1 (struct xx *);
+void f2 (void);
+
+int
+foo (struct xx *p, int b, int c, int d)
+{
+ int a;
+
+ for (;;)
+ {
+ a = f1(p);
+ if (a)
+ return (0);
+ if (b)
+ continue;
+ p->c = d;
+ if (p->a)
+ f2 ();
+ if (c)
+ f2 ();
+ d = p->c;
+ switch (a)
+ {
+ case 1:
+ if (p->b)
+ f2 ();
+ if (c)
+ f2 ();
+ default:
+ break;
+ }
+ }
+ return d;
+}
+
+int main (void)
+{
+ struct xx s = {0, &s, 23};
+ if (foo (&s, 0, 0, 0) != 0 || s.a != 0 || s.b != &s || s.c != 0)
+ abort ();
+ exit (0);
+}
+
+int
+f1 (struct xx *p)
+{
+ static int beenhere = 0;
+ if (beenhere++ > 1)
+ abort ();
+ return beenhere > 1;
+}
+
+void
+f2 (void)
+{
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020611-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020611-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020611-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020611-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* PR target/6997. Missing (set_attr "cc" "none") in sleu pattern in
+ cris.md. Testcase from hp at axis.com. */
+
+int p;
+int k;
+unsigned int n;
+
+void x ()
+{
+ unsigned int h;
+
+ h = n <= 30;
+ if (h)
+ p = 1;
+ else
+ p = 0;
+
+ if (h)
+ k = 1;
+ else
+ k = 0;
+}
+
+unsigned int n = 30;
+
+main ()
+{
+ x ();
+ if (p != 1 || k != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020614-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020614-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020614-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020614-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+/* PR c/6677 */
+/* Verify that GCC doesn't perform illegal simplifications
+ when folding constants. */
+
+#include <limits.h>
+
+extern void abort (void);
+extern void exit (int);
+
+int main (void)
+{
+ int i;
+ signed char j;
+ unsigned char k;
+
+ i = SCHAR_MAX;
+
+ j = ((signed char) (i << 1)) / 2;
+
+ if (j != -1)
+ abort();
+
+ j = ((signed char) (i * 2)) / 2;
+
+ if (j != -1)
+ abort();
+
+ i = UCHAR_MAX;
+
+ k = ((unsigned char) (i << 1)) / 2;
+
+ if (k != UCHAR_MAX/2)
+ abort();
+
+ k = ((unsigned char) (i * 2)) / 2;
+
+ if (k != UCHAR_MAX/2)
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020615-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020615-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020615-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020615-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,59 @@
+/* PR target/7042. When reorg.c changed branches into return insns, it
+ completely forgot about any current_function_epilogue_delay_list and
+ dropped those insns. Uncovered on cris-axis-elf, where an insn in an
+ epilogue delay-slot set the return-value register with the testcase
+ below. Derived from ghostscript-6.52 (GPL) by hp at axis.com. */
+
+typedef struct font_hints_s {
+ int axes_swapped;
+ int x_inverted, y_inverted;
+} font_hints;
+typedef struct gs_fixed_point_s {
+ long x, y;
+} gs_fixed_point;
+
+int
+line_hints(const font_hints *fh, const gs_fixed_point *p0,
+ const gs_fixed_point *p1)
+{
+ long dx = p1->x - p0->x;
+ long dy = p1->y - p0->y;
+ long adx, ady;
+ int xi = fh->x_inverted, yi = fh->y_inverted;
+ int hints;
+ if (xi)
+ dx = -dx;
+ if (yi)
+ dy = -dy;
+ if (fh->axes_swapped) {
+ long t = dx;
+ int ti = xi;
+ dx = dy, xi = yi;
+ dy = t, yi = ti;
+ }
+ adx = dx < 0 ? -dx : dx;
+ ady = dy < 0 ? -dy : dy;
+ if (dy != 0 && (adx <= ady >> 4)) {
+ hints = dy > 0 ? 2 : 1;
+ if (xi)
+ hints ^= 3;
+ } else if (dx != 0 && (ady <= adx >> 4)) {
+ hints = dx < 0 ? 8 : 4;
+ if (yi)
+ hints ^= 12;
+ } else
+ hints = 0;
+ return hints;
+}
+int main ()
+{
+ static font_hints fh[] = {{0, 1, 0}, {0, 0, 1}, {0, 0, 0}};
+ static gs_fixed_point gsf[]
+ = {{0x30000, 0x13958}, {0x30000, 0x18189},
+ {0x13958, 0x30000}, {0x18189, 0x30000}};
+ if (line_hints (fh, gsf, gsf + 1) != 1
+ || line_hints (fh + 1, gsf + 2, gsf + 3) != 8
+ || line_hints (fh + 2, gsf + 2, gsf + 3) != 4)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020619-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020619-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020619-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020619-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+#if (__SIZEOF_INT__ == 4)
+typedef int int32;
+#elif (__SIZEOF_LONG__ == 4)
+typedef long int32;
+#else
+#error Add target support for int32
+#endif
+static int32 ref(void)
+{
+ union {
+ char c[5];
+ int32 i;
+ } u;
+
+ __builtin_memset (&u, 0, sizeof(u));
+ u.c[0] = 1;
+ u.c[1] = 2;
+ u.c[2] = 3;
+ u.c[3] = 4;
+
+ return u.i;
+}
+
+int main()
+{
+ int32 b = ref();
+ if (b != 0x01020304
+ && b != 0x04030201)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020716-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020716-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020716-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020716-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+extern void abort (void);
+extern void exit (int);
+
+int sub1 (int val)
+{
+ return val;
+}
+
+int testcond (int val)
+{
+ int flag1;
+
+ {
+ int t1 = val;
+ {
+ int t2 = t1;
+ {
+ flag1 = sub1 (t2) ==0;
+ goto lab1;
+ };
+ }
+ lab1: ;
+ }
+
+ if (flag1 != 0)
+ return 0x4d0000;
+ else
+ return 0;
+}
+
+int main (void)
+{
+ if (testcond (1))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020720-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020720-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020720-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020720-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* Copyright (C) 2002 Free Software Foundation.
+
+ Ensure that fabs(x) < 0.0 optimization is working.
+
+ Written by Roger Sayle, 20th July 2002. */
+
+extern void abort (void);
+extern double fabs (double);
+extern void link_error (void);
+
+void
+foo (double x)
+{
+ double p, q;
+
+ p = fabs (x);
+ q = 0.0;
+ if (p < q)
+ link_error ();
+}
+
+int
+main()
+{
+ foo (1.0);
+ return 0;
+}
+
+#ifndef __OPTIMIZE__
+void
+link_error ()
+{
+ abort ();
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020805-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020805-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020805-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020805-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* This testcase was miscompiled on IA-32, because fold-const
+ assumed associate_trees is always done on PLUS_EXPR. */
+
+extern void abort (void);
+extern void exit (int);
+
+void check (unsigned int m)
+{
+ if (m != (unsigned int) -1)
+ abort ();
+}
+
+unsigned int n = 1;
+
+int main (void)
+{
+ unsigned int m;
+ m = (1 | (2 - n)) | (-n);
+ check (m);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020810-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020810-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020810-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020810-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+/* PR target/7559
+ This testcase was miscompiled on x86-64, because classify_argument
+ wrongly computed the offset of nested structure fields. */
+
+extern void abort (void);
+
+struct A
+{
+ long x;
+};
+
+struct R
+{
+ struct A a, b;
+};
+
+struct R R = { 100, 200 };
+
+void f (struct R r)
+{
+ if (r.a.x != R.a.x || r.b.x != R.b.x)
+ abort ();
+}
+
+struct R g (void)
+{
+ return R;
+}
+
+int main (void)
+{
+ struct R r;
+ f(R);
+ r = g();
+ if (r.a.x != R.a.x || r.b.x != R.b.x)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020819-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020819-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020819-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020819-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+foo ()
+{
+ return 0;
+}
+
+main()
+{
+ int i, j, k, ccp_bad = 0;
+
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 10; j++)
+ if (foo ())
+ ccp_bad = 1;
+
+ k = ccp_bad != 0;
+ if (k)
+ abort ();
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020904-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020904-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020904-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020904-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* PR c/7102 */
+
+/* Verify that GCC zero-extends integer constants
+ in unsigned binary operations. */
+
+typedef unsigned char u8;
+
+u8 fun(u8 y)
+{
+ u8 x=((u8)255)/y;
+ return x;
+}
+
+int main(void)
+{
+ if (fun((u8)2) != 127)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020911-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020911-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020911-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020911-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,8 @@
+extern void abort (void);
+unsigned short c = 0x8000;
+int main()
+{
+ if ((c-0x8000) < 0 || (c-0x8000) > 0x7fff)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020916-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020916-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020916-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020916-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+/* Distilled from try_pre_increment in flow.c. If-conversion inserted
+ new instructions at the wrong place on ppc. */
+
+int foo(int a)
+{
+ int x;
+ x = 0;
+ if (a > 0) x = 1;
+ if (a < 0) x = 1;
+ return x;
+}
+
+int main()
+{
+ if (foo(1) != 1)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020920-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020920-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020920-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20020920-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+extern void abort (void);
+extern void exit (int);
+
+struct B
+{
+ int x;
+ int y;
+};
+
+struct A
+{
+ int z;
+ struct B b;
+};
+
+struct A
+f ()
+{
+ struct B b = { 0, 1 };
+ struct A a = { 2, b };
+ return a;
+}
+
+int
+main (void)
+{
+ struct A a = f ();
+ if (a.z != 2 || a.b.x != 0 || a.b.y != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+#include <limits.h>
+
+int
+sub ()
+{
+ int dummy = 0, a = 16;
+
+ if (a / INT_MAX / 16 == 0)
+ return 0;
+ else
+ return a / INT_MAX / 16;
+}
+
+int
+main ()
+{
+ if (sub () != 0)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021010-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* cse.c failure on x86 target.
+ Contributed by Stuart Hastings 10 Oct 2002 <stuart at apple.com> */
+#include <stdlib.h>
+
+typedef signed short SInt16;
+
+typedef struct {
+ SInt16 minx;
+ SInt16 maxx;
+ SInt16 miny;
+ SInt16 maxy;
+} IOGBounds;
+
+int expectedwidth = 50;
+
+unsigned int *global_vramPtr = (unsigned int *)0xa000;
+
+IOGBounds global_bounds = { 100, 150, 100, 150 };
+IOGBounds global_saveRect = { 75, 175, 75, 175 };
+
+main()
+{
+ unsigned int *vramPtr;
+ int width;
+ IOGBounds saveRect = global_saveRect;
+ IOGBounds bounds = global_bounds;
+
+ if (saveRect.minx < bounds.minx) saveRect.minx = bounds.minx;
+ if (saveRect.maxx > bounds.maxx) saveRect.maxx = bounds.maxx;
+
+ vramPtr = global_vramPtr + (saveRect.miny - bounds.miny) ;
+ width = saveRect.maxx - saveRect.minx;
+
+ if (width != expectedwidth)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021011-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021011-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021011-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021011-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* PR opt/8165. */
+
+extern void abort (void);
+
+char buf[64];
+
+int
+main (void)
+{
+ int i;
+
+ __builtin_strcpy (buf, "mystring");
+ if (__builtin_strcmp (buf, "mystring") != 0)
+ abort ();
+
+ for (i = 0; i < 16; ++i)
+ {
+ __builtin_strcpy (buf + i, "mystring");
+ if (__builtin_strcmp (buf + i, "mystring") != 0)
+ abort ();
+ }
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021015-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021015-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021015-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021015-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* PR opt/7409. */
+
+extern void abort (void);
+
+char g_list[] = { '1' };
+
+void g (void *p, char *list, int length, char **elementPtr, char **nextPtr)
+{
+ if (*nextPtr != g_list)
+ abort ();
+
+ **nextPtr = 0;
+}
+
+int main (void)
+{
+ char *list = g_list;
+ char *element;
+ int i, length = 100;
+
+ for (i = 0; *list != 0; i++)
+ {
+ char *prevList = list;
+ g (0, list, length, &element, &list);
+ length -= (list - prevList);
+ }
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021024-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021024-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021024-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021024-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,44 @@
+/* Origin: PR target/6981 from Mattias Engdegaard <mattias at virtutech.se>. */
+/* { dg-require-effective-target int32plus } */
+
+void exit (int);
+void abort (void);
+
+unsigned long long *cp, m;
+
+void foo (void)
+{
+}
+
+void bar (unsigned rop, unsigned long long *r)
+{
+ unsigned rs1, rs2, rd;
+
+top:
+ rs2 = (rop >> 23) & 0x1ff;
+ rs1 = (rop >> 9) & 0x1ff;
+ rd = rop & 0x1ff;
+
+ *cp = 1;
+ m = r[rs1] + r[rs2];
+ *cp = 2;
+ foo();
+ if (!rd)
+ goto top;
+ r[rd] = 1;
+}
+
+int main(void)
+{
+ static unsigned long long r[64];
+ unsigned long long cr;
+ cp = &cr;
+
+ r[4] = 47;
+ r[8] = 11;
+ bar((8 << 23) | (4 << 9) | 15, r);
+
+ if (m != 47 + 11)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021111-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021111-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021111-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021111-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+/* Origin: PR c/8467 */
+
+extern void abort (void);
+extern void exit (int);
+
+int aim_callhandler(int sess, int conn, unsigned short family, unsigned short type);
+
+int aim_callhandler(int sess, int conn, unsigned short family, unsigned short type)
+{
+ static int i = 0;
+
+ if (!conn)
+ return 0;
+
+ if (type == 0xffff)
+ {
+ return 0;
+ }
+
+ if (i >= 1)
+ abort ();
+
+ i++;
+ return aim_callhandler(sess, conn, family, (unsigned short) 0xffff);
+}
+
+int main (void)
+{
+ aim_callhandler (0, 1, 0, 0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021113-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021113-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021113-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021113-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* { dg-require-effective-target alloca } */
+
+/* This program tests a data flow bug that would cause constant propagation
+ to propagate constants through function calls. */
+
+foo (int *p)
+{
+ *p = 10;
+}
+
+main()
+{
+ int *ptr = alloca (sizeof (int));
+ *ptr = 5;
+ foo (ptr);
+ if (*ptr == 5)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+struct s { int f[4]; };
+
+int foo (struct s s, int x1, int x2, int x3, int x4, int x5, int x6, int x7)
+{
+ return s.f[3] + x7;
+}
+
+int main ()
+{
+ struct s s = { 1, 2, 3, 4 };
+
+ if (foo (s, 100, 200, 300, 400, 500, 600, 700) != 704)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,50 @@
+/* Originally added to test SH constant pool layout. t1() failed for
+ non-PIC and t2() failed for PIC. */
+
+int t1 (float *f, int i,
+ void (*f1) (double),
+ void (*f2) (float, float))
+{
+ f1 (3.0);
+ f[i] = f[i + 1];
+ f2 (2.5f, 3.5f);
+}
+
+int t2 (float *f, int i,
+ void (*f1) (double),
+ void (*f2) (float, float),
+ void (*f3) (float))
+{
+ f3 (6.0f);
+ f1 (3.0);
+ f[i] = f[i + 1];
+ f2 (2.5f, 3.5f);
+}
+
+void f1 (double d)
+{
+ if (d != 3.0)
+ abort ();
+}
+
+void f2 (float f1, float f2)
+{
+ if (f1 != 2.5f || f2 != 3.5f)
+ abort ();
+}
+
+void f3 (float f)
+{
+ if (f != 6.0f)
+ abort ();
+}
+
+int main ()
+{
+ float f[3] = { 2.0f, 3.0f, 4.0f };
+ t1 (f, 0, f1, f2);
+ t2 (f, 1, f1, f2, f3);
+ if (f[0] != 3.0f && f[1] != 4.0f)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021118-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+extern void abort (void);
+extern void exit (int);
+
+int
+foo (int x)
+{
+ if (x == -2 || -x - 100 >= 0)
+ abort ();
+ return 0;
+}
+
+int
+main ()
+{
+ foo (-3);
+ foo (-99);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021119-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021119-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021119-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021119-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* PR 8639. */
+
+extern void abort(void);
+
+int foo (int i)
+{
+ int r;
+ r = (80 - 4 * i) / 20;
+ return r;
+}
+
+int main ()
+{
+ if (foo (1) != 3)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,58 @@
+/* Macros to emit "L Nxx R" for each octal number xx between 000 and 037. */
+#define OP1(L, N, R, I, J) L N##I##J R
+#define OP2(L, N, R, I) \
+ OP1(L, N, R, 0, I), OP1(L, N, R, 1, I), \
+ OP1(L, N, R, 2, I), OP1(L, N, R, 3, I)
+#define OP(L, N, R) \
+ OP2(L, N, R, 0), OP2(L, N, R, 1), OP2(L, N, R, 2), OP2(L, N, R, 3), \
+ OP2(L, N, R, 4), OP2(L, N, R, 5), OP2(L, N, R, 6), OP2(L, N, R, 7)
+
+/* Declare 32 unique variables with prefix N. */
+#define DECLARE(N) OP (, N,)
+
+/* Copy 32 variables with prefix N from the array at ADDR.
+ Leave ADDR pointing to the end of the array. */
+#define COPYIN(N, ADDR) OP (, N, = *(ADDR++))
+
+/* Likewise, but copy the other way. */
+#define COPYOUT(N, ADDR) OP (*(ADDR++) =, N,)
+
+/* Add the contents of the array at ADDR to 32 variables with prefix N.
+ Leave ADDR pointing to the end of the array. */
+#define ADD(N, ADDR) OP (, N, += *(ADDR++))
+
+volatile double gd[32];
+volatile float gf[32];
+
+void foo (int n)
+{
+ double DECLARE(d);
+ float DECLARE(f);
+ volatile double *pd;
+ volatile float *pf;
+ int i;
+
+ pd = gd; COPYIN (d, pd);
+ for (i = 0; i < n; i++)
+ {
+ pf = gf; COPYIN (f, pf);
+ pd = gd; ADD (d, pd);
+ pd = gd; ADD (d, pd);
+ pd = gd; ADD (d, pd);
+ pf = gf; COPYOUT (f, pf);
+ }
+ pd = gd; COPYOUT (d, pd);
+}
+
+int main ()
+{
+ int i;
+
+ for (i = 0; i < 32; i++)
+ gd[i] = i, gf[i] = i;
+ foo (1);
+ for (i = 0; i < 32; i++)
+ if (gd[i] != i * 4 || gf[i] != i)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+int g1, g2;
+
+void foo (int x)
+{
+ int y;
+
+ if (x)
+ y = 793;
+ else
+ y = 793;
+ g1 = 7930 / y;
+ g2 = 7930 / x;
+}
+
+int main ()
+{
+ foo (793);
+ if (g1 != 10 || g2 != 10)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021120-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+/* Test whether a partly call-clobbered register will be moved over a call.
+ Although the original test case didn't use any GNUisms, it proved
+ difficult to reduce without the named register extension. */
+#if __SH64__ == 32
+#define LOC asm ("r10")
+#else
+#define LOC
+#endif
+
+unsigned int foo (char *c, unsigned int x, unsigned int y)
+{
+ register unsigned int z LOC;
+
+ sprintf (c, "%d", x / y);
+ z = x + 1;
+ return z / (y + 1);
+}
+
+int main ()
+{
+ char c[16];
+
+ if (foo (c, ~1U, 4) != (~0U / 5))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021127-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021127-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021127-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021127-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+/* { dg-options "-std=c99" } */
+
+long long a = -1;
+long long llabs (long long);
+void abort (void);
+int
+main()
+{
+ if (llabs (a) != 1)
+ abort ();
+ return 0;
+}
+long long llabs (long long b)
+{
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021204-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021204-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021204-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021204-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* This test was miscompiled when using sibling call optimization,
+ because X ? Y : Y - 1 optimization changed X into !X in place
+ and haven't reverted it if do_store_flag was successful, so
+ when expanding the expression the second time it was
+ !X ? Y : Y - 1. */
+
+extern void abort (void);
+extern void exit (int);
+
+void foo (int x)
+{
+ if (x != 1)
+ abort ();
+}
+
+int z;
+
+int main (int argc, char **argv)
+{
+ char *a = "test";
+ char *b = a + 2;
+
+ foo (z > 0 ? b - a : b - a - 1);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021219-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021219-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021219-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20021219-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+/* PR optimization/8988 */
+/* Contributed by Kevin Easton */
+
+void foo(char *p1, char **p2)
+{}
+
+int main(void)
+{
+ char str[] = "foo { xx }";
+ char *ptr = str + 5;
+
+ foo(ptr, &ptr);
+
+ while (*ptr && (*ptr == 13 || *ptr == 32))
+ ptr++;
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030105-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030105-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030105-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030105-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+int __attribute__ ((noinline))
+foo ()
+{
+ const int a[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+ int i, sum;
+
+ sum = 0;
+ for (i = 0; i < sizeof (a) / sizeof (*a); i++)
+ sum += a[i];
+
+ return sum;
+}
+
+int
+main ()
+{
+ if (foo () != 28)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030109-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030109-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030109-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030109-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+/* PR c/8032 */
+/* Verify that an empty initializer inside a partial
+ parent initializer doesn't confuse GCC. */
+
+struct X
+{
+ int a;
+ int b;
+ int z[];
+};
+
+struct X x = { .b = 40, .z = {} };
+
+int main ()
+{
+ if (x.b != 40)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030117-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030117-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030117-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030117-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+int foo (int, int, int);
+int bar (int, int, int);
+
+int main (void)
+{
+ if (foo (5, 10, 21) != 12)
+ abort ();
+
+ if (bar (9, 12, 15) != 150)
+ abort ();
+
+ exit (0);
+}
+
+int foo (int x, int y, int z)
+{
+ return (x + y + z) / 3;
+}
+
+int bar (int x, int y, int z)
+{
+ return foo (x * x, y * y, z * z);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,50 @@
+/* On H8/300 port, NOTICE_UPDATE_CC had a bug that causes the final
+ pass to remove test insns that should be kept. */
+
+unsigned short
+test1 (unsigned short w)
+{
+ if ((w & 0xff00) == 0)
+ {
+ if (w == 0)
+ w = 2;
+ }
+ return w;
+}
+
+unsigned long
+test2 (unsigned long w)
+{
+ if ((w & 0xffff0000) == 0)
+ {
+ if (w == 0)
+ w = 2;
+ }
+ return w;
+}
+
+int
+test3 (unsigned short a)
+{
+ if (a & 1)
+ return 1;
+ else if (a)
+ return 1;
+ else
+ return 0;
+}
+
+int
+main ()
+{
+ if (test1 (1) != 1)
+ abort ();
+
+ if (test2 (1) != 1)
+ abort ();
+
+ if (test3 (2) != 1)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030120-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* PR 8848 */
+
+extern void abort ();
+
+int foo(int status)
+{
+ int s = 0;
+ if (status == 1) s=1;
+ if (status == 3) s=3;
+ if (status == 4) s=4;
+ return s;
+}
+
+int main()
+{
+ if (foo (3) != 3)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030125-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030125-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030125-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030125-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,56 @@
+/* Verify whether math functions are simplified. */
+/* { dg-require-effective-target c99_runtime } */
+/* { dg-require-weak "" } */
+double sin(double);
+double floor(double);
+float
+t(float a)
+{
+ return sin(a);
+}
+float
+q(float a)
+{
+ return floor(a);
+}
+double
+q1(float a)
+{
+ return floor(a);
+}
+main()
+{
+#ifdef __OPTIMIZE__
+ if (t(0)!=0)
+ abort ();
+ if (q(0)!=0)
+ abort ();
+ if (q1(0)!=0)
+ abort ();
+#endif
+ return 0;
+}
+__attribute__ ((weak))
+double
+floor(double a)
+{
+ abort ();
+}
+__attribute__ ((weak))
+float
+floorf(float a)
+{
+ return a;
+}
+__attribute__ ((weak))
+double
+sin(double a)
+{
+ return a;
+}
+__attribute__ ((weak))
+float
+sinf(float a)
+{
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030128-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030128-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030128-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030128-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+unsigned char x = 50;
+volatile short y = -5;
+
+int main ()
+{
+ x /= y;
+ if (x != (unsigned char) -10)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030203-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030203-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030203-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030203-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+void f(int);
+int do_layer3(int single)
+{
+ int stereo1;
+
+ if(single >= 0) /* stream is stereo, but force to mono */
+ stereo1 = 1;
+ else
+ stereo1 = 2;
+ f(single);
+
+ return stereo1;
+}
+
+extern void abort ();
+int main()
+{
+ if (do_layer3(-1) != 2)
+ abort ();
+ return 0;
+}
+
+void f(int i) {}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030209-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030209-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030209-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030209-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+/* { dg-require-stack-size "8*100*100" } */
+
+double x[100][100];
+int main ()
+{
+ int i;
+
+ i = 99;
+ x[i][0] = 42;
+ if (x[99][0] != 42)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030216-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030216-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030216-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030216-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+/* This test requires constant propagation of loads and stores to be
+ enabled. This is only guaranteed at -O2 and higher. Do not run
+ at -O1. */
+/* { dg-skip-if "requires higher optimization" { *-*-* } "-O1" "" } */
+
+void link_error (void);
+const double one=1.0;
+main ()
+{
+#ifdef __OPTIMIZE__
+ if ((int) one != 1)
+ link_error ();
+#endif
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030218-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030218-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030218-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030218-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* On H8, the predicate general_operand_src(op,mode) used to ignore
+ mode when op is a (mem (post_inc ...)). As a result, the pattern
+ for extendhisi2 was recognized as extendqisi2. */
+
+extern void abort ();
+extern void exit (int);
+
+short *q;
+
+long
+foo (short *p)
+{
+ long b = *p;
+ q = p + 1;
+ return b;
+}
+
+int
+main ()
+{
+ short a = 0xff00;
+ if (foo (&a) != (long) (short) 0xff00)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030221-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030221-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030221-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030221-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* PR optimization/8613 */
+/* Contributed by Glen Nakamura */
+
+extern void abort (void);
+
+int main (void)
+{
+ char buf[16] = "1234567890";
+ char *p = buf;
+
+ *p++ = (char) __builtin_strlen (buf);
+
+ if ((buf[0] != 10) || (p - buf != 1))
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030222-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030222-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030222-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030222-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* Verify that we get the low part of the long long as an int. We
+ used to get it wrong on big-endian machines, if register allocation
+ succeeded at all. We use volatile to make sure the long long is
+ actually truncated to int, in case a single register is wide enough
+ for a long long. */
+/* { dg-skip-if "asm would require extra shift-left-4-byte" { spu-*-* } } */
+/* { dg-skip-if "asm requires register allocation" { nvptx-*-* } } */
+#include <limits.h>
+
+void
+ll_to_int (long long x, volatile int *p)
+{
+ int i;
+ asm ("" : "=r" (i) : "0" (x));
+ *p = i;
+}
+
+int val = INT_MIN + 1;
+
+int main() {
+ volatile int i;
+
+ ll_to_int ((long long)val, &i);
+ if (i != val)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030224-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030224-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030224-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030224-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* Make sure that we don't free any temp stack slots associated with
+ initializing marker before we're finished with them. */
+
+extern void abort();
+
+typedef struct { short v16; } __attribute__((packed)) jint16_t;
+
+struct node {
+ jint16_t magic;
+ jint16_t nodetype;
+ int totlen;
+} __attribute__((packed));
+
+struct node node, *node_p = &node;
+
+int main()
+{
+ struct node marker = {
+ .magic = (jint16_t) {0x1985},
+ .nodetype = (jint16_t) {0x2003},
+ .totlen = node_p->totlen
+ };
+ if (marker.magic.v16 != 0x1985)
+ abort();
+ if (marker.nodetype.v16 != 0x2003)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030307-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030307-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030307-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030307-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+/* PR optimization/8726 */
+/* Originator: Paul Eggert <eggert at twinsun.com> */
+
+/* Verify that GCC doesn't miscompile tail calls on Sparc. */
+
+extern void abort(void);
+
+int fcntl_lock(int fd, int op, long long offset, long long count, int type);
+
+int vfswrap_lock(char *fsp, int fd, int op, long long offset, long long count, int type)
+{
+ return fcntl_lock(fd, op, offset, count, type);
+}
+
+int fcntl_lock(int fd, int op, long long offset, long long count, int type)
+{
+ return type;
+}
+
+int main(void)
+{
+ if (vfswrap_lock (0, 1, 2, 3, 4, 5) != 5)
+ abort();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030313-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030313-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030313-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030313-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,68 @@
+struct A
+{
+ unsigned long p, q, r, s;
+} x = { 13, 14, 15, 16 };
+
+extern void abort (void);
+extern void exit (int);
+
+static inline struct A *
+bar (void)
+{
+ struct A *r;
+
+ switch (8)
+ {
+ case 2:
+ abort ();
+ break;
+ case 8:
+ r = &x;
+ break;
+ default:
+ abort ();
+ break;
+ }
+ return r;
+}
+
+void
+foo (unsigned long *x, int y)
+{
+ if (y != 12)
+ abort ();
+ if (x[0] != 1 || x[1] != 11)
+ abort ();
+ if (x[2] != 2 || x[3] != 12)
+ abort ();
+ if (x[4] != 3 || x[5] != 13)
+ abort ();
+ if (x[6] != 4 || x[7] != 14)
+ abort ();
+ if (x[8] != 5 || x[9] != 15)
+ abort ();
+ if (x[10] != 6 || x[11] != 16)
+ abort ();
+}
+
+int
+main (void)
+{
+ unsigned long a[40];
+ int b = 0;
+
+ a[b++] = 1;
+ a[b++] = 11;
+ a[b++] = 2;
+ a[b++] = 12;
+ a[b++] = 3;
+ a[b++] = bar()->p;
+ a[b++] = 4;
+ a[b++] = bar()->q;
+ a[b++] = 5;
+ a[b++] = bar()->r;
+ a[b++] = 6;
+ a[b++] = bar()->s;
+ foo (a, b);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030316-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030316-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030316-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030316-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+/* PR target/9164 */
+/* The comparison operand was sign extended erraneously. */
+
+int
+main (void)
+{
+ long j = 0x40000000;
+ if ((unsigned int) (0x40000000 + j) < 0L)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030323-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030323-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030323-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030323-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,115 @@
+/* PR opt/10116 */
+/* { dg-require-effective-target return_address } */
+/* Removed tablejump while label still in use; this is really a link test. */
+
+void *NSReturnAddress(int offset)
+{
+ switch (offset) {
+ case 0: return __builtin_return_address(0 + 1);
+ case 1: return __builtin_return_address(1 + 1);
+ case 2: return __builtin_return_address(2 + 1);
+ case 3: return __builtin_return_address(3 + 1);
+ case 4: return __builtin_return_address(4 + 1);
+ case 5: return __builtin_return_address(5 + 1);
+ case 6: return __builtin_return_address(6 + 1);
+ case 7: return __builtin_return_address(7 + 1);
+ case 8: return __builtin_return_address(8 + 1);
+ case 9: return __builtin_return_address(9 + 1);
+ case 10: return __builtin_return_address(10 + 1);
+ case 11: return __builtin_return_address(11 + 1);
+ case 12: return __builtin_return_address(12 + 1);
+ case 13: return __builtin_return_address(13 + 1);
+ case 14: return __builtin_return_address(14 + 1);
+ case 15: return __builtin_return_address(15 + 1);
+ case 16: return __builtin_return_address(16 + 1);
+ case 17: return __builtin_return_address(17 + 1);
+ case 18: return __builtin_return_address(18 + 1);
+ case 19: return __builtin_return_address(19 + 1);
+ case 20: return __builtin_return_address(20 + 1);
+ case 21: return __builtin_return_address(21 + 1);
+ case 22: return __builtin_return_address(22 + 1);
+ case 23: return __builtin_return_address(23 + 1);
+ case 24: return __builtin_return_address(24 + 1);
+ case 25: return __builtin_return_address(25 + 1);
+ case 26: return __builtin_return_address(26 + 1);
+ case 27: return __builtin_return_address(27 + 1);
+ case 28: return __builtin_return_address(28 + 1);
+ case 29: return __builtin_return_address(29 + 1);
+ case 30: return __builtin_return_address(30 + 1);
+ case 31: return __builtin_return_address(31 + 1);
+ case 32: return __builtin_return_address(32 + 1);
+ case 33: return __builtin_return_address(33 + 1);
+ case 34: return __builtin_return_address(34 + 1);
+ case 35: return __builtin_return_address(35 + 1);
+ case 36: return __builtin_return_address(36 + 1);
+ case 37: return __builtin_return_address(37 + 1);
+ case 38: return __builtin_return_address(38 + 1);
+ case 39: return __builtin_return_address(39 + 1);
+ case 40: return __builtin_return_address(40 + 1);
+ case 41: return __builtin_return_address(41 + 1);
+ case 42: return __builtin_return_address(42 + 1);
+ case 43: return __builtin_return_address(43 + 1);
+ case 44: return __builtin_return_address(44 + 1);
+ case 45: return __builtin_return_address(45 + 1);
+ case 46: return __builtin_return_address(46 + 1);
+ case 47: return __builtin_return_address(47 + 1);
+ case 48: return __builtin_return_address(48 + 1);
+ case 49: return __builtin_return_address(49 + 1);
+ case 50: return __builtin_return_address(50 + 1);
+ case 51: return __builtin_return_address(51 + 1);
+ case 52: return __builtin_return_address(52 + 1);
+ case 53: return __builtin_return_address(53 + 1);
+ case 54: return __builtin_return_address(54 + 1);
+ case 55: return __builtin_return_address(55 + 1);
+ case 56: return __builtin_return_address(56 + 1);
+ case 57: return __builtin_return_address(57 + 1);
+ case 58: return __builtin_return_address(58 + 1);
+ case 59: return __builtin_return_address(59 + 1);
+ case 60: return __builtin_return_address(60 + 1);
+ case 61: return __builtin_return_address(61 + 1);
+ case 62: return __builtin_return_address(62 + 1);
+ case 63: return __builtin_return_address(63 + 1);
+ case 64: return __builtin_return_address(64 + 1);
+ case 65: return __builtin_return_address(65 + 1);
+ case 66: return __builtin_return_address(66 + 1);
+ case 67: return __builtin_return_address(67 + 1);
+ case 68: return __builtin_return_address(68 + 1);
+ case 69: return __builtin_return_address(69 + 1);
+ case 70: return __builtin_return_address(70 + 1);
+ case 71: return __builtin_return_address(71 + 1);
+ case 72: return __builtin_return_address(72 + 1);
+ case 73: return __builtin_return_address(73 + 1);
+ case 74: return __builtin_return_address(74 + 1);
+ case 75: return __builtin_return_address(75 + 1);
+ case 76: return __builtin_return_address(76 + 1);
+ case 77: return __builtin_return_address(77 + 1);
+ case 78: return __builtin_return_address(78 + 1);
+ case 79: return __builtin_return_address(79 + 1);
+ case 80: return __builtin_return_address(80 + 1);
+ case 81: return __builtin_return_address(81 + 1);
+ case 82: return __builtin_return_address(82 + 1);
+ case 83: return __builtin_return_address(83 + 1);
+ case 84: return __builtin_return_address(84 + 1);
+ case 85: return __builtin_return_address(85 + 1);
+ case 86: return __builtin_return_address(86 + 1);
+ case 87: return __builtin_return_address(87 + 1);
+ case 88: return __builtin_return_address(88 + 1);
+ case 89: return __builtin_return_address(89 + 1);
+ case 90: return __builtin_return_address(90 + 1);
+ case 91: return __builtin_return_address(91 + 1);
+ case 92: return __builtin_return_address(92 + 1);
+ case 93: return __builtin_return_address(93 + 1);
+ case 94: return __builtin_return_address(94 + 1);
+ case 95: return __builtin_return_address(95 + 1);
+ case 96: return __builtin_return_address(96 + 1);
+ case 97: return __builtin_return_address(97 + 1);
+ case 98: return __builtin_return_address(98 + 1);
+ case 99: return __builtin_return_address(99 + 1);
+ }
+ return 0;
+}
+
+int main()
+{
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030330-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030330-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030330-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030330-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+/* PR opt/10011 */
+/* This is link test for builtin_constant_p simplification + DCE. */
+
+extern void link_error(void);
+static void usb_hub_port_wait_reset(unsigned int delay)
+{
+ int delay_time;
+ for (delay_time = 0; delay_time < 500; delay_time += delay) {
+ if (__builtin_constant_p(delay))
+ link_error();
+ }
+}
+
+int main() { return 0; }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030401-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030401-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030401-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030401-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+/* Testcase for PR fortran/9974. This was a miscompilation of the g77
+ front-end caused by the jump bypassing optimizations not handling
+ instructions inserted on CFG edges. */
+
+extern void abort ();
+
+int bar ()
+{
+ return 1;
+}
+
+void foo (int x)
+{
+ unsigned char error = 0;
+
+ if (! (error = ((x == 0) || bar ())))
+ bar ();
+ if (! error)
+ abort ();
+}
+
+int main()
+{
+ foo (1);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030403-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030403-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030403-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030403-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+/* The non-destructive folder was always emitting >= when folding
+ comparisons to signed_max+1. */
+
+#include <limits.h>
+
+int
+main ()
+{
+ unsigned long count = 8;
+
+ if (count > INT_MAX)
+ abort ();
+
+ return (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030404-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030404-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030404-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030404-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* This exposed a bug in tree-ssa-ccp.c. Since 'j' and 'i' are never
+ defined, CCP was not traversing the edges out of the if(), which caused
+ the PHI node for 'k' at the top of the while to only be visited once.
+ This ended up causing CCP to think that 'k' was the constant '1'. */
+main()
+{
+ int i, j, k;
+
+ k = 0;
+ while (k < 10)
+ {
+ k++;
+ if (j > i)
+ j = 5;
+ else
+ j =3;
+ }
+
+ if (k != 10)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030408-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030408-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030408-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030408-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+/* PR optimization/8634 */
+/* Contributed by Glen Nakamura <glen at imodulo dot com> */
+
+extern void abort (void);
+
+struct foo {
+ char a, b, c, d, e, f, g, h, i, j;
+};
+
+int test1 ()
+{
+ const char X[8] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' };
+ char buffer[8];
+ __builtin_memcpy (buffer, X, 8);
+ if (buffer[0] != 'A' || buffer[1] != 'B'
+ || buffer[2] != 'C' || buffer[3] != 'D'
+ || buffer[4] != 'E' || buffer[5] != 'F'
+ || buffer[6] != 'G' || buffer[7] != 'H')
+ abort ();
+ return 0;
+}
+
+int test2 ()
+{
+ const char X[10] = { 'A', 'B', 'C', 'D', 'E' };
+ char buffer[10];
+ __builtin_memcpy (buffer, X, 10);
+ if (buffer[0] != 'A' || buffer[1] != 'B'
+ || buffer[2] != 'C' || buffer[3] != 'D'
+ || buffer[4] != 'E' || buffer[5] != '\0'
+ || buffer[6] != '\0' || buffer[7] != '\0'
+ || buffer[8] != '\0' || buffer[9] != '\0')
+ abort ();
+ return 0;
+}
+
+int test3 ()
+{
+ const struct foo X = { a : 'A', c : 'C', e : 'E', g : 'G', i : 'I' };
+ char buffer[10];
+ __builtin_memcpy (buffer, &X, 10);
+ if (buffer[0] != 'A' || buffer[1] != '\0'
+ || buffer[2] != 'C' || buffer[3] != '\0'
+ || buffer[4] != 'E' || buffer[5] != '\0'
+ || buffer[6] != 'G' || buffer[7] != '\0'
+ || buffer[8] != 'I' || buffer[9] != '\0')
+ abort ();
+ return 0;
+}
+
+int test4 ()
+{
+ const struct foo X = { .b = 'B', .d = 'D', .f = 'F', .h = 'H' , .j = 'J' };
+ char buffer[10];
+ __builtin_memcpy (buffer, &X, 10);
+ if (buffer[0] != '\0' || buffer[1] != 'B'
+ || buffer[2] != '\0' || buffer[3] != 'D'
+ || buffer[4] != '\0' || buffer[5] != 'F'
+ || buffer[6] != '\0' || buffer[7] != 'H'
+ || buffer[8] != '\0' || buffer[9] != 'J')
+ abort ();
+ return 0;
+}
+
+int main ()
+{
+ test1 (); test2 (); test3 (); test4 ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030501-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030501-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030501-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030501-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+int
+main (int argc, char **argv)
+{
+ int size = 10;
+
+ {
+ int retframe_block()
+ {
+ return size + 5;
+ }
+
+ if (retframe_block() != 15)
+ abort ();
+ exit (0);
+
+ }
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030606-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030606-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030606-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030606-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+
+int * foo (int *x, int b)
+{
+
+ *(x++) = 55;
+ if (b)
+ *(x++) = b;
+
+ return x;
+}
+
+main()
+{
+ int a[5];
+
+ memset (a, 1, sizeof (a));
+
+ if (foo(a, 0) - a != 1 || a[0] != 55 || a[1] != a[4])
+ abort();
+
+ memset (a, 1, sizeof (a));
+
+ if (foo(a, 2) - a != 2 || a[0] != 55 || a[1] != 2)
+ abort();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030613-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030613-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030613-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030613-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,62 @@
+/* PR optimization/10955 */
+/* Originator: <heinrich.brand at fujitsu-siemens.com> */
+
+/* This used to fail on SPARC32 at -O3 because the loop unroller
+ wrongly thought it could eliminate a pseudo in a loop, while
+ the pseudo was used outside the loop. */
+
+extern void abort(void);
+
+#define COMPLEX struct CS
+
+COMPLEX {
+ long x;
+ long y;
+};
+
+
+static COMPLEX CCID (COMPLEX x)
+{
+ COMPLEX a;
+
+ a.x = x.x;
+ a.y = x.y;
+
+ return a;
+}
+
+
+static COMPLEX CPOW (COMPLEX x, int y)
+{
+ COMPLEX a;
+ a = x;
+
+ while (--y > 0)
+ a=CCID(a);
+
+ return a;
+}
+
+
+static int c5p (COMPLEX x)
+{
+ COMPLEX a,b;
+ a = CPOW (x, 2);
+ b = CCID( CPOW(a,2) );
+
+ return (b.x == b.y);
+}
+
+
+int main (void)
+{
+ COMPLEX x;
+
+ x.x = -7;
+ x.y = -7;
+
+ if (!c5p(x))
+ abort();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+char buf[10];
+
+extern void abort (void);
+extern int sprintf (char*, const char*, ...);
+
+int main()
+{
+ int l = sprintf (buf, "foo\0bar");
+ if (l != 3)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030626-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+char buf[40];
+
+extern int sprintf (char*, const char*, ...);
+extern void abort (void);
+
+int main()
+{
+ int i = 0;
+ int l = sprintf (buf, "%s", i++ ? "string" : "other string");
+ if (l != sizeof ("other string") - 1 || i != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030714-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030714-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030714-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030714-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,193 @@
+/* derived from PR optimization/11440 */
+
+extern void abort (void);
+extern void exit (int);
+
+typedef _Bool bool;
+const bool false = 0;
+const bool true = 1;
+
+enum EPosition
+{
+ STATIC, RELATIVE, ABSOLUTE, FIXED
+};
+typedef enum EPosition EPosition;
+
+enum EFloat
+{
+ FNONE = 0, FLEFT, FRIGHT
+};
+typedef enum EFloat EFloat;
+
+struct RenderBox
+{
+ int unused[6];
+ short m_verticalPosition;
+
+ bool m_layouted : 1;
+ bool m_unused : 1;
+ bool m_minMaxKnown : 1;
+ bool m_floating : 1;
+
+ bool m_positioned : 1;
+ bool m_overhangingContents : 1;
+ bool m_relPositioned : 1;
+ bool m_paintSpecial : 1;
+
+ bool m_isAnonymous : 1;
+ bool m_recalcMinMax : 1;
+ bool m_isText : 1;
+ bool m_inline : 1;
+
+ bool m_replaced : 1;
+ bool m_mouseInside : 1;
+ bool m_hasFirstLine : 1;
+ bool m_isSelectionBorder : 1;
+
+ bool (*isTableCell) (struct RenderBox *this);
+};
+
+typedef struct RenderBox RenderBox;
+
+struct RenderStyle
+{
+ struct NonInheritedFlags
+ {
+ union
+ {
+ struct
+ {
+ unsigned int _display : 4;
+ unsigned int _bg_repeat : 2;
+ bool _bg_attachment : 1;
+ unsigned int _overflow : 4 ;
+ unsigned int _vertical_align : 4;
+ unsigned int _clear : 2;
+ EPosition _position : 2;
+ EFloat _floating : 2;
+ unsigned int _table_layout : 1;
+ bool _flowAroundFloats :1;
+
+ unsigned int _styleType : 3;
+ bool _hasHover : 1;
+ bool _hasActive : 1;
+ bool _clipSpecified : 1;
+ unsigned int _unicodeBidi : 2;
+ int _unused : 1;
+ } f;
+ int _niflags;
+ };
+ } noninherited_flags;
+};
+
+typedef struct RenderStyle RenderStyle;
+
+extern void RenderObject_setStyle(RenderBox *this, RenderStyle *_style);
+extern void removeFromSpecialObjects(RenderBox *this);
+
+
+
+void RenderBox_setStyle(RenderBox *thisin, RenderStyle *_style)
+{
+ RenderBox *this = thisin;
+ bool oldpos, tmp;
+ EPosition tmppo;
+
+ tmp = this->m_positioned;
+
+ oldpos = tmp;
+
+ RenderObject_setStyle(this, _style);
+
+ tmppo = _style->noninherited_flags.f._position;
+
+ switch(tmppo)
+ {
+ case ABSOLUTE:
+ case FIXED:
+ {
+ bool ltrue = true;
+ this->m_positioned = ltrue;
+ break;
+ }
+
+ default:
+ {
+ EFloat tmpf;
+ EPosition tmpp;
+ if (oldpos)
+ {
+ bool ltrue = true;
+ this->m_positioned = ltrue;
+ removeFromSpecialObjects(this);
+ }
+ {
+ bool lfalse = false;
+ this->m_positioned = lfalse;
+ }
+
+ tmpf = _style->noninherited_flags.f._floating;
+
+ if(!this->isTableCell (this) && !(tmpf == FNONE))
+ {
+ bool ltrue = true;
+ this->m_floating = ltrue;
+ }
+ else
+ {
+ tmpp = _style->noninherited_flags.f._position;
+ if (tmpp == RELATIVE)
+ {
+ bool ltrue = true;
+ this->m_relPositioned = ltrue;
+ }
+ }
+ }
+ }
+}
+
+
+
+
+RenderBox g_this;
+RenderStyle g__style;
+
+void RenderObject_setStyle(RenderBox *this, RenderStyle *_style)
+{
+ (void) this;
+ (void) _style;
+}
+
+void removeFromSpecialObjects(RenderBox *this)
+{
+ (void) this;
+}
+
+bool RenderBox_isTableCell (RenderBox *this)
+{
+ (void) this;
+ return false;
+}
+
+int main (void)
+{
+
+ g_this.m_relPositioned = false;
+ g_this.m_positioned = false;
+ g_this.m_floating = false;
+ g_this.isTableCell = RenderBox_isTableCell;
+
+ g__style.noninherited_flags.f._position = FIXED;
+ g__style.noninherited_flags.f._floating = FNONE;
+
+ RenderBox_setStyle (&g_this, &g__style);
+
+ if (g_this.m_positioned != true)
+ abort ();
+ if (g_this.m_relPositioned != false)
+ abort ();
+ if (g_this.m_floating != false)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030715-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030715-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030715-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030715-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* PR optimization/11320 */
+/* Origin: Andreas Schwab <schwab at suse.de> */
+
+/* Verify that the scheduler correctly computes the dependencies
+ in the presence of conditional instructions. */
+
+int strcmp (const char *, const char *);
+int ap_standalone;
+
+const char *ap_check_cmd_context (void *a, int b)
+{
+ return 0;
+}
+
+const char *server_type (void *a, void *b, char *arg)
+{
+ const char *err = ap_check_cmd_context (a, 0x01|0x02|0x04|0x08|0x10);
+ if (err)
+ return err;
+
+ if (!strcmp (arg, "inetd"))
+ ap_standalone = 0;
+ else if (!strcmp (arg, "standalone"))
+ ap_standalone = 1;
+ else
+ return "ServerType must be either 'inetd' or 'standalone'";
+
+ return 0;
+}
+
+int main ()
+{
+ server_type (0, 0, "standalone");
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030717-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030717-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030717-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030717-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+/* PR target/11087
+ This testcase was miscompiled on ppc64, because basic_induction_var called
+ convert_modes, yet did not expect it to emit any new instructions.
+ Those were emitted at the end of the function and destroyed during life
+ analysis, while the program used uninitialized pseudos created by
+ convert_modes. */
+
+struct A
+{
+ unsigned short a1;
+ unsigned long a2;
+};
+
+struct B
+{
+ int b1, b2, b3, b4, b5;
+};
+
+struct C
+{
+ struct B c1[1];
+ int c2, c3;
+};
+
+static
+int foo (int x)
+{
+ return x < 0 ? -x : x;
+}
+
+int bar (struct C *x, struct A *y)
+{
+ int a = x->c3;
+ const int b = y->a1 >> 9;
+ const unsigned long c = y->a2;
+ int d = a;
+ unsigned long e, f;
+
+ f = foo (c - x->c1[d].b4);
+ do
+ {
+ if (d <= 0)
+ d = x->c2;
+ d--;
+
+ e = foo (c-x->c1[d].b4);
+ if (e < f)
+ a = d;
+ }
+ while (d != x->c3);
+ x->c1[a].b4 = c + b;
+ return a;
+}
+
+int
+main ()
+{
+ struct A a;
+ struct C b;
+ int c;
+
+ a.a1 = 512;
+ a.a2 = 4242;
+ __builtin_memset (&b, 0, sizeof (b));
+ b.c1[0].b3 = 424242;
+ b.c2 = 1;
+ c = bar (&b, &a);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030718-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030718-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030718-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030718-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+/* PR c/10320
+ The function temp was not being emitted in a prerelease of 3.4 20030406.
+ Contributed by pinskia at physics.uc.edu */
+
+static inline void temp();
+int main()
+{
+ temp();
+ return 0;
+}
+static void temp(){}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030811-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030811-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030811-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030811-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+/* Origin: PR target/11535 from H. J. Lu <hjl at lucon.org> */
+/* { dg-require-effective-target return_address } */
+
+void vararg (int i, ...)
+{
+ (void) i;
+}
+
+int i0[0], i1;
+
+void test1 (void)
+{
+ int a = (int) (long long) __builtin_return_address (0);
+ vararg (0, a);
+}
+
+void test2 (void)
+{
+ i0[0] = (int) (long long) __builtin_return_address (0);
+}
+
+void test3 (void)
+{
+ i1 = (int) (long long) __builtin_return_address (0);
+}
+
+void test4 (void)
+{
+ volatile long long a = (long long) __builtin_return_address (0);
+ i0[0] = (int) a;
+}
+
+int main (void)
+{
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030821-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030821-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030821-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030821-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+extern void abort (void);
+
+int
+foo (int x)
+{
+ if ((int) (x & 0x80ffffff) != (int) (0x8000fffe))
+ abort ();
+
+ return 0;
+}
+
+int
+main ()
+{
+ return foo (0x8000fffe);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+const int *p;
+
+int bar (void)
+{
+ return *p + 1;
+}
+
+main ()
+{
+ /* Variable 'i' is never used but it's aliased to a global pointer. The
+ alias analyzer was not considering that 'i' may be used in the call to
+ bar(). */
+ const int i = 5;
+ p = &i;
+ if (bar() != 6)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030828-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+struct rtx_def
+{
+ int code;
+};
+
+main()
+{
+ int tmp[2];
+ struct rtx_def *r, s;
+ int *p, *q;
+
+ /* The alias analyzer was creating the same memory tag for r, p and q
+ because 'struct rtx_def *' is type-compatible with 'int *'. However,
+ the alias set of 'int[2]' is not the same as 'int *', so variable
+ 'tmp' was deemed not aliased with anything. */
+ r = &s;
+ r->code = 39;
+
+ /* If 'r' wasn't declared, then q and tmp would have had the same memory
+ tag. */
+ p = tmp;
+ q = p + 1;
+ *q = 0;
+ tmp[1] = 39;
+ if (*q != 39)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030903-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030903-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030903-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030903-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* Test that we don't let stmt.c think that the enumeration's values are
+ the entire set of possibilities. Such an assumption is false for C,
+ but true for other languages. */
+
+enum X { X1 = 1, X2, X3, X4 };
+static volatile enum X test = 0;
+static void y(int);
+
+int main()
+{
+ switch (test)
+ {
+ case X1: y(1); break;
+ case X2: y(2); break;
+ case X3: y(3); break;
+ case X4: y(4); break;
+ }
+ return 0;
+}
+
+static void y(int x) { abort (); }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030909-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030909-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030909-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030909-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+void abort ();
+void exit (int);
+
+void test(int x, int y)
+{
+ if (x == y)
+ abort ();
+}
+
+void foo(int x, int y)
+{
+ if (x == y)
+ goto a;
+ else
+ {
+a:;
+ if (x == y)
+ goto b;
+ else
+ {
+b:;
+ if (x != y)
+ test (x, y);
+ }
+ }
+}
+
+int main(void)
+{
+ foo (0, 0);
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030910-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030910-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030910-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030910-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+/* The gimplifier was inserting unwanted temporaries for REALPART_EXPR
+ nodes. These need to be treated like a COMPONENT_REF so their address can
+ be taken. */
+
+int main()
+{
+ __complex double dc;
+ double *dp = &(__real dc);
+ *dp = 3.14;
+ if ((__real dc) != 3.14) abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030913-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030913-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030913-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030913-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+/* Assignments via pointers pointing to global variables were being killed
+ by SSA-DCE. Test contributed by Paul Brook <paul at nowt.org> */
+
+int glob;
+
+void
+fn2(int ** q)
+{
+ *q = &glob;
+}
+
+void test()
+{
+ int *p;
+
+ fn2(&p);
+
+ *p=42;
+}
+
+int main()
+{
+ test();
+ if (glob != 42) abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+/* On IRIX 6, PB is passed partially in registers and partially on the
+ stack, with an odd number of words in the register part. Check that
+ the long double stack argument (PC) is still accessed properly. */
+
+struct s { int val[16]; };
+
+long double f (int pa, struct s pb, long double pc)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ pc += pb.val[i];
+ return pc;
+}
+
+int main ()
+{
+ struct s x;
+ int i;
+
+ for (i = 0; i < 16; i++)
+ x.val[i] = i + 1;
+ if (f (1, x, 10000.0L) != 10136.0L)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030914-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* On IRIX 6, PA is passed partially in registers and partially on the
+ stack. We therefore have two potential uses of pretend_args_size:
+ one for the partial argument and one for the varargs save area.
+ Make sure that these uses don't conflict. */
+
+struct s { int i[18]; };
+
+int f (struct s pa, int pb, ...)
+{
+ return pb;
+}
+
+struct s gs;
+
+int main ()
+{
+ if (f (gs, 0x1234) != 0x1234)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030916-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030916-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030916-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030916-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* "i" overflows in f(). Check that x[i] is not treated as a giv. */
+#include <limits.h>
+
+#if CHAR_BIT == 8
+
+void f (unsigned int *x)
+{
+ unsigned char i;
+ int j;
+
+ i = 0x10;
+ for (j = 0; j < 0x10; j++)
+ {
+ i += 0xe8;
+ x[i] = 0;
+ i -= 0xe7;
+ }
+}
+
+int main ()
+{
+ unsigned int x[256];
+ int i;
+
+ for (i = 0; i < 256; i++)
+ x[i] = 1;
+ f (x);
+ for (i = 0; i < 256; i++)
+ if (x[i] != (i >= 0x08 && i < 0xf8))
+ abort ();
+ exit (0);
+}
+#else
+int main () { exit (0); }
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030920-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030920-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030920-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030920-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+extern void abort (void);
+
+int main()
+{
+ int hicount = 0;
+ unsigned char *c;
+ char *str = "\x7f\xff";
+ for (c = (unsigned char *)str; *c ; c++) {
+ if (!(((unsigned int)(*c)) < 0x80)) hicount++;
+ }
+ if (hicount != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030928-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030928-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030928-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20030928-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+#include <limits.h>
+
+#if INT_MAX <= 32767
+int main () { exit (0); }
+#else
+void get_addrs (const char**x, int *y)
+{
+ x[0] = "a1111" + (y[0] - 0x10000) * 2;
+ x[1] = "a1112" + (y[1] - 0x20000) * 2;
+ x[2] = "a1113" + (y[2] - 0x30000) * 2;
+ x[3] = "a1114" + (y[3] - 0x40000) * 2;
+ x[4] = "a1115" + (y[4] - 0x50000) * 2;
+ x[5] = "a1116" + (y[5] - 0x60000) * 2;
+ x[6] = "a1117" + (y[6] - 0x70000) * 2;
+ x[7] = "a1118" + (y[7] - 0x80000) * 2;
+}
+
+int main ()
+{
+ const char *x[8];
+ int y[8];
+ int i;
+
+ for (i = 0; i < 8; i++)
+ y[i] = 0x10000 * (i + 1);
+ get_addrs (x, y);
+ for (i = 0; i < 8; i++)
+ if (*x[i] != 'a')
+ abort ();
+ exit (0);
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031003-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031003-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031003-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031003-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* PR optimization/9325 */
+
+#include <limits.h>
+
+extern void abort (void);
+
+int f1()
+{
+ return (int)2147483648.0f;
+}
+
+int f2()
+{
+ return (int)(float)(2147483647);
+}
+
+int main()
+{
+#if INT_MAX == 2147483647
+ if (f1() != 2147483647)
+ abort ();
+#ifdef __SPU__
+ /* SPU float rounds towards zero. */
+ if (f2() != 0x7fffff80)
+ abort ();
+#else
+ if (f2() != 2147483647)
+ abort ();
+#endif
+#endif
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031010-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031010-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031010-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031010-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+/* A reminder to process ops in generate_expr_as_of_bb exactly once. */
+
+long __attribute__((noinline))
+foo (long ct, long cf, _Bool p1, _Bool p2, _Bool p3)
+{
+ long diff;
+
+ diff = ct - cf;
+
+ if (p1)
+ {
+ if (p2)
+ {
+ if (p3)
+ {
+ long tmp = ct;
+ ct = cf;
+ cf = tmp;
+ }
+ diff = ct - cf;
+ }
+
+ return diff;
+ }
+
+ abort ();
+}
+
+int main ()
+{
+ if (foo(2, 3, 1, 1, 1) == 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031011-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031011-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031011-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031011-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* Check that MAX_EXPR and MIN_EXPR are working properly. */
+
+#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
+#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
+
+extern void abort (void);
+
+int main()
+{
+ int ll_bitsize, ll_bitpos;
+ int rl_bitsize, rl_bitpos;
+ int end_bit;
+
+ ll_bitpos = 32; ll_bitsize = 32;
+ rl_bitpos = 0; rl_bitsize = 32;
+
+ end_bit = MAX (ll_bitpos + ll_bitsize, rl_bitpos + rl_bitsize);
+ if (end_bit != 64)
+ abort ();
+ end_bit = MAX (rl_bitpos + rl_bitsize, ll_bitpos + ll_bitsize);
+ if (end_bit != 64)
+ abort ();
+ end_bit = MIN (ll_bitpos + ll_bitsize, rl_bitpos + rl_bitsize);
+ if (end_bit != 32)
+ abort ();
+ end_bit = MIN (rl_bitpos + rl_bitsize, ll_bitpos + ll_bitsize);
+ if (end_bit != 32)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031012-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031012-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031012-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031012-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+/* { dg-add-options stack_size } */
+
+/* PR optimization/8750
+ Used to fail under Cygwin with
+ -O2 -fomit-frame-pointer
+ Testcase by David B. Trout */
+
+#if defined(STACK_SIZE) && STACK_SIZE < 16000
+#define ARRAY_SIZE (STACK_SIZE / 2)
+#define STRLEN (ARRAY_SIZE - 9)
+#else
+#define ARRAY_SIZE 15000
+#define STRLEN 13371
+#endif
+
+extern void *memset (void *, int, __SIZE_TYPE__);
+extern void abort (void);
+
+static void foo ()
+{
+ char a[ARRAY_SIZE];
+
+ a[0]=0;
+ memset( &a[0], 0xCD, STRLEN );
+ a[STRLEN]=0;
+ if (strlen(a) != STRLEN)
+ abort ();
+}
+
+int main ( int argc, char* argv[] )
+{
+ foo();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031020-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031020-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031020-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031020-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* PR target/12654
+ The Alpha backend tried to do a >= 1024 as (a - 1024) >= 0, which fails
+ for very large negative values. */
+/* Origin: tg at swox.com */
+
+#include <limits.h>
+
+extern void abort (void);
+
+void __attribute__((noinline))
+foo (long x)
+{
+ if (x >= 1024)
+ abort ();
+}
+
+int
+main ()
+{
+ foo (LONG_MIN);
+ foo (LONG_MIN + 10000);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031201-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031201-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031201-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031201-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,76 @@
+/* Copyright (C) 2003 Free Software Foundation.
+ PR target/13256
+ STRICT_LOW_PART was handled incorrectly in delay slots.
+ Origin: Hans-Peter Nilsson. */
+
+typedef struct { unsigned int e0 : 16; unsigned int e1 : 16; } s1;
+typedef struct { unsigned int e0 : 16; unsigned int e1 : 16; } s2;
+typedef struct { s1 i12; s2 i16; } io;
+static int test_length = 2;
+static io *i;
+static int m = 1;
+static int d = 1;
+static unsigned long test_t0;
+static unsigned long test_t1;
+void test(void) __attribute__ ((__noinline__));
+extern int f1 (void *port) __attribute__ ((__noinline__));
+extern void f0 (void) __attribute__ ((__noinline__));
+int
+f1 (void *port)
+{
+ int fail_count = 0;
+ unsigned long tlen;
+ s1 x0 = {0};
+ s2 x1 = {0};
+
+ i = port;
+ x0.e0 = x1.e0 = 32;
+ i->i12 = x0;
+ i->i16 = x1;
+ do f0(); while (test_t1);
+ x0.e0 = x1.e0 = 8;
+ i->i12 = x0;
+ i->i16 = x1;
+ test ();
+ if (m)
+ {
+ unsigned long e = 1000000000 / 460800 * test_length;
+ tlen = test_t1 - test_t0;
+ if (((tlen-e) & 0x7FFFFFFF) > 1000)
+ f0();
+ }
+ if (d)
+ {
+ unsigned long e = 1000000000 / 460800 * test_length;
+ tlen = test_t1 - test_t0;
+ if (((tlen - e) & 0x7FFFFFFF) > 1000)
+ f0();
+ }
+ return fail_count != 0 ? 1 : 0;
+}
+
+int
+main ()
+{
+ io io0;
+ f1 (&io0);
+ abort ();
+}
+
+void
+test (void)
+{
+ io *iop = i;
+ if (iop->i12.e0 != 8 || iop->i16.e0 != 8)
+ abort ();
+ exit (0);
+}
+
+void
+f0 (void)
+{
+ static int washere = 0;
+ io *iop = i;
+ if (washere++ || iop->i12.e0 != 32 || iop->i16.e0 != 32)
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031204-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031204-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031204-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031204-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,49 @@
+/* PR optimization/13260 */
+
+#include <string.h>
+
+typedef unsigned long u32;
+
+u32 in_aton(const char* x)
+{
+ return 0x0a0b0c0d;
+}
+
+u32 root_nfs_parse_addr(char *name)
+{
+ u32 addr;
+ int octets = 0;
+ char *cp, *cq;
+
+ cp = cq = name;
+ while (octets < 4) {
+ while (*cp >= '0' && *cp <= '9')
+ cp++;
+ if (cp == cq || cp - cq > 3)
+ break;
+ if (*cp == '.' || octets == 3)
+ octets++;
+ if (octets < 4)
+ cp++;
+ cq = cp;
+ }
+
+ if (octets == 4 && (*cp == ':' || *cp == '\0')) {
+ if (*cp == ':')
+ *cp++ = '\0';
+ addr = in_aton(name);
+ strcpy(name, cp);
+ } else
+ addr = (-1);
+
+ return addr;
+}
+
+int
+main()
+{
+ static char addr[] = "10.11.12.13:/hello";
+ u32 result = root_nfs_parse_addr(addr);
+ if (result != 0x0a0b0c0d) { abort(); }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+struct a { unsigned int bitfield : 1; };
+
+unsigned int x;
+
+main()
+{
+ struct a a = {0};
+ x = 0xbeef;
+ a.bitfield |= x;
+ if (a.bitfield != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031211-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+struct a
+{
+ unsigned int bitfield : 3;
+};
+
+int main()
+{
+ struct a a;
+
+ a.bitfield = 131;
+ foo (a.bitfield);
+ exit (0);
+}
+
+foo(unsigned int z)
+{
+ if (z != 3)
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031214-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031214-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031214-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031214-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* PR optimization/10312 */
+/* Originator: Peter van Hoof <p dot van-hoof at qub dot ac dot uk> */
+
+/* Verify that the strength reduction pass doesn't find
+ illegitimate givs. */
+
+struct
+{
+ double a;
+ int n[2];
+} g = { 0., { 1, 2}};
+
+int k = 0;
+
+void
+b (int *j)
+{
+}
+
+int
+main ()
+{
+ int j;
+
+ for (j = 0; j < 2; j++)
+ k = (k > g.n[j]) ? k : g.n[j];
+
+ k++;
+ b (&j);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031215-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031215-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031215-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031215-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* PR middle-end/13400 */
+/* The following test used to fail at run-time with a write to read-only
+ memory, caused by if-conversion converting a conditional write into an
+ unconditional write. */
+
+typedef struct {int c, l; char ch[3];} pstr;
+const pstr ao = {2, 2, "OK"};
+const pstr * const a = &ao;
+
+void test1(void)
+{
+ if (a->ch[a->l]) {
+ ((char *)a->ch)[a->l] = 0;
+ }
+}
+
+void test2(void)
+{
+ if (a->ch[a->l]) {
+ ((char *)a->ch)[a->l] = -1;
+ }
+}
+
+void test3(void)
+{
+ if (a->ch[a->l]) {
+ ((char *)a->ch)[a->l] = 1;
+ }
+}
+
+int main(void)
+{
+ test1();
+ test2();
+ test3();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031216-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031216-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031216-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20031216-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* PR optimization/13313 */
+/* Origin: Mike Lerwill <mike at ml-solutions.co.uk> */
+
+extern void abort(void);
+
+void DisplayNumber (unsigned long v)
+{
+ if (v != 0x9aL)
+ abort();
+}
+
+unsigned long ReadNumber (void)
+{
+ return 0x009a0000L;
+}
+
+int main (void)
+{
+ unsigned long tmp;
+ tmp = (ReadNumber() & 0x00ff0000L) >> 16;
+ DisplayNumber (tmp);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040208-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040208-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040208-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040208-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+int main ()
+{
+ long double x;
+
+ x = 0x1.0p-500L;
+ x *= 0x1.0p-522L;
+ if (x != 0x1.0p-1022L)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040218-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040218-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040218-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040218-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* PR target/14209. Bug in cris.md, shrinking access size of
+ postincrement.
+ Origin: <hp at axis.com>. */
+
+long int xb (long int *y) __attribute__ ((__noinline__));
+long int xw (long int *y) __attribute__ ((__noinline__));
+short int yb (short int *y) __attribute__ ((__noinline__));
+
+long int xb (long int *y)
+{
+ long int xx = *y & 255;
+ return xx + y[1];
+}
+
+long int xw (long int *y)
+{
+ long int xx = *y & 65535;
+ return xx + y[1];
+}
+
+short int yb (short int *y)
+{
+ short int xx = *y & 255;
+ return xx + y[1];
+}
+
+int main (void)
+{
+ long int y[] = {-1, 16000};
+ short int yw[] = {-1, 16000};
+
+ if (xb (y) != 16255
+ || xw (y) != 81535
+ || yb (yw) != 16255)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040223-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040223-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040223-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040223-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* { dg-require-effective-target alloca } */
+#include <string.h>
+#include <stdio.h>
+
+void
+a(void *x,int y)
+{
+ if (y != 1234)
+ abort ();
+}
+
+int
+main()
+{
+ a(strcpy(alloca(100),"abc"),1234);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040302-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040302-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040302-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040302-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* { dg-require-effective-target label_values } */
+int code[]={0,0,0,0,1};
+
+void foo(int x) {
+ volatile int b;
+ b = 0xffffffff;
+}
+
+void bar(int *pc) {
+ static const void *l[] = {&&lab0, &&end};
+
+ foo(0);
+ goto *l[*pc];
+ lab0:
+ foo(0);
+ pc++;
+ goto *l[*pc];
+ end:
+ return;
+}
+
+int main() {
+ bar(code);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040307-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040307-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040307-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040307-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+int main()
+{
+ int b = 0;
+
+ struct {
+ unsigned int bit0:1;
+ unsigned int bit1:1;
+ unsigned int bit2:1;
+ unsigned int bit3:1;
+ unsigned int bit4:1;
+ unsigned int bit5:1;
+ unsigned int bit6:1;
+ unsigned int bit7:1;
+ } sdata = {0x01};
+
+ while ( sdata.bit0-- > 0 ) {
+ b++ ;
+ if ( b > 100 ) break;
+ }
+
+ if (b != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040308-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040308-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040308-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040308-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* { dg-require-effective-target alloca } */
+/* This used to fail on SPARC with an unaligned memory access. */
+
+void foo(int n)
+{
+ struct S {
+ int i[n];
+ unsigned int b:1;
+ int i2;
+ } __attribute__ ((packed)) __attribute__ ((aligned (4)));
+
+ struct S s;
+
+ s.i2 = 0;
+}
+
+int main(void)
+{
+ foo(4);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040309-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040309-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040309-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040309-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+extern void abort ();
+
+int foo(unsigned short x)
+{
+ unsigned short y;
+ y = x > 32767 ? x - 32768 : 0;
+ return y;
+}
+
+int main()
+{
+ if (foo (0) != 0)
+ abort ();
+ if (foo (32767) != 0)
+ abort ();
+ if (foo (32768) != 0)
+ abort ();
+ if (foo (32769) != 1)
+ abort ();
+ if (foo (65535) != 32767)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040311-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040311-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040311-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040311-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,67 @@
+/* Copyright (C) 2004 Free Software Foundation.
+
+ Check that constant folding and RTL simplification of -(x >> y) doesn't
+ break anything and produces the expected results.
+
+ Written by Roger Sayle, 11th March 2004. */
+
+extern void abort (void);
+
+#define INT_BITS (sizeof(int)*8)
+
+int test1(int x)
+{
+ return -(x >> (INT_BITS-1));
+}
+
+int test2(unsigned int x)
+{
+ return -((int)(x >> (INT_BITS-1)));
+}
+
+int test3(int x)
+{
+ int y;
+ y = INT_BITS-1;
+ return -(x >> y);
+}
+
+int test4(unsigned int x)
+{
+ int y;
+ y = INT_BITS-1;
+ return -((int)(x >> y));
+}
+
+int main()
+{
+ if (test1(0) != 0)
+ abort ();
+ if (test1(1) != 0)
+ abort ();
+ if (test1(-1) != 1)
+ abort ();
+
+ if (test2(0) != 0)
+ abort ();
+ if (test2(1) != 0)
+ abort ();
+ if (test2((unsigned int)-1) != -1)
+ abort ();
+
+ if (test3(0) != 0)
+ abort ();
+ if (test3(1) != 0)
+ abort ();
+ if (test3(-1) != 1)
+ abort ();
+
+ if (test4(0) != 0)
+ abort ();
+ if (test4(1) != 0)
+ abort ();
+ if (test4((unsigned int)-1) != -1)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040313-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040313-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040313-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040313-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* PR middle-end/14470 */
+/* Origin: Lodewijk Voge <lvoge at cs.vu.nl> */
+
+extern void abort(void);
+
+int main()
+{
+ int t[1025] = { 1024 }, d;
+
+ d = 0;
+ d = t[d]++;
+ if (t[0] != 1025)
+ abort();
+ if (d != 1024)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040319-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040319-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040319-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040319-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+int
+blah (int zzz)
+{
+ int foo;
+ if (zzz >= 0)
+ return 1;
+ foo = (zzz >= 0 ? (zzz) : -(zzz));
+ return foo;
+}
+
+main()
+{
+ if (blah (-1) != 1)
+ abort ();
+ else
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040331-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040331-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040331-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040331-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+/* PR c++/14755 */
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+#if __INT_MAX__ >= 2147483647
+ struct { int count: 31; } s = { 0 };
+ while (s.count--)
+ abort ();
+#elif __INT_MAX__ >= 32767
+ struct { int count: 15; } s = { 0 };
+ while (s.count--)
+ abort ();
+#else
+ /* Don't bother because __INT_MAX__ is too small. */
+#endif
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,111 @@
+#include <limits.h>
+
+extern void abort ();
+
+int test1(int x)
+{
+ return x ^ INT_MIN;
+}
+
+unsigned int test1u(unsigned int x)
+{
+ return x ^ (unsigned int)INT_MIN;
+}
+
+unsigned int test2u(unsigned int x)
+{
+ return x + (unsigned int)INT_MIN;
+}
+
+unsigned int test3u(unsigned int x)
+{
+ return x - (unsigned int)INT_MIN;
+}
+
+int test4(int x)
+{
+ int y = INT_MIN;
+ return x ^ y;
+}
+
+unsigned int test4u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ return x ^ y;
+}
+
+unsigned int test5u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ return x + y;
+}
+
+unsigned int test6u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ return x - y;
+}
+
+
+
+void test(int a, int b)
+{
+ if (test1(a) != b)
+ abort();
+ if (test4(a) != b)
+ abort();
+}
+
+void testu(unsigned int a, unsigned int b)
+{
+ if (test1u(a) != b)
+ abort();
+ if (test2u(a) != b)
+ abort();
+ if (test3u(a) != b)
+ abort();
+ if (test4u(a) != b)
+ abort();
+ if (test5u(a) != b)
+ abort();
+ if (test6u(a) != b)
+ abort();
+}
+
+
+int main()
+{
+#if INT_MAX == 2147483647
+ test(0x00000000,0x80000000);
+ test(0x80000000,0x00000000);
+ test(0x12345678,0x92345678);
+ test(0x92345678,0x12345678);
+ test(0x7fffffff,0xffffffff);
+ test(0xffffffff,0x7fffffff);
+
+ testu(0x00000000,0x80000000);
+ testu(0x80000000,0x00000000);
+ testu(0x12345678,0x92345678);
+ testu(0x92345678,0x12345678);
+ testu(0x7fffffff,0xffffffff);
+ testu(0xffffffff,0x7fffffff);
+#endif
+
+#if INT_MAX == 32767
+ test(0x0000,0x8000);
+ test(0x8000,0x0000);
+ test(0x1234,0x9234);
+ test(0x9234,0x1234);
+ test(0x7fff,0xffff);
+ test(0xffff,0x7fff);
+
+ testu(0x0000,0x8000);
+ testu(0x8000,0x0000);
+ testu(0x1234,0x9234);
+ testu(0x9234,0x1234);
+ testu(0x7fff,0xffff);
+ testu(0xffff,0x7fff);
+#endif
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1w.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1w.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1w.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-1w.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,65 @@
+/* { dg-additional-options "-fwrapv" } */
+
+#include <limits.h>
+
+extern void abort ();
+
+int test2(int x)
+{
+ return x + INT_MIN;
+}
+
+int test3(int x)
+{
+ return x - INT_MIN;
+}
+
+int test5(int x)
+{
+ int y = INT_MIN;
+ return x + y;
+}
+
+int test6(int x)
+{
+ int y = INT_MIN;
+ return x - y;
+}
+
+
+
+void test(int a, int b)
+{
+ if (test2(a) != b)
+ abort();
+ if (test3(a) != b)
+ abort();
+ if (test5(a) != b)
+ abort();
+ if (test6(a) != b)
+ abort();
+}
+
+
+int main()
+{
+#if INT_MAX == 2147483647
+ test(0x00000000,0x80000000);
+ test(0x80000000,0x00000000);
+ test(0x12345678,0x92345678);
+ test(0x92345678,0x12345678);
+ test(0x7fffffff,0xffffffff);
+ test(0xffffffff,0x7fffffff);
+#endif
+
+#if INT_MAX == 32767
+ test(0x0000,0x8000);
+ test(0x8000,0x0000);
+ test(0x1234,0x9234);
+ test(0x9234,0x1234);
+ test(0x7fff,0xffff);
+ test(0xffff,0x7fff);
+#endif
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,178 @@
+#include <limits.h>
+
+extern void abort ();
+
+int test1(int x)
+{
+ return (x ^ INT_MIN) ^ 0x1234;
+}
+
+unsigned int test1u(unsigned int x)
+{
+ return (x ^ (unsigned int)INT_MIN) ^ 0x1234;
+}
+
+int test2(int x)
+{
+ return (x ^ 0x1234) ^ INT_MIN;
+}
+
+unsigned int test2u(unsigned int x)
+{
+ return (x ^ 0x1234) ^ (unsigned int)INT_MIN;
+}
+
+unsigned int test3u(unsigned int x)
+{
+ return (x + (unsigned int)INT_MIN) ^ 0x1234;
+}
+
+unsigned int test4u(unsigned int x)
+{
+ return (x ^ 0x1234) + (unsigned int)INT_MIN;
+}
+
+unsigned int test5u(unsigned int x)
+{
+ return (x - (unsigned int)INT_MIN) ^ 0x1234;
+}
+
+unsigned int test6u(unsigned int x)
+{
+ return (x ^ 0x1234) - (unsigned int)INT_MIN;
+}
+
+int test7(int x)
+{
+ int y = INT_MIN;
+ int z = 0x1234;
+ return (x ^ y) ^ z;
+}
+
+unsigned int test7u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ unsigned int z = 0x1234;
+ return (x ^ y) ^ z;
+}
+
+int test8(int x)
+{
+ int y = 0x1234;
+ int z = INT_MIN;
+ return (x ^ y) ^ z;
+}
+
+unsigned int test8u(unsigned int x)
+{
+ unsigned int y = 0x1234;
+ unsigned int z = (unsigned int)INT_MIN;
+ return (x ^ y) ^ z;
+}
+
+unsigned int test9u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ unsigned int z = 0x1234;
+ return (x + y) ^ z;
+}
+
+unsigned int test10u(unsigned int x)
+{
+ unsigned int y = 0x1234;
+ unsigned int z = (unsigned int)INT_MIN;
+ return (x ^ y) + z;
+}
+
+unsigned int test11u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ unsigned int z = 0x1234;
+ return (x - y) ^ z;
+}
+
+unsigned int test12u(unsigned int x)
+{
+ unsigned int y = 0x1234;
+ unsigned int z = (unsigned int)INT_MIN;
+ return (x ^ y) - z;
+}
+
+
+void test(int a, int b)
+{
+ if (test1(a) != b)
+ abort();
+ if (test2(a) != b)
+ abort();
+ if (test7(a) != b)
+ abort();
+ if (test8(a) != b)
+ abort();
+}
+
+void testu(unsigned int a, unsigned int b)
+{
+ if (test1u(a) != b)
+ abort();
+ if (test2u(a) != b)
+ abort();
+ if (test3u(a) != b)
+ abort();
+ if (test4u(a) != b)
+ abort();
+ if (test5u(a) != b)
+ abort();
+ if (test6u(a) != b)
+ abort();
+ if (test7u(a) != b)
+ abort();
+ if (test8u(a) != b)
+ abort();
+ if (test9u(a) != b)
+ abort();
+ if (test10u(a) != b)
+ abort();
+ if (test11u(a) != b)
+ abort();
+ if (test12u(a) != b)
+ abort();
+}
+
+
+int main()
+{
+#if INT_MAX == 2147483647
+ test(0x00000000,0x80001234);
+ test(0x00001234,0x80000000);
+ test(0x80000000,0x00001234);
+ test(0x80001234,0x00000000);
+ test(0x7fffffff,0xffffedcb);
+ test(0xffffffff,0x7fffedcb);
+
+ testu(0x00000000,0x80001234);
+ testu(0x00001234,0x80000000);
+ testu(0x80000000,0x00001234);
+ testu(0x80001234,0x00000000);
+ testu(0x7fffffff,0xffffedcb);
+ testu(0xffffffff,0x7fffedcb);
+#endif
+
+#if INT_MAX == 32767
+ test(0x0000,0x9234);
+ test(0x1234,0x8000);
+ test(0x8000,0x1234);
+ test(0x9234,0x0000);
+ test(0x7fff,0xedcb);
+ test(0xffff,0x6dcb);
+
+ testu(0x0000,0x9234);
+ testu(0x8000,0x1234);
+ testu(0x1234,0x8000);
+ testu(0x9234,0x0000);
+ testu(0x7fff,0xedcb);
+ testu(0xffff,0x6dcb);
+#endif
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2w.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2w.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2w.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-2w.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,98 @@
+/* { dg-additional-options "-fwrapv" } */
+
+#include <limits.h>
+
+extern void abort ();
+
+int test3(int x)
+{
+ return (x + INT_MIN) ^ 0x1234;
+}
+
+int test4(int x)
+{
+ return (x ^ 0x1234) + INT_MIN;
+}
+
+int test5(int x)
+{
+ return (x - INT_MIN) ^ 0x1234;
+}
+
+int test6(int x)
+{
+ return (x ^ 0x1234) - INT_MIN;
+}
+
+int test9(int x)
+{
+ int y = INT_MIN;
+ int z = 0x1234;
+ return (x + y) ^ z;
+}
+
+int test10(int x)
+{
+ int y = 0x1234;
+ int z = INT_MIN;
+ return (x ^ y) + z;
+}
+
+int test11(int x)
+{
+ int y = INT_MIN;
+ int z = 0x1234;
+ return (x - y) ^ z;
+}
+
+int test12(int x)
+{
+ int y = 0x1234;
+ int z = INT_MIN;
+ return (x ^ y) - z;
+}
+
+
+void test(int a, int b)
+{
+ if (test3(a) != b)
+ abort();
+ if (test4(a) != b)
+ abort();
+ if (test5(a) != b)
+ abort();
+ if (test6(a) != b)
+ abort();
+ if (test9(a) != b)
+ abort();
+ if (test10(a) != b)
+ abort();
+ if (test11(a) != b)
+ abort();
+ if (test12(a) != b)
+ abort();
+}
+
+
+int main()
+{
+#if INT_MAX == 2147483647
+ test(0x00000000,0x80001234);
+ test(0x00001234,0x80000000);
+ test(0x80000000,0x00001234);
+ test(0x80001234,0x00000000);
+ test(0x7fffffff,0xffffedcb);
+ test(0xffffffff,0x7fffedcb);
+#endif
+
+#if INT_MAX == 32767
+ test(0x0000,0x9234);
+ test(0x1234,0x8000);
+ test(0x8000,0x1234);
+ test(0x9234,0x0000);
+ test(0x7fff,0xedcb);
+ test(0xffff,0x6dcb);
+#endif
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,111 @@
+#include <limits.h>
+
+extern void abort ();
+
+int test1(int x)
+{
+ return ~(x ^ INT_MIN);
+}
+
+unsigned int test1u(unsigned int x)
+{
+ return ~(x ^ (unsigned int)INT_MIN);
+}
+
+unsigned int test2u(unsigned int x)
+{
+ return ~(x + (unsigned int)INT_MIN);
+}
+
+unsigned int test3u(unsigned int x)
+{
+ return ~(x - (unsigned int)INT_MIN);
+}
+
+int test4(int x)
+{
+ int y = INT_MIN;
+ return ~(x ^ y);
+}
+
+unsigned int test4u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ return ~(x ^ y);
+}
+
+unsigned int test5u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ return ~(x + y);
+}
+
+unsigned int test6u(unsigned int x)
+{
+ unsigned int y = (unsigned int)INT_MIN;
+ return ~(x - y);
+}
+
+
+
+void test(int a, int b)
+{
+ if (test1(a) != b)
+ abort();
+ if (test4(a) != b)
+ abort();
+}
+
+void testu(unsigned int a, unsigned int b)
+{
+ if (test1u(a) != b)
+ abort();
+ if (test2u(a) != b)
+ abort();
+ if (test3u(a) != b)
+ abort();
+ if (test4u(a) != b)
+ abort();
+ if (test5u(a) != b)
+ abort();
+ if (test6u(a) != b)
+ abort();
+}
+
+
+int main()
+{
+#if INT_MAX == 2147483647
+ test(0x00000000,0x7fffffff);
+ test(0x80000000,0xffffffff);
+ test(0x12345678,0x6dcba987);
+ test(0x92345678,0xedcba987);
+ test(0x7fffffff,0x00000000);
+ test(0xffffffff,0x80000000);
+
+ testu(0x00000000,0x7fffffff);
+ testu(0x80000000,0xffffffff);
+ testu(0x12345678,0x6dcba987);
+ testu(0x92345678,0xedcba987);
+ testu(0x7fffffff,0x00000000);
+ testu(0xffffffff,0x80000000);
+#endif
+
+#if INT_MAX == 32767
+ test(0x0000,0x7fff);
+ test(0x8000,0xffff);
+ test(0x1234,0x6dcb);
+ test(0x9234,0xedcb);
+ test(0x7fff,0x0000);
+ test(0xffff,0x8000);
+
+ testu(0x0000,0x7fff);
+ testu(0x8000,0xffff);
+ testu(0x1234,0x6dcb);
+ testu(0x9234,0xedcb);
+ testu(0x7fff,0x0000);
+ testu(0xffff,0x8000);
+#endif
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3w.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3w.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3w.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040409-3w.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,64 @@
+/* { dg-additional-options "-fwrapv" } */
+
+#include <limits.h>
+
+extern void abort ();
+
+int test2(int x)
+{
+ return ~(x + INT_MIN);
+}
+
+int test3(int x)
+{
+ return ~(x - INT_MIN);
+}
+
+int test5(int x)
+{
+ int y = INT_MIN;
+ return ~(x + y);
+}
+
+int test6(int x)
+{
+ int y = INT_MIN;
+ return ~(x - y);
+}
+
+
+void test(int a, int b)
+{
+ if (test2(a) != b)
+ abort();
+ if (test3(a) != b)
+ abort();
+ if (test5(a) != b)
+ abort();
+ if (test6(a) != b)
+ abort();
+}
+
+
+int main()
+{
+#if INT_MAX == 2147483647
+ test(0x00000000,0x7fffffff);
+ test(0x80000000,0xffffffff);
+ test(0x12345678,0x6dcba987);
+ test(0x92345678,0xedcba987);
+ test(0x7fffffff,0x00000000);
+ test(0xffffffff,0x80000000);
+#endif
+
+#if INT_MAX == 32767
+ test(0x0000,0x7fff);
+ test(0x8000,0xffff);
+ test(0x1234,0x6dcb);
+ test(0x9234,0xedcb);
+ test(0x7fff,0x0000);
+ test(0xffff,0x8000);
+#endif
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040411-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+int
+sub1 (int i, int j)
+{
+ typedef int c[i+2];
+ int x[10], y[10];
+
+ if (j == 2)
+ {
+ memcpy (x, y, 10 * sizeof (int));
+ return sizeof (c);
+ }
+ else
+ return sizeof (c) * 3;
+}
+
+int
+main ()
+{
+ if (sub1 (20, 3) != 66 * sizeof (int))
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040423-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040423-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040423-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040423-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+int
+sub1 (int i, int j)
+{
+ typedef struct
+ {
+ int c[i+2];
+ }c;
+ int x[10], y[10];
+
+ if (j == 2)
+ {
+ memcpy (x, y, 10 * sizeof (int));
+ return sizeof (c);
+ }
+ else
+ return sizeof (c) * 3;
+}
+
+int
+main ()
+{
+ typedef struct
+ {
+ int c[22];
+ }c;
+ if (sub1 (20, 3) != sizeof (c)*3)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040520-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040520-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040520-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040520-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* PR 15454 */
+
+void abort ();
+int main () {
+ int foo;
+ int bar (void)
+ {
+ int baz = 0;
+ if (foo!=45)
+ baz = foo;
+ return baz;
+ }
+ foo = 1;
+ if (!bar ())
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040625-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040625-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040625-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040625-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+/* From PR target/16176 */
+struct __attribute__ ((packed)) s { struct s *next; };
+
+struct s * __attribute__ ((noinline))
+maybe_next (struct s *s, int t)
+{
+ if (t)
+ s = s->next;
+ return s;
+}
+
+int main ()
+{
+ struct s s1, s2;
+
+ s1.next = &s2;
+ if (maybe_next (&s1, 1) != &s2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,141 @@
+/* { dg-require-effective-target int32plus } */
+
+/* Test arithmetics on bitfields. */
+#ifndef T
+
+extern void abort (void);
+extern void exit (int);
+
+#ifndef FIELDS1
+#define FIELDS1
+#endif
+#ifndef FIELDS2
+#define FIELDS2
+#endif
+
+struct { FIELDS1 unsigned int i : 6, j : 11, k : 15; FIELDS2 } b;
+struct { FIELDS1 unsigned int i : 5, j : 1, k : 26; FIELDS2 } c;
+struct { FIELDS1 unsigned int i : 16, j : 8, k : 8; FIELDS2 } d;
+
+unsigned int ret1 (void) { return b.i; }
+unsigned int ret2 (void) { return b.j; }
+unsigned int ret3 (void) { return b.k; }
+unsigned int ret4 (void) { return c.i; }
+unsigned int ret5 (void) { return c.j; }
+unsigned int ret6 (void) { return c.k; }
+unsigned int ret7 (void) { return d.i; }
+unsigned int ret8 (void) { return d.j; }
+unsigned int ret9 (void) { return d.k; }
+
+#define T(n, pre, post, op) \
+void fn1_##n (unsigned int x) { pre b.i post; } \
+void fn2_##n (unsigned int x) { pre b.j post; } \
+void fn3_##n (unsigned int x) { pre b.k post; } \
+void fn4_##n (unsigned int x) { pre c.i post; } \
+void fn5_##n (unsigned int x) { pre c.j post; } \
+void fn6_##n (unsigned int x) { pre c.k post; } \
+void fn7_##n (unsigned int x) { pre d.i post; } \
+void fn8_##n (unsigned int x) { pre d.j post; } \
+void fn9_##n (unsigned int x) { pre d.k post; }
+
+#include "20040629-1.c"
+#undef T
+
+#define FAIL(n, i) abort ()
+
+int
+main (void)
+{
+#define T(n, pre, post, op) \
+ b.i = 51; \
+ b.j = 636; \
+ b.k = 31278; \
+ c.i = 21; \
+ c.j = 1; \
+ c.k = 33554432; \
+ d.i = 26812; \
+ d.j = 156; \
+ d.k = 187; \
+ fn1_##n (3); \
+ if (ret1 () != (op (51, 3) & ((1 << 6) - 1))) \
+ FAIL (n, 1); \
+ b.i = 51; \
+ fn2_##n (251); \
+ if (ret2 () != (op (636, 251) & ((1 << 11) - 1))) \
+ FAIL (n, 2); \
+ b.j = 636; \
+ fn3_##n (13279); \
+ if (ret3 () != (op (31278, 13279) & ((1 << 15) - 1))) \
+ FAIL (n, 3); \
+ b.j = 31278; \
+ fn4_##n (24); \
+ if (ret4 () != (op (21, 24) & ((1 << 5) - 1))) \
+ FAIL (n, 4); \
+ c.i = 21; \
+ fn5_##n (1); \
+ if (ret5 () != (op (1, 1) & ((1 << 1) - 1))) \
+ FAIL (n, 5); \
+ c.j = 1; \
+ fn6_##n (264151); \
+ if (ret6 () != (op (33554432, 264151) & ((1 << 26) - 1))) \
+ FAIL (n, 6); \
+ c.k = 33554432; \
+ fn7_##n (713); \
+ if (ret7 () != (op (26812, 713) & ((1 << 16) - 1))) \
+ FAIL (n, 7); \
+ d.i = 26812; \
+ fn8_##n (17); \
+ if (ret8 () != (op (156, 17) & ((1 << 8) - 1))) \
+ FAIL (n, 8); \
+ d.j = 156; \
+ fn9_##n (199); \
+ if (ret9 () != (op (187, 199) & ((1 << 8) - 1))) \
+ FAIL (n, 9); \
+ d.k = 187;
+
+#include "20040629-1.c"
+#undef T
+ return 0;
+}
+
+#else
+
+#ifndef opadd
+#define opadd(x, y) (x + y)
+#define opsub(x, y) (x - y)
+#define opinc(x, y) (x + 1)
+#define opdec(x, y) (x - 1)
+#define opand(x, y) (x & y)
+#define opior(x, y) (x | y)
+#define opxor(x, y) (x ^ y)
+#define opdiv(x, y) (x / y)
+#define oprem(x, y) (x % y)
+#define opadd3(x, y) (x + 3)
+#define opsub7(x, y) (x - 7)
+#define opand21(x, y) (x & 21)
+#define opior19(x, y) (x | 19)
+#define opxor37(x, y) (x ^ 37)
+#define opdiv17(x, y) (x / 17)
+#define oprem19(x, y) (x % 19)
+#endif
+
+T(1, , += x, opadd)
+T(2, ++, , opinc)
+T(3, , ++, opinc)
+T(4, , -= x, opsub)
+T(5, --, , opdec)
+T(6, , --, opdec)
+T(7, , &= x, opand)
+T(8, , |= x, opior)
+T(9, , ^= x, opxor)
+T(a, , /= x, opdiv)
+T(b, , %= x, oprem)
+T(c, , += 3, opadd3)
+T(d, , -= 7, opsub7)
+T(e, , &= 21, opand21)
+T(f, , |= 19, opior19)
+T(g, , ^= 37, opxor37)
+T(h, , /= 17, opdiv17)
+T(i, , %= 19, oprem19)
+
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040703-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040703-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040703-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040703-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,148 @@
+/* PR 16341 */
+/* { dg-require-effective-target int32plus } */
+
+#define PART_PRECISION (sizeof (cpp_num_part) * 8)
+
+typedef unsigned int cpp_num_part;
+typedef struct cpp_num cpp_num;
+struct cpp_num
+{
+ cpp_num_part high;
+ cpp_num_part low;
+ int unsignedp; /* True if value should be treated as unsigned. */
+ int overflow; /* True if the most recent calculation overflowed. */
+};
+
+static int
+num_positive (cpp_num num, unsigned int precision)
+{
+ if (precision > PART_PRECISION)
+ {
+ precision -= PART_PRECISION;
+ return (num.high & (cpp_num_part) 1 << (precision - 1)) == 0;
+ }
+
+ return (num.low & (cpp_num_part) 1 << (precision - 1)) == 0;
+}
+
+static cpp_num
+num_trim (cpp_num num, unsigned int precision)
+{
+ if (precision > PART_PRECISION)
+ {
+ precision -= PART_PRECISION;
+ if (precision < PART_PRECISION)
+ num.high &= ((cpp_num_part) 1 << precision) - 1;
+ }
+ else
+ {
+ if (precision < PART_PRECISION)
+ num.low &= ((cpp_num_part) 1 << precision) - 1;
+ num.high = 0;
+ }
+
+ return num;
+}
+
+/* Shift NUM, of width PRECISION, right by N bits. */
+static cpp_num
+num_rshift (cpp_num num, unsigned int precision, unsigned int n)
+{
+ cpp_num_part sign_mask;
+ int x = num_positive (num, precision);
+
+ if (num.unsignedp || x)
+ sign_mask = 0;
+ else
+ sign_mask = ~(cpp_num_part) 0;
+
+ if (n >= precision)
+ num.high = num.low = sign_mask;
+ else
+ {
+ /* Sign-extend. */
+ if (precision < PART_PRECISION)
+ num.high = sign_mask, num.low |= sign_mask << precision;
+ else if (precision < 2 * PART_PRECISION)
+ num.high |= sign_mask << (precision - PART_PRECISION);
+
+ if (n >= PART_PRECISION)
+ {
+ n -= PART_PRECISION;
+ num.low = num.high;
+ num.high = sign_mask;
+ }
+
+ if (n)
+ {
+ num.low = (num.low >> n) | (num.high << (PART_PRECISION - n));
+ num.high = (num.high >> n) | (sign_mask << (PART_PRECISION - n));
+ }
+ }
+
+ num = num_trim (num, precision);
+ num.overflow = 0;
+ return num;
+}
+ #define num_zerop(num) ((num.low | num.high) == 0)
+#define num_eq(num1, num2) (num1.low == num2.low && num1.high == num2.high)
+
+cpp_num
+num_lshift (cpp_num num, unsigned int precision, unsigned int n)
+{
+ if (n >= precision)
+ {
+ num.overflow = !num.unsignedp && !num_zerop (num);
+ num.high = num.low = 0;
+ }
+ else
+ {
+ cpp_num orig;
+ unsigned int m = n;
+
+ orig = num;
+ if (m >= PART_PRECISION)
+ {
+ m -= PART_PRECISION;
+ num.high = num.low;
+ num.low = 0;
+ }
+ if (m)
+ {
+ num.high = (num.high << m) | (num.low >> (PART_PRECISION - m));
+ num.low <<= m;
+ }
+ num = num_trim (num, precision);
+
+ if (num.unsignedp)
+ num.overflow = 0;
+ else
+ {
+ cpp_num maybe_orig = num_rshift (num, precision, n);
+ num.overflow = !num_eq (orig, maybe_orig);
+ }
+ }
+
+ return num;
+}
+
+unsigned int precision = 64;
+unsigned int n = 16;
+
+cpp_num num = { 0, 3, 0, 0 };
+
+int main()
+{
+ cpp_num res = num_lshift (num, 64, n);
+
+ if (res.low != 0x30000)
+ abort ();
+
+ if (res.high != 0)
+ abort ();
+
+ if (res.overflow != 0)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040704-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040704-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040704-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040704-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+/* PR 16348: Make sure that condition-first false loops DTRT. */
+
+extern void abort ();
+
+int main()
+{
+ for (; 0 ;)
+ {
+ abort ();
+ label:
+ return 0;
+ }
+ goto label;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,4 @@
+/* { dg-require-effective-target int32plus } */
+
+#define FIELDS1 long long l;
+#include "20040629-1.c"
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040705-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,3 @@
+/* { dg-require-effective-target int32plus } */
+#define FIELDS2 long long l;
+#include "20040629-1.c"
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040706-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040706-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040706-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040706-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,9 @@
+int main ()
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ continue;
+ if (i < 10)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040707-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040707-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040707-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040707-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+struct s { char c1, c2; };
+void foo (struct s s)
+{
+ static struct s s1;
+ s1 = s;
+}
+int main ()
+{
+ static struct s s2;
+ foo (s2);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,149 @@
+/* { dg-require-effective-target int32plus } */
+
+/* Test arithmetics on bitfields. */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned int
+myrnd (void)
+{
+ static unsigned int s = 1388815473;
+ s *= 1103515245;
+ s += 12345;
+ return (s / 65536) % 2048;
+}
+
+#define T(S) \
+struct S s##S; \
+struct S retme##S (struct S x) \
+{ \
+ return x; \
+} \
+ \
+unsigned int fn1##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y = retme##S (y); \
+ return y.k; \
+} \
+ \
+unsigned int fn2##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y.k %= 15; \
+ return y.k; \
+} \
+ \
+unsigned int retit##S (void) \
+{ \
+ return s##S.k; \
+} \
+ \
+unsigned int fn3##S (unsigned int x) \
+{ \
+ s##S.k += x; \
+ return retit##S (); \
+} \
+ \
+void test##S (void) \
+{ \
+ int i; \
+ unsigned int mask, v, a, r; \
+ struct S x; \
+ char *p = (char *) &s##S; \
+ for (i = 0; i < sizeof (s##S); ++i) \
+ *p++ = myrnd (); \
+ if (__builtin_classify_type (s##S.l) == 8) \
+ s##S.l = 5.25; \
+ s##S.k = -1; \
+ mask = s##S.k; \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn1##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn2##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((((v + a) & mask) % 15) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn3##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || s##S.k != r || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+}
+
+struct A { unsigned int i : 6, l : 1, j : 10, k : 15; }; T(A)
+struct B { unsigned int i : 6, j : 11, k : 15; unsigned int l; }; T(B)
+struct C { unsigned int l; unsigned int i : 6, j : 11, k : 15; }; T(C)
+struct D { unsigned long long l : 6, i : 6, j : 23, k : 29; }; T(D)
+struct E { unsigned long long l, i : 12, j : 23, k : 29; }; T(E)
+struct F { unsigned long long i : 12, j : 23, k : 29, l; }; T(F)
+struct G { unsigned int i : 12, j : 13, k : 7; unsigned long long l; }; T(G)
+struct H { unsigned int i : 12, j : 11, k : 9; unsigned long long l; }; T(H)
+struct I { unsigned short i : 1, j : 6, k : 9; unsigned long long l; }; T(I)
+struct J { unsigned short i : 1, j : 8, k : 7; unsigned short l; }; T(J)
+struct K { unsigned int k : 6, l : 1, j : 10, i : 15; }; T(K)
+struct L { unsigned int k : 6, j : 11, i : 15; unsigned int l; }; T(L)
+struct M { unsigned int l; unsigned int k : 6, j : 11, i : 15; }; T(M)
+struct N { unsigned long long l : 6, k : 6, j : 23, i : 29; }; T(N)
+struct O { unsigned long long l, k : 12, j : 23, i : 29; }; T(O)
+struct P { unsigned long long k : 12, j : 23, i : 29, l; }; T(P)
+struct Q { unsigned int k : 12, j : 13, i : 7; unsigned long long l; }; T(Q)
+struct R { unsigned int k : 12, j : 11, i : 9; unsigned long long l; }; T(R)
+struct S { unsigned short k : 1, j : 6, i : 9; unsigned long long l; }; T(S)
+struct T { unsigned short k : 1, j : 8, i : 7; unsigned short l; }; T(T)
+struct U { unsigned short j : 6, k : 1, i : 9; unsigned long long l; }; T(U)
+struct V { unsigned short j : 8, k : 1, i : 7; unsigned short l; }; T(V)
+struct W { long double l; unsigned int k : 12, j : 13, i : 7; }; T(W)
+struct X { unsigned int k : 12, j : 13, i : 7; long double l; }; T(X)
+struct Y { unsigned int k : 12, j : 11, i : 9; long double l; }; T(Y)
+struct Z { long double l; unsigned int j : 13, i : 7, k : 12; }; T(Z)
+
+int
+main (void)
+{
+ testA ();
+ testB ();
+ testC ();
+ testD ();
+ testE ();
+ testF ();
+ testG ();
+ testH ();
+ testI ();
+ testJ ();
+ testK ();
+ testL ();
+ testM ();
+ testN ();
+ testO ();
+ testP ();
+ testQ ();
+ testR ();
+ testS ();
+ testT ();
+ testU ();
+ testV ();
+ testW ();
+ testX ();
+ testY ();
+ testZ ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,149 @@
+/* Test arithmetics on bitfields. */
+/* { dg-require-effective-target int32plus } */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned int
+myrnd (void)
+{
+ static unsigned int s = 1388815473;
+ s *= 1103515245;
+ s += 12345;
+ return (s / 65536) % 2048;
+}
+
+#define T(S) \
+struct S s##S; \
+struct S retme##S (struct S x) \
+{ \
+ return x; \
+} \
+ \
+unsigned int fn1##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y = retme##S (y); \
+ return y.k; \
+} \
+ \
+unsigned int fn2##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y.k %= 15; \
+ return y.k; \
+} \
+ \
+unsigned int retit##S (void) \
+{ \
+ return s##S.k; \
+} \
+ \
+unsigned int fn3##S (unsigned int x) \
+{ \
+ s##S.k += x; \
+ return retit##S (); \
+} \
+ \
+void test##S (void) \
+{ \
+ int i; \
+ unsigned int mask, v, a, r; \
+ struct S x; \
+ char *p = (char *) &s##S; \
+ for (i = 0; i < sizeof (s##S); ++i) \
+ *p++ = myrnd (); \
+ if (__builtin_classify_type (s##S.l) == 8) \
+ s##S.l = 5.25; \
+ s##S.k = -1; \
+ mask = s##S.k; \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn1##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn2##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((((v + a) & mask) % 15) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn3##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || s##S.k != r || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+}
+
+#define pck __attribute__((packed))
+struct pck A { unsigned short i : 1, l : 1, j : 3, k : 11; }; T(A)
+struct pck B { unsigned short i : 4, j : 1, k : 11; unsigned int l; }; T(B)
+struct pck C { unsigned int l; unsigned short i : 4, j : 1, k : 11; }; T(C)
+struct pck D { unsigned long long l : 6, i : 6, j : 23, k : 29; }; T(D)
+struct pck E { unsigned long long l, i : 12, j : 23, k : 29; }; T(E)
+struct pck F { unsigned long long i : 12, j : 23, k : 29, l; }; T(F)
+struct pck G { unsigned short i : 1, j : 1, k : 6; unsigned long long l; }; T(G)
+struct pck H { unsigned short i : 6, j : 2, k : 8; unsigned long long l; }; T(H)
+struct pck I { unsigned short i : 1, j : 6, k : 1; unsigned long long l; }; T(I)
+struct pck J { unsigned short i : 1, j : 8, k : 7; unsigned short l; }; T(J)
+struct pck K { unsigned int k : 6, l : 1, j : 10, i : 15; }; T(K)
+struct pck L { unsigned int k : 6, j : 11, i : 15; unsigned int l; }; T(L)
+struct pck M { unsigned int l; unsigned short k : 6, j : 11, i : 15; }; T(M)
+struct pck N { unsigned long long l : 6, k : 6, j : 23, i : 29; }; T(N)
+struct pck O { unsigned long long l, k : 12, j : 23, i : 29; }; T(O)
+struct pck P { unsigned long long k : 12, j : 23, i : 29, l; }; T(P)
+struct pck Q { unsigned short k : 12, j : 1, i : 3; unsigned long long l; }; T(Q)
+struct pck R { unsigned short k : 2, j : 11, i : 3; unsigned long long l; }; T(R)
+struct pck S { unsigned short k : 1, j : 6, i : 9; unsigned long long l; }; T(S)
+struct pck T { unsigned short k : 1, j : 8, i : 7; unsigned short l; }; T(T)
+struct pck U { unsigned short j : 6, k : 1, i : 9; unsigned long long l; }; T(U)
+struct pck V { unsigned short j : 8, k : 1, i : 7; unsigned short l; }; T(V)
+struct pck W { long double l; unsigned int k : 12, j : 13, i : 7; }; T(W)
+struct pck X { unsigned int k : 12, j : 13, i : 7; long double l; }; T(X)
+struct pck Y { unsigned int k : 12, j : 11, i : 9; long double l; }; T(Y)
+struct pck Z { long double l; unsigned int j : 13, i : 7, k : 12; }; T(Z)
+
+int
+main (void)
+{
+ testA ();
+ testB ();
+ testC ();
+ testD ();
+ testE ();
+ testF ();
+ testG ();
+ testH ();
+ testI ();
+ testJ ();
+ testK ();
+ testL ();
+ testM ();
+ testN ();
+ testO ();
+ testP ();
+ testQ ();
+ testR ();
+ testS ();
+ testT ();
+ testU ();
+ testV ();
+ testW ();
+ testX ();
+ testY ();
+ testZ ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040709-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,5 @@
+/* PR rtl-optimization/68205 */
+/* { dg-require-effective-target int32plus } */
+/* { dg-additional-options "-fno-common" } */
+
+#include "20040709-2.c"
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040805-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040805-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040805-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040805-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* { dg-require-stack-size "0x12000" } */
+
+#if __INT_MAX__ < 32768
+int main () { exit (0); }
+#else
+int a[2] = { 2, 3 };
+
+static int __attribute__((noinline))
+bar (int x, void *b)
+{
+ a[0]++;
+ return x;
+}
+
+static int __attribute__((noinline))
+foo (int x)
+{
+ char buf[0x10000];
+ int y = a[0];
+ a[1] = y;
+ x = bar (x, buf);
+ y = bar (y, buf);
+ return x + y;
+}
+
+int
+main ()
+{
+ if (foo (100) != 102)
+ abort ();
+ exit (0);
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040811-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040811-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040811-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040811-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target alloca } */
+
+/* Ensure that we deallocate X when branching back before its
+ declaration. */
+
+void *volatile p;
+
+int
+main (void)
+{
+ int n = 0;
+ lab:;
+ int x[n % 1000 + 1];
+ x[0] = 1;
+ x[n % 1000] = 2;
+ p = x;
+ n++;
+ if (n < 1000000)
+ goto lab;
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040820-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040820-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040820-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040820-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* PR rtl-optimization/17099 */
+
+extern void exit (int);
+extern void abort (void);
+
+void
+check (int a)
+{
+ if (a != 1)
+ abort ();
+}
+
+void
+test (int a, int b)
+{
+ check ((a ? 1 : 0) | (b ? 2 : 0));
+}
+
+int
+main (void)
+{
+ test (1, 0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040823-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040823-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040823-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040823-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* Ensure that we create VUSE operands also for noreturn functions. */
+
+#include <stdlib.h>
+#include <string.h>
+
+int *pwarn;
+
+void bla (void) __attribute__ ((noreturn));
+
+void bla (void)
+{
+ if (!*pwarn)
+ abort ();
+
+ exit (0);
+}
+
+int main (void)
+{
+ int warn;
+
+ memset (&warn, 0, sizeof (warn));
+
+ pwarn = &warn;
+
+ warn = 1;
+
+ bla ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040831-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040831-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040831-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040831-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+/* This testcase was being miscompiled, because operand_equal_p
+ returned that (unsigned long) d and (long) d are equal. */
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+ double d = -12.0;
+ long l = (d > 10000) ? (unsigned long) d : (long) d;
+ if (l != -12)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040917-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040917-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040917-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20040917-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* submitted by kenneth zadeck */
+
+static int test_var;
+
+/* the idea here is that not only is inlinable, inlinable but since it
+ is static, the cgraph node will not be marked as output. The
+ current version of the code ignores these cgraph nodes. */
+
+void not_inlinable() __attribute__((noinline));
+
+static void
+inlinable ()
+{
+ test_var = -10;
+}
+
+void
+not_inlinable ()
+{
+ inlinable();
+}
+
+main ()
+{
+ test_var = 10;
+ /* Variable test_var should be considered call-clobbered by the call
+ to not_inlinable(). */
+ not_inlinable ();
+ if (test_var == 10)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041011-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041011-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041011-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041011-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,60 @@
+typedef unsigned long long ull;
+volatile int gvol[32];
+ull gull;
+
+#define MULTI(X) \
+ X( 1), X( 2), X( 3), X( 4), X( 5), X( 6), X( 7), X( 8), X( 9), X(10), \
+ X(11), X(12), X(13), X(14), X(15), X(16), X(17), X(18), X(19), X(20), \
+ X(21), X(22), X(23), X(24), X(25), X(26), X(27), X(28), X(29), X(30)
+
+#define DECLARE(INDEX) x##INDEX
+#define COPYIN(INDEX) x##INDEX = gvol[INDEX]
+#define COPYOUT(INDEX) gvol[INDEX] = x##INDEX
+
+#define BUILD_TEST(NAME, N) \
+ ull __attribute__((noinline)) \
+ NAME (int n, ull x) \
+ { \
+ while (n--) \
+ { \
+ int MULTI (DECLARE); \
+ MULTI (COPYIN); \
+ MULTI (COPYOUT); \
+ x += N; \
+ } \
+ return x; \
+ }
+
+#define RUN_TEST(NAME, N) \
+ if (NAME (3, ~0ULL) != N * 3 - 1) \
+ abort (); \
+ if (NAME (3, 0xffffffffULL) \
+ != N * 3 + 0xffffffffULL) \
+ abort ();
+
+#define DO_TESTS(DO_TEST) \
+ DO_TEST (t1, -2048) \
+ DO_TEST (t2, -513) \
+ DO_TEST (t3, -512) \
+ DO_TEST (t4, -511) \
+ DO_TEST (t5, -1) \
+ DO_TEST (t6, 1) \
+ DO_TEST (t7, 511) \
+ DO_TEST (t8, 512) \
+ DO_TEST (t9, 513) \
+ DO_TEST (t10, gull) \
+ DO_TEST (t11, -gull)
+
+DO_TESTS (BUILD_TEST)
+
+ull neg (ull x) { return -x; }
+
+int
+main ()
+{
+ gull = 100;
+ DO_TESTS (RUN_TEST)
+ if (neg (gull) != -100ULL)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041019-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041019-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041019-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041019-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,52 @@
+test_store_ccp (int i)
+{
+ int *p, a, b, c;
+
+ if (i < 5)
+ p = &a;
+ else if (i > 8)
+ p = &b;
+ else
+ p = &c;
+
+ *p = 10;
+ b = 3;
+
+ /* STORE-CCP was wrongfully propagating 10 into *p. */
+ return *p + 2;
+}
+
+
+test_store_copy_prop (int i)
+{
+ int *p, a, b, c;
+
+ if (i < 5)
+ p = &a;
+ else if (i > 8)
+ p = &b;
+ else
+ p = &c;
+
+ *p = i;
+ b = i + 1;
+
+ /* STORE-COPY-PROP was wrongfully propagating i into *p. */
+ return *p;
+}
+
+
+main()
+{
+ int x;
+
+ x = test_store_ccp (10);
+ if (x == 12)
+ abort ();
+
+ x = test_store_copy_prop (9);
+ if (x == 9)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+/* This was failing on Alpha because the comparison (p != -1) was rewritten
+ as (p+1 != 0) and p+1 isn't allowed to wrap for pointers. */
+
+extern void abort(void);
+
+typedef __SIZE_TYPE__ size_t;
+
+int global;
+
+static void *foo(int p)
+{
+ if (p == 0)
+ {
+ global++;
+ return &global;
+ }
+
+ return (void *)(size_t)-1;
+}
+
+int bar(void)
+{
+ void *p;
+
+ p = foo(global);
+ if (p != (void *)(size_t)-1)
+ return 1;
+
+ global++;
+ return 0;
+}
+
+int main(void)
+{
+ global = 1;
+ if (bar () != 0)
+ abort();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041113-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041113-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041113-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041113-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+#include <stdarg.h>
+
+void test (int x, ...)
+{
+ va_list ap;
+ int i;
+ va_start (ap, x);
+ if (va_arg (ap, int) != 1)
+ abort ();
+ if (va_arg (ap, int) != 2)
+ abort ();
+ if (va_arg (ap, int) != 3)
+ abort ();
+ if (va_arg (ap, int) != 4)
+ abort ();
+}
+
+double a = 40.0;
+
+int main(int argc, char *argv[])
+{
+ test(0, 1, 2, 3, (int)(a / 10.0));
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041114-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041114-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041114-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041114-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* Verify that
+
+ var <= 0 || ((long unsigned) (unsigned) (var - 1) < MAX_UNSIGNED_INT)
+
+ gets folded to 1. */
+
+#include <limits.h>
+
+void abort (void);
+void link_failure (void);
+
+volatile int v;
+
+void
+foo (int var)
+{
+ if (!(var <= 0
+ || ((long unsigned) (unsigned) (var - 1) < UINT_MAX)))
+ link_failure ();
+}
+
+int
+main (int argc, char **argv)
+{
+ foo (v);
+ return 0;
+}
+
+#ifndef __OPTIMIZE__
+void
+link_failure (void)
+{
+ abort ();
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041124-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041124-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041124-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041124-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+struct s { _Complex unsigned short x; };
+struct s gs = { 100 + 200i };
+struct s __attribute__((noinline)) foo (void) { return gs; }
+
+int main ()
+{
+ if (foo ().x != gs.x)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041126-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041126-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041126-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041126-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+extern int abs (int);
+extern void abort (void);
+
+void
+check (int *p)
+{
+ int i;
+ for (i = 0; i < 5; ++i)
+ if (p[i])
+ abort ();
+ for (; i < 10; ++i)
+ if (p[i] != i + 1)
+ abort ();
+}
+
+int
+main (void)
+{
+ int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+ int i;
+
+ for (i = -5; i < 0; i++)
+ a[abs (i - 10) - 11] = 0;
+ check (a);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041201-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041201-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041201-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041201-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+/* PR rtl-opt/15289 */
+
+typedef struct { _Complex char a; _Complex char b; } Scc2;
+
+Scc2 s = { 1+2i, 3+4i };
+
+int checkScc2 (Scc2 s)
+{
+ return s.a != 1+2i || s.b != 3+4i;
+}
+
+int main (void)
+{
+ return checkScc2 (s);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041210-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041210-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041210-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041210-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+/* The FR-V port used to fail this test because the andcc patterns
+ wrongly claimed to set the C and V flags. */
+#include <limits.h>
+
+int x[4] = { INT_MIN / 2, INT_MAX, 2, 4 };
+
+int
+main ()
+{
+ if (x[0] < x[1])
+ if ((x[2] & x[3]) < 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041212-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041212-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041212-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041212-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+/* A function pointer compared with a void pointer should not be canonicalized.
+ See PR middle-end/17564. */
+void *f (void) __attribute__ ((__noinline__));
+void *
+f (void)
+{
+ return f;
+}
+int
+main (void)
+{
+ if (f () != f)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041213-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041213-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041213-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041213-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* PR tree-optimization/18694
+
+ The dominator optimization didn't take the PHI evaluation order
+ into account when threading an edge. */
+
+extern void abort (void) __attribute__((noreturn));
+extern void exit (int) __attribute__((noreturn));
+
+void __attribute__((noinline))
+foo (int i)
+{
+ int next_n = 1;
+ int j = 0;
+
+ for (; i != 0; i--)
+ {
+ int n;
+
+ for (n = next_n; j < n; j++)
+ next_n++;
+
+ if (j != n)
+ abort ();
+ }
+}
+
+int
+main (void)
+{
+ foo (2);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041214-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041214-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041214-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041214-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+/* { dg-require-effective-target indirect_jumps } */
+
+typedef long unsigned int size_t;
+extern void abort (void);
+extern char *strcpy (char *, const char *);
+extern int strcmp (const char *, const char *);
+typedef __builtin_va_list va_list;
+static const char null[] = "(null)";
+int g (char *s, const char *format, va_list ap)
+{
+ const char *f;
+ const char *string;
+ char spec;
+ static const void *step0_jumps[] = {
+ &&do_precision,
+ &&do_form_integer,
+ &&do_form_string,
+ };
+ f = format;
+ if (*f == '\0')
+ goto all_done;
+ do
+ {
+ spec = (*++f);
+ goto *(step0_jumps[2]);
+
+ /* begin switch table. */
+ do_precision:
+ ++f;
+ __builtin_va_arg (ap, int);
+ spec = *f;
+ goto *(step0_jumps[2]);
+
+ do_form_integer:
+ __builtin_va_arg (ap, unsigned long int);
+ goto end;
+
+ do_form_string:
+ string = __builtin_va_arg (ap, const char *);
+ strcpy (s, string);
+
+ /* End of switch table. */
+ end:
+ ++f;
+ }
+ while (*f != '\0');
+
+all_done:
+ return 0;
+}
+
+void
+f (char *s, const char *f, ...)
+{
+ va_list ap;
+ __builtin_va_start (ap, f);
+ g (s, f, ap);
+ __builtin_va_end (ap);
+}
+
+int
+main (void)
+{
+ char buf[10];
+ f (buf, "%s", "asdf", 0);
+ if (strcmp (buf, "asdf"))
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,117 @@
+/* PR rtl-optimization/16968 */
+/* Testcase by Jakub Jelinek <jakub at redhat.com> */
+
+struct T
+{
+ unsigned int b, c, *d;
+ unsigned char e;
+};
+struct S
+{
+ unsigned int a;
+ struct T f;
+};
+struct U
+{
+ struct S g, h;
+};
+struct V
+{
+ unsigned int i;
+ struct U j;
+};
+
+extern void exit (int);
+extern void abort (void);
+
+void *
+dummy1 (void *x)
+{
+ return "";
+}
+
+void *
+dummy2 (void *x, void *y)
+{
+ exit (0);
+}
+
+struct V *
+baz (unsigned int x)
+{
+ static struct V v;
+ __builtin_memset (&v, 0x55, sizeof (v));
+ return &v;
+}
+
+int
+check (void *x, struct S *y)
+{
+ if (y->a || y->f.b || y->f.c || y->f.d || y->f.e)
+ abort ();
+ return 1;
+}
+
+static struct V *
+bar (unsigned int x, void *y)
+{
+ const struct T t = { 0, 0, (void *) 0, 0 };
+ struct V *u;
+ void *v;
+ v = dummy1 (y);
+ if (!v)
+ return (void *) 0;
+
+ u = baz (sizeof (struct V));
+ u->i = x;
+ u->j.g.a = 0;
+ u->j.g.f = t;
+ u->j.h.a = 0;
+ u->j.h.f = t;
+
+ if (!check (v, &u->j.g) || !check (v, &u->j.h))
+ return (void *) 0;
+ return u;
+}
+
+int
+foo (unsigned int *x, unsigned int y, void **z)
+{
+ void *v;
+ unsigned int i, j;
+
+ *z = v = (void *) 0;
+
+ for (i = 0; i < y; i++)
+ {
+ struct V *c;
+
+ j = *x;
+
+ switch (j)
+ {
+ case 1:
+ c = bar (j, x);
+ break;
+ default:
+ c = 0;
+ break;
+ }
+ if (c)
+ v = dummy2 (v, c);
+ else
+ return 1;
+ }
+
+ *z = v;
+ return 0;
+}
+
+int
+main (void)
+{
+ unsigned int one = 1;
+ void *p;
+ foo (&one, 1, &p);
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20041218-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+extern void abort (void);
+
+int test(int n)
+{
+ struct s { char b[n]; } __attribute__((packed));
+ n++;
+ return sizeof(struct s);
+}
+
+int main()
+{
+ if (test(123) != 123)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050104-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050104-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050104-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050104-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* PR tree-optimization/19060 */
+
+void abort (void);
+
+static
+long long min ()
+{
+ return -__LONG_LONG_MAX__ - 1;
+}
+
+void
+foo (long long j)
+{
+ if (j > 10 || j < min ())
+ abort ();
+}
+
+int
+main (void)
+{
+ foo (10);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050106-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050106-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050106-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050106-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* PR tree-optimization/19283 */
+
+void abort (void);
+
+static inline unsigned short
+foo (unsigned int *p)
+{
+ return *p;
+};
+
+unsigned int u;
+
+int
+main ()
+{
+ if ((foo (&u) & 0x8000) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050107-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050107-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050107-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050107-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+typedef enum { C = 1, D = 2 } B;
+extern void abort (void);
+
+struct S
+{
+ B __attribute__ ((mode (byte))) a;
+ B __attribute__ ((mode (byte))) b;
+};
+
+void
+foo (struct S *x)
+{
+ if (x->a != C || x->b != D)
+ abort ();
+}
+
+int
+main (void)
+{
+ struct S s;
+ s.a = C;
+ s.b = D;
+ foo (&s);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050111-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050111-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050111-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050111-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+/* PR middle-end/19084, rtl-optimization/19348 */
+
+unsigned int
+foo (unsigned long long x)
+{
+ unsigned int u;
+
+ if (x == 0)
+ return 0;
+ u = (unsigned int) (x >> 32);
+ return u;
+}
+
+unsigned long long
+bar (unsigned short x)
+{
+ return (unsigned long long) x << 32;
+}
+
+extern void abort (void);
+
+int
+main (void)
+{
+ if (sizeof (long long) != 8)
+ return 0;
+
+ if (foo (0) != 0)
+ abort ();
+ if (foo (0xffffffffULL) != 0)
+ abort ();
+ if (foo (0x25ff00ff00ULL) != 0x25)
+ abort ();
+ if (bar (0) != 0)
+ abort ();
+ if (bar (0x25) != 0x2500000000ULL)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* PR c/19342 */
+typedef enum { A, B, C, D } E;
+
+struct S {
+ E __attribute__ ((mode (__byte__))) a;
+ E __attribute__ ((mode (__byte__))) b;
+ E __attribute__ ((mode (__byte__))) c;
+ E __attribute__ ((mode (__byte__))) d;
+};
+
+extern void abort (void);
+extern void exit (int);
+
+void
+foo (struct S *s)
+{
+ if (s->a != s->b)
+ abort ();
+ if (s->c != C)
+ abort ();
+}
+
+int
+main (void)
+{
+ struct S s[2];
+ s[0].a = B;
+ s[0].b = B;
+ s[0].c = C;
+ s[0].d = D;
+ s[1].a = D;
+ s[1].b = C;
+ s[1].c = B;
+ s[1].d = A;
+ foo (s);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050119-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+/* PR middle-end/19874 */
+typedef enum { A, B, C, D } E;
+
+struct S {
+ E __attribute__ ((mode (__byte__))) a;
+ E __attribute__ ((mode (__byte__))) b;
+ E __attribute__ ((mode (__byte__))) c;
+ E __attribute__ ((mode (__byte__))) d;
+};
+
+extern void abort (void);
+extern void exit (int);
+
+E
+foo (struct S *s)
+{
+ if (s->a != s->b)
+ abort ();
+ if (s->c != C)
+ abort ();
+ return s->d;
+}
+
+int
+main (void)
+{
+ struct S s[2];
+ s[0].a = B;
+ s[0].b = B;
+ s[0].c = C;
+ s[0].d = D;
+ s[1].a = D;
+ s[1].b = C;
+ s[1].c = B;
+ s[1].d = A;
+ if (foo (s) != D)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050121-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050121-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050121-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050121-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,63 @@
+/* PR middle-end/19551 */
+
+extern void abort ();
+
+#define T(type, name) \
+__attribute__((pure)) _Complex type \
+foo_##name (int x) \
+{ \
+ _Complex type r; \
+ __real r = x + 1; \
+ __imag r = x - 1; \
+ return r; \
+} \
+ \
+void \
+bar_##name (type *x) \
+{ \
+ *x = __real foo_##name (5); \
+} \
+ \
+void \
+baz_##name (type *x) \
+{ \
+ *x = __imag foo_##name (5); \
+}
+
+typedef long double ldouble_t;
+typedef long long llong;
+
+T (float, float)
+T (double, double)
+T (long double, ldouble_t)
+T (char, char)
+T (short, short)
+T (int, int)
+T (long, long)
+T (long long, llong)
+#undef T
+
+int
+main (void)
+{
+#define T(type, name) \
+ { \
+ type var = 0; \
+ bar_##name (&var); \
+ if (var != 6) \
+ abort (); \
+ var = 0; \
+ baz_##name (&var); \
+ if (var != 4) \
+ abort (); \
+ }
+ T (float, float)
+ T (double, double)
+ T (long double, ldouble_t)
+ T (char, char)
+ T (short, short)
+ T (int, int)
+ T (long, long)
+ T (long long, llong)
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050124-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050124-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050124-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050124-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+/* PR rtl-optimization/19579 */
+
+extern void abort (void);
+
+int
+foo (int i, int j)
+{
+ int k = i + 1;
+
+ if (j)
+ {
+ if (k > 0)
+ k++;
+ else if (k < 0)
+ k--;
+ }
+
+ return k;
+}
+
+int
+main (void)
+{
+ if (foo (-2, 0) != -1)
+ abort ();
+ if (foo (-1, 0) != 0)
+ abort ();
+ if (foo (0, 0) != 1)
+ abort ();
+ if (foo (1, 0) != 2)
+ abort ();
+ if (foo (-2, 1) != -2)
+ abort ();
+ if (foo (-1, 1) != 0)
+ abort ();
+ if (foo (0, 1) != 2)
+ abort ();
+ if (foo (1, 1) != 3)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050125-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050125-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050125-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050125-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* Verify that the CALL sideeffect isn't optimized away. */
+/* Contributed by Greg Parker 25 Jan 2005 <gparker at apple.com> */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+struct parse {
+ char *next;
+ char *end;
+ int error;
+};
+
+int seterr(struct parse *p, int err)
+{
+ p->error = err;
+ return 0;
+}
+
+void bracket_empty(struct parse *p)
+{
+ if (((p->next < p->end) && (*p->next++) == ']') || seterr(p, 7)) { }
+}
+
+int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
+{
+ struct parse p;
+ p.next = p.end = (char *)0x12345;
+
+ p.error = 0;
+ bracket_empty(&p);
+ if (p.error != 7)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050131-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050131-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050131-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050131-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+/* Verify that we do not lose side effects on a MOD expression. */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+foo (int a)
+{
+ int x = 0 % a++;
+ return a;
+}
+
+main()
+{
+ if (foo (9) != 10)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050203-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050203-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050203-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050203-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* Reduced testcase extracted from Samba source code. */
+
+#include <stdlib.h>
+
+static void __attribute__((__noinline__))
+ foo (unsigned char *p) {
+ *p = 0x81;
+}
+
+static void __attribute__((__noinline__))
+ bar (int x) {
+ asm ("");
+}
+
+int main() {
+ unsigned char b;
+
+ foo(&b);
+ if (b & 0x80)
+ {
+ bar (b & 0x7f);
+ exit (0);
+ }
+ else
+ {
+ bar (b & 1);
+ abort ();
+ }
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050215-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050215-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050215-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050215-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* PR middle-end/19857 */
+
+typedef struct { char c[8]; } V
+#ifdef __ELF__
+ __attribute__ ((aligned (8)))
+#endif
+ ;
+typedef __SIZE_TYPE__ size_t;
+V v;
+void abort (void);
+
+int
+main (void)
+{
+ V *w = &v;
+ if (((size_t) ((float *) ((size_t) w & ~(size_t) 3)) % 8) != 0
+ || ((size_t) w & 1))
+ {
+#ifndef __ELF__
+ if (((size_t) &v & 7) == 0)
+#endif
+ abort ();
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050218-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050218-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050218-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050218-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* PR tree-optimization/19828 */
+typedef __SIZE_TYPE__ size_t;
+extern size_t strlen (const char *s);
+extern int strncmp (const char *s1, const char *s2, size_t n);
+extern void abort (void);
+
+const char *a[16] = { "a", "bc", "de", "fgh" };
+
+int
+foo (char *x, const char *y, size_t n)
+{
+ size_t i, j = 0;
+ for (i = 0; i < n; i++)
+ {
+ if (strncmp (x + j, a[i], strlen (a[i])) != 0)
+ return 2;
+ j += strlen (a[i]);
+ if (y)
+ j += strlen (y);
+ }
+ return 0;
+}
+
+int
+main (void)
+{
+ if (foo ("abcde", (const char *) 0, 3) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050224-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050224-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050224-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050224-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* Origin: Mikael Pettersson <mikpe at csd.uu.se> and the Linux kernel. */
+
+extern void abort (void);
+unsigned long a = 0xc0000000, b = 0xd0000000;
+unsigned long c = 0xc01bb958, d = 0xc0264000;
+unsigned long e = 0xc0288000, f = 0xc02d4378;
+
+void
+foo (int x, int y, int z)
+{
+ if (x != 245 || y != 36 || z != 444)
+ abort ();
+}
+
+int
+main (void)
+{
+ unsigned long g;
+ int h = 0, i = 0, j = 0;
+
+ if (sizeof (unsigned long) < 4)
+ return 0;
+
+ for (g = a; g < b; g += 0x1000)
+ if (g < c)
+ h++;
+ else if (g >= d && g < e)
+ j++;
+ else if (g < f)
+ i++;
+ foo (i, j, h);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,71 @@
+/* PR rtl-optimization/16104 */
+/* { dg-require-effective-target int32plus } */
+/* { dg-options "-Wno-psabi" } */
+
+extern void abort (void);
+
+typedef int V2SI __attribute__ ((vector_size (8)));
+typedef unsigned int V2USI __attribute__ ((vector_size (8)));
+typedef short V2HI __attribute__ ((vector_size (4)));
+typedef unsigned int V2UHI __attribute__ ((vector_size (4)));
+
+int
+test1 (void)
+{
+ return (long long) (V2SI) 0LL;
+}
+
+int
+test2 (V2SI x)
+{
+ return (long long) x;
+}
+
+V2SI
+test3 (void)
+{
+ return (V2SI) (long long) (int) (V2HI) 0;
+}
+
+V2SI
+test4 (V2HI x)
+{
+ return (V2SI) (long long) (int) x;
+}
+
+V2SI
+test5 (V2USI x)
+{
+ return (V2SI) x;
+}
+
+int
+main (void)
+{
+ if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8)
+ return 0;
+
+ if (test1 () != 0)
+ abort ();
+
+ V2SI x = { 2, 2 };
+ if (test2 (x) != 2)
+ abort ();
+
+ union { V2SI x; int y[2]; V2USI z; long long l; } u;
+ u.x = test3 ();
+ if (u.y[0] != 0 || u.y[1] != 0)
+ abort ();
+
+ V2HI y = { 4, 4 };
+ union { V2SI x; long long y; } v;
+ v.x = test4 (y);
+ if (v.y != 0x40004)
+ abort ();
+
+ V2USI z = { 6, 6 };
+ u.x = test5 (z);
+ if (u.y[0] != 6 || u.y[1] != 6)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,54 @@
+/* This testcase generates MMX instructions together with x87 instructions.
+ Currently, there is no "emms" generated to switch between register sets,
+ so the testcase fails for targets where MMX insns are enabled. */
+/* { dg-options "-mno-mmx -Wno-psabi" { target { x86_64-*-* i?86-*-* } } } */
+
+extern void abort (void);
+
+typedef int V2SI __attribute__ ((vector_size (8)));
+typedef unsigned int V2USI __attribute__ ((vector_size (8)));
+typedef float V2SF __attribute__ ((vector_size (8)));
+typedef short V2HI __attribute__ ((vector_size (4)));
+typedef unsigned int V2UHI __attribute__ ((vector_size (4)));
+
+long long
+test1 (V2SF x)
+{
+ return (long long) (V2SI) x;
+}
+
+long long
+test2 (V2SF x)
+{
+ return (long long) x;
+}
+
+long long
+test3 (V2SI x)
+{
+ return (long long) (V2SF) x;
+}
+
+int
+main (void)
+{
+ if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8)
+ return 0;
+
+ V2SF x = { 2.0, 2.0 };
+ union { long long l; float f[2]; int i[2]; } u;
+ u.l = test1 (x);
+ if (u.f[0] != 2.0 || u.f[1] != 2.0)
+ abort ();
+
+ V2SF y = { 6.0, 6.0 };
+ u.l = test2 (y);
+ if (u.f[0] != 6.0 || u.f[1] != 6.0)
+ abort ();
+
+ V2SI z = { 4, 4 };
+ u.l = test3 (z);
+ if (u.i[0] != 4 || u.i[1] != 4)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050316-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* { dg-options "-Wno-psabi" } */
+extern void abort (void);
+
+typedef int V2SI __attribute__ ((vector_size (8)));
+typedef unsigned int V2USI __attribute__ ((vector_size (8)));
+typedef short V2HI __attribute__ ((vector_size (4)));
+typedef unsigned int V2UHI __attribute__ ((vector_size (4)));
+
+V2USI
+test1 (V2SI x)
+{
+ return (V2USI) (V2SI) (long long) x;
+}
+
+long long
+test2 (V2SI x)
+{
+ return (long long) (V2USI) (V2SI) (long long) x;
+}
+
+int
+main (void)
+{
+ if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8)
+ return 0;
+
+ union { V2SI x; int y[2]; V2USI z; long long l; } u;
+ V2SI a = { -3, -3 };
+ u.z = test1 (a);
+ if (u.y[0] != -3 || u.y[1] != -3)
+ abort ();
+
+ u.l = test2 (a);
+ if (u.y[0] != -3 || u.y[1] != -3)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050410-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050410-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050410-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050410-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+int s = 200;
+int __attribute__((noinline))
+foo (void)
+{
+ return (signed char) (s - 100) - 5;
+}
+int
+main (void)
+{
+ if (foo () != 95)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,67 @@
+/* PR rtl-optimization/21330 */
+
+extern void abort (void);
+extern int strcmp (const char *, const char *);
+
+int
+__attribute__((noinline))
+bar (const char **x)
+{
+ return *(*x)++;
+}
+
+int
+__attribute__((noinline))
+baz (int c)
+{
+ return c != '@';
+}
+
+void
+__attribute__((noinline))
+foo (const char **w, char *x, _Bool y, _Bool z)
+{
+ char c = bar (w);
+ int i = 0;
+
+ while (1)
+ {
+ x[i++] = c;
+ c = bar (w);
+ if (y && c == '\'')
+ break;
+ if (z && c == '\"')
+ break;
+ if (!y && !z && !baz (c))
+ break;
+ }
+ x[i] = 0;
+}
+
+int
+main (void)
+{
+ char buf[64];
+ const char *p;
+ p = "abcde'fgh";
+ foo (&p, buf, 1, 0);
+ if (strcmp (p, "fgh") != 0 || strcmp (buf, "abcde") != 0)
+ abort ();
+ p = "ABCDEFG\"HI";
+ foo (&p, buf, 0, 1);
+ if (strcmp (p, "HI") != 0 || strcmp (buf, "ABCDEFG") != 0)
+ abort ();
+ p = "abcd\"e'fgh";
+ foo (&p, buf, 1, 1);
+ if (strcmp (p, "e'fgh") != 0 || strcmp (buf, "abcd") != 0)
+ abort ();
+ p = "ABCDEF'G\"HI";
+ foo (&p, buf, 1, 1);
+ if (strcmp (p, "G\"HI") != 0 || strcmp (buf, "ABCDEF") != 0)
+ abort ();
+ p = "abcdef at gh";
+ foo (&p, buf, 0, 0);
+ if (strcmp (p, "gh") != 0 || strcmp (buf, "abcdef") != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050502-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+/* PR target/21297 */
+typedef __SIZE_TYPE__ size_t;
+extern int memcmp (const char *, const char *, size_t);
+extern void abort ();
+
+void
+foo (char *x)
+{
+ int i;
+ for (i = 0; i < 2; i++);
+ x[i + i] = '\0';
+}
+
+void
+bar (char *x)
+{
+ int i;
+ for (i = 0; i < 2; i++);
+ x[i + i + i + i] = '\0';
+}
+
+int
+main (void)
+{
+ char x[] = "IJKLMNOPQR";
+ foo (x);
+ if (memcmp (x, "IJKL\0NOPQR", sizeof x) != 0)
+ abort ();
+ x[4] = 'M';
+ bar (x);
+ if (memcmp (x, "IJKLMNOP\0R", sizeof x) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050604-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050604-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050604-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050604-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+/* PR regression/21897 */
+/* This testcase generates MMX instructions together with x87 instructions.
+ Currently, there is no "emms" generated to switch between register sets,
+ so the testcase fails for targets where MMX insns are enabled. */
+/* { dg-options "-mno-mmx" { target { x86_64-*-* i?86-*-* } } } */
+
+extern void abort (void);
+
+typedef unsigned short v4hi __attribute__ ((vector_size (8)));
+typedef float v4sf __attribute__ ((vector_size (16)));
+
+union
+{
+ v4hi v;
+ short s[4];
+} u;
+
+union
+{
+ v4sf v;
+ float f[4];
+} v;
+
+void
+foo (void)
+{
+ unsigned int i;
+ for (i = 0; i < 2; i++)
+ u.v += (v4hi) { 12, 32768 };
+ for (i = 0; i < 2; i++)
+ v.v += (v4sf) { 18.0, 20.0, 22 };
+}
+
+int
+main (void)
+{
+ foo ();
+ if (u.s[0] != 24 || u.s[1] != 0 || u.s[2] || u.s[3])
+ abort ();
+ if (v.f[0] != 36.0 || v.f[1] != 40.0 || v.f[2] != 44.0 || v.f[3] != 0.0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050607-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050607-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050607-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050607-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+/* PR middle-end/21850 */
+
+extern void abort (void);
+
+typedef int V2SI __attribute__ ((vector_size (8)));
+
+int
+main (void)
+{
+#if (__INT_MAX__ == 2147483647) \
+ && (__LONG_LONG_MAX__ == 9223372036854775807LL)
+ if (((int)(long long)(V2SI){ 2, 2 }) != 2)
+ abort ();
+#endif
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050613-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050613-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050613-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050613-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+/* PR tree-optimization/22043 */
+
+extern void abort (void);
+
+struct A { int i; int j; int k; int l; };
+struct B { struct A a; int r[1]; };
+struct C { struct A a; int r[0]; };
+struct D { struct A a; int r[]; };
+
+void
+foo (struct A *x)
+{
+ if (x->i != 0 || x->j != 5 || x->k != 0 || x->l != 0)
+ abort ();
+}
+
+int
+main ()
+{
+ struct B b = { .a.j = 5 };
+ struct C c = { .a.j = 5 };
+ struct D d = { .a.j = 5 };
+ foo (&b.a);
+ foo (&c.a);
+ foo (&d.a);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050713-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050713-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050713-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050713-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,56 @@
+/* Test that sibling call is not used if there is an argument overlap. */
+
+extern void abort (void);
+
+struct S
+{
+ int a, b, c;
+};
+
+int
+foo2 (struct S x, struct S y)
+{
+ if (x.a != 3 || x.b != 4 || x.c != 5)
+ abort ();
+ if (y.a != 6 || y.b != 7 || y.c != 8)
+ abort ();
+ return 0;
+}
+
+int
+foo3 (struct S x, struct S y, struct S z)
+{
+ foo2 (x, y);
+ if (z.a != 9 || z.b != 10 || z.c != 11)
+ abort ();
+ return 0;
+}
+
+int
+bar2 (struct S x, struct S y)
+{
+ return foo2 (y, x);
+}
+
+int
+bar3 (struct S x, struct S y, struct S z)
+{
+ return foo3 (y, x, z);
+}
+
+int
+baz3 (struct S x, struct S y, struct S z)
+{
+ return foo3 (y, z, x);
+}
+
+int
+main (void)
+{
+ struct S a = { 3, 4, 5 }, b = { 6, 7, 8 }, c = { 9, 10, 11 };
+
+ bar2 (b, a);
+ bar3 (b, a, c);
+ baz3 (c, a, b);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,44 @@
+/* PR rtl-optimization/23561 */
+
+struct A
+{
+ char a1[1];
+ char a2[5];
+ char a3[1];
+ char a4[2048 - 7];
+} a;
+
+typedef __SIZE_TYPE__ size_t;
+extern void *memset (void *, int, size_t);
+extern void *memcpy (void *, const void *, size_t);
+extern int memcmp (const void *, const void *, size_t);
+extern void abort (void);
+
+void
+bar (struct A *x)
+{
+ size_t i;
+ if (memcmp (x, "\1HELLO\1", sizeof "\1HELLO\1"))
+ abort ();
+ for (i = 0; i < sizeof (x->a4); i++)
+ if (x->a4[i])
+ abort ();
+}
+
+int
+foo (void)
+{
+ memset (&a, 0, sizeof (a));
+ a.a1[0] = 1;
+ memcpy (a.a2, "HELLO", sizeof "HELLO");
+ a.a3[0] = 1;
+ bar (&a);
+ return 0;
+}
+
+int
+main (void)
+{
+ foo ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050826-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,62 @@
+/* PR rtl-optimization/23560 */
+
+struct rtattr
+{
+ unsigned short rta_len;
+ unsigned short rta_type;
+};
+
+__attribute__ ((noinline))
+int inet_check_attr (void *r, struct rtattr **rta)
+{
+ int i;
+
+ for (i = 1; i <= 14; i++)
+ {
+ struct rtattr *attr = rta[i - 1];
+ if (attr)
+ {
+ if (attr->rta_len - sizeof (struct rtattr) < 4)
+ return -22;
+ if (i != 9 && i != 8)
+ rta[i - 1] = attr + 1;
+ }
+ }
+ return 0;
+}
+
+extern void abort (void);
+
+int
+main (void)
+{
+ struct rtattr rt[2];
+ struct rtattr *rta[14];
+ int i;
+
+ rt[0].rta_len = sizeof (struct rtattr) + 8;
+ rt[0].rta_type = 0;
+ rt[1] = rt[0];
+ for (i = 0; i < 14; i++)
+ rta[i] = &rt[0];
+ if (inet_check_attr (0, rta) != 0)
+ abort ();
+ for (i = 0; i < 14; i++)
+ if (rta[i] != &rt[i != 7 && i != 8])
+ abort ();
+ for (i = 0; i < 14; i++)
+ rta[i] = &rt[0];
+ rta[1] = 0;
+ rt[1].rta_len -= 8;
+ rta[5] = &rt[1];
+ if (inet_check_attr (0, rta) != -22)
+ abort ();
+ for (i = 0; i < 14; i++)
+ if (i == 1 && rta[i] != 0)
+ abort ();
+ else if (i != 1 && i <= 5 && rta[i] != &rt[1])
+ abort ();
+ else if (i > 5 && rta[i] != &rt[0])
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050929-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050929-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050929-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20050929-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+/* PR middle-end/24109 */
+
+extern void abort (void);
+
+struct A { int i; int j; };
+struct B { struct A *a; struct A *b; };
+struct C { struct B *c; struct A *d; };
+struct C e = { &(struct B) { &(struct A) { 1, 2 }, &(struct A) { 3, 4 } }, &(struct A) { 5, 6 } };
+
+int
+main (void)
+{
+ if (e.c->a->i != 1 || e.c->a->j != 2)
+ abort ();
+ if (e.c->b->i != 3 || e.c->b->j != 4)
+ abort ();
+ if (e.d->i != 5 || e.d->j != 6)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051012-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051012-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051012-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051012-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* { dg-require-effective-target untyped_assembly } */
+extern void abort (void);
+
+struct type
+{
+ int *a;
+
+ int b:16;
+ unsigned int p:9;
+} t;
+
+unsigned int
+foo ()
+{
+ return t.p;
+}
+
+int
+main (void)
+{
+ t.p = 8;
+ if (foo (t) != 8)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051021-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051021-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051021-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051021-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* Verify that TRUTH_AND_EXPR is not wrongly changed to TRUTH_ANDIF_EXPR. */
+
+extern void abort (void);
+
+int count = 0;
+
+int foo1(void)
+{
+ count++;
+ return 0;
+}
+
+int foo2(void)
+{
+ count++;
+ return 0;
+}
+
+int main(void)
+{
+ if ((foo1() == 1) & (foo2() == 1))
+ abort ();
+
+ if (count != 2)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051104-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051104-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051104-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051104-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* PR rtl-optimization/23567 */
+
+struct
+{
+ int len;
+ char *name;
+} s;
+
+int
+main (void)
+{
+ s.len = 0;
+ s.name = "";
+ if (s.name [s.len] != 0)
+ s.name [s.len] = 0;
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+void add_unwind_adjustsp (long);
+void abort (void);
+
+unsigned char bytes[5];
+
+void
+add_unwind_adjustsp (long offset)
+{
+ int n;
+ unsigned long o;
+
+ o = (long) ((offset - 0x204) >> 2);
+
+ n = 0;
+ while (o)
+ {
+ bytes[n] = o & 0x7f;
+ o >>= 7;
+ if (o)
+ bytes[n] |= 0x80;
+ n++;
+ }
+}
+
+int main(void)
+{
+ add_unwind_adjustsp (4132);
+ if (bytes[0] != 0x88 || bytes[1] != 0x07)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051110-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+void add_unwind_adjustsp (long);
+void abort (void);
+
+unsigned char bytes[5];
+
+int flag;
+
+void
+add_unwind_adjustsp (long offset)
+{
+ int n;
+ unsigned long o;
+
+ o = (long) ((offset - 0x204) >> 2);
+
+ n = 0;
+ do
+ {
+a:
+ bytes[n] = o & 0x7f;
+ o >>= 7;
+ if (o)
+ {
+ bytes[n] |= 0x80;
+ if (flag)
+ goto a;
+ }
+ n++;
+ }
+ while (o);
+}
+
+int main(void)
+{
+ add_unwind_adjustsp (4132);
+ if (bytes[0] != 0x88 || bytes[1] != 0x07)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051113-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051113-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051113-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051113-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,71 @@
+extern void *malloc(__SIZE_TYPE__);
+extern void *memset(void *, int, __SIZE_TYPE__);
+typedef struct
+{
+ short a;
+ unsigned short b;
+ unsigned short c;
+ unsigned long long Count;
+ long long Count2;
+} __attribute__((packed)) Struct1;
+
+typedef struct
+{
+ short a;
+ unsigned short b;
+ unsigned short c;
+ unsigned long long d;
+ long long e;
+ long long f;
+} __attribute__((packed)) Struct2;
+
+typedef union
+{
+ Struct1 a;
+ Struct2 b;
+} Union;
+
+typedef struct
+{
+ int Count;
+ Union List[0];
+} __attribute__((packed)) Struct3;
+
+unsigned long long Sum (Struct3 *instrs) __attribute__((noinline));
+unsigned long long Sum (Struct3 *instrs)
+{
+ unsigned long long count = 0;
+ int i;
+
+ for (i = 0; i < instrs->Count; i++) {
+ count += instrs->List[i].a.Count;
+ }
+ return count;
+}
+long long Sum2 (Struct3 *instrs) __attribute__((noinline));
+long long Sum2 (Struct3 *instrs)
+{
+ long long count = 0;
+ int i;
+
+ for (i = 0; i < instrs->Count; i++) {
+ count += instrs->List[i].a.Count2;
+ }
+ return count;
+}
+main() {
+ Struct3 *p = malloc (sizeof (int) + 3 * sizeof(Union));
+ memset(p, 0, sizeof(int) + 3*sizeof(Union));
+ p->Count = 3;
+ p->List[0].a.Count = 555;
+ p->List[1].a.Count = 999;
+ p->List[2].a.Count = 0x101010101ULL;
+ p->List[0].a.Count2 = 555;
+ p->List[1].a.Count2 = 999;
+ p->List[2].a.Count2 = 0x101010101LL;
+ if (Sum(p) != 555 + 999 + 0x101010101ULL)
+ abort();
+ if (Sum2(p) != 555 + 999 + 0x101010101LL)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051215-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051215-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051215-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20051215-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/24899 */
+
+extern void abort (void);
+
+__attribute__ ((noinline)) int
+foo (int x, int y, int *z)
+{
+ int a, b, c, d;
+
+ a = b = 0;
+ for (d = 0; d < y; d++)
+ {
+ if (z)
+ b = d * *z;
+ for (c = 0; c < x; c++)
+ a += b;
+ }
+
+ return a;
+}
+
+int
+main (void)
+{
+ if (foo (3, 2, 0) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060102-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060102-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060102-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060102-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+extern void abort ();
+
+int f(int x)
+{
+ return (x >> (sizeof (x) * __CHAR_BIT__ - 1)) ? -1 : 1;
+}
+
+volatile int one = 1;
+int main (void)
+{
+ /* Test that the function above returns different values for
+ different signs. */
+ if (f(one) == f(-one))
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+extern void abort (void);
+
+long long
+f (long long a)
+{
+ return (a << 32) >> 32;
+}
+long long a = 0x1234567876543210LL;
+long long b = (0x1234567876543210LL << 32) >> 32;
+int
+main ()
+{
+ if (f (a) != b)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060110-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+extern void abort (void);
+
+long long
+f (long long a, long long b)
+{
+ return ((a + b) << 32) >> 32;
+}
+
+long long a = 0x1234567876543210LL;
+long long b = 0x2345678765432101LL;
+long long c = ((0x1234567876543210LL + 0x2345678765432101LL) << 32) >> 32;
+
+int
+main ()
+{
+ if (f (a, b) != c)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060127-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060127-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060127-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060127-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+void abort ();
+
+void
+f (long long a)
+{
+ if ((a & 0xffffffffLL) != 0)
+ abort ();
+}
+
+long long a = 0x1234567800000000LL;
+
+int
+main ()
+{
+ f (a);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060412-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060412-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060412-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060412-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+extern void abort (void);
+
+struct S
+{
+ long o;
+};
+
+struct T
+{
+ long o;
+ struct S m[82];
+};
+
+struct T t;
+
+int
+main ()
+{
+ struct S *p, *q;
+
+ p = (struct S *) &t;
+ p = &((struct T *) p)->m[0];
+ q = p + 82;
+ while (--q > p)
+ q->o = -1;
+ q->o = 0;
+
+ if (q > p)
+ abort ();
+ if (q - p > 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060420-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060420-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060420-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060420-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,73 @@
+extern void abort (void);
+
+typedef float v4flt __attribute__ ((vector_size (16)));
+
+void __attribute__ ((noinline)) foo (float *dst, float **src, int a, int n)
+{
+ int i, j;
+ int z = sizeof (v4flt) / sizeof (float);
+ unsigned m = sizeof (v4flt) - 1;
+
+ for (j = 0; j < n && (((unsigned long) dst + j) & m); ++j)
+ {
+ float t = src[0][j];
+ for (i = 1; i < a; ++i)
+ t += src[i][j];
+ dst[j] = t;
+ }
+
+ for (; j < (n - (4 * z - 1)); j += 4 * z)
+ {
+ v4flt t0 = *(v4flt *) (src[0] + j + 0 * z);
+ v4flt t1 = *(v4flt *) (src[0] + j + 1 * z);
+ v4flt t2 = *(v4flt *) (src[0] + j + 2 * z);
+ v4flt t3 = *(v4flt *) (src[0] + j + 3 * z);
+ for (i = 1; i < a; ++i)
+ {
+ t0 += *(v4flt *) (src[i] + j + 0 * z);
+ t1 += *(v4flt *) (src[i] + j + 1 * z);
+ t2 += *(v4flt *) (src[i] + j + 2 * z);
+ t3 += *(v4flt *) (src[i] + j + 3 * z);
+ }
+ *(v4flt *) (dst + j + 0 * z) = t0;
+ *(v4flt *) (dst + j + 1 * z) = t1;
+ *(v4flt *) (dst + j + 2 * z) = t2;
+ *(v4flt *) (dst + j + 3 * z) = t3;
+ }
+ for (; j < n; ++j)
+ {
+ float t = src[0][j];
+ for (i = 1; i < a; ++i)
+ t += src[i][j];
+ dst[j] = t;
+ }
+}
+
+float buffer[64];
+
+int
+main (void)
+{
+ int i;
+ float *dst, *src[2];
+ char *cptr;
+
+ cptr = (char *)buffer;
+ cptr += (-(long int) buffer & (16 * sizeof (float) - 1));
+ dst = (float *)cptr;
+ src[0] = dst + 16;
+ src[1] = dst + 32;
+ for (i = 0; i < 16; ++i)
+ {
+ src[0][i] = (float) i + 11 * (float) i;
+ src[1][i] = (float) i + 12 * (float) i;
+ }
+ foo (dst, src, 2, 16);
+ for (i = 0; i < 16; ++i)
+ {
+ float e = (float) i + 11 * (float) i + (float) i + 12 * (float) i;
+ if (dst[i] != e)
+ abort ();
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060905-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060905-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060905-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060905-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* PR rtl-optimization/28386 */
+/* Origin: Volker Reichelt <reichelt at gcc.gnu.org> */
+
+extern void abort(void);
+
+volatile char s[256][3];
+
+char g;
+
+static void dummy(char a)
+{
+ g = a;
+}
+
+static int foo(void)
+{
+ int i, j=0;
+
+ for (i = 0; i < 256; i++)
+ if (i >= 128 && i < 256)
+ {
+ dummy (s[i - 128][0]);
+ ++j;
+ }
+
+ return j;
+}
+
+int main(void)
+{
+ if (foo () != 128)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060910-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060910-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060910-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060910-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* PR rtl-optimization/28636 */
+/* Origin: Andreas Schwab <schwab at suse.de> */
+
+extern void abort(void);
+
+struct input_ty
+{
+ unsigned char *buffer_position;
+ unsigned char *buffer_end;
+};
+
+int input_getc_complicated (struct input_ty *x) { return 0; }
+
+int check_header (struct input_ty *deeper)
+{
+ unsigned len;
+ for (len = 0; len < 6; len++)
+ if (((deeper)->buffer_position < (deeper)->buffer_end
+ ? *((deeper)->buffer_position)++
+ : input_getc_complicated((deeper))) < 0)
+ return 0;
+ return 1;
+}
+
+struct input_ty s;
+unsigned char b[6];
+
+int main (void)
+{
+ s.buffer_position = b;
+ s.buffer_end = b + sizeof b;
+ if (!check_header(&s))
+ abort();
+ if (s.buffer_position != s.buffer_end)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060929-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060929-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060929-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060929-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,44 @@
+/* PR c/29154 */
+
+extern void abort (void);
+
+void
+foo (int **p, int *q)
+{
+ *(*p++)++ = *q++;
+}
+
+void
+bar (int **p, int *q)
+{
+ **p = *q++;
+ *(*p++)++;
+}
+
+void
+baz (int **p, int *q)
+{
+ **p = *q++;
+ (*p++)++;
+}
+
+int
+main (void)
+{
+ int i = 42, j = 0;
+ int *p = &i;
+ foo (&p, &j);
+ if (p - 1 != &i || j != 0 || i != 0)
+ abort ();
+ i = 43;
+ p = &i;
+ bar (&p, &j);
+ if (p - 1 != &i || j != 0 || i != 0)
+ abort ();
+ i = 44;
+ p = &i;
+ baz (&p, &j);
+ if (p - 1 != &i || j != 0 || i != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,42 @@
+/* PR rtl-optimization/28096 */
+/* Origin: Jan Stein <jan at gatespacetelematics.com> */
+
+extern void abort (void);
+
+int bar (int, int) __attribute__((noinline));
+int bar (int a, int b)
+{
+ if (b != 1)
+ abort ();
+}
+
+void foo(int, int) __attribute__((noinline));
+void foo (int e, int n)
+{
+ int i, bb2, bb5;
+
+ if (e > 0)
+ e = -e;
+
+ for (i = 0; i < n; i++)
+ {
+ if (e >= 0)
+ {
+ bb2 = 0;
+ bb5 = 0;
+ }
+ else
+ {
+ bb5 = -e;
+ bb2 = bb5;
+ }
+
+ bar (bb5, bb2);
+ }
+}
+
+int main(void)
+{
+ foo (1, 1);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20060930-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+/* PR middle-end/29272 */
+
+extern void abort (void);
+
+struct S { struct S *s; } s;
+struct T { struct T *t; } t;
+
+static inline void
+foo (void *s)
+{
+ struct T *p = s;
+ __builtin_memcpy (&p->t, &t.t, sizeof (t.t));
+}
+
+void *
+__attribute__((noinline))
+bar (void *p, struct S *q)
+{
+ q->s = &s;
+ foo (p);
+ return q->s;
+}
+
+int
+main (void)
+{
+ t.t = &t;
+ if (bar (&s, &s) != (void *) &t)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061031-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061031-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061031-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061031-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/29631 */
+/* Origin: Falk Hueffner <falk at debian.org> */
+
+const signed char nunmap[] = { 17, -1, 1 };
+
+__attribute__((noinline))
+void ff(int i) {
+ asm volatile("");
+}
+
+__attribute__((noinline))
+void f(short delta)
+{
+ short p0 = 2, s;
+ for (s = 0; s < 2; s++)
+ {
+ p0 += delta;
+ ff(s);
+ if (nunmap[p0] == 17)
+ asm volatile("");
+ }
+}
+
+int main(void)
+{
+ f(-1);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* PR rtl-optimization/28970 */
+/* Origin: Peter Bergner <bergner at vnet.ibm.com> */
+/* { dg-require-effective-target int32plus } */
+
+extern void abort (void);
+
+int tar (int i)
+{
+ if (i != 36863)
+ abort ();
+
+ return -1;
+}
+
+void bug(int q, int bcount)
+{
+ int j = 0;
+ int outgo = 0;
+
+ while(j != -1)
+ {
+ outgo++;
+ if (outgo > q-1)
+ outgo = q-1;
+ j = tar (outgo*bcount);
+ }
+}
+
+int main(void)
+{
+ bug(5, 36863);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061101-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* PR rtl-optimization/28970 */
+/* Origin: Peter Bergner <bergner at vnet.ibm.com> */
+
+extern void abort (void);
+
+int tar (long i)
+{
+ if (i != 36863)
+ abort ();
+
+ return -1;
+}
+
+void bug(int q, long bcount)
+{
+ int j = 0;
+ int outgo = 0;
+
+ while(j != -1)
+ {
+ outgo++;
+ if (outgo > q-1)
+ outgo = q-1;
+ j = tar (outgo*bcount);
+ }
+}
+
+int main(void)
+{
+ bug(5, 36863);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061220-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061220-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061220-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20061220-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,73 @@
+/* PR middle-end/30262 */
+/* { dg-skip-if "asm statements do not work as expected" { rl78-*-* } } */
+extern void abort (void);
+
+int
+foo (void)
+{
+ unsigned int x = 0;
+
+ void nested (void)
+ {
+ x = 254;
+ }
+
+ nested ();
+ asm volatile ("" :: "r" (x));
+ asm volatile ("" :: "m" (x));
+ asm volatile ("" :: "mr" (x));
+ asm volatile ("" : "=r" (x) : "0" (x));
+ asm volatile ("" : "=m" (x) : "m" (x));
+ return x;
+}
+
+int
+bar (void)
+{
+ unsigned int x = 0;
+
+ void nested (void)
+ {
+ asm volatile ("" :: "r" (x));
+ asm volatile ("" :: "m" (x));
+ asm volatile ("" :: "mr" (x));
+ x += 4;
+ asm volatile ("" : "=r" (x) : "0" (x));
+ asm volatile ("" : "=m" (x) : "m" (x));
+ }
+
+ nested ();
+ return x;
+}
+
+int
+baz (void)
+{
+ unsigned int x = 0;
+
+ void nested (void)
+ {
+ void nested2 (void)
+ {
+ asm volatile ("" :: "r" (x));
+ asm volatile ("" :: "m" (x));
+ asm volatile ("" :: "mr" (x));
+ x += 4;
+ asm volatile ("" : "=r" (x) : "0" (x));
+ asm volatile ("" : "=m" (x) : "m" (x));
+ }
+ nested2 ();
+ nested2 ();
+ }
+
+ nested ();
+ return x;
+}
+
+int
+main (void)
+{
+ if (foo () != 254 || bar () != 4 || baz () != 8)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070201-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070201-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070201-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070201-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+/* PR middle-end/30473 */
+
+extern int sprintf (char *, const char *, ...);
+extern void abort (void);
+
+char *
+foo (char *buf, char *p)
+{
+ sprintf (buf, "abcde", p++);
+ return p;
+}
+
+int
+main (void)
+{
+ char buf[6];
+ if (foo (buf, &buf[2]) != &buf[3])
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+struct f
+{
+ int i;
+};
+
+int g(int i, int c, struct f *ff, int *p)
+{
+ int *t;
+ if (c)
+ t = &i;
+ else
+ t = &ff->i;
+ *p = 0;
+ return *t;
+}
+
+extern void abort(void);
+
+int main()
+{
+ struct f f;
+ f.i = 1;
+ if (g(5, 0, &f, &f.i) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+int f(int k, int i1, int j1)
+{
+ int *f1;
+ if(k)
+ f1 = &i1;
+ else
+ f1 = &j1;
+ i1 = 0;
+ return *f1;
+}
+
+extern void abort (void);
+
+int main()
+{
+ if (f(1, 1, 2) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070212-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+struct foo { int i; int j; };
+
+int bar (struct foo *k, int k2, int f, int f2)
+{
+ int *p, *q;
+ int res;
+ if (f)
+ p = &k->i;
+ else
+ p = &k->j;
+ res = *p;
+ k->i = 1;
+ if (f2)
+ q = p;
+ else
+ q = &k2;
+ return res + *q;
+}
+
+extern void abort (void);
+
+int main()
+{
+ struct foo k;
+ k.i = 0;
+ k.j = 1;
+ if (bar (&k, 1, 1, 1) != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070424-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070424-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070424-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070424-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+extern void abort (void);
+extern void exit (int);
+
+void do_exit (void) { exit (0); }
+void do_abort (void) { abort (); }
+
+void foo (int x, int a)
+{
+ if (x < a)
+ goto doit;
+ do_exit ();
+ if (x != a)
+ goto doit;
+
+ /* else */
+ do_abort ();
+ return;
+
+doit:
+ do_abort ();
+}
+
+int main()
+{
+ foo (1, 0);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070517-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070517-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070517-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070517-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+/* PR rtl-optimization/31691 */
+/* Origin: Chi-Hua Chen <stephaniechc-gccbug at yahoo.com> */
+
+extern void abort (void);
+
+static int get_kind(int) __attribute__ ((noinline));
+
+static int get_kind(int v)
+{
+ volatile int k = v;
+ return k;
+}
+
+static int some_call(void) __attribute__ ((noinline));
+
+static int some_call(void)
+{
+ return 0;
+}
+
+static void example (int arg)
+{
+ int tmp, kind = get_kind (arg);
+
+ if (kind == 9 || kind == 10 || kind == 5)
+ {
+ if (some_call() == 0)
+ {
+ if (kind == 9 || kind == 10)
+ tmp = arg;
+ else
+ abort();
+ }
+ }
+}
+
+int main(void)
+{
+ example(10);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070614-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070614-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070614-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070614-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+extern void abort (void);
+
+_Complex v = 3.0 + 1.0iF;
+
+void
+foo (_Complex z, int *x)
+{
+ if (z != v)
+ abort ();
+}
+
+_Complex bar (_Complex z) __attribute__ ((pure));
+_Complex
+bar (_Complex z)
+{
+ return v;
+}
+
+int
+baz (void)
+{
+ int a, i;
+ for (i = 0; i < 6; i++)
+ foo (bar (1.0iF * i), &a);
+ return 0;
+}
+
+int
+main ()
+{
+ baz ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070623-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070623-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070623-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070623-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+#include <limits.h>
+
+int __attribute__((noinline)) nge(int a, int b) {return -(a >= b);}
+int __attribute__((noinline)) ngt(int a, int b) {return -(a > b);}
+int __attribute__((noinline)) nle(int a, int b) {return -(a <= b);}
+int __attribute__((noinline)) nlt(int a, int b) {return -(a < b);}
+int __attribute__((noinline)) neq(int a, int b) {return -(a == b);}
+int __attribute__((noinline)) nne(int a, int b) {return -(a != b);}
+int __attribute__((noinline)) ngeu(unsigned a, unsigned b) {return -(a >= b);}
+int __attribute__((noinline)) ngtu(unsigned a, unsigned b) {return -(a > b);}
+int __attribute__((noinline)) nleu(unsigned a, unsigned b) {return -(a <= b);}
+int __attribute__((noinline)) nltu(unsigned a, unsigned b) {return -(a < b);}
+
+
+int main()
+{
+ if (nge(INT_MIN, INT_MAX) != 0) abort();
+ if (nge(INT_MAX, INT_MIN) != -1) abort();
+ if (ngt(INT_MIN, INT_MAX) != 0) abort();
+ if (ngt(INT_MAX, INT_MIN) != -1) abort();
+ if (nle(INT_MIN, INT_MAX) != -1) abort();
+ if (nle(INT_MAX, INT_MIN) != 0) abort();
+ if (nlt(INT_MIN, INT_MAX) != -1) abort();
+ if (nlt(INT_MAX, INT_MIN) != 0) abort();
+
+ if (neq(INT_MIN, INT_MAX) != 0) abort();
+ if (neq(INT_MAX, INT_MIN) != 0) abort();
+ if (nne(INT_MIN, INT_MAX) != -1) abort();
+ if (nne(INT_MAX, INT_MIN) != -1) abort();
+
+ if (ngeu(0, ~0U) != 0) abort();
+ if (ngeu(~0U, 0) != -1) abort();
+ if (ngtu(0, ~0U) != 0) abort();
+ if (ngtu(~0U, 0) != -1) abort();
+ if (nleu(0, ~0U) != -1) abort();
+ if (nleu(~0U, 0) != 0) abort();
+ if (nltu(0, ~0U) != -1) abort();
+ if (nltu(~0U, 0) != 0) abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070724-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070724-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070724-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070724-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+void abort (void);
+
+static unsigned char magic[] = "\235";
+static unsigned char value = '\235';
+
+int main()
+{
+ if (value != magic[0])
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070824-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070824-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070824-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070824-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* PR tree-optimization/33136 */
+/* { dg-require-effective-target alloca } */
+
+extern void abort (void);
+
+struct S
+{
+ struct S *a;
+ int b;
+};
+
+int
+main (void)
+{
+ struct S *s = (struct S *) 0, **p, *n;
+ for (p = &s; *p; p = &(*p)->a);
+ n = (struct S *) __builtin_alloca (sizeof (*n));
+ n->a = *p;
+ n->b = 1;
+ *p = n;
+
+ if (!s)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070919-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070919-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070919-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20070919-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,42 @@
+/* PR c/33238 */
+/* { dg-require-effective-target alloca } */
+
+typedef __SIZE_TYPE__ size_t;
+int memcmp (const void *, const void *, size_t);
+void abort (void);
+
+void
+__attribute__((noinline))
+bar (void *x, void *y)
+{
+ struct S { char w[8]; } *p = x, *q = y;
+ if (memcmp (p->w, "zyxwvut", 8) != 0)
+ abort ();
+ if (memcmp (q[0].w, "abcdefg", 8) != 0)
+ abort ();
+ if (memcmp (q[1].w, "ABCDEFG", 8) != 0)
+ abort ();
+ if (memcmp (q[2].w, "zyxwvut", 8) != 0)
+ abort ();
+ if (memcmp (q[3].w, "zyxwvut", 8) != 0)
+ abort ();
+}
+
+void
+__attribute__((noinline))
+foo (void *x, int y)
+{
+ struct S { char w[y]; } *p = x, a;
+ int i;
+ a = ({ struct S b; b = p[2]; p[3] = b; });
+ bar (&a, x);
+}
+
+int
+main (void)
+{
+ struct S { char w[8]; } p[4]
+ = { "abcdefg", "ABCDEFG", "zyxwvut", "ZYXWVUT" };
+ foo (p, 8);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071011-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071011-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071011-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071011-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+extern void abort(void);
+void foo(int *p)
+{
+ int x;
+ int y;
+ x = *p;
+ *p = 0;
+ y = *p;
+ if (x != y)
+ return;
+ abort ();
+}
+
+int main()
+{
+ int a = 1;
+ foo(&a);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071018-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071018-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071018-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071018-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+extern void abort(void);
+
+struct foo {
+ int rank;
+ char *name;
+};
+
+struct mem {
+ struct foo *x[4];
+};
+
+void __attribute__((noinline)) bar(struct foo **f)
+{
+ *f = __builtin_malloc(sizeof(struct foo));
+}
+struct foo * __attribute__((noinline, noclone)) foo(int rank)
+{
+ void *x = __builtin_malloc(sizeof(struct mem));
+ struct mem *as = x;
+ struct foo **upper = &as->x[rank * 8 - 5];
+ *upper = 0;
+ bar(upper);
+ return *upper;
+}
+
+int main()
+{
+ if (foo(1) == 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071029-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071029-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071029-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071029-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,56 @@
+extern void exit (int);
+extern void abort (void);
+
+typedef union
+{
+ struct
+ {
+ int f1, f2, f3, f4, f5, f6, f7, f8;
+ long int f9, f10;
+ int f11;
+ } f;
+ char s[56];
+ long int a;
+} T;
+
+__attribute__((noinline))
+void
+test (T *t)
+{
+ static int i = 11;
+ if (t->f.f1 != i++)
+ abort ();
+ if (t->f.f2 || t->f.f3 || t->f.f4 || t->f.f5 || t->f.f6
+ || t->f.f7 || t->f.f8 || t->f.f9 || t->f.f10 || t->f.f11)
+ abort ();
+ if (i == 20)
+ exit (0);
+}
+
+__attribute__((noinline))
+void
+foo (int i)
+{
+ T t;
+again:
+ t = (T) { { ++i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
+ test (&t);
+ goto again;
+}
+
+int
+main (void)
+{
+ T *t1, *t2;
+ int cnt = 0;
+ t1 = (T *) 0;
+loop:
+ t2 = t1;
+ t1 = & (T) { .f.f9 = cnt++ };
+ if (cnt < 3)
+ goto loop;
+ if (t1 != t2 || t1->f.f9 != 2)
+ abort ();
+ foo (10);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071030-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071030-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071030-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071030-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,79 @@
+/* PR target/11044 */
+/* Originator: Tim McGrath <misty- at charter.net> */
+/* Testcase contributed by Eric Botcazou <ebotcazou at libertysurf.fr> */
+
+/* Testcase copied from gcc.target/i386/loop-3.c */
+
+extern void *memset (void *, int, __SIZE_TYPE__);
+extern void abort (void);
+
+typedef struct
+{
+ unsigned char colormod;
+} entity_state_t;
+
+typedef struct
+{
+ int num_entities;
+ entity_state_t *entities;
+} packet_entities_t;
+
+typedef struct
+{
+ double senttime;
+ float ping_time;
+ packet_entities_t entities;
+} client_frame_t;
+
+typedef enum
+{
+ cs_free,
+ cs_server,
+ cs_zombie,
+ cs_connected,
+ cs_spawned
+} sv_client_state_t;
+
+typedef struct client_s
+{
+ sv_client_state_t state;
+ int ping;
+ client_frame_t frames[64];
+} client_t;
+
+int CalcPing (client_t *cl)
+{
+ float ping;
+ int count, i;
+ register client_frame_t *frame;
+
+ if (cl->state == cs_server)
+ return cl->ping;
+ ping = 0;
+ count = 0;
+ for (frame = cl->frames, i = 0; i < 64; i++, frame++) {
+ if (frame->ping_time > 0) {
+ ping += frame->ping_time;
+ count++;
+ }
+ }
+ if (!count)
+ return 9999;
+ ping /= count;
+
+ return ping * 1000;
+}
+
+int main(void)
+{
+ client_t cl;
+
+ memset(&cl, 0, sizeof(cl));
+
+ cl.frames[0].ping_time = 1.0f;
+
+ if (CalcPing(&cl) != 1000)
+ abort();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071108-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071108-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071108-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071108-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,53 @@
+/* PR tree-optimization/32575 */
+
+extern void abort (void);
+
+struct S
+{
+ void *s1, *s2;
+ unsigned char s3, s4, s5;
+};
+
+__attribute__ ((noinline))
+void *
+foo (void)
+{
+ static struct S s;
+ return &s;
+}
+
+__attribute__ ((noinline))
+void *
+bar ()
+{
+ return (void *) 0;
+}
+
+__attribute__ ((noinline))
+struct S *
+test (void *a, void *b)
+{
+ struct S *p, q;
+ p = foo ();
+ if (p == 0)
+ {
+ p = &q;
+ __builtin_memset (p, 0, sizeof (*p));
+ }
+ p->s1 = a;
+ p->s2 = b;
+ if (p == &q)
+ p = 0;
+ return p;
+}
+
+int
+main (void)
+{
+ int a;
+ int b;
+ struct S *z = test ((void *) &a, (void *) &b);
+ if (z == 0 || z->s1 != (void *) &a || z->s2 != (void *) &b || z->s3 || z->s4)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071120-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071120-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071120-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071120-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,81 @@
+extern void abort (void);
+
+void __attribute__((noinline,noreturn))
+vec_assert_fail (void)
+{
+ abort ();
+}
+
+struct ggc_root_tab {
+ void *base;
+};
+
+typedef struct deferred_access_check {} VEC_deferred_access_check_gc;
+
+typedef struct deferred_access {
+ VEC_deferred_access_check_gc* deferred_access_checks;
+ int deferring_access_checks_kind;
+} deferred_access;
+
+typedef struct VEC_deferred_access_base {
+ unsigned num;
+ deferred_access vec[1];
+} VEC_deferred_access_base;
+
+static __inline__ deferred_access *
+VEC_deferred_access_base_last (VEC_deferred_access_base *vec_)
+{
+ (void)((vec_ && vec_->num) ? 0 : (vec_assert_fail (), 0));
+ return &vec_->vec[vec_->num - 1];
+}
+
+static __inline__ void
+VEC_deferred_access_base_pop (VEC_deferred_access_base *vec_)
+{
+ (void)((vec_->num) ? 0 : (vec_assert_fail (), 0));
+ --vec_->num;
+}
+
+void __attribute__((noinline))
+perform_access_checks (VEC_deferred_access_check_gc* p)
+{
+ abort ();
+}
+
+typedef struct VEC_deferred_access_gc {
+ VEC_deferred_access_base base;
+} VEC_deferred_access_gc;
+
+static VEC_deferred_access_gc *deferred_access_stack;
+static unsigned deferred_access_no_check;
+
+const struct ggc_root_tab gt_pch_rs_gt_cp_semantics_h[] = {
+ {
+ &deferred_access_no_check
+ }
+};
+
+void __attribute__((noinline)) pop_to_parent_deferring_access_checks (void)
+{
+ if (deferred_access_no_check)
+ deferred_access_no_check--;
+ else
+ {
+ VEC_deferred_access_check_gc *checks;
+ deferred_access *ptr;
+ checks = (VEC_deferred_access_base_last(deferred_access_stack ? &deferred_access_stack->base : 0))->deferred_access_checks;
+ VEC_deferred_access_base_pop(deferred_access_stack ? &deferred_access_stack->base : 0);
+ ptr = VEC_deferred_access_base_last(deferred_access_stack ? &deferred_access_stack->base : 0);
+ if (ptr->deferring_access_checks_kind == 0)
+ perform_access_checks (checks);
+ }
+}
+
+int main()
+{
+ deferred_access_stack = __builtin_malloc (sizeof(VEC_deferred_access_gc) + sizeof(deferred_access) * 8);
+ deferred_access_stack->base.num = 2;
+ deferred_access_stack->base.vec[0].deferring_access_checks_kind = 1;
+ pop_to_parent_deferring_access_checks ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071202-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071202-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071202-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071202-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+extern void abort (void);
+struct T { int t; int r[8]; };
+struct S { int a; int b; int c[6]; struct T d; };
+
+__attribute__((noinline)) void
+foo (struct S *s)
+{
+ *s = (struct S) { s->b, s->a, { 0, 0, 0, 0, 0, 0 }, s->d };
+}
+
+int
+main (void)
+{
+ struct S s = { 6, 12, { 1, 2, 3, 4, 5, 6 },
+ { 7, { 8, 9, 10, 11, 12, 13, 14, 15 } } };
+ foo (&s);
+ if (s.a != 12 || s.b != 6
+ || s.c[0] || s.c[1] || s.c[2] || s.c[3] || s.c[4] || s.c[5])
+ abort ();
+ if (s.d.t != 7 || s.d.r[0] != 8 || s.d.r[1] != 9 || s.d.r[2] != 10
+ || s.d.r[3] != 11 || s.d.r[4] != 12 || s.d.r[5] != 13
+ || s.d.r[6] != 14 || s.d.r[7] != 15)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071205-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071205-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071205-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071205-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* PR middle-end/34337 */
+
+extern void abort (void);
+
+int
+foo (int x)
+{
+ return ((x << 8) & 65535) | 255;
+}
+
+int
+main (void)
+{
+ if (foo (0x32) != 0x32ff || foo (0x174) != 0x74ff)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071210-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071210-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071210-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071210-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+/* PR rtl-optimization/34302 */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
+
+extern void abort (void);
+
+struct S
+{
+ int n1, n2, n3, n4;
+};
+
+__attribute__((noinline)) struct S
+foo (int x, int y, int z)
+{
+ if (x != 10 || y != 9 || z != 8)
+ abort ();
+ struct S s = { 1, 2, 3, 4 };
+ return s;
+}
+
+__attribute__((noinline)) void **
+bar (void **u, int *v)
+{
+ void **w = u;
+ int *s = v, x, y, z;
+ void **p, **q;
+ static void *l[] = { &&lab1, &&lab1, &&lab2, &&lab3, &&lab4 };
+
+ if (!u)
+ return l;
+
+ q = *w++;
+ goto *q;
+lab2:
+ p = q;
+ q = *w++;
+ x = s[2];
+ y = s[1];
+ z = s[0];
+ s -= 1;
+ struct S r = foo (x, y, z);
+ s[3] = r.n1;
+ s[2] = r.n2;
+ s[1] = r.n3;
+ s[0] = r.n4;
+ goto *q;
+lab3:
+ p = q;
+ q = *w++;
+ s += 1;
+ s[0] = 23;
+lab1:
+ goto *q;
+lab4:
+ return 0;
+}
+
+int
+main (void)
+{
+ void **u = bar ((void **) 0, (int *) 0);
+ void *t[] = { u[2], u[4] };
+ int s[] = { 7, 8, 9, 10, 11, 12 };
+ if (bar (t, &s[1]) != (void **) 0
+ || s[0] != 4 || s[1] != 3 || s[2] != 2 || s[3] != 1
+ || s[4] != 11 || s[5] != 12)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071211-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071211-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071211-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071211-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+extern void abort() __attribute__ ((noreturn));
+
+struct s
+{
+ unsigned long long f1 : 40;
+#if(__SIZEOF_INT__ >= 4)
+ unsigned int f2 : 24;
+#else
+ unsigned long int f2 : 24;
+#endif
+} sv;
+
+int main()
+{
+ int f2;
+ sv.f2 = (1 << 24) - 1;
+ __asm__ volatile ("" : : : "memory");
+ ++sv.f2;
+ f2 = sv.f2;
+ if (f2 != 0)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071213-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071213-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071213-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071213-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,53 @@
+/* PR target/34281 */
+
+#include <stdarg.h>
+
+extern void abort (void);
+
+void
+h (int x, va_list ap)
+{
+ switch (x)
+ {
+ case 1:
+ if (va_arg (ap, int) != 3 || va_arg (ap, int) != 4)
+ abort ();
+ return;
+ case 5:
+ if (va_arg (ap, int) != 9 || va_arg (ap, int) != 10)
+ abort ();
+ return;
+ default:
+ abort ();
+ }
+}
+
+void
+f1 (int i, long long int j, ...)
+{
+ va_list ap;
+ va_start (ap, j);
+ h (i, ap);
+ if (i != 1 || j != 2)
+ abort ();
+ va_end (ap);
+}
+
+void
+f2 (int i, int j, int k, long long int l, ...)
+{
+ va_list ap;
+ va_start (ap, l);
+ h (i, ap);
+ if (i != 5 || j != 6 || k != 7 || l != 8)
+ abort ();
+ va_end (ap);
+}
+
+int
+main ()
+{
+ f1 (1, 2, 3, 4);
+ f2 (5, 6, 7, 8, 9, 10);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071216-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071216-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071216-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071216-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+/* PR rtl-optimization/34490 */
+
+extern void abort (void);
+
+static int x;
+
+int
+__attribute__((noinline))
+bar (void)
+{
+ return x;
+}
+
+int
+foo (void)
+{
+ long int b = bar ();
+ if ((unsigned long) b < -4095L)
+ return b;
+ if (-b != 38)
+ b = -2;
+ return b + 1;
+}
+
+int
+main (void)
+{
+ x = 26;
+ if (foo () != 26)
+ abort ();
+ x = -39;
+ if (foo () != -1)
+ abort ();
+ x = -38;
+ if (foo () != -37)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071219-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071219-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071219-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071219-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,71 @@
+/* PR c++/34459 */
+
+extern void abort (void);
+extern void *memset (void *s, int c, __SIZE_TYPE__ n);
+
+struct S
+{
+ char s[25];
+};
+
+struct S *p;
+
+void __attribute__((noinline,noclone))
+foo (struct S *x, int set)
+{
+ int i;
+ for (i = 0; i < sizeof (x->s); ++i)
+ if (x->s[i] != 0)
+ abort ();
+ else if (set)
+ x->s[i] = set;
+ p = x;
+}
+
+void __attribute__((noinline,noclone))
+test1 (void)
+{
+ struct S a;
+ memset (&a.s, '\0', sizeof (a.s));
+ foo (&a, 0);
+ struct S b = a;
+ foo (&b, 1);
+ b = a;
+ b = b;
+ foo (&b, 0);
+}
+
+void __attribute__((noinline,noclone))
+test2 (void)
+{
+ struct S a;
+ memset (&a.s, '\0', sizeof (a.s));
+ foo (&a, 0);
+ struct S b = a;
+ foo (&b, 1);
+ b = a;
+ b = *p;
+ foo (&b, 0);
+}
+
+void __attribute__((noinline,noclone))
+test3 (void)
+{
+ struct S a;
+ memset (&a.s, '\0', sizeof (a.s));
+ foo (&a, 0);
+ struct S b = a;
+ foo (&b, 1);
+ *p = a;
+ *p = b;
+ foo (&b, 0);
+}
+
+int
+main (void)
+{
+ test1 ();
+ test2 ();
+ test3 ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,42 @@
+/* PR tree-optimization/29484 */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
+
+extern void abort (void);
+
+void *__attribute__((noinline))
+baz (void **lab)
+{
+ asm volatile ("" : "+r" (lab));
+ return *lab;
+}
+
+static inline
+int bar (void)
+{
+ static void *b[] = { &&addr };
+ void *p = baz (b);
+ goto *p;
+addr:
+ return 17;
+}
+
+int __attribute__((noinline))
+f1 (void)
+{
+ return bar ();
+}
+
+int __attribute__((noinline))
+f2 (void)
+{
+ return bar ();
+}
+
+int
+main (void)
+{
+ if (f1 () != 17 || f1 () != 17 || f2 () != 17 || f2 () != 17)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20071220-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+/* PR tree-optimization/29484 */
+/* { dg-require-effective-target label_values } */
+
+extern void abort (void);
+
+void *__attribute__((noinline))
+baz (void **lab)
+{
+ asm volatile ("" : "+r" (lab));
+ return *lab;
+}
+
+static inline
+int bar (void)
+{
+ static void *b[] = { &&addr };
+ baz (b);
+addr:
+ return 17;
+}
+
+int __attribute__((noinline))
+f1 (void)
+{
+ return bar ();
+}
+
+int __attribute__((noinline))
+f2 (void)
+{
+ return bar ();
+}
+
+int
+main (void)
+{
+ if (f1 () != 17 || f1 () != 17 || f2 () != 17 || f2 () != 17)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080117-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080117-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080117-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080117-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+typedef struct gs_imager_state_s {
+ struct {
+ int half_width;
+ int cap;
+ float miter_limit;
+ } line_params;
+} gs_imager_state;
+static const gs_imager_state gstate_initial = { { 1 } };
+void gstate_path_memory(gs_imager_state *pgs) {
+ *pgs = gstate_initial;
+}
+int gs_state_update_overprint(void)
+{
+ return gstate_initial.line_params.half_width;
+}
+
+extern void abort (void);
+int main()
+{
+ if (gs_state_update_overprint() != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080122-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080122-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080122-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080122-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* PR rtl-optimization/34628 */
+/* Origin: Martin Michlmayr <tbm at cyrius.com> */
+
+typedef unsigned short u16;
+typedef unsigned char u8;
+
+static void
+do_segfault(u8 in_buf[], const u8 out_buf[], const int len)
+{
+ int i;
+
+ for (i = 0; i < len; i++) {
+ asm("");
+
+ in_buf[2*i] = ( out_buf[2*i] | out_buf[(2*i)+1]<<8 ) & 0xFF;
+
+ asm("");
+
+ in_buf[(2*i)+1] = ( out_buf[2*i] | out_buf[(2*i)+1]<<8 ) >> 8;
+
+ asm("");
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ u8 outbuf[32] = "buffer ";
+ u8 inbuf[32] = "\f";
+
+ asm("");
+ do_segfault(inbuf, outbuf, 12);
+ asm("");
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080222-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080222-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080222-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080222-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+extern void abort (void);
+
+struct container
+{
+ unsigned char data[1];
+};
+
+unsigned char space[6] = {1, 2, 3, 4, 5, 6};
+
+int
+foo (struct container *p)
+{
+ return p->data[4];
+}
+
+int
+main ()
+{
+ if (foo ((struct container *) space) != 5)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080408-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080408-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080408-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080408-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+extern void abort (void);
+int main ()
+{
+ short ssi = 126;
+ unsigned short usi = 65280;
+ int fail = !(ssi < usi);
+ if (fail)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080424-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080424-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080424-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080424-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+/* PR tree-optimization/36008 */
+
+extern void abort (void);
+
+int g[48][3][3];
+
+void __attribute__ ((noinline))
+bar (int x[3][3], int y[3][3])
+{
+ static int i;
+ if (x != g[i + 8] || y != g[i++])
+ abort ();
+}
+
+static inline void __attribute__ ((always_inline))
+foo (int x[][3][3])
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ {
+ int k = i + 8;
+ bar (x[k], x[k - 8]);
+ }
+}
+
+int
+main ()
+{
+ foo (g);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080502-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080502-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080502-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080502-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+/* PR target/36090 */
+
+extern void abort (void);
+
+long double __attribute__ ((noinline)) foo (long double x)
+{
+ return __builtin_signbit (x) ? 3.1415926535897932384626433832795029L : 0.0;
+}
+
+int
+main (void)
+{
+ if (foo (-1.0L) != 3.1415926535897932384626433832795029L)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* PR middle-end/36137 */
+extern void abort (void);
+
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
+int
+main ()
+{
+ unsigned int u;
+ int i = -1;
+
+ u = MAX ((unsigned int) MAX (i, 0), 1);
+ if (u != 1)
+ abort ();
+
+ u = MIN ((unsigned int) MAX (i, 0), (unsigned int) i);
+ if (u != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080506-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* PR middle-end/36013 */
+
+extern void abort (void);
+
+void __attribute__((noinline))
+foo (int **__restrict p, int **__restrict q)
+{
+ *p[0] = 1;
+ *q[0] = 2;
+ if (*p[0] != 2)
+ abort ();
+}
+
+int
+main (void)
+{
+ int a;
+ int *p1 = &a, *p2 = &a;
+ foo (&p1, &p2);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080519-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080519-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080519-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080519-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,58 @@
+extern void abort (void);
+
+typedef unsigned long HARD_REG_SET[2];
+HARD_REG_SET reg_class_contents[2];
+
+struct du_chain
+{
+ struct du_chain *next_use;
+ int cl;
+};
+
+void __attribute__((noinline))
+merge_overlapping_regs (HARD_REG_SET *p)
+{
+ if ((*p)[0] != -1 || (*p)[1] != -1)
+ abort ();
+}
+
+void __attribute__((noinline))
+regrename_optimize (struct du_chain *this)
+{
+ HARD_REG_SET this_unavailable;
+ unsigned long *scan_fp_;
+ int n_uses;
+ struct du_chain *last;
+
+ this_unavailable[0] = 0;
+ this_unavailable[1] = 0;
+
+ n_uses = 0;
+ for (last = this; last->next_use; last = last->next_use)
+ {
+ scan_fp_ = reg_class_contents[last->cl];
+ n_uses++;
+ this_unavailable[0] |= ~ scan_fp_[0];
+ this_unavailable[1] |= ~ scan_fp_[1];
+ }
+ if (n_uses < 1)
+ return;
+
+ scan_fp_ = reg_class_contents[last->cl];
+ this_unavailable[0] |= ~ scan_fp_[0];
+ this_unavailable[1] |= ~ scan_fp_[1];
+
+ merge_overlapping_regs (&this_unavailable);
+}
+
+int main()
+{
+ struct du_chain du1 = { 0, 0 };
+ struct du_chain du0 = { &du1, 1 };
+ reg_class_contents[0][0] = -1;
+ reg_class_contents[0][1] = -1;
+ reg_class_contents[1][0] = 0;
+ reg_class_contents[1][1] = 0;
+ regrename_optimize (&du0);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080522-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080522-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080522-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080522-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+/* This testcase is to make sure we have i in referenced vars and that we
+ properly compute aliasing for the loads and stores. */
+
+extern void abort (void);
+
+static int i;
+static int *p = &i;
+
+int __attribute__((noinline))
+foo(int *q)
+{
+ *p = 1;
+ *q = 2;
+ return *p;
+}
+
+int __attribute__((noinline))
+bar(int *q)
+{
+ *q = 2;
+ *p = 1;
+ return *q;
+}
+
+int main()
+{
+ int j = 0;
+
+ if (foo(&i) != 2)
+ abort ();
+ if (bar(&i) != 1)
+ abort ();
+ if (foo(&j) != 1)
+ abort ();
+ if (j != 2)
+ abort ();
+ if (bar(&j) != 2)
+ abort ();
+ if (j != 2)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080529-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080529-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080529-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080529-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* PR target/36362 */
+
+extern void abort (void);
+
+int
+test (float c)
+{
+ return !!c * 7LL == 0;
+}
+
+int
+main (void)
+{
+ if (test (1.0f) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080604-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080604-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080604-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080604-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+struct barstruct { char const* some_string; } x;
+extern void abort (void);
+void __attribute__((noinline))
+foo(void)
+{
+ if (!x.some_string)
+ abort ();
+}
+void baz(int b)
+{
+ struct barstruct bar;
+ struct barstruct* barptr;
+ if (b)
+ barptr = &bar;
+ else
+ {
+ barptr = &x + 1;
+ barptr = barptr - 1;
+ }
+ barptr->some_string = "Everything OK";
+ foo();
+ barptr->some_string = "Everything OK";
+}
+int main()
+{
+ x.some_string = (void *)0;
+ baz(0);
+ if (!x.some_string)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080719-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080719-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080719-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080719-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,65 @@
+typedef unsigned int u32;
+
+static const u32 deadfish = 0xdeadf155;
+
+static const u32 cfb_tab8_be[] = {
+ 0x00000000,0x000000ff,0x0000ff00,0x0000ffff,
+ 0x00ff0000,0x00ff00ff,0x00ffff00,0x00ffffff,
+ 0xff000000,0xff0000ff,0xff00ff00,0xff00ffff,
+ 0xffff0000,0xffff00ff,0xffffff00,0xffffffff
+};
+
+static const u32 cfb_tab8_le[] = {
+ 0x00000000,0xff000000,0x00ff0000,0xffff0000,
+ 0x0000ff00,0xff00ff00,0x00ffff00,0xffffff00,
+ 0x000000ff,0xff0000ff,0x00ff00ff,0xffff00ff,
+ 0x0000ffff,0xff00ffff,0x00ffffff,0xffffffff
+};
+
+static const u32 cfb_tab16_be[] = {
+ 0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff
+};
+
+static const u32 cfb_tab16_le[] = {
+ 0x00000000, 0xffff0000, 0x0000ffff, 0xffffffff
+};
+
+static const u32 cfb_tab32[] = {
+ 0x00000000, 0xffffffff
+};
+
+
+
+
+
+
+const u32 *xxx(int bpp)
+{
+ const u32 *tab;
+
+if (0) return &deadfish;
+
+ switch (bpp) {
+ case 8:
+ tab = cfb_tab8_be;
+ break;
+ case 16:
+ tab = cfb_tab16_be;
+ break;
+ case 32:
+ default:
+ tab = cfb_tab32;
+ break;
+ }
+
+ return tab;
+}
+
+int main(void)
+{
+ const u32 *a = xxx(8);
+ int b = a[0];
+ if (b != cfb_tab8_be[0])
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080813-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080813-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080813-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20080813-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* PR middle-end/37103 */
+
+extern void abort (void);
+
+void
+foo (unsigned short x)
+{
+ signed char y = -1;
+ if (x == y)
+ abort ();
+}
+
+void
+bar (unsigned short x)
+{
+ unsigned char y = -1;
+ if (x == y)
+ abort ();
+}
+
+int
+main (void)
+{
+ if (sizeof (int) == sizeof (short))
+ return 0;
+ foo (-1);
+ if (sizeof (short) > 1)
+ bar (-1);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081103-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081103-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081103-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081103-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+struct S { char c; char arr[4]; float f; };
+
+char A[4] = { '1', '2', '3', '4' };
+
+void foo (struct S s)
+{
+ if (__builtin_memcmp (s.arr, A, 4))
+ __builtin_abort ();
+}
+
+int main (void)
+{
+ struct S s;
+ __builtin_memcpy (s.arr, A, 4);
+ foo (s);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+#include <limits.h>
+
+extern void abort (void);
+
+static __attribute__((noinline)) void foo (int a)
+{
+ int b = (a - 1) + INT_MIN;
+
+ if (b != INT_MIN)
+ abort ();
+}
+
+int main (void)
+{
+ foo (1);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081117-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081117-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081117-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081117-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* { dg-require-effective-target int32plus } */
+extern void abort (void);
+
+struct s
+{
+ unsigned long long a:16;
+ unsigned long long b:32;
+ unsigned long long c:16;
+};
+
+__attribute__ ((noinline)) unsigned
+f (struct s s, unsigned i)
+{
+ return s.b == i;
+}
+
+struct s s = { 1, 0x87654321u, 2};
+
+int
+main ()
+{
+ if (!f (s, 0x87654321u))
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081218-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081218-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081218-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20081218-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+struct A { int i, j; char pad[512]; } a;
+
+int __attribute__((noinline))
+foo (void)
+{
+ __builtin_memset (&a, 0x26, sizeof a);
+ return a.i;
+}
+
+void __attribute__((noinline))
+bar (void)
+{
+ __builtin_memset (&a, 0x36, sizeof a);
+ a.i = 0x36363636;
+ a.j = 0x36373636;
+}
+
+int
+main (void)
+{
+ int i;
+ if (sizeof (int) != 4 || __CHAR_BIT__ != 8)
+ return 0;
+
+ if (foo () != 0x26262626)
+ __builtin_abort ();
+ for (i = 0; i < sizeof a; i++)
+ if (((char *)&a)[i] != 0x26)
+ __builtin_abort ();
+
+ bar ();
+ if (a.j != 0x36373636)
+ __builtin_abort ();
+ a.j = 0x36363636;
+ for (i = 0; i < sizeof a; i++)
+ if (((char *)&a)[i] != 0x36)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,61 @@
+typedef struct descriptor_dimension
+{
+ int stride;
+ int lbound;
+ int ubound;
+} descriptor_dimension;
+typedef struct {
+ int *data;
+ int dtype;
+ descriptor_dimension dim[7];
+} gfc_array_i4;
+
+void
+msum_i4 (gfc_array_i4 * const retarray,
+ gfc_array_i4 * const array,
+ const int * const pdim)
+{
+ int count[7];
+ int extent[7];
+ int * dest;
+ const int * base;
+ int dim;
+ int n;
+ int len;
+
+ dim = (*pdim) - 1;
+ len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
+
+ for (n = 0; n < dim; n++)
+ {
+ extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound;
+ count[n] = 0;
+ }
+
+ dest = retarray->data;
+ base = array->data;
+
+ do
+ {
+ int result = 0;
+
+ for (n = 0; n < len; n++, base++)
+ result += *base;
+ *dest = result;
+
+ count[0]++;
+ dest += 1;
+ }
+ while (count[0] != extent[0]);
+}
+
+int main()
+{
+ int rdata[3];
+ int adata[9];
+ gfc_array_i4 retarray = { rdata, 265, { { 1, 1, 3 } } };
+ gfc_array_i4 array = { adata, 266, { { 1, 1, 3 }, { 3, 1, 3 } } };
+ int dim = 2;
+ msum_i4 (&retarray, &array, &dim);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,159 @@
+struct obstack {};
+struct bitmap_head_def;
+typedef struct bitmap_head_def *bitmap;
+typedef const struct bitmap_head_def *const_bitmap;
+typedef unsigned long BITMAP_WORD;
+typedef struct bitmap_obstack
+{
+ struct bitmap_element_def *elements;
+ struct bitmap_head_def *heads;
+ struct obstack obstack;
+} bitmap_obstack;
+typedef struct bitmap_element_def
+{
+ struct bitmap_element_def *next;
+ struct bitmap_element_def *prev;
+ unsigned int indx;
+ BITMAP_WORD bits[((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u))];
+} bitmap_element;
+
+struct bitmap_descriptor;
+
+typedef struct bitmap_head_def {
+ bitmap_element *first;
+ bitmap_element *current;
+ unsigned int indx;
+ bitmap_obstack *obstack;
+} bitmap_head;
+
+bitmap_element bitmap_zero_bits;
+
+typedef struct
+{
+ bitmap_element *elt1;
+ bitmap_element *elt2;
+ unsigned word_no;
+ BITMAP_WORD bits;
+} bitmap_iterator;
+
+static void __attribute__((noinline))
+bmp_iter_set_init (bitmap_iterator *bi, const_bitmap map,
+ unsigned start_bit, unsigned *bit_no)
+{
+ bi->elt1 = map->first;
+ bi->elt2 = ((void *)0);
+
+ while (1)
+ {
+ if (!bi->elt1)
+ {
+ bi->elt1 = &bitmap_zero_bits;
+ break;
+ }
+
+ if (bi->elt1->indx >= start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u)))
+ break;
+ bi->elt1 = bi->elt1->next;
+ }
+
+ if (bi->elt1->indx != start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u)))
+ start_bit = bi->elt1->indx * (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u));
+
+ bi->word_no = start_bit / (8 * 8 * 1u) % ((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u));
+ bi->bits = bi->elt1->bits[bi->word_no];
+ bi->bits >>= start_bit % (8 * 8 * 1u);
+
+ start_bit += !bi->bits;
+
+ *bit_no = start_bit;
+}
+
+static void __attribute__((noinline))
+bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no)
+{
+ bi->bits >>= 1;
+ *bit_no += 1;
+}
+
+static unsigned char __attribute__((noinline))
+bmp_iter_set_tail (bitmap_iterator *bi, unsigned *bit_no)
+{
+ while (!(bi->bits & 1))
+ {
+ bi->bits >>= 1;
+ *bit_no += 1;
+ }
+ return 1;
+}
+
+static __inline__ unsigned char
+bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no)
+{
+ unsigned bno = *bit_no;
+ BITMAP_WORD bits = bi->bits;
+ bitmap_element *elt1;
+
+ if (bits)
+ {
+ while (!(bits & 1))
+ {
+ bits >>= 1;
+ bno += 1;
+ }
+ *bit_no = bno;
+ return 1;
+ }
+
+ *bit_no = ((bno + 64 - 1) / 64 * 64);
+ bi->word_no++;
+
+ elt1 = bi->elt1;
+ while (1)
+ {
+ while (bi->word_no != 2)
+ {
+ bi->bits = elt1->bits[bi->word_no];
+ if (bi->bits)
+ {
+ bi->elt1 = elt1;
+ return bmp_iter_set_tail (bi, bit_no);
+ }
+ *bit_no += 64;
+ bi->word_no++;
+ }
+
+ elt1 = elt1->next;
+ if (!elt1)
+ {
+ bi->elt1 = elt1;
+ return 0;
+ }
+ *bit_no = elt1->indx * (2 * 64);
+ bi->word_no = 0;
+ }
+}
+
+extern void abort (void);
+
+static void __attribute__((noinline)) catchme(int i)
+{
+ if (i != 0 && i != 64)
+ abort ();
+}
+static void __attribute__((noinline)) foobar (bitmap_head *chain)
+{
+ bitmap_iterator rsi;
+ unsigned int regno;
+ for (bmp_iter_set_init (&(rsi), (chain), (0), &(regno));
+ bmp_iter_set (&(rsi), &(regno));
+ bmp_iter_next (&(rsi), &(regno)))
+ catchme(regno);
+}
+
+int main()
+{
+ bitmap_element elem = { (void *)0, (void *)0, 0, { 1, 1 } };
+ bitmap_head live_throughout = { &elem, &elem, 0, (void *)0 };
+ foobar (&live_throughout);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090113-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,137 @@
+struct obstack {};
+struct bitmap_head_def;
+typedef struct bitmap_head_def *bitmap;
+typedef const struct bitmap_head_def *const_bitmap;
+typedef unsigned long BITMAP_WORD;
+
+typedef struct bitmap_obstack
+{
+ struct bitmap_element_def *elements;
+ struct bitmap_head_def *heads;
+ struct obstack obstack;
+} bitmap_obstack;
+typedef struct bitmap_element_def
+{
+ struct bitmap_element_def *next;
+ struct bitmap_element_def *prev;
+ unsigned int indx;
+ BITMAP_WORD bits[(2)];
+} bitmap_element;
+
+struct bitmap_descriptor;
+
+typedef struct bitmap_head_def {
+ bitmap_element *first;
+ bitmap_element *current;
+ unsigned int indx;
+ bitmap_obstack *obstack;
+} bitmap_head;
+
+bitmap_element bitmap_zero_bits;
+
+typedef struct
+{
+ bitmap_element *elt1;
+ bitmap_element *elt2;
+ unsigned word_no;
+ BITMAP_WORD bits;
+} bitmap_iterator;
+
+static __attribute__((noinline)) void
+bmp_iter_set_init (bitmap_iterator *bi, const_bitmap map,
+ unsigned start_bit, unsigned *bit_no)
+{
+ bi->elt1 = map->first;
+ bi->elt2 = ((void *)0);
+
+ while (1)
+ {
+ if (!bi->elt1)
+ {
+ bi->elt1 = &bitmap_zero_bits;
+ break;
+ }
+
+ if (bi->elt1->indx >= start_bit / (128u))
+ break;
+ bi->elt1 = bi->elt1->next;
+ }
+
+ if (bi->elt1->indx != start_bit / (128u))
+ start_bit = bi->elt1->indx * (128u);
+
+ bi->word_no = start_bit / 64u % (2);
+ bi->bits = bi->elt1->bits[bi->word_no];
+ bi->bits >>= start_bit % 64u;
+
+ start_bit += !bi->bits;
+
+ *bit_no = start_bit;
+}
+
+static __inline__ __attribute__((always_inline)) void
+bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no)
+{
+ bi->bits >>= 1;
+ *bit_no += 1;
+}
+
+static __inline__ __attribute__((always_inline)) unsigned char
+bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no)
+{
+ if (bi->bits)
+ {
+ while (!(bi->bits & 1))
+ {
+ bi->bits >>= 1;
+ *bit_no += 1;
+ }
+ return 1;
+ }
+
+ *bit_no = ((*bit_no + 64u - 1) / 64u * 64u);
+ bi->word_no++;
+
+ while (1)
+ {
+ while (bi->word_no != (2))
+ {
+ bi->bits = bi->elt1->bits[bi->word_no];
+ if (bi->bits)
+ {
+ while (!(bi->bits & 1))
+ {
+ bi->bits >>= 1;
+ *bit_no += 1;
+ }
+ return 1;
+ }
+ *bit_no += 64u;
+ bi->word_no++;
+ }
+
+ bi->elt1 = bi->elt1->next;
+ if (!bi->elt1)
+ return 0;
+ *bit_no = bi->elt1->indx * (128u);
+ bi->word_no = 0;
+ }
+}
+
+static void __attribute__((noinline))
+foobar (bitmap_head *live_throughout)
+{
+ bitmap_iterator rsi;
+ unsigned int regno;
+ for (bmp_iter_set_init (&(rsi), (live_throughout), (0), &(regno));
+ bmp_iter_set (&(rsi), &(regno));
+ bmp_iter_next (&(rsi), &(regno)))
+ ;
+}
+int main()
+{
+ bitmap_element elem = { (void *)0, (void *)0, 0, { 1, 1 } };
+ bitmap_head live_throughout = { &elem, &elem, 0, (void *)0 };
+ foobar (&live_throughout);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090207-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090207-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090207-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090207-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+int foo(int i)
+{
+ int a[32];
+ a[1] = 3;
+ a[0] = 1;
+ a[i] = 2;
+ return a[0];
+}
+extern void abort (void);
+int main()
+{
+ if (foo (0) != 2
+ || foo (1) != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090219-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090219-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090219-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090219-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* On ARM, BAR used to get a bogus number in E due to stack
+ misalignment. */
+
+extern void abort (void);
+extern void exit (int);
+
+void
+foo (void)
+{
+ int f = 0;
+
+ void bar (int a, int b, int c, int d, int e)
+ {
+ if (e != 0)
+ {
+ f = 1;
+ abort ();
+ }
+ }
+
+ bar (0, 0, 0, 0, 0);
+}
+
+int
+main (void)
+{
+ foo ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090527-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090527-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090527-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090527-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+typedef enum { POSITION_ASIS, POSITION_UNSPECIFIED } unit_position;
+
+typedef enum { STATUS_UNKNOWN, STATUS_UNSPECIFIED } unit_status;
+
+typedef struct
+{
+ unit_position position;
+ unit_status status;
+} unit_flags;
+
+extern void abort (void);
+
+void
+new_unit (unit_flags * flags)
+{
+ if (flags->status == STATUS_UNSPECIFIED)
+ flags->status = STATUS_UNKNOWN;
+
+ if (flags->position == POSITION_UNSPECIFIED)
+ flags->position = POSITION_ASIS;
+
+ switch (flags->status)
+ {
+ case STATUS_UNKNOWN:
+ break;
+
+ default:
+ abort ();
+ }
+}
+
+int main()
+{
+ unit_flags f;
+ f.status = STATUS_UNSPECIFIED;
+ new_unit (&f);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090623-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090623-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090623-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090623-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+int * __restrict__ x;
+
+int foo (int y)
+{
+ *x = y;
+ return *x;
+}
+
+extern void abort (void);
+
+int main()
+{
+ int i = 0;
+ x = &i;
+ if (foo(1) != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090711-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090711-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090711-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090711-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+/* Used to be miscompiled at -O0 due to incorrect choice of sign extension
+ vs. zero extension. __attribute__ ((noinline)) added to try to make it
+ fail at higher optimization levels too. */
+
+extern void abort (void);
+
+long long __attribute__ ((noinline))
+div (long long val)
+{
+ return val / 32768;
+}
+
+int main (void)
+{
+ long long d1 = -990000000;
+ long long d2 = div(d1);
+ if (d2 != -30212)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090814-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090814-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090814-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20090814-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+int __attribute__((noinline))
+bar (int *a)
+{
+ return *a;
+}
+int i;
+int __attribute__((noinline))
+foo (int (*a)[2])
+{
+ return bar (&(*a)[i]);
+}
+
+extern void abort (void);
+int a[2];
+int main()
+{
+ a[0] = -1;
+ a[1] = 42;
+ i = 1;
+ if (foo (&a) != 42)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20091229-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20091229-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20091229-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20091229-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+long long foo(long long v) { return v / -0x080000000LL; }
+int main(int argc, char **argv) { if (foo(0x080000000LL) != -1) abort(); exit (0); }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100209-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100209-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100209-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100209-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+int bar(int foo)
+{
+ return (int)(((unsigned long long)(long long)foo) / 8);
+}
+extern void abort (void);
+int main()
+{
+ if (sizeof (long long) > sizeof (int)
+ && bar(-1) != -1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100316-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100316-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100316-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100316-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+struct Foo {
+ int i;
+ unsigned precision : 10;
+ unsigned blah : 3;
+} f;
+
+int __attribute__((noinline,noclone))
+foo (struct Foo *p)
+{
+ struct Foo *q = p;
+ return (*q).precision;
+}
+
+extern void abort (void);
+
+int main()
+{
+ f.i = -1;
+ f.precision = 0;
+ f.blah = -1;
+ if (foo (&f) != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100416-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100416-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100416-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100416-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+void abort(void);
+
+int
+movegt(int x, int y, long long a)
+{
+ int i;
+ int ret = 0;
+ for (i = 0; i < y; i++)
+ {
+ if (a >= (long long) 0xf000000000000000LL)
+ ret = x;
+ else
+ ret = y;
+ }
+ return ret;
+}
+
+struct test
+{
+ long long val;
+ int ret;
+} tests[] = {
+ { 0xf000000000000000LL, -1 },
+ { 0xefffffffffffffffLL, 1 },
+ { 0xf000000000000001LL, -1 },
+ { 0x0000000000000000LL, -1 },
+ { 0x8000000000000000LL, 1 },
+};
+
+int
+main()
+{
+ int i;
+ for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
+ {
+ if (movegt (-1, 1, tests[i].val) != tests[i].ret)
+ abort ();
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100430-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100430-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100430-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100430-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,51 @@
+/* This used to generate unaligned accesses at -O2 because of IVOPTS. */
+
+struct packed_struct
+{
+ struct packed_struct1
+ {
+ unsigned char cc11;
+ unsigned char cc12;
+ } __attribute__ ((packed)) pst1;
+ struct packed_struct2
+ {
+ unsigned char cc21;
+ unsigned char cc22;
+ unsigned short ss[104];
+ unsigned char cc23[13];
+ } __attribute__ ((packed)) pst2[4];
+} __attribute__ ((packed));
+
+typedef struct
+{
+ int ii;
+ struct packed_struct buf;
+} info_t;
+
+static unsigned short g;
+
+static void __attribute__((noinline))
+dummy (unsigned short s)
+{
+ g = s;
+}
+
+static int
+foo (info_t *info)
+{
+ int i, j;
+
+ for (i = 0; i < info->buf.pst1.cc11; i++)
+ for (j = 0; j < info->buf.pst2[i].cc22; j++)
+ dummy (info->buf.pst2[i].ss[j]);
+
+ return 0;
+}
+
+int main(void)
+{
+ info_t info;
+ info.buf.pst1.cc11 = 2;
+ info.buf.pst2[0].cc22 = info.buf.pst2[1].cc22 = 8;
+ return foo (&info);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100708-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100708-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100708-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100708-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* PR middle-end/44843 */
+/* Verify that we don't use the alignment of struct S for inner accesses. */
+
+struct S
+{
+ double for_alignment;
+ struct { int x, y, z; } a[16];
+};
+
+void f(struct S *s) __attribute__((noinline));
+
+void f(struct S *s)
+{
+ unsigned int i;
+
+ for (i = 0; i < 16; ++i)
+ {
+ s->a[i].x = 0;
+ s->a[i].y = 0;
+ s->a[i].z = 0;
+ }
+}
+
+int main (void)
+{
+ struct S s;
+ f (&s);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100805-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100805-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100805-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100805-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+unsigned int foo (unsigned int a, unsigned int b)
+{
+ unsigned i;
+ a = a & 1;
+ for (i = 0; i < b; ++i)
+ a = a << 1 | a >> (sizeof (unsigned int) * 8 - 1);
+ return a;
+}
+extern void abort (void);
+int main()
+{
+ if (foo (1, sizeof (unsigned int) * 8 + 1) != 2)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100827-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100827-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100827-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20100827-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+extern void abort (void);
+int __attribute__((noinline,noclone))
+foo (char *p)
+{
+ int h = 0;
+ do
+ {
+ if (*p == '\0')
+ break;
+ ++h;
+ if (p == 0)
+ abort ();
+ ++p;
+ }
+ while (1);
+ return h;
+}
+int main()
+{
+ if (foo("a") != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101011-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101011-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101011-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101011-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,145 @@
+/* { dg-options "-fnon-call-exceptions" } */
+/* With -fnon-call-exceptions 0 / 0 should not be eliminated. */
+/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
+
+#ifdef SIGNAL_SUPPRESS
+# define DO_TEST 0
+#elif defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) || defined (__POWERPC__) || defined (__ppc)
+ /* On PPC division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__riscv)
+ /* On RISC-V division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__SPU__)
+ /* On SPU division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__sh__)
+ /* On SH division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__v850__)
+ /* On V850 division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__MSP430__)
+ /* On MSP430 division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__RL78__)
+ /* On RL78 division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__RX__)
+ /* On RX division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__aarch64__)
+ /* On AArch64 integer division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__TMS320C6X__)
+ /* On TI C6X division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__VISIUM__)
+ /* On Visium division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__mips__) && !defined(__linux__)
+ /* MIPS divisions do trap by default, but libgloss targets do not
+ intercept the trap and raise a SIGFPE. The same is probably
+ true of other bare-metal environments, so restrict the test to
+ systems that use the Linux kernel. */
+# define DO_TEST 0
+#elif defined (__mips16) && defined(__linux__)
+ /* Not all Linux kernels deal correctly the breakpoints generated by
+ MIPS16 divisions by zero. They show up as a SIGTRAP instead. */
+# define DO_TEST 0
+#elif defined (__MICROBLAZE__)
+/* We cannot rely on division by zero generating a trap. */
+# define DO_TEST 0
+#elif defined (__epiphany__)
+ /* Epiphany does not have hardware division, and the software implementation
+ has truly undefined behavior for division by 0. */
+# define DO_TEST 0
+#elif defined (__m68k__) && !defined(__linux__)
+ /* Attempting to trap division-by-zero in this way isn't likely to work on
+ bare-metal m68k systems. */
+# define DO_TEST 0
+#elif defined (__CRIS__)
+ /* No SIGFPE for CRIS integer division. */
+# define DO_TEST 0
+#elif defined (__MMIX__)
+/* By default we emit a sequence with DIVU, which "never signals an
+ exceptional condition, even when dividing by zero". */
+# define DO_TEST 0
+#elif defined (__arc__)
+ /* No SIGFPE for ARC integer division. */
+# define DO_TEST 0
+#elif defined (__arm__) && defined (__ARM_EABI__)
+# ifdef __ARM_ARCH_EXT_IDIV__
+ /* Hardware division instructions may not trap, and handle trapping
+ differently anyway. Skip the test if we have those instructions. */
+# define DO_TEST 0
+# else
+# include <signal.h>
+ /* ARM division-by-zero behavior is to call a helper function, which
+ can do several different things, depending on requirements. Emulate
+ the behavior of other targets here by raising SIGFPE. */
+int __attribute__((used))
+__aeabi_idiv0 (int return_value)
+{
+ raise (SIGFPE);
+ return return_value;
+}
+# define DO_TEST 1
+# endif
+#elif defined (__nios2__)
+ /* Nios II requires both hardware support and user configuration to
+ raise an exception on divide by zero. */
+# define DO_TEST 0
+#elif defined (__nvptx__)
+/* There isn't even a signal function. */
+# define DO_TEST 0
+#elif defined (__csky__)
+ /* This presently doesn't raise SIGFPE even on csky-linux-gnu, much
+ less bare metal. See the implementation of __divsi3 in libgcc. */
+# define DO_TEST 0
+#elif defined (__moxie__)
+ /* Not all moxie configurations may raise exceptions. */
+# define DO_TEST 0
+#elif defined (__or1k__)
+ /* On OpenRISC division by zero does not trap. */
+# define DO_TEST 0
+#elif defined (__pru__)
+/* There isn't even a signal function. */
+# define DO_TEST 0
+#else
+# define DO_TEST 1
+#endif
+
+extern void abort (void);
+extern void exit (int);
+
+#if DO_TEST
+
+#include <signal.h>
+
+void
+sigfpe (int signum __attribute__ ((unused)))
+{
+ exit (0);
+}
+
+#endif
+
+/* When optimizing, the compiler is smart enough to constant fold the
+ static unset variables i and j to produce 0 / 0, but it can't
+ eliminate the assignment to the global k. */
+static int i;
+static int j;
+int k __attribute__ ((used));
+
+int
+main ()
+{
+#if DO_TEST
+ signal (SIGFPE, sigfpe);
+ k = i / j;
+ abort ();
+#else
+ exit (0);
+#endif
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101013-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101013-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101013-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101013-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+/* PR rtl-optimization/45912 */
+
+extern void abort (void);
+
+static void* __attribute__((noinline,noclone))
+get_addr_base_and_unit_offset (void *base, long long *i)
+{
+ *i = 0;
+ return base;
+}
+
+static void* __attribute__((noinline,noclone))
+build_int_cst (void *base, long long offset)
+{
+ if (offset != 4)
+ abort ();
+
+ return base;
+}
+
+static void* __attribute__((noinline,noclone))
+build_ref_for_offset (void *base, long long offset)
+{
+ long long base_offset;
+ base = get_addr_base_and_unit_offset (base, &base_offset);
+ return build_int_cst (base, base_offset + offset / 8);
+}
+
+int
+main (void)
+{
+ void *ret = build_ref_for_offset ((void *)0, 32);
+ if (ret != (void *)0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101025-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101025-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101025-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20101025-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+static int g_7;
+static int *volatile g_6 = &g_7;
+int g_3;
+
+static int f1 (int *p_58)
+{
+ return *p_58;
+}
+
+void f2 (int i) __attribute__ ((noinline));
+void f2 (int i)
+{
+ g_3 = i;
+}
+
+int f3 (void) __attribute__ ((noinline));
+int f3 (void)
+{
+ *g_6 = 1;
+ f2 (f1 (&g_7));
+ return 0;
+}
+
+int main ()
+{
+ f3 ();
+ if (g_3 != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20110418-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20110418-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20110418-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20110418-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+typedef unsigned long long uint64_t;
+void f(uint64_t *a, uint64_t aa) __attribute__((noinline));
+void f(uint64_t *a, uint64_t aa)
+{
+ uint64_t new_value = aa;
+ uint64_t old_value = *a;
+ int bit_size = 32;
+ uint64_t mask = (uint64_t)(unsigned)(-1);
+ uint64_t tmp = old_value & mask;
+ new_value &= mask;
+ /* On overflow we need to add 1 in the upper bits */
+ if (tmp > new_value)
+ new_value += 1ull<<bit_size;
+ /* Add in the upper bits from the old value */
+ new_value += old_value & ~mask;
+ *a = new_value;
+}
+int main(void)
+{
+ uint64_t value, new_value, old_value;
+ value = 0x100000001;
+ old_value = value;
+ new_value = (value+1)&(uint64_t)(unsigned)(-1);
+ f(&value, new_value);
+ if (value != old_value+1)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111208-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111208-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111208-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111208-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,94 @@
+/* PR tree-optimization/51315 */
+/* Reported by Jurij Smakov <jurij at wooyd.org> */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern void *memcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern size_t strlen (__const char *__s)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+typedef __INT16_TYPE__ int16_t;
+typedef __INT32_TYPE__ int32_t;
+
+extern void abort (void);
+
+int a;
+
+static void __attribute__ ((noinline,noclone))
+do_something (int item)
+{
+ a = item;
+}
+
+int
+pack_unpack (char *s, char *p)
+{
+ char *send, *pend;
+ char type;
+ int integer_size;
+
+ send = s + strlen (s);
+ pend = p + strlen (p);
+
+ while (p < pend)
+ {
+ type = *p++;
+
+ switch (type)
+ {
+ case 's':
+ integer_size = 2;
+ goto unpack_integer;
+
+ case 'l':
+ integer_size = 4;
+ goto unpack_integer;
+
+ unpack_integer:
+ switch (integer_size)
+ {
+ case 2:
+ {
+ union
+ {
+ int16_t i;
+ char a[sizeof (int16_t)];
+ }
+ v;
+ memcpy (v.a, s, sizeof (int16_t));
+ s += sizeof (int16_t);
+ do_something (v.i);
+ }
+ break;
+
+ case 4:
+ {
+ union
+ {
+ int32_t i;
+ char a[sizeof (int32_t)];
+ }
+ v;
+ memcpy (v.a, s, sizeof (int32_t));
+ s += sizeof (int32_t);
+ do_something (v.i);
+ }
+ break;
+ }
+ break;
+ }
+ }
+ return (int) *s;
+}
+
+int
+main (void)
+{
+ int n = pack_unpack ("\200\001\377\376\035\300", "sl");
+ if (n != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111212-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111212-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111212-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111212-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+/* PR tree-optimization/50569 */
+/* Reported by Paul Koning <pkoning at gcc.gnu.org> */
+/* Reduced testcase by Mikael Pettersson <mikpe at it.uu.se> */
+
+struct event {
+ struct {
+ unsigned int sec;
+ } sent __attribute__((packed));
+};
+
+void __attribute__((noinline,noclone)) frob_entry(char *buf)
+{
+ struct event event;
+
+ __builtin_memcpy(&event, buf, sizeof(event));
+ if (event.sent.sec < 64) {
+ event.sent.sec = -1U;
+ __builtin_memcpy(buf, &event, sizeof(event));
+ }
+}
+
+int main(void)
+{
+ union {
+ char buf[1 + sizeof(struct event)];
+ int align;
+ } u;
+
+ __builtin_memset(&u, 0, sizeof u);
+
+ frob_entry(&u.buf[1]);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111227-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111227-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111227-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20111227-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* PR rtl-optimization/51667 */
+/* Testcase by Uros Bizjak <ubizjak at gmail.com> */
+
+extern void abort (void);
+
+void __attribute__((noinline,noclone))
+bar (int a)
+{
+ if (a != -1)
+ abort ();
+}
+
+void __attribute__((noinline,noclone))
+foo (short *a, int t)
+{
+ short r = *a;
+
+ if (t)
+ bar ((unsigned short) r);
+ else
+ bar ((signed short) r);
+}
+
+short v = -1;
+
+int main(void)
+{
+ foo (&v, 0);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120105-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120105-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120105-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120105-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+struct __attribute__((packed)) S
+{
+ int a, b, c;
+};
+
+static int __attribute__ ((noinline,noclone))
+extract(const char *p)
+{
+ struct S s;
+ __builtin_memcpy (&s, p, sizeof(struct S));
+ return s.a;
+}
+
+volatile int i;
+
+int main (void)
+{
+ char p[sizeof(struct S) + 1];
+
+ __builtin_memset (p, 0, sizeof(struct S) + 1);
+ i = extract (p + 1);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120111-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120111-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120111-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120111-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+#include <stdlib.h>
+#include <stdint.h>
+
+uint32_t f0a (uint64_t arg2) __attribute__((noinline));
+
+uint32_t
+f0a (uint64_t arg)
+{
+ return ~((unsigned) (arg > -3));
+}
+
+int main() {
+ uint32_t r1;
+ r1 = f0a (12094370573988097329ULL);
+ if (r1 != ~0U)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120207-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120207-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120207-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120207-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+/* PR middle-end/51994 */
+/* Testcase by Uros Bizjak <ubizjak at gmail.com> */
+
+extern char *strcpy (char *, const char *);
+extern void abort (void);
+
+char __attribute__((noinline))
+test (int a)
+{
+ char buf[16];
+ char *output = buf;
+
+ strcpy (&buf[0], "0123456789");
+
+ output += a;
+ output -= 1;
+
+ return output[0];
+}
+
+int main ()
+{
+ if (test (2) != '1')
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+typedef struct sreal
+{
+ unsigned sig; /* Significant. */
+ int exp; /* Exponent. */
+} sreal;
+
+sreal_compare (sreal *a, sreal *b)
+{
+ if (a->exp > b->exp)
+ return 1;
+ if (a->exp < b->exp)
+ return -1;
+ if (a->sig > b->sig)
+ return 1;
+ return -(a->sig < b->sig);
+}
+
+sreal a[] = {
+ { 0, 0 },
+ { 1, 0 },
+ { 0, 1 },
+ { 1, 1 }
+};
+
+int main()
+{
+ int i, j;
+ for (i = 0; i <= 3; i++) {
+ for (j = 0; j < 3; j++) {
+ if (i < j && sreal_compare(&a[i], &a[j]) != -1) abort();
+ if (i == j && sreal_compare(&a[i], &a[j]) != 0) abort();
+ if (i > j && sreal_compare(&a[i], &a[j]) != 1) abort();
+ }
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120427-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+typedef struct sreal
+{
+ unsigned sig; /* Significant. */
+ int exp; /* Exponent. */
+} sreal;
+
+sreal_compare (sreal *a, sreal *b)
+{
+ if (a->exp > b->exp)
+ return 1;
+ if (a->exp < b->exp)
+ return -1;
+ if (a->sig > b->sig)
+ return 1;
+ if (a->sig < b->sig)
+ return -1;
+ return 0;
+}
+
+sreal a[] = {
+ { 0, 0 },
+ { 1, 0 },
+ { 0, 1 },
+ { 1, 1 }
+};
+
+int main()
+{
+ int i, j;
+ for (i = 0; i <= 3; i++) {
+ for (j = 0; j < 3; j++) {
+ if (i < j && sreal_compare(&a[i], &a[j]) != -1) abort();
+ if (i == j && sreal_compare(&a[i], &a[j]) != 0) abort();
+ if (i > j && sreal_compare(&a[i], &a[j]) != 1) abort();
+ }
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120615-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120615-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120615-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120615-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+extern void abort (void);
+
+void __attribute__((noinline,noclone))
+ test1(int i)
+{
+ if (i == 12)
+ return;
+ if (i != 17)
+ {
+ if (i == 15)
+ return;
+ abort ();
+ }
+}
+
+int main() { test1 (15); return 0; }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120808-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120808-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120808-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120808-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+extern void exit (int);
+extern void abort (void);
+
+volatile int i;
+unsigned char *volatile cp;
+unsigned char d[32] = { 0 };
+
+int
+main (void)
+{
+ unsigned char c[32] = { 0 };
+ unsigned char *p = d + i;
+ int j;
+ for (j = 0; j < 30; j++)
+ {
+ int x = 0xff;
+ int y = *++p;
+ switch (j)
+ {
+ case 1: x ^= 2; break;
+ case 2: x ^= 4; break;
+ case 25: x ^= 1; break;
+ default: break;
+ }
+ c[j] = y | x;
+ cp = p;
+ }
+ if (c[0] != 0xff
+ || c[1] != 0xfd
+ || c[2] != 0xfb
+ || c[3] != 0xff
+ || c[4] != 0xff
+ || c[25] != 0xfe
+ || cp != d + 30)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120817-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120817-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120817-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120817-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+typedef unsigned long long u64;
+unsigned long foo = 0;
+u64 f() __attribute__((noinline));
+
+u64 f() {
+ return ((u64)40) + ((u64) 24) * (int)(foo - 1);
+}
+
+int main ()
+{
+ if (f () != 16)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120919-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120919-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120919-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20120919-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+/* PR rtl-optimization/54290 */
+/* Testcase by Eric Volk <eriksnga at gmail.com> */
+/* { dg-require-effective-target int32plus } */
+
+double vd[2] = {1., 0.};
+int vi[2] = {1234567890, 0};
+double *pd = vd;
+int *pi = vi;
+
+extern void abort(void);
+
+void init (int *n, int *dummy) __attribute__ ((noinline,noclone));
+
+void init (int *n, int *dummy)
+{
+ if(0 == n) dummy[0] = 0;
+}
+
+int main (void)
+{
+ int dummy[1532];
+ int i = -1, n = 1, s = 0;
+ init (&n, dummy);
+ while (i < n) {
+ if (i == 0) {
+ if (pd[i] > 0) {
+ if (pi[i] > 0) {
+ s += pi[i];
+ }
+ }
+ pd[i] = pi[i];
+ }
+ ++i;
+ }
+ if (s != 1234567890)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20121108-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20121108-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20121108-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20121108-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,50 @@
+char temp[] = "192.168.190.160";
+unsigned result = (((((192u<<8)|168u)<<8)|190u)<<8)|160u;
+
+int strtoul1(const char *a, char **b, int c) __attribute__((noinline, noclone));
+int strtoul1(const char *a, char **b, int c)
+{
+ *b = a+3;
+ if (a == temp)
+ return 192;
+ else if (a == temp+4)
+ return 168;
+ else if (a == temp+8)
+ return 190;
+ else if (a == temp+12)
+ return 160;
+ __builtin_abort();
+}
+
+int string_to_ip(const char *s) __attribute__((noinline,noclone));
+int string_to_ip(const char *s)
+{
+ int addr;
+ char *e;
+ int i;
+
+ if (s == 0)
+ return(0);
+
+ for (addr=0, i=0; i<4; ++i) {
+ int val = s ? strtoul1(s, &e, 10) : 0;
+ addr <<= 8;
+ addr |= (val & 0xFF);
+ if (s) {
+ s = (*e) ? e+1 : e;
+ }
+ }
+
+ return addr;
+}
+
+int main(void)
+{
+ int t = string_to_ip (temp);
+ printf ("%x\n", t);
+ printf ("%x\n", result);
+ if (t != result)
+ __builtin_abort ();
+ printf ("WORKS.\n");
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20131127-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20131127-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20131127-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20131127-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+/* PR middle-end/59138 */
+/* Testcase by John Regehr <regehr at cs.utah.edu> */
+
+extern void abort (void);
+
+#pragma pack(1)
+
+struct S0 {
+ int f0;
+ int f1;
+ int f2;
+ short f3;
+};
+
+short a = 1;
+
+struct S0 b = { 1 }, c, d, e;
+
+struct S0 fn1() { return c; }
+
+void fn2 (void)
+{
+ b = fn1 ();
+ a = 0;
+ d = e;
+}
+
+int main (void)
+{
+ fn2 ();
+ if (a != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+/* PR rtl-optimization/60116 */
+/* Reported by Zhendong Su <su at cs.ucdavis.edu> */
+
+extern void abort (void);
+
+int a, b, c, d = 1, e, f = 1, h, i, k;
+char g, j;
+
+void
+fn1 (void)
+{
+ int l;
+ e = 0;
+ c = 0;
+ for (;;)
+ {
+ k = a && b;
+ j = k * 54;
+ g = j * 147;
+ l = ~g + (long long) e && 1;
+ if (d)
+ c = l;
+ else
+ h = i = l * 9UL;
+ if (f)
+ return;
+ }
+}
+
+int
+main (void)
+{
+ fn1 ();
+ if (c != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140212-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* This used to fail as we would convert f into just return (unsigned int)usVlanID
+ which is wrong. */
+
+int f(unsigned short usVlanID) __attribute__((noinline,noclone));
+int f(unsigned short usVlanID)
+{
+ unsigned int uiVlanID = 0xffffffff;
+ int i;
+ if ((unsigned short)0xffff != usVlanID)
+ uiVlanID = (unsigned int)usVlanID;
+ return uiVlanID;
+}
+
+int main(void)
+{
+ if (f(1) != 1)
+ __builtin_abort ();
+ if (f(0xffff) != -1)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140326-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140326-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140326-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140326-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+int a;
+
+int
+main (void)
+{
+ char e[2] = { 0, 0 }, f = 0;
+ if (a == 131072)
+ f = e[a];
+ return f;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140425-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140425-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140425-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140425-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* PR target/60941 */
+/* Reported by Martin Husemann <martin at netbsd.org> */
+
+extern void abort (void);
+
+static void __attribute__((noinline))
+set (unsigned long *l)
+{
+ *l = 31;
+}
+
+int main (void)
+{
+ unsigned long l;
+ int i;
+
+ set (&l);
+ i = (int) l;
+ l = (unsigned long)(2U << i);
+ if (l != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140622-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140622-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140622-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140622-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+unsigned p;
+
+long __attribute__((noinline, noclone))
+test (unsigned a)
+{
+ return (long)(p + a) - (long)p;
+}
+
+int
+main ()
+{
+ p = (unsigned) -2;
+ if (test (0) != 0)
+ __builtin_abort ();
+ if (test (1) != 1)
+ __builtin_abort ();
+ if (test (2) != -(long)(unsigned)-2)
+ __builtin_abort ();
+ p = (unsigned) -1;
+ if (test (0) != 0)
+ __builtin_abort ();
+ if (test (1) != -(long)(unsigned)-1)
+ __builtin_abort ();
+ if (test (2) != -(long)(unsigned)-2)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20140828-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+short *f(short *a, int b, int *d) __attribute__((noinline,noclone));
+
+short *f(short *a, int b, int *d)
+{
+ short c = *a;
+ a++;
+ c = b << c;
+ *d = c;
+ return a;
+}
+
+int main(void)
+{
+ int d;
+ short a[2];
+ a[0] = 0;
+ if (f(a, 1, &d) != &a[1])
+ __builtin_abort ();
+ if (d != 1)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141022-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141022-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141022-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141022-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+#define ABORT() do { __builtin_printf("assert.\n"); __builtin_abort (); }while(0)
+int f(int a) __attribute__((noinline));
+int f(int a)
+{
+ int fem_key_src;
+ int D2930 = a & 4294967291;
+ fem_key_src = a == 6 ? 0 : 15;
+ fem_key_src = D2930 != 1 ? fem_key_src : 0;
+ return fem_key_src;
+}
+
+int main(void)
+{
+ if (f(0) != 15)
+ ABORT ();
+ if (f(1) != 0)
+ ABORT ();
+ if (f(6) != 0)
+ ABORT ();
+ if (f(5) != 0)
+ ABORT ();
+ if (f(15) != 15)
+ ABORT ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141107-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141107-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141107-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141107-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+#define bool _Bool
+
+bool f(int a, bool c) __attribute__((noinline));
+bool f(int a, bool c)
+{
+ if (!a)
+ c = !c;
+ return c;
+}
+
+void checkf(int a, bool b)
+{
+ bool c = f(a, b);
+ char d;
+ __builtin_memcpy (&d, &c, 1);
+ if ( d != (a==0)^b)
+ __builtin_abort();
+}
+
+int main(void)
+{
+ checkf(0, 0);
+ checkf(0, 1);
+ checkf(1, 1);
+ checkf(1, 0);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141125-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141125-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141125-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20141125-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+int f(long long a) __attribute__((noinline,noclone));
+int f(long long a)
+{
+ if (a & 0x3ffffffffffffffull)
+ return 1;
+ return 1024;
+}
+
+int main(void)
+{
+ if(f(0x48375d8000000000ull) != 1)
+ __builtin_abort ();
+ if (f(0xfc00000000000000ull) != 1024)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20150611-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20150611-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20150611-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20150611-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+int a, c, d;
+short b;
+
+int
+main ()
+{
+ int e[1];
+ for (; b < 2; b++)
+ {
+ a = 0;
+ if (b == 28378)
+ a = e[b];
+ if (!(d || b))
+ for (; c;)
+ ;
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170111-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170111-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170111-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170111-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* PR rtl-optimization/79032 */
+/* Reported by Daniel Cederman <cederman at gaisler.com> */
+
+extern void abort (void);
+
+struct S {
+ short a;
+ long long b;
+ short c;
+ char d;
+ unsigned short e;
+ long *f;
+};
+
+static long foo (struct S *s) __attribute__((noclone, noinline));
+
+static long foo (struct S *s)
+{
+ long a = 1;
+ a /= s->e;
+ s->f[a]--;
+ return a;
+}
+
+int main (void)
+{
+ long val = 1;
+ struct S s = { 0, 0, 0, 0, 2, &val };
+ val = foo (&s);
+ if (val != 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,53 @@
+/* PR45070 */
+extern void abort(void);
+
+struct packed_ushort {
+ unsigned short ucs;
+} __attribute__((packed));
+
+struct source {
+ int pos, length;
+};
+
+static int flag;
+
+static void __attribute__((noinline)) fetch(struct source *p)
+{
+ p->length = 128;
+}
+
+static struct packed_ushort __attribute__((noinline)) next(struct source *p)
+{
+ struct packed_ushort rv;
+
+ if (p->pos >= p->length) {
+ if (flag) {
+ flag = 0;
+ fetch(p);
+ return next(p);
+ }
+ flag = 1;
+ rv.ucs = 0xffff;
+ return rv;
+ }
+ rv.ucs = 0;
+ return rv;
+}
+
+int main(void)
+{
+ struct source s;
+ int i;
+
+ s.pos = 0;
+ s.length = 0;
+ flag = 0;
+
+ for (i = 0; i < 16; i++) {
+ struct packed_ushort rv = next(&s);
+ if ((i == 0 && rv.ucs != 0xffff)
+ || (i > 0 && rv.ucs != 0))
+ abort();
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170401-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+void adjust_xy (short *, short *);
+
+struct adjust_template
+{
+ short kx_x;
+ short kx_y;
+};
+
+static struct adjust_template adjust = {1, 1};
+
+main ()
+{
+ short x = 1, y = 1;
+
+ adjust_xy (&x, &y);
+
+ if (x != 2)
+ abort ();
+
+ exit (0);
+}
+
+void
+adjust_xy (x, y)
+ short *x;
+ short *y;
+{
+ *x = adjust.kx_x * *x + adjust.kx_y * *y;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170419-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170419-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170419-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20170419-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* PR tree-optimization/80426 */
+/* Testcase by <ishiura-compiler at ml.kwansei.ac.jp> */
+
+#define INT_MAX 0x7fffffff
+#define INT_MIN (-INT_MAX-1)
+
+int x;
+
+int main (void)
+{
+ volatile int a = 0;
+ volatile int b = -INT_MAX;
+ int j;
+
+ for(j = 0; j < 18; j += 1) {
+ x = ( (a == 0) != (b - (int)(INT_MIN) ) );
+ }
+
+ if (x != 0)
+ __builtin_abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20171008-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20171008-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20171008-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20171008-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+struct S { char c1, c2, c3, c4; } __attribute__((aligned(4)));
+
+static char bar (char **p) __attribute__((noclone, noinline));
+static struct S foo (void) __attribute__((noclone, noinline));
+
+int i;
+
+static char
+bar (char **p)
+{
+ i = 1;
+ return 0;
+}
+
+static struct S
+foo (void)
+{
+ struct S ret;
+ char r, s, c1, c2;
+ char *p = &r;
+
+ s = bar (&p);
+ if (s)
+ c2 = *p;
+ c1 = 0;
+
+ ret.c1 = c1;
+ ret.c2 = c2;
+ return ret;
+}
+
+int main (void)
+{
+ struct S s = foo ();
+ if (s.c1 != 0)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* PR rtl-optimization/83565 */
+/* Testcase by Sergei Trofimovich <slyfox at inbox.ru> */
+
+extern void abort (void);
+
+typedef __UINT32_TYPE__ u32;
+
+u32 bug (u32 * result) __attribute__((noinline));
+u32 bug (u32 * result)
+{
+ volatile u32 ss = 0xFFFFffff;
+ volatile u32 d = 0xEEEEeeee;
+ u32 tt = d & 0x00800000;
+ u32 r = tt << 8;
+
+ r = (r >> 31) | (r << 1);
+
+ u32 u = r^ss;
+ u32 off = u >> 1;
+
+ *result = tt;
+ return off;
+}
+
+int main(void)
+{
+ u32 l;
+ u32 off = bug(&l);
+ if (off != 0x7fffffff)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180131-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180131-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180131-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180131-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/84071 */
+/* Reported by Wilco <wilco at gcc.gnu.org> */
+
+extern void abort (void);
+
+typedef union
+{
+ signed short ss;
+ unsigned short us;
+ int x;
+} U;
+
+int f(int x, int y, int z, int a, U u) __attribute__((noclone, noinline));
+
+int f(int x, int y, int z, int a, U u)
+{
+ return (u.ss <= 0) + u.us;
+}
+
+int main (void)
+{
+ U u = { .ss = -1 };
+
+ if (f (0, 0, 0, 0, u) != (1 << sizeof (short) * 8))
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180226-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180226-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180226-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180226-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+/* PR rtl-optimization/83496 */
+/* Reported by Hauke Mehrtens <gcc at hauke-m.de> */
+
+extern void abort (void);
+
+typedef unsigned long mp_digit;
+
+typedef struct { int used, alloc, sign; mp_digit *dp; } mp_int;
+
+int mytest(mp_int *a, mp_digit b) __attribute__((noclone, noinline));
+
+int mytest(mp_int *a, mp_digit b)
+{
+ if (a->sign == 1)
+ return -1;
+ if (a->used > 1)
+ return 1;
+ if (a->dp[0] > b)
+ return 1;
+ if (a->dp[0] < b)
+ return -1;
+ return 0;
+}
+
+int main (void)
+{
+ mp_int i = { 2, 0, -1 };
+ if (mytest (&i, 0) != 1)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180921-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180921-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180921-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20180921-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,161 @@
+/* PR tree-optimization/86990 */
+/* Testcase by Zhendong Su <su at cs.ucdavis.edu> */
+
+const char *ss;
+
+int __attribute__((noipa)) dummy (const char *s, ...)
+{
+ ss = s;
+}
+
+int i[6];
+static int j, v, e, f, h = 5, k, l, n, o, p, q, r, s, u, w, x, y, z, aa, ab, ac,
+ ad, ae, af, ag = 8, ah, ai, aj, ak, al;
+char c;
+struct a {
+ unsigned b;
+ int c : 9;
+ int d;
+} static g = {9, 5};
+static short m[1], t = 95, am;
+int an, ao, ap;
+void aq(int ar) {
+ j = j & 5 ^ i[j ^ v & 5];
+ j = j & 5 ^ i[(j ^ v) & 5];
+ j = j & 4095 ^ (j ^ v) & 5;
+}
+void as(int ar) {
+ if (n)
+ s = 0;
+}
+static unsigned at() {
+ int au[] = {2080555007, 0};
+ for (; al; al--) {
+ if (r)
+ --x;
+ if (g.d)
+ l++;
+ dummy("", j);
+ if (u)
+ ae = n = au[al];
+ }
+ r = 0;
+ return 0;
+}
+int aw(int ar) {
+ int ax[] = {9, 5, 5, 9, 5}, ay = 3;
+ struct a az = {1, 3};
+av:
+ an = (as((at(), ax)[2]), ax[4]);
+ {
+ int ba[] = {5, 5, 9, 8, 1, 0, 5, 5, 9, 8, 1, 0,
+ 5, 5, 9, 8, 1, 0, 5, 5, 9, 8, 1};
+ int a[] = {8, 2, 8, 2, 8, 2, 8};
+ int b[] = {1027239, 8, 1, 7, 9, 2, 9, 4, 4, 2, 8, 1, 0, 4, 4, 2,
+ 4, 4, 2, 9, 2, 9, 8, 1, 7, 9, 2, 9, 4, 4, 2};
+ if (z) {
+ struct a bc;
+ bb:
+ for (; e; e++)
+ for (; q;)
+ return ax[e];
+ if (bc.c < g.d <= a[7])
+ aa--;
+ }
+ {
+ struct a bd = {5};
+ int d[20] = {1, 9, 7, 7, 8, 4, 4, 4, 4, 8, 1, 9, 7, 7, 8, 4, 4, 4, 4};
+ c = h | r % g.c ^ x;
+ dummy("", g);
+ am -= t | x;
+ if (h)
+ while (1) {
+ if (a[o]) {
+ struct a be;
+ if (ar) {
+ struct a bf = {908, 5, 3};
+ int bg[3], bh = k, bj = ag | ae, bk = aj + 3, bl = u << e;
+ if (f)
+ if (ac)
+ ak = w;
+ ag = -(ag & t);
+ af = ag ^ af;
+ if (8 < af)
+ break;
+ if (bj)
+ goto bi;
+ if (s)
+ dummy("", 6);
+ be.d = k;
+ w = f - bh;
+ dummy("", be);
+ if (w)
+ goto bb;
+ ao = r - aa && g.b;
+ if (y)
+ k++;
+ goto av;
+ bi:
+ if (aa)
+ continue;
+ if (f)
+ if (k)
+ dummy("", g);
+ aj = ac + k ^ g.c;
+ g.c = bk;
+ ah = 0;
+ for (; ah < 3; ah++)
+ if (s)
+ bg[ah] = 8;
+ if (!ay)
+ dummy("", ai);
+ u = bl;
+ g = bf;
+ } else
+ for (;; o += a[ap])
+ ;
+ int bm[] = {0};
+ for (; p; p++)
+ c = ad;
+ ad = l;
+ if (bd.c) {
+ dummy(" ");
+ goto bi;
+ }
+ }
+ int bn[] = {5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5,
+ 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2,
+ 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2};
+ struct a a[] = {3440025416, 2, 8, 4, 2, 8, 4, 4, 2, 8, 4};
+ struct a b = {3075920};
+ if (f) {
+ aq(m[am + e]);
+ dummy("", j);
+ dummy("", e);
+ ab--;
+ }
+ if (ax[4]) {
+ if (l)
+ goto av;
+ ++f;
+ } else
+ ay = az.c && a;
+ for (; ac; ac++)
+ m[f] = 0;
+ }
+ h = 9;
+ for (; y; y = 1)
+ if (f)
+ goto av;
+ }
+ }
+ return 0;
+}
+
+int main (void)
+{
+ aw(1);
+ if (g.c!= 5)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20181120-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20181120-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20181120-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20181120-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/85925 */
+/* { dg-require-effective-target int32plus } */
+/* Testcase by <sudi at gcc.gnu.org> */
+
+int a, c, d;
+volatile int b;
+int *e = &d;
+
+union U1 {
+ unsigned f0;
+ unsigned f1 : 15;
+};
+volatile union U1 u = { 0x4030201 };
+
+int main (void)
+{
+ for (c = 0; c <= 1; c++) {
+ union U1 f = {0x4030201};
+ if (c == 1)
+ b;
+ *e = f.f1;
+ }
+
+ if (d != u.f1)
+ __builtin_abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190228-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190228-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190228-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190228-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+/* PR tree-optimization/89536 */
+/* Testcase by Zhendong Su <su at cs.ucdavis.edu> */
+
+int a = 1;
+
+int main (void)
+{
+ a = ~(a && 1);
+ if (a < -1)
+ a = ~a;
+
+ if (!a)
+ __builtin_abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190820-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190820-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190820-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/20190820-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,111 @@
+/* PR rtl-optimization/91347 */
+/* Reported by John David Anglin <danglin at gcc.gnu.org> */
+
+typedef unsigned short __u16;
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+typedef __u16 u16;
+typedef __s32 s32;
+typedef __u32 u32;
+typedef __u64 u64;
+typedef _Bool bool;
+typedef s32 int32_t;
+typedef u32 uint32_t;
+typedef u64 uint64_t;
+
+char hex_asc_upper[16];
+u16 decpair[100];
+
+static __attribute__ ((noipa)) void
+put_dec_full4 (char *buf, unsigned r)
+{
+ unsigned q;
+ q = (r * 0x147b) >> 19;
+ *((u16 *)buf) = decpair[r - 100*q];
+ buf += 2;
+ *((u16 *)buf) = decpair[q];
+}
+
+static __attribute__ ((noipa)) unsigned
+put_dec_helper4 (char *buf, unsigned x)
+{
+ uint32_t q = (x * (uint64_t)0x346DC5D7) >> 43;
+ put_dec_full4(buf, x - q * 10000);
+ return q;
+}
+
+static __attribute__ ((noipa)) char *
+put_dec (char *buf, unsigned long long n)
+{
+ uint32_t d3, d2, d1, q, h;
+ d1 = ((uint32_t)n >> 16);
+ h = (n >> 32);
+ d2 = (h ) & 0xffff;
+ d3 = (h >> 16);
+ q = 656 * d3 + 7296 * d2 + 5536 * d1 + ((uint32_t)n & 0xffff);
+ q = put_dec_helper4(buf, q);
+ q += 7671 * d3 + 9496 * d2 + 6 * d1;
+ q = put_dec_helper4(buf+4, q);
+ q += 4749 * d3 + 42 * d2;
+ q = put_dec_helper4(buf+8, q);
+ return buf;
+}
+
+struct printf_spec {
+ unsigned int type:8;
+ signed int field_width:24;
+ unsigned int flags:8;
+ unsigned int base:8;
+ signed int precision:16;
+} __attribute__((__packed__));
+
+static __attribute__ ((noipa)) char *
+number (char *buf, char *end, unsigned long long num, struct printf_spec spec)
+{
+
+ char tmp[3 * sizeof(num)] __attribute__((__aligned__(2)));
+ char sign;
+ char locase;
+ int need_pfx = ((spec.flags & 64) && spec.base != 10);
+ int i;
+ bool is_zero = num == 0LL;
+ int field_width = spec.field_width;
+ int precision = spec.precision;
+
+ i = 0;
+ if (num < spec.base)
+ tmp[i++] = hex_asc_upper[num] | locase;
+ else if (spec.base != 10) {
+ int mask = spec.base - 1;
+ int shift = 3;
+ if (spec.base == 16)
+ shift = 4;
+ else
+ __builtin_abort ();
+ do {
+ tmp[i++] = (hex_asc_upper[((unsigned char)num) & mask] | locase);
+ num >>= shift;
+ } while (num);
+ } else {
+ i = put_dec(tmp, num) - tmp;
+ }
+ return buf;
+}
+
+static __attribute__ ((noipa)) char *
+pointer_string (char *buf, char *end, const void *ptr, struct printf_spec spec)
+{
+ spec.base = 16;
+ spec.flags = 0;
+ return number(buf, end, 100, spec);
+}
+
+int
+main (void)
+{
+ struct printf_spec spec;
+ char *s = pointer_string (0, 0, 0, spec);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/900409-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/900409-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/900409-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/900409-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+long f1(long a){return a&0xff000000L;}
+long f2 (long a){return a&~0xff000000L;}
+long f3(long a){return a&0x000000ffL;}
+long f4(long a){return a&~0x000000ffL;}
+long f5(long a){return a&0x0000ffffL;}
+long f6(long a){return a&~0x0000ffffL;}
+
+main ()
+{
+ long a = 0x89ABCDEF;
+
+ if (f1(a)!=0x89000000L||
+ f2(a)!=0x00ABCDEFL||
+ f3(a)!=0x000000EFL||
+ f4(a)!=0x89ABCD00L||
+ f5(a)!=0x0000CDEFL||
+ f6(a)!=0x89AB0000L)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920202-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920202-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920202-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920202-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+static int rule_text_needs_stack_pop = 0;
+static int input_stack_pos = 1;
+
+f (void)
+{
+ rule_text_needs_stack_pop = 1;
+
+ if (input_stack_pos <= 0)
+ return 1;
+ else
+ return 0;
+}
+
+main ()
+{
+ f ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920302-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920302-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920302-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920302-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+/* { dg-require-effective-target label_values } */
+
+short optab[5];
+char buf[10];
+execute (ip)
+ register short *ip;
+{
+ register void *base = &&x;
+ char *bp = buf;
+ static void *tab[] = {&&x, &&y, &&z};
+ if (ip == 0)
+ {
+ int i;
+ for (i = 0; i < 3; ++i)
+ optab[i] = (short)(tab[i] - base);
+ return;
+ }
+x: *bp++='x';
+ goto *(base + *ip++);
+y: *bp++='y';
+ goto *(base + *ip++);
+z: *bp++='z';
+ *bp=0;
+ return;
+}
+
+short p[5];
+
+main ()
+{
+ execute ((short *) 0);
+ p[0] = optab[1];
+ p[1] = optab[0];
+ p[2] = optab[1];
+ p[3] = optab[2];
+ execute (&p);
+ if (strcmp (buf, "xyxyz"))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920409-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920409-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920409-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920409-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1 @@
+x(){signed char c=-1;return c<0;}main(){if(x()!=1)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920410-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920410-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920410-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920410-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,3 @@
+/* { dg-require-stack-size "40000 * 4 + 256" } */
+
+main(){int d[40000];d[0]=0;exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920411-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920411-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920411-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920411-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+long f (w)
+ char *w;
+{
+ long k, i, c = 0, x;
+ char *p = (char*) &x;
+ for (i = 0; i < 1; i++)
+ {
+ for (k = 0; k < sizeof (long); k++)
+ p[k] = w[k];
+ c += x;
+ }
+ return c;
+}
+
+main ()
+{
+ int i;
+ char a[sizeof (long)];
+
+ for (i = sizeof (long); --i >= 0;) a[i] = ' ';
+ if (f (a) != ~0UL / (unsigned char) ~0 * ' ')
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920415-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920415-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920415-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920415-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+/* { dg-require-effective-target label_values } */
+main(){__label__ l;void*x(){return&&l;}goto*x();abort();return;l:exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+x(const char*s){char a[1];const char*ss=s;a[*s++]|=1;return(int)ss+1==(int)s;}
+main(){if(x("")!=1)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920428-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,6 @@
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
+
+s(i){if(i>0){__label__ l1;int f(int i){if(i==2)goto l1;return 0;}return f(i);l1:;}return 1;}
+x(){return s(0)==1&&s(1)==0&&s(2)==1;}
+main(){if(x()!=1)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920429-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920429-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920429-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920429-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,3 @@
+typedef unsigned char t;int i,j;
+t*f(t*p){t c;c=*p++;i=((c&2)?1:0);j=(c&7)+1;return p;}
+main(){t*p0="ab",*p1;p1=f(p0);if(p0+1!=p1)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
+int s[2];
+x(){if(!s[0]){s[1+s[1]]=s[1];return 1;}}
+main(){s[0]=s[1]=0;if(x(0)!=1)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,114 @@
+unsigned long
+gcd_ll (unsigned long long x, unsigned long long y)
+{
+ for (;;)
+ {
+ if (y == 0)
+ return (unsigned long) x;
+ x = x % y;
+ if (x == 0)
+ return (unsigned long) y;
+ y = y % x;
+ }
+}
+
+unsigned long long
+powmod_ll (unsigned long long b, unsigned e, unsigned long long m)
+{
+ unsigned t;
+ unsigned long long pow;
+ int i;
+
+ if (e == 0)
+ return 1;
+
+ /* Find the most significant bit in E. */
+ t = e;
+ for (i = 0; t != 0; i++)
+ t >>= 1;
+
+ /* The most sign bit in E is handled outside of the loop, by beginning
+ with B in POW, and decrementing I. */
+ pow = b;
+ i -= 2;
+
+ for (; i >= 0; i--)
+ {
+ pow = pow * pow % m;
+ if ((1 << i) & e)
+ pow = pow * b % m;
+ }
+
+ return pow;
+}
+
+unsigned long factab[10];
+
+void
+facts (t, a_int, x0, p)
+ unsigned long long t;
+ int a_int;
+ int x0;
+ unsigned p;
+{
+ unsigned long *xp = factab;
+ unsigned long long x, y;
+ unsigned long q = 1;
+ unsigned long long a = a_int;
+ int i;
+ unsigned long d;
+ int j = 1;
+ unsigned long tmp;
+ int jj = 0;
+
+ x = x0;
+ y = x0;
+
+ for (i = 1; i < 10000; i++)
+ {
+ x = powmod_ll (x, p, t) + a;
+ y = powmod_ll (y, p, t) + a;
+ y = powmod_ll (y, p, t) + a;
+
+ if (x > y)
+ tmp = x - y;
+ else
+ tmp = y - x;
+ q = (unsigned long long) q * tmp % t;
+
+ if (i == j)
+ {
+ jj += 1;
+ j += jj;
+ d = gcd_ll (q, t);
+ if (d != 1)
+ {
+ *xp++ = d;
+ t /= d;
+ if (t == 1)
+ {
+ return;
+ *xp = 0;
+ }
+ }
+ }
+ }
+}
+
+main ()
+{
+ unsigned long long t;
+ unsigned x0, a;
+ unsigned p;
+
+ p = 27;
+ t = (1ULL << p) - 1;
+
+ a = -1;
+ x0 = 3;
+
+ facts (t, a, x0, p);
+ if (factab[0] != 7 || factab[1] != 73 || factab[2] != 262657)
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+/* { dg-require-effective-target label_values } */
+
+int tab[9];
+execute(oip, ip)
+ unsigned short *oip, *ip;
+{
+ int x = 0;
+ int *xp = tab;
+base:
+ x++;
+ if (x == 4)
+ {
+ *xp = 0;
+ return;
+ }
+ *xp++ = ip - oip;
+ goto *(&&base + *ip++);
+}
+
+main()
+{
+ unsigned short ip[10];
+ int i;
+ for (i = 0; i < 10; i++)
+ ip[i] = 0;
+ execute(ip, ip);
+ if (tab[0] != 0 || tab[1] != 1 || tab[2] != 2 || tab[3] != 0)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+/* { dg-require-effective-target label_values } */
+
+int
+x (int i)
+{
+ static const void *j[] = {&& x, && y, && z};
+
+ goto *j[i];
+
+ x: return 2;
+ y: return 3;
+ z: return 5;
+}
+
+int
+main (void)
+{
+ if ( x (0) != 2
+ || x (1) != 3
+ || x (2) != 5)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-5.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-5.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-5.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-5.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* { dg-require-effective-target label_values } */
+
+x (int i)
+{
+ void *j[] = {&&x, &&y, &&z};
+ goto *j[i];
+ x:return 2;
+ y:return 3;
+ z:return 5;
+
+}
+main ()
+{
+ if (x (0) != 2 || x (1) != 3 || x (2) != 5)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-6.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-6.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-6.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-6.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,91 @@
+#include <stdio.h>
+
+/* Convert a decimal string to a long long unsigned. No error check is
+ performed. */
+
+long long unsigned
+str2llu (str)
+ char *str;
+{
+ long long unsigned acc;
+ int d;
+ acc = *str++ - '0';
+ for (;;)
+ {
+ d = *str++;
+ if (d == '\0')
+ break;
+ d -= '0';
+ acc = acc * 10 + d;
+ }
+
+ return acc;
+}
+
+/* isqrt(t) - computes the square root of t. (tege 86-10-27) */
+
+long unsigned
+sqrtllu (long long unsigned t)
+{
+ long long unsigned s;
+ long long unsigned b;
+
+ for (b = 0, s = t; b++, (s >>= 1) != 0; )
+ ;
+
+ s = 1LL << (b >> 1);
+
+ if (b & 1)
+ s += s >> 1;
+
+ do
+ {
+ b = t / s;
+ s = (s + b) >> 1;
+ }
+ while (b < s);
+
+ return s;
+}
+
+
+int plist (p0, p1, tab)
+ long long unsigned p0, p1;
+ long long unsigned *tab;
+{
+ long long unsigned p;
+ long unsigned d;
+ long unsigned s;
+ long long unsigned *xp = tab;
+
+ for (p = p0; p <= p1; p += 2)
+ {
+ s = sqrtllu (p);
+
+ for (d = 3; d <= s; d += 2)
+ {
+ long long unsigned q = p % d;
+ if (q == 0)
+ goto not_prime;
+ }
+
+ *xp++ = p;
+ not_prime:;
+ }
+ *xp = 0;
+ return xp - tab;
+}
+
+main (argc, argv)
+ int argc;
+ char *argv[];
+{
+ long long tab[10];
+ int nprimes;
+ nprimes = plist (str2llu ("1234111111"), str2llu ("1234111127"), tab);
+
+ if(tab[0]!=1234111117LL||tab[1]!=1234111121LL||tab[2]!=1234111127LL||tab[3]!=0)
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-7.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-7.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-7.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-7.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
+/* { dg-add-options stack_size } */
+
+#ifdef STACK_SIZE
+#define DEPTH ((STACK_SIZE) / 512 + 1)
+#else
+#define DEPTH 1000
+#endif
+
+x(a)
+{
+ __label__ xlab;
+ void y(a)
+ {
+ if (a==0)
+ goto xlab;
+ y (a-1);
+ }
+ y (a);
+ xlab:;
+ return a;
+}
+
+main ()
+{
+ if (x (DEPTH) != DEPTH)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-8.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-8.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-8.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-8.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+/* { dg-additional-options "-Wl,-u,_printf_float" { target newlib_nano_io } } */
+
+#include <stdio.h>
+#include <stdarg.h>
+
+char buf[50];
+int
+va (int a, double b, int c, ...)
+{
+ va_list ap;
+ int d, e, f, g, h, i, j, k, l, m, n, o, p;
+ va_start (ap, c);
+
+ d = va_arg (ap, int);
+ e = va_arg (ap, int);
+ f = va_arg (ap, int);
+ g = va_arg (ap, int);
+ h = va_arg (ap, int);
+ i = va_arg (ap, int);
+ j = va_arg (ap, int);
+ k = va_arg (ap, int);
+ l = va_arg (ap, int);
+ m = va_arg (ap, int);
+ n = va_arg (ap, int);
+ o = va_arg (ap, int);
+ p = va_arg (ap, int);
+
+ sprintf (buf,
+ "%d,%f,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
+ va_end (ap);
+}
+
+main()
+{
+ va (1, 1.0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+ if (strcmp ("1,1.000000,2,3,4,5,6,7,8,9,10,11,12,13,14,15", buf))
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-9.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-9.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-9.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920501-9.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+#include <stdio.h>
+
+long long proc1(){return 1LL;}
+long long proc2(){return 0x12345678LL;}
+long long proc3(){return 0xaabbccdd12345678LL;}
+long long proc4(){return -1LL;}
+long long proc5(){return 0xaabbccddLL;}
+
+print_longlong(x,buf)
+ long long x;
+ char *buf;
+{
+ unsigned long l;
+ l= (x >> 32) & 0xffffffff;
+ if (l != 0)
+ sprintf(buf,"%lx%08.lx",l,((unsigned long)x & 0xffffffff));
+ else
+ sprintf(buf,"%lx",((unsigned long)x & 0xffffffff));
+}
+
+main(){char buf[100];
+print_longlong(proc1(),buf);if(strcmp("1",buf))abort();
+print_longlong(proc2(),buf);if(strcmp("12345678",buf))abort();
+print_longlong(proc3(),buf);if(strcmp("aabbccdd12345678",buf))abort();
+print_longlong(proc4(),buf);if(strcmp("ffffffffffffffff",buf))abort();
+print_longlong(proc5(),buf);if(strcmp("aabbccdd",buf))abort();
+exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920506-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920506-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920506-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920506-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+int l[]={0,1};
+main(){int*p=l;switch(*p++){case 0:exit(0);case 1:break;case 2:break;case 3:case 4:break;}abort();}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920520-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920520-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920520-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920520-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+foo(int *bar)
+{
+ *bar = 8;
+}
+
+bugger()
+{
+ int oldDepth, newDepth;
+
+ foo(&oldDepth);
+
+ switch (oldDepth)
+ {
+ case 8:
+ case 500:
+ newDepth = 8;
+ break;
+
+ case 5000:
+ newDepth = 500;
+ break;
+
+ default:
+ newDepth = 17;
+ break;
+ }
+
+ return newDepth - oldDepth;
+}
+
+main()
+{
+ if (bugger() != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920603-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920603-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920603-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920603-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+f(got){if(got!=0xffff)abort();}
+main(){signed char c=-1;unsigned u=(unsigned short)c;f(u);exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920604-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920604-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920604-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920604-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+long long
+mod (a, b)
+ long long a, b;
+{
+ return a % b;
+}
+
+int
+main ()
+{
+ mod (1LL, 2LL);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,7 @@
+/* { dg-options "-fwrapv" } */
+
+extern void abort (void);
+extern void exit (int);
+
+int f(j)int j;{return++j>0;}
+int main(){if(f((~0U)>>1))abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920612-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* { dg-require-effective-target trampolines } */
+
+main ()
+{
+ int i = 0;
+ int a (int x)
+ {
+ while (x)
+ i++, x--;
+ return x;
+ }
+
+ if (a (2) != 0)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920618-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920618-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920618-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920618-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1 @@
+main(){if(1.17549435e-38F<=1.1)exit(0);abort();}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920625-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920625-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920625-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920625-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+#include <stdarg.h>
+
+typedef struct{double x,y;}point;
+point pts[]={{1.0,2.0},{3.0,4.0},{5.0,6.0},{7.0,8.0}};
+static int va1(int nargs,...)
+{
+ va_list args;
+ int i;
+ point pi;
+ va_start(args,nargs);
+ for(i=0;i<nargs;i++){
+ pi=va_arg(args,point);
+ if(pts[i].x!=pi.x||pts[i].y!=pi.y)abort();
+ }
+ va_end(args);
+}
+
+typedef struct{int x,y;}ipoint;
+ipoint ipts[]={{1,2},{3,4},{5,6},{7,8}};
+static int va2(int nargs,...)
+{
+ va_list args;
+ int i;
+ ipoint pi;
+ va_start(args,nargs);
+ for(i=0;i<nargs;i++){
+ pi=va_arg(args,ipoint);
+ if(ipts[i].x!=pi.x||ipts[i].y!=pi.y)abort();
+ }
+ va_end(args);
+}
+
+main()
+{
+va1(4,pts[0],pts[1],pts[2],pts[3]);
+va2(4,ipts[0],ipts[1],ipts[2],ipts[3]);
+exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920710-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920710-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920710-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920710-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+main()
+{
+ if ((double) 18446744073709551615ULL < 1.84467440737095e+19 ||
+ (double) 18446744073709551615ULL > 1.84467440737096e+19)
+ abort();
+
+ if (16777217L != (float)16777217e0)
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920711-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920711-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920711-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920711-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,7 @@
+/* { dg-options "-fwrapv" } */
+
+extern void abort (void);
+extern void exit (int);
+
+int f(long a){return (--a > 0);}
+int main(){if(f(0x80000000L)==0)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+long f(short a,short b){return (long)a/b;}
+main(){if(f(-32768,-1)!=32768L)abort();else exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,3 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
+f(){}
+main(){int n=2;double x[n];f();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+static inline fu (unsigned short data)
+{
+ return data;
+}
+ru(i)
+{
+ if(fu(i++)!=5)abort();
+ if(fu(++i)!=7)abort();
+}
+static inline fs (signed short data)
+{
+ return data;
+}
+rs(i)
+{
+ if(fs(i++)!=5)abort();
+ if(fs(++i)!=7)abort();
+}
+
+
+main()
+{
+ ru(5);
+ rs(5);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920721-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,58 @@
+/* { dg-require-effective-target label_values } */
+
+int try (int num) {
+ __label__ lab1, lab2, lab3, lab4, lab5, lab6, default_lab;
+
+ void *do_switch (int num) {
+ switch(num) {
+ case 1:
+ return &&lab1;
+ case 2:
+ return &&lab2;
+ case 3:
+ return &&lab3;
+ case 4:
+ return &&lab4;
+ case 5:
+ return &&lab5;
+ case 6:
+ return &&lab6;
+ default:
+ return &&default_lab;
+ }
+ }
+
+ goto *do_switch (num);
+
+ lab1:
+ return 1;
+
+ lab2:
+ return 2;
+
+ lab3:
+ return 3;
+
+ lab4:
+ return 4;
+
+ lab5:
+ return 5;
+
+ lab6:
+ return 6;
+
+ default_lab:
+ return -1;
+}
+
+main()
+{
+ int i;
+ for (i = 1; i <= 6; i++)
+ {
+ if (try (i) != i)
+ abort();
+ }
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920726-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920726-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920726-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920726-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,63 @@
+#include <stdio.h>
+#include <stdarg.h>
+
+struct spurious
+{
+ int anumber;
+};
+
+int first(char *buf, char *fmt, ...)
+{
+ int pos, number;
+ va_list args;
+ int dummy;
+ char *bp = buf;
+
+ va_start(args, fmt);
+ for (pos = 0; fmt[pos]; pos++)
+ if (fmt[pos] == 'i')
+ {
+ number = va_arg(args, int);
+ sprintf(bp, "%d", number);
+ bp += strlen(bp);
+ }
+ else
+ *bp++ = fmt[pos];
+
+ va_end(args);
+ *bp = 0;
+ return dummy;
+}
+
+struct spurious second(char *buf,char *fmt, ...)
+{
+ int pos, number;
+ va_list args;
+ struct spurious dummy;
+ char *bp = buf;
+
+ va_start(args, fmt);
+ for (pos = 0; fmt[pos]; pos++)
+ if (fmt[pos] == 'i')
+ {
+ number = va_arg(args, int);
+ sprintf(bp, "%d", number);
+ bp += strlen(bp);
+ }
+ else
+ *bp++ = fmt[pos];
+
+ va_end(args);
+ *bp = 0;
+ return dummy;
+}
+
+main()
+{
+ char buf1[100], buf2[100];
+ first(buf1, "i i ", 5, 20);
+ second(buf2, "i i ", 5, 20);
+ if (strcmp ("5 20 ", buf1) || strcmp ("5 20 ", buf2))
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920728-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920728-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920728-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920728-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+typedef struct {int dims[0]; } *A;
+
+f(unsigned long obj)
+{
+ unsigned char y = obj >> 24;
+ y &= ~4;
+
+ if ((y==0)||(y!=251 ))
+ abort();
+
+ if(((int)obj&7)!=7)return;
+
+ REST_OF_CODE_JUST_HERE_TO_TRIGGER_THE_BUG:
+
+ {
+ unsigned char t = obj >> 24;
+ if (!(t==0)&&(t<=0x03))
+ return 0;
+ return ((A)(obj&0x00FFFFFFL))->dims[1];
+ }
+}
+
+long g(){return 0xff000000L;}
+main (){int x;f(g());exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920730-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920730-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920730-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920730-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* 920730-1.c */
+#include <limits.h>
+f1()
+{
+ int b=INT_MIN;
+ return b>=INT_MIN;
+}
+
+f2()
+{
+ int b=INT_MIN+1;
+ return b>= (unsigned)(INT_MAX+2);
+}
+
+f3()
+{
+ int b=INT_MAX;
+ return b>=INT_MAX;
+}
+
+f4()
+{
+ int b=-1;
+ return b>=UINT_MAX;
+}
+
+main ()
+{
+ if((f1()&f2()&f3()&f4())!=1)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920731-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920731-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920731-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920731-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+f(x){int i;for(i=0;i<8&&(x&1)==0;x>>=1,i++);return i;}
+main(){if(f(4)!=2)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920810-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920810-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920810-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920810-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+typedef struct{void*super;int name;int size;}t;
+t*f(t*clas,int size)
+{
+ t*child=(t*)malloc(size);
+ memcpy(child,clas,clas->size);
+ child->super=clas;
+ child->name=0;
+ child->size=size;
+ return child;
+}
+main()
+{
+ t foo,*bar;
+ memset(&foo,37,sizeof(t));
+ foo.size=sizeof(t);
+ bar=f(&foo,sizeof(t));
+ if(bar->super!=&foo||bar->name!=0||bar->size!=sizeof(t))abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920812-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920812-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920812-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920812-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,3 @@
+typedef int t;
+f(t y){switch(y){case 1:return 1;}return 0;}
+main(){if(f((t)1)!=1)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920829-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920829-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920829-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920829-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+long long c=2863311530LL,c3=2863311530LL*3;
+main(){if(c*3!=c3)abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* REPRODUCED:RUN:SIGNAL MACHINE:mips OPTIONS: */
+
+#include <stdarg.h>
+
+typedef struct{int A;}T;
+
+T f(int x,...)
+{
+va_list ap;
+T X;
+va_start(ap,x);
+X=va_arg(ap,T);
+if(X.A!=10)abort();
+X=va_arg(ap,T);
+if(X.A!=20)abort();
+va_end(ap);
+return X;
+}
+
+main()
+{
+T X,Y;
+int i;
+X.A=10;
+Y.A=20;
+f(2,X,Y);
+exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920908-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
+/*
+CONF:m68k-sun-sunos4.1.1
+OPTIONS:-O
+*/
+struct T
+{
+unsigned i:8;
+unsigned c:24;
+};
+f(struct T t)
+{
+struct T s[1];
+s[0]=t;
+return(char)s->c;
+}
+main()
+{
+struct T t;
+t.i=0xff;
+t.c=0xffff11;
+if(f(t)!=0x11)abort();
+exit(0);
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920909-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920909-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920909-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920909-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,2 @@
+f(a){switch(a){case 0x402:return a+1;case 0x403:return a+2;case 0x404:return a+3;case 0x405:return a+4;case 0x406:return 1;case 0x407:return 4;}return 0;}
+main(){if(f(1))abort();exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920922-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920922-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920922-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920922-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+unsigned long*
+f(p)unsigned long*p;
+{
+ unsigned long a = (*p++) >> 24;
+ return p + a;
+}
+
+main ()
+{
+ unsigned long x = 0x80000000UL;
+ if (f(&x) != &x + 0x81)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920929-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920929-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920929-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/920929-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
+/* REPRODUCED:RUN:SIGNAL MACHINE:sparc OPTIONS: */
+f(int n)
+{
+int i;
+double v[n];
+for(i=0;i<n;i++)
+v[i]=0;
+}
+main()
+{
+f(100);
+exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921006-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921006-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921006-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921006-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,6 @@
+/* REPRODUCED:RUN:SIGNAL MACHINE:i386 OPTIONS:-O */
+main()
+{
+if(strcmp("X","")<0)abort();
+exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921007-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921007-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921007-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921007-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,7 @@
+static int strcmp(){return-1;}
+#define strcmp __builtin_strcmp
+main()
+{
+if(strcmp("X","X\376")>=0)abort();
+exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921013-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921013-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921013-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921013-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+f(d,x,y,n)
+int*d;
+float*x,*y;
+int n;
+{
+ while(n--){*d++=*x++==*y++;}
+}
+
+main()
+{
+ int r[4];
+ float a[]={5,1,3,5};
+ float b[]={2,4,3,0};
+ int i;
+ f(r,a,b,4);
+ for(i=0;i<4;i++)
+ if((a[i]==b[i])!=r[i])
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921016-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921016-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921016-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921016-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+main()
+{
+int j=1081;
+struct
+{
+signed int m:11;
+}l;
+if((l.m=j)==j)abort();
+exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921017-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921017-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921017-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921017-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
+/* { dg-require-effective-target trampolines } */
+
+f(n)
+{
+ int a[n];
+ int g(i)
+ {
+ return a[i];
+ }
+ a[1]=4711;
+ return g(1);
+}
+main()
+{
+ if(f(2)!=4711)abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,8 @@
+void *foo[]={(void *)&("X"[0])};
+
+main ()
+{
+ if (((char*)foo[0])[0] != 'X')
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921019-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,8 @@
+main()
+{
+ double x,y=0.5;
+ x=y/0.2;
+ if(x!=x)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921029-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921029-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921029-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921029-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,42 @@
+typedef unsigned long long ULL;
+ULL back;
+ULL hpart, lpart;
+ULL
+build(long h, long l)
+{
+ hpart = h;
+ hpart <<= 32;
+ lpart = l;
+ lpart &= 0xFFFFFFFFLL;
+ back = hpart | lpart;
+ return back;
+}
+
+main()
+{
+ if (build(0, 1) != 0x0000000000000001LL)
+ abort();
+ if (build(0, 0) != 0x0000000000000000LL)
+ abort();
+ if (build(0, 0xFFFFFFFF) != 0x00000000FFFFFFFFLL)
+ abort();
+ if (build(0, 0xFFFFFFFE) != 0x00000000FFFFFFFELL)
+ abort();
+ if (build(1, 1) != 0x0000000100000001LL)
+ abort();
+ if (build(1, 0) != 0x0000000100000000LL)
+ abort();
+ if (build(1, 0xFFFFFFFF) != 0x00000001FFFFFFFFLL)
+ abort();
+ if (build(1, 0xFFFFFFFE) != 0x00000001FFFFFFFELL)
+ abort();
+ if (build(0xFFFFFFFF, 1) != 0xFFFFFFFF00000001LL)
+ abort();
+ if (build(0xFFFFFFFF, 0) != 0xFFFFFFFF00000000LL)
+ abort();
+ if (build(0xFFFFFFFF, 0xFFFFFFFF) != 0xFFFFFFFFFFFFFFFFLL)
+ abort();
+ if (build(0xFFFFFFFF, 0xFFFFFFFE) != 0xFFFFFFFFFFFFFFFELL)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921104-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921104-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921104-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921104-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,8 @@
+main ()
+{
+ unsigned long val = 1;
+
+ if (val > (unsigned long) ~0)
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921110-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921110-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921110-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921110-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,8 @@
+extern void abort(void);
+typedef void (*frob)();
+frob f[] = {abort};
+
+int main(void)
+{
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+union u {
+ struct { int i1, i2; } t;
+ double d;
+} x[2], v;
+
+f (x, v)
+ union u *x, v;
+{
+ *++x = v;
+}
+
+main()
+{
+ x[1].t.i1 = x[1].t.i2 = 0;
+ v.t.i1 = 1;
+ v.t.i2 = 2;
+ f (x, v);
+ if (x[1].t.i1 != 1 || x[1].t.i2 != 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921113-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921113-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921113-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921113-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,58 @@
+/* { dg-require-stack-size "128 * 128 * 4 + 1024" } */
+
+typedef struct {
+ float wsx;
+} struct_list;
+
+typedef struct_list *list_t;
+
+typedef struct {
+ float x, y;
+} vector_t;
+
+w(float x, float y) {}
+
+f1(float x, float y)
+{
+ if (x != 0 || y != 0)
+ abort();
+}
+f2(float x, float y)
+{
+ if (x != 1 || y != 1)
+ abort();
+}
+
+gitter(int count, vector_t pos[], list_t list, int *nww, vector_t limit[2], float r)
+{
+ float d;
+ int gitt[128][128];
+
+ f1(limit[0].x, limit[0].y);
+ f2(limit[1].x, limit[1].y);
+
+ *nww = 0;
+
+ d = pos[0].x;
+ if (d <= 0.)
+ {
+ w(d, r);
+ if (d <= r * 0.5)
+ {
+ w(d, r);
+ list[0].wsx = 1;
+ }
+ }
+}
+
+vector_t pos[1] = {{0., 0.}};
+vector_t limit[2] = {{0.,0.},{1.,1.}};
+
+main()
+{
+ int nww;
+ struct_list list;
+
+ gitter(1, pos, &list, &nww, limit, 1.);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921117-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921117-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921117-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921117-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+struct s {
+ char text[11];
+ int flag;
+} cell;
+
+int
+check (struct s p)
+{
+ if (p.flag != 99)
+ return 1;
+ return strcmp (p.text, "0123456789");
+}
+
+main ()
+{
+ cell.flag = 99;
+ strcpy (cell.text, "0123456789");
+
+ if (check (cell))
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+f(short *p)
+{
+ short x = *p;
+ return (--x < 0);
+}
+
+main()
+{
+ short x = -10;
+ if (!f(&x))
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921123-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+typedef struct
+{
+ unsigned short b0, b1, b2, b3;
+} four_quarters;
+
+four_quarters x;
+int a, b;
+
+void f (four_quarters j)
+{
+ b = j.b2;
+ a = j.b3;
+}
+
+main ()
+{
+ four_quarters x;
+ x.b0 = x.b1 = x.b2 = 0;
+ x.b3 = 38;
+ f(x);
+ if (a != 38)
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921124-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921124-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921124-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921124-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+f(x, d1, d2, d3)
+ double d1, d2, d3;
+{
+ return x;
+}
+
+g(b,s,x,y,i,j)
+ char *b,*s;
+ double x,y;
+{
+ if (x != 1.0 || y != 2.0 || i != 3 || j != 4)
+ abort();
+}
+
+main()
+{
+ g("","", 1.0, 2.0, f(3, 0.0, 0.0, 0.0), f(4, 0.0, 0.0, 0.0));
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,44 @@
+/* { dg-require-effective-target untyped_assembly } */
+/* { dg-add-options stack_size } */
+
+#ifndef STACK_SIZE
+#define VLEN 2055
+#else
+#define VLEN ((STACK_SIZE/16) - 1)
+#endif
+main ()
+{
+ long dx[VLEN+1];
+ long dy[VLEN+1];
+ long s1[VLEN];
+ int cyx, cyy;
+ int i;
+ long size;
+
+ for (;;)
+ {
+ size = VLEN;
+ mpn_random2 (s1, size);
+
+ for (i = 0; i < 1; i++)
+ ;
+
+ dy[size] = 0x12345678;
+
+ for (i = 0; i < 1; i++)
+ cyy = mpn_mul_1 (dy, s1, size);
+
+ if (cyx != cyy || mpn_cmp (dx, dy, size + 1) != 0 || dx[size] != 0x12345678)
+ {
+ foo ("", 8, cyy); mpn_print (dy, size);
+ }
+ exxit();
+ }
+}
+
+foo (){}
+mpn_mul_1(){}
+mpn_print (){}
+mpn_random2(){}
+mpn_cmp(){}
+exxit(){exit(0);}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921202-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+int
+f(long long x)
+{
+ x >>= 8;
+ return x & 0xff;
+}
+
+main()
+{
+ if (f(0x0123456789ABCDEFLL) != 0xCD)
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921204-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921204-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921204-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921204-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,46 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
+typedef struct {
+ unsigned b0:1, f1:17, b18:1, b19:1, b20:1, f2:11;
+} bf;
+
+typedef union {
+ bf b;
+ unsigned w;
+} bu;
+
+bu
+f(bu i)
+{
+ bu o = i;
+
+ if (o.b.b0)
+ o.b.b18 = 1,
+ o.b.b20 = 1;
+ else
+ o.b.b18 = 0,
+ o.b.b20 = 0;
+
+ return o;
+}
+
+main()
+{
+ bu a;
+ bu r;
+
+ a.w = 0x4000000;
+ a.b.b0 = 0;
+ r = f(a);
+ if (a.w != r.w)
+ abort();
+ exit(0);
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921207-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921207-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921207-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921207-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+f()
+{
+ unsigned b = 0;
+
+ if (b > ~0U)
+ b = ~0U;
+
+ return b;
+}
+main()
+{
+ if (f()!=0)
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+double
+f(double x)
+{
+ return x*x;
+}
+
+double
+Int(double (*f)(double), double a)
+{
+ return (*f)(a);
+}
+
+main()
+{
+ if (Int(&f,2.0) != 4.0)
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921208-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* { dg-require-effective-target untyped_assembly } */
+/* { dg-require-stack-size "100000 * 4 + 1024" } */
+
+g(){}
+
+f()
+{
+ int i;
+ float a[100000];
+
+ for (i = 0; i < 1; i++)
+ {
+ g(1.0, 1.0 + i / 2.0 * 3.0);
+ g(2.0, 1.0 + i / 2.0 * 3.0);
+ }
+}
+
+main ()
+{
+ f();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921215-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921215-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921215-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921215-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* { dg-require-effective-target trampolines } */
+
+main()
+{
+ void p(void ((*f) (void ())))
+ {
+ void r()
+ {
+ foo ();
+ }
+
+ f(r);
+ }
+
+ void q(void ((*f)()))
+ {
+ f();
+ }
+
+ p(q);
+
+ exit(0);
+}
+
+foo(){}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+f()
+{
+ return (unsigned char)("\377"[0]);
+}
+
+main()
+{
+ if (f() != (unsigned char)(0377))
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/921218-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+f()
+{
+ long l2;
+ unsigned short us;
+ unsigned long ul;
+ short s2;
+
+ ul = us = l2 = s2 = -1;
+ return ul;
+}
+
+main()
+{
+ if (f()!=(unsigned short)-1)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930106-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930106-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930106-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930106-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* { dg-add-options stack_size } */
+
+#if defined (STACK_SIZE)
+#define DUMMY_SIZE 9
+#else
+#define DUMMY_SIZE 399999
+#endif
+
+double g()
+{
+ return 1.0;
+}
+
+f()
+{
+ char dummy[DUMMY_SIZE];
+ double f1, f2, f3;
+ f1 = g();
+ f2 = g();
+ f3 = g();
+ return f1 + f2 + f3;
+}
+
+main()
+{
+ if (f() != 3.0)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930111-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930111-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930111-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930111-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+main()
+{
+ if (wwrite((long long) 0) != 123)
+ abort();
+ exit(0);
+}
+
+int
+wwrite(long long i)
+{
+ switch(i)
+ {
+ case 3:
+ case 10:
+ case 23:
+ case 28:
+ case 47:
+ return 0;
+ default:
+ return 123;
+ }
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930123-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930123-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930123-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930123-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+f(int *x)
+{
+ *x = 0;
+}
+
+main()
+{
+ int s, c, x;
+ char a[] = "c";
+
+ f(&s);
+ a[c = 0] = s == 0 ? (x=1, 'a') : (x=2, 'b');
+ if (a[c] != 'a')
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+struct s {
+ unsigned long long a:8, b:32;
+};
+
+struct s
+f(struct s x)
+{
+ x.b = 0xcdef1234;
+ return x;
+}
+
+main()
+{
+ static struct s i;
+ i.a = 12;
+ i = f(i);
+ if (i.a != 12 || i.b != 0xcdef1234)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930208-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930208-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930208-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930208-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+typedef union {
+ long l;
+ struct { char b3, b2, b1, b0; } c;
+} T;
+
+f (T u)
+{
+ ++u.c.b0;
+ ++u.c.b3;
+ return (u.c.b1 != 2 || u.c.b2 != 2);
+}
+
+main ()
+{
+ T u;
+ u.c.b1 = 2;
+ u.c.b2 = 2;
+ u.c.b0 = ~0;
+ u.c.b3 = ~0;
+ if (f (u))
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930406-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930406-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930406-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930406-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* { dg-add-options stack_size } */
+
+f()
+{
+ int x = 1;
+#if defined(STACK_SIZE)
+ char big[STACK_SIZE/2];
+#else
+ char big[0x1000];
+#endif
+
+ ({
+ __label__ mylabel;
+ mylabel:
+ x++;
+ if (x != 3)
+ goto mylabel;
+ });
+ exit(0);
+}
+
+main()
+{
+ f();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930408-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930408-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930408-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930408-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+typedef enum foo E;
+enum foo { e0, e1 };
+
+struct {
+ E eval;
+} s;
+
+p()
+{
+ abort();
+}
+
+f()
+{
+ switch (s.eval)
+ {
+ case e0:
+ p();
+ }
+}
+
+main()
+{
+ s.eval = e1;
+ f();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+char *
+f (char *p)
+{
+ short x = *p++ << 16;
+ return p;
+}
+
+main ()
+{
+ char *p = "";
+ if (f (p) != p + 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930429-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+int
+f (b)
+{
+ return (b >> 1) > 0;
+}
+
+main ()
+{
+ if (!f (9))
+ abort ();
+ if (f (-9))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+/* { dg-additional-options "-Wl,-u,_printf_float" { target newlib_nano_io } } */
+
+#include <stdio.h>
+char buf[2];
+
+f (fp)
+ int (*fp)(char *, const char *, ...);
+{
+ (*fp)(buf, "%.0f", 5.0);
+}
+
+main ()
+{
+ f (&sprintf);
+ if (buf[0] != '5' || buf[1] != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930513-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+sub3 (i)
+ const int *i;
+{
+}
+
+eq (a, b)
+{
+ static int i = 0;
+ if (a != i)
+ abort ();
+ i++;
+}
+
+main ()
+{
+ int i;
+
+ for (i = 0; i < 4; i++)
+ {
+ const int j = i;
+ int k;
+ sub3 (&j);
+ k = j;
+ eq (k, k);
+ }
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930518-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930518-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930518-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930518-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+int bar = 0;
+
+f (p)
+ int *p;
+{
+ int foo = 2;
+
+ while (foo > bar)
+ {
+ foo -= bar;
+ *p++ = foo;
+ bar = 1;
+ }
+}
+
+main ()
+{
+ int tab[2];
+ tab[0] = tab[1] = 0;
+ f (tab);
+ if (tab[0] != 2 || tab[1] != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930526-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930526-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930526-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930526-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+/* { dg-options "-fgnu89-inline" } */
+
+extern void exit (int);
+
+inline void
+f (int x)
+{
+ int *(p[25]);
+ int m[25*7];
+ int i;
+
+ for (i = 0; i < 25; i++)
+ p[i] = m + x*i;
+
+ p[1][0] = 0;
+}
+
+int
+main ()
+{
+ f (7);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930527-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930527-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930527-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930527-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+f (unsigned char x)
+{
+ return (0x50 | (x >> 4)) ^ 0xff;
+}
+
+main ()
+{
+ if (f (0) != 0xaf)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930529-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930529-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930529-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930529-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,51 @@
+/* { dg-options { "-fwrapv" } } */
+
+extern void abort (void);
+extern void exit (int);
+
+int dd (int x, int d) { return x / d; }
+
+int
+main ()
+{
+ int i;
+ for (i = -3; i <= 3; i++)
+ {
+ if (dd (i, 1) != i / 1)
+ abort ();
+ if (dd (i, 2) != i / 2)
+ abort ();
+ if (dd (i, 3) != i / 3)
+ abort ();
+ if (dd (i, 4) != i / 4)
+ abort ();
+ if (dd (i, 5) != i / 5)
+ abort ();
+ if (dd (i, 6) != i / 6)
+ abort ();
+ if (dd (i, 7) != i / 7)
+ abort ();
+ if (dd (i, 8) != i / 8)
+ abort ();
+ }
+ for (i = ((unsigned) ~0 >> 1) - 3; i <= ((unsigned) ~0 >> 1) + 3; i++)
+ {
+ if (dd (i, 1) != i / 1)
+ abort ();
+ if (dd (i, 2) != i / 2)
+ abort ();
+ if (dd (i, 3) != i / 3)
+ abort ();
+ if (dd (i, 4) != i / 4)
+ abort ();
+ if (dd (i, 5) != i / 5)
+ abort ();
+ if (dd (i, 6) != i / 6)
+ abort ();
+ if (dd (i, 7) != i / 7)
+ abort ();
+ if (dd (i, 8) != i / 8)
+ abort ();
+ }
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+float fx (x)
+ float x;
+{
+ return 1.0 + 3.0 / (2.302585093 * x);
+}
+
+main ()
+{
+ float fx (), inita (), initc (), a, b, c;
+ a = inita ();
+ c = initc ();
+ f ();
+ b = fx (c) + a;
+ f ();
+ if (a != 3.0 || b < 4.3257 || b > 4.3258 || c != 4.0)
+ abort ();
+ exit (0);
+}
+
+float inita () { return 3.0; }
+float initc () { return 4.0; }
+f () {}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+int w[2][2];
+
+f ()
+{
+ int i, j;
+
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 2; j++)
+ if (i == j)
+ w[i][j] = 1;
+}
+
+main ()
+{
+ f ();
+ if (w[0][0] != 1 || w[1][1] != 1 || w[1][0] != 0 || w[0][1] != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930603-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+f (b, c)
+ unsigned char *b;
+ int c;
+{
+ unsigned long v = 0;
+ switch (c)
+ {
+ case 'd':
+ v = ((unsigned long)b[0] << 8) + b[1];
+ v >>= 9;
+ break;
+
+ case 'k':
+ v = b[3] >> 4;
+ break;
+
+ default:
+ abort ();
+ }
+
+ return v;
+}
+main ()
+{
+ char buf[4];
+ buf[0] = 170; buf[1] = 5;
+ if (f (buf, 'd') != 85)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930608-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930608-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930608-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930608-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+double f (double a) {}
+double (* const a[]) (double) = {&f};
+
+main ()
+{
+ double (*p) ();
+ p = &f;
+ if (p != a[0])
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+f (double *ty)
+{
+ *ty = -1.0;
+}
+
+main ()
+{
+ double foo[6];
+ double tx = 0.0, ty, d;
+
+ f (&ty);
+
+ if (ty < 0)
+ ty = -ty;
+ d = (tx > ty) ? tx : ty;
+ if (ty != d)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930614-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+main ()
+{
+ int i, j, k, l;
+ float x[8][2][8][2];
+
+ for (i = 0; i < 8; i++)
+ for (j = i; j < 8; j++)
+ for (k = 0; k < 2; k++)
+ for (l = 0; l < 2; l++)
+ {
+ if ((i == j) && (k == l))
+ x[i][k][j][l] = 0.8;
+ else
+ x[i][k][j][l] = 0.8;
+ if (x[i][k][j][l] < 0.0)
+ abort ();
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930621-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930621-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930621-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930621-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
+f ()
+{
+ struct {
+ int x : 18;
+ int y : 14;
+ } foo;
+
+ foo.x = 10;
+ foo.y = 20;
+
+ return foo.y;
+}
+
+main ()
+{
+ if (f () != 20)
+ abort ();
+ exit (0);
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+int a = 1, b;
+
+g () { return 0; }
+h (x) {}
+
+f ()
+{
+ if (g () == -1)
+ return 0;
+ a = g ();
+ if (b >= 1)
+ h (a);
+ return 0;
+}
+
+main ()
+{
+ f ();
+ if (a != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930622-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+long double
+ll_to_ld (long long n)
+{
+ return n;
+}
+
+long long
+ld_to_ll (long double n)
+{
+ return n;
+}
+
+main ()
+{
+ long long n;
+
+ if (ll_to_ld (10LL) != 10.0)
+ abort ();
+
+ if (ld_to_ll (10.0) != 10)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930628-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930628-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930628-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930628-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+f (double x[2], double y[2])
+{
+ if (x == y)
+ abort ();
+}
+
+main ()
+{
+ struct { int f[3]; double x[1][2]; } tp[4][2];
+ int i, j, ki, kj, mi, mj;
+ float bdm[4][2][4][2];
+
+ for (i = 0; i < 4; i++)
+ for (j = i; j < 4; j++)
+ for (ki = 0; ki < 2; ki++)
+ for (kj = 0; kj < 2; kj++)
+ if ((j == i) && (ki == kj))
+ bdm[i][ki][j][kj] = 1000.0;
+ else
+ {
+ for (mi = 0; mi < 1; mi++)
+ for (mj = 0; mj < 1; mj++)
+ f (tp[i][ki].x[mi], tp[j][kj].x[mj]);
+ bdm[i][ki][j][kj] = 1000.0;
+ }
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930630-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930630-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930630-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930630-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
+main ()
+{
+ struct
+ {
+ signed int bf0:17;
+ signed int bf1:7;
+ } bf;
+
+ bf.bf1 = 7;
+ f (bf.bf1);
+ exit (0);
+}
+
+f (x)
+ int x;
+{
+ if (x != 7)
+ abort ();
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930702-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930702-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930702-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930702-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+fp (double a, int b)
+{
+ if (a != 33 || b != 11)
+ abort ();
+}
+
+main ()
+{
+ int (*f) (double, int) = fp;
+
+ fp (33, 11);
+ f (33, 11);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930713-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930713-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930713-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930713-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+typedef struct
+{
+ char x;
+} T;
+
+T
+f (s1)
+ T s1;
+{
+ T s1a;
+ s1a.x = 17;
+ return s1a;
+}
+
+main ()
+{
+ T s1a, s1b;
+ s1a.x = 13;
+ s1b = f (s1a);
+ if (s1a.x != 13 || s1b.x != 17)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930718-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930718-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930718-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930718-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+typedef struct rtx_def
+{
+ int f1 :1;
+ int f2 :1;
+} *rtx;
+
+static rtx
+f (orig)
+ register rtx orig;
+{
+ if (orig->f1 || orig->f2)
+ return orig;
+ orig->f2 = 1;
+ return orig;
+}
+
+void
+f2 ()
+{
+ abort ();
+}
+
+main ()
+{
+ struct rtx_def foo;
+ rtx bar;
+
+ foo.f1 = 1;
+ foo.f2 = 0;
+ bar = f (&foo);
+ if (bar != &foo || bar->f2 != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930719-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930719-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930719-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930719-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+int
+f (foo, bar, com)
+{
+ unsigned align;
+ if (foo)
+ return 0;
+ while (1)
+ {
+ switch (bar)
+ {
+ case 1:
+ if (com != 0)
+ return align;
+ *(char *) 0 = 0;
+ }
+ }
+}
+
+main ()
+{
+ f (0, 1, 1);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930725-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930725-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930725-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930725-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+int v;
+
+char *
+g ()
+{
+ return "";
+}
+
+char *
+f ()
+{
+ return (v == 0 ? g () : "abc");
+}
+
+main ()
+{
+ v = 1;
+ if (!strcmp (f (), "abc"))
+ exit (0);
+ abort();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930818-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930818-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930818-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930818-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+static double one = 1.0;
+
+f()
+{
+ int colinear;
+ colinear = (one == 0.0);
+ if (colinear)
+ abort ();
+ return colinear;
+}
+main()
+{
+ if (f()) abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930916-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930916-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930916-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930916-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+f (n)
+ unsigned n;
+{
+ if ((int) n >= 0)
+ abort ();
+}
+
+main ()
+{
+ unsigned x = ~0;
+ f (x);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930921-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930921-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930921-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930921-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+f (x)
+ unsigned x;
+{
+ return (unsigned) (((unsigned long long) x * 0xAAAAAAAB) >> 32) >> 1;
+}
+
+main ()
+{
+ unsigned i;
+
+ for (i = 0; i < 10000; i++)
+ if (f (i) != i / 3)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930929-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930929-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930929-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930929-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+sub1 (i)
+ int i;
+{
+ return i - (5 - i);
+}
+
+sub2 (i)
+ int i;
+{
+ return i + (5 + i);
+}
+
+sub3 (i)
+ int i;
+{
+ return i - (5 + i);
+}
+
+sub4 (i)
+ int i;
+{
+ return i + (5 - i);
+}
+
+main()
+{
+ if (sub1 (20) != 35)
+ abort ();
+ if (sub2 (20) != 45)
+ abort ();
+ if (sub3 (20) != -5)
+ abort ();
+ if (sub4 (20) != 5)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+__extension__ typedef __PTRDIFF_TYPE__ ptr_t;
+ptr_t *wm_TR;
+ptr_t *wm_HB;
+ptr_t *wm_SPB;
+
+ptr_t mem[100];
+
+f (mr_TR, mr_SPB, mr_HB, reg1, reg2)
+ ptr_t *mr_TR;
+ ptr_t *mr_SPB;
+ ptr_t *mr_HB;
+ ptr_t *reg1;
+ ptr_t *reg2;
+{
+ ptr_t *x = mr_TR;
+
+ for (;;)
+ {
+ if (reg1 < reg2)
+ goto out;
+ if ((ptr_t *) *reg1 < mr_HB && (ptr_t *) *reg1 >= mr_SPB)
+ *--mr_TR = *reg1;
+ reg1--;
+ }
+ out:
+
+ if (x != mr_TR)
+ abort ();
+}
+
+main ()
+{
+ mem[99] = (ptr_t) mem;
+ f (mem + 100, mem + 6, mem + 8, mem + 99, mem + 99);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/930930-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+int
+test_endianness()
+{
+ union doubleword
+ {
+ double d;
+ unsigned long u[2];
+ } dw;
+ dw.d = 10;
+ return dw.u[0] != 0 ? 1 : 0;
+}
+
+int
+test_endianness_vol()
+{
+ union doubleword
+ {
+ volatile double d;
+ volatile long u[2];
+ } dw;
+ dw.d = 10;
+ return dw.u[0] != 0 ? 1 : 0;
+}
+
+main ()
+{
+ if (test_endianness () != test_endianness_vol ())
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931002-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931002-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931002-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931002-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* { dg-require-effective-target trampolines } */
+
+f (void (*func) ())
+{
+ func ();
+}
+
+main ()
+{
+ void t0 ()
+ {
+ }
+
+ void t1 ()
+ {
+ f (t0);
+ }
+
+ void t2 ()
+ {
+ t1 ();
+ }
+
+ t1 ();
+ t1 ();
+ t2 ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+struct tiny
+{
+ int c;
+};
+
+f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
+{
+ if (x.c != 10)
+ abort();
+
+ if (y.c != 11)
+ abort();
+
+ if (z.c != 12)
+ abort();
+
+ if (l != 123)
+ abort ();
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-10.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-10.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-10.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-10.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+#include <stdarg.h>
+
+struct tiny
+{
+ char c;
+ char d;
+};
+
+f (int n, ...)
+{
+ struct tiny x;
+ int i;
+
+ va_list ap;
+ va_start (ap,n);
+ for (i = 0; i < n; i++)
+ {
+ x = va_arg (ap,struct tiny);
+ if (x.c != i + 10)
+ abort();
+ if (x.d != i + 20)
+ abort();
+ }
+ {
+ long x = va_arg (ap, long);
+ if (x != 123)
+ abort();
+ }
+ va_end (ap);
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-11.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-11.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-11.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-11.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,49 @@
+struct tiny
+{
+ char c;
+ char d;
+ char e;
+};
+
+f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
+{
+ if (x.c != 10)
+ abort();
+ if (x.d != 20)
+ abort();
+ if (x.e != 30)
+ abort();
+
+ if (y.c != 11)
+ abort();
+ if (y.d != 21)
+ abort();
+ if (y.e != 31)
+ abort();
+
+ if (z.c != 12)
+ abort();
+ if (z.d != 22)
+ abort();
+ if (z.e != 32)
+ abort();
+
+ if (l != 123)
+ abort ();
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ x[0].e = 30;
+ x[1].e = 31;
+ x[2].e = 32;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-12.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-12.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-12.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-12.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,49 @@
+#include <stdarg.h>
+
+struct tiny
+{
+ char c;
+ char d;
+ char e;
+};
+
+f (int n, ...)
+{
+ struct tiny x;
+ int i;
+
+ va_list ap;
+ va_start (ap,n);
+ for (i = 0; i < n; i++)
+ {
+ x = va_arg (ap,struct tiny);
+ if (x.c != i + 10)
+ abort();
+ if (x.d != i + 20)
+ abort();
+ if (x.e != i + 30)
+ abort();
+ }
+ {
+ long x = va_arg (ap, long);
+ if (x != 123)
+ abort();
+ }
+ va_end (ap);
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ x[0].e = 30;
+ x[1].e = 31;
+ x[2].e = 32;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-13.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-13.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-13.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-13.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,59 @@
+struct tiny
+{
+ char c;
+ char d;
+ char e;
+ char f;
+};
+
+f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
+{
+ if (x.c != 10)
+ abort();
+ if (x.d != 20)
+ abort();
+ if (x.e != 30)
+ abort();
+ if (x.f != 40)
+ abort();
+
+ if (y.c != 11)
+ abort();
+ if (y.d != 21)
+ abort();
+ if (y.e != 31)
+ abort();
+ if (y.f != 41)
+ abort();
+
+ if (z.c != 12)
+ abort();
+ if (z.d != 22)
+ abort();
+ if (z.e != 32)
+ abort();
+ if (z.f != 42)
+ abort();
+
+ if (l != 123)
+ abort ();
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ x[0].e = 30;
+ x[1].e = 31;
+ x[2].e = 32;
+ x[0].f = 40;
+ x[1].f = 41;
+ x[2].f = 42;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-14.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-14.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-14.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-14.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,55 @@
+#include <stdarg.h>
+
+struct tiny
+{
+ char c;
+ char d;
+ char e;
+ char f;
+};
+
+f (int n, ...)
+{
+ struct tiny x;
+ int i;
+
+ va_list ap;
+ va_start (ap,n);
+ for (i = 0; i < n; i++)
+ {
+ x = va_arg (ap,struct tiny);
+ if (x.c != i + 10)
+ abort();
+ if (x.d != i + 20)
+ abort();
+ if (x.e != i + 30)
+ abort();
+ if (x.f != i + 40)
+ abort();
+ }
+ {
+ long x = va_arg (ap, long);
+ if (x != 123)
+ abort();
+ }
+ va_end (ap);
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ x[0].e = 30;
+ x[1].e = 31;
+ x[2].e = 32;
+ x[0].f = 40;
+ x[1].f = 41;
+ x[2].f = 42;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+#include <stdarg.h>
+
+struct tiny
+{
+ int c;
+};
+
+f (int n, ...)
+{
+ struct tiny x;
+ int i;
+
+ va_list ap;
+ va_start (ap,n);
+ for (i = 0; i < n; i++)
+ {
+ x = va_arg (ap,struct tiny);
+ if (x.c != i + 10)
+ abort();
+ }
+ {
+ long x = va_arg (ap, long);
+ if (x != 123)
+ abort();
+ }
+ va_end (ap);
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+struct tiny
+{
+ short c;
+};
+
+f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
+{
+ if (x.c != 10)
+ abort();
+
+ if (y.c != 11)
+ abort();
+
+ if (z.c != 12)
+ abort();
+
+ if (l != 123)
+ abort ();
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+#include <stdarg.h>
+
+struct tiny
+{
+ short c;
+};
+
+f (int n, ...)
+{
+ struct tiny x;
+ int i;
+
+ va_list ap;
+ va_start (ap,n);
+ for (i = 0; i < n; i++)
+ {
+ x = va_arg (ap,struct tiny);
+ if (x.c != i + 10)
+ abort();
+ }
+ {
+ long x = va_arg (ap, long);
+ if (x != 123)
+ abort();
+ }
+ va_end (ap);
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-5.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-5.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-5.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-5.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+struct tiny
+{
+ short c;
+ short d;
+};
+
+f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
+{
+ if (x.c != 10)
+ abort();
+ if (x.d != 20)
+ abort();
+
+ if (y.c != 11)
+ abort();
+ if (y.d != 21)
+ abort();
+
+ if (z.c != 12)
+ abort();
+ if (z.d != 22)
+ abort();
+
+ if (l != 123)
+ abort ();
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-6.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-6.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-6.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-6.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+#include <stdarg.h>
+
+struct tiny
+{
+ short c;
+ short d;
+};
+
+f (int n, ...)
+{
+ struct tiny x;
+ int i;
+
+ va_list ap;
+ va_start (ap,n);
+ for (i = 0; i < n; i++)
+ {
+ x = va_arg (ap,struct tiny);
+ if (x.c != i + 10)
+ abort();
+ if (x.d != i + 20)
+ abort();
+ }
+ {
+ long x = va_arg (ap, long);
+ if (x != 123)
+ abort();
+ }
+ va_end (ap);
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-7.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-7.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-7.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-7.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+struct tiny
+{
+ char c;
+};
+
+f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
+{
+ if (x.c != 10)
+ abort();
+
+ if (y.c != 11)
+ abort();
+
+ if (z.c != 12)
+ abort();
+
+ if (l != 123)
+ abort ();
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-8.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-8.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-8.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-8.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+#include <stdarg.h>
+
+struct tiny
+{
+ char c;
+};
+
+f (int n, ...)
+{
+ struct tiny x;
+ int i;
+
+ va_list ap;
+ va_start (ap,n);
+ for (i = 0; i < n; i++)
+ {
+ x = va_arg (ap,struct tiny);
+ if (x.c != i + 10)
+ abort();
+ }
+ {
+ long x = va_arg (ap, long);
+ if (x != 123)
+ abort();
+ }
+ va_end (ap);
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-9.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-9.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-9.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931004-9.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+struct tiny
+{
+ char c;
+ char d;
+};
+
+f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
+{
+ if (x.c != 10)
+ abort();
+ if (x.d != 20)
+ abort();
+
+ if (y.c != 11)
+ abort();
+ if (y.d != 21)
+ abort();
+
+ if (z.c != 12)
+ abort();
+ if (z.d != 22)
+ abort();
+
+ if (l != 123)
+ abort ();
+}
+
+main ()
+{
+ struct tiny x[3];
+ x[0].c = 10;
+ x[1].c = 11;
+ x[2].c = 12;
+ x[0].d = 20;
+ x[1].d = 21;
+ x[2].d = 22;
+ f (3, x[0], x[1], x[2], (long) 123);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931005-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931005-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931005-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931005-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+typedef struct
+{
+ char x;
+} T;
+
+T
+f (s1)
+ T s1;
+{
+ T s1a;
+ s1a.x = s1.x;
+ return s1a;
+}
+
+main ()
+{
+ T s1a, s1b;
+ s1a.x = 100;
+ s1b = f (s1a);
+ if (s1b.x != 100)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931009-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931009-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931009-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931009-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+main ()
+{
+ f ();
+ exit (0);
+}
+
+static
+g (out, size, lo, hi)
+ int *out, size, lo, hi;
+{
+ int j;
+
+ for (j = 0; j < size; j++)
+ out[j] = j * (hi - lo);
+}
+
+
+f ()
+{
+ int a[2];
+
+ g (a, 2, 0, 1);
+
+ if (a[0] != 0 || a[1] != 1)
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931012-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931012-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931012-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931012-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+f (int b, int c)
+{
+ if (b != 0 && b != 1 && c != 0)
+ b = 0;
+ return b;
+}
+
+main ()
+{
+ if (!f (1, 2))
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931017-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931017-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931017-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931017-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,54 @@
+int v;
+
+main ()
+{
+ f ();
+ exit (0);
+}
+
+h1 ()
+{
+ return 0;
+}
+
+h2 (e)
+ int *e;
+{
+ if (e != &v)
+ abort ();
+ return 0;
+}
+
+g (c)
+ char *c;
+{
+ int i;
+ int b;
+
+ do
+ {
+ i = h1 ();
+ if (i == -1)
+ return 0;
+ else if (i == 1)
+ h1 ();
+ }
+ while (i == 1);
+
+ do
+ b = h2 (&v);
+ while (i == 5);
+
+ if (i != 2)
+ return b;
+ *c = 'a';
+
+ return 0;
+}
+
+
+f ()
+{
+ char c;
+ g (&c);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931018-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931018-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931018-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931018-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+unsigned int a[0x1000];
+extern const unsigned long v;
+
+main ()
+{
+ f (v);
+ f (v);
+ exit (0);
+}
+
+f (a)
+ unsigned long a;
+{
+ if (a != 0xdeadbeefL)
+ abort();
+}
+
+const unsigned long v = 0xdeadbeefL;
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931031-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931031-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931031-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931031-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
+struct foo
+{
+ unsigned y:1;
+ unsigned x:32;
+};
+
+int
+f (x)
+ struct foo x;
+{
+ int t = x.x;
+ if (t < 0)
+ return 1;
+ return t+1;
+}
+
+main ()
+{
+ struct foo x;
+ x.x = -1;
+ if (f (x) == 0)
+ abort ();
+ exit (0);
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+typedef union
+{
+ struct
+ {
+ char h, l;
+ } b;
+} T;
+
+f (x)
+ int x;
+{
+ int num = 0;
+ T reg;
+
+ reg.b.l = x;
+ while ((reg.b.l & 1) == 0)
+ {
+ num++;
+ reg.b.l >>= 1;
+ }
+ return num;
+}
+
+main ()
+{
+ if (f (2) != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931102-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+typedef union
+{
+ long align;
+ struct
+ {
+ short h, l;
+ } b;
+} T;
+
+f (x)
+ int x;
+{
+ int num = 0;
+ T reg;
+
+ reg.b.l = x;
+ while ((reg.b.l & 1) == 0)
+ {
+ num++;
+ reg.b.l >>= 1;
+ }
+ return num;
+}
+
+main ()
+{
+ if (f (2) != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+typedef struct
+{
+ short f:3, g:3, h:10;
+} small;
+
+struct
+{
+ int i;
+ small s[10];
+} x;
+
+main ()
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ x.s[i].f = 0;
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931110-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+main ()
+{
+ static int a[] = {3, 4};
+ register int *b;
+ int c;
+
+ b = a;
+ c = *b++ % 8;
+ if (c != 3)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931208-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931208-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931208-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931208-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+f ()
+{
+ unsigned long x, y = 1;
+
+ x = ((y * 8192) - 216) / 16;
+ return x;
+}
+
+main ()
+{
+ if (f () != 498)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931228-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931228-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931228-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/931228-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+f (x)
+{
+ x &= 010000;
+ x &= 007777;
+ x ^= 017777;
+ x &= 017770;
+ return x;
+}
+
+main ()
+{
+ if (f (-1) != 017770)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940115-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940115-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940115-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940115-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+f (cp, end)
+ char *cp;
+ char *end;
+{
+ return (cp < end);
+}
+
+main ()
+{
+ if (! f ((char *) 0, (char *) 1))
+ abort();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940122-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940122-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940122-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/940122-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+char *a = 0;
+char *b = 0;
+
+g (x)
+ int x;
+{
+ if ((!!a) != (!!b))
+ abort ();
+}
+
+f (x)
+ int x;
+{
+ g (x * x);
+}
+
+main ()
+{
+ f (100);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+int f (int a, int b) { }
+
+main ()
+{
+ unsigned long addr1;
+ unsigned long addr2;
+
+ addr1 = (unsigned long) &f;
+ addr1 += 5;
+ addr2 = 5 + (unsigned long) &f;
+
+ if (addr1 != addr2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941014-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+typedef struct {
+ unsigned short a;
+ unsigned short b;
+} foo_t;
+
+void a1 (unsigned long offset) {}
+
+volatile foo_t *
+f ()
+{
+ volatile foo_t *foo_p = (volatile foo_t *)malloc (sizeof (foo_t));
+
+ a1((unsigned long)foo_p-30);
+ if (foo_p->a & 0xf000)
+ printf("%d\n", foo_p->a);
+ foo_p->b = 0x0100;
+ a1 ((unsigned long)foo_p + 2);
+ a1 ((unsigned long)foo_p - 30);
+ return foo_p;
+}
+
+main ()
+{
+ volatile foo_t *foo_p;
+
+ foo_p = f ();
+ if (foo_p->b != 0x0100)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941015-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941015-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941015-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941015-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+int
+foo1 (value)
+ long long value;
+{
+ register const long long constant = 0xc000000080000000LL;
+
+ if (value < constant)
+ return 1;
+ else
+ return 2;
+}
+
+int
+foo2 (value)
+ unsigned long long value;
+{
+ register const unsigned long long constant = 0xc000000080000000LL;
+
+ if (value < constant)
+ return 1;
+ else
+ return 2;
+}
+
+main ()
+{
+ unsigned long long value = 0xc000000000000001LL;
+ int x, y;
+
+ x = foo1 (value);
+ y = foo2 (value);
+ if (x != y || x != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941021-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941021-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941021-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941021-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+double glob_dbl;
+
+f (pdbl, value)
+ double *pdbl;
+ double value;
+{
+ if (pdbl == 0)
+ pdbl = &glob_dbl;
+
+ *pdbl = value;
+}
+
+main ()
+{
+ f ((void *) 0, 55.1);
+
+ if (glob_dbl != 55.1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941025-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941025-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941025-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941025-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+long f (x, y)
+ long x,y;
+{
+ return (x > 1) ? y : (y & 1);
+}
+
+main ()
+{
+ if (f (2L, 0xdecadeL) != 0xdecadeL)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941031-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941031-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941031-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941031-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+typedef long mpt;
+
+int
+f (mpt us, mpt vs)
+{
+ long aus;
+ long avs;
+
+ aus = us >= 0 ? us : -us;
+ avs = vs >= 0 ? vs : -vs;
+
+ if (aus < avs)
+ {
+ long t = aus;
+ aus = avs;
+ avs = aus;
+ }
+
+ return avs;
+}
+
+main ()
+{
+ if (f ((mpt) 3, (mpt) 17) != 17)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941101-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941101-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941101-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941101-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+f ()
+{
+ int var = 7;
+
+ if ((var/7) == 1)
+ return var/7;
+ return 0;
+}
+
+main ()
+{
+ if (f () != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941110-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941110-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941110-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941110-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+f (const int x)
+{
+ int y = 0;
+ y = x ? y : -y;
+ {
+ const int *p = &x;
+ }
+ return y;
+}
+
+main ()
+{
+ if (f (0))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941202-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941202-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941202-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/941202-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
+g (x, y)
+{
+ if (x != 3)
+ abort ();
+}
+
+static inline
+f (int i)
+{
+ int *tmp;
+
+ tmp = (int *) alloca (sizeof (i));
+ *tmp = i;
+ g (*tmp, 0);
+}
+
+main ()
+{
+ f (3);
+ exit (0);
+};
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950221-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950221-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950221-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950221-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,57 @@
+/* { dg-add-options stack_size } */
+
+struct parsefile
+{
+ long fd;
+ char *buf;
+};
+struct parsefile basepf;
+struct parsefile *parsefile = &basepf;
+#ifdef STACK_SIZE
+int filler[STACK_SIZE / (2*sizeof(int))];
+#else
+int filler[0x3000];
+#endif
+int el;
+
+char *
+g1 (a, b)
+ int a;
+ int *b;
+{
+}
+
+g2 (a)
+ long a;
+{
+ if (a != 0xdeadbeefL)
+ abort ();
+ exit (0);
+}
+
+f ()
+{
+ register char *p, *q;
+ register int i;
+ register int something;
+
+ if (parsefile->fd == 0L && el)
+ {
+ const char *rl_cp;
+ int len;
+ rl_cp = g1 (el, &len);
+ strcpy (p, rl_cp);
+ }
+ else
+ {
+ alabel:
+ i = g2 (parsefile->fd);
+ }
+}
+
+main ()
+{
+ el = 0;
+ parsefile->fd = 0xdeadbeefL;
+ f ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950322-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950322-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950322-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950322-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+f (unsigned char *a)
+{
+ int i, j;
+ int x, y;
+
+ j = a[1];
+ i = a[0] - j;
+ if (i < 0)
+ {
+ x = 1;
+ y = -i;
+ }
+ else
+ {
+ x = 0;
+ y = i;
+ }
+ return x + y;
+}
+
+
+main ()
+{
+ unsigned char a[2];
+ a[0] = 8;
+ a[1] = 9;
+ if (f (a) != 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+
+struct tag {
+ int m1;
+ char *m2[5];
+} s1, *p1;
+
+int i;
+
+main()
+{
+ s1.m1 = -1;
+ p1 = &s1;
+
+ if ( func1( &p1->m1 ) == -1 )
+ foo ("ok");
+ else
+ abort ();
+
+ i = 3;
+ s1.m2[3]= "123";
+
+ if ( strlen( (p1->m2[i])++ ) == 3 )
+ foo ("ok");
+ else
+ abort ();
+
+ exit (0);
+}
+
+func1(int *p) { return(*p); }
+
+foo (char *s) {}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950426-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+main()
+{
+ long int i = -2147483647L - 1L; /* 0x80000000 */
+ char ca = 1;
+
+ if (i >> ca != -1073741824L)
+ abort ();
+
+ if (i >> i / -2000000000L != -1073741824L)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950503-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950503-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950503-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950503-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+main ()
+{
+ int tmp;
+ unsigned long long utmp1, utmp2;
+
+ tmp = 16;
+
+ utmp1 = (~((unsigned long long) 0)) >> tmp;
+ utmp2 = (~((unsigned long long) 0)) >> 16;
+
+ if (utmp1 != utmp2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950511-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950511-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950511-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950511-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+main ()
+{
+ unsigned long long xx;
+ unsigned long long *x = (unsigned long long *) &xx;
+
+ *x = -3;
+ *x = *x * *x;
+ if (*x != 9)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950512-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950512-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950512-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950512-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+unsigned
+f1 (x)
+{
+ return ((unsigned) (x != 0) - 3) / 2;
+}
+
+unsigned long long
+f2 (x)
+{
+ return ((unsigned long long) (x != 0) - 3) / 2;
+}
+
+main ()
+{
+ if (f1 (1) != (~(unsigned) 0) >> 1)
+ abort ();
+ if (f1 (0) != ((~(unsigned) 0) >> 1) - 1)
+ abort ();
+ if (f2 (1) != (~(unsigned long long) 0) >> 1)
+ abort ();
+ if (f2 (0) != ((~(unsigned long long) 0) >> 1) - 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950605-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950605-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950605-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950605-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+f (c)
+ unsigned char c;
+{
+ if (c != 0xFF)
+ abort ();
+}
+
+main ()
+{
+ f (-1);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,9 @@
+main ()
+{
+ struct { long status; } h;
+
+ h.status = 0;
+ if (((h.status & 128) == 1) && ((h.status & 32) == 0))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950607-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+typedef struct {
+ long int p_x, p_y;
+} Point;
+
+int
+f (Point basePt, Point pt1, Point pt2)
+{
+ long long vector;
+
+ vector =
+ (long long) (pt1.p_x - basePt.p_x) * (long long) (pt2.p_y - basePt.p_y) -
+ (long long) (pt1.p_y - basePt.p_y) * (long long) (pt2.p_x - basePt.p_x);
+
+ if (vector > (long long) 0)
+ return 0;
+ else if (vector < (long long) 0)
+ return 1;
+ else
+ return 2;
+}
+
+main ()
+{
+ Point b, p1, p2;
+ int answer;
+
+ b.p_x = -23250;
+ b.p_y = 23250;
+
+ p1.p_x = 23250;
+ p1.p_y = -23250;
+
+ p2.p_x = -23250;
+ p2.p_y = -23250;
+
+ answer = f (b, p1, p2);
+
+ if (answer != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950612-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950612-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950612-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950612-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,48 @@
+unsigned int
+f1 (int diff)
+{
+ return ((unsigned int) (diff < 0 ? -diff : diff));
+}
+
+unsigned int
+f2 (unsigned int diff)
+{
+ return ((unsigned int) ((signed int) diff < 0 ? -diff : diff));
+}
+
+unsigned long long
+f3 (long long diff)
+{
+ return ((unsigned long long) (diff < 0 ? -diff : diff));
+}
+
+unsigned long long
+f4 (unsigned long long diff)
+{
+ return ((unsigned long long) ((signed long long) diff < 0 ? -diff : diff));
+}
+
+main ()
+{
+ int i;
+ for (i = 0; i <= 10; i++)
+ {
+ if (f1 (i) != i)
+ abort ();
+ if (f1 (-i) != i)
+ abort ();
+ if (f2 (i) != i)
+ abort ();
+ if (f2 (-i) != i)
+ abort ();
+ if (f3 ((long long) i) != i)
+ abort ();
+ if (f3 ((long long) -i) != i)
+ abort ();
+ if (f4 ((long long) i) != i)
+ abort ();
+ if (f4 ((long long) -i) != i)
+ abort ();
+ }
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950621-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950621-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950621-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950621-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+struct s
+{
+ int a;
+ int b;
+ struct s *dummy;
+};
+
+f (struct s *sp)
+{
+ return sp && sp->a == -1 && sp->b == -1;
+}
+
+main ()
+{
+ struct s x;
+ x.a = x.b = -1;
+ if (f (&x) == 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950628-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950628-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950628-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950628-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+typedef struct
+{
+ char hours, day, month;
+ short year;
+} T;
+
+T g (void)
+{
+ T now;
+
+ now.hours = 1;
+ now.day = 2;
+ now.month = 3;
+ now.year = 4;
+ return now;
+}
+
+T f (void)
+{
+ T virk;
+
+ virk = g ();
+ return virk;
+}
+
+main ()
+{
+ if (f ().hours != 1 || f ().day != 2 || f ().month != 3 || f ().year != 4)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950704-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950704-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950704-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950704-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,59 @@
+int errflag;
+
+long long
+f (long long x, long long y)
+{
+ long long r;
+
+ errflag = 0;
+ r = x + y;
+ if (x >= 0)
+ {
+ if ((y < 0) || (r >= 0))
+ return r;
+ }
+ else
+ {
+ if ((y > 0) || (r < 0))
+ return r;
+ }
+ errflag = 1;
+ return 0;
+}
+
+main ()
+{
+ f (0, 0);
+ if (errflag)
+ abort ();
+
+ f (1, -1);
+ if (errflag)
+ abort ();
+
+ f (-1, 1);
+ if (errflag)
+ abort ();
+
+ f (0x8000000000000000LL, 0x8000000000000000LL);
+ if (!errflag)
+ abort ();
+
+ f (0x8000000000000000LL, -1LL);
+ if (!errflag)
+ abort ();
+
+ f (0x7fffffffffffffffLL, 0x7fffffffffffffffLL);
+ if (!errflag)
+ abort ();
+
+ f (0x7fffffffffffffffLL, 1LL);
+ if (!errflag)
+ abort ();
+
+ f (0x7fffffffffffffffLL, 0x8000000000000000LL);
+ if (errflag)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950706-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950706-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950706-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950706-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+int
+f (int n)
+{
+ return (n > 0) - (n < 0);
+}
+
+main ()
+{
+ if (f (-1) != -1)
+ abort ();
+ if (f (1) != 1)
+ abort ();
+ if (f (0) != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950710-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950710-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950710-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950710-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,54 @@
+struct twelve
+{
+ int a;
+ int b;
+ int c;
+};
+
+struct pair
+{
+ int first;
+ int second;
+};
+
+struct pair
+g ()
+{
+ struct pair p;
+ return p;
+}
+
+static void
+f ()
+{
+ int i;
+ for (i = 0; i < 1; i++)
+ {
+ int j;
+ for (j = 0; j < 1; j++)
+ {
+ if (0)
+ {
+ int k;
+ for (k = 0; k < 1; k++)
+ {
+ struct pair e = g ();
+ }
+ }
+ else
+ {
+ struct twelve a, b;
+ if ((((char *) &b - (char *) &a) < 0
+ ? (-((char *) &b - (char *) &a))
+ : ((char *) &b - (char *) &a)) < sizeof (a))
+ abort ();
+ }
+ }
+ }
+}
+
+main ()
+{
+ f ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950714-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950714-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950714-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950714-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+int array[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+
+main ()
+{
+ int i, j;
+ int *p;
+
+ for (i = 0; i < 10; i++)
+ for (p = &array[0]; p != &array[9]; p++)
+ if (*p == i)
+ goto label;
+
+ label:
+ if (i != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950809-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950809-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950809-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950809-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+struct S
+{
+ int *sp, fc, *sc, a[2];
+};
+
+f (struct S *x)
+{
+ int *t = x->sc;
+ int t1 = t[0];
+ int t2 = t[1];
+ int t3 = t[2];
+ int a0 = x->a[0];
+ int a1 = x->a[1];
+ t[2] = t1;
+ t[0] = a1;
+ x->a[1] = a0;
+ x->a[0] = t3;
+ x->fc = t2;
+ x->sp = t;
+}
+
+main ()
+{
+ struct S s;
+ static int sc[3] = {2, 3, 4};
+ s.sc = sc;
+ s.a[0] = 10;
+ s.a[1] = 11;
+ f (&s);
+ if (s.sp[2] != 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950906-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950906-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950906-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950906-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+g (int i)
+{
+}
+
+f (int i)
+{
+ g (0);
+ while ( ({ i--; }) )
+ g (0);
+}
+
+main ()
+{
+ f (10);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950915-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950915-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950915-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950915-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+long int a = 100000;
+long int b = 21475;
+
+long
+f ()
+{
+ return ((long long) a * (long long) b) >> 16;
+}
+
+main ()
+{
+ if (f () < 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950929-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950929-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950929-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/950929-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+int f (char *p) { }
+
+main ()
+{
+ char c;
+ char c2;
+ int i = 0;
+ char *pc = &c;
+ char *pc2 = &c2;
+ int *pi = &i;
+
+ *pc2 = 1;
+ *pi = 1;
+ *pc2 &= *pi;
+ f (pc2);
+ *pc2 = 1;
+ *pc2 &= *pi;
+ if (*pc2 != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951003-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951003-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951003-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951003-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+int f (i) { return 12; }
+int g () { return 0; }
+
+main ()
+{
+ int i, s;
+
+ for (i = 0; i < 32; i++)
+ {
+ s = f (i);
+
+ if (i == g ())
+ s = 42;
+ if (i == 0 || s == 12)
+ ;
+ else
+ abort ();
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951115-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951115-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951115-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951115-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+int var = 0;
+
+g ()
+{
+ var = 1;
+}
+
+f ()
+{
+ int f2 = 0;
+
+ if (f2 == 0)
+ ;
+
+ g ();
+}
+
+main ()
+{
+ f ();
+ if (var != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951204-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951204-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951204-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/951204-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+f (char *x)
+{
+ *x = 'x';
+}
+
+main ()
+{
+ int i;
+ char x = '\0';
+
+ for (i = 0; i < 100; ++i)
+ {
+ f (&x);
+ if (*(const char *) &x != 'x')
+ abort ();
+ }
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960116-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960116-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960116-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960116-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+static inline
+p (int *p)
+{
+ return !((long) p & 1);
+}
+
+int
+f (int *q)
+{
+ if (p (q) && *q)
+ return 1;
+ return 0;
+}
+
+main ()
+{
+ if (f ((int*) 0xffffffff) != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960117-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960117-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960117-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960117-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,46 @@
+static char id_space[2] [32 +1];
+typedef short COUNT;
+
+typedef char TEXT;
+
+union T_VALS
+{
+ TEXT *id __attribute__ ((aligned (2), packed)) ;
+};
+typedef union T_VALS VALS;
+
+struct T_VAL
+{
+ COUNT pos __attribute__ ((aligned (2), packed)) ;
+ VALS vals __attribute__ ((aligned (2), packed)) ;
+};
+typedef struct T_VAL VAL;
+
+VAL curval = {0};
+
+static short idc = 0;
+static int cur_line;
+static int char_pos;
+
+typedef unsigned short WORD;
+
+WORD
+get_id (char c)
+{
+ curval.vals.id[0] = c;
+}
+
+WORD
+get_tok ()
+{
+ char c = 'c';
+ curval.vals.id = id_space[idc];
+ curval.pos = (cur_line << 10) | char_pos;
+ return get_id (c);
+}
+
+main ()
+{
+ get_tok ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960209-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960209-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960209-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960209-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,43 @@
+struct a_struct
+{
+ unsigned char a_character;
+};
+
+struct a_struct an_array[5];
+struct a_struct *a_ptr;
+int yabba = 1;
+
+int
+f (a, b)
+ unsigned char a;
+ unsigned long b;
+{
+ long i, j, p, q, r, s;
+
+ if (b != (unsigned long) 0)
+ {
+ if (yabba)
+ return -1;
+ s = 4000000 / b;
+ for (i = 0; i < 11; i++)
+ {
+ for (j = 0; j < 256; j++)
+ {
+ if (((p - s < 0) ? -s : 0) < (( q - s < 0) ? -s : q))
+ r = i;
+ }
+ }
+ }
+
+ if (yabba)
+ return 0;
+ a_ptr = &an_array[a];
+ a_ptr->a_character = (unsigned char) r;
+}
+
+main ()
+{
+ if (f (1, 0UL) != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960215-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960215-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960215-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960215-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+long double C = 2;
+long double U = 1;
+long double Y2 = 3;
+long double Y1 = 1;
+long double X, Y, Z, T, R, S;
+main ()
+{
+ X = (C + U) * Y2;
+ Y = C - U - U;
+ Z = C + U + U;
+ T = (C - U) * Y1;
+ X = X - (Z + U);
+ R = Y * Y1;
+ S = Z * Y2;
+ T = T - Y;
+ Y = (U - Y) + R;
+ Z = S - (Z + U + U);
+ R = (Y2 + U) * Y1;
+ Y1 = Y2 * Y1;
+ R = R - Y2;
+ Y1 = Y1 - 0.5L;
+ if (Z != 6)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960218-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960218-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960218-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960218-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+int glob;
+
+g (x)
+{
+ glob = x;
+ return 0;
+}
+
+f (x)
+{
+ int a = ~x;
+ while (a)
+ a = g (a);
+}
+
+main ()
+{
+ f (3);
+ if (glob != -4)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960219-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960219-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960219-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960219-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+f (int i)
+{
+ if (((1 << i) & 1) == 0)
+ abort ();
+}
+
+main ()
+{
+ f (0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960301-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960301-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960301-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960301-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+struct foo {
+ unsigned : 12;
+ unsigned field : 4;
+} foo;
+unsigned oldfoo;
+
+int
+bar (unsigned k)
+{
+ oldfoo = foo.field;
+ foo.field = k;
+ if (k)
+ return 1;
+ return 2;
+}
+
+main ()
+{
+ if (bar (1U) != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960302-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960302-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960302-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960302-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+long a = 1;
+
+foo ()
+{
+ switch (a % 2 % 2 % 2 % 2 % 2 % 2 % 2 % 2)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return 1;
+ default:
+ return -1;
+ }
+}
+
+main ()
+{
+ if (foo () != 1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+#include <stdio.h>
+
+#ifdef DEBUG
+#define abort() printf ("error, line %d\n", __LINE__)
+#endif
+
+int count;
+
+void a1() { ++count; }
+
+void
+b (unsigned char data)
+{
+ if (data & 0x80) a1();
+ data <<= 1;
+
+ if (data & 0x80) a1();
+ data <<= 1;
+
+ if (data & 0x80) a1();
+}
+
+main ()
+{
+ count = 0;
+ b (0);
+ if (count != 0)
+ abort ();
+
+ count = 0;
+ b (0x80);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0x40);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0x20);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0xc0);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0xa0);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0x60);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0xe0);
+ if (count != 3)
+ abort ();
+
+#ifdef DEBUG
+ printf ("Done.\n");
+#endif
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+#include <stdio.h>
+
+#ifdef DEBUG
+#define abort() printf ("error, line %d\n", __LINE__)
+#endif
+
+int count;
+
+void a1() { ++count; }
+
+void
+b (unsigned short data)
+{
+ if (data & 0x8000) a1();
+ data <<= 1;
+
+ if (data & 0x8000) a1();
+ data <<= 1;
+
+ if (data & 0x8000) a1();
+}
+
+main ()
+{
+ count = 0;
+ b (0);
+ if (count != 0)
+ abort ();
+
+ count = 0;
+ b (0x8000);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0x4000);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0x2000);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0xc000);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0xa000);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0x6000);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0xe000);
+ if (count != 3)
+ abort ();
+
+#ifdef DEBUG
+ printf ("Done.\n");
+#endif
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960311-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,69 @@
+#include <stdio.h>
+
+#ifdef DEBUG
+#define abort() printf ("error, line %d\n", __LINE__)
+#endif
+
+int count;
+
+void a1() { ++count; }
+
+void
+b (unsigned long data)
+{
+ if (data & 0x80000000) a1();
+ data <<= 1;
+
+ if (data & 0x80000000) a1();
+ data <<= 1;
+
+ if (data & 0x80000000) a1();
+}
+
+main ()
+{
+ count = 0;
+ b (0);
+ if (count != 0)
+ abort ();
+
+ count = 0;
+ b (0x80000000);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0x40000000);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0x20000000);
+ if (count != 1)
+ abort ();
+
+ count = 0;
+ b (0xc0000000);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0xa0000000);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0x60000000);
+ if (count != 2)
+ abort ();
+
+ count = 0;
+ b (0xe0000000);
+ if (count != 3)
+ abort ();
+
+#ifdef DEBUG
+ printf ("Done.\n");
+#endif
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960312-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960312-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960312-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960312-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+struct S
+{
+ int *sp, fc, *sc, a[2];
+};
+
+f (struct S *x)
+{
+ int *t = x->sc;
+ int t1 = t[0];
+ int t2 = t[1];
+ int t3 = t[2];
+ int a0 = x->a[0];
+ int a1 = x->a[1];
+ asm("": :"r" (t2), "r" (t3));
+ t[2] = t1;
+ t[0] = a1;
+ x->a[1] = a0;
+ x->a[0] = t3;
+ x->fc = t2;
+ x->sp = t;
+}
+
+main ()
+{
+ struct S s;
+ static int sc[3] = {2, 3, 4};
+ s.sc = sc;
+ s.a[0] = 10;
+ s.a[1] = 11;
+ f (&s);
+ if (s.sp[2] != 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960317-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960317-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960317-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960317-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+int
+f (unsigned bitcount, int mant)
+{
+ int mask = -1 << bitcount;
+ {
+ if (! (mant & -mask))
+ goto ab;
+ if (mant & ~mask)
+ goto auf;
+ }
+ab:
+ return 0;
+auf:
+ return 1;
+}
+
+main ()
+{
+ if (f (0, -1))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960321-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960321-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960321-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960321-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+char a[10] = "deadbeef";
+
+char
+acc_a (long i)
+{
+ return a[i-2000000000L];
+}
+
+main ()
+{
+ if (acc_a (2000000000L) != 'd')
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960326-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960326-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960326-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960326-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+struct s
+{
+ int a;
+ int b;
+ short c;
+ int d[3];
+};
+
+struct s s = { .b = 3, .d = {2,0,0} };
+
+main ()
+{
+ if (s.b != 3)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960327-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960327-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960327-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960327-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,30 @@
+#include <stdio.h>
+g ()
+{
+ return '\n';
+}
+
+f ()
+{
+ char s[] = "abcedfg012345";
+ char *sp = s + 12;
+
+ switch (g ())
+ {
+ case '\n':
+ break;
+ }
+
+ while (*--sp == '0')
+ ;
+ sprintf (sp + 1, "X");
+
+ if (s[12] != 'X')
+ abort ();
+}
+
+main ()
+{
+ f ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960402-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960402-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960402-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960402-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+f (signed long long int x)
+{
+ return x > 0xFFFFFFFFLL || x < -0x80000000LL;
+}
+
+main ()
+{
+ if (f (0) != 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960405-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960405-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960405-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960405-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+#define X 5.9486574767861588254287966331400356538172e4931L
+
+long double x = X + X;
+long double y = 2.0L * X;
+
+main ()
+{
+#if ! defined (__vax__) && ! defined (_CRAY)
+ if (x != y)
+ abort ();
+#endif
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960416-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960416-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960416-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960416-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,63 @@
+typedef unsigned long int st;
+typedef unsigned long long dt;
+typedef union
+{
+ dt d;
+ struct
+ {
+ st h, l;
+ }
+ s;
+} t_be;
+
+typedef union
+{
+ dt d;
+ struct
+ {
+ st l, h;
+ }
+ s;
+} t_le;
+
+#define df(f, t) \
+int \
+f (t afh, t bfh) \
+{ \
+ t hh; \
+ t hp, lp, dp, m; \
+ st ad, bd; \
+ int s; \
+ s = 0; \
+ ad = afh.s.h - afh.s.l; \
+ bd = bfh.s.l - bfh.s.h; \
+ if (bd > bfh.s.l) \
+ { \
+ bd = -bd; \
+ s = ~s; \
+ } \
+ lp.d = (dt) afh.s.l * bfh.s.l; \
+ hp.d = (dt) afh.s.h * bfh.s.h; \
+ dp.d = (dt) ad *bd; \
+ dp.d ^= s; \
+ hh.d = hp.d + hp.s.h + lp.s.h + dp.s.h; \
+ m.d = (dt) lp.s.h + hp.s.l + lp.s.l + dp.s.l; \
+ return hh.s.l + m.s.l; \
+}
+
+df(f_le, t_le)
+df(f_be, t_be)
+
+main ()
+{
+ t_be x;
+ x.s.h = 0x10000000U;
+ x.s.l = 0xe0000000U;
+ if (x.d == 0x10000000e0000000ULL
+ && f_be ((t_be) 0x100000000ULL, (t_be) 0x100000000ULL) != -1)
+ abort ();
+ if (x.d == 0xe000000010000000ULL
+ && f_le ((t_le) 0x100000000ULL, (t_le) 0x100000000ULL) != -1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+static int i;
+
+void
+check(x)
+ int x;
+{
+ if (!x)
+ abort();
+}
+
+main()
+{
+ int *p = &i;
+
+ check(p != (void *)0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960419-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+#define SIZE 8
+
+main()
+{
+ int a[SIZE] = {1};
+ int i;
+
+ for (i = 1; i < SIZE; i++)
+ if (a[i] != 0)
+ abort();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960512-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960512-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960512-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960512-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+__complex__
+double f ()
+{
+ int a[40];
+ __complex__ double c;
+
+ a[9] = 0;
+ c = a[9];
+ return c;
+}
+
+main ()
+{
+ __complex__ double c;
+
+ if (c = f ())
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960513-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960513-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960513-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960513-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+long double
+f (d, i)
+ long double d;
+ int i;
+{
+ long double e;
+
+ d = -d;
+ e = d;
+ if (i == 1)
+ d *= 2;
+ d -= e * d;
+ d -= e * d;
+ d -= e * d;
+ d -= e * d;
+ d -= e * d;
+ return d;
+}
+
+main ()
+{
+ if (! (int) (f (2.0L, 1)))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960521-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960521-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960521-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960521-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+/* { dg-add-options stack_size } */
+
+#include <stdlib.h>
+
+int *a, *b;
+int n;
+
+#ifdef STACK_SIZE
+#define BLOCK_SIZE (STACK_SIZE / (sizeof (*a) + sizeof (*b)))
+#else
+#define BLOCK_SIZE 32768
+#endif
+foo ()
+{
+ int i;
+ for (i = 0; i < n; i++)
+ a[i] = -1;
+ for (i = 0; i < BLOCK_SIZE - 1; i++)
+ b[i] = -1;
+}
+
+main ()
+{
+ n = BLOCK_SIZE;
+ a = malloc (n * sizeof(*a));
+ b = malloc (n * sizeof(*b));
+ *b++ = 0;
+ foo ();
+ if (b[-1])
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960608-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960608-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960608-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960608-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+typedef struct
+{
+ unsigned char a : 2;
+ unsigned char b : 3;
+ unsigned char c : 1;
+ unsigned char d : 1;
+ unsigned char e : 1;
+} a_struct;
+
+foo (flags)
+ a_struct *flags;
+{
+ return (flags->c != 0
+ || flags->d != 1
+ || flags->e != 1
+ || flags->a != 2
+ || flags->b != 3);
+}
+
+main ()
+{
+ a_struct flags;
+
+ flags.c = 0;
+ flags.d = 1;
+ flags.e = 1;
+ flags.a = 2;
+ flags.b = 3;
+
+ if (foo (&flags) != 0)
+ abort ();
+ else
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960801-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960801-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960801-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960801-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+unsigned
+f ()
+{
+ long long l2;
+ unsigned short us;
+ unsigned long long ul;
+ short s2;
+
+ ul = us = l2 = s2 = -1;
+ return ul;
+}
+
+unsigned long long
+g ()
+{
+ long long l2;
+ unsigned short us;
+ unsigned long long ul;
+ short s2;
+
+ ul = us = l2 = s2 = -1;
+ return ul;
+}
+
+main ()
+{
+ if (f () != (unsigned short) -1)
+ abort ();
+ if (g () != (unsigned short) -1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960802-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960802-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960802-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960802-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,36 @@
+long val = 0x5e000000;
+
+long
+f1 (void)
+{
+ return 0x132;
+}
+
+long
+f2 (void)
+{
+ return 0x5e000000;
+}
+
+void
+f3 (long b)
+{
+ val = b;
+}
+
+void
+f4 ()
+{
+ long v = f1 ();
+ long o = f2 ();
+ v = (v & 0x00ffffff) | (o & 0xff000000);
+ f3 (v);
+}
+
+main ()
+{
+ f4 ();
+ if (val != 0x5e000132)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960830-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960830-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960830-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960830-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+#ifdef __i386__
+f (rp)
+ unsigned int *rp;
+{
+ __asm__ ("mull %3" : "=a" (rp[0]), "=d" (rp[1]) : "%0" (7), "rm" (7));
+}
+
+main ()
+{
+ unsigned int s[2];
+
+ f (s);
+ if (s[1] != 0 || s[0] != 49)
+ abort ();
+ exit (0);
+}
+#else
+main ()
+{
+ exit (0);
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960909-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960909-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960909-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/960909-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+int
+ffs (x)
+ int x;
+{
+ int bit, mask;
+
+ if (x == 0)
+ return 0;
+
+ for (bit = 1, mask = 1; !(x & mask); bit++, mask <<= 1)
+ ;
+
+ return bit;
+}
+
+f (x)
+ int x;
+{
+ int y;
+ y = ffs (x) - 1;
+ if (y < 0)
+ abort ();
+}
+
+main ()
+{
+ f (1);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961004-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961004-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961004-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961004-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+int k = 0;
+
+main()
+{
+ int i;
+ int j;
+
+ for (i = 0; i < 2; i++)
+ {
+ if (k)
+ {
+ if (j != 2)
+ abort ();
+ }
+ else
+ {
+ j = 2;
+ k++;
+ }
+ }
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,8 @@
+main ()
+{
+ unsigned char z = 0;
+
+ do ;
+ while (--z > 0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961017-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,32 @@
+main ()
+{
+ int i = 0;
+
+
+ if (sizeof (unsigned long int) == 4)
+ {
+ unsigned long int z = 0;
+
+ do {
+ z -= 0x00004000;
+ i++;
+ if (i > 0x00040000)
+ abort ();
+ } while (z > 0);
+ exit (0);
+ }
+ else if (sizeof (unsigned int) == 4)
+ {
+ unsigned int z = 0;
+
+ do {
+ z -= 0x00004000;
+ i++;
+ if (i > 0x00040000)
+ abort ();
+ } while (z > 0);
+ exit (0);
+ }
+ else
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961026-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961026-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961026-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961026-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+int
+test (arg)
+ int arg;
+{
+ if (arg > 0 || arg == 0)
+ return 0;
+ return -1;
+}
+
+main ()
+{
+ if (test (0) != 0)
+ abort ();
+ if (test (-1) != -1)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+f (x)
+{
+ if (x != 0 || x == 0)
+ return 0;
+ return 1;
+}
+
+main ()
+{
+ if (f (3))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+long long acc;
+
+addhi (short a)
+{
+ acc += (long long) a << 32;
+}
+
+subhi (short a)
+{
+ acc -= (long long) a << 32;
+}
+
+main ()
+{
+ acc = 0xffff00000000ll;
+ addhi (1);
+ if (acc != 0x1000000000000ll)
+ abort ();
+ subhi (1);
+ if (acc != 0xffff00000000ll)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961122-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+int
+f (int a)
+{
+ return ((a >= 0 && a <= 10) && ! (a >= 0));
+}
+
+main ()
+{
+ if (f (0))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961125-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961125-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961125-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961125-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,33 @@
+static char *
+begfield (int tab, char *ptr, char *lim, int sword, int schar)
+{
+ if (tab)
+ {
+ while (ptr < lim && sword--)
+ {
+ while (ptr < lim && *ptr != tab)
+ ++ptr;
+ if (ptr < lim)
+ ++ptr;
+ }
+ }
+ else
+ {
+ while (1)
+ ;
+ }
+
+ if (ptr + schar <= lim)
+ ptr += schar;
+
+ return ptr;
+}
+
+main ()
+{
+ char *s = ":ab";
+ char *lim = s + 3;
+ if (begfield (':', s, lim, 1, 1) != s + 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961206-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961206-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961206-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961206-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,52 @@
+int
+sub1 (unsigned long long i)
+{
+ if (i < 0x80000000)
+ return 1;
+ else
+ return 0;
+}
+
+int
+sub2 (unsigned long long i)
+{
+ if (i <= 0x7FFFFFFF)
+ return 1;
+ else
+ return 0;
+}
+
+int
+sub3 (unsigned long long i)
+{
+ if (i >= 0x80000000)
+ return 0;
+ else
+ return 1;
+}
+
+int
+sub4 (unsigned long long i)
+{
+ if (i > 0x7FFFFFFF)
+ return 0;
+ else
+ return 1;
+}
+
+main()
+{
+ if (sub1 (0x80000000ULL))
+ abort ();
+
+ if (sub2 (0x80000000ULL))
+ abort ();
+
+ if (sub3 (0x80000000ULL))
+ abort ();
+
+ if (sub4 (0x80000000ULL))
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961213-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961213-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961213-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961213-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+int
+g (unsigned long long int *v, int n, unsigned int a[], int b)
+{
+ int cnt;
+ *v = 0;
+ for (cnt = 0; cnt < n; ++cnt)
+ *v = *v * b + a[cnt];
+ return n;
+}
+
+main ()
+{
+ int res;
+ unsigned int ar[] = { 10, 11, 12, 13, 14 };
+ unsigned long long int v;
+
+ res = g (&v, sizeof(ar)/sizeof(ar[0]), ar, 16);
+ if (v != 0xabcdeUL)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961223-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961223-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961223-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/961223-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+/* { dg-options "-fgnu89-inline" } */
+
+extern void exit (int);
+extern void abort (void);
+
+struct s {
+ double d;
+};
+
+inline struct s
+sub (struct s s)
+{
+ s.d += 1.0;
+ return s;
+}
+
+int
+main ()
+{
+ struct s t = { 2.0 };
+ t = sub (t);
+ if (t.d != 3.0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,5 @@
+#define L 1
+main ()
+{
+ exit (L'1' != L'1');
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970214-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,5 @@
+#define m(L) (L'1' + (L))
+main ()
+{
+ exit (m (0) != L'1');
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970217-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970217-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970217-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970217-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,10 @@
+sub (int i, int array[i++])
+{
+ return i;
+}
+
+main()
+{
+ int array[10];
+ exit (sub (10, array) != 11);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970923-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970923-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970923-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/970923-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+int
+ts(a)
+ int a;
+{
+ if (a < 1000 && a > 2000)
+ return 1;
+ else
+ return 0;
+}
+
+int
+tu(a)
+ unsigned int a;
+{
+ if (a < 1000 && a > 2000)
+ return 1;
+ else
+ return 0;
+}
+
+
+main()
+{
+ if (ts (0) || tu (0))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980205.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980205.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980205.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980205.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+#include <stdarg.h>
+
+void fdouble (double one, ...)
+{
+ double value;
+ va_list ap;
+
+ va_start (ap, one);
+ value = va_arg (ap, double);
+ va_end (ap);
+
+ if (one != 1.0 || value != 2.0)
+ abort ();
+}
+
+int main ()
+{
+ fdouble (1.0, 2.0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980223.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980223.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980223.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980223.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+typedef struct { char *addr; long type; } object;
+
+object bar (object blah)
+{
+ abort();
+}
+
+object foo (object x, object y)
+{
+ object z = *(object*)(x.addr);
+ if (z.type & 64)
+ {
+ y = *(object*)(z.addr+sizeof(object));
+ z = *(object*)(z.addr);
+ if (z.type & 64)
+ y = bar(y);
+ }
+ return y;
+}
+
+int nil;
+object cons1[2] = { {(char *) &nil, 0}, {(char *) &nil, 0} };
+object cons2[2] = { {(char *) &cons1, 64}, {(char *) &nil, 0} };
+
+main()
+{
+ object x = {(char *) &cons2, 64};
+ object y = {(char *) &nil, 0};
+ object three = foo(x,y);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980424-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980424-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980424-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980424-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+int i, a[99];
+
+void f (int one)
+{
+ if (one != 1)
+ abort ();
+}
+
+void
+g ()
+{
+ f (a[i & 0x3f]);
+}
+
+int
+main ()
+{
+ a[0] = 1;
+ i = 0x40;
+ g ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+static int f(int) __attribute__((const));
+int main()
+{
+ int f1, f2, x;
+ x = 1; f1 = f(x);
+ x = 2; f2 = f(x);
+ if (f1 != 1 || f2 != 2)
+ abort ();
+ exit (0);
+}
+static int f(int x) { return x; }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980505-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+typedef unsigned short Uint16;
+typedef unsigned int Uint;
+
+Uint f ()
+{
+ Uint16 token;
+ Uint count;
+ static Uint16 values[1] = {0x9300};
+
+ token = values[0];
+ count = token >> 8;
+
+ return count;
+}
+
+int
+main ()
+{
+ if (f () != 0x93)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+struct decision
+{
+ char enforce_mode;
+ struct decision *next;
+};
+
+
+static void
+clear_modes (p)
+ register struct decision *p;
+{
+ goto blah;
+
+foo:
+ p->enforce_mode = 0;
+blah:
+ if (p)
+ goto foo;
+}
+
+main()
+{
+ struct decision *p = 0;
+ clear_modes (p);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+static void *self(void *p){ return p; }
+
+int
+f()
+{
+ struct { int i; } s, *sp;
+ int *ip = &s.i;
+
+ s.i = 1;
+ sp = self(&s);
+
+ *ip = 0;
+ return sp->i+1;
+}
+
+main()
+{
+ if (f () != 1)
+ abort ();
+ else
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980506-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+unsigned char lookup_table [257];
+
+static int
+build_lookup (pattern)
+ unsigned char *pattern;
+{
+ int m;
+
+ m = strlen (pattern) - 1;
+
+ memset (lookup_table, ++m, 257);
+ return m;
+}
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ if (build_lookup ("bind") != 4)
+ abort ();
+ else
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,35 @@
+/* { dg-require-effective-target label_values } */
+
+int expect_do1 = 1, expect_do2 = 2;
+
+static int doit(int x){
+ __label__ lbl1;
+ __label__ lbl2;
+ static int jtab_init = 0;
+ static void *jtab[2];
+
+ if(!jtab_init) {
+ jtab[0] = &&lbl1;
+ jtab[1] = &&lbl2;
+ jtab_init = 1;
+ }
+ goto *jtab[x];
+lbl1:
+ return 1;
+lbl2:
+ return 2;
+}
+
+static void do1(void) {
+ if (doit(0) != expect_do1)
+ abort ();
+}
+
+static void do2(void){
+ if (doit(1) != expect_do2)
+ abort ();
+}
+
+int main(void){
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,57 @@
+typedef unsigned int dev_t;
+typedef unsigned int kdev_t;
+
+static inline kdev_t to_kdev_t(int dev)
+{
+ int major, minor;
+
+ if (sizeof(kdev_t) == 16)
+ return (kdev_t)dev;
+ major = (dev >> 8);
+ minor = (dev & 0xff);
+ return ((( major ) << 22 ) | ( minor )) ;
+
+}
+
+void do_mknod(const char * filename, int mode, kdev_t dev)
+{
+ if (dev==0x15800078)
+ exit(0);
+ else
+ abort();
+}
+
+
+char * getname(const char * filename)
+{
+ register unsigned int a1,a2,a3,a4,a5,a6,a7,a8,a9;
+ a1 = (unsigned int)(filename) *5 + 1;
+ a2 = (unsigned int)(filename) *6 + 2;
+ a3 = (unsigned int)(filename) *7 + 3;
+ a4 = (unsigned int)(filename) *8 + 4;
+ a5 = (unsigned int)(filename) *9 + 5;
+ a6 = (unsigned int)(filename) *10 + 5;
+ a7 = (unsigned int)(filename) *11 + 5;
+ a8 = (unsigned int)(filename) *12 + 5;
+ a9 = (unsigned int)(filename) *13 + 5;
+ return (char *)(a1*a2+a3*a4+a5*a6+a7*a8+a9);
+}
+
+int sys_mknod(const char * filename, int mode, dev_t dev)
+{
+ int error;
+ char * tmp;
+
+ tmp = getname(filename);
+ error = ((long)( tmp )) ;
+ do_mknod(tmp,mode,to_kdev_t(dev));
+ return error;
+}
+
+int main(void)
+{
+ if (sizeof (int) != 4)
+ exit (0);
+
+ return sys_mknod("test",1,0x12345678);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980526-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+int compare(x, y)
+unsigned int x;
+unsigned int y;
+{
+ if (x==y)
+ return 0;
+ else
+ return 1;
+}
+
+main()
+{
+ unsigned int i, j, k, l;
+ i = 5; j = 2; k=0; l=2;
+ if (compare(5%(~(unsigned) 2), i%~j)
+ || compare(0, k%~l))
+ abort();
+ else
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,9 @@
+main()
+{
+ int i;
+ for (i = 1; i < 100; i++)
+ ;
+ if (i == 100)
+ exit (0);
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980602-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
+struct {
+ unsigned bit : 30;
+} t;
+
+int main()
+{
+ if (!(t.bit++))
+ exit (0);
+ else
+ abort ();
+}
+#endif
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980604-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980604-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980604-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980604-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+int a = 1;
+int b = -1;
+
+int c = 1;
+int d = 0;
+
+main ()
+{
+ double e;
+ double f;
+ double g;
+
+ f = c;
+ g = d;
+ e = (a < b) ? f : g;
+ if (e)
+ abort ();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980605-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980605-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980605-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980605-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,80 @@
+/* { dg-add-options stack_size } */
+
+#include <stdio.h>
+
+#ifndef STACK_SIZE
+#define STACK_SIZE 200000
+#endif
+
+__inline__ static int
+dummy (x)
+{
+ int y;
+ y = (long) (x * 4711.3);
+ return y;
+}
+
+int getval (void);
+
+int
+f2 (double x)
+{
+ unsigned short s;
+ int a, b, c, d, e, f, g, h, i, j;
+
+ a = getval ();
+ b = getval ();
+ c = getval ();
+ d = getval ();
+ e = getval ();
+ f = getval ();
+ g = getval ();
+ h = getval ();
+ i = getval ();
+ j = getval ();
+
+
+ s = x;
+
+ return a + b + c + d + e + f + g + h + i + j + s;
+}
+
+int x = 1;
+
+int
+getval (void)
+{
+ return x++;
+}
+
+char buf[10];
+
+void
+f ()
+{
+ char ar[STACK_SIZE/2];
+ int a, b, c, d, e, f, g, h, i, j, k;
+
+ a = getval ();
+ b = getval ();
+ c = getval ();
+ d = getval ();
+ e = getval ();
+ f = getval ();
+ g = getval ();
+ h = getval ();
+ i = getval ();
+ j = getval ();
+
+ k = f2 (17.0);
+
+ sprintf (buf, "%d\n", a + b + c + d + e + f + g + h + i + j + k);
+ if (a + b + c + d + e + f + g + h + i + j + k != 227)
+ abort ();
+}
+
+main ()
+{
+ f ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980608-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980608-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980608-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980608-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,41 @@
+/* { dg-options "-fgnu89-inline" } */
+
+#include <stdarg.h>
+
+extern void abort(void);
+extern void exit (int);
+
+void f1(int a,int b,int c,int d,int e, int f,int g,int h,int i,int j, int k,int
+l,int m,int n,int o)
+{
+ return;
+}
+
+inline void debug(const char *msg,...)
+{
+ va_list ap;
+ va_start( ap, msg );
+
+ f1(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
+
+ if ( va_arg(ap,int) != 101)
+ abort();
+ if ( va_arg(ap,int) != 102)
+ abort();
+ if ( va_arg(ap,int) != 103)
+ abort();
+ if ( va_arg(ap,int) != 104)
+ abort();
+ if ( va_arg(ap,int) != 105)
+ abort();
+ if ( va_arg(ap,int) != 106)
+ abort();
+
+ va_end( ap );
+}
+
+int main(void)
+{
+ debug("%d %d %d %d %d %d\n", 101, 102, 103, 104, 105, 106);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980612-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980612-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980612-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980612-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+struct fd
+{
+ unsigned char a;
+ unsigned char b;
+} f = { 5 };
+
+struct fd *g() { return &f; }
+int h() { return -1; }
+
+int main()
+{
+ struct fd *f = g();
+ f->b = h();
+ if (((f->a & 0x7f) & ~0x10) <= 2)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980617-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980617-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980617-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980617-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+void foo (unsigned int * p)
+{
+ if ((signed char)(*p & 0xFF) == 17 || (signed char)(*p & 0xFF) == 18)
+ return;
+ else
+ abort ();
+}
+
+int main ()
+{
+ int i = 0x30011;
+ foo(&i);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980618-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980618-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980618-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980618-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+void func(int, int);
+
+int main()
+{
+ int x = 7;
+ func(!x, !7);
+ exit (0);
+}
+
+void func(int x, int y)
+{
+ if (x == y)
+ return;
+ else
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980701-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980701-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980701-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980701-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+ns_name_skip (unsigned char **x, unsigned char *y)
+{
+ *x = 0;
+ return 0;
+}
+
+unsigned char a[2];
+
+int dn_skipname(unsigned char *ptr, unsigned char *eom) {
+ unsigned char *saveptr = ptr;
+
+ if (ns_name_skip(&ptr, eom) == -1)
+ return (-1);
+ return (ptr - saveptr);
+}
+
+main()
+{
+ if (dn_skipname (&a[0], &a[1]) == 0)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980707-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980707-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980707-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980707-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,45 @@
+#include <stdlib.h>
+#include <string.h>
+
+char **
+buildargv (char *input)
+{
+ static char *arglist[256];
+ int numargs = 0;
+
+ while (1)
+ {
+ while (*input == ' ')
+ input++;
+ if (*input == 0)
+ break;
+ arglist [numargs++] = input;
+ while (*input != ' ' && *input != 0)
+ input++;
+ if (*input == 0)
+ break;
+ *(input++) = 0;
+ }
+ arglist [numargs] = NULL;
+ return arglist;
+}
+
+
+int main()
+{
+ char **args;
+ char input[256];
+ int i;
+
+ strcpy(input, " a b");
+ args = buildargv(input);
+
+ if (strcmp (args[0], "a"))
+ abort ();
+ if (strcmp (args[1], "b"))
+ abort ();
+ if (args[2] != NULL)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980709-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980709-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980709-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980709-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+/* { dg-xfail-if "Can not call system libm.a with -msoft-float" { powerpc-*-aix* rs6000-*-aix* } { "-msoft-float" } { "" } } */
+#include <math.h>
+
+main()
+{
+ volatile double a;
+ double c;
+ a = 32.0;
+ c = pow(a, 1.0/3.0);
+ if (c + 0.1 > 3.174802
+ && c - 0.1 < 3.174802)
+ exit (0);
+ else
+ abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980716-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980716-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980716-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980716-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+#include <stdarg.h>
+
+void
+stub(int num, ...)
+{
+ va_list ap;
+ char *end;
+ int i;
+
+ for (i = 0; i < 2; i++) {
+ va_start(ap, num);
+ while ( 1 ) {
+ end = va_arg(ap, char *);
+ if (!end) break;
+ }
+ va_end(ap);
+ }
+}
+
+int
+main()
+{
+ stub(1, "ab", "bc", "cx", (char *)0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980929-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980929-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980929-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/980929-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+void f(int i)
+{
+ if (i != 1000)
+ abort ();
+}
+
+
+int main()
+{
+ int n=1000;
+ int i;
+
+ f(n);
+ for(i=0; i<1; ++i) {
+ f(n);
+ n=666;
+ &n;
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981001-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981001-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981001-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981001-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,38 @@
+#define NG 0x100L
+
+unsigned long flg = 0;
+
+long sub (int n)
+{
+ int a, b ;
+
+ if (n >= 2)
+ {
+ if (n % 2 == 0)
+ {
+ a = sub (n / 2);
+
+ return (a + 2 * sub (n / 2 - 1)) * a;
+ }
+ else
+ {
+ a = sub (n / 2 + 1);
+ b = sub (n / 2);
+
+ return a * a + b * b;
+ }
+ }
+ else
+ return (long) n;
+}
+
+int main (void)
+{
+ if (sub (30) != 832040L)
+ flg |= NG;
+
+ if (flg)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981019-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981019-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981019-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981019-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,46 @@
+/* { dg-skip-if "ptxas seg faults" { nvptx-*-* } { "-O3*" } { "" } } */
+
+extern int f2(void);
+extern int f3(void);
+extern void f1(void);
+
+void
+ff(int fname, int part, int nparts)
+{
+ if (fname) /* bb 0 */
+ {
+ if (nparts) /* bb 1 */
+ f1(); /* bb 2 */
+ }
+ else
+ fname = 2; /* bb 3 */
+
+ /* bb 4 is the branch to bb 10
+ (bb 10 is physically at the end of the loop) */
+ while (f3() /* bb 10 */)
+ {
+ if (nparts /* bb 5 */ && f2() /* bb 6 */)
+ {
+ f1(); /* bb 7 ... */
+ nparts = part;
+ if (f3()) /* ... bb 7 */
+ f1(); /* bb 8 */
+ f1(); /* bb 9 */
+ break;
+ }
+ }
+
+ if (nparts) /* bb 11 */
+ f1(); /* bb 12 */
+ return; /* bb 13 */
+}
+
+int main(void)
+{
+ ff(0, 1, 0);
+ return 0;
+}
+
+int f3(void) { static int x = 0; x = !x; return x; }
+void f1(void) { abort(); }
+int f2(void) { abort(); }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981130-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981130-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981130-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981130-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* { dg-xfail-if "alias analysis conflicts with instruction scheduling" { m32r-*-* } { "-O2" "-O1" "-O0" "-Os"} { "" } } */
+struct s { int a; int b;};
+struct s s1;
+struct s s2 = { 1, 2, };
+
+void
+check (a, b)
+ int a;
+ int b;
+{
+ if (a == b)
+ exit (0);
+ else
+ abort ();
+}
+
+int
+main ()
+{
+ int * p;
+ int x;
+
+ s1.a = 9;
+ p = & s1.a;
+ s1 = s2;
+ x = * p;
+
+ check (x, 1);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981206-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981206-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981206-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/981206-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+/* Verify unaligned address aliasing on Alpha EV[45]. */
+
+static unsigned short x, y;
+
+void foo()
+{
+ x = 0x345;
+ y = 0x567;
+}
+
+int main()
+{
+ foo ();
+ if (x != 0x345 || y != 0x567)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+foo(bufp)
+char *bufp;
+{
+ int x = 80;
+ return (*bufp++ = x ? 'a' : 'b');
+}
+
+main()
+{
+ char x;
+
+ if (foo (&x) != 'a')
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990106-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,20 @@
+unsigned calc_mp(unsigned mod)
+{
+ unsigned a,b,c;
+ c=-1;
+ a=c/mod;
+ b=0-a*mod;
+ if (b > mod) { a += 1; b-=mod; }
+ return b;
+}
+
+int main(int argc, char *argv[])
+{
+ unsigned x = 1234;
+ unsigned y = calc_mp(x);
+
+ if ((sizeof (y) == 4 && y != 680)
+ || (sizeof (y) == 2 && y != 134))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990117-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990117-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990117-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990117-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+int
+foo (int x, int y, int i, int j)
+{
+ double tmp1 = ((double) x / y);
+ double tmp2 = ((double) i / j);
+
+ return tmp1 < tmp2;
+}
+
+main ()
+{
+ if (foo (2, 24, 3, 4) == 0)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,34 @@
+extern void abort (void);
+extern void exit (int);
+
+main()
+{
+ int a,b,c;
+ int *pa, *pb, *pc;
+ int **ppa, **ppb, **ppc;
+ int i,j,k,x,y,z;
+
+ a = 10;
+ b = 20;
+ c = 30;
+ pa = &a; pb = &b; pc = &c;
+ ppa = &pa; ppb = &pb; ppc = &pc;
+ x = 0; y = 0; z = 0;
+
+ for(i=0;i<10;i++){
+ if( pa == &a ) pa = &b;
+ else pa = &a;
+ while( (*pa)-- ){
+ x++;
+ if( (*pa) < 3 ) break;
+ else pa = &b;
+ }
+ x++;
+ pa = &b;
+ }
+
+ if ((*pa) != -5 || (*pb) != -5 || x != 43)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990127-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+/* { dg-options "-mpc64" { target { i?86-*-* x86_64-*-* } } } */
+
+extern void abort (void);
+extern void exit (int);
+
+void
+fpEq (double x, double y)
+{
+ if (x != y)
+ abort ();
+}
+
+void
+fpTest (double x, double y)
+{
+ double result1 = (35.7 * 100.0) / 45.0;
+ double result2 = (x * 100.0) / y;
+ fpEq (result1, result2);
+}
+
+int
+main ()
+{
+ fpTest (35.7, 45.0);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990128-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990128-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990128-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990128-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,50 @@
+extern int printf (const char *,...);
+
+struct s { struct s *n; } *p;
+struct s ss;
+#define MAX 10
+struct s sss[MAX];
+int count = 0;
+
+void sub( struct s *p, struct s **pp );
+int look( struct s *p, struct s **pp );
+
+main()
+{
+ struct s *pp;
+ struct s *next;
+ int i;
+
+ p = &ss;
+ next = p;
+ for ( i = 0; i < MAX; i++ ) {
+ next->n = &sss[i];
+ next = next->n;
+ }
+ next->n = 0;
+
+ sub( p, &pp );
+ if (count != MAX+2)
+ abort ();
+
+ exit( 0 );
+}
+
+void sub( struct s *p, struct s **pp )
+{
+ for ( ; look( p, pp ); ) {
+ if ( p )
+ p = p->n;
+ else
+ break;
+ }
+}
+
+int look( struct s *p, struct s **pp )
+{
+ for ( ; p; p = p->n )
+ ;
+ *pp = p;
+ count++;
+ return( 1 );
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990130-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990130-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990130-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990130-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+int count = 0;
+int dummy;
+
+static int *
+bar(void)
+{
+ ++count;
+ return &dummy;
+}
+
+static void
+foo(void)
+{
+ asm("" : "+r"(*bar()));
+}
+
+main()
+{
+ foo();
+ if (count != 1)
+ abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990208-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990208-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990208-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990208-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,47 @@
+/* { dg-require-effective-target label_values } */
+
+/* As a quality of implementation issue, we should not prevent inlining
+ of function explicitly marked inline just because a label therein had
+ its address taken. */
+
+static void *ptr1, *ptr2;
+static int i = 1;
+
+static __inline__ void doit(void **pptr, int cond)
+{
+ if (cond) {
+ here:
+ *pptr = &&here;
+ }
+}
+
+__attribute__ ((noinline))
+static void f(int cond)
+{
+ doit (&ptr1, cond);
+}
+
+__attribute__ ((noinline))
+static void g(int cond)
+{
+ doit (&ptr2, cond);
+}
+
+__attribute__ ((noinline))
+static void bar(void);
+
+int main()
+{
+ f (i);
+ bar();
+ g (i);
+
+#ifdef __OPTIMIZE__
+ if (ptr1 == ptr2)
+ abort ();
+#endif
+
+ exit (0);
+}
+
+void bar(void) { }
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990211-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990211-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990211-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990211-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,61 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ Contributed by Nathan Sidwell 20 Jan 1999 <nathan at acm.org> */
+
+/* check range combining boolean operations work */
+
+extern void abort();
+
+#define N 77
+
+void func(int i)
+{
+ /* fold-const does some clever things with range tests. Make sure
+ we get (some of) them right */
+
+ /* these must fail, regardless of the value of i */
+ if ((i < 0) && (i >= 0))
+ abort();
+ if ((i > 0) && (i <= 0))
+ abort();
+ if ((i >= 0) && (i < 0))
+ abort();
+ if ((i <= 0) && (i > 0))
+ abort();
+
+ if ((i < N) && (i >= N))
+ abort();
+ if ((i > N) && (i <= N))
+ abort();
+ if ((i >= N) && (i < N))
+ abort();
+ if ((i <= N) && (i > N))
+ abort();
+
+ /* these must pass, regardless of the value of i */
+ if (! ((i < 0) || (i >= 0)))
+ abort();
+ if (! ((i > 0) || (i <= 0)))
+ abort();
+ if (! ((i >= 0) || (i < 0)))
+ abort();
+ if (! ((i <= 0) || (i > 0)))
+ abort();
+
+ if (! ((i < N) || (i >= N)))
+ abort();
+ if (! ((i > N) || (i <= N)))
+ abort();
+ if (! ((i >= N) || (i < N)))
+ abort();
+ if (! ((i <= N) || (i > N)))
+ abort();
+
+ return;
+}
+
+int main()
+{
+ func(0);
+ func(1);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990222-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990222-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990222-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990222-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+char line[4] = { '1', '9', '9', '\0' };
+
+int main()
+{
+ char *ptr = line + 3;
+
+ while ((*--ptr += 1) > '9') *ptr = '0';
+ if (line[0] != '2' || line[1] != '0' || line[2] != '0')
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990324-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990324-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990324-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990324-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+void f(long i)
+{
+ if ((signed char)i < 0 || (signed char)i == 0)
+ abort ();
+ else
+ exit (0);
+}
+
+main()
+{
+ f(0xffffff01);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990326-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990326-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990326-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990326-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,407 @@
+struct a {
+ char a, b;
+ short c;
+};
+
+int
+a1()
+{
+ static struct a x = { 1, 2, ~1 }, y = { 65, 2, ~2 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+a2()
+{
+ static struct a x = { 1, 66, ~1 }, y = { 1, 2, ~2 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+a3()
+{
+ static struct a x = { 9, 66, ~1 }, y = { 33, 18, ~2 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+struct b {
+ int c;
+ short b, a;
+};
+
+int
+b1()
+{
+ static struct b x = { ~1, 2, 1 }, y = { ~2, 2, 65 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+b2()
+{
+ static struct b x = { ~1, 66, 1 }, y = { ~2, 2, 1 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+b3()
+{
+ static struct b x = { ~1, 66, 9 }, y = { ~2, 18, 33 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+struct c {
+ unsigned int c:4, b:14, a:14;
+} __attribute__ ((aligned));
+
+int
+c1()
+{
+ static struct c x = { ~1, 2, 1 }, y = { ~2, 2, 65 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+c2()
+{
+ static struct c x = { ~1, 66, 1 }, y = { ~2, 2, 1 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+c3()
+{
+ static struct c x = { ~1, 66, 9 }, y = { ~2, 18, 33 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+struct d {
+ unsigned int a:14, b:14, c:4;
+} __attribute__ ((aligned));
+
+int
+d1()
+{
+ static struct d x = { 1, 2, ~1 }, y = { 65, 2, ~2 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+d2()
+{
+ static struct d x = { 1, 66, ~1 }, y = { 1, 2, ~2 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+d3()
+{
+ static struct d x = { 9, 66, ~1 }, y = { 33, 18, ~2 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+struct e {
+ int c:4, b:14, a:14;
+} __attribute__ ((aligned));
+
+int
+e1()
+{
+ static struct e x = { ~1, -2, -65 }, y = { ~2, -2, -1 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+e2()
+{
+ static struct e x = { ~1, -2, -1 }, y = { ~2, -66, -1 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+e3()
+{
+ static struct e x = { ~1, -18, -33 }, y = { ~2, -66, -9 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+int
+e4()
+{
+ static struct e x = { -1, -1, 0 };
+
+ return x.a == 0 && x.b & 0x2000;
+}
+
+struct f {
+ int a:14, b:14, c:4;
+} __attribute__ ((aligned));
+
+int
+f1()
+{
+ static struct f x = { -65, -2, ~1 }, y = { -1, -2, ~2 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+f2()
+{
+ static struct f x = { -1, -2, ~1 }, y = { -1, -66, ~2 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+f3()
+{
+ static struct f x = { -33, -18, ~1 }, y = { -9, -66, ~2 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+int
+f4()
+{
+ static struct f x = { 0, -1, -1 };
+
+ return x.a == 0 && x.b & 0x2000;
+}
+
+struct gx {
+ int c:4, b:14, a:14;
+} __attribute__ ((aligned));
+struct gy {
+ int b:14, a:14, c:4;
+} __attribute__ ((aligned));
+
+int
+g1()
+{
+ static struct gx x = { ~1, -2, -65 };
+ static struct gy y = { -2, -1, ~2 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+g2()
+{
+ static struct gx x = { ~1, -2, -1 };
+ static struct gy y = { -66, -1, ~2 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+g3()
+{
+ static struct gx x = { ~1, -18, -33 };
+ static struct gy y = { -66, -9, ~2 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+int
+g4()
+{
+ static struct gx x = { ~1, 0x0020, 0x0010 };
+ static struct gy y = { 0x0200, 0x0100, ~2 };
+
+ return ((x.a & 0x00f0) == (y.a & 0x0f00) &&
+ (x.b & 0x00f0) == (y.b & 0x0f00));
+}
+
+int
+g5()
+{
+ static struct gx x = { ~1, 0x0200, 0x0100 };
+ static struct gy y = { 0x0020, 0x0010, ~2 };
+
+ return ((x.a & 0x0f00) == (y.a & 0x00f0) &&
+ (x.b & 0x0f00) == (y.b & 0x00f0));
+}
+
+int
+g6()
+{
+ static struct gx x = { ~1, 0xfe20, 0xfd10 };
+ static struct gy y = { 0xc22f, 0xc11f, ~2 };
+
+ return ((x.a & 0x03ff) == (y.a & 0x3ff0) &&
+ (x.b & 0x03ff) == (y.b & 0x3ff0));
+}
+
+int
+g7()
+{
+ static struct gx x = { ~1, 0xc22f, 0xc11f };
+ static struct gy y = { 0xfe20, 0xfd10, ~2 };
+
+ return ((x.a & 0x3ff0) == (y.a & 0x03ff) &&
+ (x.b & 0x3ff0) == (y.b & 0x03ff));
+}
+
+struct hx {
+ int a:14, b:14, c:4;
+} __attribute__ ((aligned));
+struct hy {
+ int c:4, a:14, b:14;
+} __attribute__ ((aligned));
+
+int
+h1()
+{
+ static struct hx x = { -65, -2, ~1 };
+ static struct hy y = { ~2, -1, -2 };
+
+ return (x.a == (y.a & ~64) && x.b == y.b);
+}
+
+int
+h2()
+{
+ static struct hx x = { -1, -2, ~1 };
+ static struct hy y = { ~2, -1, -66 };
+
+ return (x.a == y.a && (x.b & ~64) == y.b);
+}
+
+int
+h3()
+{
+ static struct hx x = { -33, -18, ~1 };
+ static struct hy y = { ~2, -9, -66 };
+
+ return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));
+}
+
+int
+h4()
+{
+ static struct hx x = { 0x0010, 0x0020, ~1 };
+ static struct hy y = { ~2, 0x0100, 0x0200 };
+
+ return ((x.a & 0x00f0) == (y.a & 0x0f00) &&
+ (x.b & 0x00f0) == (y.b & 0x0f00));
+}
+
+int
+h5()
+{
+ static struct hx x = { 0x0100, 0x0200, ~1 };
+ static struct hy y = { ~2, 0x0010, 0x0020 };
+
+ return ((x.a & 0x0f00) == (y.a & 0x00f0) &&
+ (x.b & 0x0f00) == (y.b & 0x00f0));
+}
+
+int
+h6()
+{
+ static struct hx x = { 0xfd10, 0xfe20, ~1 };
+ static struct hy y = { ~2, 0xc11f, 0xc22f };
+
+ return ((x.a & 0x03ff) == (y.a & 0x3ff0) &&
+ (x.b & 0x03ff) == (y.b & 0x3ff0));
+}
+
+int
+h7()
+{
+ static struct hx x = { 0xc11f, 0xc22f, ~1 };
+ static struct hy y = { ~2, 0xfd10, 0xfe20 };
+
+ return ((x.a & 0x3ff0) == (y.a & 0x03ff) &&
+ (x.b & 0x3ff0) == (y.b & 0x03ff));
+}
+
+int
+main()
+{
+ if (!a1 ())
+ abort ();
+ if (!a2 ())
+ abort ();
+ if (!a3 ())
+ abort ();
+ if (!b1 ())
+ abort ();
+ if (!b2 ())
+ abort ();
+ if (!b3 ())
+ abort ();
+ if (!c1 ())
+ abort ();
+ if (!c2 ())
+ abort ();
+ if (!c3 ())
+ abort ();
+ if (!d1 ())
+ abort ();
+ if (!d2 ())
+ abort ();
+ if (!d3 ())
+ abort ();
+ if (!e1 ())
+ abort ();
+ if (!e2 ())
+ abort ();
+ if (!e3 ())
+ abort ();
+ if (!e4 ())
+ abort ();
+ if (!f1 ())
+ abort ();
+ if (!f2 ())
+ abort ();
+ if (!f3 ())
+ abort ();
+ if (!f4 ())
+ abort ();
+ if (!g1 ())
+ abort ();
+ if (!g2 ())
+ abort ();
+ if (!g3 ())
+ abort ();
+ if (g4 ())
+ abort ();
+ if (g5 ())
+ abort ();
+ if (!g6 ())
+ abort ();
+ if (!g7 ())
+ abort ();
+ if (!h1 ())
+ abort ();
+ if (!h2 ())
+ abort ();
+ if (!h3 ())
+ abort ();
+ if (h4 ())
+ abort ();
+ if (h5 ())
+ abort ();
+ if (!h6 ())
+ abort ();
+ if (!h7 ())
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990404-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990404-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990404-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990404-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,27 @@
+
+int x[10] = { 0,1,2,3,4,5,6,7,8,9};
+
+int
+main()
+{
+ int niterations = 0, i;
+
+ for (;;) {
+ int i, mi, max;
+ max = 0;
+ for (i = 0; i < 10 ; i++) {
+ if (x[i] > max) {
+ max = x[i];
+ mi = i;
+ }
+ }
+ if (max == 0)
+ break;
+ x[mi] = 0;
+ niterations++;
+ if (niterations > 10)
+ abort ();
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990413-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990413-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990413-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990413-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,51 @@
+/* This tests for a bug in regstack that was breaking glibc's math library. */
+/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } } */
+
+extern void abort (void);
+
+static __inline double
+minus_zero (void)
+{
+ union { double __d; int __i[2]; } __x;
+ __x.__i[0] = 0x0;
+ __x.__i[1] = 0x80000000;
+ return __x.__d;
+}
+
+static __inline long double
+__atan2l (long double __y, long double __x)
+{
+ register long double __value;
+ __asm __volatile__ ("fpatan\n\t"
+ : "=t" (__value)
+ : "0" (__x), "u" (__y)
+ : "st(1)");
+ return __value;
+}
+
+static __inline long double
+__sqrtl (long double __x)
+{
+ register long double __result;
+ __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x));
+ return __result;
+}
+
+static __inline double
+asin (double __x)
+{
+ return __atan2l (__x, __sqrtl (1.0 - __x * __x));
+}
+
+int
+main (void)
+{
+ double x;
+
+ x = minus_zero();
+ x = asin (x);
+
+ if (x != 0.0) /* actually -0.0, but 0.0 == -0.0 */
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990513-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990513-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990513-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990513-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+#include <string.h>
+
+void foo (int *BM_tab, int j)
+{
+ int *BM_tab_base;
+
+ BM_tab_base = BM_tab;
+ BM_tab += 0400;
+ while (BM_tab_base != BM_tab)
+ {
+ *--BM_tab = j;
+ *--BM_tab = j;
+ *--BM_tab = j;
+ *--BM_tab = j;
+ }
+}
+
+int main ()
+{
+ int BM_tab[0400];
+ memset (BM_tab, 0, sizeof (BM_tab));
+ foo (BM_tab, 6);
+ if (BM_tab[0] != 6)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990524-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990524-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990524-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990524-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,26 @@
+char a[] = "12345";
+char b[] = "12345";
+
+void loop (char * pz, char * pzDta)
+{
+ for (;;) {
+ switch (*(pz++) = *(pzDta++)) {
+ case 0:
+ goto loopDone2;
+
+ case '"':
+ case '\\':
+ pz[-1] = '\\';
+ *(pz++) = pzDta[-1];
+ }
+ } loopDone2:;
+
+ if (a - pz != b - pzDta)
+ abort ();
+}
+
+main()
+{
+ loop (a, b);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+struct blah {
+ int m1, m2;
+};
+
+void die(struct blah arg)
+{
+ int i ;
+ struct blah buf[1];
+
+ for (i = 0; i < 1 ; buf[i++] = arg)
+ ;
+ if (buf[0].m1 != 1) {
+ abort ();
+ }
+}
+
+int main()
+{
+ struct blah s = { 1, 2 };
+
+ die(s);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990525-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,37 @@
+typedef struct {
+ int v[4];
+} Test1;
+
+Test1 func2();
+
+int func1()
+{
+ Test1 test;
+ test = func2();
+
+ if (test.v[0] != 10)
+ abort ();
+ if (test.v[1] != 20)
+ abort ();
+ if (test.v[2] != 30)
+ abort ();
+ if (test.v[3] != 40)
+ abort ();
+}
+
+Test1 func2()
+{
+ Test1 tmp;
+ tmp.v[0] = 10;
+ tmp.v[1] = 20;
+ tmp.v[2] = 30;
+ tmp.v[3] = 40;
+ return tmp;
+}
+
+
+int main()
+{
+ func1();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990527-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990527-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990527-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990527-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+int sum;
+
+void
+g (int i)
+{
+ sum += i;
+}
+
+void
+f(int j)
+{
+ int i;
+
+ for (i = 0; i < 9; i++)
+ {
+ j++;
+ g (j);
+ j = 9;
+ }
+}
+
+int
+main ()
+{
+ f (0);
+ if (sum != 81)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990531-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990531-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990531-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990531-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+ unsigned long bad(int reg, unsigned long inWord)
+ {
+ union {
+ unsigned long word;
+ unsigned char byte[4];
+ } data;
+
+ data.word = inWord;
+ data.byte[reg] = 0;
+
+ return data.word;
+ }
+
+main()
+{
+ /* XXX This test could be generalized. */
+ if (sizeof (long) != 4)
+ exit (0);
+
+ if (bad (0, 0xdeadbeef) == 0xdeadbeef)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990604-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990604-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990604-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990604-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+int b;
+void f ()
+{
+ int i = 0;
+ if (b == 0)
+ do {
+ b = i;
+ i++;
+ } while (i < 10);
+}
+
+int main ()
+{
+ f ();
+ if (b != 9)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990628-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990628-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990628-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990628-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,56 @@
+#include <stdlib.h>
+
+struct {
+ long sqlcode;
+} sqlca;
+
+
+struct data_record {
+ int dummy;
+ int a[100];
+} *data_ptr, data_tmp;
+
+
+int
+num_records()
+{
+ return 1;
+}
+
+
+void
+fetch()
+{
+ static int fetch_count;
+
+ memset(&data_tmp, 0x55, sizeof(data_tmp));
+ sqlca.sqlcode = (++fetch_count > 1 ? 100 : 0);
+}
+
+
+void
+load_data() {
+ struct data_record *p;
+ int num = num_records();
+
+ data_ptr = malloc(num * sizeof(struct data_record));
+ memset(data_ptr, 0xaa, num * sizeof(struct data_record));
+
+ fetch();
+ p = data_ptr;
+ while (sqlca.sqlcode == 0) {
+ *p++ = data_tmp;
+ fetch();
+ }
+}
+
+
+main()
+{
+ load_data();
+ if (sizeof (int) == 2 && data_ptr[0].dummy != 0x5555)
+ abort ();
+ else if (sizeof (int) > 2 && data_ptr[0].dummy != 0x55555555)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990804-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990804-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990804-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990804-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+int gfbyte ( void )
+{
+ return 0;
+}
+
+int main( void )
+{
+ int i,j,k ;
+
+ i = gfbyte();
+
+ i = i + 1 ;
+
+ if ( i == 0 )
+ k = -0 ;
+ else
+ k = i + 0 ;
+
+ if (i != 1)
+ abort ();
+
+ k = 1 ;
+ if ( k <= i)
+ do
+ j = gfbyte () ;
+ while ( k++ < i ) ;
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990811-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990811-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990811-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990811-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,31 @@
+struct s {long a; int b;};
+
+int foo(int x, void *y)
+{
+ switch(x) {
+ case 0: return ((struct s*)y)->a;
+ case 1: return *(signed char*)y;
+ case 2: return *(short*)y;
+ }
+ abort();
+}
+
+int main ()
+{
+ struct s s;
+ short sh[10];
+ signed char c[10];
+ int i;
+
+ s.a = 1;
+ s.b = 2;
+ for (i = 0; i < 10; i++) {
+ sh[i] = i;
+ c[i] = i;
+ }
+
+ if (foo(0, &s) != 1) abort();
+ if (foo(1, c+3) != 3) abort();
+ if (foo(2, sh+3) != 3) abort();
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990826-0.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990826-0.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990826-0.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990826-0.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/*
+From: niles at fan745.gsfc.nasa.gov
+To: fortran at gnu.org
+Subject: Re: Scary problems in g77 for RedHat 6.0. (glibc-2.1)
+Date: Sun, 06 Jun 1999 23:37:23 -0400
+X-UIDL: 9c1e40c572e3b306464f703461764cd5
+*/
+
+/* { dg-xfail-if "Can not call system libm.a with -msoft-float" { powerpc-*-aix* rs6000-*-aix* } { "-msoft-float" } { "" } } */
+
+#include <stdio.h>
+#include <math.h>
+
+int
+main()
+{
+ if (floor (0.1) != 0.)
+ abort ();
+ return 0;
+}
+
+/*
+It will result in 36028797018963968.000000 on Alpha RedHat Linux 6.0
+using glibc-2.1 at least on my 21064. This may result in g77 bug
+reports concerning the INT() function, just so you know.
+
+ Thanks,
+ Rick Niles.
+*/
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990827-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990827-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990827-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990827-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,21 @@
+unsigned test(unsigned one , unsigned bit)
+{
+ unsigned val= bit & 1;
+ unsigned zero= one >> 1;
+
+ val++;
+ return zero + ( val>> 1 );
+}
+
+int main()
+{
+ if (test (1,0) != 0)
+ abort ();
+ if (test (1,1) != 1)
+ abort ();
+ if (test (1,65535) != 1)
+ abort ();
+ exit (0);
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990829-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990829-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990829-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990829-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+double test (const double le, const double ri)
+{
+ double val = ( ri - le ) / ( ri * ( le + 1.0 ) );
+ return val;
+}
+
+int main ()
+{
+ double retval;
+
+ retval = test(1.0,2.0);
+ if (retval < 0.24 || retval > 0.26)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990923-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990923-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990923-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/990923-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+#define mask 0xffff0000L
+#define value 0xabcd0000L
+
+long
+foo (long x)
+{
+ if ((x & mask) == value)
+ return x & 0xffffL;
+ return 1;
+}
+
+int
+main (void)
+{
+ if (foo (value) != 0 || foo (0) != 1)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991014-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991014-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991014-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991014-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,53 @@
+
+typedef __SIZE_TYPE__ Size_t;
+
+#if __SIZEOF_LONG__ < __SIZEOF_POINTER__
+#define bufsize ((1LL << (8 * sizeof(Size_t) - 2))-256)
+#else
+#define bufsize ((1L << (8 * sizeof(Size_t) - 2))-256)
+#endif
+
+struct huge_struct
+{
+ short buf[bufsize];
+ int a;
+ int b;
+ int c;
+ int d;
+};
+
+union huge_union
+{
+ int a;
+ char buf[bufsize];
+};
+
+Size_t union_size()
+{
+ return sizeof(union huge_union);
+}
+
+Size_t struct_size()
+{
+ return sizeof(struct huge_struct);
+}
+
+Size_t struct_a_offset()
+{
+ return (Size_t)(&((struct huge_struct *) 0)->a);
+}
+
+int main()
+{
+ /* Check the exact sizeof value. bufsize is aligned on 256b. */
+ if (union_size() != sizeof(char) * bufsize)
+ abort();
+
+ if (struct_size() != sizeof(short) * bufsize + 4*sizeof(int))
+ abort();
+
+ if (struct_a_offset() < sizeof(short) * bufsize)
+ abort();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991016-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991016-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991016-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991016-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,55 @@
+/* Two of these types will, on current gcc targets, have the same
+ mode but have different alias sets. DOIT tries to get gcse to
+ invalidly hoist one of the values out of the loop. */
+
+typedef int T0;
+typedef long T1;
+typedef long long T2;
+
+int
+doit(int sel, int n, void *p)
+{
+ T0 * const p0 = p;
+ T1 * const p1 = p;
+ T2 * const p2 = p;
+
+ switch (sel)
+ {
+ case 0:
+ do
+ *p0 += *p0;
+ while (--n);
+ return *p0 == 0;
+
+ case 1:
+ do
+ *p1 += *p1;
+ while (--n);
+ return *p1 == 0;
+
+ case 2:
+ do
+ *p2 += *p2;
+ while (--n);
+ return *p2 == 0;
+
+ default:
+ abort ();
+ }
+}
+
+int
+main()
+{
+ T0 v0; T1 v1; T2 v2;
+
+ v0 = 1; doit(0, 5, &v0);
+ v1 = 1; doit(1, 5, &v1);
+ v2 = 1; doit(2, 5, &v2);
+
+ if (v0 != 32) abort ();
+ if (v1 != 32) abort ();
+ if (v2 != 32) abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991019-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991019-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991019-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991019-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+typedef struct {
+ double epsilon;
+} material_type;
+
+material_type foo(double x)
+{
+ material_type m;
+
+ m.epsilon = 1.0 + x;
+ return m;
+}
+
+main()
+{
+ int i;
+ material_type x;
+
+ /* We must iterate enough times to overflow the FP stack on the
+ x86. */
+ for (i = 0; i < 10; i++)
+ {
+ x = foo (1.0);
+ if (x.epsilon != 1.0 + 1.0)
+ abort ();
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991023-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991023-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991023-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991023-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,24 @@
+
+
+int blah;
+foo()
+{
+ int i;
+
+ for (i=0 ; i< 7 ; i++)
+ {
+ if (i == 7 - 1)
+ blah = 0xfcc;
+ else
+ blah = 0xfee;
+ }
+ return blah;
+}
+
+
+main()
+{
+ if (foo () != 0xfcc)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991030-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991030-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991030-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991030-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,7 @@
+double x = 0x1.fp1;
+int main()
+{
+ if (x != 3.875)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991112-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991112-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991112-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991112-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* This code was miscompiled at -O3 on x86.
+ Reported by Jim Meyering; distilled from bash. */
+
+int rl_show_char (int c) { return 0; }
+
+int rl_character_len (int c, int pos)
+{
+ return isprint (c) ? 1 : 2;
+}
+
+int main(void)
+{
+ int (*x)(int, int) = rl_character_len;
+ if (x('a', 1) != 1)
+ abort();
+ if (x('\002', 1) != 2)
+ abort();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991118-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991118-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991118-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991118-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,79 @@
+struct tmp
+{
+ long long int pad : 12;
+ long long int field : 52;
+};
+
+struct tmp2
+{
+ long long int field : 52;
+ long long int pad : 12;
+};
+
+struct tmp3
+{
+ long long int pad : 11;
+ long long int field : 53;
+};
+
+struct tmp4
+{
+ long long int field : 53;
+ long long int pad : 11;
+};
+
+struct tmp
+sub (struct tmp tmp)
+{
+ tmp.field ^= 0x0008765412345678LL;
+ return tmp;
+}
+
+struct tmp2
+sub2 (struct tmp2 tmp2)
+{
+ tmp2.field ^= 0x0008765412345678LL;
+ return tmp2;
+}
+
+struct tmp3
+sub3 (struct tmp3 tmp3)
+{
+ tmp3.field ^= 0x0018765412345678LL;
+ return tmp3;
+}
+
+struct tmp4
+sub4 (struct tmp4 tmp4)
+{
+ tmp4.field ^= 0x0018765412345678LL;
+ return tmp4;
+}
+
+struct tmp tmp = {0x123, 0x123456789ABCDLL};
+struct tmp2 tmp2 = {0x123456789ABCDLL, 0x123};
+struct tmp3 tmp3 = {0x123, 0x1FFFF00000000LL};
+struct tmp4 tmp4 = {0x1FFFF00000000LL, 0x123};
+
+main()
+{
+
+ if (sizeof (long long) != 8)
+ exit (0);
+
+ tmp = sub (tmp);
+ tmp2 = sub2 (tmp2);
+
+ if (tmp.pad != 0x123 || tmp.field != 0xFFF9551175BDFDB5LL)
+ abort ();
+ if (tmp2.pad != 0x123 || tmp2.field != 0xFFF9551175BDFDB5LL)
+ abort ();
+
+ tmp3 = sub3 (tmp3);
+ tmp4 = sub4 (tmp4);
+ if (tmp3.pad != 0x123 || tmp3.field != 0xFFF989AB12345678LL)
+ abort ();
+ if (tmp4.pad != 0x123 || tmp4.field != 0xFFF989AB12345678LL)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991201-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991201-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991201-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991201-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,39 @@
+struct vc_data {
+ unsigned long space;
+ unsigned char vc_palette[16*3];
+};
+
+struct vc {
+ struct vc_data *d;
+};
+
+struct vc_data a_con;
+struct vc vc_cons[63] = { &a_con };
+int default_red[16];
+int default_grn[16];
+int default_blu[16];
+
+extern void bar(int);
+
+void reset_palette(int currcons)
+{
+ int j, k;
+ for (j=k=0; j<16; j++) {
+ (vc_cons[currcons].d->vc_palette) [k++] = default_red[j];
+ (vc_cons[currcons].d->vc_palette) [k++] = default_grn[j];
+ (vc_cons[currcons].d->vc_palette) [k++] = default_blu[j];
+ }
+ bar(k);
+}
+
+void bar(int k)
+{
+ if (k != 16*3)
+ abort();
+}
+
+int main()
+{
+ reset_palette(0);
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,15 @@
+int x, y;
+
+int
+main()
+{
+ x = 2;
+ y = x;
+ do
+ {
+ x = y;
+ y = 2 * y;
+ }
+ while ( ! ((y - x) >= 20));
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,17 @@
+
+int
+f1 ()
+{
+ unsigned long x, y = 1;
+
+ x = ((y * 8192) - 216) % 16;
+ return x;
+}
+
+int
+main ()
+{
+ if (f1 () != 8)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991202-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+
+unsigned int f (unsigned int a)
+{
+ return a * 65536 / 8;
+}
+
+unsigned int g (unsigned int a)
+{
+ return a * 65536;
+}
+
+unsigned int h (unsigned int a)
+{
+ return a / 8;
+}
+
+int main ()
+{
+ if (f (65536) != h (g (65536)))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,116 @@
+#define VALUE 0x123456789abcdefLL
+#define AFTER 0x55
+
+void
+test1 (int a, long long value, int after)
+{
+ if (a != 1
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+void
+test2 (int a, int b, long long value, int after)
+{
+ if (a != 1
+ || b != 2
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+void
+test3 (int a, int b, int c, long long value, int after)
+{
+ if (a != 1
+ || b != 2
+ || c != 3
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+void
+test4 (int a, int b, int c, int d, long long value, int after)
+{
+ if (a != 1
+ || b != 2
+ || c != 3
+ || d != 4
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+void
+test5 (int a, int b, int c, int d, int e, long long value, int after)
+{
+ if (a != 1
+ || b != 2
+ || c != 3
+ || d != 4
+ || e != 5
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+void
+test6 (int a, int b, int c, int d, int e, int f, long long value, int after)
+{
+ if (a != 1
+ || b != 2
+ || c != 3
+ || d != 4
+ || e != 5
+ || f != 6
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+void
+test7 (int a, int b, int c, int d, int e, int f, int g, long long value, int after)
+{
+ if (a != 1
+ || b != 2
+ || c != 3
+ || d != 4
+ || e != 5
+ || f != 6
+ || g != 7
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+void
+test8 (int a, int b, int c, int d, int e, int f, int g, int h, long long value, int after)
+{
+ if (a != 1
+ || b != 2
+ || c != 3
+ || d != 4
+ || e != 5
+ || f != 6
+ || g != 7
+ || h != 8
+ || value != VALUE
+ || after != AFTER)
+ abort ();
+}
+
+int
+main ()
+{
+ test1 (1, VALUE, AFTER);
+ test2 (1, 2, VALUE, AFTER);
+ test3 (1, 2, 3, VALUE, AFTER);
+ test4 (1, 2, 3, 4, VALUE, AFTER);
+ test5 (1, 2, 3, 4, 5, VALUE, AFTER);
+ test6 (1, 2, 3, 4, 5, 6, VALUE, AFTER);
+ test7 (1, 2, 3, 4, 5, 6, 7, VALUE, AFTER);
+ test8 (1, 2, 3, 4, 5, 6, 7, 8, VALUE, AFTER);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,40 @@
+#include <stdarg.h>
+
+#define VALUE 0x123456789abcdefLL
+#define AFTER 0x55
+
+void
+test (int n, ...)
+{
+ va_list ap;
+ int i;
+
+ va_start (ap, n);
+ for (i = 2; i <= n; i++)
+ {
+ if (va_arg (ap, int) != i)
+ abort ();
+ }
+
+ if (va_arg (ap, long long) != VALUE)
+ abort ();
+
+ if (va_arg (ap, int) != AFTER)
+ abort ();
+
+ va_end (ap);
+}
+
+int
+main ()
+{
+ test (1, VALUE, AFTER);
+ test (2, 2, VALUE, AFTER);
+ test (3, 2, 3, VALUE, AFTER);
+ test (4, 2, 3, 4, VALUE, AFTER);
+ test (5, 2, 3, 4, 5, VALUE, AFTER);
+ test (6, 2, 3, 4, 5, 6, VALUE, AFTER);
+ test (7, 2, 3, 4, 5, 6, 7, VALUE, AFTER);
+ test (8, 2, 3, 4, 5, 6, 7, 8, VALUE, AFTER);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991216-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,16 @@
+/* Test against a problem with loop reversal. */
+static void bug(int size, int tries)
+{
+ int i;
+ int num = 0;
+ while (num < size)
+ {
+ for (i = 1; i < tries; i++) num++;
+ }
+}
+
+int main()
+{
+ bug(5, 10);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991221-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991221-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991221-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991221-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,13 @@
+int main( void )
+{
+ unsigned long totalsize = 80;
+ unsigned long msize = 64;
+
+ if (sizeof(long) != 4)
+ exit(0);
+
+ if ( totalsize > (2147483647L * 2UL + 1)
+ || (msize != 0 && ((msize - 1) > (2147483647L * 2UL + 1) )))
+ abort();
+ exit( 0 );
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991227-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991227-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991227-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991227-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,11 @@
+char* doit(int flag)
+{
+ return 1 + (flag ? "\0wrong\n" : "\0right\n");
+}
+int main()
+{
+ char *result = doit(0);
+ if (*result == 'r' && result[1] == 'i')
+ exit(0);
+ abort();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991228-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991228-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991228-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/991228-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,25 @@
+__extension__ union { double d; int i[2]; } u = { d: -0.25 };
+
+/* This assumes the endianness of words in a long long is the same as
+ that for doubles, which doesn't hold for a few platforms, but we
+ can probably special case them here, as appropriate. */
+long long endianness_test = 1;
+#define MSW (*(int*)&endianness_test)
+
+int
+signbit(double x)
+{
+ __extension__ union { double d; int i[2]; } u = { d: x };
+ return u.i[MSW] < 0;
+}
+
+int main(void)
+{
+ if (2*sizeof(int) != sizeof(double) || u.i[MSW] >= 0)
+ exit(0);
+
+ if (!signbit(-0.25))
+ abort();
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+int val;
+
+int *ptr = &val;
+float *ptr2 = &val;
+
+__attribute__((optimize ("-fno-strict-aliasing")))
+typepun ()
+{
+ *ptr2=0;
+}
+
+main()
+{
+ *ptr=1;
+ typepun ();
+ if (*ptr)
+ __builtin_abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,12 @@
+/* { dg-require-alias "" } */
+int a[10]={};
+extern int b[10] __attribute__ ((alias("a")));
+int off;
+main()
+{
+ b[off]=1;
+ a[off]=2;
+ if (b[off]!=2)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+/* { dg-require-alias "" } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } } */
+static int a=0;
+extern int b __attribute__ ((alias("a")));
+__attribute__ ((noinline))
+static inc()
+{
+ b++;
+}
+int
+main()
+{
+ a=0;
+ inc ();
+ if (a!=1)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-4.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-4.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-4.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-4.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* { dg-require-alias "" } */
+int a = 1;
+extern int b __attribute__ ((alias ("a")));
+int c = 1;
+extern int d __attribute__ ((alias ("c")));
+main (int argc)
+{
+ int *p;
+ int *q;
+ if (argc)
+ p = &a, q = &b;
+ else
+ p = &c, q = &d;
+ *p = 1;
+ *q = 2;
+ if (*p == 1)
+ __builtin_abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-access-path-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-access-path-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-access-path-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alias-access-path-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,19 @@
+/* Test that variable
+ int val;
+ may hold value of tyope "struct c" which has same size.
+ This is valid in GIMPLE memory model. */
+
+struct a {int val;} a={1},a2;
+struct b {struct a a;};
+int val;
+struct c {struct b b;} *cptr=(void *)&val;
+
+int
+main(void)
+{
+ cptr->b.a=a;
+ val = 2;
+ a2=cptr->b.a;
+ if (a2.val == a.val)
+ __builtin_abort ();
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,9 @@
+typedef int new_int __attribute__ ((aligned(16)));
+struct S { int x; };
+
+int main()
+{
+ if (sizeof(struct S) != sizeof(int))
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,50 @@
+/* Simple alignment checks;
+ looking for compiler/assembler alignment disagreements,
+ agreement between struct initialization and access. */
+struct a_short { char c; short s; } s_c_s = { 'a', 13 };
+struct a_int { char c ; int i; } s_c_i = { 'b', 14 };
+struct b_int { short s; int i; } s_s_i = { 15, 16 };
+struct a_float { char c; float f; } s_c_f = { 'c', 17.0 };
+struct b_float { short s; float f; } s_s_f = { 18, 19.0 };
+struct a_double { char c; double d; } s_c_d = { 'd', 20.0 };
+struct b_double { short s; double d; } s_s_d = { 21, 22.0 };
+struct c_double { int i; double d; } s_i_d = { 23, 24.0 };
+struct d_double { float f; double d; } s_f_d = { 25.0, 26.0 };
+struct a_ldouble { char c; long double ld; } s_c_ld = { 'e', 27.0 };
+struct b_ldouble { short s; long double ld; } s_s_ld = { 28, 29.0 };
+struct c_ldouble { int i; long double ld; } s_i_ld = { 30, 31.0 };
+struct d_ldouble { float f; long double ld; } s_f_ld = { 32.0, 33.0 };
+struct e_ldouble { double d; long double ld; } s_d_ld = { 34.0, 35.0 };
+
+int main ()
+{
+ if (s_c_s.c != 'a') abort ();
+ if (s_c_s.s != 13) abort ();
+ if (s_c_i.c != 'b') abort ();
+ if (s_c_i.i != 14) abort ();
+ if (s_s_i.s != 15) abort ();
+ if (s_s_i.i != 16) abort ();
+ if (s_c_f.c != 'c') abort ();
+ if (s_c_f.f != 17.0) abort ();
+ if (s_s_f.s != 18) abort ();
+ if (s_s_f.f != 19.0) abort ();
+ if (s_c_d.c != 'd') abort ();
+ if (s_c_d.d != 20.0) abort ();
+ if (s_s_d.s != 21) abort ();
+ if (s_s_d.d != 22.0) abort ();
+ if (s_i_d.i != 23) abort ();
+ if (s_i_d.d != 24.0) abort ();
+ if (s_f_d.f != 25.0) abort ();
+ if (s_f_d.d != 26.0) abort ();
+ if (s_c_ld.c != 'e') abort ();
+ if (s_c_ld.ld != 27.0) abort ();
+ if (s_s_ld.s != 28) abort ();
+ if (s_s_ld.ld != 29.0) abort ();
+ if (s_i_ld.i != 30) abort ();
+ if (s_i_ld.ld != 31.0) abort ();
+ if (s_f_ld.f != 32.0) abort ();
+ if (s_f_ld.ld != 33.0) abort ();
+ if (s_d_ld.d != 34.0) abort ();
+ if (s_d_ld.ld != 35.0) abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-3.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-3.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-3.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,14 @@
+/* { dg-skip-if "small alignment" { pdp11-*-* } } */
+
+void func(void) __attribute__((aligned(256)));
+
+void func(void)
+{
+}
+
+int main()
+{
+ if (__alignof__(func) != 256)
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-nest.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-nest.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-nest.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/align-nest.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,28 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
+
+void foo(int n)
+{
+ typedef struct
+ {
+ int value;
+ } myint;
+
+ struct S
+ {
+ int i[n];
+ unsigned int b:1;
+ myint mi;
+ } __attribute__ ((packed)) __attribute__ ((aligned (4)));
+
+ struct S s[2];
+ int k;
+
+ for (k = 0; k < 2; k ++)
+ s[k].mi.value = 0;
+}
+
+int main ()
+{
+ foo (2);
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alloca-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alloca-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alloca-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/alloca-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,22 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
+/* Verify that alloca storage is sufficiently aligned. */
+/* ??? May fail if BIGGEST_ALIGNMENT > STACK_BOUNDARY. Which, I guess
+ can only happen on !STRICT_ALIGNMENT targets. */
+
+typedef __SIZE_TYPE__ size_t;
+
+struct dummy { int x __attribute__((aligned)); };
+#define BIGGEST_ALIGNMENT __alignof__(struct dummy)
+
+_Bool foo(void)
+{
+ char *p = __builtin_alloca(32);
+ return ((size_t)p & (BIGGEST_ALIGNMENT - 1)) == 0;
+}
+
+int main()
+{
+ if (!foo())
+ abort ();
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/anon-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/anon-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/anon-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/anon-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,29 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc. */
+
+/* Source: Neil Booth, 4 Nov 2001, derived from PR 2820 - field lookup in
+ nested anonymous entities was broken. */
+
+struct
+{
+ int x;
+ struct
+ {
+ int a;
+ union
+ {
+ int b;
+ };
+ };
+} foo;
+
+int
+main(int argc, char *argv[])
+{
+ foo.b = 6;
+ foo.a = 5;
+
+ if (foo.b != 6)
+ abort ();
+
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,47 @@
+unsigned
+sat_add (unsigned i)
+{
+ unsigned ret = i + 1;
+ if (ret < i)
+ ret = i;
+ return ret;
+}
+
+unsigned
+sat_add2 (unsigned i)
+{
+ unsigned ret = i + 1;
+ if (ret > i)
+ return ret;
+ return i;
+}
+
+unsigned
+sat_add3 (unsigned i)
+{
+ unsigned ret = i - 1;
+ if (ret > i)
+ ret = i;
+ return ret;
+}
+
+unsigned
+sat_add4 (unsigned i)
+{
+ unsigned ret = i - 1;
+ if (ret < i)
+ return ret;
+ return i;
+}
+main ()
+{
+ if (sat_add (~0U) != ~0U)
+ abort ();
+ if (sat_add2 (~0U) != ~0U)
+ abort ();
+ if (sat_add3 (0U) != 0U)
+ abort ();
+ if (sat_add4 (0U) != 0U)
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand-ll.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand-ll.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand-ll.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand-ll.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,114 @@
+long long
+simple_rand ()
+{
+ static unsigned long long seed = 47114711;
+ unsigned long long this = seed * 1103515245 + 12345;
+ seed = this;
+ return this >> 8;
+}
+
+unsigned long long int
+random_bitstring ()
+{
+ unsigned long long int x;
+ int n_bits;
+ long long ran;
+ int tot_bits = 0;
+
+ x = 0;
+ for (;;)
+ {
+ ran = simple_rand ();
+ n_bits = (ran >> 1) % 16;
+ tot_bits += n_bits;
+
+ if (n_bits == 0)
+ return x;
+ else
+ {
+ x <<= n_bits;
+ if (ran & 1)
+ x |= (1 << n_bits) - 1;
+
+ if (tot_bits > 8 * sizeof (long long) + 6)
+ return x;
+ }
+ }
+}
+
+#define ABS(x) ((x) >= 0 ? (x) : -(x))
+
+main ()
+{
+ long long int i;
+
+ for (i = 0; i < 10000; i++)
+ {
+ unsigned long long x, y;
+ x = random_bitstring ();
+ y = random_bitstring ();
+
+ if (sizeof (int) == sizeof (long long))
+ goto save_time;
+
+ { unsigned long long xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed long long xx = x, yy = y, r1, r2;
+ if ((unsigned long long) xx << 1 == 0 && yy == -1)
+ continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned long long) ABS (yy) || (signed long long) (r1 * yy + r2) != xx)
+ abort ();
+ }
+ save_time:
+ { unsigned int xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed int xx = x, yy = y, r1, r2;
+ if ((unsigned int) xx << 1 == 0 && yy == -1)
+ continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned int) ABS (yy) || (signed int) (r1 * yy + r2) != xx || ((xx < 0) != (r2 < 0) && r2))
+ abort ();
+ }
+ { unsigned short xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed short xx = x, yy = y, r1, r2;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned short) ABS (yy) || (signed short) (r1 * yy + r2) != xx)
+ abort ();
+ }
+ { unsigned char xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed char xx = x, yy = y, r1, r2;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned char) ABS (yy) || (signed char) (r1 * yy + r2) != xx)
+ abort ();
+ }
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/arith-rand.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,114 @@
+long
+simple_rand ()
+{
+ static unsigned long seed = 47114711;
+ unsigned long this = seed * 1103515245 + 12345;
+ seed = this;
+ return this >> 8;
+}
+
+unsigned long int
+random_bitstring ()
+{
+ unsigned long int x;
+ int n_bits;
+ long ran;
+ int tot_bits = 0;
+
+ x = 0;
+ for (;;)
+ {
+ ran = simple_rand ();
+ n_bits = (ran >> 1) % 16;
+ tot_bits += n_bits;
+
+ if (n_bits == 0)
+ return x;
+ else
+ {
+ x <<= n_bits;
+ if (ran & 1)
+ x |= (1 << n_bits) - 1;
+
+ if (tot_bits > 8 * sizeof (long) + 6)
+ return x;
+ }
+ }
+}
+
+#define ABS(x) ((x) >= 0 ? (x) : -(x))
+
+main ()
+{
+ long int i;
+
+ for (i = 0; i < 1000; i++)
+ {
+ unsigned long x, y;
+ x = random_bitstring ();
+ y = random_bitstring ();
+
+ if (sizeof (int) == sizeof (long))
+ goto save_time;
+
+ { unsigned long xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed long xx = x, yy = y, r1, r2;
+ if ((unsigned long) xx << 1 == 0 && yy == -1)
+ continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned long) ABS (yy) || (signed long) (r1 * yy + r2) != xx)
+ abort ();
+ }
+ save_time:
+ { unsigned int xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed int xx = x, yy = y, r1, r2;
+ if ((unsigned int) xx << 1 == 0 && yy == -1)
+ continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned int) ABS (yy) || (signed int) (r1 * yy + r2) != xx)
+ abort ();
+ }
+ { unsigned short xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed short xx = x, yy = y, r1, r2;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned short) ABS (yy) || (signed short) (r1 * yy + r2) != xx)
+ abort ();
+ }
+ { unsigned char xx = x, yy = y, r1, r2;
+ if (yy == 0) continue;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (r2 >= yy || r1 * yy + r2 != xx)
+ abort ();
+ }
+ { signed char xx = x, yy = y, r1, r2;
+ r1 = xx / yy;
+ r2 = xx % yy;
+ if (ABS (r2) >= (unsigned char) ABS (yy) || (signed char) (r1 * yy + r2) != xx)
+ abort ();
+ }
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashldi-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashldi-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashldi-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashldi-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,221 @@
+#include <limits.h>
+
+extern void abort(void);
+extern void exit(int);
+
+#if __LONG_LONG_MAX__ == 9223372036854775807LL
+#define BITS 64
+
+static unsigned long long const data[64] = {
+ 0x123456789abcdefULL,
+ 0x2468acf13579bdeULL,
+ 0x48d159e26af37bcULL,
+ 0x91a2b3c4d5e6f78ULL,
+ 0x123456789abcdef0ULL,
+ 0x2468acf13579bde0ULL,
+ 0x48d159e26af37bc0ULL,
+ 0x91a2b3c4d5e6f780ULL,
+ 0x23456789abcdef00ULL,
+ 0x468acf13579bde00ULL,
+ 0x8d159e26af37bc00ULL,
+ 0x1a2b3c4d5e6f7800ULL,
+ 0x3456789abcdef000ULL,
+ 0x68acf13579bde000ULL,
+ 0xd159e26af37bc000ULL,
+ 0xa2b3c4d5e6f78000ULL,
+ 0x456789abcdef0000ULL,
+ 0x8acf13579bde0000ULL,
+ 0x159e26af37bc0000ULL,
+ 0x2b3c4d5e6f780000ULL,
+ 0x56789abcdef00000ULL,
+ 0xacf13579bde00000ULL,
+ 0x59e26af37bc00000ULL,
+ 0xb3c4d5e6f7800000ULL,
+ 0x6789abcdef000000ULL,
+ 0xcf13579bde000000ULL,
+ 0x9e26af37bc000000ULL,
+ 0x3c4d5e6f78000000ULL,
+ 0x789abcdef0000000ULL,
+ 0xf13579bde0000000ULL,
+ 0xe26af37bc0000000ULL,
+ 0xc4d5e6f780000000ULL,
+ 0x89abcdef00000000ULL,
+ 0x13579bde00000000ULL,
+ 0x26af37bc00000000ULL,
+ 0x4d5e6f7800000000ULL,
+ 0x9abcdef000000000ULL,
+ 0x3579bde000000000ULL,
+ 0x6af37bc000000000ULL,
+ 0xd5e6f78000000000ULL,
+ 0xabcdef0000000000ULL,
+ 0x579bde0000000000ULL,
+ 0xaf37bc0000000000ULL,
+ 0x5e6f780000000000ULL,
+ 0xbcdef00000000000ULL,
+ 0x79bde00000000000ULL,
+ 0xf37bc00000000000ULL,
+ 0xe6f7800000000000ULL,
+ 0xcdef000000000000ULL,
+ 0x9bde000000000000ULL,
+ 0x37bc000000000000ULL,
+ 0x6f78000000000000ULL,
+ 0xdef0000000000000ULL,
+ 0xbde0000000000000ULL,
+ 0x7bc0000000000000ULL,
+ 0xf780000000000000ULL,
+ 0xef00000000000000ULL,
+ 0xde00000000000000ULL,
+ 0xbc00000000000000ULL,
+ 0x7800000000000000ULL,
+ 0xf000000000000000ULL,
+ 0xe000000000000000ULL,
+ 0xc000000000000000ULL,
+ 0x8000000000000000ULL
+};
+
+#elif __LONG_LONG_MAX__ == 2147483647LL
+#define BITS 32
+
+static unsigned long long const data[32] = {
+ 0x1234567fULL,
+ 0x2468acfeULL,
+ 0x48d159fcULL,
+ 0x91a2b3f8ULL,
+ 0x234567f0ULL,
+ 0x468acfe0ULL,
+ 0x8d159fc0ULL,
+ 0x1a2b3f80ULL,
+ 0x34567f00ULL,
+ 0x68acfe00ULL,
+ 0xd159fc00ULL,
+ 0xa2b3f800ULL,
+ 0x4567f000ULL,
+ 0x8acfe000ULL,
+ 0x159fc000ULL,
+ 0x2b3f8000ULL,
+ 0x567f0000ULL,
+ 0xacfe0000ULL,
+ 0x59fc0000ULL,
+ 0xb3f80000ULL,
+ 0x67f00000ULL,
+ 0xcfe00000ULL,
+ 0x9fc00000ULL,
+ 0x3f800000ULL,
+ 0x7f000000ULL,
+ 0xfe000000ULL,
+ 0xfc000000ULL,
+ 0xf8000000ULL,
+ 0xf0000000ULL,
+ 0xe0000000ULL,
+ 0xc0000000ULL,
+ 0x80000000ULL
+};
+
+#else
+#error "Update the test case."
+#endif
+
+static unsigned long long
+variable_shift(unsigned long long x, int i)
+{
+ return x << i;
+}
+
+static unsigned long long
+constant_shift(unsigned long long x, int i)
+{
+ switch (i)
+ {
+ case 0: x = x << 0; break;
+ case 1: x = x << 1; break;
+ case 2: x = x << 2; break;
+ case 3: x = x << 3; break;
+ case 4: x = x << 4; break;
+ case 5: x = x << 5; break;
+ case 6: x = x << 6; break;
+ case 7: x = x << 7; break;
+ case 8: x = x << 8; break;
+ case 9: x = x << 9; break;
+ case 10: x = x << 10; break;
+ case 11: x = x << 11; break;
+ case 12: x = x << 12; break;
+ case 13: x = x << 13; break;
+ case 14: x = x << 14; break;
+ case 15: x = x << 15; break;
+ case 16: x = x << 16; break;
+ case 17: x = x << 17; break;
+ case 18: x = x << 18; break;
+ case 19: x = x << 19; break;
+ case 20: x = x << 20; break;
+ case 21: x = x << 21; break;
+ case 22: x = x << 22; break;
+ case 23: x = x << 23; break;
+ case 24: x = x << 24; break;
+ case 25: x = x << 25; break;
+ case 26: x = x << 26; break;
+ case 27: x = x << 27; break;
+ case 28: x = x << 28; break;
+ case 29: x = x << 29; break;
+ case 30: x = x << 30; break;
+ case 31: x = x << 31; break;
+#if BITS > 32
+ case 32: x = x << 32; break;
+ case 33: x = x << 33; break;
+ case 34: x = x << 34; break;
+ case 35: x = x << 35; break;
+ case 36: x = x << 36; break;
+ case 37: x = x << 37; break;
+ case 38: x = x << 38; break;
+ case 39: x = x << 39; break;
+ case 40: x = x << 40; break;
+ case 41: x = x << 41; break;
+ case 42: x = x << 42; break;
+ case 43: x = x << 43; break;
+ case 44: x = x << 44; break;
+ case 45: x = x << 45; break;
+ case 46: x = x << 46; break;
+ case 47: x = x << 47; break;
+ case 48: x = x << 48; break;
+ case 49: x = x << 49; break;
+ case 50: x = x << 50; break;
+ case 51: x = x << 51; break;
+ case 52: x = x << 52; break;
+ case 53: x = x << 53; break;
+ case 54: x = x << 54; break;
+ case 55: x = x << 55; break;
+ case 56: x = x << 56; break;
+ case 57: x = x << 57; break;
+ case 58: x = x << 58; break;
+ case 59: x = x << 59; break;
+ case 60: x = x << 60; break;
+ case 61: x = x << 61; break;
+ case 62: x = x << 62; break;
+ case 63: x = x << 63; break;
+#endif
+
+ default:
+ abort ();
+ }
+ return x;
+}
+
+int
+main()
+{
+ int i;
+
+ for (i = 0; i < BITS; ++i)
+ {
+ unsigned long long y = variable_shift (data[0], i);
+ if (y != data[i])
+ abort ();
+ }
+ for (i = 0; i < BITS; ++i)
+ {
+ unsigned long long y = constant_shift (data[0], i);
+ if (y != data[i])
+ abort ();
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashrdi-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashrdi-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashrdi-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/ashrdi-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,335 @@
+#include <limits.h>
+
+extern void abort(void);
+extern void exit(int);
+
+#if __LONG_LONG_MAX__ == 9223372036854775807LL
+#define BITS 64
+
+static long long const zext[64] = {
+ 0x7654321fedcba980LL,
+ 0x3b2a190ff6e5d4c0LL,
+ 0x1d950c87fb72ea60LL,
+ 0xeca8643fdb97530LL,
+ 0x7654321fedcba98LL,
+ 0x3b2a190ff6e5d4cLL,
+ 0x1d950c87fb72ea6LL,
+ 0xeca8643fdb9753LL,
+ 0x7654321fedcba9LL,
+ 0x3b2a190ff6e5d4LL,
+ 0x1d950c87fb72eaLL,
+ 0xeca8643fdb975LL,
+ 0x7654321fedcbaLL,
+ 0x3b2a190ff6e5dLL,
+ 0x1d950c87fb72eLL,
+ 0xeca8643fdb97LL,
+ 0x7654321fedcbLL,
+ 0x3b2a190ff6e5LL,
+ 0x1d950c87fb72LL,
+ 0xeca8643fdb9LL,
+ 0x7654321fedcLL,
+ 0x3b2a190ff6eLL,
+ 0x1d950c87fb7LL,
+ 0xeca8643fdbLL,
+ 0x7654321fedLL,
+ 0x3b2a190ff6LL,
+ 0x1d950c87fbLL,
+ 0xeca8643fdLL,
+ 0x7654321feLL,
+ 0x3b2a190ffLL,
+ 0x1d950c87fLL,
+ 0xeca8643fLL,
+ 0x7654321fLL,
+ 0x3b2a190fLL,
+ 0x1d950c87LL,
+ 0xeca8643LL,
+ 0x7654321LL,
+ 0x3b2a190LL,
+ 0x1d950c8LL,
+ 0xeca864LL,
+ 0x765432LL,
+ 0x3b2a19LL,
+ 0x1d950cLL,
+ 0xeca86LL,
+ 0x76543LL,
+ 0x3b2a1LL,
+ 0x1d950LL,
+ 0xeca8LL,
+ 0x7654LL,
+ 0x3b2aLL,
+ 0x1d95LL,
+ 0xecaLL,
+ 0x765LL,
+ 0x3b2LL,
+ 0x1d9LL,
+ 0xecLL,
+ 0x76LL,
+ 0x3bLL,
+ 0x1dLL,
+ 0xeLL,
+ 0x7LL,
+ 0x3LL,
+ 0x1LL,
+ 0LL
+};
+
+static long long const sext[64] = {
+ 0x8edcba9f76543210LL,
+ 0xc76e5d4fbb2a1908LL,
+ 0xe3b72ea7dd950c84LL,
+ 0xf1db9753eeca8642LL,
+ 0xf8edcba9f7654321LL,
+ 0xfc76e5d4fbb2a190LL,
+ 0xfe3b72ea7dd950c8LL,
+ 0xff1db9753eeca864LL,
+ 0xff8edcba9f765432LL,
+ 0xffc76e5d4fbb2a19LL,
+ 0xffe3b72ea7dd950cLL,
+ 0xfff1db9753eeca86LL,
+ 0xfff8edcba9f76543LL,
+ 0xfffc76e5d4fbb2a1LL,
+ 0xfffe3b72ea7dd950LL,
+ 0xffff1db9753eeca8LL,
+ 0xffff8edcba9f7654LL,
+ 0xffffc76e5d4fbb2aLL,
+ 0xffffe3b72ea7dd95LL,
+ 0xfffff1db9753eecaLL,
+ 0xfffff8edcba9f765LL,
+ 0xfffffc76e5d4fbb2LL,
+ 0xfffffe3b72ea7dd9LL,
+ 0xffffff1db9753eecLL,
+ 0xffffff8edcba9f76LL,
+ 0xffffffc76e5d4fbbLL,
+ 0xffffffe3b72ea7ddLL,
+ 0xfffffff1db9753eeLL,
+ 0xfffffff8edcba9f7LL,
+ 0xfffffffc76e5d4fbLL,
+ 0xfffffffe3b72ea7dLL,
+ 0xffffffff1db9753eLL,
+ 0xffffffff8edcba9fLL,
+ 0xffffffffc76e5d4fLL,
+ 0xffffffffe3b72ea7LL,
+ 0xfffffffff1db9753LL,
+ 0xfffffffff8edcba9LL,
+ 0xfffffffffc76e5d4LL,
+ 0xfffffffffe3b72eaLL,
+ 0xffffffffff1db975LL,
+ 0xffffffffff8edcbaLL,
+ 0xffffffffffc76e5dLL,
+ 0xffffffffffe3b72eLL,
+ 0xfffffffffff1db97LL,
+ 0xfffffffffff8edcbLL,
+ 0xfffffffffffc76e5LL,
+ 0xfffffffffffe3b72LL,
+ 0xffffffffffff1db9LL,
+ 0xffffffffffff8edcLL,
+ 0xffffffffffffc76eLL,
+ 0xffffffffffffe3b7LL,
+ 0xfffffffffffff1dbLL,
+ 0xfffffffffffff8edLL,
+ 0xfffffffffffffc76LL,
+ 0xfffffffffffffe3bLL,
+ 0xffffffffffffff1dLL,
+ 0xffffffffffffff8eLL,
+ 0xffffffffffffffc7LL,
+ 0xffffffffffffffe3LL,
+ 0xfffffffffffffff1LL,
+ 0xfffffffffffffff8LL,
+ 0xfffffffffffffffcLL,
+ 0xfffffffffffffffeLL,
+ 0xffffffffffffffffLL
+};
+
+#elif __LONG_LONG_MAX__ == 2147483647LL
+#define BITS 32
+
+static long long const zext[32] = {
+ 0x76543218LL,
+ 0x3b2a190cLL,
+ 0x1d950c86LL,
+ 0xeca8643LL,
+ 0x7654321LL,
+ 0x3b2a190LL,
+ 0x1d950c8LL,
+ 0xeca864LL,
+ 0x765432LL,
+ 0x3b2a19LL,
+ 0x1d950cLL,
+ 0xeca86LL,
+ 0x76543LL,
+ 0x3b2a1LL,
+ 0x1d950LL,
+ 0xeca8LL,
+ 0x7654LL,
+ 0x3b2aLL,
+ 0x1d95LL,
+ 0xecaLL,
+ 0x765LL,
+ 0x3b2LL,
+ 0x1d9LL,
+ 0xecLL,
+ 0x76LL,
+ 0x3bLL,
+ 0x1dLL,
+ 0xeLL,
+ 0x7LL,
+ 0x3LL,
+ 0x1LL,
+ 0LL
+};
+
+static long long const sext[64] = {
+ 0x87654321LL,
+ 0xc3b2a190LL,
+ 0xe1d950c8LL,
+ 0xf0eca864LL,
+ 0xf8765432LL,
+ 0xfc3b2a19LL,
+ 0xfe1d950cLL,
+ 0xff0eca86LL,
+ 0xff876543LL,
+ 0xffc3b2a1LL,
+ 0xffe1d950LL,
+ 0xfff0eca8LL,
+ 0xfff87654LL,
+ 0xfffc3b2aLL,
+ 0xfffe1d95LL,
+ 0xffff0ecaLL,
+ 0xffff8765LL,
+ 0xffffc3b2LL,
+ 0xffffe1d9LL,
+ 0xfffff0ecLL,
+ 0xfffff876LL,
+ 0xfffffc3bLL,
+ 0xfffffe1dLL,
+ 0xffffff0eLL,
+ 0xffffff87LL,
+ 0xffffffc3LL,
+ 0xffffffe1LL,
+ 0xfffffff0LL,
+ 0xfffffff8LL,
+ 0xfffffffcLL,
+ 0xfffffffeLL,
+ 0xffffffffLL
+};
+
+#else
+#error "Update the test case."
+#endif
+
+static long long
+variable_shift(long long x, int i)
+{
+ return x >> i;
+}
+
+static long long
+constant_shift(long long x, int i)
+{
+ switch (i)
+ {
+ case 0: x = x >> 0; break;
+ case 1: x = x >> 1; break;
+ case 2: x = x >> 2; break;
+ case 3: x = x >> 3; break;
+ case 4: x = x >> 4; break;
+ case 5: x = x >> 5; break;
+ case 6: x = x >> 6; break;
+ case 7: x = x >> 7; break;
+ case 8: x = x >> 8; break;
+ case 9: x = x >> 9; break;
+ case 10: x = x >> 10; break;
+ case 11: x = x >> 11; break;
+ case 12: x = x >> 12; break;
+ case 13: x = x >> 13; break;
+ case 14: x = x >> 14; break;
+ case 15: x = x >> 15; break;
+ case 16: x = x >> 16; break;
+ case 17: x = x >> 17; break;
+ case 18: x = x >> 18; break;
+ case 19: x = x >> 19; break;
+ case 20: x = x >> 20; break;
+ case 21: x = x >> 21; break;
+ case 22: x = x >> 22; break;
+ case 23: x = x >> 23; break;
+ case 24: x = x >> 24; break;
+ case 25: x = x >> 25; break;
+ case 26: x = x >> 26; break;
+ case 27: x = x >> 27; break;
+ case 28: x = x >> 28; break;
+ case 29: x = x >> 29; break;
+ case 30: x = x >> 30; break;
+ case 31: x = x >> 31; break;
+#if BITS > 32
+ case 32: x = x >> 32; break;
+ case 33: x = x >> 33; break;
+ case 34: x = x >> 34; break;
+ case 35: x = x >> 35; break;
+ case 36: x = x >> 36; break;
+ case 37: x = x >> 37; break;
+ case 38: x = x >> 38; break;
+ case 39: x = x >> 39; break;
+ case 40: x = x >> 40; break;
+ case 41: x = x >> 41; break;
+ case 42: x = x >> 42; break;
+ case 43: x = x >> 43; break;
+ case 44: x = x >> 44; break;
+ case 45: x = x >> 45; break;
+ case 46: x = x >> 46; break;
+ case 47: x = x >> 47; break;
+ case 48: x = x >> 48; break;
+ case 49: x = x >> 49; break;
+ case 50: x = x >> 50; break;
+ case 51: x = x >> 51; break;
+ case 52: x = x >> 52; break;
+ case 53: x = x >> 53; break;
+ case 54: x = x >> 54; break;
+ case 55: x = x >> 55; break;
+ case 56: x = x >> 56; break;
+ case 57: x = x >> 57; break;
+ case 58: x = x >> 58; break;
+ case 59: x = x >> 59; break;
+ case 60: x = x >> 60; break;
+ case 61: x = x >> 61; break;
+ case 62: x = x >> 62; break;
+ case 63: x = x >> 63; break;
+#endif
+
+ default:
+ abort ();
+ }
+ return x;
+}
+
+int
+main()
+{
+ int i;
+
+ for (i = 0; i < BITS; ++i)
+ {
+ long long y = variable_shift (zext[0], i);
+ if (y != zext[i])
+ abort ();
+ }
+ for (i = 0; i < BITS; ++i)
+ {
+ long long y = variable_shift (sext[0], i);
+ if (y != sext[i])
+ abort ();
+ }
+ for (i = 0; i < BITS; ++i)
+ {
+ long long y = constant_shift (zext[0], i);
+ if (y != zext[i])
+ abort ();
+ }
+ for (i = 0; i < BITS; ++i)
+ {
+ long long y = constant_shift (sext[0], i);
+ if (y != sext[i])
+ abort ();
+ }
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bcp-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bcp-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bcp-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bcp-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,96 @@
+/* { dg-options "-fgnu89-inline" } */
+
+extern void abort (void);
+extern void exit (int);
+
+__attribute__ ((externally_visible)) int global;
+int func(void);
+
+/* These must fail. */
+int bad0(void) { return __builtin_constant_p(global); }
+int bad1(void) { return __builtin_constant_p(global++); }
+inline int bad2(int x) { return __builtin_constant_p(x++); }
+inline int bad3(int x) { return __builtin_constant_p(x); }
+inline int bad4(const char *x) { return __builtin_constant_p(x); }
+int bad5(void) { return bad2(1); }
+inline int bad6(int x) { return __builtin_constant_p(x+1); }
+int bad7(void) { return __builtin_constant_p(func()); }
+int bad8(void) { char buf[10]; return __builtin_constant_p(buf); }
+int bad9(const char *x) { return __builtin_constant_p(x[123456]); }
+int bad10(void) { return __builtin_constant_p(&global); }
+
+/* These must pass, or we've broken gcc2 functionality. */
+int good0(void) { return __builtin_constant_p(1); }
+int good1(void) { return __builtin_constant_p("hi"); }
+int good2(void) { return __builtin_constant_p((1234 + 45) & ~7); }
+
+/* These are extensions to gcc2. Failure indicates an optimization
+ regression. */
+int opt0(void) { return bad3(1); }
+int opt1(void) { return bad6(1); }
+int opt2(void) { return __builtin_constant_p("hi"[0]); }
+
+/*
+ * Opt3 is known to fail. It is one of the important cases that glibc
+ * was interested in though, so keep this around as a reminder.
+ *
+ * The solution is to add bits to recover bytes from constant pool
+ * elements given nothing but a constant pool label and an offset.
+ * When we can do that, and we can simplify strlen after the fact,
+ * then we can enable recognition of constant pool labels as constants.
+ */
+
+/* int opt3(void) { return bad4("hi"); } */
+
+
+/* Call through tables so -finline-functions can't screw with us. */
+int (* volatile bad_t0[])(void) = {
+ bad0, bad1, bad5, bad7, bad8, bad10
+};
+
+int (* volatile bad_t1[])(int x) = {
+ bad2, bad3, bad6
+};
+
+int (* volatile bad_t2[])(const char *x) = {
+ bad4, bad9
+};
+
+int (* volatile good_t0[])(void) = {
+ good0, good1, good2
+};
+
+int (* volatile opt_t0[])(void) = {
+ opt0, opt1, opt2 /* , opt3 */
+};
+
+#define N(arr) (sizeof(arr)/sizeof(*arr))
+
+int main()
+{
+ int i;
+
+ for (i = 0; i < N(bad_t0); ++i)
+ if ((*bad_t0[i])())
+ abort();
+
+ for (i = 0; i < N(bad_t1); ++i)
+ if ((*bad_t1[i])(1))
+ abort();
+
+ for (i = 0; i < N(bad_t2); ++i)
+ if ((*bad_t2[i])("hi"))
+ abort();
+
+ for (i = 0; i < N(good_t0); ++i)
+ if (! (*good_t0[i])())
+ abort();
+
+#ifdef __OPTIMIZE__
+ for (i = 0; i < N(opt_t0); ++i)
+ if (! (*opt_t0[i])())
+ abort();
+#endif
+
+ exit(0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-layout-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-layout-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-layout-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-layout-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,9 @@
+struct { long f8:8; long f24:24; } a;
+struct { long f32:32; } b;
+
+main ()
+{
+ if (sizeof (a) != sizeof (b))
+ abort ();
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-pack-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-pack-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-pack-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-pack-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,23 @@
+struct foo
+{
+ unsigned half:16;
+ unsigned long whole:32 __attribute__ ((packed));
+};
+
+f (struct foo *q)
+{
+ if (q->half != 0x1234)
+ abort ();
+ if (q->whole != 0x56789abcL)
+ abort ();
+}
+
+main ()
+{
+ struct foo bar;
+
+ bar.half = 0x1234;
+ bar.whole = 0x56789abcL;
+ f (&bar);
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-1.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-1.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-1.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-1.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,18 @@
+main ()
+{
+ struct {
+ signed int s:3;
+ unsigned int u:3;
+ int i:3;
+ } x = {-1, -1, -1};
+
+ if (x.u != 7)
+ abort ();
+ if (x.s != - 1)
+ abort ();
+
+ if (x.i != -1 && x.i != 7)
+ abort ();
+
+ exit (0);
+}
Added: test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-2.c?rev=374156&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-2.c (added)
+++ test-suite/trunk/SingleSource/Regression/C/gcc-c-torture/execute/bf-sign-2.c Wed Oct 9 04:01:46 2019
@@ -0,0 +1,66 @@
+/*
+ This test checks promotion of bitfields. Bitfields should be promoted
+ very much like chars and shorts:
+
+ Bitfields (signed or unsigned) should be promoted to signed int if their
+ value will fit in a signed int, otherwise to an unsigned int if their
+ value will fit in an unsigned int, otherwise we don't promote them (ANSI/ISO
+ does not specify the behavior of bitfields larger than an unsigned int).
+
+ We test the behavior by subtracting two from the promoted value: this will
+ result in a negitive value for signed types, a positive value for unsigned
+ types. This test (of course) assumes that the compiler is correctly
+ implementing signed and unsigned arithmetic.
+ */
+
+struct X {
+ unsigned int u3:3;
+ signed long int s31:31;
+ signed long int s32:32;
+ unsigned long int u31:31;
+ unsigned long int u32:32;
+ unsigned long long ull3 :3;
+ unsigned long long ull35:35;
+ unsigned u15:15;
+};
+
+struct X x;
+
+main ()
+{
+ if ((x.u3 - 2) >= 0) /* promoted value should be signed */
+ abort ();
+
+ if ((x.s31 - 2) >= 0) /* promoted value should be signed */
+ abort ();
+
+ if ((x.s32 - 2) >= 0) /* promoted value should be signed */
+ abort ();
+
+ if ((x.u15 - 2) >= 0) /* promoted value should be signed */
+ abort ();
+
+ /* Conditionalize check on whether integers are 4 bytes or larger, i.e.
+ larger than a 31 bit bitfield. */
+ if (sizeof (int) >= 4)
+ {
+ if ((x.u31 - 2) >= 0) /* promoted value should be signed */
+ abort ();
+ }
+ else
+ {
+ if ((x.u31 - 2) < 0) /* promoted value should be UNsigned */
+ abort ();
+ }
+
+ if ((x.u32 - 2) < 0) /* promoted value should be UNsigned */
+ abort ();
+
+ if ((x.ull3 - 2) >= 0) /* promoted value should be signed */
+ abort ();
+
+ if ((x.ull35 - 2) < 0) /* promoted value should be UNsigned */
+ abort ();
+
+ exit (0);
+}
More information about the llvm-commits
mailing list