aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2005-02-17 22:42:30 +0000
committerMichael Matz <matz@suse.de>2005-02-17 22:42:30 +0000
commit0d3a67f04018da2a0fae4b4a2d7742f317e3b942 (patch)
tree3da4b8381a55ebf9e11370ab77cb825ab3bf7321
parentdf58966e0bc37b0ade78c4866e9c9f58ea8d385e (diff)
Merge to HEAD at tree-cleanup-merge-20041024 .new-regalloc-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/new-regalloc-branch@95203 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ext/attrib5.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/cond.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/crash4.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/overload21.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/redecl1.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/report.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/rfg10.C5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template18.C18
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template30.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template37.C40
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk2.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/arm12.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/ctors5.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/cvt20.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/enum8.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/init10.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/init8.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/profile1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/visibility17.C16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/visibility28.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/visibility7.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.martin/new1.C16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/misc13.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/net36.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/net8.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/ns8.C9
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p10148.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p646.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p700.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p701.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p7325.C56
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p811.C14
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/alias5.C19
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/koenig5.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/new1.C34
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/template13.C17
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/access11.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/array3.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash25.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash32.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/decl3.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/dtor3.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/dtor4.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/enum2.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/linkage1.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/main1.C11
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/qual1.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/sizeof3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/store-expr1.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/virtual1.C13
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/warn7.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/asm1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash11.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash36.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ctor2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/defarg8.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit71.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit83.C35
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/friend44.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/lookup10.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp27.C25
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec22.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec9.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/static11.C9
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/static3.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ttp52.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb103.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb118.C40
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb121.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb125.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb22.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb58.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb63.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb8.C4
-rw-r--r--gcc/testsuite/g77.dg/12632.f0
-rw-r--r--gcc/testsuite/g77.dg/20010216-1.f51
-rw-r--r--gcc/testsuite/g77.dg/7388.f12
-rw-r--r--gcc/testsuite/g77.dg/bprob/bprob.exp5
-rw-r--r--gcc/testsuite/g77.dg/bprob/g77-bprob-1.f330
-rw-r--r--gcc/testsuite/g77.dg/dg.exp36
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-apostrophe-out.f21
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-colon-out.f9
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-h-out.f14
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-i-in.f22
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-i-out.f26
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-s-out.f20
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-slash-out.f9
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-t-in.f31
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-t-out.f12
-rw-r--r--gcc/testsuite/g77.dg/f77-edit-x-out.f12
-rw-r--r--gcc/testsuite/g77.dg/fbackslash.f7
-rw-r--r--gcc/testsuite/g77.dg/fcase-preserve.f9
-rw-r--r--gcc/testsuite/g77.dg/ff90-1.f15
-rw-r--r--gcc/testsuite/g77.dg/ffixed-form-1.f6
-rw-r--r--gcc/testsuite/g77.dg/ffixed-form-2.f12
-rw-r--r--gcc/testsuite/g77.dg/ffixed-line-length-0.f7
-rw-r--r--gcc/testsuite/g77.dg/ffixed-line-length-132.f7
-rw-r--r--gcc/testsuite/g77.dg/ffixed-line-length-7.f8
-rw-r--r--gcc/testsuite/g77.dg/ffixed-line-length-72.f7
-rw-r--r--gcc/testsuite/g77.dg/ffixed-line-length-none.f7
-rw-r--r--gcc/testsuite/g77.dg/ffree-form-1.f6
-rw-r--r--gcc/testsuite/g77.dg/ffree-form-2.f11
-rw-r--r--gcc/testsuite/g77.dg/ffree-form-3.f20
-rw-r--r--gcc/testsuite/g77.dg/fno-backslash.f7
-rw-r--r--gcc/testsuite/g77.dg/fno-f90-1.f15
-rw-r--r--gcc/testsuite/g77.dg/fno-fixed-form-1.f6
-rw-r--r--gcc/testsuite/g77.dg/fno-onetrip.f9
-rw-r--r--gcc/testsuite/g77.dg/fno-typeless-boz.f10
-rw-r--r--gcc/testsuite/g77.dg/fno-underscoring.f8
-rw-r--r--gcc/testsuite/g77.dg/fno-vxt-1.f10
-rw-r--r--gcc/testsuite/g77.dg/fonetrip.f10
-rw-r--r--gcc/testsuite/g77.dg/ftypeless-boz.f10
-rw-r--r--gcc/testsuite/g77.dg/fugly-assumed.f9
-rw-r--r--gcc/testsuite/g77.dg/funderscoring.f8
-rw-r--r--gcc/testsuite/g77.dg/fvxt-1.f10
-rw-r--r--gcc/testsuite/g77.dg/gcov/gcov-1.f419
-rw-r--r--gcc/testsuite/g77.dg/gcov/gcov.exp44
-rw-r--r--gcc/testsuite/g77.dg/pr3743-1.f7
-rw-r--r--gcc/testsuite/g77.dg/pr3743-2.f8
-rw-r--r--gcc/testsuite/g77.dg/pr3743-3.f8
-rw-r--r--gcc/testsuite/g77.dg/pr3743-4.f8
-rw-r--r--gcc/testsuite/g77.dg/pr5473.f15
-rw-r--r--gcc/testsuite/g77.dg/pr9258.f18
-rw-r--r--gcc/testsuite/g77.dg/strlen0.f95
-rw-r--r--gcc/testsuite/g77.f-torture/compile/12002.f5
-rw-r--r--gcc/testsuite/g77.f-torture/compile/13060.f0
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990218-0.f13
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990305-0.f55
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990419-0.f7
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990502-0.f66
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990502-1.f6
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990525-0.f50
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990826-1.f286
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990826-3.f320
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990905-0.f7
-rw-r--r--gcc/testsuite/g77.f-torture/compile/19990905-2.f22
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000412-1.f5
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000511-1.f21
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000511-2.f61
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000518.f16
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000601-1.f28
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000601-2.f27
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000629-1.f11
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000630-2.f9
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20010115.f9
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20010321-1.f8
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20010426.f6
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20010519-1.f1326
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20020307-1.f21
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20030115-1.c14
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20030326-1.f14
-rw-r--r--gcc/testsuite/g77.f-torture/compile/8485.f8
-rw-r--r--gcc/testsuite/g77.f-torture/compile/960317-1.f103
-rw-r--r--gcc/testsuite/g77.f-torture/compile/970125-0.f40
-rw-r--r--gcc/testsuite/g77.f-torture/compile/970915-0.f20
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980310-1.f28
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980310-2.f43
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980310-3.f259
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980310-4.f348
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980310-6.f21
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980310-7.f50
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980310-8.f39
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980419-2.f48
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980424-0.f6
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980427-0.f8
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980519-2.f47
-rw-r--r--gcc/testsuite/g77.f-torture/compile/980729-0.f5
-rw-r--r--gcc/testsuite/g77.f-torture/compile/981117-1.f23
-rw-r--r--gcc/testsuite/g77.f-torture/compile/990115-1.f8
-rw-r--r--gcc/testsuite/g77.f-torture/compile/alpha1.f10
-rw-r--r--gcc/testsuite/g77.f-torture/compile/alpha1.x11
-rw-r--r--gcc/testsuite/g77.f-torture/compile/compile.exp44
-rw-r--r--gcc/testsuite/g77.f-torture/compile/cpp.F9
-rw-r--r--gcc/testsuite/g77.f-torture/compile/cpp2.F7
-rw-r--r--gcc/testsuite/g77.f-torture/compile/toon_1.f3
-rw-r--r--gcc/testsuite/g77.f-torture/compile/xformat.f3
-rw-r--r--gcc/testsuite/g77.f-torture/execute/10197.f15
-rw-r--r--gcc/testsuite/g77.f-torture/execute/10197.x0
-rw-r--r--gcc/testsuite/g77.f-torture/execute/13037.f0
-rw-r--r--gcc/testsuite/g77.f-torture/execute/1832.f8
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19981119-0.f40
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990313-0.f33
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990313-1.f7
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990313-2.f7
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990313-3.f7
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990325-0.f313
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990325-1.f313
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990419-1.f21
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990826-0.f19
-rw-r--r--gcc/testsuite/g77.f-torture/execute/19990826-2.f33
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20000503-1.f24
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20001111.f12
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20001201.f12
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20001201.x3
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20010116.f38
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20010426.f2
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20010430.f20
-rw-r--r--gcc/testsuite/g77.f-torture/execute/20010610.f4
-rw-r--r--gcc/testsuite/g77.f-torture/execute/5122.f8
-rw-r--r--gcc/testsuite/g77.f-torture/execute/6177.f14
-rw-r--r--gcc/testsuite/g77.f-torture/execute/6367.f16
-rw-r--r--gcc/testsuite/g77.f-torture/execute/6367.x3
-rw-r--r--gcc/testsuite/g77.f-torture/execute/947.f12
-rw-r--r--gcc/testsuite/g77.f-torture/execute/970625-2.f84
-rw-r--r--gcc/testsuite/g77.f-torture/execute/970816-3.f20
-rw-r--r--gcc/testsuite/g77.f-torture/execute/971102-1.f11
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980520-1.f6
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-0.f61
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-1.f62
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-10.f57
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-2.f55
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-3.f56
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-4.f27
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-4.x11
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-5.f27
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-5.x11
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-6.f26
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-6.x11
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-7.f62
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-8.f63
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980628-9.f56
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980701-0.f72
-rw-r--r--gcc/testsuite/g77.f-torture/execute/980701-1.f72
-rw-r--r--gcc/testsuite/g77.f-torture/execute/alpha2.f19
-rw-r--r--gcc/testsuite/g77.f-torture/execute/alpha2.x11
-rw-r--r--gcc/testsuite/g77.f-torture/execute/auto0.f80
-rw-r--r--gcc/testsuite/g77.f-torture/execute/auto0.x11
-rw-r--r--gcc/testsuite/g77.f-torture/execute/auto1.f88
-rw-r--r--gcc/testsuite/g77.f-torture/execute/auto1.x11
-rw-r--r--gcc/testsuite/g77.f-torture/execute/cabs.f14
-rw-r--r--gcc/testsuite/g77.f-torture/execute/claus.f13
-rw-r--r--gcc/testsuite/g77.f-torture/execute/complex_1.f18
-rw-r--r--gcc/testsuite/g77.f-torture/execute/cpp.F5
-rw-r--r--gcc/testsuite/g77.f-torture/execute/cpp2.F7
-rw-r--r--gcc/testsuite/g77.f-torture/execute/dcomplex.f18
-rw-r--r--gcc/testsuite/g77.f-torture/execute/dnrm2.f74
-rw-r--r--gcc/testsuite/g77.f-torture/execute/erfc.f38
-rw-r--r--gcc/testsuite/g77.f-torture/execute/execute.exp52
-rw-r--r--gcc/testsuite/g77.f-torture/execute/exp.f3
-rw-r--r--gcc/testsuite/g77.f-torture/execute/f90-intrinsic-bit.f458
-rw-r--r--gcc/testsuite/g77.f-torture/execute/f90-intrinsic-mathematical.f137
-rw-r--r--gcc/testsuite/g77.f-torture/execute/f90-intrinsic-numeric.f282
-rw-r--r--gcc/testsuite/g77.f-torture/execute/int8421.f20
-rw-r--r--gcc/testsuite/g77.f-torture/execute/intrinsic-f2c-z.f94
-rw-r--r--gcc/testsuite/g77.f-torture/execute/intrinsic-unix-bessel.f108
-rw-r--r--gcc/testsuite/g77.f-torture/execute/intrinsic-unix-erf.f60
-rw-r--r--gcc/testsuite/g77.f-torture/execute/intrinsic-vax-cd.f94
-rw-r--r--gcc/testsuite/g77.f-torture/execute/intrinsic77.f586
-rw-r--r--gcc/testsuite/g77.f-torture/execute/io0.f46
-rw-r--r--gcc/testsuite/g77.f-torture/execute/io0.x3
-rw-r--r--gcc/testsuite/g77.f-torture/execute/io1.f10
-rw-r--r--gcc/testsuite/g77.f-torture/execute/io1.x3
-rw-r--r--gcc/testsuite/g77.f-torture/execute/labug1.f57
-rw-r--r--gcc/testsuite/g77.f-torture/execute/large_vec.f3
-rw-r--r--gcc/testsuite/g77.f-torture/execute/le.f29
-rw-r--r--gcc/testsuite/g77.f-torture/execute/select.f173
-rw-r--r--gcc/testsuite/g77.f-torture/execute/short.f57
-rw-r--r--gcc/testsuite/g77.f-torture/execute/u77-test.f421
-rw-r--r--gcc/testsuite/g77.f-torture/execute/u77-test.x3
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/19981216-0.f89
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/19990218-1.f13
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/19990826-4.f648
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/19990905-1.f8
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/9263.f7
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/970626-2.f4
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/980615-0.f10
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/980616-0.f8
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/check0.f11
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/noncompile.exp36
-rw-r--r--gcc/testsuite/g77.f-torture/noncompile/select_no_compile.f10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20000211-3.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20000518-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20001109-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20001109-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010516-1.c5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010518-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20020604-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20020910-1.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20021108-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20021123-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20021123-2.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20021123-3.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20021123-4.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20030405-1.c78
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/920625-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/920625-2.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/930217-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/930513-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/950922-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/961203-1.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/980506-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/981006-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/981022-1.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/981223-1.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/dll.x20
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr17529.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/simd-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/simd-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/simd-3.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/simd-4.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/simd-5.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/simd-6.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20000603-1.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20010605-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20020227-1.x4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20020720-1.x15
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20031003-1.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/920428-2.x6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/920501-7.x6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/920908-2.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/921204-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/930529-1.x23
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/930621-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/930630-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/931031-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/960416-1.x5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/980602-2.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/990208-1.x14
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/991216-3.c41
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/bitfld-1.x2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtin-abs-1.c160
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtin-abs-2.c156
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtin-complex-1.c175
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtin-constant.x11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtin-types-compatible-p.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/lib/strstr.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-1-lib.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-1.c87
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-2-lib.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-2.c36
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-3-lib.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-3.c36
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-4-lib.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-4.c86
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-5-lib.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-5.c90
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-6-lib.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-6.c34
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-7-lib.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-7.c169
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-8-lib.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-8.c41
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-9-lib.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-9.c79
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1-lib.c31
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1.c45
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2-lib.c76
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2.c47
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/compndlit-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/divconst-3.x5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/eeprof-1.x3
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/extzvsi.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-3.x2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4q.c0
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8.c64
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8q.c0
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/loop-2e.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/loop-2f.x9
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/loop-2g.x9
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/multi-ix.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/simd-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/simd-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/simd-4.x0
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/simd-5.x0
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/stdarg-2.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c78
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c54
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c66
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/strct-varg-1.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-1.c46
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-10.c85
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-11.c67
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-12.c67
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-13.c59
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-14.c42
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-15.c47
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-16.c85
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-2.c55
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-6.c54
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-7.c86
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-8.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/va-arg-24.c34
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/va-arg-25.x17
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/wchar_t-1.x3
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/call386.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/ext.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/subcc.c8
-rw-r--r--gcc/testsuite/gcc.dg/20000724-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20001012-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20001012-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/20001013-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/20001023-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20001101-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/20001102-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/20001108-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20001116-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/20001117-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20010202-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20010912-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20011008-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/20011119-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20011130-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20011214-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20020103-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20020118-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20020201-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/20020201-2.c30
-rw-r--r--gcc/testsuite/gcc.dg/20020201-4.c16
-rw-r--r--gcc/testsuite/gcc.dg/20020304-1.c37
-rw-r--r--gcc/testsuite/gcc.dg/20020312-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/20020426-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/20020503-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20020523-2.c21
-rw-r--r--gcc/testsuite/gcc.dg/20020531-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20021014-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/20021018-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20030123-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/20030213-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20030218-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/20030225-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20030331-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/20030612-1.c32
-rw-r--r--gcc/testsuite/gcc.dg/20030708-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20030926-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/20031202-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20040206-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/20040625-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20040813-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20040910-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/940409-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/980217-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/980226-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/991209-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/991214-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wold-style-definition-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/Wpadded.c4
-rw-r--r--gcc/testsuite/gcc.dg/Wreturn-type2.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wshadow-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wswitch-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/Wswitch-default.c16
-rw-r--r--gcc/testsuite/gcc.dg/Wswitch-enum.c26
-rw-r--r--gcc/testsuite/gcc.dg/Wswitch.c12
-rw-r--r--gcc/testsuite/gcc.dg/Wunreachable-6.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wunreachable-7.c3
-rw-r--r--gcc/testsuite/gcc.dg/alias-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/align-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/altivec-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/altivec-18.c7
-rw-r--r--gcc/testsuite/gcc.dg/altivec-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/altivec-3.c18
-rw-r--r--gcc/testsuite/gcc.dg/altivec-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/altivec-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/altivec-7.c41
-rw-r--r--gcc/testsuite/gcc.dg/altivec-8.c3
-rw-r--r--gcc/testsuite/gcc.dg/altivec-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/array-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/array-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/array-quals-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/asm-7.c4
-rw-r--r--gcc/testsuite/gcc.dg/asm-names.c17
-rw-r--r--gcc/testsuite/gcc.dg/asmreg-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/attr-noinline.c24
-rw-r--r--gcc/testsuite/gcc.dg/bf-spl1.c6
-rw-r--r--gcc/testsuite/gcc.dg/bitfld-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/bitfld-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/builtin-inf-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-prefetch-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtins-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/builtins-17.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtins-18.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtins-19.c3
-rw-r--r--gcc/testsuite/gcc.dg/builtins-2.c22
-rw-r--r--gcc/testsuite/gcc.dg/builtins-20.c16
-rw-r--r--gcc/testsuite/gcc.dg/builtins-21.c10
-rw-r--r--gcc/testsuite/gcc.dg/builtins-25.c188
-rw-r--r--gcc/testsuite/gcc.dg/builtins-34.c17
-rw-r--r--gcc/testsuite/gcc.dg/builtins-7.c10
-rw-r--r--gcc/testsuite/gcc.dg/builtins-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtins-config.h15
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/c90-init-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/c99-arraydecl-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/c99-flex-array-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/charset/asm2.c4
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-8.c5
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-9.c7
-rw-r--r--gcc/testsuite/gcc.dg/compat/compat-common.h15
-rw-r--r--gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/generate-random.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/mixed-struct-check.h9
-rw-r--r--gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h5
-rw-r--r--gcc/testsuite/gcc.dg/compat/mixed-struct-init.h9
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c15
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c11
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c17
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c12
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c11
-rw-r--r--gcc/testsuite/gcc.dg/compat/sdata-section.h4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-1.h2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-1_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-1_y.c2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-2.h2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-2_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-2_y.c8
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c12
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c9
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c12
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c9
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c59
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c34
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c59
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c34
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c59
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c34
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c8
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c7
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c8
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c7
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c23
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-10_x.c24
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-10_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-19_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-20_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-2_x.c15
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-2_y.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-3_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-1_x.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-1_y.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-2_x.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-2_y.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-check.h2
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-defs.h68
-rw-r--r--gcc/testsuite/gcc.dg/const-elim-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/19930510-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/assert4.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/charconst-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/charconst-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/if-mop.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/lexident.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/mi6.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/tr-paste.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/mi6.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/paste.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/strify.c1
-rw-r--r--gcc/testsuite/gcc.dg/darwin-abi-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/darwin-abi-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/debug/20020327-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/decl-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/deprecated.c56
-rw-r--r--gcc/testsuite/gcc.dg/dll-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/doloop-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/fastmath-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/attr-6.c1
-rw-r--r--gcc/testsuite/gcc.dg/format/branch-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/format/c90-strftime-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/c90-strftime-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/c99-strftime-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/cmn-err-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/format/diag-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/format/ext-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/format/ext-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/format.h29
-rw-r--r--gcc/testsuite/gcc.dg/format/multattr-3.c12
-rw-r--r--gcc/testsuite/gcc.dg/format/no-y2k-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/format/xopen-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/fshort-wchar.c2
-rw-r--r--gcc/testsuite/gcc.dg/funcdef-storage-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/funcorder.c6
-rw-r--r--gcc/testsuite/gcc.dg/i386-387-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/i386-387-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/i386-387-5.c5
-rw-r--r--gcc/testsuite/gcc.dg/i386-387-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/i386-asm-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/i386-bitfield1.c2
-rw-r--r--gcc/testsuite/gcc.dg/i386-bitfield2.c2
-rw-r--r--gcc/testsuite/gcc.dg/i386-cadd.c2
-rw-r--r--gcc/testsuite/gcc.dg/i386-fpcvt-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/i386-local.c3
-rw-r--r--gcc/testsuite/gcc.dg/i386-loop-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/i386-memset-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/i386-mmx-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c3
-rw-r--r--gcc/testsuite/gcc.dg/i386-regparm.c1
-rw-r--r--gcc/testsuite/gcc.dg/i386-sse-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/i386-sse-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/i386-sse-8.c4
-rw-r--r--gcc/testsuite/gcc.dg/ia64-asm-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/iftrap-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/inline-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/intermod-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/intmax_t-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/loop-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/loop-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/m-un-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/mips-args-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/mips-args-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/mips-movcc-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/mips-movcc-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/mips-movcc-3.c19
-rw-r--r--gcc/testsuite/gcc.dg/mips-nmadd-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/mips-nmadd-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/mips-rsqrt-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/mips-rsqrt-2.c5
-rw-r--r--gcc/testsuite/gcc.dg/nest.c9
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/20001228-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/20020213-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/20020220-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/920507-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/921102-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/971104-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/990416-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/incomplete-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/init-4.c3
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/label-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/redecl-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/scope.c2
-rw-r--r--gcc/testsuite/gcc.dg/noreturn-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/noreturn-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/noreturn-5.c3
-rw-r--r--gcc/testsuite/gcc.dg/old-style-asm-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/pack-test-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/pch/inline-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/pch/pch.exp15
-rw-r--r--gcc/testsuite/gcc.dg/pch/warn-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/postincr-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/ppc-fsel-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/ppc-ldstruct.c2
-rw-r--r--gcc/testsuite/gcc.dg/ppc-sdata-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/ppc64-abi-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/ppc64-abi-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/ppc64-abi-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr16286.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr17055-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/pragma-align-2.c14
-rw-r--r--gcc/testsuite/gcc.dg/pragma-align.c5
-rw-r--r--gcc/testsuite/gcc.dg/pragma-darwin.c2
-rw-r--r--gcc/testsuite/gcc.dg/pragma-re-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/qual-return-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/qual-return-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/redecl-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/return-type-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/return-type-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/sequence-pt-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/setjmp-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-3.c9
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-4.c9
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-6.c5
-rw-r--r--gcc/testsuite/gcc.dg/simd-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/sparc-ret.c9
-rw-r--r--gcc/testsuite/gcc.dg/special/gcsec-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/special/mips-abi.exp39
-rw-r--r--gcc/testsuite/gcc.dg/special/wkali-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/alias-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-attr-1.c98
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-explog-1.c62
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-math-1.c57
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-noret-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-power-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/mips-sdata-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040703-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/asm-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/asm-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-4.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-5.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/sra-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/ultrasp2.c5
-rw-r--r--gcc/testsuite/gcc.dg/ultrasp3.c3
-rw-r--r--gcc/testsuite/gcc.dg/ultrasp4.c5
-rw-r--r--gcc/testsuite/gcc.dg/ultrasp8.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-5.c7
-rw-r--r--gcc/testsuite/gcc.dg/uninit-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/uninit-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-C.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-H.c14
-rw-r--r--gcc/testsuite/gcc.dg/unused-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/va-arg-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr16105.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/tree-vect.h4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-1.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-10.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-11.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-12.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-13.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-14.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-15.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-16.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-17.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-18.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-19.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-20.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-21.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-22.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-23.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-24.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-25.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-26.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-27.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-27a.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-28.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-29.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-29a.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-3.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-30.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-31.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-32.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-33.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-34.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-35.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-36.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-37.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-38.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-4.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-40.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-41.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-42.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-43.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-44.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-45.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-46.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-47.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-48.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-48a.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-49.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-5.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-50.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-51.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-52.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-53.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-54.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-55.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-56.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-56a.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-57.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-58.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-59.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-6.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-60.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-61.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-62.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-63.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-64.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-65.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-66.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-67.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-68.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-69.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-7.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-72.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-72a.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-73.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-74.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-75.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-76.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-77.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-77a.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-78.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-79.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-8.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-80.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-82.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-82_64.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-83.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-83_64.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-9.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-all.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-none.c37
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect.exp63
-rw-r--r--gcc/testsuite/gcc.dg/visibility-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-a.c2
-rw-r--r--gcc/testsuite/gcc.dg/warn-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/wchar_t-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/wint_t-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/wtr-conversion-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/wtr-static-1.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/arm-isr.c3
-rw-r--r--gcc/testsuite/gcc.misc-tests/bprob-1.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/bprob-2.c3
-rw-r--r--gcc/testsuite/gcc.misc-tests/bprob.exp30
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-3.c3
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-4.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-4b.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-6.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-7.c3
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-prefetch.exp23
-rw-r--r--gcc/testsuite/gcc.misc-tests/linkage.exp5
-rw-r--r--gcc/testsuite/gfortran.dg/data_char_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/direct_io_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/entry_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/g77/20030326-1.f2
-rwxr-xr-xgcc/testsuite/gfortran.dg/g77/README2
-rw-r--r--gcc/testsuite/gfortran.dg/g77/select_no_compile.f0
-rw-r--r--gcc/testsuite/gfortran.dg/getenv_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr16597.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr17143.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr17164.f901
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_mod_ulo.f903
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/read_eof.f903
-rw-r--r--gcc/testsuite/lib/compat.exp129
-rw-r--r--gcc/testsuite/lib/f-torture.exp333
-rw-r--r--gcc/testsuite/lib/file-format.exp3
-rw-r--r--gcc/testsuite/lib/g++.exp52
-rw-r--r--gcc/testsuite/lib/g77-dg.exp46
-rw-r--r--gcc/testsuite/lib/g77.exp3
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp4
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp167
-rw-r--r--gcc/testsuite/lib/gcc.exp18
-rw-r--r--gcc/testsuite/lib/gfortran.exp38
-rw-r--r--gcc/testsuite/lib/mike-g77.exp262
-rw-r--r--gcc/testsuite/lib/objc.exp32
-rw-r--r--gcc/testsuite/lib/profopt.exp15
-rw-r--r--gcc/testsuite/lib/prune.exp11
-rw-r--r--gcc/testsuite/lib/scanasm.exp35
-rw-r--r--gcc/testsuite/lib/target-supports.exp234
-rw-r--r--gcc/testsuite/lib/treelang.exp257
-rw-r--r--gcc/testsuite/objc.dg/bitfield-2.m2
-rw-r--r--gcc/testsuite/objc.dg/bitfield-4.m5
-rw-r--r--gcc/testsuite/objc.dg/call-super-2.m43
-rw-r--r--gcc/testsuite/objc.dg/const-str-3.m2
-rw-r--r--gcc/testsuite/objc.dg/desig-init-1.m2
-rw-r--r--gcc/testsuite/objc.dg/encode-2.m15
-rw-r--r--gcc/testsuite/objc.dg/encode-3.m10
-rw-r--r--gcc/testsuite/objc.dg/encode-4.m2
-rw-r--r--gcc/testsuite/objc.dg/id-1.m7
-rw-r--r--gcc/testsuite/objc.dg/image-info.m2
-rw-r--r--gcc/testsuite/objc.dg/method-1.m6
-rw-r--r--gcc/testsuite/objc.dg/method-6.m2
-rw-r--r--gcc/testsuite/objc.dg/method-9.m2
-rw-r--r--gcc/testsuite/objc.dg/naming-1.m4
-rw-r--r--gcc/testsuite/objc.dg/nested-func-1.m1
-rw-r--r--gcc/testsuite/objc.dg/proto-lossage-4.m21
-rw-r--r--gcc/testsuite/objc.dg/proto-qual-1.m14
-rw-r--r--gcc/testsuite/objc.dg/selector-1.m2
-rw-r--r--gcc/testsuite/objc.dg/special/unclaimed-category-1.m2
-rw-r--r--gcc/testsuite/objc.dg/symtab-1.m2
-rw-r--r--gcc/testsuite/objc.dg/try-catch-1.m7
-rw-r--r--gcc/testsuite/objc.dg/try-catch-2.m10
-rw-r--r--gcc/testsuite/objc.dg/try-catch-3.m2
-rw-r--r--gcc/testsuite/objc.dg/try-catch-4.m2
-rw-r--r--gcc/testsuite/objc.dg/type-size-2.m2
-rw-r--r--gcc/testsuite/objc.dg/zero-link-2.m1
-rw-r--r--gcc/testsuite/objc/execute/_cmd.m2
-rw-r--r--gcc/testsuite/objc/execute/next_mapping.h52
-rw-r--r--gcc/testsuite/objc/execute/string1.m2
-rw-r--r--gcc/testsuite/objc/execute/string2.m2
-rw-r--r--gcc/testsuite/objc/execute/string3.m2
-rw-r--r--gcc/testsuite/objc/execute/string4.m2
-rw-r--r--gcc/testsuite/treelang/ChangeLog21
-rw-r--r--gcc/testsuite/treelang/a01gcci01.c1
926 files changed, 3571 insertions, 16694 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C b/gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C
index 84063834f1d..93d15d08d90 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/arrnew2.C
@@ -1,4 +1,8 @@
-// { dg-do assemble }
-// { dg-options "" }
+// { dg-do run { xfail *-*-* } }
+// { dg-options "-w -fpermissive" }
-int *foo = new int[1](0); // { dg-bogus "" }
+int *foo = new int[1](42); // { dg-bogus "" }
+int main ()
+{
+ return foo[0] != 42;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
index 7a77d6154d3..545f12803b0 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
@@ -1,5 +1,7 @@
-// { dg-do run { xfail alpha*-dec-osf* *-*-hms i?86-pc-cygwin *-*-coff hppa2*-hp-hpux11* } }
+// { dg-do run { xfail alpha*-dec-osf* *-*-hms i?86-pc-cygwin *-*-coff } }
// Test that attributes weak and alias coexist.
+// { dg-require-weak "" }
+// { dg-require-alias "" }
extern "C" {
void f () __attribute__((weak, alias ("_f")));
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cond.C b/gcc/testsuite/g++.old-deja/g++.jason/cond.C
index 0242088c6b1..b65924966b9 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/cond.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/cond.C
@@ -17,14 +17,14 @@ int main()
char j;
}
- while (int i = 0) // { dg-error "" "" { xfail *-*-* } }
+ while (int i = 0) // { dg-error "" }
{
- int i; // { dg-error "" "" { xfail *-*-* } }
+ int i; // { dg-error "" }
}
- for (; int i = 0; ) // { dg-error "" "" { xfail *-*-* } }
+ for (; int i = 0; ) // { dg-error "" }
{
- int i; // { dg-error "" "" { xfail *-*-* } }
+ int i; // { dg-error "" }
}
switch (int i = 0) // { dg-error "" "" { xfail *-*-* } }
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash4.C b/gcc/testsuite/g++.old-deja/g++.jason/crash4.C
index 70f054b6eaf..00ba0cc0644 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/crash4.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/crash4.C
@@ -16,8 +16,8 @@ public:
};
template <class T>
-const ccObjectInfo& cc_Array<T>::repInvariant(int) const
-{ return *this /* *this is required here */; } // { dg-error "" } redefined
+const ccObjectInfo& cc_Array<T>::repInvariant(int) const // { dg-error "previously declared" }
+{ return *this /* *this is required here */; }
template <class T>
class ccArray :public ccObjectInfo
@@ -32,7 +32,7 @@ class ccObjArray : public ccArray<T>
};
template <class T>
-const ccObjectInfo& cc_Array<T>::repInvariant(int) const
-{ return 0; } // { dg-error "" } causes compiler segfault
+const ccObjectInfo& cc_Array<T>::repInvariant(int) const // { dg-error "redefinition" }
+{ return 0; }
typedef ccObjArray< double> ccROIRuns;
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
index 52c3589d844..229be93da7c 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
@@ -1,13 +1,13 @@
// { dg-do assemble }
struct X {
- void f (int = 4, char = 'r'); // { dg-error "" }
- void g (int = 4, char = 'r'); // { dg-error "" }
+ void f (int = 4, char = 'r'); // { dg-error "previous specification" }
+ void g (int = 4, char = 'r'); // { dg-error "previous specification" }
};
void
-X::f (int i = 4, char x = 'r')
-{ } // { dg-error "" } duplicate default args
+X::f (int i = 4, char x = 'r') // { dg-error "default argument" }
+{ }
void
-X::g (int i = 9, char x = 's')
-{ } // { dg-error "" } duplicate default args
+X::g (int i = 9, char x = 's') // { dg-error "default argument" }
+{ }
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C b/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
index 0cc528a9307..6fda9d27ac9 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
@@ -3,11 +3,11 @@ class A
{
public:
A (const A& ccref);
- friend A const re (const A& v1); // { dg-error "" }
+ friend A const re (const A& v1); // { dg-error "ambiguates" }
};
A // const
-re (const A& ref)
-{ // { dg-error "" } mismatched decls
+re (const A& ref) // { dg-error "new declaration" }
+{
return A (ref);
}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/report.C b/gcc/testsuite/g++.old-deja/g++.jason/report.C
index fad87fcd024..c1b9a57bbb0 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/report.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/report.C
@@ -47,16 +47,16 @@ class X{
typedef int const * bart ();
//The following is DR295 dependant
-typedef bart const * const * bar2; // { dg-error "" } constifying qualifiers
-typedef bart volatile * const * bar2v; // { dg-error "" } qualifiers
+typedef bart const * const * bar2;
+typedef bart volatile * const * bar2v;
-bar2 baz (X::Y y)
-{ // { dg-error "" } in this context
+bar2 baz (X::Y y) // { dg-error "" } in this context
+{
X::Y f; // { dg-error "" } in this context
bar2 wa [5];
wa[0] = baz(f);
undef2 (1); // { dg-error "" } implicit declaration
-}
+} // { dg-warning "" } no return
int ninny ()
{
@@ -71,4 +71,4 @@ int ninny ()
int darg (char X::*p)
{
undef3 (1); // { dg-error "" } implicit declaration
-}
+} // { dg-warning "" } no return
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C
index e53baf6b92e..f6d5af3a8b8 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C
@@ -6,5 +6,6 @@
enum COLOR
{
red,
- green = ULONG_MAX, blue
-}; // { dg-error "" } enum overflow
+ green = ULONG_MAX,
+ blue // { dg-error "overflow in enumeration" }
+};
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template18.C b/gcc/testsuite/g++.old-deja/g++.jason/template18.C
deleted file mode 100644
index bf293ed2b86..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.jason/template18.C
+++ /dev/null
@@ -1,18 +0,0 @@
-// { dg-do link }
-// { dg-options "-g -fno-inline -Wno-deprecated -fexternal-templates" }
-// GROUPS passed templates
-// Bug: g++ emits template instances when it shouldn't.
-// Suppressed-instantiation tests like this are known to break on
-// Cygwin, because of the MULTIPLE_SYMBOL_SPACES stuff. This is OK.
-
-
-#pragma implementation "irrelevant_file"
-#line 1 "template18.h"
-#pragma interface
-template <class T> inline T min (T a, T b) { return a<b?a:b; }
-#line 13 "template18.C"
-
-main()
-{
- min (1, 1); // { dg-error "" "" { target *-*-* } 0 } should produce an undefined symbol error.
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template30.C b/gcc/testsuite/g++.old-deja/g++.jason/template30.C
index 4eca03df4d4..370bb18a561 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/template30.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template30.C
@@ -3,8 +3,8 @@ template <class T, class U>
int func(U, T); // { dg-error "" } ref below
template <class T, class U>
-int func(T, U)
-{ // { dg-error "" } ref below
+int func(T, U) // { dg-error "" } ref below
+{
return 2;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template37.C b/gcc/testsuite/g++.old-deja/g++.jason/template37.C
deleted file mode 100644
index 23309a46b68..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.jason/template37.C
+++ /dev/null
@@ -1,40 +0,0 @@
-// { dg-do run }
-// { dg-options "-Wno-deprecated -fexternal-templates" }
-// { dg-warning "switch.*deprecated" "" { target *-*-* } 0 }
-
-// PRMS Id: 9930
-// Test of -fexternal-templates hackery in new template code
-
- #pragma implementation "foo.hh"
- #pragma interface "foo.hh"
-
- template<class T>
- class ONE
- {
- public:
- static void func();
- };
-
- template<class T>
- void ONE<T>::func()
- {
- }
-
- template <>
- class ONE<int>
- {
- public:
- static void func();
- };
-
- void ONE<int>::func()
- {
- }
-
-int main()
- {
- ONE<char>::func();
- ONE<int>::func();
-
- return 0;
- }
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
index a52ec2e865e..5694fa1b270 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
@@ -1,5 +1,6 @@
-// { dg-do run { xfail m68k-motorola-sysv m88k-motorola-sysv3 } }
+// { dg-do run }
// { dg-options "-fPIC" }
+// { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 }
// Test that non-variadic function calls using thunks and PIC work right.
struct A {
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
index 9a4cffcdc56..8b8104969a3 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
@@ -1,4 +1,4 @@
-// { dg-do run { xfail mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3 mn10300-*-* mn10200-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-* } }
+// { dg-do run { xfail mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-* } }
// Test that variadic function calls using thunks work right.
// Note that this will break on any target that uses the generic thunk
// support, because it doesn't support variadic functions.
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm12.C b/gcc/testsuite/g++.old-deja/g++.law/arm12.C
index b098c22d58a..c0332d36733 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arm12.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arm12.C
@@ -22,8 +22,8 @@ public:
Y();
};
-X::X()
-{// { dg-error "" } .*
+X::X() // { dg-error "is private" }
+{
std::cout << "X::X()" << std::endl;
}
@@ -32,8 +32,8 @@ void X::f()
std::cout << "X::f()" << std::endl;
}
-Y::Y()
-{// { dg-error "" } within this
+Y::Y() // { dg-error "within this context" }
+{
std::cout << "Y::Y()" << std::endl;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C
index 7078013fe77..d08805a36aa 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C
@@ -5,7 +5,7 @@
// Date: Tue, 1 Sep 92 10:38:44 EDT
class X
-{ // { dg-error "" } candidate
+{ // { dg-error "X::X" } implicit constructor
private:
int x;
public:
@@ -20,14 +20,14 @@ class Y
public:
Y();
}
-X::X( int xi )
-{// { dg-error "" } return.*
+X::X( int xi ) // { dg-error "return type|X::X" }
+{
x = xi;
}
const X X::x0( 0 );
-Y::Y()
-{// { dg-error "" } no mat
+Y::Y() // { dg-error "no match" }
+{
xx = X::x0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/cvt20.C b/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
index 9235fb5b0ea..5d699d7f857 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
@@ -9,12 +9,12 @@
// Compiles fine with Sun CC 2.1
-void f(char *& x)
-{// { dg-error "" } location of error
+void f(char *& x) // { dg-error "passing argument" }
+{
x++;
}
int main()
{
- f ("foo");// { dg-error "" } init of non-const ref from char*
+ f ("foo"); // { dg-error "invalid initialization" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/enum8.C b/gcc/testsuite/g++.old-deja/g++.law/enum8.C
deleted file mode 100644
index e18284458eb..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.law/enum8.C
+++ /dev/null
@@ -1,4 +0,0 @@
-// { dg-do assemble }
-// { dg-options "-fshort-enums" }
-// GROUPS passed enums
- enum E { A = 0x80000000 };
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init10.C b/gcc/testsuite/g++.old-deja/g++.law/init10.C
index 4298bb99017..4d567fecf7d 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/init10.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/init10.C
@@ -20,7 +20,7 @@ public:
b();
};
-b::b() : three(this)
-{ // { dg-error "" } bad array initializer
+b::b() : three(this) // { dg-error "bad array initializer" }
+{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init8.C b/gcc/testsuite/g++.old-deja/g++.law/init8.C
index 0ccf4512ee0..ba8dde2e8be 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/init8.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/init8.C
@@ -8,15 +8,15 @@
const int ic = 1;
-void f(int& arg)
-{ // { dg-error "" } argument 1
+void f(int& arg) // { dg-error "passing argument 1" }
+{
if (arg) ;
}
const int& icr = ic;
int main(void)
{
- f(icr); // g++ does not give error here// { dg-error "" } .*
+ f(icr); // { dg-error "invalid initialization" }
return 0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/profile1.C b/gcc/testsuite/g++.old-deja/g++.law/profile1.C
index 24a79b438a6..56c52d1ef9a 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/profile1.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/profile1.C
@@ -1,6 +1,8 @@
-// { dg-do run { xfail m68k-motorola-sysv m88k-motorola-sysv3 mips*-*-* i[3456]86-*-sco3.2v5* } }
+// { dg-do run { xfail i[3456]86-*-sco3.2v5* } }
+// { dg-require-profiling "-pg" }
// { dg-options "-pg" }
// { dg-options "-pg -static" { target hppa*-*-hpux* } }
+// { dg-bogus "\[Uu\]nresolved symbol ._mcount" "Profiling unsupported" { xfail *-*-netware* } 0 }
// GROUPS passed profiling
#include <stdio.h>
main()
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C b/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
index 0afb04b184e..67ef8927a63 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
@@ -31,24 +31,24 @@ private:
int num_;
};
-Base::Base()
-{ // { dg-error "" } private
+Base::Base() // { dg-error "is private" }
+{
name_ = std::strcpy(new char[std::strlen(" ") + 1], " ");
}
-Base::Base(char* str)
-{ // { dg-error "" } private
+Base::Base(char* str) // { dg-error "is private" }
+{
if(str != NULL)
name_ = std::strcpy(new char[std::strlen(str) + 1], str);
}
-Derived::Derived(int n, char* str) : Base(str)
-{// { dg-error "" } .*
+Derived::Derived(int n, char* str) : Base(str) // { dg-error "within this context" }
+{
num_ = n;
}
-Derived::Derived(int n) : Base()
-{// { dg-error "" } .*
+Derived::Derived(int n) : Base() // { dg-error "within this context" }
+{
num_ = n;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility28.C b/gcc/testsuite/g++.old-deja/g++.law/visibility28.C
index b1458e5955a..a7141ae5ea7 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility28.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility28.C
@@ -11,7 +11,7 @@ public:
class D : public B {
public:
virtual ~D() { printf( "D::~D\n"); }
- void operator = ( int i) { this->~B(); }// { dg-error "" } D has no ~B part to it
+ void operator = ( int i) { this->~B(); }
};
int
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility7.C b/gcc/testsuite/g++.old-deja/g++.law/visibility7.C
index f271fbc768b..ed37f5f8d2b 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility7.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility7.C
@@ -15,10 +15,10 @@ class A {
{}
virtual ~A()
{}
- virtual void Number(int c)
- { number = c; } // { dg-error "" } private
- virtual int Number()
- { return number; } // { dg-error "" } private
+ virtual void Number(int c) // { dg-error "inaccessible" }
+ { number = c; }
+ virtual int Number() // { dg-error "inaccessible" }
+ { return number; }
};
class B : private A {
@@ -53,9 +53,9 @@ class C {
// and they should not be able to do so
//
virtual void setBValue(int i)
- { if (bobject) bobject->Number(i); }// { dg-error "" } .*
+ { if (bobject) bobject->Number(i); } // { dg-error "this context|accessible base" }
virtual int getBValue()
- { if (bobject) { return bobject->Number(); } return 0; }// { dg-error "" } .*
+ { if (bobject) { return bobject->Number(); } return 0; } // { dg-error "this context|accessible base" }
};
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/new1.C b/gcc/testsuite/g++.old-deja/g++.martin/new1.C
index c7951654c26..502c4f42ad0 100644
--- a/gcc/testsuite/g++.old-deja/g++.martin/new1.C
+++ b/gcc/testsuite/g++.old-deja/g++.martin/new1.C
@@ -71,8 +71,8 @@ void test1()
func(new B(A(10).addr()));
}catch(int){
}
- CHECK(new_done==1);
- CHECK(ctor_done==2);
+ CHECK(ctor_done==1);
+ CHECK(new_done==2);
CHECK(func_done==3);
CHECK(dtor_done==4);
CHECK(delete_done==0);
@@ -86,10 +86,10 @@ void test2()
func(new B(A(10).addr()));
}catch(int){
}
- CHECK(new_done==1);
- CHECK(ctor_done==0);
+ CHECK(ctor_done==1);
+ CHECK(new_done==2);
CHECK(func_done==0);
- CHECK(dtor_done==0);
+ CHECK(dtor_done==3);
CHECK(delete_done==0);
}
@@ -101,11 +101,11 @@ void test3()
func(new B(A(10).addr()));
}catch(int){
}
- CHECK(new_done==1);
- CHECK(ctor_done==2);
+ CHECK(new_done==0);
+ CHECK(ctor_done==1);
CHECK(func_done==0);
CHECK(dtor_done==0);
- CHECK(delete_done==3);
+ CHECK(delete_done==0);
}
int main()
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/misc13.C b/gcc/testsuite/g++.old-deja/g++.mike/misc13.C
index d21a9164132..f85a4f408f6 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/misc13.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/misc13.C
@@ -1,7 +1,7 @@
// { dg-do run }
// GROUPS passed vtable
extern "C" int printf (const char *, ...);
-enum { vf_request, vf_event } want;
+enum E { vf_request, vf_event } want;
int errs = 0;
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net36.C b/gcc/testsuite/g++.old-deja/g++.mike/net36.C
index 3ffa60e37a2..98b38eedb48 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/net36.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/net36.C
@@ -11,7 +11,7 @@ typedef void (A::*handler) (X*);
class B {
public:
- void setHandler(handler);
+ void setHandler(handler); // { dg-error "candidate" }
};
void f(B* b) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net8.C b/gcc/testsuite/g++.old-deja/g++.mike/net8.C
index 09dfe1a83b7..09f9c30a85e 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/net8.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/net8.C
@@ -11,22 +11,22 @@ public:
int bar;
};
-void func(Base&); // { dg-error "" }
+void func(Base&); // { dg-error "passing argument 1" }
void func2(const Derived& d) {
- func(d); // { dg-error "" } this is bad
+ func(d); // { dg-error "invalid initialization" }
}
void
-foo (int& a)
-{ // { dg-error "" }
+foo (int& a) // { dg-error "in passing argument 1" }
+{
}
int main ()
{
int b;
const int*const a = &b;
- *a = 10; // { dg-error "" } it's const
- foo (*a); // { dg-error "" } it's const
+ *a = 10; // { dg-error "read-only location" }
+ foo (*a); // { dg-error "invalid initialization" }
return 0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns8.C b/gcc/testsuite/g++.old-deja/g++.mike/ns8.C
deleted file mode 100644
index 275e7ba8535..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.mike/ns8.C
+++ /dev/null
@@ -1,9 +0,0 @@
-// { dg-do assemble }
-
-namespace A {
- int i = 1;
-}
-
-namespace A {
- int j = i;
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p10148.C b/gcc/testsuite/g++.old-deja/g++.mike/p10148.C
index 20fbf091894..6661e6bf91e 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p10148.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p10148.C
@@ -23,7 +23,7 @@ public:
};
void TCRCB::eat () {
- void *vp = (TIRD*)this->itc;
+ void *vp = (void *)((TIRD*)this)->itc;
this->itc();
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p646.C b/gcc/testsuite/g++.old-deja/g++.mike/p646.C
index 6d5abcd91e5..3fdcd41aece 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p646.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p646.C
@@ -132,8 +132,8 @@ warn_foo_parm_returns_foo (foo f)
f;
} // { dg-warning "" } control reaches end
-main ()
-{ // { dg-warning "" } no type
+main () // { dg-warning "" } no type
+{
int ii = return_1 ();
if (ii != 1)
abort_because ("wrong value returned");
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p700.C b/gcc/testsuite/g++.old-deja/g++.mike/p700.C
index 5f52751639b..106a497d040 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p700.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p700.C
@@ -223,8 +223,8 @@ inline void Int::operator >>=(const int b)
{ rep >>= b; ; }
-inline int& operator = (int& a, const Int & b)
-{ a = b.Int::val(); return a;} // { dg-warning "" }
+inline int& operator = (int& a, const Int & b) // { dg-warning "" }
+{ a = b.Int::val(); return a;}
inline int& operator += (int& a, const Int & b)
{ a += b.Int::val(); return a; }
inline int& operator -= (int& a, const Int & b)
@@ -562,8 +562,8 @@ inline void Char::operator >>=(const char b)
{ rep >>= b; ; }
-inline char& operator = (char& a, const Char & b)
-{ a = b.Char::val(); return a;} // { dg-warning "" }
+inline char& operator = (char& a, const Char & b) // { dg-warning "" }
+{ a = b.Char::val(); return a;}
inline char& operator += (char& a, const Char & b)
{ a += b.Char::val(); return a; }
inline char& operator -= (char& a, const Char & b)
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p701.C b/gcc/testsuite/g++.old-deja/g++.mike/p701.C
index 2c23ddc1cc2..6a52591040e 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p701.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p701.C
@@ -7,8 +7,8 @@ extern "C"
}
-void Munge(int& x)
-{ // { dg-error "" } referenced below
+void Munge(int& x) // { dg-error "passing argument 1" }
+{
x = 2;
}
@@ -24,7 +24,7 @@ class A
void
A::Safe() const
{
- Munge(i); // { dg-error "" } should not be able to modify a const object
+ Munge(i); // { dg-error "invalid initialization" }
}
int main()
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p7325.C b/gcc/testsuite/g++.old-deja/g++.mike/p7325.C
deleted file mode 100644
index 621adeb8a85..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.mike/p7325.C
+++ /dev/null
@@ -1,56 +0,0 @@
-// { dg-do run { xfail *-*-* } }
-// I hate this type of test case. I'm not sure how to code it better.
-// See the PR for what this tests.
-// prms-id: 7325
-
-int fail = 0;
-
-struct A {
- int i;
- static const A* match_this;
- static const A* match_arg;
- A(): i(7) {
- if (match_this)
- if (match_this != this)
- fail = 1;
- }
- A* get_this() { return this; }
- A& operator = (const A& o) {
- if (match_this)
- if (match_this != this)
- fail = 1;
- if (match_arg)
- if (match_arg != &o)
- fail = 1;
- match_arg = &o;
- return *this;
- }
-};
-
-const A* A::match_this;
-const A* A::match_arg;
-A a;
-
-A foo() { return a; }
-void f ()
-{
- A a;
- A::match_this = &a;
- a = foo ();
- a = foo ();
- A::match_this = 0;
-}
-
-void g ()
-{
- A::match_this = A().get_this();
- A();
- A();
- A::match_this = 0;
-}
-
-int main() {
- f();
- g();
- return fail;
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p811.C b/gcc/testsuite/g++.old-deja/g++.mike/p811.C
index ba6c6292598..7d15e9ed8aa 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p811.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p811.C
@@ -512,25 +512,25 @@ class Y {
public:
Y() {}
virtual const char *stringify() = 0;
- virtual char *stringify2() const = 0; // { dg-error "" }
+ virtual char *stringify2() const = 0; // { dg-error "overriding" }
};
class X: public Y {
public:
X(): Y() {}
- char *stringify(); // { dg-error "" } ok
- const char *stringify2() const; // { dg-error "" } ok
+ char *stringify(); // { dg-error "candidate" }
+ const char *stringify2() const; // { dg-error "candidate|conflicting return type" }
};
char *
-X::stringify() const
-{ // { dg-error "" } ok
+X::stringify() const // { dg-error "does not match" }
+{
return "stringify";
}
const char *
-X::stringify2()
-{ // { dg-error "" } ok
+X::stringify2() // { dg-error "does not match" }
+{
return "stringify2";
}
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/alias5.C b/gcc/testsuite/g++.old-deja/g++.ns/alias5.C
deleted file mode 100644
index e46d74dff45..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.ns/alias5.C
+++ /dev/null
@@ -1,19 +0,0 @@
-// { dg-do run }
-namespace foo{
- int eine_funktion(int)
- {
- return 0;
- }
-}
-
-namespace foo{
- void eine_funktion(int,int)
- {}
-}
-
-namespace bar = foo;
-
-int main()
-{
- return bar::eine_funktion(3);
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C b/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C
index 84af9f1edf5..d84fc8dbf41 100644
--- a/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C
+++ b/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C
@@ -1,16 +1,18 @@
// { dg-do assemble }
// To find function pointers in Koenig lookup is ok as long as we only find one.
namespace A{
- void foo(); // { dg-error "" }
+ void foo();
struct X{};
void (*bar)(X*)=0;
}
using A::X;
-void (*foo)(X*)=0; // { dg-error "" }
+void (*foo)(X*)=0;
void g()
{
- foo(new X); // { dg-error "" } both objects and functions found
+ foo(new X); // ok -- DR 218 says that we find the global
+ // foo variable first, and therefore do not
+ // perform argument-dependent lookup.
bar(new X); // ok
}
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/new1.C b/gcc/testsuite/g++.old-deja/g++.ns/new1.C
deleted file mode 100644
index 27eb6d55da0..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.ns/new1.C
+++ /dev/null
@@ -1,34 +0,0 @@
-// { dg-do run }
-// Test whether N::operator new is different from ::operator new
-#include <new>
-#include <cstdlib>
-
-bool success;
-
-namespace N{
- void* operator new(size_t n){
- success = true;
- return std::malloc(n);
- }
-}
-
-void *operator new(size_t n)throw(std::bad_alloc)
-{
- static bool entered = false;
- if(entered)
- throw std::bad_alloc();
- entered = true;
- void *result = N::operator new(n);
- entered = false;
- return result;
-}
-
-int main()
-{
- try{
- new int;
- }catch(...){
- return 1;
- }
- return success?0:1;
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/template13.C b/gcc/testsuite/g++.old-deja/g++.ns/template13.C
index d7e4b797094..46555387af3 100644
--- a/gcc/testsuite/g++.old-deja/g++.ns/template13.C
+++ b/gcc/testsuite/g++.old-deja/g++.ns/template13.C
@@ -1,22 +1,23 @@
-// { dg-do assemble { xfail *-*-* } }
+// { dg-do compile }
// Templates defined outside must be declared inside
namespace bar
{
+ // trick it to provide some prior declaration
template<class T>
- void foo(); // trick it to provide some prior declaration
- template<class T>class X; // { dg-error "" } previous declaration
+ void foo(); // { dg-error "definition" }
+ template<class T>class X; // { dg-error "previous declaration" }
}
template <typename T>
T const
-bar::foo(T const &a)
-{ // { dg-error "" "" { xfail *-*-* } } not declared in bar -
+bar::foo(T const &a) // { dg-error "" "" { xfail *-*-* } } not declared in bar -
+{
return a;
}
-template<> void bar::foo<int>()
-{ // { dg-error "" "" { xfail *-*-* } } not declared in bar -
+template<> void bar::foo<int>() // { dg-error "different namespace" }
+{
}
template<class T,class U>
-class bar::X{}; // { dg-error "" } does not match declaration
+class bar::X{}; // { dg-error "1 template parameter" }
diff --git a/gcc/testsuite/g++.old-deja/g++.other/access11.C b/gcc/testsuite/g++.old-deja/g++.other/access11.C
index 72fc333c1af..fb9782405bc 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/access11.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/access11.C
@@ -5,12 +5,12 @@
class A
{
private:
- template <class T> void g(T t) {}
+ template <class T> void g(T t) {} // { dg-error "" } private
int i;
};
template <>
-void A::g<int>(int t) { i = 1; } // { dg-error "" } private
+void A::g<int>(int t) { i = 1; }
int main()
{
diff --git a/gcc/testsuite/g++.old-deja/g++.other/array3.C b/gcc/testsuite/g++.old-deja/g++.other/array3.C
index 7d930b52dc7..fc37c9bd8bd 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/array3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/array3.C
@@ -20,6 +20,6 @@ class B
};
B::B (const A a[])
- : ary(a)
-{ // { dg-error "" } bad array initializer
+ : ary(a) // { dg-error "bad array initializer" }
+{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash25.C b/gcc/testsuite/g++.old-deja/g++.other/crash25.C
index f3c7c25d01c..b18d99b30d7 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/crash25.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash25.C
@@ -7,10 +7,10 @@ public:
virtual ~X();
}
-X::x()
-{ // { dg-error "" }
+X::x() // { dg-error "return type|member function" }
+{
}
-X::~x() // { dg-error "" }
+X::~x() // { dg-error "expected class-name" }
{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash32.C b/gcc/testsuite/g++.old-deja/g++.other/crash32.C
index ad2139665a0..b9c4cf98c06 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/crash32.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash32.C
@@ -6,7 +6,7 @@ struct foo
enum e
{
not // { dg-error "" }
- }; // { dg-bogus "" "" { xfail *-*-* } }
+ }; // { dg-bogus "" }
~foo(); // { dg-bogus "" "" { xfail *-*-* } }
void x (foo *&a, bool b = (unsigned char)0);
}; // { dg-bogus "" "" { xfail *-*-* } }
diff --git a/gcc/testsuite/g++.old-deja/g++.other/decl3.C b/gcc/testsuite/g++.old-deja/g++.other/decl3.C
index fbf20766fcf..a03d2e9d53e 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/decl3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/decl3.C
@@ -6,8 +6,8 @@
// We should not allow arrays of abstract type. [class.abstract/2]
-struct cow_t {
- virtual void f()=0; // { dg-error "" } abstract
+struct cow_t { // { dg-error "" } note
+ virtual void f()=0; // { dg-error "" } pure
};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/dtor3.C b/gcc/testsuite/g++.old-deja/g++.other/dtor3.C
index 3fc4dc94561..f5a00ed577c 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/dtor3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/dtor3.C
@@ -31,8 +31,8 @@ struct S5
~S5();
};
-S5::~S5(float)
-{ // { dg-error "" } destructors may not have parameters
+S5::~S5(float) // { dg-error "" } destructors may not have parameters
+{
}
@@ -43,8 +43,8 @@ struct S6
};
template <class T>
-S6<T>::~S6(float)
-{ // { dg-error "" } destructors may not have parameters
+S6<T>::~S6(float) // { dg-error "" } destructors may not have parameters
+{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/dtor4.C b/gcc/testsuite/g++.old-deja/g++.other/dtor4.C
index be04965dbe1..a4db38ba707 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/dtor4.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/dtor4.C
@@ -4,8 +4,8 @@ struct S1 {
~S1(); // { dg-error "" } candidate
};
-S1::~S1() const
-{ // { dg-error "" } prototype does not match
+S1::~S1() const // { dg-error "" } prototype does not match
+{
}
@@ -20,8 +20,8 @@ struct S3 {
};
template <class T>
-S3<T>::~S3() volatile
-{ // { dg-error "" } prototype does not match
+S3<T>::~S3() volatile // { dg-error "" } prototype does not match
+{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/enum2.C b/gcc/testsuite/g++.old-deja/g++.other/enum2.C
index 456c205f4d4..40328bfc6b9 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/enum2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/enum2.C
@@ -3,14 +3,14 @@
// Copyright (C) 1999 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 3 Jun 1999 <nathan@acm.org>
-// We'd like the enum location to be its open brace.
+// We'd like the enum location to be its identifier.
-enum thing
-{ // { dg-error "" } previous def
+enum thing // { dg-error "" } previous def
+{
val1
};
-enum thing
-{ // { dg-error "" } multiple def
+enum thing // { dg-error "" } multiple def
+{
val2
};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
index 10ee251346d..5e8ee1b4364 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
@@ -3,13 +3,13 @@ typedef struct {
int i;
} *p;
-void f (p) { } // { dg-error "" } function uses anonymous type
-p q;
+void f (p) { } // { dg-error "uses anonymous type" }
+p q; // { dg-error "uses anonymous type" }
int main()
{
- extern p j;
+ extern p j; // { dg-error "uses anonymous type" }
struct A { int j; };
- extern A a; // { dg-error "" } extern uses local type
- extern void f (A); // { dg-error "" } extern uses local type
+ extern A a; // { dg-error "uses local type" }
+ extern void f (A); // { dg-error "uses local type" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/main1.C b/gcc/testsuite/g++.old-deja/g++.other/main1.C
index 0501a74817f..c5cfe8b9eb0 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/main1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/main1.C
@@ -1,13 +1,12 @@
-// { dg-do assemble }
-// Build don't linK:
+// { dg-do compile }
-int main()
-{ // { dg-error "" } invalid redeclaration of
+int main() // { dg-error "previous declaration" }
+{
return 0;
}
-int main(int, const char**)
-{ // { dg-error "" } as
+int main(int, const char**) // { dg-error "conflicts" }
+{
return 0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/qual1.C b/gcc/testsuite/g++.old-deja/g++.other/qual1.C
index 03c38548e94..b6eba42ddcf 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/qual1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/qual1.C
@@ -6,13 +6,13 @@
typedef const char *(func_type)();
-class
+class C
{
public:
func_type *Function;
// The following is DR 295 dependent
- const func_type* function(void) { return Function; } // { dg-error "" } constifying
- volatile func_type* functionv(void); // { dg-error "" } qualifier
+ const func_type* function(void) { return Function; }
+ volatile func_type* functionv(void);
} action;
void work(const char *source)
diff --git a/gcc/testsuite/g++.old-deja/g++.other/sizeof3.C b/gcc/testsuite/g++.old-deja/g++.other/sizeof3.C
index b3f74db6822..bceb7317a1c 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/sizeof3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/sizeof3.C
@@ -6,7 +6,7 @@
// means things like the rhs of a comma operator mustn't decay. This will make
// a difference if it is an array or function.
-extern void abort();
+extern "C" void abort();
int main (int argc, char **argv)
{
diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
index 5a376669bd3..f3a682d77f6 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
@@ -1,5 +1,6 @@
// { dg-do run { target i?86-*-* } }
// { dg-options "-mtune=i686 -O2 -fpic" }
+// { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 }
class G {};
struct N {
diff --git a/gcc/testsuite/g++.old-deja/g++.other/virtual1.C b/gcc/testsuite/g++.old-deja/g++.other/virtual1.C
deleted file mode 100644
index f8ee4edb037..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.other/virtual1.C
+++ /dev/null
@@ -1,13 +0,0 @@
-// { dg-do assemble }
-
-struct S0 { virtual void f1 () { } };
-
-struct S1 : virtual public S0 { virtual void f1 () { } };
-
-struct S2 : public S1 { virtual void f1 () { } };
-
-struct S3 : virtual public S0 { virtual void f1 () { } };
-
-struct S4 : public S3 { };
-
-void creator () { new S4; }
diff --git a/gcc/testsuite/g++.old-deja/g++.other/warn7.C b/gcc/testsuite/g++.old-deja/g++.other/warn7.C
index 4e764502796..c7684d18ca1 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/warn7.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/warn7.C
@@ -34,12 +34,12 @@ struct Y
};
void bar (int);
-Y::Y(int i)
-{ // { dg-warning "" } unused parameter
+Y::Y(int i) // { dg-warning "unused parameter" }
+{
}
-void Y::bar (int i)
-{ // { dg-warning "" } unused parameter
+void Y::bar (int i) // { dg-warning "unused parameter" }
+{
}
-void bar (int i)
-{ // { dg-warning "" } unused parameter
+void bar (int i) // { dg-warning "unused parameter" }
+{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/asm1.C b/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
index 6cf869d5d6b..24cf653ceb4 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target i?86-*-linux* x86_64-*-linux } }
+// { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
// Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
template<int i> int foo(int v)
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash11.C b/gcc/testsuite/g++.old-deja/g++.pt/crash11.C
index bbf08bbfb76..be83f5abe7b 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash11.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash11.C
@@ -8,6 +8,6 @@ class A
};
-template <class j> class A::A_impl
-{ // { dg-error "" } does not declare a template
+template <class j> class A::A_impl // { dg-error "does not declare a template" }
+{
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash36.C b/gcc/testsuite/g++.old-deja/g++.pt/crash36.C
index 146c0b13783..13695f9c69b 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash36.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash36.C
@@ -28,7 +28,7 @@ struct list {
};
reverse_iterator<list_iterator<T> > rbegin()
- { return reverse_iterator<list_iterator<T> > // { dg-error "" } no type|instantiated here
+ { return reverse_iterator<list_iterator<T> >
(list_iterator<T>(Head->next())); } // { dg-error "" } not declared
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ctor2.C b/gcc/testsuite/g++.old-deja/g++.pt/ctor2.C
index e7dbfb77324..46039ace817 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ctor2.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ctor2.C
@@ -8,6 +8,6 @@ struct A {
};
template <class T>
-A<T>::A<T>()
+A<T>::A<T>() // { dg-error "invalid use of constructor|qualified name" }
{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C b/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C
index f60fffa99a6..239672dec43 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C
@@ -7,11 +7,11 @@
// so)
template <class T> class foo1;
-template <class T, class U> class foo2;
+template <class T, class U> class foo2; // { dg-error "" }
struct bar {
template <class T, class U>
- bar(int i = foo1<T>::baz, // { dg-bogus "" "" { xfail *-*-* } } -
+ bar(int i = foo1<T>::baz, // { dg-bogus "" } -
int j = int(foo2<T, U>::baz), // ok
- int k = foo2<T, U>::baz) {} // this is the problematic one.
+ int k = foo2<T, U>::baz) {} // { dg-error "" }
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit71.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit71.C
index 25ba9ff564c..03b879433b5 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit71.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit71.C
@@ -12,4 +12,4 @@ class bug {
};
template <class X>
template <> // { dg-error "" } invalid specialization
-class bug<X>::a<char> {};
+class bug<X>::a<char> {}; // { dg-error "" }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C
deleted file mode 100644
index 9aa44f597ef..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C
+++ /dev/null
@@ -1,35 +0,0 @@
-// { dg-do assemble }
-// Copyright (C) 2000 Free Software Foundation, Inc.
-// Contributed by Nathan Sidwell 7 Sep 2000 <nathan@codesourcery.com>
-
-// Bug 512. Conversion operator functions in template_id's were always
-// being looked up in global scope.
-
-class C
-{
-public:
-
- template <typename T>
- void f () {}
-
- template<typename T>
- operator int ()
- { return 0;
- }
-};
-
-template void C::f <int>();
-
-template C::operator int<float> ();
-
-template C::operator int<double> ();
-
-typedef int (C::* ptrmem_t) ();
-
-template<ptrmem_t U, ptrmem_t V>
-void foo ()
-{
-}
-
-template void
-foo<&C::operator int<float>, &C::operator int<double> > ();
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend44.C b/gcc/testsuite/g++.old-deja/g++.pt/friend44.C
index c82c7e7824c..1d2c1d1f9b6 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/friend44.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/friend44.C
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-do compile }
// Test that template friends referring to class template members are
// respected.
@@ -15,7 +15,7 @@ class B
{
template <class T> friend int A<T>::f (T);
template <class T> friend struct A<T>::AI;
- int a; // { dg-bogus "" "" { xfail *-*-* } }
+ int a;
public:
B(): a(0) { }
};
@@ -23,13 +23,13 @@ public:
template <class T> int A<T>::f (T)
{
B b;
- return b.a; // { dg-bogus "" "" { xfail *-*-* } }
+ return b.a;
}
template <class T> int A<T>::AI::f (T)
{
B b;
- return b.a; // { dg-bogus "" "" { xfail *-*-* } }
+ return b.a;
}
int main ()
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/lookup10.C b/gcc/testsuite/g++.old-deja/g++.pt/lookup10.C
index c0b4389162c..1c04250fc3c 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/lookup10.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/lookup10.C
@@ -13,8 +13,8 @@ namespace Outer {
namespace Core = Core_Real;
namespace Core_Real {
- template<class T> void Foo (T *) {}
+ template<class T> void Foo (T *) {} // { dg-error "definition" }
}
- template<> void Core::Foo<> (Render_Real::Type *) {}
+ template<> void Core::Foo<> (Render_Real::Type *) {} // { dg-error "" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp27.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp27.C
deleted file mode 100644
index 4e81d015d06..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp27.C
+++ /dev/null
@@ -1,25 +0,0 @@
-// { dg-do link }
-// GROUPS passed templates membertemplates
-extern "C" int printf(const char*, ...);
-
-template <class X>
-struct S
-{
- S()
- { printf ("In S::S()\n"); f(3); }
-
- S(char)
- { printf ("In S::S(char)\n"); f(*this); }
-
- template <class U>
- void f(U u)
- { printf ("In S::f(U)\nsizeof(U) == %d\n", sizeof(u)); }
-
- int c[16];
-};
-
-int main()
-{
- S<char*> s;
- S<char*> s2('a');
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C b/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C
index 58c59d2a888..42a21fcb072 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C
@@ -3,6 +3,6 @@
struct A { // { dg-error "" } forward declaration
friend struct B : A { // { dg-error "" }
int x;
- };
+ }; // { dg-error "" } class definition cannot be a friend
int y;
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec22.C b/gcc/testsuite/g++.old-deja/g++.pt/spec22.C
index 30464559666..41aab394d3e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec22.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec22.C
@@ -9,7 +9,7 @@ struct S
template <class T>
-template <> // { dg-error "" } enclosing classes not specialized
-void S<T>::f<int> ()
-{ // { dg-error "" } template does not match any declaration
+template <> // { dg-error "enclosing class templates|invalid explicit specialization" }
+void S<T>::f<int> () // { dg-error "does not match|invalid function declaration" }
+{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec9.C b/gcc/testsuite/g++.old-deja/g++.pt/spec9.C
index acb9e70e8be..e2c5b4e5296 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec9.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec9.C
@@ -14,8 +14,8 @@ int main()
}
template <>
-int f(int i)
-{ // { dg-error "" } specialization of f<int>(int) after instantiation
+int f(int i) // { dg-error "specialization\[^\n\]*after instantiation" }
+{
return 1;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static11.C b/gcc/testsuite/g++.old-deja/g++.pt/static11.C
index 1b037667674..9fd537c2cc2 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/static11.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/static11.C
@@ -1,12 +1,11 @@
-// { dg-do run }
-// Bug: g++ was failing to destroy C<int>::a because it was using two
-// different sentry variables for construction and destruction.
-//
// Some targets (e.g. those with "set_board_info needs_status_wrapper 1"
// in their dejagnu baseboard description) require that the status is
// final when exit is entered (or main returns), and not "overruled" by a
// destructor calling _exit. It's not really worth it to handle that.
-// Skip if target: mmix-knuth-mmixware xtensa-*-elf*
+// { dg-do run { xfail mmix-knuth-mmixware xtensa-*-elf* arm*-*-elf arm*-*-eabi } }
+
+// Bug: g++ was failing to destroy C<int>::a because it was using two
+// different sentry variables for construction and destruction.
extern "C" void _exit (int);
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static3.C b/gcc/testsuite/g++.old-deja/g++.pt/static3.C
index 6688d23cda5..5a638b1f7ad 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/static3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/static3.C
@@ -1,6 +1,7 @@
-// { dg-do run { xfail *-*-aout *-*-coff *-*-hpux* *-*-hms } }
+// { dg-do run }
// On targets that don't support weak symbols, we require an explicit
// instantiation of arr.
+// { dg-require-weak "" }
template<class T>
struct A {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp52.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp52.C
index 5d883fdd691..4a9b7ee39dc 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ttp52.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp52.C
@@ -7,12 +7,10 @@ template<class Key,
template<class, class > class MapT>
class base
{
-
};
// specialization
template<class Key, class Value>
-class base<Key, Value, mymap<int, int > >
-{ // { dg-error "" } type/value mismatch
-
+class base<Key, Value, mymap<int, int > > // { dg-error "type/value|class template" }
+{
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C b/gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C
index f76def0d229..b812554e38c 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C
@@ -12,7 +12,7 @@ template <class Type>
void PrintArgs (Type somearg, ...)
{
va_list argp;
-va_start (argp, somearg); // { dg-error "" } cannot pass non-POD
+va_start (argp, somearg);
Type value;
value = va_arg (argp, Type); // { dg-error "" } cannot pass non-POD
va_end (argp);
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb103.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb103.C
index 58abd0c6bed..c272d940332 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb103.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb103.C
@@ -4,8 +4,8 @@
template <int nlimb, int i>
inline unsigned f (unsigned* ptr);
template <int nlimb>
-inline unsigned f<nlimb,nlimb> (unsigned* ptr)
-{ //{ dg-error "" } partial specialization of function?
+inline unsigned f<nlimb,nlimb> (unsigned* ptr) // { dg-error "function template partial specialization" }
+{
return 1;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C
deleted file mode 100644
index 723e8533346..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C
+++ /dev/null
@@ -1,40 +0,0 @@
-// { dg-do run }
-// { dg-options "" }
-// Test for obsolete specialization syntax. Turn off -pedantic.
-
-#include <iostream>
-#include <typeinfo>
-
-template <typename T>
-class A {
-public:
- void test ();
-};
-
-template <typename T>
-void
-A<T>::test(){
- std::cerr << "test for " << typeid(*this).name() << std::endl;
-}
-// Specialization declaration
-template <>
-void
-A<double>::test();
-
-// Specialization definition
-void
-A<double>::test(){
- std::cerr << "specialization for " << typeid(*this).name() << std::endl;
-}
-
-
-int
-main(){
- A<int> ai;
- A<double> ad;
- ai.test();
- ad.test();
- return 0;
-}
-
-
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
index 85dc43d5c44..e01d7478838 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
@@ -3,12 +3,12 @@ class A {
private:
int i1_;
public:
- void f(int const i1 = 1); // { dg-error "" } previous specification
+ void f(int const i1 = 1); // { dg-error "previous specification" }
};
void
-A::f(int const i1 = 1)
-{ // { dg-error "" } duplicate default argument
+A::f(int const i1 = 1) // { dg-error "default argument given" }
+{
i1_ = i1;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C
index 915fbe6794b..b06823685e4 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C
@@ -17,6 +17,6 @@ class test_square
template <class BOX> void test(BOX *the_box) // { dg-error "" } semicolon missing
{x
the_box->print();
- }; // { dg-error "" }
+ };
template void test<> (test_box *); // { dg-error "" }
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C
index 3d4cc031e41..b969d686624 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C
@@ -11,13 +11,13 @@ public:
operator int() const {return 2;}
};
-bool operator==(const MyInt& a, const int& b)
-{ // { dg-error "" } candidate
+bool operator==(const MyInt& a, const int& b) // { dg-error "" } candidate
+{
return (int)a == b;
}
-bool operator==(const MyInt& a, const MyInt& b)
-{ // { dg-error "" } candidate
+bool operator==(const MyInt& a, const MyInt& b) // { dg-error "" } candidate
+{
return (int)a == (int)b;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C
index 6496fc9aff1..f47d3dbf7a0 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C
@@ -17,7 +17,7 @@ public:
};
class some_derived : public some_base
- {
+ { // { dg-error "" } note
public:
class derived_func_args;
void func(derived_func_args &);
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C
index 566cf9a7831..04ec92a30af 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb58.C
@@ -1,5 +1,5 @@
// { dg-do run }
-// { dg-options "" }
+// { dg-options "-w -fpermissive" }
// Test for g++ array init extension
class A {
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb63.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb63.C
index a1601f80f9f..a49fb02641c 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb63.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb63.C
@@ -1,5 +1,5 @@
// { dg-do run }
-// { dg-options "" }
+// { dg-options "-w -fpermissive" }
//This uses GNU extensions, so disable -ansi
#include <stdio.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb8.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb8.C
index d80414c63fc..c660050628e 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb8.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb8.C
@@ -6,8 +6,8 @@ public:
operator <<(char *); //{ dg-error "" } no return type
};
-void main()
-{ //{ dg-error "" } wrong return type for main
+void main() // { dg-error "must return .int" }
+{
foo f;
f << (void*)0;
}
diff --git a/gcc/testsuite/g77.dg/12632.f b/gcc/testsuite/g77.dg/12632.f
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/g77.dg/12632.f
diff --git a/gcc/testsuite/g77.dg/20010216-1.f b/gcc/testsuite/g77.dg/20010216-1.f
deleted file mode 100644
index 150dc9f016a..00000000000
--- a/gcc/testsuite/g77.dg/20010216-1.f
+++ /dev/null
@@ -1,51 +0,0 @@
-C Test for bug in reg-stack handling conditional moves.
-C Reported by Tim Prince <tprince@computer.org>
-C
-C { dg-do run { target "i[6789]86-*-*" } }
-C { dg-options "-ffast-math -march=pentiumpro" }
-
- double precision function foo(x, y)
- implicit none
- double precision x, y
- double precision a, b, c, d
- if (x /= y) then
- if (x * y >= 0) then
- a = abs(x)
- b = abs(y)
- c = max(a, b)
- d = min(a, b)
- foo = 1 - d/c
- else
- foo = 1
- end if
- else
- foo = 0
- end if
- end
-
- program test
- implicit none
-
- integer ntests
- parameter (ntests=7)
- double precision tolerance
- parameter (tolerance=1.0D-6)
-
-C Each column is a pair of values to feed to foo,
-C and its expected return value.
- double precision a(ntests) /1, -23, -1, 1, 9, 10, -9/
- double precision b(ntests) /1, -23, 12, -12, 10, 9, -10/
- double precision x(ntests) /0, 0, 1, 1, 0.1, 0.1, 0.1/
-
- double precision foo
- double precision result
- integer i
-
- do i = 1, ntests
- result = foo(a(i), b(i))
- if (abs(result - x(i)) > tolerance) then
- print *, i, a(i), b(i), x(i), result
- call abort
- end if
- end do
- end
diff --git a/gcc/testsuite/g77.dg/7388.f b/gcc/testsuite/g77.dg/7388.f
deleted file mode 100644
index 0b8374646b0..00000000000
--- a/gcc/testsuite/g77.dg/7388.f
+++ /dev/null
@@ -1,12 +0,0 @@
-C { dg-do run }
-C { dg-options "-fbounds-check" }
- character*25 buff(0:10)
- character*80 line
- integer i, m1, m2
- i = 1
- m1 = 1
- m2 = 7
- buff(i) = 'tcase0a'
- write(line,*) buff(i)(m1:m2)
- if (line .ne. ' tcase0a') call abort
- end
diff --git a/gcc/testsuite/g77.dg/bprob/bprob.exp b/gcc/testsuite/g77.dg/bprob/bprob.exp
index ae52506f6cd..6eb45be2e36 100644
--- a/gcc/testsuite/g77.dg/bprob/bprob.exp
+++ b/gcc/testsuite/g77.dg/bprob/bprob.exp
@@ -17,10 +17,11 @@
# Test the functionality of programs compiled with profile-directed block
# ordering using -fprofile-arcs followed by -fbranch-probabilities.
+load_lib target-supports.exp
+
# Some targets don't have any implementation of __bb_init_func or are
# missing other needed machinery.
-if { [istarget mmix-*-*]
- || [istarget cris-*-*] } {
+if { ![check_profiling_available] } {
return
}
diff --git a/gcc/testsuite/g77.dg/bprob/g77-bprob-1.f b/gcc/testsuite/g77.dg/bprob/g77-bprob-1.f
deleted file mode 100644
index 73f04405b9b..00000000000
--- a/gcc/testsuite/g77.dg/bprob/g77-bprob-1.f
+++ /dev/null
@@ -1,330 +0,0 @@
-C Test profile-directed block ordering with various Fortran 77 constructs
-C to catch basic regressions in the functionality.
-
- program bprob1
- implicit none
- integer i,j,k,n
- integer result
- integer lpall, ieall, gtall
- integer lpval, ieval, gtval
-
- lpval = lpall()
- ieval = ieall()
- gtval = gtall()
- if ((lpval .ne. 1) .or. (ieval .ne. 1) .or. (gtval .ne. 1)) then
- call abort
- end if
-
- end
-
-C Pass a value through a function to thwart optimization.
- integer function foo(i)
- implicit none
- integer i
- foo = i
- end
-
-C Test various flavors of GOTO and compare results against expected values.
- integer function gtall()
- implicit none
- integer gt1, gt2, gt3, gt4, gt5
- integer gtval
-
- gtall = 1
- gtval = 0
- gtval = gtval + gt1(0)
- gtval = gtval + gt1(1)
- if (gtval .ne. 3) then
- print *,"gtall part 1: ", gtval, 3
- gtall = 0
- end if
-
- gtval = 0
- gtval = gtval + gt2(3)
- gtval = gtval + gt2(30)
- if (gtval .ne. 12) then
- print *,"gtall part 2: ", gtval, 12
- gtall = 0
- end if
-
- gtval = 0
- gtval = gtval + gt3(0)
- gtval = gtval + gt3(3)
- if (gtval .ne. 48) then
- print *,"gtall part 3: ", gtval, 48
- gtall = 0
- end if
-
- gtval = 0
- gtval = gtval + gt4(1)
- gtval = gtval + gt4(2)
- gtval = gtval + gt4(3)
- if (gtval .ne. 14) then
- print *,"gtall part 4: ", gtval, 14
- gtall = 0
- end if
-
- gtval = 0
- gtval = gtval + gt5(0)
- gtval = gtval + gt5(-1)
- gtval = gtval + gt5(5)
- if (gtval .ne. 14) then
- print *,"gtall part 5: ", gtval, 14
- gtall = 0
- end if
- end
-
-C Test simple GOTO.
- integer function gt1(f)
- implicit none
- integer f
- if (f .ne. 0) goto 100
- gt1 = 1
- goto 101
- 100 gt1 = 2
- 101 continue
- end
-
-C Test simple GOTO again, this time out of a DO loop.
- integer function gt2(f)
- implicit none
- integer f
- integer i
- do i=1,10
- if (i .eq. f) goto 100
- end do
- gt2 = 4
- goto 101
- 100 gt2 = 8
- 101 continue
- end
-
-C Test computed GOTO.
- integer function gt3(i)
- implicit none
- integer i
- gt3 = 8
- goto (101, 102, 103, 104), i
- goto 105
- 101 gt3 = 1024
- goto 105
- 102 gt3 = 2048
- goto 105
- 103 gt3 = 16
- goto 105
- 104 gt3 = 4096
- goto 105
- 105 gt3 = gt3 * 2
- end
-
-C Test assigned GOTO.
- integer function gt4(i)
- implicit none
- integer i
- integer label
- assign 101 to label
- if (i .eq. 2) assign 102 to label
- if (i .eq. 3) assign 103 to label
- goto label, (101, 102, 103)
- 101 gt4 = 1
- goto 104
- 102 gt4 = 2
- goto 104
- 103 gt4 = 4
- 104 gt4 = gt4 * 2
- end
-
-C Test arithmetic IF (bundled with the GOTO variants).
- integer function gt5(i)
- implicit none
- integer i
- gt5 = 1
- if (i) 101, 102, 103
- 101 gt5 = 2
- goto 104
- 102 gt5 = 4
- goto 104
- 103 gt5 = 8
- 104 continue
- end
-
-C Run all of the loop tests and check results against expected values.
- integer function lpall()
- implicit none
- integer loop1, loop2
- integer loopval
-
- lpall = 1
- loopval = 0
- loopval = loopval + loop1(1,0)
- loopval = loopval + loop1(1,2)
- loopval = loopval + loop1(1,7)
- if (loopval .ne. 12) then
- print *,"lpall part 1: ", loopval, 12
- lpall = 0
- end if
-
- loopval = 0
- loopval = loopval + loop2(1,0,0,0)
- loopval = loopval + loop2(1,1,0,0)
- loopval = loopval + loop2(1,1,3,0)
- loopval = loopval + loop2(1,1,3,1)
- loopval = loopval + loop2(1,3,1,5)
- loopval = loopval + loop2(1,3,7,3)
- if (loopval .ne. 87) then
- print *,"lpall part 2: ", loopval, 87
- lpall = 0
- end if
- end
-
-C Test a simple DO loop.
- integer function loop1(r,n)
- implicit none
- integer r,n,i
-
- loop1 = r
- do i=1,n
- loop1 = loop1 + 1
- end do
- end
-
-C Test nested DO loops.
- integer function loop2(r, l, m, n)
- implicit none
- integer r,l,m,n
- integer i,j,k
- loop2 = r
- do i=1,l
- do j=1,m
- do k=1,n
- loop2 = loop2 + 1
- end do
- end do
- end do
- end
-
-C Test various combinations of IF-THEN-ELSE and check results against
-C expected values.
- integer function ieall()
- implicit none
- integer ie1, ie2, ie3
- integer ieval
- ieall = 1
- ieval = 0
-
- ieval = ieval + ie1(0,2)
- ieval = ieval + ie1(0,0)
- ieval = ieval + ie1(1,2)
- ieval = ieval + ie1(10,2)
- ieval = ieval + ie1(11,11)
- if (ieval .ne. 31) then
- print *,"ieall part 1: ", ieval, 31
- ieall = 0
- end if
-
- ieval = 0
- ieval = ieval + ie2(0)
- ieval = ieval + ie2(2)
- ieval = ieval + ie2(2)
- ieval = ieval + ie2(2)
- ieval = ieval + ie2(3)
- ieval = ieval + ie2(3)
- if (ieval .ne. 23) then
- print *,"ieall part 2: ", ieval, 23
- ieall = 0
- end if
-
- ieval = 0
- ieval = ieval + ie3(11,19)
- ieval = ieval + ie3(25,27)
- ieval = ieval + ie3(11,22)
- ieval = ieval + ie3(11,10)
- ieval = ieval + ie3(21,32)
- ieval = ieval + ie3(21,20)
- ieval = ieval + ie3(1,2)
- ieval = ieval + ie3(32,31)
- ieval = ieval + ie3(3,0)
- ieval = ieval + ie3(0,47)
- ieval = ieval + ie3(65,65)
- if (ieval .ne. 246) then
- print *,"ieall part 3: ", ieval, 246
- ieall = 0
- end if
- end
-
-C Test IF-THEN-ELSE.
- integer function ie1(i,j)
- implicit none
- integer i,j
- integer foo
-
- ie1 = 0
- if (i .ne. 0) then
- if (j .ne. 0) then
- ie1 = foo(4)
- else
- ie1 = foo(1024)
- end if
- else
- if (j .ne. 0) then
- ie1 = foo(1)
- else
- ie1 = foo(2)
- end if
- end if
- if (i .gt. j) then
- ie1 = foo(ie1*2)
- end if
- if (i .gt. 10) then
- if (j .gt. 10) then
- ie1 = foo(ie1*4)
- end if
- end if
- end
-
-C Test a series of simple IF-THEN statements.
- integer function ie2(i)
- implicit none
- integer i
- integer foo
- ie2 = 0
-
- if (i .eq. 0) then
- ie2 = foo(1)
- end if
- if (i .eq. 1) then
- ie2 = foo(1024)
- end if
- if (i .eq. 2) then
- ie2 = foo(2)
- end if
- if (i .eq. 3) then
- ie2 = foo(8)
- end if
- if (i .eq. 4) then
- ie2 = foo(2048)
- end if
-
- end
-
-C Test nested IF statements and IF with compound expressions.
- integer function ie3(i,j)
- implicit none
- integer i,j
- integer foo
-
- ie3 = 1
- if ((i .gt. 10) .and. (j .gt. i) .and. (j .lt. 20)) then
- ie3 = foo(16)
- end if
- if (i .gt. 20) then
- if (j .gt. i) then
- if (j .lt. 30) then
- ie3 = foo(32)
- end if
- end if
- end if
- if ((i .eq. 3) .or. (j .eq. 47) .or. (i .eq.j)) then
- ie3 = foo(64)
- end if
- end
diff --git a/gcc/testsuite/g77.dg/dg.exp b/gcc/testsuite/g77.dg/dg.exp
deleted file mode 100644
index 446166c49db..00000000000
--- a/gcc/testsuite/g77.dg/dg.exp
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# GCC testsuite that uses the `dg.exp' driver.
-
-# Load support procs.
-load_lib g77-dg.exp
-
-# If a testcase doesn't have special options, use these.
-global DEFAULT_FFLAGS
-if ![info exists DEFAULT_FFLAGS] then {
- set DEFAULT_FFLAGS " -pedantic-errors"
-}
-
-# Initialize `dg'.
-dg-init
-
-# Main loop.
-g77-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.f]] \
- $DEFAULT_FFLAGS
-
-# All done.
-dg-finish
diff --git a/gcc/testsuite/g77.dg/f77-edit-apostrophe-out.f b/gcc/testsuite/g77.dg/f77-edit-apostrophe-out.f
deleted file mode 100644
index aa51bc05c25..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-apostrophe-out.f
+++ /dev/null
@@ -1,21 +0,0 @@
-C Test Fortran 77 apostrophe edit descriptor
-C (ANSI X3.9-1978 Section 13.5.1)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-output "^" }
- 10 format('abcde')
- 20 format('and an apostrophe -''-')
- 30 format('''a leading apostrophe')
- 40 format('a trailing apostrophe''')
- 50 format('''and all of the above -''-''')
-
- write(*,10) ! { dg-output "abcde(\n|\r\n|\r)" }
- write(*,20) ! { dg-output "and an apostrophe -'-(\n|\r\n|\r)" }
- write(*,30) ! { dg-output "'a leading apostrophe(\n|\r\n|\r)" }
- write(*,40) ! { dg-output "a trailing apostrophe'(\n|\r\n|\r)" }
- write(*,50) ! { dg-output "'and all of the above -'-'(\n|\r\n|\r)" }
-
-C { dg-output "\$" }
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-colon-out.f b/gcc/testsuite/g77.dg/f77-edit-colon-out.f
deleted file mode 100644
index 4feef755f57..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-colon-out.f
+++ /dev/null
@@ -1,9 +0,0 @@
-C Test Fortran 77 colon edit descriptor
-C (ANSI X3.9-1978 Section 13.5.5)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-output "^123(\n|\r\n|\r)45(\n|\r\n|\r)\$" }
- write(*,'((3(I1:)))') (I,I=1,5)
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-h-out.f b/gcc/testsuite/g77.dg/f77-edit-h-out.f
deleted file mode 100644
index 78e6f017b7e..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-h-out.f
+++ /dev/null
@@ -1,14 +0,0 @@
-C Test Fortran 77 H edit descriptor
-C (ANSI X3.9-1978 Section 13.5.2)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-output "^" }
- 10 format(1H1)
- 20 format(6H 6)
- write(*,10) ! { dg-output "1(\n|\r\n|\r)" }
- write(*,20) ! { dg-output " 6(\n|\r\n|\r)" }
- write(*,'(16H''apostrophe'' fun)') ! { dg-output "'apostrophe' fun(\n|\r\n|\r)" }
-C { dg-output "\$" }
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-i-in.f b/gcc/testsuite/g77.dg/f77-edit-i-in.f
deleted file mode 100644
index 9040a4fcae2..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-i-in.f
+++ /dev/null
@@ -1,22 +0,0 @@
-C Test Fortran 77 I edit descriptor for input
-C (ANSI X3.9-1978 Section 13.5.9.1)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-
- integer i,j
- character*10 buf
-
- write(buf,'(A)') '1 -1'
-
- read(buf,'(I1)') i
- if ( i.ne.1 ) call abort()
-
- read(buf,'(X,I1)') i
- if ( i.ne.0 ) call abort()
-
- read(buf,'(X,I1,X,I2)') i,j
- if ( i.ne.0 .and. j.ne.-1 ) call abort()
-
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-i-out.f b/gcc/testsuite/g77.dg/f77-edit-i-out.f
deleted file mode 100644
index 9887704c716..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-i-out.f
+++ /dev/null
@@ -1,26 +0,0 @@
-C Test Fortran 77 I edit descriptor for output
-C (ANSI X3.9-1978 Section 13.5.9.1)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-output "^" }
-
- write(*,'(I1)') 1 ! { dg-output "1(\n|\r\n|\r)" }
- write(*,'(I1)') -1 ! { dg-output "\\*(\n|\r\n|\r)" }
- write(*,'(I2)') 2 ! { dg-output " 2(\n|\r\n|\r)" }
- write(*,'(I2)') -2 ! { dg-output "-2(\n|\r\n|\r)" }
- write(*,'(I3)') 3 ! { dg-output " 3(\n|\r\n|\r)" }
- write(*,'(I3)') -3 ! { dg-output " -3(\n|\r\n|\r)" }
-
- write(*,'(I2.0)') 0 ! { dg-output " (\n|\r\n|\r)" }
- write(*,'(I1.1)') 4 ! { dg-output "4(\n|\r\n|\r)" }
- write(*,'(I1.1)') -4 ! { dg-output "\\*(\n|\r\n|\r)" }
- write(*,'(I2.1)') 5 ! { dg-output " 5(\n|\r\n|\r)" }
- write(*,'(I2.1)') -5 ! { dg-output "-5(\n|\r\n|\r)" }
- write(*,'(I2.2)') 6 ! { dg-output "06(\n|\r\n|\r)" }
- write(*,'(I2.2)') -6 ! { dg-output "\\*\\*(\n|\r\n|\r)" }
- write(*,'(I3.2)') 7 ! { dg-output " 07(\n|\r\n|\r)" }
- write(*,'(I3.2)') -7 ! { dg-output "-07(\n|\r\n|\r)" }
-
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-s-out.f b/gcc/testsuite/g77.dg/f77-edit-s-out.f
deleted file mode 100644
index 89a8df2caff..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-s-out.f
+++ /dev/null
@@ -1,20 +0,0 @@
-C Test Fortran 77 S, SS and SP edit descriptors
-C (ANSI X3.9-1978 Section 13.5.6)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C ( dg-output "^" }
- 10 format(SP,I3,1X,SS,I3)
- 20 format(SP,I3,1X,SS,I3,SP,I3)
- 30 format(SP,I3,1X,SS,I3,S,I3)
- 40 format(SP,I3)
- 50 format(SP,I2)
- write(*,10) 10, 20 ! { dg-output "\\+10 20(\n|\r\n|\r)" }
- write(*,20) 10, 20, 30 ! { dg-output "\\+10 20\\+30(\n|\r\n|\r)" }
- write(*,30) 10, 20, 30 ! { dg-output "\\+10 20 30(\n|\r\n|\r)" }
- write(*,40) 0 ! { dg-output " \\+0(\n|\r\n|\r)" }
-C 15.5.9 - Note 5: When SP editing is in effect, the plus sign is not optional
- write(*,50) 11 ! { dg-output "\\*\\*(\n|\r\n|\r)" }
-C { dg-output "\$" }
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-slash-out.f b/gcc/testsuite/g77.dg/f77-edit-slash-out.f
deleted file mode 100644
index 6cc9a8842d6..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-slash-out.f
+++ /dev/null
@@ -1,9 +0,0 @@
-C Test Fortran 77 colon slash descriptor
-C (ANSI X3.9-1978 Section 13.5.4)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-output "^123(\n|\r\n|\r)45(\n|\r\n|\r)\$" }
- write(*,'(3(I1)/2(I1))') (I,I=1,5)
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-t-in.f b/gcc/testsuite/g77.dg/f77-edit-t-in.f
deleted file mode 100644
index 2314080d708..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-t-in.f
+++ /dev/null
@@ -1,31 +0,0 @@
-C Test Fortran 77 T edit descriptor for input
-C (ANSI X3.9-1978 Section 13.5.3.2)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
- integer i,j
- real a,b,c,d,e
- character*32 in
-
- in = '1234 8'
- read(in,'(T3,I1)') i
- if ( i.ne.3 ) call abort()
- read(in,'(5X,TL4,I2)') i
- if ( i.ne.23 ) call abort()
- read(in,'(3X,I1,TR3,I1)') i,j
- if ( i.ne.4 ) call abort()
- if ( j.ne.8 ) call abort()
-
- in = ' 1.5 -12.62 348.75 1.0E-6'
- 100 format(F6.0,TL6,I4,1X,I1,8X,I5,F3.0,T10,F5.0,T17,F6.0,TR2,F6.0)
- read(in,100) a,i,j,k,b,c,d,e
- if ( abs(a-1.5).gt.1.0e-5 ) call abort()
- if ( i.ne.1 ) call abort()
- if ( j.ne.5 ) call abort()
- if ( k.ne.348 ) call abort()
- if ( abs(b-0.75).gt.1.0e-5 ) call abort()
- if ( abs(c-12.62).gt.1.0e-5 ) call abort()
- if ( abs(d-348.75).gt.1.0e-4 ) call abort()
- if ( abs(e-1.0e-6).gt.1.0e-11 ) call abort()
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-t-out.f b/gcc/testsuite/g77.dg/f77-edit-t-out.f
deleted file mode 100644
index 8e411888f2b..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-t-out.f
+++ /dev/null
@@ -1,12 +0,0 @@
-C Test Fortran 77 T edit descriptor
-C (ANSI X3.9-1978 Section 13.5.3.2)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C ( dg-output "^" }
- write(*,'(I4,T8,I1)') 1234,8 ! { dg-output "1234 8(\n|\r\n|\r)" }
- write(*,'(I4,TR3,I1)') 1234,8 ! { dg-output "1234 8(\n|\r\n|\r)" }
- write(*,'(I4,5X,TL2,I1)') 1234,8 ! { dg-output "1234 8(\n|\r\n|\r)" }
-C ( dg-output "\$" }
- end
diff --git a/gcc/testsuite/g77.dg/f77-edit-x-out.f b/gcc/testsuite/g77.dg/f77-edit-x-out.f
deleted file mode 100644
index 76049fa0fdf..00000000000
--- a/gcc/testsuite/g77.dg/f77-edit-x-out.f
+++ /dev/null
@@ -1,12 +0,0 @@
-C Test Fortran 77 X descriptor
-C (ANSI X3.9-1978 Section 13.5.3.2)
-C
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C ( dg-output "^" }
- write(*,'(I1,1X,I1,2X,I1)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
-C Section 13.5.3 explains why there are no trailing blanks
- write(*,'(I1,1X,I1,2X,I1,3X)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
-C { dg-output "\$" }
- end
diff --git a/gcc/testsuite/g77.dg/fbackslash.f b/gcc/testsuite/g77.dg/fbackslash.f
deleted file mode 100644
index d2227adb67b..00000000000
--- a/gcc/testsuite/g77.dg/fbackslash.f
+++ /dev/null
@@ -1,7 +0,0 @@
-C Test compiler flags: -fbackslash
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fbackslash" }
- if ( len('A\nB') .ne. 3 ) call abort
- end
diff --git a/gcc/testsuite/g77.dg/fcase-preserve.f b/gcc/testsuite/g77.dg/fcase-preserve.f
deleted file mode 100644
index f1d1eab6fd4..00000000000
--- a/gcc/testsuite/g77.dg/fcase-preserve.f
+++ /dev/null
@@ -1,9 +0,0 @@
-C Test compiler flags: -fcase-preserve
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fcase-preserve" }
- i = 3
- I = 4
- if ( i .ne. 3 ) call abort
- end
diff --git a/gcc/testsuite/g77.dg/ff90-1.f b/gcc/testsuite/g77.dg/ff90-1.f
deleted file mode 100644
index f33eb28b21b..00000000000
--- a/gcc/testsuite/g77.dg/ff90-1.f
+++ /dev/null
@@ -1,15 +0,0 @@
-C Test compiler flags: -ff90
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C Read the g77 manual entry on CMPAMBIG
-C
-C { dg-do run }
-C { dg-options "-ff90" }
- double complex z
- z = (2.0d0,1.0d0)
- call s(real(z))
- end
- subroutine s(x)
- double precision x
- if ( abs(x-2.0d0) .gt. 1.0e-5 ) call abort
- end
diff --git a/gcc/testsuite/g77.dg/ffixed-form-1.f b/gcc/testsuite/g77.dg/ffixed-form-1.f
deleted file mode 100644
index 4b5f72301da..00000000000
--- a/gcc/testsuite/g77.dg/ffixed-form-1.f
+++ /dev/null
@@ -1,6 +0,0 @@
-! Test compiler flags: -ffixed-form
-! Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-!
-! { dg-do compile }
-! { dg-options "-ffixed-form" }
- end
diff --git a/gcc/testsuite/g77.dg/ffixed-form-2.f b/gcc/testsuite/g77.dg/ffixed-form-2.f
deleted file mode 100644
index 5f6980ca0ac..00000000000
--- a/gcc/testsuite/g77.dg/ffixed-form-2.f
+++ /dev/null
@@ -1,12 +0,0 @@
-! PR fortran/10843
-! Origin: Brad Davis <bdavis9659@comcast.net>
-!
-! { dg-do compile }
-! { dg-options "-ffixed-form" }
- GO TO 3
- GOTO 3
- 3 CONTINUE
- GOTO = 55
- GO TO = 55
- END
-
diff --git a/gcc/testsuite/g77.dg/ffixed-line-length-0.f b/gcc/testsuite/g77.dg/ffixed-line-length-0.f
deleted file mode 100644
index 80c4f3f56ca..00000000000
--- a/gcc/testsuite/g77.dg/ffixed-line-length-0.f
+++ /dev/null
@@ -1,7 +0,0 @@
-C Test compiler flags: -ffixed-line-length-0
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-ffixed-line-length-0" }
-C The next line has length 257
- en d
diff --git a/gcc/testsuite/g77.dg/ffixed-line-length-132.f b/gcc/testsuite/g77.dg/ffixed-line-length-132.f
deleted file mode 100644
index 6101696758c..00000000000
--- a/gcc/testsuite/g77.dg/ffixed-line-length-132.f
+++ /dev/null
@@ -1,7 +0,0 @@
-C Test compiler flags: -ffixed-line-length-132
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-ffixed-line-length-132" }
-c23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
- en d*
diff --git a/gcc/testsuite/g77.dg/ffixed-line-length-7.f b/gcc/testsuite/g77.dg/ffixed-line-length-7.f
deleted file mode 100644
index 8a9abf48050..00000000000
--- a/gcc/testsuite/g77.dg/ffixed-line-length-7.f
+++ /dev/null
@@ -1,8 +0,0 @@
-C Test compiler flags: -ffixed-line-length-7
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-ffixed-line-length-7" }
- e*
- $n*
- $d*
diff --git a/gcc/testsuite/g77.dg/ffixed-line-length-72.f b/gcc/testsuite/g77.dg/ffixed-line-length-72.f
deleted file mode 100644
index 8a2fad1fad2..00000000000
--- a/gcc/testsuite/g77.dg/ffixed-line-length-72.f
+++ /dev/null
@@ -1,7 +0,0 @@
-C Test compiler flags: -ffixed-line-length-72
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-ffixed-line-length-72" }
-c2345678901234567890123456789012345678901234567890123456789012345678901234567890
- en d*
diff --git a/gcc/testsuite/g77.dg/ffixed-line-length-none.f b/gcc/testsuite/g77.dg/ffixed-line-length-none.f
deleted file mode 100644
index b4a50147f12..00000000000
--- a/gcc/testsuite/g77.dg/ffixed-line-length-none.f
+++ /dev/null
@@ -1,7 +0,0 @@
-C Test compiler flags: -ffixed-line-length-none
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-ffixed-line-length-none" }
-C The next line has length 257
- en d
diff --git a/gcc/testsuite/g77.dg/ffree-form-1.f b/gcc/testsuite/g77.dg/ffree-form-1.f
deleted file mode 100644
index 88ddeefb32c..00000000000
--- a/gcc/testsuite/g77.dg/ffree-form-1.f
+++ /dev/null
@@ -1,6 +0,0 @@
-! Test compiler flags: -ffree-form
-! Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-!
-! { dg-do compile }
-! { dg-options "-ffree-form" }
-end
diff --git a/gcc/testsuite/g77.dg/ffree-form-2.f b/gcc/testsuite/g77.dg/ffree-form-2.f
deleted file mode 100644
index b07db218789..00000000000
--- a/gcc/testsuite/g77.dg/ffree-form-2.f
+++ /dev/null
@@ -1,11 +0,0 @@
-! PR fortran/10843
-! Origin: Brad Davis <bdavis9659@comcast.net>
-!
-! { dg-do compile }
-! { dg-options "-ffree-form" }
- GO TO 3
- GOTO 3
- 3 CONTINUE
- GOTO = 55
- END
-
diff --git a/gcc/testsuite/g77.dg/ffree-form-3.f b/gcc/testsuite/g77.dg/ffree-form-3.f
deleted file mode 100644
index a30d6046081..00000000000
--- a/gcc/testsuite/g77.dg/ffree-form-3.f
+++ /dev/null
@@ -1,20 +0,0 @@
-! Test acceptance of keywords in free format
-! Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-!
-! { dg-do compile }
-! { dg-options "-ffree-form" }
- integer i, j
- i = 1
- if ( i .eq. 1 ) then
- go = 2
- endif
- if ( i .eq. 3 ) then
- i = 4
- end if
- do i = 1, 3
- j = i
- end do
- do j = 1, 3
- i = j
- enddo
- end
diff --git a/gcc/testsuite/g77.dg/fno-backslash.f b/gcc/testsuite/g77.dg/fno-backslash.f
deleted file mode 100644
index 7488cb6e98e..00000000000
--- a/gcc/testsuite/g77.dg/fno-backslash.f
+++ /dev/null
@@ -1,7 +0,0 @@
-C Test compiler flags: -fno-backslash
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fno-backslash" }
- if ( len('A\nB') .ne. 4 ) call abort
- end
diff --git a/gcc/testsuite/g77.dg/fno-f90-1.f b/gcc/testsuite/g77.dg/fno-f90-1.f
deleted file mode 100644
index ac0f967505b..00000000000
--- a/gcc/testsuite/g77.dg/fno-f90-1.f
+++ /dev/null
@@ -1,15 +0,0 @@
-C Test compiler flags: -fno-f90
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C Read the g77 manual entry on CMPAMBIG
-C
-C { dg-do run }
-C { dg-options "-fno-f90 -fugly-complex" }
- double complex z
- z = (2.0d0,1.0d0)
- call s(real(z))
- end
- subroutine s(x)
- real x
- if ( abs(x-2.0) .gt. 1.0e-5 ) call abort
- end
diff --git a/gcc/testsuite/g77.dg/fno-fixed-form-1.f b/gcc/testsuite/g77.dg/fno-fixed-form-1.f
deleted file mode 100644
index df2dd1d70e5..00000000000
--- a/gcc/testsuite/g77.dg/fno-fixed-form-1.f
+++ /dev/null
@@ -1,6 +0,0 @@
-! Test compiler flags: -fno-fixed-form
-! Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-!
-! { dg-do compile }
-! { dg-options "-fno-fixed-form" }
-end
diff --git a/gcc/testsuite/g77.dg/fno-onetrip.f b/gcc/testsuite/g77.dg/fno-onetrip.f
deleted file mode 100644
index 781e272f972..00000000000
--- a/gcc/testsuite/g77.dg/fno-onetrip.f
+++ /dev/null
@@ -1,9 +0,0 @@
-C Test compiler flags: -fno-onetrip
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fno-onetrip -w" }
- do i = 1, 0
- call abort
- end do
- end
diff --git a/gcc/testsuite/g77.dg/fno-typeless-boz.f b/gcc/testsuite/g77.dg/fno-typeless-boz.f
deleted file mode 100644
index 3faa550cce8..00000000000
--- a/gcc/testsuite/g77.dg/fno-typeless-boz.f
+++ /dev/null
@@ -1,10 +0,0 @@
-C Test compiler flags: -fno-typeless-boz
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fno-typeless-boz" }
- equivalence (i,r)
- r = Z'ABCD1234'
- j = Z'ABCD1234'
- if ( j .eq. i ) call abort
- end
diff --git a/gcc/testsuite/g77.dg/fno-underscoring.f b/gcc/testsuite/g77.dg/fno-underscoring.f
deleted file mode 100644
index b91320b4c0b..00000000000
--- a/gcc/testsuite/g77.dg/fno-underscoring.f
+++ /dev/null
@@ -1,8 +0,0 @@
-C Test compiler flags: -fno-underscoring
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-fno-underscoring" }
- call aaabbbccc
- end
-C { dg-final { scan-assembler-not "aaabbbccc_" } }
diff --git a/gcc/testsuite/g77.dg/fno-vxt-1.f b/gcc/testsuite/g77.dg/fno-vxt-1.f
deleted file mode 100644
index 1277fb50c6b..00000000000
--- a/gcc/testsuite/g77.dg/fno-vxt-1.f
+++ /dev/null
@@ -1,10 +0,0 @@
-C Test compiler flags: -fno-vxt
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fno-vxt" }
- i = 0
- !1
- if ( i .ne. 0 ) call exit
- call abort
- END
diff --git a/gcc/testsuite/g77.dg/fonetrip.f b/gcc/testsuite/g77.dg/fonetrip.f
deleted file mode 100644
index dec61bcb364..00000000000
--- a/gcc/testsuite/g77.dg/fonetrip.f
+++ /dev/null
@@ -1,10 +0,0 @@
-C Test compiler flags: -fonetrip
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fonetrip -w" }
- do i = 1, 0
- call exit
- end do
- call abort
- end
diff --git a/gcc/testsuite/g77.dg/ftypeless-boz.f b/gcc/testsuite/g77.dg/ftypeless-boz.f
deleted file mode 100644
index b72cb177546..00000000000
--- a/gcc/testsuite/g77.dg/ftypeless-boz.f
+++ /dev/null
@@ -1,10 +0,0 @@
-C Test compiler flags: -ftypeless-boz
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-ftypeless-boz" }
- equivalence (i,r)
- r = Z'ABCD1234'
- j = Z'ABCD1234'
- if ( j .ne. i ) call abort
- end
diff --git a/gcc/testsuite/g77.dg/fugly-assumed.f b/gcc/testsuite/g77.dg/fugly-assumed.f
deleted file mode 100644
index a45e9c8e2b7..00000000000
--- a/gcc/testsuite/g77.dg/fugly-assumed.f
+++ /dev/null
@@ -1,9 +0,0 @@
-C Test compiler flags: -fugly-assumed
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-fugly-assumed" }
- function f(i)
- integer i(1)
- f = i(1)+i(2)
- end
diff --git a/gcc/testsuite/g77.dg/funderscoring.f b/gcc/testsuite/g77.dg/funderscoring.f
deleted file mode 100644
index 720b3a7e3e1..00000000000
--- a/gcc/testsuite/g77.dg/funderscoring.f
+++ /dev/null
@@ -1,8 +0,0 @@
-C Test compiler flags: -funderscoring
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do compile }
-C { dg-options "-funderscoring" }
- call aaabbbccc
- end
-C { dg-final { scan-assembler "aaabbbccc_" } }
diff --git a/gcc/testsuite/g77.dg/fvxt-1.f b/gcc/testsuite/g77.dg/fvxt-1.f
deleted file mode 100644
index 0cde4f8a36f..00000000000
--- a/gcc/testsuite/g77.dg/fvxt-1.f
+++ /dev/null
@@ -1,10 +0,0 @@
-C Test compiler flags: -fvxt
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do run }
-C { dg-options "-fvxt" }
- i = 0
- !1
- if ( i .eq. 0 ) call exit
- call abort
- END
diff --git a/gcc/testsuite/g77.dg/gcov/gcov-1.f b/gcc/testsuite/g77.dg/gcov/gcov-1.f
deleted file mode 100644
index fa0ce55f8f8..00000000000
--- a/gcc/testsuite/g77.dg/gcov/gcov-1.f
+++ /dev/null
@@ -1,419 +0,0 @@
-C { dg-options "-fprofile-arcs -ftest-coverage" }
-C { dg-do run { target native } }
-C
-C Test gcov reports for line counts and branch and call return percentages
-C for various Fortran 77 constructs to catch basic regressions in the
-C functionality.
-
- program gcov1
- implicit none
- integer i,j,k,n
- integer result
- integer lpall, ieall, gtall
- integer lpval, ieval, gtval
-
- ! returns(100)
- lpval = lpall() ! count(1)
- ! returns(100)
- ieval = ieall() ! count(1)
- ! returns(100)
- gtval = gtall() ! count(1)
- ! returns(end)
- if ((lpval .ne. 1) .or. (ieval .ne. 1) .or. (gtval .ne. 1)) then
- call abort
- end if
-
- end
-
-C Pass a value through a function to thwart optimization.
- integer function foo(i)
- implicit none
- integer i
- foo = i ! count(18)
- end
-
-C Test various flavors of GOTO and compare results against expected values.
- integer function gtall()
- implicit none
- integer gt1, gt2, gt3, gt4, gt5
- integer gtval
-
- gtall = 1 ! count(1)
- gtval = 0 ! count(1)
- ! returns(100)
- gtval = gtval + gt1(0) ! count(1)
- ! returns(100)
- gtval = gtval + gt1(1) ! count(1)
- ! returns(end)
- ! branch(0)
- if (gtval .ne. 3) then ! count(1)
- ! branch(end)
- print *,"gtall part 1: ", gtval, 3
- gtall = 0
- end if
-
- gtval = 0 ! count(1)
- ! returns(100)
- gtval = gtval + gt2(9) ! count(1)
- ! returns(100)
- gtval = gtval + gt2(20) ! count(1)
- ! returns(end)
- ! branch(0)
- if (gtval .ne. 12) then ! count(1)
- ! branch(end)
- print *,"gtall part 2: ", gtval, 12
- gtall = 0
- end if
-
- gtval = 0 ! count(1)
- ! returns(100)
- gtval = gtval + gt3(0) ! count(1)
- ! returns(100)
- gtval = gtval + gt3(3) ! count(1)
- ! returns(end)
- ! branch(0)
- if (gtval .ne. 48) then ! count(1)
- ! branch(end)
- ! branch(end)
- print *,"gtall part 3: ", gtval, 48
- gtall = 0
- end if
-
- gtval = 0 ! count(1)
- ! returns(100)
- gtval = gtval + gt4(1) ! count(1)
- ! returns(100)
- gtval = gtval + gt4(2) ! count(1)
- ! returns(100)
- gtval = gtval + gt4(3) ! count(1)
- ! returns(end)
- ! branch(0)
- if (gtval .ne. 14) then ! count(1)
- ! branch(end)
- print *,"gtall part 4: ", gtval, 14
- gtall = 0
- end if
-
- gtval = 0 ! count(1)
- ! returns(100)
- gtval = gtval + gt5(0) ! count(1)
- ! returns(100)
- gtval = gtval + gt5(-1) ! count(1)
- ! returns(100)
- gtval = gtval + gt5(5) ! count(1)
- ! returns(end)
- ! branch(0)
- if (gtval .ne. 14) then ! count(1)
- ! branch(end)
- print *,"gtall part 5: ", gtval, 14
- gtall = 0
- end if
- end
-
-C Test simple GOTO.
- integer function gt1(f)
- implicit none
- integer f
- ! branch(50)
- if (f .ne. 0) goto 100 ! count(2)
- ! branch(end)
- gt1 = 1 ! count(1)
- goto 101 ! count(1)
- 100 gt1 = 2 ! count(1)
- 101 continue ! count(2)
- end
-
-C Test simple GOTO again, this time out of a DO loop.
- integer function gt2(f)
- implicit none
- integer f
- integer i
- ! branch(95)
- do i=1,10
- ! branch(end)
- if (i .eq. f) goto 100 ! count(19)
- end do
- gt2 = 4 ! count(1)
- goto 101 ! count(1)
- 100 gt2 = 8 ! count(1)
- 101 continue ! count(2)
- end
-
-C Test computed GOTO.
- integer function gt3(i)
- implicit none
- integer i
- goto (101, 102, 103, 104), i ! count(2)
- gt3 = 8 ! count(1)
- goto 105 ! count(1)
- 101 gt3 = 1024
- goto 105
- 102 gt3 = 2048
- goto 105
- 103 gt3 = 16 ! count(1)
- goto 105 ! count(1)
- 104 gt3 = 4096
- goto 105
- 105 gt3 = gt3 * 2 ! count(2)
- end
-
-C Test assigned GOTO.
- integer function gt4(i)
- implicit none
- integer i
- integer label
- assign 101 to label ! count(3)
- if (i .eq. 2) assign 102 to label ! count(3)
- if (i .eq. 3) assign 103 to label ! count(3)
- goto label, (101, 102, 103) ! count(3)
- 101 gt4 = 1 ! count(1)
- goto 104 ! count(1)
- 102 gt4 = 2 ! count(1)
- goto 104 ! count(1)
- 103 gt4 = 4 ! count(1)
- 104 gt4 = gt4 * 2 ! count(3)
- end
-
-C Test arithmetic IF (bundled with the GOTO variants).
- integer function gt5(i)
- implicit none
- integer i
- gt5 = 1 ! count(3)
- ! branch(67 50)
- if (i) 101, 102, 103 ! count(3)
- ! branch(end)
- 101 gt5 = 2 ! count(1)
- goto 104 ! count(1)
- 102 gt5 = 4 ! count(1)
- goto 104 ! count(1)
- 103 gt5 = 8 ! count(1)
- 104 continue ! count(3)
- end
-
-C Run all of the loop tests and check results against expected values.
- integer function lpall()
- implicit none
- integer loop1, loop2
- integer loopval
-
- lpall = 1 ! count(1)
- loopval = 0 ! count(1)
- ! returns(100)
- loopval = loopval + loop1(1,0) ! count(1)
- ! returns(100)
- loopval = loopval + loop1(1,2) ! count(1)
- ! returns(100)
- loopval = loopval + loop1(1,7) ! count(1)
- ! returns(end)
- if (loopval .ne. 12) then ! count(1)
- print *,"lpall part 1: ", loopval, 12
- lpall = 0
- end if
-
- loopval = 0 ! count(1)
- ! returns(100)
- loopval = loopval + loop2(1,0,0,0) ! count(1)
- ! returns(100)
- loopval = loopval + loop2(1,1,0,0) ! count(1)
- ! returns(100)
- loopval = loopval + loop2(1,1,3,0) ! count(1)
- ! returns(100)
- loopval = loopval + loop2(1,1,3,1) ! count(1)
- ! returns(100)
- loopval = loopval + loop2(1,3,1,5) ! count(1)
- ! returns(100)
- loopval = loopval + loop2(1,3,7,3) ! count(1)
- ! returns(end)
- if (loopval .ne. 87) then ! count(1)
- print *,"lpall part 2: ", loopval, 87
- lpall = 0
- end if
- end
-
-C Test a simple DO loop.
- integer function loop1(r,n)
- implicit none
- integer r,n,i
-
- loop1 = r ! count(3)
- ! branch(75)
- do i=1,n
- ! branch(end)
- loop1 = loop1 + 1 ! count(9)
- end do
- end
-
-C Test nested DO loops.
- integer function loop2(r, l, m, n)
- implicit none
- integer r,l,m,n
- integer i,j,k
- loop2 = r ! count(6)
- ! branch(60)
- do i=1,l
- ! branch(77)
- do j=1,m
- ! branch(73)
- do k=1,n
- ! branch(end)
- loop2 = loop2 + 1 ! count(81)
- end do
- end do
- end do
- end
-
-C Test various combinations of IF-THEN-ELSE and check results against
-C expected values.
- integer function ieall()
- implicit none
- integer ie1, ie2, ie3
- integer ieval
- ieall = 1 ! count(1)
- ieval = 0 ! count(1)
-
- ieval = ieval + ie1(0,2) ! count(1)
- ieval = ieval + ie1(0,0) ! count(1)
- ieval = ieval + ie1(1,2) ! count(1)
- ieval = ieval + ie1(10,2) ! count(1)
- ieval = ieval + ie1(11,11) ! count(1)
- if (ieval .ne. 31) then ! count(1)
- print *,"ieall part 1: ", ieval, 31
- ieall = 0
- end if
-
- ieval = 0
- ieval = ieval + ie2(0) ! count(1)
- ieval = ieval + ie2(2) ! count(1)
- ieval = ieval + ie2(2) ! count(1)
- ieval = ieval + ie2(2) ! count(1)
- ieval = ieval + ie2(3) ! count(1)
- ieval = ieval + ie2(3) ! count(1)
- if (ieval .ne. 23) then ! count(1)
- print *,"ieall part 2: ", ieval, 23
- ieall = 0
- end if
-
- ieval = 0
- ieval = ieval + ie3(11,19) ! count(1)
- ieval = ieval + ie3(25,27) ! count(1)
- ieval = ieval + ie3(11,22) ! count(1)
- ieval = ieval + ie3(11,10) ! count(1)
- ieval = ieval + ie3(21,32) ! count(1)
- ieval = ieval + ie3(21,20) ! count(1)
- ieval = ieval + ie3(1,2) ! count(1)
- ieval = ieval + ie3(32,31) ! count(1)
- ieval = ieval + ie3(3,0) ! count(1)
- ieval = ieval + ie3(0,47) ! count(1)
- ieval = ieval + ie3(65,65) ! count(1)
- if (ieval .ne. 246) then ! count(1)
- print *,"ieall part 3: ", ieval, 246
- ieall = 0
- end if
- end
-
-C Test IF-THEN-ELSE.
- integer function ie1(i,j)
- implicit none
- integer i,j
- integer foo
-
- ie1 = 0 ! count(5)
- ! branch(40)
- if (i .ne. 0) then ! count(5)
- ! branch(0)
- if (j .ne. 0) then ! count(3)
- ! branch(end)
- ie1 = foo(4) ! count(3)
- else
- ie1 = foo(1024)
- end if
- else
- ! branch(50)
- if (j .ne. 0) then ! count(2)
- ! branch(end)
- ie1 = foo(1) ! count(1)
- else
- ie1 = foo(2) ! count(1)
- end if
- end if
- ! branch(80)
- if (i .gt. j) then ! count(5)
- ! branch(end)
- ie1 = foo(ie1*2)
- end if
- ! branch(80)
- if (i .gt. 10) then ! count(5)
- ! branch(0)
- if (j .gt. 10) then ! count(1)
- ! branch(end)
- ie1 = foo(ie1*4) ! count(1)
- end if
- end if
- end
-
-C Test a series of simple IF-THEN statements.
- integer function ie2(i)
- implicit none
- integer i
- integer foo
- ie2 = 0 ! count(6)
-
- ! branch(83)
- if (i .eq. 0) then ! count(6)
- ! branch(end)
- ie2 = foo(1) ! count(1)
- end if
- ! branch(100)
- if (i .eq. 1) then ! count(6)
- ! branch(end)
- ie2 = foo(1024)
- end if
- ! branch(50)
- if (i .eq. 2) then ! count(6)
- ! branch(end)
- ie2 = foo(2) ! count(3)
- end if
- ! branch(67)
- if (i .eq. 3) then ! count(6)
- ! branch(end)
- ie2 = foo(8) ! count(2)
- end if
- ! branch(100)
- if (i .eq. 4) then ! count(6)
- ! branch(end)
- ie2 = foo(2048)
- end if
-
- end
-
-C Test nested IF statements and IF with compound expressions.
- integer function ie3(i,j)
- implicit none
- integer i,j
- integer foo
-
- ie3 = 1 ! count(11)
- ! branch(27 50 75)
- if ((i .gt. 10) .and. (j .gt. i) .and. (j .lt. 20)) then ! count(11)
- ! branch(end)
- ie3 = foo(16) ! count(1)
- end if
- ! branch(55)
- if (i .gt. 20) then ! count(11)
- ! branch(60)
- if (j .gt. i) then ! count(5)
- ! branch(50)
- if (j .lt. 30) then ! count(2)
- ! branch(end)
- ie3 = foo(32) ! count(1)
- end if
- end if
- end if
- ! branch(9 10 11)
- if ((i .eq. 3) .or. (j .eq. 47) .or. (i .eq.j)) then ! count(11)
- ! branch(end)
- ie3 = foo(64) ! count(3)
- end if
- end
-C
-C { dg-final { run-gcov branches calls { -b gcov-1.f } } }
diff --git a/gcc/testsuite/g77.dg/gcov/gcov.exp b/gcc/testsuite/g77.dg/gcov/gcov.exp
deleted file mode 100644
index a99a5723c39..00000000000
--- a/gcc/testsuite/g77.dg/gcov/gcov.exp
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 1997, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Gcov test driver.
-
-# Load support procs.
-load_lib g77-dg.exp
-load_lib gcov.exp
-
-global G77_UNDER_TEST
-
-# For now find gcov in the same directory as $G77_UNDER_TEST.
-if { ![is_remote host] && [string match "*/*" [lindex $G77_UNDER_TEST 0]] } {
- set GCOV [file dirname [lindex $G77_UNDER_TEST 0]]/gcov
-} else {
- set GCOV gcov
-}
-
-# Initialize harness.
-dg-init
-
-# Delete old .da files.
-set files [glob -nocomplain gcov-*.da];
-if { $files != "" } {
- eval "remote_file build delete $files";
-}
-
-# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/gcov-*.f]] "" ""
-
-dg-finish
diff --git a/gcc/testsuite/g77.dg/pr3743-1.f b/gcc/testsuite/g77.dg/pr3743-1.f
deleted file mode 100644
index fd5fb0c426d..00000000000
--- a/gcc/testsuite/g77.dg/pr3743-1.f
+++ /dev/null
@@ -1,7 +0,0 @@
-C Test case for PR fortran/3743
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do link }
- integer i
- i = bit_size(i)
- end
diff --git a/gcc/testsuite/g77.dg/pr3743-2.f b/gcc/testsuite/g77.dg/pr3743-2.f
deleted file mode 100644
index 3e0eabc15f7..00000000000
--- a/gcc/testsuite/g77.dg/pr3743-2.f
+++ /dev/null
@@ -1,8 +0,0 @@
-C Test case for PR fortran/3743
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do link }
-C { dg-options "-fcase-preserve -fintrin-case-upper" }
- integer i
- i = BIT_SIZE(i)
- end
diff --git a/gcc/testsuite/g77.dg/pr3743-3.f b/gcc/testsuite/g77.dg/pr3743-3.f
deleted file mode 100644
index 77964341506..00000000000
--- a/gcc/testsuite/g77.dg/pr3743-3.f
+++ /dev/null
@@ -1,8 +0,0 @@
-c Test case for PR fortran/3743
-c Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-c
-c { dg-do link }
-c { dg-options "-fcase-preserve -fintrin-case-lower" }
- integer i
- i = bit_size(i)
- end
diff --git a/gcc/testsuite/g77.dg/pr3743-4.f b/gcc/testsuite/g77.dg/pr3743-4.f
deleted file mode 100644
index 0cb94f62d21..00000000000
--- a/gcc/testsuite/g77.dg/pr3743-4.f
+++ /dev/null
@@ -1,8 +0,0 @@
-C Test case for PR fortran/3743
-C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-C
-C { dg-do link }
-C { dg-options "-fcase-preserve -fintrin-case-initcap" }
- integer i
- i = Bit_Size(i)
- end
diff --git a/gcc/testsuite/g77.dg/pr5473.f b/gcc/testsuite/g77.dg/pr5473.f
deleted file mode 100644
index 41a6bdb9cdc..00000000000
--- a/gcc/testsuite/g77.dg/pr5473.f
+++ /dev/null
@@ -1,15 +0,0 @@
- program pr5473
-c Derived from g77.f-torture/execute/intrinsic-unix-bessel.f
-c Origin: David Billinghurst <David.Billinghurst@riotinto.com>
-c { dg-do compile }
- real x, a
- double precision dx, da
- integer*8 m
- x = 2.0
- dx = x
- m = 2
- a = BESJN(m,x) ! { dg-error "incorrect type" "incorrect type" }
- a = BESYN(m,x) ! { dg-error "incorrect type" "incorrect type" }
- da = DBESJN(m,dx) ! { dg-error "incorrect type" "incorrect type" }
- da = DBESYN(m,dx) ! { dg-error "incorrect type" "incorrect type" }
- end
diff --git a/gcc/testsuite/g77.dg/pr9258.f b/gcc/testsuite/g77.dg/pr9258.f
deleted file mode 100644
index 9961b72b7f6..00000000000
--- a/gcc/testsuite/g77.dg/pr9258.f
+++ /dev/null
@@ -1,18 +0,0 @@
-C Test case for PR/9258
-C Origin: kmccarty@princeton.edu
-C
-C { dg-do compile }
- SUBROUTINE FOO (B)
-
- 10 CALL BAR (A)
- ASSIGN 20 TO M
- IF (100.LT.A) GOTO 10
- GOTO 40
-C
- 20 IF (B.LT.ABS(A)) GOTO 10
- ASSIGN 30 TO M
- GOTO 40
-C
- 30 ASSIGN 10 TO M
- 40 GOTO M,(10,20,30)
- END
diff --git a/gcc/testsuite/g77.dg/strlen0.f b/gcc/testsuite/g77.dg/strlen0.f
deleted file mode 100644
index 765c8b61190..00000000000
--- a/gcc/testsuite/g77.dg/strlen0.f
+++ /dev/null
@@ -1,95 +0,0 @@
-C Substring range checking test program, to check behavior with respect
-C to X3J3/90.4 paragraph 5.7.1.
-C
-C Patches relax substring checking for subscript expressions in order to
-C simplify coding (elimination of length checks for strings passed as
-C parameters) and to avoid contradictory behavior of subscripted substring
-C expressions with respect to unsubscripted string expressions.
-C
-C Key part of 5.7.1 interpretation comes down to statement that in the
-C substring expression,
-C v ( e1 : e2 )
-C 1 <= e1 <= e2 <= len to be valid, yet the expression
-C v ( : )
-C is equivalent to
-C v(1:len(v))
-C
-C meaning that any statement that reads
-C str = v // 'tail'
-C (where v is a string passed as a parameter) would require coding as
-C if (len(v) .gt. 0) then
-C str = v // 'tail'
-C else
-C str = 'tail'
-C endif
-C to comply with the standard specification. Under the stricter
-C interpretation, functions strcat and strlat would be incorrect as
-C written for null values of str1 and/or str2.
-C
-C This code compiles and runs without error on
-C SunOS 4.1.3 f77 (-C option)
-C SUNWspro SPARCcompiler 4.2 f77 (-C option)
-C (and with proposed patches, gcc-2.9.2 -fbounds-check except for test 6,
-C which is a genuine, deliberate error - comment out to make further
-C tests)
-C
-C { dg-do run }
-C { dg-options "-fbounds-check" }
-C
-C G. Helffrich/Tokyo Inst. Technology Jul 24 2001
-
- character str*8,strres*16,strfun*16,strcat*16,strlat*16
-
- str='Hi there'
-
-C Test 1 - (current+patched) two char substring result
- strres=strfun(str,1,2)
- write(*,*) 'strres is ',strres
-
-C Test 2 - (current+patched) null string result
- strres=strfun(str,5,4)
- write(*,*) 'strres is ',strres
-
-C Test 3 - (current+patched) null string result
- strres=strfun(str,8,7)
- write(*,*) 'strres is ',strres
-
-C Test 4 - (current) error; (patched) null string result
- strres=strfun(str,9,8)
- write(*,*) 'strres is ',strres
-
-C Test 5 - (current) error; (patched) null string result
- strres=strfun(str,1,0)
- write(*,*) 'strres is ',strres
-
-C Test 6 - (current+patched) error
-C strres=strfun(str,20,20)
-C write(*,*) 'strres is ',strres
-
-C Test 7 - (current+patched) str result
- strres=strcat(str,'')
- write(*,*) 'strres is ',strres
-
-C Test 8 - (current) error; (patched) str result
- strres=strlat('',str)
- write(*,*) 'strres is ',strres
-
- end
-
- character*(*) function strfun(str,i,j)
- character str*(*)
-
- strfun = str(i:j)
- end
-
- character*(*) function strcat(str1,str2)
- character str1*(*), str2*(*)
-
- strcat = str1 // str2
- end
-
- character*(*) function strlat(str1,str2)
- character str1*(*), str2*(*)
-
- strlat = str1(1:len(str1)) // str2(1:len(str2))
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/12002.f b/gcc/testsuite/g77.f-torture/compile/12002.f
deleted file mode 100644
index cd661459f93..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/12002.f
+++ /dev/null
@@ -1,5 +0,0 @@
-C PR middle-end/12002
- COMPLEX TE1
- TE1=-2.
- TE1=TE1+TE1
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/13060.f b/gcc/testsuite/g77.f-torture/compile/13060.f
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/g77.f-torture/compile/13060.f
diff --git a/gcc/testsuite/g77.f-torture/compile/19990218-0.f b/gcc/testsuite/g77.f-torture/compile/19990218-0.f
deleted file mode 100644
index 3e34117ec69..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990218-0.f
+++ /dev/null
@@ -1,13 +0,0 @@
- program test
- double precision a,b,c
- data a,b/1.0d-46,1.0d0/
- c=fun(a,b)
- print*,'in main: fun=',c
- end
- double precision function fun(a,b)
- double precision a,b
- print*,'in sub: a,b=',a,b
- fun=a*b
- print*,'in sub: fun=',fun
- return
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/19990305-0.f b/gcc/testsuite/g77.f-torture/compile/19990305-0.f
deleted file mode 100644
index 32c656d90a6..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990305-0.f
+++ /dev/null
@@ -1,55 +0,0 @@
-* Date: Fri, 5 Mar 1999 00:35:44 -0500 (EST)
-* From: Denes Molnar <molnard@phys.columbia.edu>
-* To: fortran@gnu.org
-* Subject: f771 gets fatal signal 6
-* Content-Type: TEXT/PLAIN; charset=US-ASCII
-* X-UIDL: 8d81e9cbdcc96209c6e9b298d966ba7f
-*
-* Hi,
-*
-*
-* Comiling object from the source code below WORKS FINE with
-* 'g77 -o hwuci2 -c hwuci2.F'
-* but FAILS with fatal signal 6
-* 'g77 -o hwuci2 -O -c hwuci2.F'
-*
-* Any explanations?
-*
-* I am running GNU Fortran 0.5.23 with GCC 2.8.1 (glibc1).
-*
-*
-* Denes Molnar
-*
-* %%%%%%%%%%%%%%%%%%%%%%%%%
-* %the source:
-* %%%%%%%%%%%%%%%%%%%%%%%%%
-*
-CDECK ID>, HWUCI2.
-*CMZ :- -23/08/94 13.22.29 by Mike Seymour
-*-- Author : Ulrich Baur & Nigel Glover, adapted by Ian Knowles
-C-----------------------------------------------------------------------
- FUNCTION HWUCI2(A,B,Y0)
-C-----------------------------------------------------------------------
-C Integral LOG(A-EPSI-BY(1-Y))/(Y-Y0)
-C-----------------------------------------------------------------------
- IMPLICIT NONE
- DOUBLE COMPLEX HWUCI2,HWULI2,EPSI,Y1,Y2,Z1,Z2,Z3,Z4
- DOUBLE PRECISION A,B,Y0,ZERO,ONE,FOUR,HALF
- EXTERNAL HWULI2
- COMMON/SMALL/EPSI
- PARAMETER (ZERO=0.D0, ONE =1.D0, FOUR= 4.D0, HALF=0.5D0)
- IF(B.EQ.ZERO)THEN
- HWUCI2=CMPLX(ZERO,ZERO)
- ELSE
- Y1=HALF*(ONE+SQRT(ONE-FOUR*(A+EPSI)/B))
- Y2=ONE-Y1
- Z1=Y0/(Y0-Y1)
- Z2=(Y0-ONE)/(Y0-Y1)
- Z3=Y0/(Y0-Y2)
- Z4=(Y0-ONE)/(Y0-Y2)
- HWUCI2=HWULI2(Z1)-HWULI2(Z2)+HWULI2(Z3)-HWULI2(Z4)
- ENDIF
- RETURN
- END
-*
-* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/gcc/testsuite/g77.f-torture/compile/19990419-0.f b/gcc/testsuite/g77.f-torture/compile/19990419-0.f
deleted file mode 100644
index 084e7a254bf..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990419-0.f
+++ /dev/null
@@ -1,7 +0,0 @@
-* Test case Toon submitted, cut down to expose the one bug.
-* Belongs in compile/.
- SUBROUTINE INIERS1
- IMPLICIT LOGICAL(L)
- COMMON/COMIOD/ NHIERS1, LERS1
- inquire(nhiers1, exist=lers1)
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/19990502-0.f b/gcc/testsuite/g77.f-torture/compile/19990502-0.f
deleted file mode 100644
index 4f5d6859138..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990502-0.f
+++ /dev/null
@@ -1,66 +0,0 @@
-* Mailing-List: contact egcs-bugs-help@egcs.cygnus.com; run by ezmlm
-* Precedence: bulk
-* Sender: owner-egcs-bugs@egcs.cygnus.com
-* From: Norbert Conrad <Norbert.Conrad@hrz.uni-giessen.de>
-* Subject: egcs g77 19990524pre Internal compiler error in `print_operand'
-* To: egcs-bugs@egcs.cygnus.com
-* Date: Mon, 31 May 1999 11:46:52 +0200 (CET)
-* Content-Type: text/plain; charset=US-ASCII
-* X-UIDL: 9a00095a5fe4d774b7223de071157374
-*
-* Hi,
-*
-* I ./configure --prefix=/opt and bootstrapped egcs g77 snapshot 19990524
-* on an i686-pc-linux-gnu. The program below gives an internal compiler error.
-*
-*
-* Script started on Mon May 31 11:30:01 1999
-* lx{g010}:/tmp>/opt/bin/g77 -v -O3 -malign-double -c e3.f
-* g77 version gcc-2.95 19990524 (prerelease) (from FSF-g77 version 0.5.24-19990515)
-* Reading specs from /opt/lib/gcc-lib/i686-pc-linux-gnu/gcc-2.95/specs
-* gcc version gcc-2.95 19990524 (prerelease)
-* /opt/lib/gcc-lib/i686-pc-linux-gnu/gcc-2.95/f771 e3.f -quiet -dumpbase e3.f -malign-double -O3 -version -fversion -o /tmp/ccQgeaaa.s
-* GNU F77 version gcc-2.95 19990524 (prerelease) (i686-pc-linux-gnu) compiled by GNU C version gcc-2.95 19990524 (prerelease).
-* GNU Fortran Front End version 0.5.24-19990515
-* e3.f:25: Internal compiler error in `print_operand', at ./config/i386/i386.c:3405
-* Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
-* See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
-* lx{g010}:/tmp>cat e3.f
- SUBROUTINE DLASQ2( QQ, EE, TOL2, SMALL2 )
- DOUBLE PRECISION SMALL2, TOL2
- DOUBLE PRECISION EE( * ), QQ( * )
- INTEGER ICONV, N, OFF
- DOUBLE PRECISION QEMAX, XINF
- EXTERNAL DLASQ3
- INTRINSIC MAX, SQRT
- XINF = 0.0D0
- ICONV = 0
- IF( EE( N ).LE.MAX( QQ( N ), XINF, SMALL2 )*TOL2 ) THEN
- END IF
- IF( EE( N-2 ).LE.MAX( XINF, SMALL2,
- $ ( QQ( N ) / ( QQ( N )+EE( N-1 ) ) )* QQ( N-1 ))*TOL2 ) THEN
- QEMAX = MAX( QQ( N ), QQ( N-1 ), EE( N-1 ) )
- END IF
- IF( N.EQ.0 ) THEN
- IF( OFF.EQ.0 ) THEN
- RETURN
- ELSE
- XINF =0.0D0
- END IF
- ELSE IF( N.EQ.2 ) THEN
- END IF
- CALL DLASQ3(ICONV)
- END
-* lx{g010}:/tmp>exit
-*
-* Script done on Mon May 31 11:30:23 1999
-*
-* Best regards,
-*
-* Norbert.
-* --
-* Norbert Conrad phone: ++49 641 9913021
-* Hochschulrechenzentrum email: conrad@hrz.uni-giessen.de
-* Heinrich-Buff-Ring 44
-* 35392 Giessen
-* Germany
diff --git a/gcc/testsuite/g77.f-torture/compile/19990502-1.f b/gcc/testsuite/g77.f-torture/compile/19990502-1.f
deleted file mode 100644
index b7238fcd881..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990502-1.f
+++ /dev/null
@@ -1,6 +0,0 @@
- SUBROUTINE G(IGAMS,IWRK,NADC,NCellsInY)
- INTEGER*2 IGAMS(2,NADC)
- in = 1
- do while (in.le.nadc.and.IGAMS(2,in).le.in)
- enddo
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/19990525-0.f b/gcc/testsuite/g77.f-torture/compile/19990525-0.f
deleted file mode 100644
index 5b8d466e40d..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990525-0.f
+++ /dev/null
@@ -1,50 +0,0 @@
-* Mailing-List: contact egcs-bugs-help@egcs.cygnus.com; run by ezmlm
-* Precedence: bulk
-* Sender: owner-egcs-bugs@egcs.cygnus.com
-* From: "Bjorn R. Bjornsson" <brb@halo.hi.is>
-* Subject: g77 char expr. as arg to subroutine bug
-* To: egcs-bugs@egcs.cygnus.com
-* Date: Tue, 25 May 1999 14:45:56 +0000 (GMT)
-* Content-Type: text/plain; charset=US-ASCII
-* X-UIDL: 06000c94269ed6dfe826493e52a818b9
-*
-* The following bug is in all snapshots starting
-* from April 18. I have only tested this on Alpha linux,
-* and with FFECOM_FASTER_ARRAY_REFS set to 1.
-*
-* Run the following through g77:
-*
- subroutine a
- character*2 string1
- character*2 string2
- character*4 string3
- string1 = 's1'
- string2 = 's2'
-c
-c the next 2 lines are ok.
- string3 = (string1 // string2)
- call b(string1//string2)
-c
-c this line gives gcc/f/com.c:10660: failed assertion `hook'
- call b((string1//string2))
- end
-*
-* the output from:
-*
-* /usr/local/egcs-19990418/bin/g77 --verbose -c D.f
-*
-* is:
-*
-* on egcs-2.93.19 19990418 (gcc2 ss-980929 experimental) (from FSF-g77 version 0.5.24-19990418)
-* Reading specs from /usr/local/egcs-19990418/lib/gcc-lib/alphaev56-unknown-linux-gnu/egcs-2.93.19/specs
-* gcc version egcs-2.93.19 19990418 (gcc2 ss-980929 experimental)
-* /usr/local/egcs-19990418/lib/gcc-lib/alphaev56-unknown-linux-gnu/egcs-2.93.19/f771 D.f -quiet -dumpbase D.f -version -fversion -o /tmp/ccNpaaaa.s
-* GNU F77 version egcs-2.93.19 19990418 (gcc2 ss-980929 experimental) (alphaev56-unknown-linux-gnu) compiled by GNU C version egcs-2.93.19 19990418 (gcc2 ss-980929 experimental).
-* GNU Fortran Front End version 0.5.24-19990418
-* ../../../egcs-19990418/gcc/f/com.c:10351: failed assertion `hook'
-* g77: Internal compiler error: program f771 got fatal signal 6
-*
-* Yours,
-*
-* Bjorn R. Bjornsson
-* brb@halo.hi.is
diff --git a/gcc/testsuite/g77.f-torture/compile/19990826-1.f b/gcc/testsuite/g77.f-torture/compile/19990826-1.f
deleted file mode 100644
index e8daafc990a..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990826-1.f
+++ /dev/null
@@ -1,286 +0,0 @@
-* Date: Tue, 24 Aug 1999 12:25:41 +1200 (NZST)
-* From: Jonathan Ravens <ravens@whio.gns.cri.nz>
-* To: gcc-bugs@gcc.gnu.org
-* Subject: g77 bug report
-* X-UIDL: a0bf5ecc21487cde48d9104983ab04d6
-
-! This fortran source will not compile - if the penultimate elseif block is 0
-! included then the message appears :
-!
-! /usr/src/egcs//gcc-2.95.1/gcc/f/stw.c:308: failed assertion `b->uses_ > 0'
-! g77: Internal compiler error: program f771 got fatal signal 6
-!
-! The command was : g77 -c <prog.f>
-!
-! The OS is Red Hat 6, and the output from uname -a is
-! Linux grfw1452.gns.cri.nz 2.2.5-15 #1 Mon Apr 19 23:00:46 EDT 1999 i686 unknown
-!
-! The configure script I used was
-! /usr/src/egcs/gcc/gcc-2.95.1/configure --enable-languages=f77 i585-unknown-linux
-!
-! I was installing 2.95 because under EGCS 2.1.1 none of my code was working
-! with optimisation turned on, and there were still bugs with no optimisation
-! (all of which code works fine under g77 0.5.21 and Sun/IBM/Dec/HP fortrans).
-!
-! The version of g77 is :
-!
-!g77 version 2.95.1 19990816 (release) (from FSF-g77 version 0.5.25 19990816 (release))
-
- program main
- if (i.eq.1) then
- call abc(1)
- else if (i.eq. 1) then
- call abc( 1)
- else if (i.eq. 2) then
- call abc( 2)
- else if (i.eq. 3) then
- call abc( 3)
- else if (i.eq. 4) then
- call abc( 4)
- else if (i.eq. 5) then
- call abc( 5)
- else if (i.eq. 6) then
- call abc( 6)
- else if (i.eq. 7) then
- call abc( 7)
- else if (i.eq. 8) then
- call abc( 8)
- else if (i.eq. 9) then
- call abc( 9)
- else if (i.eq. 10) then
- call abc( 10)
- else if (i.eq. 11) then
- call abc( 11)
- else if (i.eq. 12) then
- call abc( 12)
- else if (i.eq. 13) then
- call abc( 13)
- else if (i.eq. 14) then
- call abc( 14)
- else if (i.eq. 15) then
- call abc( 15)
- else if (i.eq. 16) then
- call abc( 16)
- else if (i.eq. 17) then
- call abc( 17)
- else if (i.eq. 18) then
- call abc( 18)
- else if (i.eq. 19) then
- call abc( 19)
- else if (i.eq. 20) then
- call abc( 20)
- else if (i.eq. 21) then
- call abc( 21)
- else if (i.eq. 22) then
- call abc( 22)
- else if (i.eq. 23) then
- call abc( 23)
- else if (i.eq. 24) then
- call abc( 24)
- else if (i.eq. 25) then
- call abc( 25)
- else if (i.eq. 26) then
- call abc( 26)
- else if (i.eq. 27) then
- call abc( 27)
- else if (i.eq. 28) then
- call abc( 28)
- else if (i.eq. 29) then
- call abc( 29)
- else if (i.eq. 30) then
- call abc( 30)
- else if (i.eq. 31) then
- call abc( 31)
- else if (i.eq. 32) then
- call abc( 32)
- else if (i.eq. 33) then
- call abc( 33)
- else if (i.eq. 34) then
- call abc( 34)
- else if (i.eq. 35) then
- call abc( 35)
- else if (i.eq. 36) then
- call abc( 36)
- else if (i.eq. 37) then
- call abc( 37)
- else if (i.eq. 38) then
- call abc( 38)
- else if (i.eq. 39) then
- call abc( 39)
- else if (i.eq. 40) then
- call abc( 40)
- else if (i.eq. 41) then
- call abc( 41)
- else if (i.eq. 42) then
- call abc( 42)
- else if (i.eq. 43) then
- call abc( 43)
- else if (i.eq. 44) then
- call abc( 44)
- else if (i.eq. 45) then
- call abc( 45)
- else if (i.eq. 46) then
- call abc( 46)
- else if (i.eq. 47) then
- call abc( 47)
- else if (i.eq. 48) then
- call abc( 48)
- else if (i.eq. 49) then
- call abc( 49)
- else if (i.eq. 50) then
- call abc( 50)
- else if (i.eq. 51) then
- call abc( 51)
- else if (i.eq. 52) then
- call abc( 52)
- else if (i.eq. 53) then
- call abc( 53)
- else if (i.eq. 54) then
- call abc( 54)
- else if (i.eq. 55) then
- call abc( 55)
- else if (i.eq. 56) then
- call abc( 56)
- else if (i.eq. 57) then
- call abc( 57)
- else if (i.eq. 58) then
- call abc( 58)
- else if (i.eq. 59) then
- call abc( 59)
- else if (i.eq. 60) then
- call abc( 60)
- else if (i.eq. 61) then
- call abc( 61)
- else if (i.eq. 62) then
- call abc( 62)
- else if (i.eq. 63) then
- call abc( 63)
- else if (i.eq. 64) then
- call abc( 64)
- else if (i.eq. 65) then
- call abc( 65)
- else if (i.eq. 66) then
- call abc( 66)
- else if (i.eq. 67) then
- call abc( 67)
- else if (i.eq. 68) then
- call abc( 68)
- else if (i.eq. 69) then
- call abc( 69)
- else if (i.eq. 70) then
- call abc( 70)
- else if (i.eq. 71) then
- call abc( 71)
- else if (i.eq. 72) then
- call abc( 72)
- else if (i.eq. 73) then
- call abc( 73)
- else if (i.eq. 74) then
- call abc( 74)
- else if (i.eq. 75) then
- call abc( 75)
- else if (i.eq. 76) then
- call abc( 76)
- else if (i.eq. 77) then
- call abc( 77)
- else if (i.eq. 78) then
- call abc( 78)
- else if (i.eq. 79) then
- call abc( 79)
- else if (i.eq. 80) then
- call abc( 80)
- else if (i.eq. 81) then
- call abc( 81)
- else if (i.eq. 82) then
- call abc( 82)
- else if (i.eq. 83) then
- call abc( 83)
- else if (i.eq. 84) then
- call abc( 84)
- else if (i.eq. 85) then
- call abc( 85)
- else if (i.eq. 86) then
- call abc( 86)
- else if (i.eq. 87) then
- call abc( 87)
- else if (i.eq. 88) then
- call abc( 88)
- else if (i.eq. 89) then
- call abc( 89)
- else if (i.eq. 90) then
- call abc( 90)
- else if (i.eq. 91) then
- call abc( 91)
- else if (i.eq. 92) then
- call abc( 92)
- else if (i.eq. 93) then
- call abc( 93)
- else if (i.eq. 94) then
- call abc( 94)
- else if (i.eq. 95) then
- call abc( 95)
- else if (i.eq. 96) then
- call abc( 96)
- else if (i.eq. 97) then
- call abc( 97)
- else if (i.eq. 98) then
- call abc( 98)
- else if (i.eq. 99) then
- call abc( 99)
- else if (i.eq. 100) then
- call abc( 100)
- else if (i.eq. 101) then
- call abc( 101)
- else if (i.eq. 102) then
- call abc( 102)
- else if (i.eq. 103) then
- call abc( 103)
- else if (i.eq. 104) then
- call abc( 104)
- else if (i.eq. 105) then
- call abc( 105)
- else if (i.eq. 106) then
- call abc( 106)
- else if (i.eq. 107) then
- call abc( 107)
- else if (i.eq. 108) then
- call abc( 108)
- else if (i.eq. 109) then
- call abc( 109)
- else if (i.eq. 110) then
- call abc( 110)
- else if (i.eq. 111) then
- call abc( 111)
- else if (i.eq. 112) then
- call abc( 112)
- else if (i.eq. 113) then
- call abc( 113)
- else if (i.eq. 114) then
- call abc( 114)
- else if (i.eq. 115) then
- call abc( 115)
- else if (i.eq. 116) then
- call abc( 116)
- else if (i.eq. 117) then
- call abc( 117)
- else if (i.eq. 118) then
- call abc( 118)
- else if (i.eq. 119) then
- call abc( 119)
- else if (i.eq. 120) then
- call abc( 120)
- else if (i.eq. 121) then
- call abc( 121)
- else if (i.eq. 122) then
- call abc( 122)
- else if (i.eq. 123) then
- call abc( 123)
- else if (i.eq. 124) then
- call abc( 124)
- else if (i.eq. 125) then !< Miscompiles if present
- call abc( 125) !<
-
-c else if (i.eq. 126) then
-c call abc( 126)
- endif
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/19990826-3.f b/gcc/testsuite/g77.f-torture/compile/19990826-3.f
deleted file mode 100644
index a0f5fd17544..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990826-3.f
+++ /dev/null
@@ -1,320 +0,0 @@
-* Date: Thu, 19 Aug 1999 10:02:32 +0200
-* From: Frederic Devernay <devernay@istar.fr>
-* Organization: ISTAR
-* X-Accept-Language: French, fr, en
-* To: gcc-bugs@gcc.gnu.org
-* Subject: g77 2.95 bug (Internal compiler error in `final_scan_insn')
-* X-UIDL: 08443f5c374ffa382a05573281482f4f
-
-* Here's a bug that happens only when I compile with -O (disappears with
-* -O2)
-
-* > g77 -v --save-temps -O -c pcapop.f
-* g77 version 2.95 19990728 (release) (from FSF-g77 version 0.5.25
-* 19990728 (release))
-* Reading specs from
-* /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95/specs
-* gcc version 2.95 19990728 (release)
-* /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95/f771 pcapop.f -quiet
-* -dumpbase pcapop.f -O -version -fversion -o pcapop.s
-* GNU F77 version 2.95 19990728 (release) (sparc-sun-solaris2.6) compiled
-* by GNU C version 2.95 19990728 (release).
-* GNU Fortran Front End version 0.5.25 19990728 (release)
-* pcapop.f: In subroutine `pcapop':
-* pcapop.f:291: Internal compiler error in `final_scan_insn', at
-* final.c:2920
-* Please submit a full bug report.
-* See <URL:http://egcs.cygnus.com/faq.html#bugreport> for instructions.
-
-C* PCAPOP
- SUBROUTINE PCAPOP(M1,M2,L1,L2,NMEM,N1,N2,IB,IBB,K3,TF,TS,TC,TTO)
- DIMENSION NVA(6),C(6),I(6)
-C
-C CALCUL DES PARAMETRES OPTIMAUX N1 N2 IB IBB
-C
- TACC=.035
- TTRANS=.000004
- RAD=.000001
- RMI=.000001
- RMU=.0000015
- RDI=.000003
- RTE=.000003
- REQ=.000005
- VY1=3*RTE+RDI+8*REQ+3*(RAD+RMI+RMU)
- VY2=REQ+2*RAD
- AR2=M2*(2*(REQ+RMI)+3*RMU+M1*(2*RAD+REQ))
-C VARIATION DE L1,L2,
-C
- TTOTOP=1.E+10
- N1CO=0
- N2CO=0
- IBCO=0
- IBBCO=0
- K3CO=0
- TESOP=0.
- TCOP=0.
- TFOP=0.
- INUN=7
- INDE=7
- IF(M1.LT.128)INUN=6
- IF(M1.LT.64)INUN=5
- IF(M1.LT.32)INUN=4
- IF(M2.LT.128)INDE=6
- IF(M2.LT.64)INDE=5
- IF(M2.LT.32)INDE=4
- DO 3 NUN =3,INUN
- DO 3 NDE=3,INDE
- N10=2**NUN
- N20=2**NDE
- NDIF=(N10-N20)
- NDIF=IABS(NDIF)
-C POUR AVOIR CES RESULTATS FAIRE TOURNER LE PROGRAMME VEFFT1
- TCFFTU=0.
- IF(N10.EQ.128.AND.N20.EQ.128)TCFFTU=3.35
- IF(N10.EQ.64.AND.N20.EQ.64)TCFFTU=.70
- IF(N10.EQ.32.AND.N20.EQ.32)TCFFTU=.138
- IF(N10.EQ.16.AND.N20.EQ.16)TCFFTU=.0332
- IF(N10.EQ.8.AND.N20.EQ.8)TCFFTU=.00688
- IF(NDIF.EQ.64)TCFFTU=1.566
- IF(NDIF.EQ.96)TCFFTU=.709
- IF(NDIF.EQ.112)TCFFTU=.349
- IF(NDIF.EQ.120)TCFFTU=.160
- IF(NDIF.EQ.32)TCFFTU=.315
- IF(NDIF.EQ.48)TCFFTU=.154
- IF(NDIF.EQ.56)TCFFTU=.07
- IF(NDIF.EQ.16)TCFFTU=.067
- IF(NDIF.EQ.24)TCFFTU=.030
- IF(NDIF.EQ.8)TCFFTU=.016
- N30=N10-L1+1
- N40=N20-L2+1
- WW=VY1+N30*VY2
- NDOU=2*N10*N20
- IF((N10.LT.L1).OR.(N20.LT.L2)) GOTO 3
- NB=NMEM-NDOU-N20*(L1-1)
- NVC=2*N10*(N20-1)+M1
- IF(NB.LT.(NVC)) GOTO 3
- CALL VALENT(M1,N30,K1)
- CALL VALENT(M2,N40,K2)
- IS=K1/2
- IF((2*IS).NE.K1)K1=K1+1
- TFF=TCFFTU*K1*K2
- CALL VALENT(M2,N40,JOFI)
- IF(NB.GE.(K1*N20*N30+2*N20*(L1-1))) GOTO 4
- TIOOP=1.E+10
- IC=1
-18 IB1=2*IC
- MAX=(NB-2*N20*(L1-1))/(N20*N30)
- IN=MAX/2
- IF(MAX.NE.2*IN) MAX=MAX-1
- K3=K1/IB1
- IBB1=K1-K3*IB1
- IOFI=M1/(IB1*N30)
- IRZ=0
- IF(IOFI*IB1*N30.EQ.M1) GOTO1234
- IRZ=1
- IOFI=IOFI+1
- IF(IBB1.EQ.0) GOTO 1234
- IF(M1.EQ.((IOFI-1)*IB1*N30+IBB1*N30)) GOTO 1233
- IRZ=2
- GOTO 1234
-1233 IRZ=3
-1234 IBX1=IBB1
- IF(IBX1.EQ.0)IBX1=IB1
- AR1=M2*(2*(RAD+RMI+RMU+REQ)+(M1-(IOFI-1)*IB1*N30)*2*(REQ+RAD))
- %+M2*(3*(REQ+RMU+RAD)+4*RMI+(M1-(IOFI-1)*IB1*N30)*(2*RAD+REQ)
- %+(IOFI-1)*IB1*N30*(2*RMI+REQ+RAD))
- AR5=(JOFI-1)*(N20-L2)*(M1-(IOFI-1)*IB1*N30)*(2*(RAD+RMU)+REQ)
- %*IOFI+(M2-(JOFI-1)*N40+L2-2)*(M1-(IOFI-1)*IB1*N30)*(2*(RAD+RMU
- %)+REQ)*IOFI
- WQ=((IOFI-1)*IB1+IBX1)*JOFI*WW
- AT1=N20*WQ
- AT2=N40*WQ
- QW=JOFI*(VY1+VY2*IB1*N30)
- AT3=IOFI*N40*QW
- AT4=(IOFI-1)*N40*QW
- AT5=JOFI*((IOFI-1)*N40*(IB1/IBX1)*(VY1+IBX1*N30*VY2)
- %+N40*((IB1/IBX1)*(IOFI-1)+1)*(VY1+IBX1*N30*VY2))
- AT6=JOFI*((IOFI-1)*N40*(IB1/2)*(VY1+2*N30*VY2)+N40*(
- %IB1*(IOFI-1)/2+IBX1/2)*(VY1+2*N30*VY2))
- T1=JOFI*N20*(L1-1)*REQ
- T2=M1*(L2-1)*REQ
- T3=JOFI*N20*IBX1*N30*(RAD+REQ)
- T4=JOFI*((IOFI-1)*IB1*N30*N20*(2*RMI+REQ)+IBX1*N30*N20*(2*RMI+R
- %EQ))
- T5=JOFI*((IOFI-1)*IB1/2+IBX1/2)*N20*N30*(2*RAD+REQ)
- T6=2*JOFI*(((IOFI-1)*IB1+IBX1)*N20)*((5*(RMI+RMU)+4*RAD
- %)+(L1-1)*(2*RAD+REQ)+N30*(2*RAD+REQ))
- T7=JOFI*2*((IOFI-1)*IB1+IBX1)*(L1-1)*(2*RAD+REQ)
- T8=JOFI*N10*N20*((IOFI-1)*IB1/2+IBX1/2)*(3*REQ+9*RAD+4*RMU+RMI)
- T9=N10*N20*JOFI*((IOFI-1)*IB1/2+IBX1/2)*(REQ+RMI)+M1*M2*(REQ+R
- %DI+2*RAD)
- T10=JOFI*((IOFI-1)*IB1/2+IBX1/2)*2*(3*RMU+2*(RMI+RAD)+N40*(3*RMI
- %+4*RMU+3*(RAD+REQ)+N30*(2*RAD+REQ)))
- POI=JOFI
- IF(POI.LE.2)POI=2
- TNRAN=(N40+(POI-2)*N20+(M2-(JOFI-1)*N40+L2-1))*(RMI+RMU+RAD
- %+REQ+N30*(2*RAD+2*REQ)*(IB1*(IOFI-1)+IBX1))
- IF(TNRAN.LT.0.)TNRAN=0.
- TCPU=T1+T2+T3+T4+T5+T6+T7+T8+T9+T10+TNRAN
- NVA(1)=N40
- NVA(2)=N40
- NVA(3)=N20
- NVA(4)=N20
- NVA(5)=M2-(JOFI-1)*N40
- NVA(6)=NVA(5)
- C(1)=FLOAT(IB1*N30)/FLOAT(M1)
- C(2)=FLOAT(M1-(IOFI-1)*IB1*N30)/FLOAT(M1)
- C(3)=C(1)
- C(4)=C(2)
- C(5)=C(1)
- C(6)=C(2)
- K=1
- P1=FLOAT(NB)/FLOAT(M1)
-10 IP1=P1
- I(K)=1
- IF(IP1.GE.NVA(K)) GOTO 7
- P2=P1
- IP2=P2
-8 P2=P2-FLOAT(IP2)*C(K)
- IP2=P2
- IF(IP2.EQ.0) GOTO 3
- IP1=IP1+IP2
- I(K)=I(K)+1
- IF(IP1.GE.NVA(K))GOTO 7
- GOTO 8
-7 IF(K.EQ.6) GOTO 11
- K=K+1
- GOTO 10
-11 IP1=0
- IP2=0
- IP3=0
- POFI=JOFI
- IF(POFI.LE.2)POFI=2
- TIOL=(I(2)+(IOFI-1)*I(1)+(POFI-2)*(IOFI-1)*I(3)+(POFI-
- %2)*I(4)+(IOFI-1)*I(5)+I(6))*TACC+(IOFI*M1*N40+(POFI-2)*IOFI*
- %M1*N20+(M2-(JOFI-1)*N40+L2-1)*M1*IOFI)*TTRANS
- IF(IBB1.EQ.0) GOTO 33
- IF(IB1.EQ.IBB1) GOTO 33
- IF(IBB1.EQ.2)GOTO 34
- IP3=1
- INL=NMEM/((IOFI-1)*IB1*N30+IBB1*N30)
-55 IF(INL.GT.N40)INL=N40
- GOTO 35
-33 IF(IB1.GT.2) GOTO 36
- IF((M1-(IOFI-1)*IB1*N30).GE.N30) GOTO 36
-34 IP1=1
- INL=NMEM/(2*M1-(IOFI-1)*IB1*N30)
- GOTO 55
-36 IP2=1
- INL=NMEM/(IOFI*IB1*N30)
- IF(INL.GT.N40)INL=N40
-35 CALL VALENT(N40,INL,KN1)
- CALL VALENT(M2-(JOFI-1)*N40,INL,KN2)
- CALL VALENT(INL*IBB1,IB1,KN3)
- CALL VALENT((N40-(KN1-1)*INL)*IBB1,IB1,KN4)
- IF((IP1+IP2+IP3).NE.1) CALL ERMESF(14)
- TIO1=0.
- IF(IP3.EQ.1)TIO1=N30*M2*TTRANS*(IB1*(IOFI-1)+IBB1)
- IF(IP1.EQ.1)TIO1=M1*M2*TTRANS
- IF(IP2.EQ.1) TIO1=(IB1*N30*M2*IOFI*TTRANS)
- TTIO=2.*TIO1+(KN1*IOFI*(JOFI-1)+KN2*IOFI+(KN1-1)*(
- %JOFI-1)+IOFI*(JOFI-1)+KN2-1.+IOFI+(KN1*(JOFI-1)+KN2))*TACC
- %+M1*M2*TTRANS+TIOL
- IF((IP1.EQ.1).AND.(IRZ.EQ.0))TCPU=TCPU+AT1+AT2+AT3
- IF((IP1.EQ.1).AND.(IRZ.NE.0))TCPU=TCPU+AT1+AT2+AT4+AR1
- IF((IP2.EQ.1).AND.(IRZ.EQ.0))TCPU=TCPU+AT1+AT2+AT3
- IF((IP2.EQ.1).AND.(IRZ.NE.0))TCPU=TCPU+AT1+AT2+AT3+AR2
- IFOIS=IB1/IBX1
- IF((IP3.EQ.1).AND.(IFOIS*IBX1.EQ.IB1))TCPU=TCPU+AT1+AT2+AT5+AR2
- IF((IP3.EQ.1).AND.(IFOIS*IBX1.NE.IB1))TCPU=TCPU+AT1+AT2+AT6+AR2
- IF((IP1.EQ.1).AND.(IRZ.EQ.1))TCPU=TCPU+AR5
- IF((IP1.EQ.1).AND.(IRZ.EQ.2))TCPU=TCPU+AR5
- TTIOG=TTIO+TCPU
- IF(TTIOG.LE.0.) GOTO 99
- IF(TTIOG.GE.TIOOP) GOTO 99
- IBOP=IB1
- IBBOP=IBB1
- K3OP=K3
- TIOOP=TTIOG
- TIOOP1=TTIO
- TIOOP2=TCPU
-99 IF(IB1.GE.MAX)GOTO17
- IC=IC+1
- GOTO 18
-4 T1=JOFI*N20*(L1-1)*REQ
- T2=M1*(L2-1)*REQ
- T3=JOFI*N20*N30*(RAD+REQ)*K1
- T4=JOFI*(K1*N30*N20*(2*RMI+REQ))
- T5=JOFI*N20*N30*(2*RAD+REQ)*K1/2
- T6=2*JOFI*(K1*N20)*((5*RMI+RMU)+4*RAD+(L1-1)*(2*RAD+REQ)+N30*2*
- %RAD+REQ)
- T7=JOFI*2*K1*(L1-1)*(2*RAD+REQ)
- T9=JOFI*N10*N20*K1*(REQ+RMI)/2+M1*M2*(REQ+RDI+2*RAD)
- T8=JOFI*N10*N20*K1*(3*REQ+9*RAD+4*RMU+RMI)/2
- T10=JOFI*K1*(3*RMU+2*(RMI+RAD)+N40*(3*RMI
- %+4*RMU+3*(RAD+REQ)+N30*(2*RAD+REQ)))
- PIO=JOFI
- IF(PIO.LE.2)PIO=2
- TNR=(N40+(PIO-2)*N20+(M2-(JOFI-1)*N40+L2-1))*(RMU+RMI+RAD+REQ+
- %N30*(2*RAD+2*REQ)*K1)
- IF(TNR.LE.0.)TNR=0.
- BT1=JOFI*N20*WW*K1
- BT2=JOFI*N40*WW*K1
- BT3=JOFI*N40*(VY1+K1*N30*VY2)
- BR1=M2*(2*(RAD+RMI+RMU+REQ)+(M1*2*(REQ+RAD)))+M2*(3*(
- $REQ+RAD+RMU)+4*(RMI)+M1*(2*(RAD)+REQ))
- BR2=M2*(2*(REQ+RMI)+3*RMU+M1*(2*RAD+REQ))
- TCPU=T1+T2+T3+T4+T5+T6+T7+T8+T9+T10
- TCPU=TCPU+TNR+BT1+BT2
- LIOF=M1/(N30)
- IRZ=0
- IF(LIOF*N30.EQ.M1) GOTO 2344
- IRZ=1
-2344 IF(IRZ.EQ.0)TCPU=TCPU+BT3
- IF(IRZ.NE.0)TCPU=TCPU+BT3+BR2
- TIOOP=2.*FLOAT(M1)*FLOAT(M2)*TTRANS+2.*FLOAT(K2)*TACC+TCPU
- IBOP=1
- IBBOP=0
- K3OP=1
- TIOOP2=TCPU
- TIOOP1=TIOOP-TCPU
-17 TTOT=TIOOP+TFF
- IF(TTOT.LE.0.) GOTO 3
- IF(TTOT.GE.TTOTOP)GOTO3
- N1CO=N10
- N2CO=N20
- IBCO=IBOP
- IBBCO=IBBOP
- K3CO=K3OP
- TTOTOP=TTOT
- TESOP=TIOOP1
- TCOP=TIOOP2
- TFOP=TFF
-3 CONTINUE
-
-C
- N1=N1CO
- N2=N2CO
- TTO=TTOTOP
- IB=IBCO
- IBB=IBBCO
- K3=K3CO
- TC=TCOP
- TS=TESOP
- TF=TFOP
- TT=TCOP+TFOP
- TWER=TTO-TT
- IF(N1.EQ.0.OR.N2.EQ.0) CALL OUTSTR(0,'PAS DE PLACE MEMOIRE SUFFISA
- $NTE POUR UNE MISE EN OEUVRE PAR BLOCS$')
- IF(IB.NE.1)RETURN
- IHJ=(M1/(N1-L1+1))
- IF(IHJ*(N1-L1+1).NE.M1)IHJ=IHJ+1
- IHJ1=IHJ/2
- IF(IHJ1*2.NE.IHJ)GOTO7778
- IB=IHJ
- IBB=0
- RETURN
-7778 IB=IHJ+1
- IBB=0
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/19990905-0.f b/gcc/testsuite/g77.f-torture/compile/19990905-0.f
deleted file mode 100644
index b945b2eb1bd..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990905-0.f
+++ /dev/null
@@ -1,7 +0,0 @@
-* =foo0.f in Burley's g77 test suite.
- subroutine sub(a)
- common /info/ iarray(1000)
- equivalence (m,iarray(100)), (n,iarray(200))
- real a(m,n)
- a(1,1) = a(2,2)
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/19990905-2.f b/gcc/testsuite/g77.f-torture/compile/19990905-2.f
deleted file mode 100644
index af82f65d288..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/19990905-2.f
+++ /dev/null
@@ -1,22 +0,0 @@
-* =watson11.f in Burley's g77 test suite.
-* Probably originally submitted by Ian Watson.
-* Too small to worry about copyright issues, IMO, since it
-* doesn't do anything substantive.
- SUBROUTINE OUTDNS(A,B,LCONV)
- IMPLICIT REAL*8(A-H,O-Z),INTEGER*4(I-N)
- COMMON/ARRAYS/Z(64,8),AB(30,30),PAIRS(9,9),T(9,9),TEMP(9,9),C1(3),
- > C2(3),AA(30),BB(30)
- EQUIVALENCE (X1,C1(1)),(Y1,C1(2)),(Z1,C1(3))
- EQUIVALENCE (X2,C2(1)),(Y2,C2(2)),(Z2,C2(3))
- COMMON /CONTRL/
- > SHIFT,CONV,SCION,DIVERG,
- > IOPT,KCNDO,KINDO,KMINDO,I2EINT,KOHNO,KSLATE,
- > N,NG,NUMAT,NSEK,NELECS,NIT,OCCA,OCCB,NOLDAT,NOLDFN
- INTEGER*4 OCCA,OCCB
- DIMENSION W(N),A(N,N),B(N,N)
- DIMENSION BUF(100)
- occb=5
- ENTRY INDNS (A,B)
- 40 READ(IREAD) BUF
- STOP
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20000412-1.f b/gcc/testsuite/g77.f-torture/compile/20000412-1.f
deleted file mode 100644
index e4c6511fa3b..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000412-1.f
+++ /dev/null
@@ -1,5 +0,0 @@
- subroutine aap(k)
- equivalence (i,r)
- i = k
- print*,r
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/20000511-1.f b/gcc/testsuite/g77.f-torture/compile/20000511-1.f
deleted file mode 100644
index ff95214351e..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000511-1.f
+++ /dev/null
@@ -1,21 +0,0 @@
- subroutine saxpy(n,sa,sx,incx,sy,incy)
-C
-C constant times a vector plus a vector.
-C uses unrolled loop for increments equal to one.
-C jack dongarra, linpack, 3/11/78.
-C modified 12/3/93, array(1) declarations changed to array(*)
-C
- real sx(*),sy(*),sa
- integer i,incx,incy,ix,iy,m,mp1,n
-C
-C -ffast-math ICE provoked by this conditional
- if(sa /= 0.0)then
-C
-C code for both increments equal to 1
-C
- do i= 1,n
- sy(i)= sy(i)+sa*sx(i)
- enddo
- endif
- return
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/20000511-2.f b/gcc/testsuite/g77.f-torture/compile/20000511-2.f
deleted file mode 100644
index 84542c578ae..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000511-2.f
+++ /dev/null
@@ -1,61 +0,0 @@
- subroutine sgbcon(norm,n,kl,ku,ab,ldab,ipiv,anorm,rcond,work,iwork
- &,info)
-C
-C -- LAPACK routine (version 3.0) --
-C Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-C Courant Institute, Argonne National Lab, and Rice University
-C September 30, 1994
-C
-C .. Scalar Arguments ..
- character norm
- integer info,kl,ku,ldab,n
- real anorm,rcond
-C ..
-C .. Array Arguments ..
- integer ipiv(n),iwork(n)
- real ab(ldab,n),work(n)
-C ..
-C
-C Purpose
-C =======
-C demonstrate g77 bug at -O -funroll-loops
-C =====================================================================
-C
-C .. Parameters ..
- real one,zero
- parameter(one= 1.0e+0,zero= 0.0e+0)
-C ..
-C .. Local Scalars ..
- logical lnoti,onenrm
- character normin
- integer ix,j,jp,kase,kase1,kd,lm
- real ainvnm,scale,smlnum,t
-C ..
-C .. External Functions ..
- logical lsame
- integer isamax
- real sdot,slamch
- externallsame,isamax,sdot,slamch
-C ..
-C .. External Subroutines ..
- externalsaxpy,slacon,slatbs,srscl,xerbla
-C ..
-C .. Executable Statements ..
-C
-C Multiply by inv(L).
-C
- do j= 1,n-1
-C the following min() intrinsic provokes this bug
- lm= min(kl,n-j)
- jp= ipiv(j)
- t= work(jp)
- if(jp.ne.j)then
-C but only when combined with this if block
- work(jp)= work(j)
- work(j)= t
- endif
-C and this subroutine call
- call saxpy(lm,-t,ab(kd+1,j),1,work(j+1),1)
- enddo
- return
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/20000518.f b/gcc/testsuite/g77.f-torture/compile/20000518.f
deleted file mode 100644
index 200a1ebcf2c..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000518.f
+++ /dev/null
@@ -1,16 +0,0 @@
- SUBROUTINE SORG2R( K, A, N, LDA )
-* ICE in `verify_wide_reg_1', at flow.c:2605 at -O2
-* g77 version 2.96 20000515 (experimental) on i686-pc-linux-gnu
-*
-* Originally derived from LAPACK 3.0 test suite failure.
-*
-* David Billinghurst, (David.Billinghurst@riotinto.com.au)
-* 18 May 2000
- INTEGER I, K, LDA, N
- REAL A( LDA, * )
- DO I = K, 1, -1
- IF( I.LT.N ) A( I, I ) = 1.0
- A( I, I ) = 1.0
- END DO
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20000601-1.f b/gcc/testsuite/g77.f-torture/compile/20000601-1.f
deleted file mode 100644
index 86144a1aa09..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000601-1.f
+++ /dev/null
@@ -1,28 +0,0 @@
- SUBROUTINE SGBTRF( M, KL, KU, AB, LDAB )
-
-* PR fortran/275
-* ICE in `change_address', at emit-rtl.c:1589 with -O1 and above
-* g77 version 2.96 20000530 (experimental) on mips-sgi-irix6.5/-mabi=64
-*
-* Originally derived from LAPACK 3.0 test suite failure.
-*
-* David Billinghurst, (David.Billinghurst@riotinto.com.au)
-* 1 June 2000
-
- INTEGER KL, KU, LDAB, M
- REAL AB( LDAB, * )
-
- INTEGER J, JB, JJ, JP, KV, KM
- REAL WORK13(65,64), WORK31(65,64)
- KV = KU + KL
- DO J = 1, M
- JB = MIN( 1, M-J+1 )
- DO JJ = J, J + JB - 1
- KM = MIN( KL, M-JJ )
- JP = KM+1
- CALL SSWAP( JB, AB( KV+1+JJ-J, J ), LDAB-1,
- $ AB( KV+JP+JJ-J, J ), LDAB-1 )
- END DO
- END DO
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20000601-2.f b/gcc/testsuite/g77.f-torture/compile/20000601-2.f
deleted file mode 100644
index 06c68d22ba0..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000601-2.f
+++ /dev/null
@@ -1,27 +0,0 @@
- SUBROUTINE SGBTRF( M, KL, KU, AB, LDAB )
-
-* Slightly modified version of 20000601-1.f that still ICES with
-* CVS 20010118 g77 on mips-sgi-irix6.5/-mabi=64.
-*
-* Originally derived from LAPACK 3.0 test suite failure.
-*
-* David Billinghurst, (David.Billinghurst@riotinto.com.au)
-* 18 January 2001
-
- INTEGER KL, KU, LDAB, M
- REAL AB( LDAB, * )
-
- INTEGER J, JB, JJ, JP, KV, KM, F
- REAL WORK13(65,64), WORK31(65,64)
- KV = KU + KL
- DO J = 1, M
- JB = MIN( 1, M-J+1 )
- DO JJ = J, J + JB - 1
- KM = MIN( KL, M-JJ )
- JP = F( KM+1, AB( KV+1, JJ ) )
- CALL SSWAP( JB, AB( KV+1+JJ-J, J ), LDAB-1,
- $ AB( KV+JP+JJ-J, J ), LDAB-1 )
- END DO
- END DO
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20000629-1.f b/gcc/testsuite/g77.f-torture/compile/20000629-1.f
deleted file mode 100644
index c14021c4fa3..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000629-1.f
+++ /dev/null
@@ -1,11 +0,0 @@
- SUBROUTINE MIST(N, BETA)
- IMPLICIT REAL*8 (A-H,O-Z)
- INTEGER IA, IQ, M1
- DIMENSION BETA(N)
- DO 80 IQ=1,M1
- IF (BETA(IQ).EQ.0.0D0) GO TO 120
- 80 CONTINUE
- 120 IF (IQ.NE.1) GO TO 160
- 160 M1 = IA(IQ)
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20000630-2.f b/gcc/testsuite/g77.f-torture/compile/20000630-2.f
deleted file mode 100644
index 623a29a9679..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20000630-2.f
+++ /dev/null
@@ -1,9 +0,0 @@
- SUBROUTINE CHOUT(CHR,ICNT)
-C ICE: failed assertion `expr != NULL'
-C Reduced version of GNATS PR fortran/329 from trond.bo@dnmi.no
- INTEGER CHR(ICNT)
- CHARACTER*255 BUF
- BUF(1:1)=CHAR(CHR(1))
- CALL FPUTC(1,BUF(1:1))
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20010115.f b/gcc/testsuite/g77.f-torture/compile/20010115.f
deleted file mode 100644
index 8cf85a80abe..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20010115.f
+++ /dev/null
@@ -1,9 +0,0 @@
-* GNATS PR Fortran/1636
- PRINT 42, 'HELLO'
- 42 FORMAT(A)
- CALL WORLD
- END
- SUBROUTINE WORLD
- PRINT 42, 'WORLD'
- 42 FORMAT(A)
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20010321-1.f b/gcc/testsuite/g77.f-torture/compile/20010321-1.f
deleted file mode 100644
index 3f3b5602737..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20010321-1.f
+++ /dev/null
@@ -1,8 +0,0 @@
-# 1 "20010321-1.f"
- SUBROUTINE TWOEXP
-# 1 "include/implicit.h" 1 3
- IMPLICIT DOUBLE PRECISION (A-H)
-# 3 "20010321-1.f" 2 3
- LOGICAL ANTI
- ANTI = .FALSE.
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20010426.f b/gcc/testsuite/g77.f-torture/compile/20010426.f
deleted file mode 100644
index b22b02907a6..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20010426.f
+++ /dev/null
@@ -1,6 +0,0 @@
- function f(c)
- implicit none
- real*8 c, f
- f = sqrt(c)
- return
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/20010519-1.f b/gcc/testsuite/g77.f-torture/compile/20010519-1.f
deleted file mode 100644
index efe6b34ad9e..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20010519-1.f
+++ /dev/null
@@ -1,1326 +0,0 @@
-CHARMM Element source/dimb/nmdimb.src 1.1
-C.##IF DIMB
- SUBROUTINE NMDIMB(X,Y,Z,NAT3,BNBND,BIMAG,LNOMA,AMASS,DDS,DDSCR,
- 1 PARDDV,DDV,DDM,PARDDF,DDF,PARDDE,DDEV,DD1BLK,
- 2 DD1BLL,NADD,LRAISE,DD1CMP,INBCMP,JNBCMP,
- 3 NPAR,ATMPAR,ATMPAS,BLATOM,PARDIM,NFREG,NFRET,
- 4 PARFRQ,CUTF1,ITMX,TOLDIM,IUNMOD,IUNRMD,
- 5 LBIG,LSCI,ATMPAD,SAVF,NBOND,IB,JB,DDVALM)
-C-----------------------------------------------------------------------
-C 01-Jul-1992 David Perahia, Liliane Mouawad
-C 15-Dec-1994 Herman van Vlijmen
-C
-C This is the main routine for the mixed-basis diagonalization.
-C See: L.Mouawad and D.Perahia, Biopolymers (1993), 33, 599,
-C and: D.Perahia and L.Mouawad, Comput. Chem. (1995), 19, 241.
-C The method iteratively solves the diagonalization of the
-C Hessian matrix. To save memory space, it uses a compressed
-C form of the Hessian, which only contains the nonzero elements.
-C In the diagonalization process, approximate eigenvectors are
-C mixed with Cartesian coordinates to form a reduced basis. The
-C Hessian is then diagonalized in the reduced basis. By iterating
-C over different sets of Cartesian coordinates the method ultimately
-C converges to the exact eigenvalues and eigenvectors (up to the
-C requested accuracy).
-C If no existing basis set is read, an initial basis will be created
-C which consists of the low-frequency eigenvectors of diagonal blocks
-C of the Hessian.
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/impnon.fcm'
-C..##IF VAX IRIS HPUX IRIS GNU CSPP OS2 GWS CRAY ALPHA
- IMPLICIT NONE
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/stream.fcm'
- LOGICAL LOWER,QLONGL
- INTEGER MXSTRM,POUTU
- PARAMETER (MXSTRM=20,POUTU=6)
- INTEGER NSTRM,ISTRM,JSTRM,OUTU,PRNLEV,WRNLEV,IOLEV
- COMMON /CASE/ LOWER, QLONGL
- COMMON /STREAM/ NSTRM,ISTRM,JSTRM(MXSTRM),OUTU,PRNLEV,WRNLEV,IOLEV
-C..##IF SAVEFCM
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/dimens.fcm'
- INTEGER LARGE,MEDIUM,SMALL,REDUCE
-C..##IF QUANTA
-C..##ELIF T3D
-C..##ELSE
- PARAMETER (LARGE=60120, MEDIUM=25140, SMALL=6120)
-C..##ENDIF
- PARAMETER (REDUCE=15000)
- INTEGER SIZE
-C..##IF XLARGE
-C..##ELIF XXLARGE
-C..##ELIF LARGE
-C..##ELIF MEDIUM
- PARAMETER (SIZE=MEDIUM)
-C..##ELIF REDUCE
-C..##ELIF SMALL
-C..##ELIF XSMALL
-C..##ENDIF
-C..##IF MMFF
- integer MAXDEFI
- parameter(MAXDEFI=250)
- INTEGER NAME0,NAMEQ0,NRES0,KRES0
- PARAMETER (NAME0=4,NAMEQ0=10,NRES0=4,KRES0=4)
- integer MaxAtN
- parameter (MaxAtN=55)
- INTEGER MAXAUX
- PARAMETER (MAXAUX = 10)
-C..##ENDIF
- INTEGER MAXCSP, MAXHSET
-C..##IF HMCM
- PARAMETER (MAXHSET = 200)
-C..##ELSE
-C..##ENDIF
-C..##IF REDUCE
-C..##ELSE
- PARAMETER (MAXCSP = 500)
-C..##ENDIF
-C..##IF HMCM
- INTEGER MAXHCM,MAXPCM,MAXRCM
-C...##IF REDUCE
-C...##ELSE
- PARAMETER (MAXHCM=500)
- PARAMETER (MAXPCM=5000)
- PARAMETER (MAXRCM=2000)
-C...##ENDIF
-C..##ENDIF
- INTEGER MXCMSZ
-C..##IF IBM IBMRS CRAY INTEL IBMSP T3D REDUCE
-C..##ELSE
- PARAMETER (MXCMSZ = 5000)
-C..##ENDIF
- INTEGER CHRSIZ
- PARAMETER (CHRSIZ = SIZE)
- INTEGER MAXATB
-C..##IF REDUCE
-C..##ELIF QUANTA
-C..##ELSE
- PARAMETER (MAXATB = 200)
-C..##ENDIF
- INTEGER MAXVEC
-C..##IFN VECTOR PARVECT
- PARAMETER (MAXVEC = 10)
-C..##ELIF LARGE XLARGE XXLARGE
-C..##ELIF MEDIUM
-C..##ELIF SMALL REDUCE
-C..##ELIF XSMALL
-C..##ELSE
-C..##ENDIF
- INTEGER IATBMX
- PARAMETER (IATBMX = 8)
- INTEGER MAXHB
-C..##IF LARGE XLARGE XXLARGE
-C..##ELIF MEDIUM
- PARAMETER (MAXHB = 8000)
-C..##ELIF SMALL
-C..##ELIF REDUCE XSMALL
-C..##ELSE
-C..##ENDIF
- INTEGER MAXTRN,MAXSYM
-C..##IFN NOIMAGES
- PARAMETER (MAXTRN = 5000)
- PARAMETER (MAXSYM = 192)
-C..##ELSE
-C..##ENDIF
-C..##IF LONEPAIR (lonepair_max)
- INTEGER MAXLP,MAXLPH
-C...##IF REDUCE
-C...##ELSE
- PARAMETER (MAXLP = 2000)
- PARAMETER (MAXLPH = 4000)
-C...##ENDIF
-C..##ENDIF (lonepair_max)
- INTEGER NOEMAX,NOEMX2
-C..##IF REDUCE
-C..##ELSE
- PARAMETER (NOEMAX = 2000)
- PARAMETER (NOEMX2 = 4000)
-C..##ENDIF
- INTEGER MAXATC, MAXCB, MAXCH, MAXCI, MAXCP, MAXCT, MAXITC, MAXNBF
-C..##IF REDUCE
-C..##ELIF MMFF CFF
- PARAMETER (MAXATC = 500, MAXCB = 1500, MAXCH = 3200, MAXCI = 600,
- & MAXCP = 3000,MAXCT = 15500,MAXITC = 200, MAXNBF=1000)
-C..##ELIF YAMMP
-C..##ELIF LARGE
-C..##ELSE
-C..##ENDIF
- INTEGER MAXCN
- PARAMETER (MAXCN = MAXITC*(MAXITC+1)/2)
- INTEGER MAXA, MAXAIM, MAXB, MAXT, MAXP
- INTEGER MAXIMP, MAXNB, MAXPAD, MAXRES
- INTEGER MAXSEG, MAXGRP
-C..##IF LARGE XLARGE XXLARGE
-C..##ELIF MEDIUM
- PARAMETER (MAXA = SIZE, MAXB = SIZE, MAXT = SIZE,
- & MAXP = 2*SIZE)
- PARAMETER (MAXIMP = 9200, MAXNB = 17200, MAXPAD = 8160,
- & MAXRES = 14000)
-C...##IF MCSS
-C...##ELSE
- PARAMETER (MAXSEG = 1000)
-C...##ENDIF
-C..##ELIF SMALL
-C..##ELIF XSMALL
-C..##ELIF REDUCE
-C..##ELSE
-C..##ENDIF
-C..##IF NOIMAGES
-C..##ELSE
- PARAMETER (MAXAIM = 2*SIZE)
- PARAMETER (MAXGRP = 2*SIZE/3)
-C..##ENDIF
- INTEGER REDMAX,REDMX2
-C..##IF REDUCE
-C..##ELSE
- PARAMETER (REDMAX = 20)
- PARAMETER (REDMX2 = 80)
-C..##ENDIF
- INTEGER MXRTRS, MXRTA, MXRTB, MXRTT, MXRTP, MXRTI, MXRTX,
- & MXRTHA, MXRTHD, MXRTBL, NICM
- PARAMETER (MXRTRS = 200, MXRTA = 5000, MXRTB = 5000,
- & MXRTT = 5000, MXRTP = 5000, MXRTI = 2000,
-C..##IF YAMMP
-C..##ELSE
- & MXRTX = 5000, MXRTHA = 300, MXRTHD = 300,
-C..##ENDIF
- & MXRTBL = 5000, NICM = 10)
- INTEGER NMFTAB, NMCTAB, NMCATM, NSPLIN
-C..##IF REDUCE
-C..##ELSE
- PARAMETER (NMFTAB = 200, NMCTAB = 3, NMCATM = 12000, NSPLIN = 3)
-C..##ENDIF
- INTEGER MAXSHK
-C..##IF XSMALL
-C..##ELIF REDUCE
-C..##ELSE
- PARAMETER (MAXSHK = SIZE*3/4)
-C..##ENDIF
- INTEGER SCRMAX
-C..##IF IBM IBMRS CRAY INTEL IBMSP T3D REDUCE
-C..##ELSE
- PARAMETER (SCRMAX = 5000)
-C..##ENDIF
-C..##IF TSM
- INTEGER MXPIGG
-C...##IF REDUCE
-C...##ELSE
- PARAMETER (MXPIGG=500)
-C...##ENDIF
- INTEGER MXCOLO,MXPUMB
- PARAMETER (MXCOLO=20,MXPUMB=20)
-C..##ENDIF
-C..##IF ADUMB
- INTEGER MAXUMP, MAXEPA, MAXNUM
-C...##IF REDUCE
-C...##ELSE
- PARAMETER (MAXUMP = 10, MAXNUM = 4)
-C...##ENDIF
-C..##ENDIF
- INTEGER MAXING
- PARAMETER (MAXING=1000)
-C..##IF MMFF
- integer MAX_RINGSIZE, MAX_EACH_SIZE
- parameter (MAX_RINGSIZE = 20, MAX_EACH_SIZE = 1000)
- integer MAXPATHS
- parameter (MAXPATHS = 8000)
- integer MAX_TO_SEARCH
- parameter (MAX_TO_SEARCH = 6)
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/number.fcm'
- REAL*8 ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX,
- & SEVEN, EIGHT, NINE, TEN, ELEVEN, TWELVE, THIRTN,
- & FIFTN, NINETN, TWENTY, THIRTY
-C..##IF SINGLE
-C..##ELSE
- PARAMETER (ZERO = 0.D0, ONE = 1.D0, TWO = 2.D0,
- & THREE = 3.D0, FOUR = 4.D0, FIVE = 5.D0,
- & SIX = 6.D0, SEVEN = 7.D0, EIGHT = 8.D0,
- & NINE = 9.D0, TEN = 10.D0, ELEVEN = 11.D0,
- & TWELVE = 12.D0, THIRTN = 13.D0, FIFTN = 15.D0,
- & NINETN = 19.D0, TWENTY = 20.D0, THIRTY = 30.D0)
-C..##ENDIF
- REAL*8 FIFTY, SIXTY, SVNTY2, EIGHTY, NINETY, HUNDRD,
- & ONE2TY, ONE8TY, THRHUN, THR6TY, NINE99, FIFHUN, THOSND,
- & FTHSND,MEGA
-C..##IF SINGLE
-C..##ELSE
- PARAMETER (FIFTY = 50.D0, SIXTY = 60.D0, SVNTY2 = 72.D0,
- & EIGHTY = 80.D0, NINETY = 90.D0, HUNDRD = 100.D0,
- & ONE2TY = 120.D0, ONE8TY = 180.D0, THRHUN = 300.D0,
- & THR6TY=360.D0, NINE99 = 999.D0, FIFHUN = 1500.D0,
- & THOSND = 1000.D0,FTHSND = 5000.D0, MEGA = 1.0D6)
-C..##ENDIF
- REAL*8 MINONE, MINTWO, MINSIX
- PARAMETER (MINONE = -1.D0, MINTWO = -2.D0, MINSIX = -6.D0)
- REAL*8 TENM20,TENM14,TENM8,TENM5,PT0001,PT0005,PT001,PT005,
- & PT01, PT02, PT05, PTONE, PT125, PT25, SIXTH, THIRD,
- & PTFOUR, PTSIX, HALF, PT75, PT9999, ONEPT5, TWOPT4
-C..##IF SINGLE
-C..##ELSE
- PARAMETER (TENM20 = 1.0D-20, TENM14 = 1.0D-14, TENM8 = 1.0D-8,
- & TENM5 = 1.0D-5, PT0001 = 1.0D-4, PT0005 = 5.0D-4,
- & PT001 = 1.0D-3, PT005 = 5.0D-3, PT01 = 0.01D0,
- & PT02 = 0.02D0, PT05 = 0.05D0, PTONE = 0.1D0,
- & PT125 = 0.125D0, SIXTH = ONE/SIX,PT25 = 0.25D0,
- & THIRD = ONE/THREE,PTFOUR = 0.4D0, HALF = 0.5D0,
- & PTSIX = 0.6D0, PT75 = 0.75D0, PT9999 = 0.9999D0,
- & ONEPT5 = 1.5D0, TWOPT4 = 2.4D0)
-C..##ENDIF
- REAL*8 ANUM,FMARK
- REAL*8 RSMALL,RBIG
-C..##IF SINGLE
-C..##ELSE
- PARAMETER (ANUM=9999.0D0, FMARK=-999.0D0)
- PARAMETER (RSMALL=1.0D-10,RBIG=1.0D20)
-C..##ENDIF
- REAL*8 RPRECI,RBIGST
-C..##IF VAX DEC
-C..##ELIF IBM
-C..##ELIF CRAY
-C..##ELIF ALPHA T3D T3E
-C..##ELSE
-C...##IF SINGLE
-C...##ELSE
- PARAMETER (RPRECI = 2.22045D-16, RBIGST = 4.49423D+307)
-C...##ENDIF
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/consta.fcm'
- REAL*8 PI,RADDEG,DEGRAD,TWOPI
- PARAMETER(PI=3.141592653589793D0,TWOPI=2.0D0*PI)
- PARAMETER (RADDEG=180.0D0/PI)
- PARAMETER (DEGRAD=PI/180.0D0)
- REAL*8 COSMAX
- PARAMETER (COSMAX=0.9999999999D0)
- REAL*8 TIMFAC
- PARAMETER (TIMFAC=4.88882129D-02)
- REAL*8 KBOLTZ
- PARAMETER (KBOLTZ=1.987191D-03)
- REAL*8 CCELEC
-C..##IF AMBER
-C..##ELIF DISCOVER
-C..##ELSE
- PARAMETER (CCELEC=332.0716D0)
-C..##ENDIF
- REAL*8 CNVFRQ
- PARAMETER (CNVFRQ=2045.5D0/(2.99793D0*6.28319D0))
- REAL*8 SPEEDL
- PARAMETER (SPEEDL=2.99793D-02)
- REAL*8 ATMOSP
- PARAMETER (ATMOSP=1.4584007D-05)
- REAL*8 PATMOS
- PARAMETER (PATMOS = 1.D0 / ATMOSP )
- REAL*8 BOHRR
- PARAMETER (BOHRR = 0.529177249D0 )
- REAL*8 TOKCAL
- PARAMETER (TOKCAL = 627.5095D0 )
-C..##IF MMFF
- real*8 MDAKCAL
- parameter(MDAKCAL=143.9325D0)
-C..##ENDIF
- REAL*8 DEBYEC
- PARAMETER ( DEBYEC = 2.541766D0 / BOHRR )
- REAL*8 ZEROC
- PARAMETER ( ZEROC = 298.15D0 )
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/exfunc.fcm'
-C..##IF ACE
-C..##ENDIF
-C..##IF ADUMB
-C..##ENDIF
- CHARACTER*4 GTRMA, NEXTA4, CURRA4
- CHARACTER*6 NEXTA6
- CHARACTER*8 NEXTA8
- CHARACTER*20 NEXT20
- INTEGER ALLCHR, ALLSTK, ALLHP, DECODI, FIND52,
- * GETATN, GETRES, GETRSN, GETSEG, GTRMI, I4VAL,
- * ICHAR4, ICMP16, ILOGI4, INDX, INDXA, INDXAF,
- * INDXRA, INTEG4, IREAL4, IREAL8, LOCDIF,
- * LUNASS, MATOM, NEXTI, NINDX, NSELCT, NSELCTV, ATMSEL,
- * PARNUM, PARINS,
- * SRCHWD, SRCHWS, STRLNG, DSIZE, SSIZE
-C..##IF ACE
- * ,GETNNB
-C..##ENDIF
- LOGICAL CHKPTR, EQST, EQSTA, EQSTWC, EQWDWC, DOTRIM, CHECQUE,
- * HYDROG, INITIA, LONE, LTSTEQ, ORDER, ORDER5,
- * ORDERR, USEDDT, QTOKDEL, QDIGIT, QALPHA
- REAL*8 DECODF, DOTVEC, GTRMF, LENVEC, NEXTF, RANDOM, GTRR8,
- * RANUMB, R8VAL, RETVAL8, SUMVEC
-C..##IF ADUMB
- * ,UMFI
-C..##ENDIF
- EXTERNAL GTRMA, NEXTA4, CURRA4, NEXTA6, NEXTA8,NEXT20,
- * ALLCHR, ALLSTK, ALLHP, DECODI, FIND52,
- * GETATN, GETRES, GETRSN, GETSEG, GTRMI, I4VAL,
- * ICHAR4, ICMP16, ILOGI4, INDX, INDXA, INDXAF,
- * INDXRA, INTEG4, IREAL4, IREAL8, LOCDIF,
- * LUNASS, MATOM, NEXTI, NINDX, NSELCT, NSELCTV, ATMSEL,
- * PARNUM, PARINS,
- * SRCHWD, SRCHWS, STRLNG, DSIZE, SSIZE,
- * CHKPTR, EQST, EQSTA, EQSTWC, EQWDWC, DOTRIM, CHECQUE,
- * HYDROG, INITIA, LONE, LTSTEQ, ORDER, ORDER5,
- * ORDERR, USEDDT, QTOKDEL, QDIGIT, QALPHA,
- * DECODF, DOTVEC, GTRMF, LENVEC, NEXTF, RANDOM, GTRR8,
- * RANUMB, R8VAL, RETVAL8, SUMVEC
-C..##IF ADUMB
- * ,UMFI
-C..##ENDIF
-C..##IF ACE
- * ,GETNNB
-C..##ENDIF
-C..##IFN NOIMAGES
- INTEGER IMATOM
- EXTERNAL IMATOM
-C..##ENDIF
-C..##IF MBOND
-C..##ENDIF
-C..##IF MMFF
- INTEGER LEN_TRIM
- EXTERNAL LEN_TRIM
- CHARACTER*4 AtName
- external AtName
- CHARACTER*8 ElementName
- external ElementName
- CHARACTER*10 QNAME
- external QNAME
- integer IATTCH, IBORDR, CONN12, CONN13, CONN14
- integer LEQUIV, LPATH
- integer nbndx, nbnd2, nbnd3, NTERMA
- external IATTCH, IBORDR, CONN12, CONN13, CONN14
- external LEQUIV, LPATH
- external nbndx, nbnd2, nbnd3, NTERMA
- external find_loc
- real*8 vangle, OOPNGL, TORNGL, ElementMass
- external vangle, OOPNGL, TORNGL, ElementMass
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/stack.fcm'
- INTEGER STKSIZ
-C..##IFN UNICOS
-C...##IF LARGE XLARGE
-C...##ELIF MEDIUM REDUCE
- PARAMETER (STKSIZ=4000000)
-C...##ELIF SMALL
-C...##ELIF XSMALL
-C...##ELIF XXLARGE
-C...##ELSE
-C...##ENDIF
- INTEGER LSTUSD,MAXUSD,STACK
- COMMON /ISTACK/ LSTUSD,MAXUSD,STACK(STKSIZ)
-C..##ELSE
-C..##ENDIF
-C..##IF SAVEFCM
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/heap.fcm'
- INTEGER HEAPDM
-C..##IFN UNICOS (unicos)
-C...##IF XXLARGE (size)
-C...##ELIF LARGE XLARGE (size)
-C...##ELIF MEDIUM (size)
-C....##IF T3D (t3d2)
-C....##ELIF TERRA (t3d2)
-C....##ELIF ALPHA (t3d2)
-C....##ELIF T3E (t3d2)
-C....##ELSE (t3d2)
- PARAMETER (HEAPDM=2048000)
-C....##ENDIF (t3d2)
-C...##ELIF SMALL (size)
-C...##ELIF REDUCE (size)
-C...##ELIF XSMALL (size)
-C...##ELSE (size)
-C...##ENDIF (size)
- INTEGER FREEHP,HEAPSZ,HEAP
- COMMON /HEAPST/ FREEHP,HEAPSZ,HEAP(HEAPDM)
- LOGICAL LHEAP(HEAPDM)
- EQUIVALENCE (LHEAP,HEAP)
-C..##ELSE (unicos)
-C..##ENDIF (unicos)
-C..##IF SAVEFCM (save)
-C..##ENDIF (save)
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/fast.fcm'
- INTEGER IACNB, NITCC, ICUSED, FASTER, LFAST, LMACH, OLMACH
- INTEGER ICCOUNT, LOWTP, IGCNB, NITCC2
- INTEGER ICCNBA, ICCNBB, ICCNBC, ICCNBD, LCCNBA, LCCNBD
- COMMON /FASTI/ FASTER, LFAST, LMACH, OLMACH, NITCC, NITCC2,
- & ICUSED(MAXATC), ICCOUNT(MAXATC), LOWTP(MAXATC),
- & IACNB(MAXAIM), IGCNB(MAXATC),
- & ICCNBA, ICCNBB, ICCNBC, ICCNBD, LCCNBA, LCCNBD
-C..##IF SAVEFCM
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/deriv.fcm'
- REAL*8 DX,DY,DZ
- COMMON /DERIVR/ DX(MAXAIM),DY(MAXAIM),DZ(MAXAIM)
-C..##IF SAVEFCM
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/energy.fcm'
- INTEGER LENENP, LENENT, LENENV, LENENA
- PARAMETER (LENENP = 50, LENENT = 70, LENENV = 50,
- & LENENA = LENENP + LENENT + LENENV )
- INTEGER TOTE, TOTKE, EPOT, TEMPS, GRMS, BPRESS, PJNK1, PJNK2,
- & PJNK3, PJNK4, HFCTE, HFCKE, EHFC, EWORK, VOLUME, PRESSE,
- & PRESSI, VIRI, VIRE, VIRKE, TEPR, PEPR, KEPR, KEPR2,
- & DROFFA,
- & XTLTE, XTLKE, XTLPE, XTLTEM, XTLPEP, XTLKEP, XTLKP2,
- & TOT4, TOTK4, EPOT4, TEM4, MbMom, BodyT, PartT
-C..##IF ACE
- & , SELF, SCREEN, COUL ,SOLV, INTER
-C..##ENDIF
-C..##IF FLUCQ
- & ,FQKIN
-C..##ENDIF
- PARAMETER (TOTE = 1, TOTKE = 2, EPOT = 3, TEMPS = 4,
- & GRMS = 5, BPRESS = 6, PJNK1 = 7, PJNK2 = 8,
- & PJNK3 = 9, PJNK4 = 10, HFCTE = 11, HFCKE = 12,
- & EHFC = 13, EWORK = 11, VOLUME = 15, PRESSE = 16,
- & PRESSI = 17, VIRI = 18, VIRE = 19, VIRKE = 20,
- & TEPR = 21, PEPR = 22, KEPR = 23, KEPR2 = 24,
- & DROFFA = 26, XTLTE = 27, XTLKE = 28,
- & XTLPE = 29, XTLTEM = 30, XTLPEP = 31, XTLKEP = 32,
- & XTLKP2 = 33,
- & TOT4 = 37, TOTK4 = 38, EPOT4 = 39, TEM4 = 40,
- & MbMom = 41, BodyT = 42, PartT = 43
-C..##IF ACE
- & , SELF = 45, SCREEN = 46, COUL = 47,
- & SOLV = 48, INTER = 49
-C..##ENDIF
-C..##IF FLUCQ
- & ,FQKIN = 50
-C..##ENDIF
- & )
-C..##IF ACE
-C..##ENDIF
-C..##IF GRID
-C..##ENDIF
-C..##IF FLUCQ
-C..##ENDIF
- INTEGER BOND, ANGLE, UREYB, DIHE, IMDIHE, VDW, ELEC, HBOND,
- & USER, CHARM, CDIHE, CINTCR, CQRT, NOE, SBNDRY,
- & IMVDW, IMELEC, IMHBND, EWKSUM, EWSELF, EXTNDE, RXNFLD,
- & ST2, IMST2, TSM, QMEL, QMVDW, ASP, EHARM, GEO, MDIP,
- & PRMS, PANG, SSBP, BK4D, SHEL, RESD, SHAP,
- & STRB, OOPL, PULL, POLAR, DMC, RGY, EWEXCL, EWQCOR,
- & EWUTIL, PBELEC, PBNP, PINT, MbDefrm, MbElec, STRSTR,
- & BNDBND, BNDTW, EBST, MBST, BBT, SST, GBEnr, GSBP
-C..##IF HMCM
- & , HMCM
-C..##ENDIF
-C..##IF ADUMB
- & , ADUMB
-C..##ENDIF
- & , HYDR
-C..##IF FLUCQ
- & , FQPOL
-C..##ENDIF
- PARAMETER (BOND = 1, ANGLE = 2, UREYB = 3, DIHE = 4,
- & IMDIHE = 5, VDW = 6, ELEC = 7, HBOND = 8,
- & USER = 9, CHARM = 10, CDIHE = 11, CINTCR = 12,
- & CQRT = 13, NOE = 14, SBNDRY = 15, IMVDW = 16,
- & IMELEC = 17, IMHBND = 18, EWKSUM = 19, EWSELF = 20,
- & EXTNDE = 21, RXNFLD = 22, ST2 = 23, IMST2 = 24,
- & TSM = 25, QMEL = 26, QMVDW = 27, ASP = 28,
- & EHARM = 29, GEO = 30, MDIP = 31, PINT = 32,
- & PRMS = 33, PANG = 34, SSBP = 35, BK4D = 36,
- & SHEL = 37, RESD = 38, SHAP = 39, STRB = 40,
- & OOPL = 41, PULL = 42, POLAR = 43, DMC = 44,
- & RGY = 45, EWEXCL = 46, EWQCOR = 47, EWUTIL = 48,
- & PBELEC = 49, PBNP = 50, MbDefrm= 51, MbElec = 52,
- & STRSTR = 53, BNDBND = 54, BNDTW = 55, EBST = 56,
- & MBST = 57, BBT = 58, SST = 59, GBEnr = 60,
- & GSBP = 65
-C..##IF HMCM
- & , HMCM = 61
-C..##ENDIF
-C..##IF ADUMB
- & , ADUMB = 62
-C..##ENDIF
- & , HYDR = 63
-C..##IF FLUCQ
- & , FQPOL = 65
-C..##ENDIF
- & )
- INTEGER VEXX, VEXY, VEXZ, VEYX, VEYY, VEYZ, VEZX, VEZY, VEZZ,
- & VIXX, VIXY, VIXZ, VIYX, VIYY, VIYZ, VIZX, VIZY, VIZZ,
- & PEXX, PEXY, PEXZ, PEYX, PEYY, PEYZ, PEZX, PEZY, PEZZ,
- & PIXX, PIXY, PIXZ, PIYX, PIYY, PIYZ, PIZX, PIZY, PIZZ
- PARAMETER ( VEXX = 1, VEXY = 2, VEXZ = 3, VEYX = 4,
- & VEYY = 5, VEYZ = 6, VEZX = 7, VEZY = 8,
- & VEZZ = 9,
- & VIXX = 10, VIXY = 11, VIXZ = 12, VIYX = 13,
- & VIYY = 14, VIYZ = 15, VIZX = 16, VIZY = 17,
- & VIZZ = 18,
- & PEXX = 19, PEXY = 20, PEXZ = 21, PEYX = 22,
- & PEYY = 23, PEYZ = 24, PEZX = 25, PEZY = 26,
- & PEZZ = 27,
- & PIXX = 28, PIXY = 29, PIXZ = 30, PIYX = 31,
- & PIYY = 32, PIYZ = 33, PIZX = 34, PIZY = 35,
- & PIZZ = 36)
- CHARACTER*4 CEPROP, CETERM, CEPRSS
- COMMON /ANER/ CEPROP(LENENP), CETERM(LENENT), CEPRSS(LENENV)
- LOGICAL QEPROP, QETERM, QEPRSS
- COMMON /QENER/ QEPROP(LENENP), QETERM(LENENT), QEPRSS(LENENV)
- REAL*8 EPROP, ETERM, EPRESS
- COMMON /ENER/ EPROP(LENENP), ETERM(LENENT), EPRESS(LENENV)
-C..##IF SAVEFCM
-C..##ENDIF
- REAL*8 EPRPA, EPRP2A, EPRPP, EPRP2P,
- & ETRMA, ETRM2A, ETRMP, ETRM2P,
- & EPRSA, EPRS2A, EPRSP, EPRS2P
- COMMON /ENACCM/ EPRPA(LENENP), ETRMA(LENENT), EPRSA(LENENV),
- & EPRP2A(LENENP),ETRM2A(LENENT),EPRS2A(LENENV),
- & EPRPP(LENENP), ETRMP(LENENT), EPRSP(LENENV),
- & EPRP2P(LENENP),ETRM2P(LENENT),EPRS2P(LENENV)
-C..##IF SAVEFCM
-C..##ENDIF
- INTEGER ECALLS, TOT1ST, TOT2ND
- COMMON /EMISCI/ ECALLS, TOT1ST, TOT2ND
- REAL*8 EOLD, FITA, DRIFTA, EAT0A, CORRA, FITP, DRIFTP,
- & EAT0P, CORRP
- COMMON /EMISCR/ EOLD, FITA, DRIFTA, EAT0A, CORRA,
- & FITP, DRIFTP, EAT0P, CORRP
-C..##IF SAVEFCM
-C..##ENDIF
-C..##IF ACE
-C..##ENDIF
-C..##IF FLUCQ
-C..##ENDIF
-C..##IF ADUMB
-C..##ENDIF
-C..##IF GRID
-C..##ENDIF
-C..##IF FLUCQ
-C..##ENDIF
-C..##IF TSM
- REAL*8 TSMTRM(LENENT),TSMTMP(LENENT)
- COMMON /TSMENG/ TSMTRM,TSMTMP
-C...##IF SAVEFCM
-C...##ENDIF
-C..##ENDIF
- REAL*8 EHQBM
- LOGICAL HQBM
- COMMON /HQBMVAR/HQBM
-C..##IF SAVEFCM
-C..##ENDIF
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/dimb.fcm'
-C..##IF DIMB (dimbfcm)
- INTEGER NPARMX,MNBCMP,LENDSK
- PARAMETER (NPARMX=1000,MNBCMP=300,LENDSK=200000)
- INTEGER IJXXCM,IJXYCM,IJXZCM,IJYXCM,IJYYCM
- INTEGER IJYZCM,IJZXCM,IJZYCM,IJZZCM
- INTEGER IIXXCM,IIXYCM,IIXZCM,IIYYCM
- INTEGER IIYZCM,IIZZCM
- INTEGER JJXXCM,JJXYCM,JJXZCM,JJYYCM
- INTEGER JJYZCM,JJZZCM
- PARAMETER (IJXXCM=1,IJXYCM=2,IJXZCM=3,IJYXCM=4,IJYYCM=5)
- PARAMETER (IJYZCM=6,IJZXCM=7,IJZYCM=8,IJZZCM=9)
- PARAMETER (IIXXCM=1,IIXYCM=2,IIXZCM=3,IIYYCM=4)
- PARAMETER (IIYZCM=5,IIZZCM=6)
- PARAMETER (JJXXCM=1,JJXYCM=2,JJXZCM=3,JJYYCM=4)
- PARAMETER (JJYZCM=5,JJZZCM=6)
- INTEGER ITER,IPAR1,IPAR2,NFSAV,PINBCM,PJNBCM,PDD1CM,LENCMP
- LOGICAL QDISK,QDW,QCMPCT
- COMMON /DIMBI/ ITER,IPAR1,IPAR2,NFSAV,PINBCM,PJNBCM,LENCMP
- COMMON /DIMBL/ QDISK,QDW,QCMPCT
-C...##IF SAVEFCM
-C...##ENDIF
-C..##ENDIF (dimbfcm)
-C-----------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C:::##INCLUDE '~/charmm_fcm/ctitla.fcm'
- INTEGER MAXTIT
- PARAMETER (MAXTIT=32)
- INTEGER NTITLA,NTITLB
- CHARACTER*80 TITLEA,TITLEB
- COMMON /NTITLA/ NTITLA,NTITLB
- COMMON /CTITLA/ TITLEA(MAXTIT),TITLEB(MAXTIT)
-C..##IF SAVEFCM
-C..##ENDIF
-C-----------------------------------------------------------------------
-C Passed variables
- INTEGER NAT3,NADD,NPAR,NFREG,NFRET,BLATOM
- INTEGER ATMPAR(2,*),ATMPAS(2,*),ATMPAD(2,*)
- INTEGER BNBND(*),BIMAG(*)
- INTEGER INBCMP(*),JNBCMP(*),PARDIM
- INTEGER ITMX,IUNMOD,IUNRMD,SAVF
- INTEGER NBOND,IB(*),JB(*)
- REAL*8 X(*),Y(*),Z(*),AMASS(*),DDSCR(*)
- REAL*8 DDV(NAT3,*),PARDDV(PARDIM,*),DDM(*),DDS(*)
- REAL*8 DDF(*),PARDDF(*),DDEV(*),PARDDE(*)
- REAL*8 DD1BLK(*),DD1BLL(*),DD1CMP(*)
- REAL*8 TOLDIM,DDVALM
- REAL*8 PARFRQ,CUTF1
- LOGICAL LNOMA,LRAISE,LSCI,LBIG
-C Local variables
- INTEGER NATOM,NATP,NDIM,I,J,II,OLDFAS,OLDPRN,IUPD
- INTEGER NPARC,NPARD,NPARS,NFCUT1,NFREG2,NFREG6
- INTEGER IH1,IH2,IH3,IH4,IH5,IH6,IH7,IH8
- INTEGER IS1,IS2,IS3,IS4,JSPACE,JSP,DDSS,DD5
- INTEGER ISTRT,ISTOP,IPA1,IPA2,IRESF
- INTEGER ATMPAF,INIDS,TRAROT
- INTEGER SUBLIS,ATMCOR
- INTEGER NFRRES,DDVBAS
- INTEGER DDV2,DDVAL
- INTEGER LENCM,NTR,NFRE,NFC,N1,N2,NFCUT,NSUBP
- INTEGER SCIFV1,SCIFV2,SCIFV3,SCIFV4,SCIFV6
- INTEGER DRATQ,ERATQ,E2RATQ,BDRATQ,INRATQ
- INTEGER I620,I640,I660,I700,I720,I760,I800,I840,I880,I920
- REAL*8 CVGMX,TOLER
- LOGICAL LCARD,LAPPE,LPURG,LWDINI,QCALC,QMASWT,QMIX,QDIAG
-C Begin
- QCALC=.TRUE.
- LWDINI=.FALSE.
- INIDS=0
- IS3=0
- IS4=0
- LPURG=.TRUE.
- ITER=0
- NADD=0
- NFSAV=0
- TOLER=TENM5
- QDIAG=.TRUE.
- CVGMX=HUNDRD
- QMIX=.FALSE.
- NATOM=NAT3/3
- NFREG6=(NFREG-6)/NPAR
- NFREG2=NFREG/2
- NFRRES=(NFREG+6)/2
- IF(NFREG.GT.PARDIM) CALL WRNDIE(-3,'<NMDIMB>',
- 1 'NFREG IS LARGER THAN PARDIM*3')
-C
-C ALLOCATE-SPACE-FOR-TRANSROT-VECTORS
- ASSIGN 801 TO I800
- GOTO 800
- 801 CONTINUE
-C ALLOCATE-SPACE-FOR-DIAGONALIZATION
- ASSIGN 721 TO I720
- GOTO 720
- 721 CONTINUE
-C ALLOCATE-SPACE-FOR-REDUCED-BASIS
- ASSIGN 761 TO I760
- GOTO 760
- 761 CONTINUE
-C ALLOCATE-SPACE-FOR-OTHER-ARRAYS
- ASSIGN 921 TO I920
- GOTO 920
- 921 CONTINUE
-C
-C Space allocation for working arrays of EISPACK
-C diagonalization subroutines
- IF(LSCI) THEN
-C ALLOCATE-SPACE-FOR-LSCI
- ASSIGN 841 TO I840
- GOTO 840
- 841 CONTINUE
- ELSE
-C ALLOCATE-DUMMY-SPACE-FOR-LSCI
- ASSIGN 881 TO I880
- GOTO 880
- 881 CONTINUE
- ENDIF
- QMASWT=(.NOT.LNOMA)
- IF(.NOT. QDISK) THEN
- LENCM=INBCMP(NATOM-1)*9+NATOM*6
- DO I=1,LENCM
- DD1CMP(I)=0.0
- ENDDO
- OLDFAS=LFAST
- QCMPCT=.TRUE.
- LFAST = -1
- CALL ENERGY(X,Y,Z,DX,DY,DZ,BNBND,BIMAG,NAT3,DD1CMP,.TRUE.,1)
- LFAST=OLDFAS
- QCMPCT=.FALSE.
-C
-C Mass weight DD1CMP matrix
-C
- CALL MASSDD(DD1CMP,DDM,INBCMP,JNBCMP,NATOM)
- ELSE
- CALL WRNDIE(-3,'<NMDIMB>','QDISK OPTION NOT SUPPORTED YET')
-C DO I=1,LENDSK
-C DD1CMP(I)=0.0
-C ENDDO
-C OLDFAS=LFAST
-C LFAST = -1
- ENDIF
-C
-C Fill DDV with six translation-rotation vectors
-C
- CALL TRROT(X,Y,Z,DDV,NAT3,1,DDM)
- CALL CPARAY(HEAP(TRAROT),DDV,NAT3,1,6,1)
- NTR=6
- OLDPRN=PRNLEV
- PRNLEV=1
- CALL ORTHNM(1,6,NTR,HEAP(TRAROT),NAT3,.FALSE.,TOLER)
- PRNLEV=OLDPRN
- IF(IUNRMD .LT. 0) THEN
-C
-C If no previous basis is read
-C
- IF(PRNLEV.GE.2) WRITE(OUTU,502) NPAR
- 502 FORMAT(/' NMDIMB: Calculating initial basis from block ',
- 1 'diagonals'/' NMDIMB: The number of blocks is ',I5/)
- NFRET = 6
- DO I=1,NPAR
- IS1=ATMPAR(1,I)
- IS2=ATMPAR(2,I)
- NDIM=(IS2-IS1+1)*3
- NFRE=NDIM
- IF(NFRE.GT.NFREG6) NFRE=NFREG6
- IF(NFREG6.EQ.0) NFRE=1
- CALL FILUPT(HEAP(IUPD),NDIM)
- CALL MAKDDU(DD1BLK,DD1CMP,INBCMP,JNBCMP,HEAP(IUPD),
- 1 IS1,IS2,NATOM)
- IF(PRNLEV.GE.9) CALL PRINTE(OUTU,EPROP,ETERM,'VIBR',
- 1 'ENR',.TRUE.,1,ZERO,ZERO)
-C
-C Generate the lower section of the matrix and diagonalize
-C
-C..##IF EISPACK
-C..##ENDIF
- IH1=1
- NATP=NDIM+1
- IH2=IH1+NATP
- IH3=IH2+NATP
- IH4=IH3+NATP
- IH5=IH4+NATP
- IH6=IH5+NATP
- IH7=IH6+NATP
- IH8=IH7+NATP
- CALL DIAGQ(NDIM,NFRE,DD1BLK,PARDDV,DDS(IH2),DDS(IH3),
- 1 DDS(IH4),DDS(IH5),DDS,DDS(IH6),DDS(IH7),DDS(IH8),NADD)
-C..##IF EISPACK
-C..##ENDIF
-C
-C Put the PARDDV vectors into DDV and replace the elements which do
-C not belong to the considered partitioned region by zeros.
-C
- CALL ADJNME(DDV,PARDDV,NAT3,NDIM,NFRE,NFRET,IS1,IS2)
- IF(LSCI) THEN
- DO J=1,NFRE
- PARDDF(J)=CNVFRQ*SQRT(ABS(PARDDE(J)))
- IF(PARDDE(J) .LT. 0.0) PARDDF(J)=-PARDDF(J)
- ENDDO
- ELSE
- DO J=1,NFRE
- PARDDE(J)=DDS(J)
- PARDDF(J)=CNVFRQ*SQRT(ABS(PARDDE(J)))
- IF(PARDDE(J) .LT. 0.0) PARDDF(J)=-PARDDF(J)
- ENDDO
- ENDIF
- IF(PRNLEV.GE.2) THEN
- WRITE(OUTU,512) I
- WRITE(OUTU,514)
- WRITE(OUTU,516) (J,PARDDF(J),J=1,NFRE)
- ENDIF
- NFRET=NFRET+NFRE
- IF(NFRET .GE. NFREG) GOTO 10
- ENDDO
- 512 FORMAT(/' NMDIMB: Diagonalization of part',I5,' completed')
- 514 FORMAT(' NMDIMB: Frequencies'/)
- 516 FORMAT(5(I4,F12.6))
- 10 CONTINUE
-C
-C Orthonormalize the eigenvectors
-C
- OLDPRN=PRNLEV
- PRNLEV=1
- CALL ORTHNM(1,NFRET,NFRET,DDV,NAT3,LPURG,TOLER)
- PRNLEV=OLDPRN
-C
-C Do reduced basis diagonalization using the DDV vectors
-C and get eigenvectors of zero iteration
-C
- IF(PRNLEV.GE.2) THEN
- WRITE(OUTU,521) ITER
- WRITE(OUTU,523) NFRET
- ENDIF
- 521 FORMAT(/' NMDIMB: Iteration number = ',I5)
- 523 FORMAT(' NMDIMB: Dimension of the reduced basis set = ',I5)
- IF(LBIG) THEN
- IF(PRNLEV.GE.2) WRITE(OUTU,585) NFRET,IUNMOD
- 525 FORMAT(' NMDIMB: ',I5,' basis vectors are saved in unit',I5)
- REWIND (UNIT=IUNMOD)
- LCARD=.FALSE.
- CALL WRTNMD(LCARD,1,NFRET,NAT3,DDV,DDSCR,DDEV,IUNMOD,AMASS)
- CALL SAVEIT(IUNMOD)
- ELSE
- CALL CPARAY(HEAP(DDVBAS),DDV,NAT3,1,NFRET,1)
- ENDIF
- CALL RBDG(X,Y,Z,NAT3,NDIM,NFRET,DDV,DDF,DDEV,
- 1 DDSCR,HEAP(DD5),HEAP(DDSS),HEAP(DDV2),NADD,
- 2 INBCMP,JNBCMP,HEAP(DDVBAS),DD1CMP,QMIX,0,0,IS3,IS4,
- 3 CUTF1,NFCUT1,NFREG,HEAP(IUPD),DD1BLL,HEAP(SCIFV1),
- 4 HEAP(SCIFV2),HEAP(SCIFV3),HEAP(SCIFV4),HEAP(SCIFV6),
- 5 HEAP(DRATQ),HEAP(ERATQ),HEAP(E2RATQ),
- 6 HEAP(BDRATQ),HEAP(INRATQ),LSCI,LBIG,IUNMOD)
-C
-C DO-THE-DIAGONALISATIONS-WITH-RESIDUALS
-C
- ASSIGN 621 TO I620
- GOTO 620
- 621 CONTINUE
-C SAVE-MODES
- ASSIGN 701 TO I700
- GOTO 700
- 701 CONTINUE
- IF(ITER.EQ.ITMX) THEN
- CALL CLEANHP(NAT3,NFREG,NPARD,NSUBP,PARDIM,DDV2,DDSS,DDVBAS,
- 1 DDVAL,JSPACE,TRAROT,
- 2 SCIFV1,SCIFV2,SCIFV3,SCIFV4,SCIFV6,
- 3 DRATQ,ERATQ,E2RATQ,BDRATQ,INRATQ,IUPD,ATMPAF,
- 4 ATMCOR,SUBLIS,LSCI,QDW,LBIG)
- RETURN
- ENDIF
- ELSE
-C
-C Read in existing basis
-C
- IF(PRNLEV.GE.2) THEN
- WRITE(OUTU,531)
- 531 FORMAT(/' NMDIMB: Calculations restarted')
- ENDIF
-C READ-MODES
- ISTRT=1
- ISTOP=99999999
- LCARD=.FALSE.
- LAPPE=.FALSE.
- CALL RDNMD(LCARD,NFRET,NFREG,NAT3,NDIM,
- 1 DDV,DDSCR,DDF,DDEV,
- 2 IUNRMD,LAPPE,ISTRT,ISTOP)
- NFRET=NDIM
- IF(NFRET.GT.NFREG) THEN
- NFRET=NFREG
- CALL WRNDIE(-1,'<NMDIMB>',
- 1 'Not enough space to hold the basis. Increase NMODes')
- ENDIF
-C PRINT-MODES
- IF(PRNLEV.GE.2) THEN
- WRITE(OUTU,533) NFRET,IUNRMD
- WRITE(OUTU,514)
- WRITE(OUTU,516) (J,DDF(J),J=1,NFRET)
- ENDIF
- 533 FORMAT(/' NMDIMB: ',I5,' restart modes read from unit ',I5)
- NFRRES=NFRET
- ENDIF
-C
-C -------------------------------------------------
-C Here starts the mixed-basis diagonalization part.
-C -------------------------------------------------
-C
-C
-C Check cut-off frequency
-C
- CALL SELNMD(DDF,NFRET,CUTF1,NFCUT1)
-C TEST-NFCUT1
- IF(IUNRMD.LT.0) THEN
- IF(NFCUT1*2-6.GT.NFREG) THEN
- IF(PRNLEV.GE.2) WRITE(OUTU,537) DDF(NFRRES)
- NFCUT1=NFRRES
- CUTF1=DDF(NFRRES)
- ENDIF
- ELSE
- CUTF1=DDF(NFRRES)
- ENDIF
- 537 FORMAT(/' NMDIMB: Too many vectors for the given cutoff frequency'
- 1 /' Cutoff frequency is decreased to',F9.3)
-C
-C Compute the new partioning of the molecule
-C
- CALL PARTIC(NAT3,NFREG,NFCUT1,NPARMX,NPARC,ATMPAR,NFRRES,
- 1 PARDIM)
- NPARS=NPARC
- DO I=1,NPARC
- ATMPAS(1,I)=ATMPAR(1,I)
- ATMPAS(2,I)=ATMPAR(2,I)
- ENDDO
- IF(QDW) THEN
- IF(IPAR1.EQ.0.OR.IPAR2.EQ.0) LWDINI=.TRUE.
- IF(IPAR1.GE.IPAR2) LWDINI=.TRUE.
- IF(IABS(IPAR1).GT.NPARC*2) LWDINI=.TRUE.
- IF(IABS(IPAR2).GT.NPARC*2) LWDINI=.TRUE.
- IF(ITER.EQ.0) LWDINI=.TRUE.
- ENDIF
- ITMX=ITMX+ITER
- IF(PRNLEV.GE.2) THEN
- WRITE(OUTU,543) ITER,ITMX
- IF(QDW) WRITE(OUTU,545) IPAR1,IPAR2
- ENDIF
- 543 FORMAT(/' NMDIMB: Previous iteration number = ',I8/
- 1 ' NMDIMB: Iteration number to reach = ',I8)
- 545 FORMAT(' NMDIMB: Previous sub-blocks = ',I5,2X,I5)
-C
- IF(SAVF.LE.0) SAVF=NPARC
- IF(PRNLEV.GE.2) WRITE(OUTU,547) SAVF
- 547 FORMAT(' NMDIMB: Eigenvectors will be saved every',I5,
- 1 ' iterations')
-C
-C If double windowing is defined, the original block sizes are divided
-C in two.
-C
- IF(QDW) THEN
- NSUBP=1
- CALL PARTID(NPARC,ATMPAR,NPARD,ATMPAD,NPARMX)
- ATMPAF=ALLHP(INTEG4(NPARD*NPARD))
- ATMCOR=ALLHP(INTEG4(NATOM))
- DDVAL=ALLHP(IREAL8(NPARD*NPARD))
- CALL CORARR(ATMPAD,NPARD,HEAP(ATMCOR),NATOM)
- CALL PARLIS(HEAP(ATMCOR),HEAP(ATMPAF),INBCMP,JNBCMP,NPARD,
- 2 NSUBP,NATOM,X,Y,Z,NBOND,IB,JB,DD1CMP,HEAP(DDVAL),DDVALM)
- SUBLIS=ALLHP(INTEG4(NSUBP*2))
- CALL PARINT(HEAP(ATMPAF),NPARD,HEAP(SUBLIS),NSUBP)
- CALL INIPAF(HEAP(ATMPAF),NPARD)
-C
-C Find out with which block to continue (double window method only)
-C
- IPA1=IPAR1
- IPA2=IPAR2
- IRESF=0
- IF(LWDINI) THEN
- ITER=0
- LWDINI=.FALSE.
- GOTO 500
- ENDIF
- DO II=1,NSUBP
- CALL IPART(HEAP(SUBLIS),II,IPAR1,IPAR2,HEAP(ATMPAF),
- 1 NPARD,QCALC)
- IF((IPAR1.EQ.IPA1).AND.(IPAR2.EQ.IPA2)) GOTO 500
- ENDDO
- ENDIF
- 500 CONTINUE
-C
-C Main loop.
-C
- DO WHILE((CVGMX.GT.TOLDIM).AND.(ITER.LT.ITMX))
- IF(.NOT.QDW) THEN
- ITER=ITER+1
- IF(PRNLEV.GE.2) WRITE(OUTU,553) ITER
- 553 FORMAT(/' NMDIMB: Iteration number = ',I8)
- IF(INIDS.EQ.0) THEN
- INIDS=1
- ELSE
- INIDS=0
- ENDIF
- CALL PARTDS(NAT3,NPARC,ATMPAR,NPARS,ATMPAS,INIDS,NPARMX,
- 1 DDF,NFREG,CUTF1,PARDIM,NFCUT1)
-C DO-THE-DIAGONALISATIONS
- ASSIGN 641 to I640
- GOTO 640
- 641 CONTINUE
- QDIAG=.FALSE.
-C DO-THE-DIAGONALISATIONS-WITH-RESIDUALS
- ASSIGN 622 TO I620
- GOTO 620
- 622 CONTINUE
- QDIAG=.TRUE.
-C SAVE-MODES
- ASSIGN 702 TO I700
- GOTO 700
- 702 CONTINUE
-C
- ELSE
- DO II=1,NSUBP
- CALL IPART(HEAP(SUBLIS),II,IPAR1,IPAR2,HEAP(ATMPAF),
- 1 NPARD,QCALC)
- IF(QCALC) THEN
- IRESF=IRESF+1
- ITER=ITER+1
- IF(PRNLEV.GE.2) WRITE(OUTU,553) ITER
-C DO-THE-DWIN-DIAGONALISATIONS
- ASSIGN 661 TO I660
- GOTO 660
- 661 CONTINUE
- ENDIF
- IF((IRESF.EQ.SAVF).OR.(ITER.EQ.ITMX)) THEN
- IRESF=0
- QDIAG=.FALSE.
-C DO-THE-DIAGONALISATIONS-WITH-RESIDUALS
- ASSIGN 623 TO I620
- GOTO 620
- 623 CONTINUE
- QDIAG=.TRUE.
- IF((CVGMX.LE.TOLDIM).OR.(ITER.EQ.ITMX)) GOTO 600
-C SAVE-MODES
- ASSIGN 703 TO I700
- GOTO 700
- 703 CONTINUE
- ENDIF
- ENDDO
- ENDIF
- ENDDO
- 600 CONTINUE
-C
-C SAVE-MODES
- ASSIGN 704 TO I700
- GOTO 700
- 704 CONTINUE
- CALL CLEANHP(NAT3,NFREG,NPARD,NSUBP,PARDIM,DDV2,DDSS,DDVBAS,
- 1 DDVAL,JSPACE,TRAROT,
- 2 SCIFV1,SCIFV2,SCIFV3,SCIFV4,SCIFV6,
- 3 DRATQ,ERATQ,E2RATQ,BDRATQ,INRATQ,IUPD,ATMPAF,
- 4 ATMCOR,SUBLIS,LSCI,QDW,LBIG)
- RETURN
-C-----------------------------------------------------------------------
-C INTERNAL PROCEDURES
-C-----------------------------------------------------------------------
-C TO DO-THE-DIAGONALISATIONS-WITH-RESIDUALS
- 620 CONTINUE
- IF(IUNRMD.LT.0) THEN
- CALL SELNMD(DDF,NFRET,CUTF1,NFC)
- N1=NFCUT1
- N2=(NFRET+6)/2
- NFCUT=MAX(N1,N2)
- IF(NFCUT*2-6 .GT. NFREG) THEN
- NFCUT=(NFREG+6)/2
- CUTF1=DDF(NFCUT)
- IF(PRNLEV.GE.2) THEN
- WRITE(OUTU,562) ITER
- WRITE(OUTU,564) CUTF1
- ENDIF
- ENDIF
- ELSE
- NFCUT=NFRET
- NFC=NFRET
- ENDIF
- 562 FORMAT(/' NMDIMB: Not enough space to hold the residual vectors'/
- 1 ' into DDV array during iteration ',I5)
- 564 FORMAT(' Cutoff frequency is changed to ',F9.3)
-C
-C do reduced diagonalization with preceding eigenvectors plus
-C residual vectors
-C
- ISTRT=1
- ISTOP=NFCUT
- CALL CLETR(DDV,HEAP(TRAROT),NAT3,ISTRT,ISTOP,NFCUT,DDEV,DDF)
- CALL RNMTST(DDV,HEAP(DDVBAS),NAT3,DDSCR,DD1CMP,INBCMP,JNBCMP,
- 2 7,NFCUT,CVGMX,NFCUT,NFC,QDIAG,LBIG,IUNMOD)
- NFSAV=NFCUT
- IF(QDIAG) THEN
- NFRET=NFCUT*2-6
- IF(PRNLEV.GE.2) WRITE(OUTU,566) NFRET
- 566 FORMAT(/' NMDIMB: Diagonalization with residual vectors. '/
- 1 ' Dimension of the reduced basis set'/
- 2 ' before orthonormalization = ',I5)
- NFCUT=NFRET
- OLDPRN=PRNLEV
- PRNLEV=1
- CALL ORTHNM(1,NFRET,NFCUT,DDV,NAT3,LPURG,TOLER)
- PRNLEV=OLDPRN
- NFRET=NFCUT
- IF(PRNLEV.GE.2) WRITE(OUTU,568) NFRET
- 568 FORMAT(' after orthonormalization = ',I5)
- IF(LBIG) THEN
- IF(PRNLEV.GE.2) WRITE(OUTU,570) NFCUT,IUNMOD
- 570 FORMAT(' NMDIMB: ',I5,' basis vectors are saved in unit',I5)
- REWIND (UNIT=IUNMOD)
- LCARD=.FALSE.
- CALL WRTNMD(LCARD,1,NFCUT,NAT3,DDV,DDSCR,DDEV,IUNMOD,AMASS)
- CALL SAVEIT(IUNMOD)
- ELSE
- CALL CPARAY(HEAP(DDVBAS),DDV,NAT3,1,NFCUT,1)
- ENDIF
- QMIX=.FALSE.
- CALL RBDG(X,Y,Z,NAT3,NDIM,NFRET,DDV,DDF,DDEV,
- 1 DDSCR,HEAP(DD5),HEAP(DDSS),HEAP(DDV2),NADD,
- 2 INBCMP,JNBCMP,HEAP(DDVBAS),DD1CMP,QMIX,0,0,IS3,IS4,
- 3 CUTF1,NFCUT1,NFREG,HEAP(IUPD),DD1BLL,HEAP(SCIFV1),
- 4 HEAP(SCIFV2),HEAP(SCIFV3),HEAP(SCIFV4),HEAP(SCIFV6),
- 5 HEAP(DRATQ),HEAP(ERATQ),HEAP(E2RATQ),
- 6 HEAP(BDRATQ),HEAP(INRATQ),LSCI,LBIG,IUNMOD)
- CALL SELNMD(DDF,NFRET,CUTF1,NFCUT1)
- ENDIF
- GOTO I620
-C
-C-----------------------------------------------------------------------
-C TO DO-THE-DIAGONALISATIONS
- 640 CONTINUE
- DO I=1,NPARC
- NFCUT1=NFRRES
- IS1=ATMPAR(1,I)
- IS2=ATMPAR(2,I)
- NDIM=(IS2-IS1+1)*3
- IF(PRNLEV.GE.2) WRITE(OUTU,573) I,IS1,IS2
- 573 FORMAT(/' NMDIMB: Mixed diagonalization, part ',I5/
- 1 ' NMDIMB: Block limits: ',I5,2X,I5)
- IF(NDIM+NFCUT1.GT.PARDIM) CALL WRNDIE(-3,'<NMDIMB>',
- 1 'Error in dimension of block')
- NFRET=NFCUT1
- IF(NFRET.GT.NFREG) NFRET=NFREG
- CALL CLETR(DDV,HEAP(TRAROT),NAT3,1,NFCUT1,NFCUT,DDEV,DDF)
- NFCUT1=NFCUT
- CALL ADZER(DDV,1,NFCUT1,NAT3,IS1,IS2)
- NFSAV=NFCUT1
- OLDPRN=PRNLEV
- PRNLEV=1
- CALL ORTHNM(1,NFCUT1,NFCUT,DDV,NAT3,LPURG,TOLER)
- PRNLEV=OLDPRN
- CALL CPARAY(HEAP(DDVBAS),DDV,NAT3,1,NFCUT,1)
- NFRET=NDIM+NFCUT
- QMIX=.TRUE.
- CALL RBDG(X,Y,Z,NAT3,NDIM,NFRET,DDV,DDF,DDEV,
- 1 DDSCR,HEAP(DD5),HEAP(DDSS),HEAP(DDV2),NADD,
- 2 INBCMP,JNBCMP,HEAP(DDVBAS),DD1CMP,QMIX,IS1,IS2,IS3,IS4,
- 3 CUTF1,NFCUT,NFREG,HEAP(IUPD),DD1BLL,HEAP(SCIFV1),
- 4 HEAP(SCIFV2),HEAP(SCIFV3),HEAP(SCIFV4),HEAP(SCIFV6),
- 5 HEAP(DRATQ),HEAP(ERATQ),HEAP(E2RATQ),
- 6 HEAP(BDRATQ),HEAP(INRATQ),LSCI,LBIG,IUNMOD)
- QMIX=.FALSE.
- IF(NFCUT.GT.NFRRES) NFCUT=NFRRES
- NFCUT1=NFCUT
- NFRET=NFCUT
- ENDDO
- GOTO I640
-C
-C-----------------------------------------------------------------------
-C TO DO-THE-DWIN-DIAGONALISATIONS
- 660 CONTINUE
-C
-C Store the DDV vectors into DDVBAS
-C
- NFCUT1=NFRRES
- IS1=ATMPAD(1,IPAR1)
- IS2=ATMPAD(2,IPAR1)
- IS3=ATMPAD(1,IPAR2)
- IS4=ATMPAD(2,IPAR2)
- NDIM=(IS2-IS1+IS4-IS3+2)*3
- IF(PRNLEV.GE.2) WRITE(OUTU,577) IPAR1,IPAR2,IS1,IS2,IS3,IS4
- 577 FORMAT(/' NMDIMB: Mixed double window diagonalization, parts ',
- 1 2I5/
- 2 ' NMDIMB: Block limits: ',I5,2X,I5,4X,I5,2X,I5)
- IF(NDIM+NFCUT1.GT.PARDIM) CALL WRNDIE(-3,'<NMDIMB>',
- 1 'Error in dimension of block')
- NFRET=NFCUT1
- IF(NFRET.GT.NFREG) NFRET=NFREG
-C
-C Prepare the DDV vectors consisting of 6 translations-rotations
-C + eigenvectors from 7 to NFCUT1 + cartesian displacements vectors
-C spanning the atoms from IS1 to IS2
-C
- CALL CLETR(DDV,HEAP(TRAROT),NAT3,1,NFCUT1,NFCUT,DDEV,DDF)
- NFCUT1=NFCUT
- NFSAV=NFCUT1
- CALL ADZERD(DDV,1,NFCUT1,NAT3,IS1,IS2,IS3,IS4)
- OLDPRN=PRNLEV
- PRNLEV=1
- CALL ORTHNM(1,NFCUT1,NFCUT,DDV,NAT3,LPURG,TOLER)
- PRNLEV=OLDPRN
- CALL CPARAY(HEAP(DDVBAS),DDV,NAT3,1,NFCUT,1)
-C
- NFRET=NDIM+NFCUT
- QMIX=.TRUE.
- CALL RBDG(X,Y,Z,NAT3,NDIM,NFRET,DDV,DDF,DDEV,
- 1 DDSCR,HEAP(DD5),HEAP(DDSS),HEAP(DDV2),NADD,
- 2 INBCMP,JNBCMP,HEAP(DDVBAS),DD1CMP,QMIX,IS1,IS2,IS3,IS4,
- 3 CUTF1,NFCUT,NFREG,HEAP(IUPD),DD1BLL,HEAP(SCIFV1),
- 4 HEAP(SCIFV2),HEAP(SCIFV3),HEAP(SCIFV4),HEAP(SCIFV6),
- 5 HEAP(DRATQ),HEAP(ERATQ),HEAP(E2RATQ),
- 6 HEAP(BDRATQ),HEAP(INRATQ),LSCI,LBIG,IUNMOD)
- QMIX=.FALSE.
-C
- IF(NFCUT.GT.NFRRES) NFCUT=NFRRES
- NFCUT1=NFCUT
- NFRET=NFCUT
- GOTO I660
-C
-C-----------------------------------------------------------------------
-C TO SAVE-MODES
- 700 CONTINUE
- IF(PRNLEV.GE.2) WRITE(OUTU,583) IUNMOD
- 583 FORMAT(/' NMDIMB: Saving the eigenvalues and eigenvectors to unit'
- 1 ,I4)
- REWIND (UNIT=IUNMOD)
- ISTRT=1
- ISTOP=NFSAV
- LCARD=.FALSE.
- IF(PRNLEV.GE.2) WRITE(OUTU,585) NFSAV,IUNMOD
- 585 FORMAT(' NMDIMB: ',I5,' modes are saved in unit',I5)
- CALL WRTNMD(LCARD,ISTRT,ISTOP,NAT3,DDV,DDSCR,DDEV,IUNMOD,
- 1 AMASS)
- CALL SAVEIT(IUNMOD)
- GOTO I700
-C
-C-----------------------------------------------------------------------
-C TO ALLOCATE-SPACE-FOR-DIAGONALIZATION
- 720 CONTINUE
- DDV2=ALLHP(IREAL8((PARDIM+3)*(PARDIM+3)))
- JSPACE=IREAL8((PARDIM+4))*8
- JSP=IREAL8(((PARDIM+3)*(PARDIM+4))/2)
- JSPACE=JSPACE+JSP
- DDSS=ALLHP(JSPACE)
- DD5=DDSS+JSPACE-JSP
- GOTO I720
-C
-C-----------------------------------------------------------------------
-C TO ALLOCATE-SPACE-FOR-REDUCED-BASIS
- 760 CONTINUE
- IF(LBIG) THEN
- DDVBAS=ALLHP(IREAL8(NAT3))
- ELSE
- DDVBAS=ALLHP(IREAL8(NFREG*NAT3))
- ENDIF
- GOTO I760
-C
-C-----------------------------------------------------------------------
-C TO ALLOCATE-SPACE-FOR-TRANSROT-VECTORS
- 800 CONTINUE
- TRAROT=ALLHP(IREAL8(6*NAT3))
- GOTO I800
-C
-C-----------------------------------------------------------------------
-C TO ALLOCATE-SPACE-FOR-LSCI
- 840 CONTINUE
- SCIFV1=ALLHP(IREAL8(PARDIM+3))
- SCIFV2=ALLHP(IREAL8(PARDIM+3))
- SCIFV3=ALLHP(IREAL8(PARDIM+3))
- SCIFV4=ALLHP(IREAL8(PARDIM+3))
- SCIFV6=ALLHP(IREAL8(PARDIM+3))
- DRATQ=ALLHP(IREAL8(PARDIM+3))
- ERATQ=ALLHP(IREAL8(PARDIM+3))
- E2RATQ=ALLHP(IREAL8(PARDIM+3))
- BDRATQ=ALLHP(IREAL8(PARDIM+3))
- INRATQ=ALLHP(INTEG4(PARDIM+3))
- GOTO I840
-C
-C-----------------------------------------------------------------------
-C TO ALLOCATE-DUMMY-SPACE-FOR-LSCI
- 880 CONTINUE
- SCIFV1=ALLHP(IREAL8(2))
- SCIFV2=ALLHP(IREAL8(2))
- SCIFV3=ALLHP(IREAL8(2))
- SCIFV4=ALLHP(IREAL8(2))
- SCIFV6=ALLHP(IREAL8(2))
- DRATQ=ALLHP(IREAL8(2))
- ERATQ=ALLHP(IREAL8(2))
- E2RATQ=ALLHP(IREAL8(2))
- BDRATQ=ALLHP(IREAL8(2))
- INRATQ=ALLHP(INTEG4(2))
- GOTO I880
-C
-C-----------------------------------------------------------------------
-C TO ALLOCATE-SPACE-FOR-OTHER-ARRAYS
- 920 CONTINUE
- IUPD=ALLHP(INTEG4(PARDIM+3))
- GOTO I920
-C.##ELSE
-C.##ENDIF
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20020307-1.f b/gcc/testsuite/g77.f-torture/compile/20020307-1.f
deleted file mode 100644
index cfea25bee6a..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20020307-1.f
+++ /dev/null
@@ -1,21 +0,0 @@
- SUBROUTINE SWEEP
- PARAMETER(MAXDIM=4,MAXVEC=4**3*8,MAXT=20)
- REAL*8 B,W1,W2,BNORM,BINV,WT,W0,C1,C2,R1,R2
- DIMENSION B(MAXVEC,0:3),W1(MAXVEC,0:3),W2(MAXVEC,0:3)
- DIMENSION BNORM(MAXVEC),BINV(MAXVEC),WT(MAXVEC),W0(MAXVEC)
- DIMENSION C1(MAXVEC),C2(MAXVEC),R1(MAXVEC),R2(MAXVEC)
- DO 200 ILAT=1,2**IDIM
- DO 200 I1=1,IDIM
- DO 220 I2=1,IDIM
- CALL INTACT(ILAT,I1,I1,W1)
-220 CONTINUE
- DO 310 IATT=1,IDIM
- DO 311 I=1,100
- WT(I)=ONE + C1(I)*LOG(EPS+R1(I))
- IF( R2(I)**2 .LE. (ONE-WT(I)**2) )THEN
- W0(I)=WT(I)
- ENDIF
-311 CONTINUE
-310 CONTINUE
-200 CONTINUE
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20030115-1.c b/gcc/testsuite/g77.f-torture/compile/20030115-1.c
deleted file mode 100644
index ec6f79c718e..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20030115-1.c
+++ /dev/null
@@ -1,14 +0,0 @@
- SUBROUTINE FOO (B)
-
- 10 CALL BAR(A)
- ASSIGN 20 TO M
- IF(100.LT.A) GOTO 10
- GOTO 40
-C
- 20 IF(B.LT.ABS(A)) GOTO 10
- ASSIGN 30 TO M
- GOTO 40
-C
- 30 ASSIGN 10 TO M
- 40 GOTO M,(10,20,30)
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/20030326-1.f b/gcc/testsuite/g77.f-torture/compile/20030326-1.f
deleted file mode 100644
index bcbc73c179b..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/20030326-1.f
+++ /dev/null
@@ -1,14 +0,0 @@
-C PR fortran/9793
-C larson@w6yx.stanford.edu
-C
- integer a, b, c
-
- c = -2147483648 / -1
-
- a = 1
- b = 0
- c = a / b
-
- print *, c
-
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/8485.f b/gcc/testsuite/g77.f-torture/compile/8485.f
deleted file mode 100644
index 95e58fbfc18..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/8485.f
+++ /dev/null
@@ -1,8 +0,0 @@
-C Extracted from PR fortran/8485
- PARAMETER (PPMULT = 1.0E5)
- INTEGER*8 NWRONG
- PARAMETER (NWRONG = 8)
- PARAMETER (DDMULT = PPMULT * NWRONG)
- PRINT 10, DDMULT
-10 FORMAT (F10.3)
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/960317-1.f b/gcc/testsuite/g77.f-torture/compile/960317-1.f
deleted file mode 100644
index 4bb0a37278e..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/960317-1.f
+++ /dev/null
@@ -1,103 +0,0 @@
-* Date: Sat, 16 Mar 1996 19:58:37 -0500 (EST)
-* From: Kate Hedstrom <kate@ahab.Rutgers.EDU>
-* To: burley@gnu.ai.mit.edu
-* Subject: g77 bug in assign
-*
-* I found some files in the NCAR graphics source code which used to
-* compile with g77 and now don't. All contain the following combination
-* of "save" and "assign". It fails on a Sun running SunOS 4.1.3 and a
-* Sun running SunOS 5.5 (slightly older g77), but compiles on an
-* IBM/RS6000:
-*
-C
- SUBROUTINE QUICK
- SAVE
-C
- ASSIGN 101 TO JUMP
- 101 Continue
-C
- RETURN
- END
-*
-* Everything else in the NCAR distribution compiled, including quite a
-* few C routines.
-*
-* Kate
-*
-*
-* nemo% g77 -v -c quick.f
-* gcc -v -c -xf77 quick.f
-* Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.7.2/specs
-* gcc version 2.7.2
-* /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.7.2/f771 quick.f -fset-g77-defaults -quiet -dumpbase quick.f -version -fversion -o /usr/tmp/cca24166.s
-* GNU F77 version 2.7.2 (sparc) compiled by GNU C version 2.7.1.
-* GNU Fortran Front End version 0.5.18-960314 compiled: Mar 16 1996 14:28:11
-* gcc: Internal compiler error: program f771 got fatal signal 11
-*
-*
-* nemo% gdb /usr/local/lib/gcc-lib/*/*/f771 core
-* GDB is free software and you are welcome to distribute copies of it
-* under certain conditions; type "show copying" to see the conditions.
-* There is absolutely no warranty for GDB; type "show warranty" for details.
-* GDB 4.14 (sparc-sun-sunos4.1.3),
-* Copyright 1995 Free Software Foundation, Inc...
-* Core was generated by `f771'.
-* Program terminated with signal 11, Segmentation fault.
-* Couldn't read input and local registers from core file
-* find_solib: Can't read pathname for load map: I/O error
-*
-* Couldn't read input and local registers from core file
-* #0 0x21aa4 in ffecom_sym_transform_assign_ (s=???) at f/com.c:7881
-* 7881 if ((ffesymbol_save (s) || ffe_is_saveall ())
-* (gdb) where
-* #0 0x21aa4 in ffecom_sym_transform_assign_ (s=???) at f/com.c:7881
-* Error accessing memory address 0xefffefcc: Invalid argument.
-* (gdb)
-*
-*
-* ahab% g77 -v -c quick.f
-* gcc -v -c -xf77 quick.f
-* Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/specs
-* gcc version 2.7.2
-* /usr/local/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/f771 quick.f -quiet -dumpbase quick.f -version -fversion -o /var/tmp/cca003D2.s
-* GNU F77 version 2.7.2 (sparc) compiled by GNU C version 2.7.2.
-* GNU Fortran Front End version 0.5.18-960304 compiled: Mar 5 1996 16:12:46
-* gcc: Internal compiler error: program f771 got fatal signal 11
-*
-*
-* ahab% !gdb
-* gdb /usr/local/lib/gcc-lib/*/*/f771 core
-* GDB is free software and you are welcome to distribute copies of it
-* under certain conditions; type "show copying" to see the conditions.
-* There is absolutely no warranty for GDB; type "show warranty" for details.
-* GDB 4.15.1 (sparc-sun-solaris2.4),
-* Copyright 1995 Free Software Foundation, Inc...
-* Core was generated by
-* `/usr/local/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/f771 quick.f -quiet -dumpbase'.
-* Program terminated with signal 11, Segmentation fault.
-* Reading symbols from /usr/lib/libc.so.1...done.
-* Reading symbols from /usr/lib/libdl.so.1...done.
-* #0 0x43e04 in ffecom_sym_transform_assign_ (s=0x3a22f8) at f/com.c:7963
-* Source file is more recent than executable.
-* 7963 assert (st != NULL);
-* (gdb) where
-* #0 0x43e04 in ffecom_sym_transform_assign_ (s=0x3a22f8) at f/com.c:7963
-* #1 0x38044 in ffecom_expr_ (expr=0x3a23c0, dest_tree=0x0, dest=0x0, dest_used=0x0, assignp=true) at f/com.c:2100
-* #2 0x489c8 in ffecom_expr_assign_w (expr=0x3a23c0) at f/com.c:10238
-* #3 0xe9228 in ffeste_R838 (label=0x3a1ba8, target=0x3a23c0) at f/ste.c:2769
-* #4 0xdae60 in ffestd_stmt_pass_ () at f/std.c:840
-* #5 0xdc090 in ffestd_exec_end () at f/std.c:1405
-* #6 0xcb534 in ffestc_shriek_subroutine_ (ok=true) at f/stc.c:4849
-* #7 0xd8f00 in ffestc_R1225 (name=0x0) at f/stc.c:12307
-* #8 0xcc808 in ffestc_end () at f/stc.c:5572
-* #9 0x9fa84 in ffestb_end3_ (t=0x3a19c8) at f/stb.c:3216
-* #10 0x9f30c in ffestb_end (t=0x3a19c8) at f/stb.c:2995
-* #11 0x98414 in ffesta_save_ (t=0x3a19c8) at f/sta.c:453
-* #12 0x997ec in ffesta_second_ (t=0x3a19c8) at f/sta.c:1178
-* #13 0x8ed84 in ffelex_send_token_ () at f/lex.c:1614
-* #14 0x8cab8 in ffelex_finish_statement_ () at f/lex.c:946
-* #15 0x91684 in ffelex_file_fixed (wf=0x397780, f=0x37a560) at f/lex.c:2946
-* #16 0x107a94 in ffe_file (wf=0x397780, f=0x37a560) at f/top.c:456
-* #17 0x96218 in yyparse () at f/parse.c:77
-* #18 0x10beac in compile_file (name=0xdffffaf7 "quick.f") at toplev.c:2239
-* #19 0x110dc0 in main (argc=9, argv=0xdffff994, envp=0xdffff9bc) at toplev.c:3927
diff --git a/gcc/testsuite/g77.f-torture/compile/970125-0.f b/gcc/testsuite/g77.f-torture/compile/970125-0.f
deleted file mode 100644
index 004f5584f3e..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/970125-0.f
+++ /dev/null
@@ -1,40 +0,0 @@
-C JCB comments:
-C g77 doesn't accept the added line "integer(kind=7) ..." --
-C it crashes!
-C
-C It's questionable that g77 DTRT with regarding to passing
-C %LOC() as an argument (thus by reference) and the new global
-C analysis. I need to look into that further; my feeling is that
-C passing %LOC() as an argument should be treated like passing an
-C INTEGER(KIND=7) by reference, and no more specially than that
-C (and that INTEGER(KIND=7) should be permitted as equivalent to
-C INTEGER(KIND=1), INTEGER(KIND=2), or whatever, depending on the
-C system's pointer size).
-C
-C The back end *still* has a bug here, which should be fixed,
-C because, currently, what g77 is passing to it is, IMO, correct.
-
-C No options:
-C ../../egcs/gcc/f/info.c:259: failed assertion `ffeinfo_types_[basictype][kindtype] != NULL'
-C -fno-globals -O:
-C ../../egcs/gcc/expr.c:7291: Internal compiler error in function expand_expr
-
-c Frontend bug fixed by JCB 1998-06-01 com.c &c changes.
-
- integer*4 i4
- integer*8 i8
- integer*8 max4
- data max4/2147483647/
- i4 = %loc(i4)
- i8 = %loc(i8)
- print *, max4
- print *, i4, %loc(i4)
- print *, i8, %loc(i8)
- call foo(i4, %loc(i4), i8, %loc(i8))
- end
- subroutine foo(i4, i4a, i8, i8a)
- integer(kind=7) i4a, i8a
- integer*8 i8
- print *, i4, i4a
- print *, i8, i8a
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/970915-0.f b/gcc/testsuite/g77.f-torture/compile/970915-0.f
deleted file mode 100644
index 9ac3cf8aa97..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/970915-0.f
+++ /dev/null
@@ -1,20 +0,0 @@
-* fixed by patch to safe_from_p to avoid visiting any SAVE_EXPR
-* node twice in a given top-level call to it.
-* (JCB com.c patch of 1998-06-04.)
-
- SUBROUTINE TSTSIG11
- IMPLICIT COMPLEX (A-Z)
- EXTERNAL gzi1,gzi2
- branch3 = sw2 / cw
- . * ( rdw * (epsh*gzi1(A,B)-gzi2(A,B))
- . + rdw * (epsh*gzi1(A,B)-gzi2(A,B)) )
- . + (-1./2. + 2.*sw2/3.) / (sw*cw)
- . * rdw * (epsh*gzi1(A,B)-gzi2(A,B)
- . + rdw * (epsh*gzi1(A,B)-gzi2(A,B))
- . + rdw * (epsh*gzi1(A,B)-gzi2(A,B)) )
- . * rup * (epsh*gzi1(A,B)-gzi2(A,B)
- . + rup * (epsh*gzi1(A,B)-gzi2(A,B)) )
- . * 4.*(3.-tw**2) * gzi2(A,B)
- . + ((1.+2./tauw)*tw**2-(5.+2./tauw))* gzi1(A,B)
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/980310-1.f b/gcc/testsuite/g77.f-torture/compile/980310-1.f
deleted file mode 100644
index bc8aa85c14a..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980310-1.f
+++ /dev/null
@@ -1,28 +0,0 @@
-C Causes internal compiler error on egcs 1.0.1 on i586-pc-sco3.2v5.0.4
-C To: egcs-bugs@cygnus.com
-C Subject: backend case range problem/fix
-C From: Dave Love <d.love@dl.ac.uk>
-C Date: 02 Dec 1997 18:11:35 +0000
-C Message-ID: <rzqpvnfboo8.fsf@djlvig.dl.ac.uk>
-C
-C The following Fortran test case aborts the compiler because
-C tree_int_cst_lt dereferences a null tree; this is a regression from
-C gcc 2.7.
-
- INTEGER N
- READ(*,*) N
- SELECT CASE (N)
- CASE (1:)
- WRITE(*,*) 'case 1'
- CASE (0)
- WRITE(*,*) 'case 0'
- END SELECT
- END
-
-C The relevant change to cure this is:
-C
-C Thu Dec 4 06:34:40 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
-C
-C * stmt.c (pushcase_range): Clean up handling of "infinite" values.
-C
-
diff --git a/gcc/testsuite/g77.f-torture/compile/980310-2.f b/gcc/testsuite/g77.f-torture/compile/980310-2.f
deleted file mode 100644
index 5077c552da8..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980310-2.f
+++ /dev/null
@@ -1,43 +0,0 @@
-C unable to confirm this bug on egcs 1.0.1 for i586-pc-sco3.2v5.0.4 robertl
-C
-C Date: Sat, 23 Aug 1997 00:47:53 -0400 (EDT)
-C From: David Bristow <dbristow@lynx.dac.neu.edu>
-C To: egcs-bugs@cygnus.com
-C Subject: g77 crashes compiling Dungeon
-C Message-ID: <Pine.OSF.3.91.970823003521.11281A-100000@lynx.dac.neu.edu>
-C
-C The following small segment of Dungeon (the adventure that became the
-C commercial hit Zork) causes an internal error in f771. The platform is
-C i586-pc-linux-gnulibc1, the compiler is egcs-ss-970821 (g77-GNU Fortran
-C 0.5.21-19970811)
-C
-C --cut here--cut here--cut here--cut here--cut here--cut here--
-C g77 --verbose -fugly -fvxt -c subr_.f
-C g77 version 0.5.21-19970811
-C gcc --verbose -fugly -fvxt -xf77 subr_.f -xnone -lf2c -lm
-C Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.01/specs
-C gcc version egcs-2.90.01 970821 (gcc2-970802 experimental)
-C /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.01/f771 subr_.f -fset-g77-defaults -quiet -dumpbase subr_.f -version -fversion -fugly -fvxt -o /tmp/cca23974.s
-C f771: warning: -fugly is overloaded with meanings and likely to be removed;
-C f771: warning: use only the specific -fugly-* options you need
-C GNU F77 version egcs-2.90.01 970821 (gcc2-970802 experimental) (i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.90.01 970821 (gcc2-970802 experimental).
-C GNU Fortran Front End version 0.5.21-19970811
-C f/com.c:941: failed assertion `TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (e))'
-C gcc: Internal compiler error: program f771 got fatal signal 6
-C --cut here--cut here--cut here--cut here--cut here--cut here--
-C
-C Here's the FORTRAN code, it's basically a single subroutine from subr.f
-C in the Dungeon source, slightly altered (the original calls RAN(), which
-C doesn't exist in the g77 runtime)
-C
-C RND - Return a random integer mod n
-C
- INTEGER FUNCTION RND (N)
- IMPLICIT INTEGER (A-Z)
- REAL RAND
- COMMON /SEED/ RNSEED
-
- RND = RAND(RNSEED)*FLOAT(N)
- RETURN
-
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/980310-3.f b/gcc/testsuite/g77.f-torture/compile/980310-3.f
deleted file mode 100644
index ddfb4c4bb9f..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980310-3.f
+++ /dev/null
@@ -1,259 +0,0 @@
-c
-c This demonstrates a problem with g77 and pic on x86 where
-c egcs 1.0.1 and earlier will generate bogus assembler output.
-c unfortunately, gas accepts the bogus acssembler output and
-c generates code that almost works.
-c
-
-
-C Date: Wed, 17 Dec 1997 23:20:29 +0000
-C From: Joao Cardoso <jcardoso@inescn.pt>
-C To: egcs-bugs@cygnus.com
-C Subject: egcs-1.0 f77 bug on OSR5
-C When trying to compile the Fortran file that I enclose bellow,
-C I got an assembler error:
-C
-C ./g77 -B./ -fpic -O -c scaleg.f
-C /usr/tmp/cca002D8.s:123:syntax error at (
-C
-C ./g77 -B./ -fpic -O0 -c scaleg.f
-C /usr/tmp/cca002EW.s:246:invalid operand combination: leal
-C
-C Compiling without the -fpic flag runs OK.
-
- subroutine scaleg (n,ma,a,mb,b,low,igh,cscale,cperm,wk)
-c
-c *****parameters:
- integer igh,low,ma,mb,n
- double precision a(ma,n),b(mb,n),cperm(n),cscale(n),wk(n,6)
-c
-c *****local variables:
- integer i,ir,it,j,jc,kount,nr,nrp2
- double precision alpha,basl,beta,cmax,coef,coef2,coef5,cor,
- * ew,ewc,fi,fj,gamma,pgamma,sum,t,ta,tb,tc
-c
-c *****fortran functions:
- double precision dabs, dlog10, dsign
-c float
-c
-c *****subroutines called:
-c none
-c
-c ---------------------------------------------------------------
-c
-c *****purpose:
-c scales the matrices a and b in the generalized eigenvalue
-c problem a*x = (lambda)*b*x such that the magnitudes of the
-c elements of the submatrices of a and b (as specified by low
-c and igh) are close to unity in the least squares sense.
-c ref.: ward, r. c., balancing the generalized eigenvalue
-c problem, siam j. sci. stat. comput., vol. 2, no. 2, june 1981,
-c 141-152.
-c
-c *****parameter description:
-c
-c on input:
-c
-c ma,mb integer
-c row dimensions of the arrays containing matrices
-c a and b respectively, as declared in the main calling
-c program dimension statement;
-c
-c n integer
-c order of the matrices a and b;
-c
-c a real(ma,n)
-c contains the a matrix of the generalized eigenproblem
-c defined above;
-c
-c b real(mb,n)
-c contains the b matrix of the generalized eigenproblem
-c defined above;
-c
-c low integer
-c specifies the beginning -1 for the rows and
-c columns of a and b to be scaled;
-c
-c igh integer
-c specifies the ending -1 for the rows and columns
-c of a and b to be scaled;
-c
-c cperm real(n)
-c work array. only locations low through igh are
-c referenced and altered by this subroutine;
-c
-c wk real(n,6)
-c work array that must contain at least 6*n locations.
-c only locations low through igh, n+low through n+igh,
-c ..., 5*n+low through 5*n+igh are referenced and
-c altered by this subroutine.
-c
-c on output:
-c
-c a,b contain the scaled a and b matrices;
-c
-c cscale real(n)
-c contains in its low through igh locations the integer
-c exponents of 2 used for the column scaling factors.
-c the other locations are not referenced;
-c
-c wk contains in its low through igh locations the integer
-c exponents of 2 used for the row scaling factors.
-c
-c *****algorithm notes:
-c none.
-c
-c *****history:
-c written by r. c. ward.......
-c modified 8/86 by bobby bodenheimer so that if
-c sum = 0 (corresponding to the case where the matrix
-c doesn't need to be scaled) the routine returns.
-c
-c ---------------------------------------------------------------
-c
- if (low .eq. igh) go to 410
- do 210 i = low,igh
- wk(i,1) = 0.0d0
- wk(i,2) = 0.0d0
- wk(i,3) = 0.0d0
- wk(i,4) = 0.0d0
- wk(i,5) = 0.0d0
- wk(i,6) = 0.0d0
- cscale(i) = 0.0d0
- cperm(i) = 0.0d0
- 210 continue
-c
-c compute right side vector in resulting linear equations
-c
- basl = dlog10(2.0d0)
- do 240 i = low,igh
- do 240 j = low,igh
- tb = b(i,j)
- ta = a(i,j)
- if (ta .eq. 0.0d0) go to 220
- ta = dlog10(dabs(ta)) / basl
- 220 continue
- if (tb .eq. 0.0d0) go to 230
- tb = dlog10(dabs(tb)) / basl
- 230 continue
- wk(i,5) = wk(i,5) - ta - tb
- wk(j,6) = wk(j,6) - ta - tb
- 240 continue
- nr = igh-low+1
- coef = 1.0d0/float(2*nr)
- coef2 = coef*coef
- coef5 = 0.5d0*coef2
- nrp2 = nr+2
- beta = 0.0d0
- it = 1
-c
-c start generalized conjugate gradient iteration
-c
- 250 continue
- ew = 0.0d0
- ewc = 0.0d0
- gamma = 0.0d0
- do 260 i = low,igh
- gamma = gamma + wk(i,5)*wk(i,5) + wk(i,6)*wk(i,6)
- ew = ew + wk(i,5)
- ewc = ewc + wk(i,6)
- 260 continue
- gamma = coef*gamma - coef2*(ew**2 + ewc**2)
- + - coef5*(ew - ewc)**2
- if (it .ne. 1) beta = gamma / pgamma
- t = coef5*(ewc - 3.0d0*ew)
- tc = coef5*(ew - 3.0d0*ewc)
- do 270 i = low,igh
- wk(i,2) = beta*wk(i,2) + coef*wk(i,5) + t
- cperm(i) = beta*cperm(i) + coef*wk(i,6) + tc
- 270 continue
-c
-c apply matrix to vector
-c
- do 300 i = low,igh
- kount = 0
- sum = 0.0d0
- do 290 j = low,igh
- if (a(i,j) .eq. 0.0d0) go to 280
- kount = kount+1
- sum = sum + cperm(j)
- 280 continue
- if (b(i,j) .eq. 0.0d0) go to 290
- kount = kount+1
- sum = sum + cperm(j)
- 290 continue
- wk(i,3) = float(kount)*wk(i,2) + sum
- 300 continue
- do 330 j = low,igh
- kount = 0
- sum = 0.0d0
- do 320 i = low,igh
- if (a(i,j) .eq. 0.0d0) go to 310
- kount = kount+1
- sum = sum + wk(i,2)
- 310 continue
- if (b(i,j) .eq. 0.0d0) go to 320
- kount = kount+1
- sum = sum + wk(i,2)
- 320 continue
- wk(j,4) = float(kount)*cperm(j) + sum
- 330 continue
- sum = 0.0d0
- do 340 i = low,igh
- sum = sum + wk(i,2)*wk(i,3) + cperm(i)*wk(i,4)
- 340 continue
- if(sum.eq.0.0d0) return
- alpha = gamma / sum
-c
-c determine correction to current iterate
-c
- cmax = 0.0d0
- do 350 i = low,igh
- cor = alpha * wk(i,2)
- if (dabs(cor) .gt. cmax) cmax = dabs(cor)
- wk(i,1) = wk(i,1) + cor
- cor = alpha * cperm(i)
- if (dabs(cor) .gt. cmax) cmax = dabs(cor)
- cscale(i) = cscale(i) + cor
- 350 continue
- if (cmax .lt. 0.5d0) go to 370
- do 360 i = low,igh
- wk(i,5) = wk(i,5) - alpha*wk(i,3)
- wk(i,6) = wk(i,6) - alpha*wk(i,4)
- 360 continue
- pgamma = gamma
- it = it+1
- if (it .le. nrp2) go to 250
-c
-c end generalized conjugate gradient iteration
-c
- 370 continue
- do 380 i = low,igh
- ir = wk(i,1) + dsign(0.5d0,wk(i,1))
- wk(i,1) = ir
- jc = cscale(i) + dsign(0.5d0,cscale(i))
- cscale(i) = jc
- 380 continue
-c
-c scale a and b
-c
- do 400 i = 1,igh
- ir = wk(i,1)
- fi = 2.0d0**ir
- if (i .lt. low) fi = 1.0d0
- do 400 j =low,n
- jc = cscale(j)
- fj = 2.0d0**jc
- if (j .le. igh) go to 390
- if (i .lt. low) go to 400
- fj = 1.0d0
- 390 continue
- a(i,j) = a(i,j)*fi*fj
- b(i,j) = b(i,j)*fi*fj
- 400 continue
- 410 continue
- return
-c
-c last line of scaleg
-c
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/980310-4.f b/gcc/testsuite/g77.f-torture/compile/980310-4.f
deleted file mode 100644
index 802e3031f86..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980310-4.f
+++ /dev/null
@@ -1,348 +0,0 @@
-
-C To: egcs-bugs@cygnus.com
-C Subject: -fPIC problem showing up with fortran on x86
-C From: Dave Love <d.love@dl.ac.uk>
-C Date: 19 Dec 1997 19:31:41 +0000
-C
-C
-C This illustrates a long-standing problem noted at the end of the g77
-C `Actual Bugs' info node and thought to be in the back end. Although
-C the report is against gcc 2.7 I can reproduce it (specifically on
-C redhat 4.2) with the 971216 egcs snapshot.
-C
-C g77 version 0.5.21
-C gcc -v -fnull-version -o /tmp/gfa00415 -xf77-cpp-input /tmp/gfa00415.f -xnone
-C -lf2c -lm
-C
-
-C ------------
- subroutine dqage(f,a,b,epsabs,epsrel,limit,result,abserr,
- * neval,ier,alist,blist,rlist,elist,iord,last)
-C --------------------------------------------------
-C
-C Modified Feb 1989 by Barry W. Brown to eliminate key
-C as argument (use key=1) and to eliminate all Fortran
-C output.
-C
-C Purpose: to make this routine usable from within S.
-C
-C --------------------------------------------------
-c***begin prologue dqage
-c***date written 800101 (yymmdd)
-c***revision date 830518 (yymmdd)
-c***category no. h2a1a1
-c***keywords automatic integrator, general-purpose,
-c integrand examinator, globally adaptive,
-c gauss-kronrod
-c***author piessens,robert,appl. math. & progr. div. - k.u.leuven
-c de doncker,elise,appl. math. & progr. div. - k.u.leuven
-c***purpose the routine calculates an approximation result to a given
-c definite integral i = integral of f over (a,b),
-c hopefully satisfying following claim for accuracy
-c abs(i-reslt).le.max(epsabs,epsrel*abs(i)).
-c***description
-c
-c computation of a definite integral
-c standard fortran subroutine
-c double precision version
-c
-c parameters
-c on entry
-c f - double precision
-c function subprogram defining the integrand
-c function f(x). the actual name for f needs to be
-c declared e x t e r n a l in the driver program.
-c
-c a - double precision
-c lower limit of integration
-c
-c b - double precision
-c upper limit of integration
-c
-c epsabs - double precision
-c absolute accuracy requested
-c epsrel - double precision
-c relative accuracy requested
-c if epsabs.le.0
-c and epsrel.lt.max(50*rel.mach.acc.,0.5d-28),
-c the routine will end with ier = 6.
-c
-c key - integer
-c key for choice of local integration rule
-c a gauss-kronrod pair is used with
-c 7 - 15 points if key.lt.2,
-c 10 - 21 points if key = 2,
-c 15 - 31 points if key = 3,
-c 20 - 41 points if key = 4,
-c 25 - 51 points if key = 5,
-c 30 - 61 points if key.gt.5.
-c
-c limit - integer
-c gives an upperbound on the number of subintervals
-c in the partition of (a,b), limit.ge.1.
-c
-c on return
-c result - double precision
-c approximation to the integral
-c
-c abserr - double precision
-c estimate of the modulus of the absolute error,
-c which should equal or exceed abs(i-result)
-c
-c neval - integer
-c number of integrand evaluations
-c
-c ier - integer
-c ier = 0 normal and reliable termination of the
-c routine. it is assumed that the requested
-c accuracy has been achieved.
-c ier.gt.0 abnormal termination of the routine
-c the estimates for result and error are
-c less reliable. it is assumed that the
-c requested accuracy has not been achieved.
-c error messages
-c ier = 1 maximum number of subdivisions allowed
-c has been achieved. one can allow more
-c subdivisions by increasing the value
-c of limit.
-c however, if this yields no improvement it
-c is rather advised to analyze the integrand
-c in order to determine the integration
-c difficulties. if the position of a local
-c difficulty can be determined(e.g.
-c singularity, discontinuity within the
-c interval) one will probably gain from
-c splitting up the interval at this point
-c and calling the integrator on the
-c subranges. if possible, an appropriate
-c special-purpose integrator should be used
-c which is designed for handling the type of
-c difficulty involved.
-c = 2 the occurrence of roundoff error is
-c detected, which prevents the requested
-c tolerance from being achieved.
-c = 3 extremely bad integrand behavior occurs
-c at some points of the integration
-c interval.
-c = 6 the input is invalid, because
-c (epsabs.le.0 and
-c epsrel.lt.max(50*rel.mach.acc.,0.5d-28),
-c result, abserr, neval, last, rlist(1) ,
-c elist(1) and iord(1) are set to zero.
-c alist(1) and blist(1) are set to a and b
-c respectively.
-c
-c alist - double precision
-c vector of dimension at least limit, the first
-c last elements of which are the left
-c end points of the subintervals in the partition
-c of the given integration range (a,b)
-c
-c blist - double precision
-c vector of dimension at least limit, the first
-c last elements of which are the right
-c end points of the subintervals in the partition
-c of the given integration range (a,b)
-c
-c rlist - double precision
-c vector of dimension at least limit, the first
-c last elements of which are the
-c integral approximations on the subintervals
-c
-c elist - double precision
-c vector of dimension at least limit, the first
-c last elements of which are the moduli of the
-c absolute error estimates on the subintervals
-c
-c iord - integer
-c vector of dimension at least limit, the first k
-c elements of which are pointers to the
-c error estimates over the subintervals,
-c such that elist(iord(1)), ...,
-c elist(iord(k)) form a decreasing sequence,
-c with k = last if last.le.(limit/2+2), and
-c k = limit+1-last otherwise
-c
-c last - integer
-c number of subintervals actually produced in the
-c subdivision process
-c
-c***references (none)
-c***routines called d1mach,dqk15,dqk21,dqk31,
-c dqk41,dqk51,dqk61,dqpsrt
-c***end prologue dqage
-c
- double precision a,abserr,alist,area,area1,area12,area2,a1,a2,b,
- * blist,b1,b2,dabs,defabs,defab1,defab2,dmax1,d1mach,elist,epmach,
- * epsabs,epsrel,errbnd,errmax,error1,error2,erro12,errsum,f,
- * resabs,result,rlist,uflow
- integer ier,iord,iroff1,iroff2,k,last,limit,maxerr,neval,
- * nrmax
-c
- dimension alist(limit),blist(limit),elist(limit),iord(limit),
- * rlist(limit)
-c
- external f
-c
-c list of major variables
-c -----------------------
-c
-c alist - list of left end points of all subintervals
-c considered up to now
-c blist - list of right end points of all subintervals
-c considered up to now
-c rlist(i) - approximation to the integral over
-c (alist(i),blist(i))
-c elist(i) - error estimate applying to rlist(i)
-c maxerr - pointer to the interval with largest
-c error estimate
-c errmax - elist(maxerr)
-c area - sum of the integrals over the subintervals
-c errsum - sum of the errors over the subintervals
-c errbnd - requested accuracy max(epsabs,epsrel*
-c abs(result))
-c *****1 - variable for the left subinterval
-c *****2 - variable for the right subinterval
-c last - index for subdivision
-c
-c
-c machine dependent constants
-c ---------------------------
-c
-c epmach is the largest relative spacing.
-c uflow is the smallest positive magnitude.
-c
-c***first executable statement dqage
- epmach = d1mach(4)
- uflow = d1mach(1)
-c
-c test on validity of parameters
-c ------------------------------
-c
- ier = 0
- neval = 0
- last = 0
- result = 0.0d+00
- abserr = 0.0d+00
- alist(1) = a
- blist(1) = b
- rlist(1) = 0.0d+00
- elist(1) = 0.0d+00
- iord(1) = 0
- if(epsabs.le.0.0d+00.and.
- * epsrel.lt.dmax1(0.5d+02*epmach,0.5d-28)) ier = 6
- if(ier.eq.6) go to 999
-c
-c first approximation to the integral
-c -----------------------------------
-c
- neval = 0
- call dqk15(f,a,b,result,abserr,defabs,resabs)
- last = 1
- rlist(1) = result
- elist(1) = abserr
- iord(1) = 1
-c
-c test on accuracy.
-c
- errbnd = dmax1(epsabs,epsrel*dabs(result))
- if(abserr.le.0.5d+02*epmach*defabs.and.abserr.gt.errbnd) ier = 2
- if(limit.eq.1) ier = 1
- if(ier.ne.0.or.(abserr.le.errbnd.and.abserr.ne.resabs)
- * .or.abserr.eq.0.0d+00) go to 60
-c
-c initialization
-c --------------
-c
-c
- errmax = abserr
- maxerr = 1
- area = result
- errsum = abserr
- nrmax = 1
- iroff1 = 0
- iroff2 = 0
-c
-c main do-loop
-c ------------
-c
- do 30 last = 2,limit
-c
-c bisect the subinterval with the largest error estimate.
-c
- a1 = alist(maxerr)
- b1 = 0.5d+00*(alist(maxerr)+blist(maxerr))
- a2 = b1
- b2 = blist(maxerr)
- call dqk15(f,a1,b1,area1,error1,resabs,defab1)
- call dqk15(f,a2,b2,area2,error2,resabs,defab2)
-c
-c improve previous approximations to integral
-c and error and test for accuracy.
-c
- neval = neval+1
- area12 = area1+area2
- erro12 = error1+error2
- errsum = errsum+erro12-errmax
- area = area+area12-rlist(maxerr)
- if(defab1.eq.error1.or.defab2.eq.error2) go to 5
- if(dabs(rlist(maxerr)-area12).le.0.1d-04*dabs(area12)
- * .and.erro12.ge.0.99d+00*errmax) iroff1 = iroff1+1
- if(last.gt.10.and.erro12.gt.errmax) iroff2 = iroff2+1
- 5 rlist(maxerr) = area1
- rlist(last) = area2
- errbnd = dmax1(epsabs,epsrel*dabs(area))
- if(errsum.le.errbnd) go to 8
-c
-c test for roundoff error and eventually set error flag.
-c
- if(iroff1.ge.6.or.iroff2.ge.20) ier = 2
-c
-c set error flag in the case that the number of subintervals
-c equals limit.
-c
- if(last.eq.limit) ier = 1
-c
-c set error flag in the case of bad integrand behavior
-c at a point of the integration range.
-c
- if(dmax1(dabs(a1),dabs(b2)).le.(0.1d+01+0.1d+03*
- * epmach)*(dabs(a2)+0.1d+04*uflow)) ier = 3
-c
-c append the newly-created intervals to the list.
-c
- 8 if(error2.gt.error1) go to 10
- alist(last) = a2
- blist(maxerr) = b1
- blist(last) = b2
- elist(maxerr) = error1
- elist(last) = error2
- go to 20
- 10 alist(maxerr) = a2
- alist(last) = a1
- blist(last) = b1
- rlist(maxerr) = area2
- rlist(last) = area1
- elist(maxerr) = error2
- elist(last) = error1
-c
-c call subroutine dqpsrt to maintain the descending ordering
-c in the list of error estimates and select the subinterval
-c with the largest error estimate (to be bisected next).
-c
- 20 call dqpsrt(limit,last,maxerr,errmax,elist,iord,nrmax)
-c ***jump out of do-loop
- if(ier.ne.0.or.errsum.le.errbnd) go to 40
- 30 continue
-c
-c compute final result.
-c ---------------------
-c
- 40 result = 0.0d+00
- do 50 k=1,last
- result = result+rlist(k)
- 50 continue
- abserr = errsum
- 60 neval = 30*neval+15
- 999 return
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/980310-6.f b/gcc/testsuite/g77.f-torture/compile/980310-6.f
deleted file mode 100644
index fd91500eea8..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980310-6.f
+++ /dev/null
@@ -1,21 +0,0 @@
-C From: Norbert Conrad <Norbert.Conrad@hrz.uni-giessen.de>
-C Message-Id: <199711131008.LAA12272@marvin.hrz.uni-giessen.de>
-C Subject: 971105 g77 bug
-C To: egcs-bugs@cygnus.com
-C Date: Thu, 13 Nov 1997 11:08:19 +0100 (CET)
-
-C I found a bug in g77 in snapshot 971105
-
- subroutine ai (a)
- dimension a(-1:*)
- return
- end
-C ai.f: In subroutine `ai':
-C ai.f:1:
-C subroutine ai (a)
-C ^
-C Array `a' at (^) is too large to handle
-C
-C This happens whenever the lower index boundary is negative and the upper index
-C boundary is '*'.
-
diff --git a/gcc/testsuite/g77.f-torture/compile/980310-7.f b/gcc/testsuite/g77.f-torture/compile/980310-7.f
deleted file mode 100644
index 9cfbaed692a..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980310-7.f
+++ /dev/null
@@ -1,50 +0,0 @@
-C From: "David C. Doherty" <doherty@networkcs.com>
-C Message-Id: <199711171846.MAA27947@uh.msc.edu>
-C Subject: g77: auto arrays + goto = no go
-C To: egcs-bugs@cygnus.com
-C Date: Mon, 17 Nov 1997 12:46:27 -0600 (CST)
-
-C I sent the following to fortran@gnu.ai.mit.edu, and Dave Love
-C replied that he was able to reproduce it on rs6000-aix; not on
-C others. He suggested that I send it to egcs-bugs.
-
-C Hi - I've observed the following behavior regarding
-C automatic arrays and gotos. Seems similar to what I found
-C in the docs about computed gotos (but not exactly the same).
-C
-C I suspect from the nature of the error msg that it's in the GBE.
-C
-C I'm using egcs-971105, under linux-ppc.
-C
-C I also observed the same in g77-0.5.19 (and gcc 2.7.2?).
-C
-C I'd appreciate any advice on this. thanks for the great work.
-C --
-C >cat testg77.f
- subroutine testg77(n, a)
-c
- implicit none
-c
- integer n
- real a(n)
- real b(n)
- integer i
-c
- do i = 1, 10
- if (i .gt. 4) goto 100
- write(0, '(i2)')i
- enddo
-c
- goto 200
-100 continue
-200 continue
-c
- return
- end
-C >g77 -c testg77.f
-C testg77.f: In subroutine `testg77':
-C testg77.f:19: label `200' used before containing binding contour
-C testg77.f:18: label `100' used before containing binding contour
-C --
-C If I comment out the b(n) line or replace it with, e.g., b(10),
-C it compiles fine.
diff --git a/gcc/testsuite/g77.f-torture/compile/980310-8.f b/gcc/testsuite/g77.f-torture/compile/980310-8.f
deleted file mode 100644
index 9501012f60a..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980310-8.f
+++ /dev/null
@@ -1,39 +0,0 @@
-C To: egcs-bugs@cygnus.com
-C Subject: egcs-g77 and array indexing
-C Reply-To: etseidl@jutland.ca.sandia.gov
-C Date: Wed, 26 Nov 1997 10:38:27 -0800
-C From: Edward Seidl <etseidl@jutland.ca.sandia.gov>
-C
-C I have some horrible spaghetti code I'm trying compile with egcs-g77,
-C but it's puking on code like the example below. I have no idea if it's
-C legal fortran or not, and I'm in no position to change it. All I do know
-C is it compiles with a number of other compilers, including f2c and
-C g77-0.5.19.1/gcc-2.7.2.1. When I try to compile with egcs-2.90.18 971122
-C I get the following (on both i686-pc-linux-gnu and alphaev56-unknown-linux-gnu):
-C
-C foo.f: In subroutine `foobar':
-C foo.f:11:
-C subroutine foobar(norb,nnorb)
-C ^
-C Array `norb' at (^) is too large to handle
-
- program foo
- implicit integer(A-Z)
- dimension norb(6)
- nnorb=6
-
- call foobar(norb,nnorb)
-
- stop
- end
-
- subroutine foobar(norb,nnorb)
- implicit integer(A-Z)
- dimension norb(-1:*)
-
- do 10 i=-1,nnorb-2
- norb(i) = i+999
- 10 continue
-
- return
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/980419-2.f b/gcc/testsuite/g77.f-torture/compile/980419-2.f
deleted file mode 100644
index ac9134dc8a7..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980419-2.f
+++ /dev/null
@@ -1,48 +0,0 @@
-c SEGVs in loop.c with -O2.
-
- character*80 function nxtlin(lun,ierr,itok)
- character onechr*1,twochr*2,thrchr*3
- itok=0
- do while (.true.)
- read (lun,'(a)',iostat=ierr) nxtlin
- if (nxtlin(1:1).ne.'#') then
- ito=0
- do 10 it=1,79
- if (nxtlin(it:it).ne.' ' .and. nxtlin(it+1:it+1).eq.' ')
- $ then
- itast=0
- itstrt=0
- do itt=ito+1,it
- if (nxtlin(itt:itt).eq.'*') itast=itt
- enddo
- itstrt=ito+1
- do while (nxtlin(itstrt:itstrt).eq.' ')
- itstrt=itstrt+1
- enddo
- if (itast.gt.0) then
- nchrs=itast-itstrt
- if (nchrs.eq.1) then
- onechr=nxtlin(itstrt:itstrt)
- read (onechr,*) itokn
- elseif (nchrs.eq.2) then
- twochr=nxtlin(itstrt:itstrt+1)
- read (twochr,*) itokn
- elseif (nchrs.eq.3) then
- thrchr=nxtlin(itstrt:itstrt+2)
- read (thrchr,*) itokn
- elseif (nchrs.eq.4) then
- thrchr=nxtlin(itstrt:itstrt+3)
- read (thrchr,*) itokn
- endif
- itok=itok+itokn
- else
- itok=itok+1
- endif
- ito=it+1
- endif
- 10 continue
- return
- endif
- enddo
- return
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/980424-0.f b/gcc/testsuite/g77.f-torture/compile/980424-0.f
deleted file mode 100644
index 5df45bb79a9..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980424-0.f
+++ /dev/null
@@ -1,6 +0,0 @@
-C crashes in subst_stack_regs_pat on x86-linux, in the "abort();"
-C within the switch statement.
- SUBROUTINE C(A)
- COMPLEX A
- WRITE(*,*) A.NE.CMPLX(0.0D0)
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/980427-0.f b/gcc/testsuite/g77.f-torture/compile/980427-0.f
deleted file mode 100644
index d5d7d74c57b..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980427-0.f
+++ /dev/null
@@ -1,8 +0,0 @@
-c ../../egcs/gcc/f/com.c:938: failed assertion `TREE_CODE (TREE_TYPE (e)) == REAL_TYPE'
-c Fixed by 28-04-1998 global.c (ffeglobal_ref_progunit_) change.
- external b
- call y(b)
- end
- subroutine x
- a = b()
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/980519-2.f b/gcc/testsuite/g77.f-torture/compile/980519-2.f
deleted file mode 100644
index 4e708a17e60..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980519-2.f
+++ /dev/null
@@ -1,47 +0,0 @@
-* Date: Fri, 17 Apr 1998 14:12:51 +0200
-* From: Jean-Paul Jeannot <jeannot@gx-tech.fr>
-* Organization: GX Technology France
-* To: egcs-bugs@cygnus.com
-* Subject: identified bug in g77 on Alpha
-*
-* Dear Sir,
-*
-* You will find below the assembly code of a simple Fortran routine which
-* crashes with segmentation fault when storing the first element
-* in( jT_f-hd_T ) = Xsp
-* whereas everything is fine when commenting this line.
-*
-* The assembly code (generated with
-* -ffast-math -fexpensive-optimizations -fomit-frame-pointer -fno-inline
-* or with -O5)
-* uses a zapnot instruction to copy an address.
-* BUT the zapnot parameter is 15 (copuing 4 bytes) instead of 255 (to copy
-* 8 bytes).
-*
-* I guess this is typically a 64 bit issue. As, from my understanding,
-* zapnots are used a lot to copy registers, this may create problems
-* elsewhere.
-*
-* Thanks for your help
-*
-* Jean-Paul Jeannot
-*
- subroutine simul_trace( in, Xsp, Ysp, Xrcv, Yrcv )
-
- common /Idim/ jT_f, jT_l, nT, nT_dim
- common /Idim/ jZ_f, jZ_l, nZ, nZ_dim
- common /Idim/ jZ2_f, jZ2_l, nZ2, nZ2_dim
- common /Idim/ jzs_f, jzs_l, nzs, nzs_dim, l_amp
- common /Idim/ hd_S, hd_Z, hd_T
- common /Idim/ nlay, nlayz
- common /Idim/ n_work
- common /Idim/ nb_calls
-
- real Xsp, Ysp, Xrcv, Yrcv
- real in( jT_f-hd_T : jT_l )
-
- in( jT_f-hd_T ) = Xsp
- in( jT_f-hd_T + 1 ) = Ysp
- in( jT_f-hd_T + 2 ) = Xrcv
- in( jT_f-hd_T + 3 ) = Yrcv
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/980729-0.f b/gcc/testsuite/g77.f-torture/compile/980729-0.f
deleted file mode 100644
index 07789441d41..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/980729-0.f
+++ /dev/null
@@ -1,5 +0,0 @@
-c Got ICE on Alpha only with -mieee (currently not tested).
-c Fixed by rth 1998-07-30 alpha.md change.
- subroutine a(b,c)
- b = max(b,c)
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/981117-1.f b/gcc/testsuite/g77.f-torture/compile/981117-1.f
deleted file mode 100644
index 019167064fa..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/981117-1.f
+++ /dev/null
@@ -1,23 +0,0 @@
-* egcs-bugs:
-* From: Martin Kahlert <martin.kahlert@mchp.siemens.de>
-* Subject: ICE in g77 from egcs-19981109
-* Message-Id: <199811101134.MAA29838@keksy.mchp.siemens.de>
-
-* As of 1998-11-17, fails -O2 -fomit-frame-pointer with
-* egcs/gcc/testsuite/g77.f-torture/compile/981117-1.f:8: internal error--insn does not satisfy its constraints:
-* (insn 31 83 32 (set (reg:SF 8 %st(0))
-* (mult:SF (reg:SF 8 %st(0))
-* (const_double:SF (mem/u:SF (symbol_ref/u:SI ("*.LC1")) 0) 0 0 1073643520))) 350 {strlensi-3} (nil)
-* (nil))
-* ../../egcs/gcc/toplev.c:1390: Internal compiler error in function fatal_insn
-
-* Fixed sometime before 1998-11-21 -- don't know by which change.
-
- SUBROUTINE SSPTRD
- PARAMETER (HALF = 0.5 )
- DO I = 1, N
- CALL SSPMV(TAUI)
- ALPHA = -HALF*TAUI
- CALL SAXPY(ALPHA)
- ENDDO
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/990115-1.f b/gcc/testsuite/g77.f-torture/compile/990115-1.f
deleted file mode 100644
index 187e1b463b5..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/990115-1.f
+++ /dev/null
@@ -1,8 +0,0 @@
-C Derived from lapack
- SUBROUTINE ZGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
- $ WORK, RWORK, INFO )
- COMPLEX*16 WORK( * )
- DO 20 I = 1, RANK
- WORK( ISMAX+I-1 ) = S2*WORK( ISMAX+I-1 )
- 20 CONTINUE
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/alpha1.f b/gcc/testsuite/g77.f-torture/compile/alpha1.f
deleted file mode 100644
index 7cda74ebd45..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/alpha1.f
+++ /dev/null
@@ -1,10 +0,0 @@
- REAL*8 A,B,C
- REAL*4 RARRAY(19)/19*(-1)/
- INTEGER BOTTOM,RIGHT
- INTEGER IARRAY(19)/0,0,0,0,0,0,0,0,0,0,0,0,13,14,0,0,0,0,0/
- EQUIVALENCE (RARRAY(13),BOTTOM),(RARRAY(14),RIGHT)
-C
- IF(I.NE.0) call exit(1)
-C gcc: Internal compiler error: program f771 got fatal signal 11
-C at this point!
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/alpha1.x b/gcc/testsuite/g77.f-torture/compile/alpha1.x
deleted file mode 100644
index 8f6fe7faf80..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/alpha1.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test fails compilation in cross-endian environments, for example as
-# below, with a "sorry" message.
-
-if { [ishost "i\[34567\]86-*-*"] } {
- if { [istarget "mmix-knuth-mmixware"]
- || [istarget "powerpc-*-*"] } {
- set torture_compile_xfail [istarget]
- }
-}
-
-return 0
diff --git a/gcc/testsuite/g77.f-torture/compile/compile.exp b/gcc/testsuite/g77.f-torture/compile/compile.exp
deleted file mode 100644
index b76741a8d48..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/compile.exp
+++ /dev/null
@@ -1,44 +0,0 @@
-# Expect driver script for GCC Regression Tests
-# Copyright (C) 1993, 1995, 1997 Free Software Foundation
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# These tests come from Torbjorn Granlund's (tege@cygnus.com)
-# F torture test suite, and other contributors.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-# load support procs
-load_lib f-torture.exp
-
-foreach testcase [glob -nocomplain $srcdir/$subdir/*.f] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
-
- f-torture $testcase
-}
-
-foreach testcase [glob -nocomplain $srcdir/$subdir/*.F] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
-
- f-torture $testcase
-}
diff --git a/gcc/testsuite/g77.f-torture/compile/cpp.F b/gcc/testsuite/g77.f-torture/compile/cpp.F
deleted file mode 100644
index bdf10d7fbde..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/cpp.F
+++ /dev/null
@@ -1,9 +0,0 @@
-C When run through the C preprocessor, the indentation of the
-C CONTINUE line must not be mangled.
- subroutine aap(a, n)
- dimension a(n)
- do 10 i = 1, n
- a(i) = i
- 10 continue
- print *, a(1)
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/cpp2.F b/gcc/testsuite/g77.f-torture/compile/cpp2.F
deleted file mode 100644
index 968d9f666ef..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/cpp2.F
+++ /dev/null
@@ -1,7 +0,0 @@
-C The preprocessor must not introduce a newline after
-C the "a" when ARGUMENTS is expanded.
-
-#define ARGUMENTS a\
-
- subroutine yada (ARGUMENTS)
- end
diff --git a/gcc/testsuite/g77.f-torture/compile/toon_1.f b/gcc/testsuite/g77.f-torture/compile/toon_1.f
deleted file mode 100644
index 6b6847c4de5..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/toon_1.f
+++ /dev/null
@@ -1,3 +0,0 @@
- SUBROUTINE AAP(NOOT)
- DIMENSION NOOT(*)
- END
diff --git a/gcc/testsuite/g77.f-torture/compile/xformat.f b/gcc/testsuite/g77.f-torture/compile/xformat.f
deleted file mode 100644
index 7e9001c4bc1..00000000000
--- a/gcc/testsuite/g77.f-torture/compile/xformat.f
+++ /dev/null
@@ -1,3 +0,0 @@
- PRINT 10, 2, 3
-10 FORMAT (I1, X, I1)
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/10197.f b/gcc/testsuite/g77.f-torture/execute/10197.f
deleted file mode 100644
index 0fa81f67809..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/10197.f
+++ /dev/null
@@ -1,15 +0,0 @@
- IMPLICIT NONE
- LOGICAL ERROR
- CHARACTER*12 FORM
- DATA ERROR /.FALSE./
- DATA FORM /' '/
- OPEN(UNIT=60,ACCESS='DIRECT',STATUS='SCRATCH',RECL=255)
- INQUIRE(UNIT=60,FORM=FORM)
- IF (FORM.EQ.'UNFORMATTED') THEN
- ERROR = .FALSE.
- ELSE
- ERROR = .TRUE.
- ENDIF
- CLOSE(UNIT=60)
- IF (ERROR) CALL ABORT
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/10197.x b/gcc/testsuite/g77.f-torture/execute/10197.x
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/g77.f-torture/execute/10197.x
diff --git a/gcc/testsuite/g77.f-torture/execute/13037.f b/gcc/testsuite/g77.f-torture/execute/13037.f
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/g77.f-torture/execute/13037.f
diff --git a/gcc/testsuite/g77.f-torture/execute/1832.f b/gcc/testsuite/g77.f-torture/execute/1832.f
deleted file mode 100644
index 9ae1ca9fb27..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/1832.f
+++ /dev/null
@@ -1,8 +0,0 @@
- character*120 file
- character*5 string
- file = "c:/dos/adir/bdir/cdir/text.doc"
- write(string, *) "a ", file
- if (string .ne. ' a') call abort
-C-- The leading space is normal for list-directed output
-C-- "file" is not printed because it would overflow "string".
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/19981119-0.f b/gcc/testsuite/g77.f-torture/execute/19981119-0.f
deleted file mode 100644
index 5cfab57a5fc..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19981119-0.f
+++ /dev/null
@@ -1,40 +0,0 @@
-* X-Delivered: at request of burley on mescaline.gnu.org
-* Date: Sat, 31 Oct 1998 18:26:29 +0200 (EET)
-* From: "B. Yanchitsky" <yan@im.imag.kiev.ua>
-* To: fortran@gnu.org
-* Subject: Bug report
-* MIME-Version: 1.0
-* Content-Type: TEXT/PLAIN; charset=US-ASCII
-*
-* There is a trouble with g77 on Alpha.
-* My configuration:
-* Digital Personal Workstation 433au,
-* Digital Unix 4.0D,
-* GNU Fortran 0.5.23 and GNU C 2.8.1.
-*
-* The following program treated successfully but crashed when running.
-*
-* C --- PROGRAM BEGIN -------
-*
- subroutine sub(N,u)
- integer N
- double precision u(-N:N,-N:N)
-
-C vvvv CRASH HERE vvvvv
- u(-N,N)=0d0
- return
- end
-
-
- program bug
- integer N
- double precision a(-10:10,-10:10)
- data a/441*1d0/
- N=10
- call sub(N,a)
- if (a(-N,N) .ne. 0d0) call abort
- end
-*
-* C --- PROGRAM END -------
-*
-* Good luck!
diff --git a/gcc/testsuite/g77.f-torture/execute/19990313-0.f b/gcc/testsuite/g77.f-torture/execute/19990313-0.f
deleted file mode 100644
index abf898fb793..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990313-0.f
+++ /dev/null
@@ -1,33 +0,0 @@
-* To: craig@jcb-sc.com
-* Subject: Re: G77 and KIND=2
-* Content-Type: text/plain; charset=us-ascii
-* From: Dave Love <d.love@dl.ac.uk>
-* Date: 03 Mar 1999 18:20:11 +0000
-* In-Reply-To: craig@jcb-sc.com's message of "1 Mar 1999 21:04:38 -0000"
-* User-Agent: Gnus/5.07007 (Pterodactyl Gnus v0.70) Emacs/20.3
-* X-UIDL: d442bafe961c2a6ec6904f492e05d7b0
-*
-* ISTM that there is a real problem printing integer*8 (on x86):
-*
-* $ cat x.f
-*[modified for test suite]
- integer *8 foo, bar
- data r/4e10/
- foo = 4e10
- bar = r
- if (foo .ne. bar) call abort
- end
-* $ g77 x.f && ./a.out
-* 1345294336
-* 123
-* $ f2c x.f && g77 x.c && ./a.out
-* x.f:
-* MAIN:
-* 40000000000
-* 123
-* $
-*
-* Gdb shows the upper half of the buffer passed to do_lio is zeroed in
-* the g77 case.
-*
-* I've forgotten how the code generation happens.
diff --git a/gcc/testsuite/g77.f-torture/execute/19990313-1.f b/gcc/testsuite/g77.f-torture/execute/19990313-1.f
deleted file mode 100644
index d99c72f2fde..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990313-1.f
+++ /dev/null
@@ -1,7 +0,0 @@
- integer *8 foo, bar
- double precision r
- data r/4d10/
- foo = 4d10
- bar = r
- if (foo .ne. bar) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/19990313-2.f b/gcc/testsuite/g77.f-torture/execute/19990313-2.f
deleted file mode 100644
index ffb7549d413..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990313-2.f
+++ /dev/null
@@ -1,7 +0,0 @@
- integer *8 foo, bar
- complex c
- data c/(4e10,0)/
- foo = 4e10
- bar = c
- if (foo .ne. bar) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/19990313-3.f b/gcc/testsuite/g77.f-torture/execute/19990313-3.f
deleted file mode 100644
index 6366dccd890..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990313-3.f
+++ /dev/null
@@ -1,7 +0,0 @@
- integer *8 foo, bar
- double complex c
- data c/(4d10,0)/
- foo = 4d10
- bar = c
- if (foo .ne. bar) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/19990325-0.f b/gcc/testsuite/g77.f-torture/execute/19990325-0.f
deleted file mode 100644
index a230362fdde..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990325-0.f
+++ /dev/null
@@ -1,313 +0,0 @@
-* test whether complex operators properly handle
-* full and partial aliasing.
-* (libf2c/libF77 routines used to assume no aliasing,
-* then were changed to accommodate full aliasing, while
-* the libg2c/libF77 versions were changed to accommodate
-* both full and partial aliasing.)
-*
-* NOTE: this (19990325-0.f) is the single-precision version.
-* See 19990325-1.f for the double-precision version.
-
- program complexalias
- implicit none
-
-* Make sure non-aliased cases work. (Catch roundoff/precision
-* problems, etc., here. Modify subroutine check if they occur.)
-
- call tryfull (1, 3, 5)
-
-* Now check various combinations of aliasing.
-
-* Full aliasing.
- call tryfull (1, 1, 5)
-
-* Partial aliasing.
- call trypart (2, 3, 5)
- call trypart (2, 1, 5)
- call trypart (2, 5, 3)
- call trypart (2, 5, 1)
-
- end
-
- subroutine tryfull (xout, xin1, xin2)
- implicit none
- integer xout, xin1, xin2
-
-* out, in1, and in2 are the desired indexes into the REAL array (array).
-
- complex expect
- integer pwr
- integer out, in1, in2
-
- real array(6)
- complex carray(3)
- equivalence (carray(1), array(1))
-
-* Make sure the indexes can be accommodated by the equivalences above.
-
- if (mod (xout, 2) .ne. 1) call abort
- if (mod (xin1, 2) .ne. 1) call abort
- if (mod (xin2, 2) .ne. 1) call abort
-
-* Convert the indexes into ones suitable for the COMPLEX array (carray).
-
- out = (xout + 1) / 2
- in1 = (xin1 + 1) / 2
- in2 = (xin2 + 1) / 2
-
-* Check some open-coded stuff, just in case.
-
- call prepare1 (carray(in1))
- expect = + carray(in1)
- carray(out) = + carray(in1)
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = - carray(in1)
- carray(out) = - carray(in1)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) + carray(in2)
- carray(out) = carray(in1) + carray(in2)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) - carray(in2)
- carray(out) = carray(in1) - carray(in2)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) * carray(in2)
- carray(out) = carray(in1) * carray(in2)
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 2
- carray(out) = carray(in1) ** 2
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 3
- carray(out) = carray(in1) ** 3
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = abs (carray(in1))
- array(out*2-1) = abs (carray(in1))
- array(out*2) = 0
- call check (expect, carray(out))
-
-* Now check the stuff implemented in libF77.
-
- call prepare1 (carray(in1))
- expect = cos (carray(in1))
- carray(out) = cos (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = exp (carray(in1))
- carray(out) = exp (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = log (carray(in1))
- carray(out) = log (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = sin (carray(in1))
- carray(out) = sin (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = sqrt (carray(in1))
- carray(out) = sqrt (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = conjg (carray(in1))
- carray(out) = conjg (carray(in1))
- call check (expect, carray(out))
-
- call prepare1i (carray(in1), pwr)
- expect = carray(in1) ** pwr
- carray(out) = carray(in1) ** pwr
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) / carray(in2)
- carray(out) = carray(in1) / carray(in2)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) ** carray(in2)
- carray(out) = carray(in1) ** carray(in2)
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** .2
- carray(out) = carray(in1) ** .2
- call check (expect, carray(out))
-
- end
-
- subroutine trypart (xout, xin1, xin2)
- implicit none
- integer xout, xin1, xin2
-
-* out, in1, and in2 are the desired indexes into the REAL array (array).
-
- complex expect
- integer pwr
- integer out, in1, in2
-
- real array(6)
- complex carray(3), carrayp(2)
- equivalence (carray(1), array(1))
- equivalence (carrayp(1), array(2))
-
-* Make sure the indexes can be accommodated by the equivalences above.
-
- if (mod (xout, 2) .ne. 0) call abort
- if (mod (xin1, 2) .ne. 1) call abort
- if (mod (xin2, 2) .ne. 1) call abort
-
-* Convert the indexes into ones suitable for the COMPLEX array (carray).
-
- out = xout / 2
- in1 = (xin1 + 1) / 2
- in2 = (xin2 + 1) / 2
-
-* Check some open-coded stuff, just in case.
-
- call prepare1 (carray(in1))
- expect = + carray(in1)
- carrayp(out) = + carray(in1)
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = - carray(in1)
- carrayp(out) = - carray(in1)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) + carray(in2)
- carrayp(out) = carray(in1) + carray(in2)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) - carray(in2)
- carrayp(out) = carray(in1) - carray(in2)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) * carray(in2)
- carrayp(out) = carray(in1) * carray(in2)
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 2
- carrayp(out) = carray(in1) ** 2
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 3
- carrayp(out) = carray(in1) ** 3
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = abs (carray(in1))
- array(out*2) = abs (carray(in1))
- array(out*2+1) = 0
- call check (expect, carrayp(out))
-
-* Now check the stuff implemented in libF77.
-
- call prepare1 (carray(in1))
- expect = cos (carray(in1))
- carrayp(out) = cos (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = exp (carray(in1))
- carrayp(out) = exp (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = log (carray(in1))
- carrayp(out) = log (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = sin (carray(in1))
- carrayp(out) = sin (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = sqrt (carray(in1))
- carrayp(out) = sqrt (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = conjg (carray(in1))
- carrayp(out) = conjg (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1i (carray(in1), pwr)
- expect = carray(in1) ** pwr
- carrayp(out) = carray(in1) ** pwr
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) / carray(in2)
- carrayp(out) = carray(in1) / carray(in2)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) ** carray(in2)
- carrayp(out) = carray(in1) ** carray(in2)
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** .2
- carrayp(out) = carray(in1) ** .2
- call check (expect, carrayp(out))
-
- end
-
- subroutine prepare1 (in)
- implicit none
- complex in
-
- in = (3.2, 4.2)
-
- end
-
- subroutine prepare1i (in, i)
- implicit none
- complex in
- integer i
-
- in = (2.3, 2.5)
- i = 4
-
- end
-
- subroutine prepare2 (in1, in2)
- implicit none
- complex in1, in2
-
- in1 = (1.3, 2.4)
- in2 = (3.5, 7.1)
-
- end
-
- subroutine check (expect, got)
- implicit none
- complex expect, got
-
- if (aimag(expect) .ne. aimag(got)) call abort
- if (real(expect) .ne. real(got)) call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/19990325-1.f b/gcc/testsuite/g77.f-torture/execute/19990325-1.f
deleted file mode 100644
index 802f375b33d..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990325-1.f
+++ /dev/null
@@ -1,313 +0,0 @@
-* test whether complex operators properly handle
-* full and partial aliasing.
-* (libf2c/libF77 routines used to assume no aliasing,
-* then were changed to accommodate full aliasing, while
-* the libg2c/libF77 versions were changed to accommodate
-* both full and partial aliasing.)
-*
-* NOTE: this (19990325-1.f) is the double-precision version.
-* See 19990325-0.f for the single-precision version.
-
- program doublecomplexalias
- implicit none
-
-* Make sure non-aliased cases work. (Catch roundoff/precision
-* problems, etc., here. Modify subroutine check if they occur.)
-
- call tryfull (1, 3, 5)
-
-* Now check various combinations of aliasing.
-
-* Full aliasing.
- call tryfull (1, 1, 5)
-
-* Partial aliasing.
- call trypart (2, 3, 5)
- call trypart (2, 1, 5)
- call trypart (2, 5, 3)
- call trypart (2, 5, 1)
-
- end
-
- subroutine tryfull (xout, xin1, xin2)
- implicit none
- integer xout, xin1, xin2
-
-* out, in1, and in2 are the desired indexes into the REAL array (array).
-
- double complex expect
- integer pwr
- integer out, in1, in2
-
- double precision array(6)
- double complex carray(3)
- equivalence (carray(1), array(1))
-
-* Make sure the indexes can be accommodated by the equivalences above.
-
- if (mod (xout, 2) .ne. 1) call abort
- if (mod (xin1, 2) .ne. 1) call abort
- if (mod (xin2, 2) .ne. 1) call abort
-
-* Convert the indexes into ones suitable for the COMPLEX array (carray).
-
- out = (xout + 1) / 2
- in1 = (xin1 + 1) / 2
- in2 = (xin2 + 1) / 2
-
-* Check some open-coded stuff, just in case.
-
- call prepare1 (carray(in1))
- expect = + carray(in1)
- carray(out) = + carray(in1)
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = - carray(in1)
- carray(out) = - carray(in1)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) + carray(in2)
- carray(out) = carray(in1) + carray(in2)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) - carray(in2)
- carray(out) = carray(in1) - carray(in2)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) * carray(in2)
- carray(out) = carray(in1) * carray(in2)
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 2
- carray(out) = carray(in1) ** 2
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 3
- carray(out) = carray(in1) ** 3
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = abs (carray(in1))
- array(out*2-1) = abs (carray(in1))
- array(out*2) = 0
- call check (expect, carray(out))
-
-* Now check the stuff implemented in libF77.
-
- call prepare1 (carray(in1))
- expect = cos (carray(in1))
- carray(out) = cos (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = exp (carray(in1))
- carray(out) = exp (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = log (carray(in1))
- carray(out) = log (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = sin (carray(in1))
- carray(out) = sin (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = sqrt (carray(in1))
- carray(out) = sqrt (carray(in1))
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = conjg (carray(in1))
- carray(out) = conjg (carray(in1))
- call check (expect, carray(out))
-
- call prepare1i (carray(in1), pwr)
- expect = carray(in1) ** pwr
- carray(out) = carray(in1) ** pwr
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) / carray(in2)
- carray(out) = carray(in1) / carray(in2)
- call check (expect, carray(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) ** carray(in2)
- carray(out) = carray(in1) ** carray(in2)
- call check (expect, carray(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** .2
- carray(out) = carray(in1) ** .2
- call check (expect, carray(out))
-
- end
-
- subroutine trypart (xout, xin1, xin2)
- implicit none
- integer xout, xin1, xin2
-
-* out, in1, and in2 are the desired indexes into the REAL array (array).
-
- double complex expect
- integer pwr
- integer out, in1, in2
-
- double precision array(6)
- double complex carray(3), carrayp(2)
- equivalence (carray(1), array(1))
- equivalence (carrayp(1), array(2))
-
-* Make sure the indexes can be accommodated by the equivalences above.
-
- if (mod (xout, 2) .ne. 0) call abort
- if (mod (xin1, 2) .ne. 1) call abort
- if (mod (xin2, 2) .ne. 1) call abort
-
-* Convert the indexes into ones suitable for the COMPLEX array (carray).
-
- out = xout / 2
- in1 = (xin1 + 1) / 2
- in2 = (xin2 + 1) / 2
-
-* Check some open-coded stuff, just in case.
-
- call prepare1 (carray(in1))
- expect = + carray(in1)
- carrayp(out) = + carray(in1)
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = - carray(in1)
- carrayp(out) = - carray(in1)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) + carray(in2)
- carrayp(out) = carray(in1) + carray(in2)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) - carray(in2)
- carrayp(out) = carray(in1) - carray(in2)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) * carray(in2)
- carrayp(out) = carray(in1) * carray(in2)
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 2
- carrayp(out) = carray(in1) ** 2
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** 3
- carrayp(out) = carray(in1) ** 3
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = abs (carray(in1))
- array(out*2) = abs (carray(in1))
- array(out*2+1) = 0
- call check (expect, carrayp(out))
-
-* Now check the stuff implemented in libF77.
-
- call prepare1 (carray(in1))
- expect = cos (carray(in1))
- carrayp(out) = cos (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = exp (carray(in1))
- carrayp(out) = exp (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = log (carray(in1))
- carrayp(out) = log (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = sin (carray(in1))
- carrayp(out) = sin (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = sqrt (carray(in1))
- carrayp(out) = sqrt (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = conjg (carray(in1))
- carrayp(out) = conjg (carray(in1))
- call check (expect, carrayp(out))
-
- call prepare1i (carray(in1), pwr)
- expect = carray(in1) ** pwr
- carrayp(out) = carray(in1) ** pwr
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) / carray(in2)
- carrayp(out) = carray(in1) / carray(in2)
- call check (expect, carrayp(out))
-
- call prepare2 (carray(in1), carray(in2))
- expect = carray(in1) ** carray(in2)
- carrayp(out) = carray(in1) ** carray(in2)
- call check (expect, carrayp(out))
-
- call prepare1 (carray(in1))
- expect = carray(in1) ** .2
- carrayp(out) = carray(in1) ** .2
- call check (expect, carrayp(out))
-
- end
-
- subroutine prepare1 (in)
- implicit none
- double complex in
-
- in = (3.2d0, 4.2d0)
-
- end
-
- subroutine prepare1i (in, i)
- implicit none
- double complex in
- integer i
-
- in = (2.3d0, 2.5d0)
- i = 4
-
- end
-
- subroutine prepare2 (in1, in2)
- implicit none
- double complex in1, in2
-
- in1 = (1.3d0, 2.4d0)
- in2 = (3.5d0, 7.1d0)
-
- end
-
- subroutine check (expect, got)
- implicit none
- double complex expect, got
-
- if (dimag(expect) .ne. dimag(got)) call abort
- if (dble(expect) .ne. dble(got)) call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/19990419-1.f b/gcc/testsuite/g77.f-torture/execute/19990419-1.f
deleted file mode 100644
index 7449bac2b95..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990419-1.f
+++ /dev/null
@@ -1,21 +0,0 @@
-* Test DO WHILE, to make sure it fully reevaluates its expression.
-* Belongs in execute/.
- common /x/ ival
- j = 0
- do while (i() .eq. 1)
- j = j + 1
- if (j .gt. 5) call abort
- end do
- if (j .ne. 4) call abort
- if (ival .ne. 5) call abort
- end
- function i()
- common /x/ ival
- ival = ival + 1
- i = 10
- if (ival .lt. 5) i = 1
- end
- block data
- common /x/ ival
- data ival/0/
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/19990826-0.f b/gcc/testsuite/g77.f-torture/execute/19990826-0.f
deleted file mode 100644
index 975efdce61e..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990826-0.f
+++ /dev/null
@@ -1,19 +0,0 @@
-* From: niles@fan745.gsfc.nasa.gov
-* To: fortran@gnu.org
-* Cc: niles@fan745.gsfc.nasa.gov
-* Subject: problem with DNINT() on Linux/Alpha.
-* Date: Sun, 06 Jun 1999 16:39:35 -0400
-* X-UIDL: 6aa9208d7bda8b6182a095dfd37016b7
-
- IF (DNINT(0.0D0) .NE. 0.) CALL ABORT
- STOP
- END
-
-* Result on Linux/i386: " 0." (and every other computer!)
-* Result on Linux/alpha: " 3.6028797E+16"
-
-* It seems to work fine if I change it to the generic NINT(). Probably
-* a name pollution problem in the new C library, but it seems bad. no?
-
-* Thanks,
-* Rick Niles.
diff --git a/gcc/testsuite/g77.f-torture/execute/19990826-2.f b/gcc/testsuite/g77.f-torture/execute/19990826-2.f
deleted file mode 100644
index 30bdb30fd57..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/19990826-2.f
+++ /dev/null
@@ -1,33 +0,0 @@
-* From: "Billinghurst, David (RTD)" <David.Billinghurst@riotinto.com.au>
-* Subject: RE: single precision complex bug in g77 - was Testing g77 with LA
-* PACK 3.0
-* Date: Thu, 8 Jul 1999 00:55:11 +0100
-* X-UIDL: b00d9d8081a36fef561b827d255dd4a5
-
-* Here is a slightly simpler and neater test case
-
- program labug3
- implicit none
-
-* This program gives the wrong answer on mips-sgi-irix6.5
-* when compiled with g77 from egcs-19990629 (gcc 2.95 prerelease)
-* Get a = 0.0 when it should be 1.0
-*
-* Works with: -femulate-complex
-* egcs-1.1.2
-*
-* Originally derived from LAPACK 3.0 test suite.
-*
-* David Billinghurst, (David.Billinghurst@riotinto.com.au)
-* 8 July 1999
-*
- complex one, z
- real a, f1
- f1(z) = real(z)
- one = (1.,0.)
- a = f1(one)
- if ( abs(a-1.0) .gt. 1.0e-5 ) then
- write(6,*) 'A should be 1.0 but it is',a
- call abort()
- end if
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/20000503-1.f b/gcc/testsuite/g77.f-torture/execute/20000503-1.f
deleted file mode 100644
index 027c9fc6fbb..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/20000503-1.f
+++ /dev/null
@@ -1,24 +0,0 @@
-*
-* Originally derived from LAPACK 3.0 test suite failure.
-*
-* David Billinghurst, (David.Billinghurst@riotinto.com.au)
-* 23 February 2000
-*
- INTEGER N, I, SLASQX
- N = 20
- I = SLASQX( N )
- IF ( I .NE. 2*N ) THEN
- WRITE(6,*) 'I = ', I, ' but should be ', 2*N
- CALL ABORT()
- END IF
- END
-
- INTEGER FUNCTION SLASQX( N )
- INTEGER N, I0, I, K
- I0 = 1
- DO I = 4*I0, 2*( I0+N-1 ), 4
- K = I
- END DO
- SLASQX = K
- RETURN
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/20001111.f b/gcc/testsuite/g77.f-torture/execute/20001111.f
deleted file mode 100644
index db342bbd42b..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/20001111.f
+++ /dev/null
@@ -1,12 +0,0 @@
- DOUBLE PRECISION VALUE(2), TOLD, BK
- DATA VALUE /0D0, 1D0/
- DATA TOLD /0D0/
- DO I=1, 2
- BK = VALUE(I)
- IF(BK .GT. TOLD) GOTO 10
- ENDDO
- WRITE(*,*)'Error: BK = ', BK
- CALL ABORT
- 10 CONTINUE
- WRITE(*,*)'No Error: BK = ', BK
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/20001201.f b/gcc/testsuite/g77.f-torture/execute/20001201.f
deleted file mode 100644
index e80c2a8bcf8..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/20001201.f
+++ /dev/null
@@ -1,12 +0,0 @@
- LOGICAL TF(5)
- CHARACTER*60 LINE
- NAMELIST /LIST/ TF,TT,FF,XYZ
- DATA TF /5*.FALSE./
- DATA LINE /'&LIST,TF=.T.,.F.,.T.,FF=33.,TT=23.,XYZ=-1234.55,/'/
- OPEN(1,STATUS='SCRATCH')
- WRITE(1,*) LINE
- REWIND(1)
- READ(1,LIST)
- CLOSE(1)
- IF (TF(5)) CALL ABORT
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/20001201.x b/gcc/testsuite/g77.f-torture/execute/20001201.x
index 7087bab4960..6a69a3aadab 100644
--- a/gcc/testsuite/g77.f-torture/execute/20001201.x
+++ b/gcc/testsuite/g77.f-torture/execute/20001201.x
@@ -3,6 +3,9 @@
# Similar restrictions exist for most simulators.
if { [istarget "mmix-knuth-mmixware"]
+ || [istarget "arm*-*-elf"]
+ || [istarget "strongarm*-*-elf"]
+ || [istarget "xscale*-*-elf"]
|| [istarget "cris-*-elf"] } {
set torture_execute_xfail [istarget]
}
diff --git a/gcc/testsuite/g77.f-torture/execute/20010116.f b/gcc/testsuite/g77.f-torture/execute/20010116.f
deleted file mode 100644
index 7c72a085a79..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/20010116.f
+++ /dev/null
@@ -1,38 +0,0 @@
-*
-* Derived from LAPACK 3.0 routine CHGEQZ
-* Fails on i686-pc-cygwin with gcc-2.97 snapshots at -O2 and higher
-* PR fortran/1645
-*
-* David Billinghurst, (David.Billinghurst@riotinto.com)
-* 14 January 2001
-* Rewritten by Toon Moene (toon@moene.indiv.nluug.nl)
-* 15 January 2001
-*
- COMPLEX A(5,5)
- DATA A/25*(0.0,0.0)/
- A(4,3) = (0.05,0.2)/3.0E-7
- A(4,4) = (-0.03,-0.4)
- A(5,4) = (-2.0E-07,2.0E-07)
- CALL CHGEQZ( 5, A )
- END
- SUBROUTINE CHGEQZ( N, A )
- COMPLEX A(N,N), X
- ABS1( X ) = ABS( REAL( X ) ) + ABS( AIMAG( X ) )
- DO J = 4, 2, -1
- I = J
- TEMP = ABS1( A(J,J) )
- TEMP2 = ABS1( A( J+1, J ) )
- TEMPR = MAX( TEMP, TEMP2 )
- IF( TEMPR .LT. 1.0 .AND. TEMPR .NE. 0.0 ) THEN
- TEMP = TEMP / TEMPR
- TEMP2 = TEMP2 / TEMPR
- END IF
- IF ( ABS1(A(J,J-1))*TEMP2 .LE. TEMP ) GO TO 90
- END DO
-c Should not reach here, but need a statement
- PRINT*
- 90 IF ( I .NE. 4 ) THEN
- PRINT*,'I =', I, ' but should be 4'
- CALL ABORT()
- END IF
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/20010426.f b/gcc/testsuite/g77.f-torture/execute/20010426.f
deleted file mode 100644
index dd1b5bdd0e8..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/20010426.f
+++ /dev/null
@@ -1,2 +0,0 @@
- print*,cos(1.0)
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/20010430.f b/gcc/testsuite/g77.f-torture/execute/20010430.f
deleted file mode 100644
index 58dca834004..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/20010430.f
+++ /dev/null
@@ -1,20 +0,0 @@
- REAL DAT(2,5)
- DO I = 1, 5
- DAT(1,I) = I*1.6356-NINT(I*1.6356)
- DAT(2,I) = I
- ENDDO
- DO I = 1, 4
- DO J = I+1, 5
- IF (DAT(1,J) - DAT(1,I) .LT. 0.0) THEN
- DO K = 1, 2
- TMP = DAT(K,I)
- DAT(K,I) = DAT(K,J)
- DAT(K,J) = TMP
- ENDDO
- ENDIF
- ENDDO
- ENDDO
- DO I = 1, 4
- IF (DAT(1,I) .GT. DAT(1,I+1)) CALL ABORT
- ENDDO
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/20010610.f b/gcc/testsuite/g77.f-torture/execute/20010610.f
deleted file mode 100644
index 4ce2d22147a..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/20010610.f
+++ /dev/null
@@ -1,4 +0,0 @@
- DO I = 0, 255
- IF (ICHAR(CHAR(I)) .NE. I) CALL ABORT
- ENDDO
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/5122.f b/gcc/testsuite/g77.f-torture/execute/5122.f
deleted file mode 100644
index bdf955acac9..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/5122.f
+++ /dev/null
@@ -1,8 +0,0 @@
- CHARACTER*20 PARTD(6)
- INTEGER*2 L
- DATA (PARTD(L),L=1,6)/'A','B','C','D','E','F'/
- IF ( PARTD(1) .NE. 'A' .OR. PARTD(2) .NE. 'B'
- , .OR. PARTD(3) .NE. 'C' .OR. PARTD(4) .NE. 'D'
- , .OR. PARTD(5) .NE. 'E' .OR. PARTD(6) .NE. 'F')
- , CALL ABORT
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/6177.f b/gcc/testsuite/g77.f-torture/execute/6177.f
deleted file mode 100644
index f40029cf52c..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/6177.f
+++ /dev/null
@@ -1,14 +0,0 @@
- program pr6177
-C
-C Test case for PR optimization/6177.
-C This bug (an ICE) originally showed up in file cblat2.f from LAPACK.
-C
- complex x
- complex w(1)
- intrinsic conjg
- x = (2.0d0, 1.0d0)
- w(1) = x
- x = conjg(x)
- w(1) = conjg(w(1))
- if (abs(x-w(1)) .gt. 1.0e-5) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/6367.f b/gcc/testsuite/g77.f-torture/execute/6367.f
deleted file mode 100644
index 158bddf8f47..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/6367.f
+++ /dev/null
@@ -1,16 +0,0 @@
- program testnl
- character*80 line
- dimension a(10),b(10)
- namelist /nl/ a
- data a / 10 * 0.0 /
- data b / 0., 1., 1., 1., 2., 2., 3., 3., 3., 0. /
- data line /'&nl a(2) = 3*1.0, 2*2.0, 3*3.0 /'/
- open(1,status='scratch')
- write(1,'(a)') line
- rewind(1)
- read(1,nl)
- close(1)
- do i = 1, 10
- if (a(i) .ne. b(i)) call abort
- enddo
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/6367.x b/gcc/testsuite/g77.f-torture/execute/6367.x
index 7087bab4960..42fc7da02ae 100644
--- a/gcc/testsuite/g77.f-torture/execute/6367.x
+++ b/gcc/testsuite/g77.f-torture/execute/6367.x
@@ -3,6 +3,9 @@
# Similar restrictions exist for most simulators.
if { [istarget "mmix-knuth-mmixware"]
+ || [istarget "arm*-*-elf"]
+ || [istarget "strongarm*-*-elf"]
+ || [istarget "xscalearm*-*-elf"]
|| [istarget "cris-*-elf"] } {
set torture_execute_xfail [istarget]
}
diff --git a/gcc/testsuite/g77.f-torture/execute/947.f b/gcc/testsuite/g77.f-torture/execute/947.f
deleted file mode 100644
index 7efa204d5be..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/947.f
+++ /dev/null
@@ -1,12 +0,0 @@
- DIMENSION A(-5:5)
- INTEGER*1 IM5, IZ, IP5
- INTEGER*2 IM1, IP1
- PARAMETER (IM5=-5, IM1=-1, IZ=0, IP1=1, IP5=5)
- DATA A(IM5) /-5./, A(IM1) /-1./
- DATA A(IZ) /0./
- DATA A(IP5) /+5./, A(IP1) /+1./
- IF (A(IM5) .NE. -5. .OR. A(IM1) .NE. -1. .OR.
- , A(IZ) .NE. 0. .OR.
- , A(IP5) .NE. +5. .OR. A(IP1) .NE. +1. )
- , CALL ABORT
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/970625-2.f b/gcc/testsuite/g77.f-torture/execute/970625-2.f
deleted file mode 100644
index 3ef6f46cb79..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/970625-2.f
+++ /dev/null
@@ -1,84 +0,0 @@
-* Date: Wed, 25 Jun 1997 12:48:26 +0200 (MET DST)
-* MIME-Version: 1.0
-* From: R.Hooft@EuroMail.com (Rob Hooft)
-* To: g77-alpha@gnu.ai.mit.edu
-* Subject: Re: testing 970624.
-* In-Reply-To: <199706251027.GAA07892@churchy.gnu.ai.mit.edu>
-* References: <199706251018.MAA21538@nu>
-* <199706251027.GAA07892@churchy.gnu.ai.mit.edu>
-* X-Mailer: VM 6.30 under Emacs 19.34.1
-* Content-Type: text/plain; charset=US-ASCII
-*
-* >>>>> "CB" == Craig Burley <burley@gnu.ai.mit.edu> writes:
-*
-* CB> but OTOH I'd like to see more problems like this on other
-* CB> applications, and especially other systems
-*
-* How about this one: An application that prints "112." on all
-* compilers/platforms I have tested, except with the new g77 on ALPHA (I
-* don't have the new g77 on any other platform here to test)?
-*
-* Application Appended. Source code courtesy of my boss.....
-* Disclaimer: I do not know the right answer, or even whether there is a
-* single right answer.....
-*
-* Regards,
-* --
-* ===== R.Hooft@EuroMail.com http://www.Sander.EMBL-Heidelberg.DE/rob/ ==
-* ==== In need of protein modeling? http://www.Sander.EMBL-Heidelberg.DE/whatif/
-* Validation of protein structures? http://biotech.EMBL-Heidelberg.DE:8400/ ====
-* == PGPid 0xFA19277D == Use Linux! Free Software Rules The World! =============
-*
-* nu[152]for% cat humor.f
- PROGRAM SUBROUTINE
- LOGICAL ELSE IF
- INTEGER REAL, GO TO PROGRAM, WHILE
- REAL FORMAT(2)
- DATA IF,REAL,END DO,WHILE,FORMAT(2),I2/2,6,7,1,112.,1/
- DO THEN=1, END DO, WHILE
- CALL = END DO - IF
- PROGRAM = THEN - IF
- ELSE IF = THEN .GT. IF
- IF (THEN.GT.REAL) THEN
- CALL FUNCTION PROGRAM (ELSE IF, GO TO PROGRAM, THEN)
- ELSE IF (ELSE IF) THEN
- REAL = THEN + END DO
- END IF
- END DO
- 10 FORMAT(I2/I2) = WHILE*REAL*THEN
- IF (FORMAT(I2) .NE. FORMAT(I2+I2)) CALL ABORT
- END ! DO
- SUBROUTINE FUNCTION PROGRAM (REAL,INTEGER, LOGICAL)
- LOGICAL REAL
- REAL LOGICAL
- INTEGER INTEGER, STOP, RETURN, GO TO
- ASSIGN 9 TO STOP
- ASSIGN = 9 + LOGICAL
- ASSIGN 7 TO RETURN
- ASSIGN 9 TO GO TO
- GO TO = 5
- STOP = 8
- IF (.NOT.REAL) GOTO STOP
- IF (LOGICAL.GT.INTEGER) THEN
- IF = LOGICAL +5
- IF (LOGICAL.EQ.5) ASSIGN 5 TO IF
- INTEGER=IF
- ELSE
- IF (ASSIGN.GT.STOP) ASSIGN 9 TO GOTO
- ELSE = GO TO
- END IF = ELSE + GO TO
- IF (.NOT.REAL.AND.GOTO.GT.ELSE) GOTO RETURN
- END IF
- 5 CONTINUE
- 7 LOGICAL=LOGICAL+STOP
- 9 RETURN
- END ! IF
-* nu[153]for% f77 humor.f
-* nu[154]for% ./a.out
-* 112.0000
-* nu[155]for% f90 humor.f
-* nu[156]for% ./a.out
-* 112.0000
-* nu[157]for% g77 humor.f
-* nu[158]for% ./a.out
-* 40.
diff --git a/gcc/testsuite/g77.f-torture/execute/970816-3.f b/gcc/testsuite/g77.f-torture/execute/970816-3.f
deleted file mode 100644
index 6398600f059..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/970816-3.f
+++ /dev/null
@@ -1,20 +0,0 @@
-* Date: Wed, 13 Aug 1997 15:34:23 +0200 (METDST)
-* From: Claus Denk <denk@cica.es>
-* To: g77-alpha@gnu.ai.mit.edu
-* Subject: 970811 report - segfault bug on alpha still there
-*[...]
-* Now, the bug that I reported some weeks ago is still there, I'll post
-* the test program again:
-*
- PROGRAM TEST
-C a bug in g77-0.5.21 - alpha. Works with NSTART=0 and segfaults with
-C NSTART=1 on the second write.
- PARAMETER (NSTART=1,NADD=NSTART+1)
- REAL AB(NSTART:NSTART)
- AB(NSTART)=1.0
- I=1
- J=2
- IND=I-J+NADD
- write(*,*) AB(IND)
- write(*,*) AB(I-J+NADD)
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/971102-1.f b/gcc/testsuite/g77.f-torture/execute/971102-1.f
deleted file mode 100644
index 6b0c2f3b3a9..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/971102-1.f
+++ /dev/null
@@ -1,11 +0,0 @@
- i=3
- j=0
- do i=i,5
- j = j+i
- end do
- do i=3,i
- j = j+i
- end do
- if (i.ne.7) call abort()
- print *, i,j
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980520-1.f b/gcc/testsuite/g77.f-torture/execute/980520-1.f
deleted file mode 100644
index 6d05c6767fd..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980520-1.f
+++ /dev/null
@@ -1,6 +0,0 @@
-c Produced a link error through not eliminating the unused statement
-c function after 1998-05-15 change to gcc/toplev.c. It's in
-c `execute' since it needs to link.
-c Fixed by 1998-05-23 change to f/com.c.
- values(i,j) = val((i-1)*n+j)
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-0.f b/gcc/testsuite/g77.f-torture/execute/980628-0.f
deleted file mode 100644
index c36b1efc052..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-0.f
+++ /dev/null
@@ -1,61 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
- equivalence (r1(2), d1)
- equivalence (r2(2), d2)
- equivalence (r3(2), d3)
-
- r1(1) = 1.
- d1 = 10.
- r1(4) = 1.
- r1(5) = 1.
- i1 = 1
- r2(1) = 2.
- d2 = 20.
- r2(4) = 2.
- r2(5) = 2.
- i2 = 2
- r3(1) = 3.
- d3 = 30.
- r3(4) = 3.
- r3(5) = 3.
- i3 = 3
-
- call x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
-
- end
-
- subroutine x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
- implicit none
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
-
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-1.f b/gcc/testsuite/g77.f-torture/execute/980628-1.f
deleted file mode 100644
index 6ab0a0a81a8..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-1.f
+++ /dev/null
@@ -1,62 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
- save
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
- equivalence (r1(2), d1)
- equivalence (r2(2), d2)
- equivalence (r3(2), d3)
-
- r1(1) = 1.
- d1 = 10.
- r1(4) = 1.
- r1(5) = 1.
- i1 = 1
- r2(1) = 2.
- d2 = 20.
- r2(4) = 2.
- r2(5) = 2.
- i2 = 2
- r3(1) = 3.
- d3 = 30.
- r3(4) = 3.
- r3(5) = 3.
- i3 = 3
-
- call x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
-
- end
-
- subroutine x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
- implicit none
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
-
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-10.f b/gcc/testsuite/g77.f-torture/execute/980628-10.f
deleted file mode 100644
index 427f635add9..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-10.f
+++ /dev/null
@@ -1,57 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
- save
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
- equivalence (r1, c1(2))
- equivalence (r2, c2(2))
- equivalence (r3, c3(2))
-
- c1(1) = '1'
- r1 = 1.
- c1(11) = '1'
- c4 = '4'
- c2(1) = '2'
- r2 = 2.
- c2(11) = '2'
- c5 = '5'
- c3(1) = '3'
- r3 = 3.
- c3(11) = '3'
- c6 = '6'
-
- call x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
-
- end
-
- subroutine x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
- implicit none
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
-
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
-
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-2.f b/gcc/testsuite/g77.f-torture/execute/980628-2.f
deleted file mode 100644
index a140e7db611..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-2.f
+++ /dev/null
@@ -1,55 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
- equivalence (c1(2), r1)
- equivalence (c2(2), r2)
- equivalence (c3(2), r3)
-
- c1(1) = '1'
- r1 = 1.
- c1(11) = '1'
- c4 = '4'
- c2(1) = '2'
- r2 = 2.
- c2(11) = '2'
- c5 = '5'
- c3(1) = '3'
- r3 = 3.
- c3(11) = '3'
- c6 = '6'
-
- call x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
-
- end
-
- subroutine x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
- implicit none
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
-
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-3.f b/gcc/testsuite/g77.f-torture/execute/980628-3.f
deleted file mode 100644
index 47e6ea57301..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-3.f
+++ /dev/null
@@ -1,56 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
- save
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
- equivalence (c1(2), r1)
- equivalence (c2(2), r2)
- equivalence (c3(2), r3)
-
- c1(1) = '1'
- r1 = 1.
- c1(11) = '1'
- c4 = '4'
- c2(1) = '2'
- r2 = 2.
- c2(11) = '2'
- c5 = '5'
- c3(1) = '3'
- r3 = 3.
- c3(11) = '3'
- c6 = '6'
-
- call x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
-
- end
-
- subroutine x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
- implicit none
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
-
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-4.f b/gcc/testsuite/g77.f-torture/execute/980628-4.f
deleted file mode 100644
index 40bd6e6df51..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-4.f
+++ /dev/null
@@ -1,27 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system,
-* including when initial values are provided (e.g. DATA).
-
- program test
- implicit none
-
- real r
- double precision d
- common /cmn/ r, d
-
- if (r .ne. 1.) call abort
- if (d .ne. 10.) call abort
-
- end
-
- block data init
- implicit none
-
- real r
- double precision d
- common /cmn/ r, d
-
- data r/1./, d/10./
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-4.x b/gcc/testsuite/g77.f-torture/execute/980628-4.x
deleted file mode 100644
index 8f6fe7faf80..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-4.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test fails compilation in cross-endian environments, for example as
-# below, with a "sorry" message.
-
-if { [ishost "i\[34567\]86-*-*"] } {
- if { [istarget "mmix-knuth-mmixware"]
- || [istarget "powerpc-*-*"] } {
- set torture_compile_xfail [istarget]
- }
-}
-
-return 0
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-5.f b/gcc/testsuite/g77.f-torture/execute/980628-5.f
deleted file mode 100644
index 14f39e3c51e..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-5.f
+++ /dev/null
@@ -1,27 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system,
-* including when initial values are provided (e.g. DATA).
-
- program test
- implicit none
-
- character c
- double precision d
- common /cmn/ c, d
-
- if (c .ne. '1') call abort
- if (d .ne. 10.) call abort
-
- end
-
- block data init
- implicit none
-
- character c
- double precision d
- common /cmn/ c, d
-
- data c/'1'/, d/10./
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-5.x b/gcc/testsuite/g77.f-torture/execute/980628-5.x
deleted file mode 100644
index 8f6fe7faf80..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-5.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test fails compilation in cross-endian environments, for example as
-# below, with a "sorry" message.
-
-if { [ishost "i\[34567\]86-*-*"] } {
- if { [istarget "mmix-knuth-mmixware"]
- || [istarget "powerpc-*-*"] } {
- set torture_compile_xfail [istarget]
- }
-}
-
-return 0
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-6.f b/gcc/testsuite/g77.f-torture/execute/980628-6.f
deleted file mode 100644
index c5ade65ed39..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-6.f
+++ /dev/null
@@ -1,26 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system,
-* including when initial values are provided (e.g. DATA).
-
- program test
- implicit none
-
- character c
- double precision d(100)
- common /cmn/ c, d
-
- if (d(80) .ne. 10.) call abort
-
- end
-
- block data init
- implicit none
-
- character c
- double precision d(100)
- common /cmn/ c, d
-
- data d(80)/10./
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-6.x b/gcc/testsuite/g77.f-torture/execute/980628-6.x
deleted file mode 100644
index 8f6fe7faf80..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-6.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test fails compilation in cross-endian environments, for example as
-# below, with a "sorry" message.
-
-if { [ishost "i\[34567\]86-*-*"] } {
- if { [istarget "mmix-knuth-mmixware"]
- || [istarget "powerpc-*-*"] } {
- set torture_compile_xfail [istarget]
- }
-}
-
-return 0
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-7.f b/gcc/testsuite/g77.f-torture/execute/980628-7.f
deleted file mode 100644
index c81ba31fc26..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-7.f
+++ /dev/null
@@ -1,62 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
- equivalence (d1, r1(2))
- equivalence (d2, r2(2))
- equivalence (d3, r3(2))
-
- r1(1) = 1.
- d1 = 10.
- r1(4) = 1.
- r1(5) = 1.
- i1 = 1
- r2(1) = 2.
- d2 = 20.
- r2(4) = 2.
- r2(5) = 2.
- i2 = 2
- r3(1) = 3.
- d3 = 30.
- r3(4) = 3.
- r3(5) = 3.
- i3 = 3
-
- call x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
-
- end
-
- subroutine x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
- implicit none
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
-
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
-
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-8.f b/gcc/testsuite/g77.f-torture/execute/980628-8.f
deleted file mode 100644
index 8940d009954..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-8.f
+++ /dev/null
@@ -1,63 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
- save
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
- equivalence (d1, r1(2))
- equivalence (d2, r2(2))
- equivalence (d3, r3(2))
-
- r1(1) = 1.
- d1 = 10.
- r1(4) = 1.
- r1(5) = 1.
- i1 = 1
- r2(1) = 2.
- d2 = 20.
- r2(4) = 2.
- r2(5) = 2.
- i2 = 2
- r3(1) = 3.
- d3 = 30.
- r3(4) = 3.
- r3(5) = 3.
- i3 = 3
-
- call x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
-
- end
-
- subroutine x (r1, d1, i1, r2, d2, i2, r3, d3, i3)
- implicit none
-
- real r1(5), r2(5), r3(5)
- double precision d1, d2, d3
- integer i1, i2, i3
-
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
-
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/980628-9.f b/gcc/testsuite/g77.f-torture/execute/980628-9.f
deleted file mode 100644
index 54e6552d628..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980628-9.f
+++ /dev/null
@@ -1,56 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
- equivalence (r1, c1(2))
- equivalence (r2, c2(2))
- equivalence (r3, c3(2))
-
- c1(1) = '1'
- r1 = 1.
- c1(11) = '1'
- c4 = '4'
- c2(1) = '2'
- r2 = 2.
- c2(11) = '2'
- c5 = '5'
- c3(1) = '3'
- r3 = 3.
- c3(11) = '3'
- c6 = '6'
-
- call x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
-
- end
-
- subroutine x (c1, r1, c2, r2, c3, r3, c4, c5, c6)
- implicit none
-
- character c1(11), c2(11), c3(11)
- real r1, r2, r3
- character c4, c5, c6
-
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
-
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/980701-0.f b/gcc/testsuite/g77.f-torture/execute/980701-0.f
deleted file mode 100644
index a3ddd55473a..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980701-0.f
+++ /dev/null
@@ -1,72 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
-
- real r1(5), r2(5), r3(5)
- real s1(2), s2(2), s3(2)
- double precision d1, d2, d3
- integer i1, i2, i3
- equivalence (r1, s1(2))
- equivalence (d1, r1(2))
- equivalence (r2, s2(2))
- equivalence (d2, r2(2))
- equivalence (r3, s3(2))
- equivalence (d3, r3(2))
-
- s1(1) = 1.
- r1(1) = 1.
- d1 = 10.
- r1(4) = 1.
- r1(5) = 1.
- i1 = 1
- s2(1) = 2.
- r2(1) = 2.
- d2 = 20.
- r2(4) = 2.
- r2(5) = 2.
- i2 = 2
- s3(1) = 3.
- r3(1) = 3.
- d3 = 30.
- r3(4) = 3.
- r3(5) = 3.
- i3 = 3
-
- call x (s1, r1, d1, i1, s2, r2, d2, i2, s3, r3, d3, i3)
-
- end
-
- subroutine x (s1, r1, d1, i1, s2, r2, d2, i2, s3, r3, d3, i3)
- implicit none
-
- real r1(5), r2(5), r3(5)
- real s1(2), s2(2), s3(2)
- double precision d1, d2, d3
- integer i1, i2, i3
-
- if (s1(1) .ne. 1.) call abort
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (s2(1) .ne. 2.) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (s3(1) .ne. 3.) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/980701-1.f b/gcc/testsuite/g77.f-torture/execute/980701-1.f
deleted file mode 100644
index fba78564572..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/980701-1.f
+++ /dev/null
@@ -1,72 +0,0 @@
-* g77 0.5.23 and previous had bugs involving too little space
-* allocated for EQUIVALENCE and COMMON areas needing initial
-* padding to meet alignment requirements of the system.
-
- call subr
- end
-
- subroutine subr
- implicit none
-
- real r1(5), r2(5), r3(5)
- real s1(2), s2(2), s3(2)
- double precision d1, d2, d3
- integer i1, i2, i3
- equivalence (d1, r1(2))
- equivalence (r1, s1(2))
- equivalence (d2, r2(2))
- equivalence (r2, s2(2))
- equivalence (d3, r3(2))
- equivalence (r3, s3(2))
-
- s1(1) = 1.
- r1(1) = 1.
- d1 = 10.
- r1(4) = 1.
- r1(5) = 1.
- i1 = 1
- s2(1) = 2.
- r2(1) = 2.
- d2 = 20.
- r2(4) = 2.
- r2(5) = 2.
- i2 = 2
- s3(1) = 3.
- r3(1) = 3.
- d3 = 30.
- r3(4) = 3.
- r3(5) = 3.
- i3 = 3
-
- call x (s1, r1, d1, i1, s2, r2, d2, i2, s3, r3, d3, i3)
-
- end
-
- subroutine x (s1, r1, d1, i1, s2, r2, d2, i2, s3, r3, d3, i3)
- implicit none
-
- real r1(5), r2(5), r3(5)
- real s1(2), s2(2), s3(2)
- double precision d1, d2, d3
- integer i1, i2, i3
-
- if (s1(1) .ne. 1.) call abort
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (s2(1) .ne. 2.) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (s3(1) .ne. 3.) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/alpha2.f b/gcc/testsuite/g77.f-torture/execute/alpha2.f
deleted file mode 100644
index d7b9d39da4b..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/alpha2.f
+++ /dev/null
@@ -1,19 +0,0 @@
-c This was originally a compile test.
- IMPLICIT REAL*8 (A-H,O-Z)
- COMMON /C/ A(9), INT
- DATA A /
- 1 0.49999973986348730D01, 0.40000399113084100D01,
- 2 0.29996921166596490D01, 0.20016917082678680D01,
- 3 0.99126390351864390D00, 0.97963256554443300D-01,
- 4 -0.87360964813570100D-02, 0.16917082678692080D-02,
- 5 7./
-C Data values were once mis-compiled on (OSF/1 ?) Alpha with -O2
-c such that, for instance, `7.' appeared as `4.' in the assembler
-c output.
- call test(a(9), 7)
- END
- subroutine test(r, i)
- double precision r
- if (nint(r)/=i) call abort
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/alpha2.x b/gcc/testsuite/g77.f-torture/execute/alpha2.x
deleted file mode 100644
index 8f6fe7faf80..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/alpha2.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test fails compilation in cross-endian environments, for example as
-# below, with a "sorry" message.
-
-if { [ishost "i\[34567\]86-*-*"] } {
- if { [istarget "mmix-knuth-mmixware"]
- || [istarget "powerpc-*-*"] } {
- set torture_compile_xfail [istarget]
- }
-}
-
-return 0
diff --git a/gcc/testsuite/g77.f-torture/execute/auto0.f b/gcc/testsuite/g77.f-torture/execute/auto0.f
deleted file mode 100644
index 4b6b2f51a8e..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/auto0.f
+++ /dev/null
@@ -1,80 +0,0 @@
-* Test automatic arrays.
- program auto0
- implicit none
- integer i
- integer j0(40)
- integer j1(40)
- integer jc0(40)
- integer jc1(40)
- common /jc0/ jc0
- common /jc1/ jc1
-
- data j0/40*3/
- data j1/40*4/
-
- i = 40
- call a1 (j0, j1, i)
-
- do i = 1, 40
- if (j0(i) .ne. 4) call abort
- if (j1(i) .ne. 3) call abort
- if (jc0(i) .ne. 6) call abort
- if (jc1(i) .ne. 5) call abort
- end do
-
- end
-
- block data jc
- implicit none
- integer jc0(40)
- integer jc1(40)
- common /jc0/ jc0
- common /jc1/ jc1
-
- data jc0/40*5/
- data jc1/40*6/
-
- end
-
- subroutine a1 (j0, j1, n)
- implicit none
- integer j0(40), j1(40), n
- integer k0(n), k1(n)
- integer i
- integer jc0(40)
- integer jc1(40)
- common /jc0/ jc0
- common /jc1/ jc1
-
- do i = 1, 40
- j0(i) = j1(i) - j0(i)
- jc0(i) = jc1(i) - jc0(i)
- end do
-
- n = -1
-
- do i = 1, 40
- k0(i) = n
- k1(i) = n
- end do
-
- do i = 1, 40
- j1(i) = j1(i) + k0(i) * j0(i)
- jc1(i) = jc1(i) + k1(i) * jc0(i)
- end do
-
- n = 500
-
- do i = 1, 40
- if (k0(i) .ne. -1) call abort
- k0(i) = n
- if (k1(i) .ne. -1) call abort
- k1(i) = n
- end do
-
- do i = 1, 40
- j0(i) = j1(i) + j0(i)
- jc0(i) = jc1(i) + jc0(i)
- end do
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/auto0.x b/gcc/testsuite/g77.f-torture/execute/auto0.x
deleted file mode 100644
index 8f6fe7faf80..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/auto0.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test fails compilation in cross-endian environments, for example as
-# below, with a "sorry" message.
-
-if { [ishost "i\[34567\]86-*-*"] } {
- if { [istarget "mmix-knuth-mmixware"]
- || [istarget "powerpc-*-*"] } {
- set torture_compile_xfail [istarget]
- }
-}
-
-return 0
diff --git a/gcc/testsuite/g77.f-torture/execute/auto1.f b/gcc/testsuite/g77.f-torture/execute/auto1.f
deleted file mode 100644
index ab9044ceca5..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/auto1.f
+++ /dev/null
@@ -1,88 +0,0 @@
-* Test automatic arrays.
- program auto1
- implicit none
- integer i
- integer j0(40)
- integer j1(40)
- integer jc0(40)
- integer jc1(40)
- common /jc0/ jc0
- common /jc1/ jc1
-
- data j0/40*3/
- data j1/40*4/
-
- i = 40
- call a1 (j0, j1, i)
-
- do i = 1, 40
- if (j0(i) .ne. 4) call abort
- if (j1(i) .ne. 3) call abort
- if (jc0(i) .ne. 6) call abort
- if (jc1(i) .ne. 5) call abort
- end do
-
- end
-
- block data jc
- implicit none
- integer jc0(40)
- integer jc1(40)
- common /jc0/ jc0
- common /jc1/ jc1
-
- data jc0/40*5/
- data jc1/40*6/
-
- end
-
- subroutine a1 (j0, j1, n)
- implicit none
- integer j0(40), j1(40), n
- integer k0(n,3,2), k1(n,3,2)
- integer i,j,k
- integer jc0(40)
- integer jc1(40)
- common /jc0/ jc0
- common /jc1/ jc1
-
- do i = 1, 40
- j0(i) = j1(i) - j0(i)
- jc0(i) = jc1(i) - jc0(i)
- end do
-
- n = -1
-
- do k = 1, 2
- do j = 1, 3
- do i = 1, 40
- k0(i, j, k) = n
- k1(i, j, k) = n
- end do
- end do
- end do
-
- do i = 1, 40
- j1(i) = j1(i) + k0(i, 3, 2) * j0(i)
- jc1(i) = jc1(i) + k1(i, 1, 1) * jc0(i)
- end do
-
- n = 500
-
- do k = 1, 2
- do j = 1, 3
- do i = 1, 40
- if (k0(i, j, k) .ne. -1) call abort
- k0(i, j, k) = n
- if (k1(i, j, k) .ne. -1) call abort
- k1(i, j, k) = n
- end do
- end do
- end do
-
- do i = 1, 40
- j0(i) = j1(i) + j0(i)
- jc0(i) = jc1(i) + jc0(i)
- end do
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/auto1.x b/gcc/testsuite/g77.f-torture/execute/auto1.x
deleted file mode 100644
index 8f6fe7faf80..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/auto1.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test fails compilation in cross-endian environments, for example as
-# below, with a "sorry" message.
-
-if { [ishost "i\[34567\]86-*-*"] } {
- if { [istarget "mmix-knuth-mmixware"]
- || [istarget "powerpc-*-*"] } {
- set torture_compile_xfail [istarget]
- }
-}
-
-return 0
diff --git a/gcc/testsuite/g77.f-torture/execute/cabs.f b/gcc/testsuite/g77.f-torture/execute/cabs.f
deleted file mode 100644
index 61fd263620b..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/cabs.f
+++ /dev/null
@@ -1,14 +0,0 @@
- program cabs_1
- complex z0
- real r0
- complex*16 z1
- real*8 r1
-
- z0 = cmplx(3.,4.)
- r0 = cabs(z0)
- if (r0 .ne. 5.) call abort
-
- z1 = dcmplx(3.d0,4.d0)
- r1 = zabs(z1)
- if (r1 .ne. 5.d0) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/claus.f b/gcc/testsuite/g77.f-torture/execute/claus.f
deleted file mode 100644
index bccef7f4090..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/claus.f
+++ /dev/null
@@ -1,13 +0,0 @@
- PROGRAM TEST
- REAL AB(3)
- do i=1,3
- AB(i)=i
- enddo
- k=1
- n=2
- ind=k-n+2
- if (ind /= 1) call abort
- if (ab(ind) /= 1) call abort
- if (k-n+2 /= 1) call abort
- if (ab(k-n+2) /= 1) call abort
- END
diff --git a/gcc/testsuite/g77.f-torture/execute/complex_1.f b/gcc/testsuite/g77.f-torture/execute/complex_1.f
deleted file mode 100644
index 77da6359f72..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/complex_1.f
+++ /dev/null
@@ -1,18 +0,0 @@
- program complex_1
- complex z0, z1, z2
-
- z0 = cmplx(0.,.5)
- z1 = 1./z0
- if (z1 .ne. cmplx(0.,-2)) call abort
-
- z0 = 10.*z0
- if (z0 .ne. cmplx(0.,5.)) call abort
-
- z2 = cmplx(1.,2.)
- z1 = z0/z2
- if (z1 .ne. cmplx(2.,1.)) call abort
-
- z1 = z0*z2
- if (z1 .ne. cmplx(-10.,5.)) call abort
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/cpp.F b/gcc/testsuite/g77.f-torture/execute/cpp.F
deleted file mode 100644
index fc9386b5c92..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/cpp.F
+++ /dev/null
@@ -1,5 +0,0 @@
-! Some versions of cpp will delete "//'World' as a C++ comment.
- character*40 title
- title = 'Hello '//'World'
- if (title .ne. 'Hello World') call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/cpp2.F b/gcc/testsuite/g77.f-torture/execute/cpp2.F
deleted file mode 100644
index 88f5644d8b5..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/cpp2.F
+++ /dev/null
@@ -1,7 +0,0 @@
-C The preprocessor must not mangle Hollerith constants
-C which contain apostrophes.
- integer i, j
- data i /4hbla'/
- data j /"bla'"/
- if (i .ne. j) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/dcomplex.f b/gcc/testsuite/g77.f-torture/execute/dcomplex.f
deleted file mode 100644
index a46f03aabef..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/dcomplex.f
+++ /dev/null
@@ -1,18 +0,0 @@
- program foo
- complex*16 z0, z1, z2
-
- z0 = dcmplx(0.,.5)
- z1 = 1./z0
- if (z1 .ne. dcmplx(0.,-2)) call abort
-
- z0 = 10.*z0
- if (z0 .ne. dcmplx(0.,5.)) call abort
-
- z2 = cmplx(1.,2.)
- z1 = z0/z2
- if (z1 .ne. dcmplx(2.,1.)) call abort
-
- z1 = z0*z2
- if (z1 .ne. dcmplx(-10.,5.)) call abort
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/dnrm2.f b/gcc/testsuite/g77.f-torture/execute/dnrm2.f
deleted file mode 100644
index c69608786b9..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/dnrm2.f
+++ /dev/null
@@ -1,74 +0,0 @@
-CCC g77 0.5.21 `Actual Bugs':
-CCC * A code-generation bug afflicts Intel x86 targets when `-O2' is
-CCC specified compiling, for example, an old version of the `DNRM2'
-CCC routine. The x87 coprocessor stack is being somewhat mismanaged
-CCC in cases where assigned `GOTO' and `ASSIGN' are involved.
-CCC
-CCC Version 0.5.21 of `g77' contains an initial effort to fix the
-CCC problem, but this effort is incomplete, and a more complete fix is
-CCC planned for the next release.
-
-C Currently this test fails with (at least) `-O2 -funroll-loops' on
-C i586-unknown-linux-gnulibc1.
-
-C (This is actually an obsolete version of dnrm2 -- consult the
-c current Netlib BLAS.)
-
- integer i
- double precision a(1:100), dnrm2
- do i=1,100
- a(i)=0.D0
- enddo
- if (dnrm2(100,a,1) .ne. 0.0) call abort
- end
-
- double precision function dnrm2 ( n, dx, incx)
- integer i, incx, ix, j, n, next
- double precision dx(1), cutlo, cuthi, hitest, sum, xmax,zero,one
- data zero, one /0.0d0, 1.0d0/
- data cutlo, cuthi / 8.232d-11, 1.304d19 /
- j = 0
- if(n .gt. 0 .and. incx.gt.0) go to 10
- dnrm2 = zero
- go to 300
- 10 assign 30 to next
- sum = zero
- i = 1
- ix = 1
- 20 go to next,(30, 50, 70, 110)
- 30 if( dabs(dx(i)) .gt. cutlo) go to 85
- assign 50 to next
- xmax = zero
- 50 if( dx(i) .eq. zero) go to 200
- if( dabs(dx(i)) .gt. cutlo) go to 85
- assign 70 to next
- go to 105
- 100 continue
- ix = j
- assign 110 to next
- sum = (sum / dx(i)) / dx(i)
- 105 xmax = dabs(dx(i))
- go to 115
- 70 if( dabs(dx(i)) .gt. cutlo ) go to 75
- 110 if( dabs(dx(i)) .le. xmax ) go to 115
- sum = one + sum * (xmax / dx(i))**2
- xmax = dabs(dx(i))
- go to 200
- 115 sum = sum + (dx(i)/xmax)**2
- go to 200
- 75 sum = (sum * xmax) * xmax
- 85 hitest = cuthi/float( n )
- do 95 j = ix,n
- if(dabs(dx(i)) .ge. hitest) go to 100
- sum = sum + dx(i)**2
- i = i + incx
- 95 continue
- dnrm2 = dsqrt( sum )
- go to 300
- 200 continue
- ix = ix + 1
- i = i + incx
- if( ix .le. n ) go to 20
- dnrm2 = xmax * dsqrt(sum)
- 300 continue
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/erfc.f b/gcc/testsuite/g77.f-torture/execute/erfc.f
deleted file mode 100644
index e5e0412f587..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/erfc.f
+++ /dev/null
@@ -1,38 +0,0 @@
-c============================================== test.f
- real x, y
- real*8 x1, y1
- x=0.
- y = erfc(x)
- if (y .ne. 1.) call abort
-
- x=1.1
- y = erfc(x)
- if (abs(y - .1197949) .ge. 1.e-6) call abort
-
-* modified from x=10, y .gt. 1.5e-44 to avoid lack of -mieee on Alphas.
- x=8
- y = erfc(x)
- if (y .gt. 1.2e-28) call abort
-
- x1=0.
- y1 = erfc(x1)
- if (y1 .ne. 1.) call abort
-
- x1=1.1d0
- y1 = erfc(x1)
- if (abs(y1 - .1197949d0) .ge. 1.d-6) call abort
-
- x1=10
- y1 = erfc(x1)
- if (y1 .gt. 1.5d-44) call abort
- end
-c=================================================
-!output:
-! 0. 1.875
-! 1.10000002 1.48958981
-! 10. 5.00220949E-06
-!
-!The values should be:
-!erfc(0)=1
-!erfc(1.1)= 0.1197949
-!erfc(10)<1.543115467311259E-044
diff --git a/gcc/testsuite/g77.f-torture/execute/execute.exp b/gcc/testsuite/g77.f-torture/execute/execute.exp
deleted file mode 100644
index 00126ff21a3..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/execute.exp
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This file was written by Rob Savoye. (rob@cygnus.com)
-# Modified and maintained by Jeffrey Wheat (cassidy@cygnus.com)
-
-#
-# These tests come from Torbjorn Granlund (tege@cygnus.com)
-# Fortran torture test suite.
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-# load support procs
-load_lib f-torture.exp
-
-#
-# main test loop
-#
-
-foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.f]] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $src] then {
- continue
- }
-
- f-torture-execute $src
-}
-
-foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.F]] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $src] then {
- continue
- }
-
- f-torture-execute $src
-}
diff --git a/gcc/testsuite/g77.f-torture/execute/exp.f b/gcc/testsuite/g77.f-torture/execute/exp.f
deleted file mode 100644
index de388f181b0..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/exp.f
+++ /dev/null
@@ -1,3 +0,0 @@
- a = 2**-2*1.
- if (a .ne. .25) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-bit.f b/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-bit.f
deleted file mode 100644
index a5f876e14ba..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-bit.f
+++ /dev/null
@@ -1,458 +0,0 @@
-c f90-intrinsic-bit.f
-c
-c Test Fortran 90
-c * intrinsic bit manipulation functions - Section 13.10.10
-c * bitcopy subroutine - Section 13.9.3
-c David Billinghurst <David.Billinghurst@riotinto.com>
-c
-c Notes:
-c * g77 only supports scalar arguments
-c * third argument of ISHFTC is not optional in g77
-
- logical fail
- integer i, i2, ia, i3
- integer*2 j, j2, j3, ja
- integer*1 k, k2, k3, ka
- integer*8 m, m2, m3, ma
-
- common /flags/ fail
- fail = .false.
-
-c BIT_SIZE - Section 13.13.16
-c Determine BIT_SIZE by counting the bits
- ia = 0
- i = 0
- i = not(i)
- do while ( (i.ne.0) .and. (ia.lt.127) )
- ia = ia + 1
- i = ishft(i,-1)
- end do
- call c_i(BIT_SIZE(i),ia,'BIT_SIZE(integer)')
- ja = 0
- j = 0
- j = not(j)
- do while ( (j.ne.0) .and. (ja.lt.127) )
- ja = ja + 1
- j = ishft(j,-1)
- end do
- call c_i2(BIT_SIZE(j),ja,'BIT_SIZE(integer*2)')
- ka = 0
- k = 0
- k = not(k)
- do while ( (k.ne.0) .and. (ka.lt.127) )
- ka = ka + 1
- k = ishft(k,-1)
- end do
- call c_i1(BIT_SIZE(k),ka,'BIT_SIZE(integer*1)')
- ma = 0
- m = 0
- m = not(m)
- do while ( (m.ne.0) .and. (ma.lt.127) )
- ma = ma + 1
- m = ishft(m,-1)
- end do
- call c_i8(BIT_SIZE(m),ma,'BIT_SIZE(integer*8)')
-
-c BTEST - Section 13.13.17
- j = 7
- j2 = 3
- k = 7
- k2 = 3
- m = 7
- m2 = 3
- call c_l(BTEST(7,3),.true.,'BTEST(integer,integer)')
- call c_l(BTEST(7,j2),.true.,'BTEST(integer,integer*2)')
- call c_l(BTEST(7,k2),.true.,'BTEST(integer,integer*1)')
- call c_l(BTEST(7,m2),.true.,'BTEST(integer,integer*8)')
- call c_l(BTEST(j,3),.true.,'BTEST(integer*2,integer)')
- call c_l(BTEST(j,j2),.true.,'BTEST(integer*2,integer*2)')
- call c_l(BTEST(j,k2),.true.,'BTEST(integer*2,integer*1)')
- call c_l(BTEST(j,m2),.true.,'BTEST(integer*2,integer*8)')
- call c_l(BTEST(k,3),.true.,'BTEST(integer*1,integer)')
- call c_l(BTEST(k,j2),.true.,'BTEST(integer*1,integer*2)')
- call c_l(BTEST(k,k2),.true.,'BTEST(integer*1,integer*1)')
- call c_l(BTEST(k,m2),.true.,'BTEST(integer*1,integer*8)')
- call c_l(BTEST(m,3),.true.,'BTEST(integer*8,integer)')
- call c_l(BTEST(m,j2),.true.,'BTEST(integer*8,integer*2)')
- call c_l(BTEST(m,k2),.true.,'BTEST(integer*8,integer*1)')
- call c_l(BTEST(m,m2),.true.,'BTEST(integer*8,integer*8)')
-
-c IAND - Section 13.13.40
- j = 3
- j2 = 1
- ja = 1
- k = 3
- k2 = 1
- ka = 1
- m = 3
- m2 = 1
- ma = 1
- call c_i(IAND(3,1),1,'IAND(integer,integer)')
- call c_i2(IAND(j,j2),ja,'IAND(integer*2,integer*2)')
- call c_i1(IAND(k,k2),ka,'IAND(integer*1,integer*1)')
- call c_i8(IAND(m,m2),ma,'IAND(integer*8,integer*8)')
-
-
-c IBCLR - Section 13.13.41
- j = 14
- j2 = 1
- ja = 12
- k = 14
- k2 = 1
- ka = 12
- m = 14
- m2 = 1
- ma = 12
- call c_i(IBCLR(14,1),12,'IBCLR(integer,integer)')
- call c_i(IBCLR(14,j2),12,'IBCLR(integer,integer*2)')
- call c_i(IBCLR(14,k2),12,'IBCLR(integer,integer*1)')
- call c_i(IBCLR(14,m2),12,'IBCLR(integer,integer*8)')
- call c_i2(IBCLR(j,1),ja,'IBCLR(integer*2,integer)')
- call c_i2(IBCLR(j,j2),ja,'IBCLR(integer*2,integer*2)')
- call c_i2(IBCLR(j,k2),ja,'IBCLR(integer*2,integer*1)')
- call c_i2(IBCLR(j,m2),ja,'IBCLR(integer*2,integer*8)')
- call c_i1(IBCLR(k,1),ka,'IBCLR(integer*1,integer)')
- call c_i1(IBCLR(k,j2),ka,'IBCLR(integer*1,integer*2)')
- call c_i1(IBCLR(k,k2),ka,'IBCLR(integer*1,integer*1)')
- call c_i1(IBCLR(k,m2),ka,'IBCLR(integer*1,integer*8)')
- call c_i8(IBCLR(m,1),ma,'IBCLR(integer*8,integer)')
- call c_i8(IBCLR(m,j2),ma,'IBCLR(integer*8,integer*2)')
- call c_i8(IBCLR(m,k2),ma,'IBCLR(integer*8,integer*1)')
- call c_i8(IBCLR(m,m2),ma,'IBCLR(integer*8,integer*8)')
-
-c IBSET - Section 13.13.43
- j = 12
- j2 = 1
- ja = 14
- k = 12
- k2 = 1
- ka = 14
- m = 12
- m2 = 1
- ma = 14
- call c_i(IBSET(12,1),14,'IBSET(integer,integer)')
- call c_i(IBSET(12,j2),14,'IBSET(integer,integer*2)')
- call c_i(IBSET(12,k2),14,'IBSET(integer,integer*1)')
- call c_i(IBSET(12,m2),14,'IBSET(integer,integer*8)')
- call c_i2(IBSET(j,1),ja,'IBSET(integer*2,integer)')
- call c_i2(IBSET(j,j2),ja,'IBSET(integer*2,integer*2)')
- call c_i2(IBSET(j,k2),ja,'IBSET(integer*2,integer*1)')
- call c_i2(IBSET(j,m2),ja,'IBSET(integer*2,integer*8)')
- call c_i1(IBSET(k,1),ka,'IBSET(integer*1,integer)')
- call c_i1(IBSET(k,j2),ka,'IBSET(integer*1,integer*2)')
- call c_i1(IBSET(k,k2),ka,'IBSET(integer*1,integer*1)')
- call c_i1(IBSET(k,m2),ka,'IBSET(integer*1,integer*8)')
- call c_i8(IBSET(m,1),ma,'IBSET(integer*8,integer)')
- call c_i8(IBSET(m,j2),ma,'IBSET(integer*8,integer*2)')
- call c_i8(IBSET(m,k2),ma,'IBSET(integer*8,integer*1)')
- call c_i8(IBSET(m,m2),ma,'IBSET(integer*8,integer*8)')
-
-c IEOR - Section 13.13.45
- j = 3
- j2 = 1
- ja = 2
- k = 3
- k2 = 1
- ka = 2
- m = 3
- m2 = 1
- ma = 2
- call c_i(IEOR(3,1),2,'IEOR(integer,integer)')
- call c_i2(IEOR(j,j2),ja,'IEOR(integer*2,integer*2)')
- call c_i1(IEOR(k,k2),ka,'IEOR(integer*1,integer*1)')
- call c_i8(IEOR(m,m2),ma,'IEOR(integer*8,integer*8)')
-
-c ISHFT - Section 13.13.49
- i = 3
- i2 = 1
- i3 = 0
- ia = 6
- j = 3
- j2 = 1
- j3 = 0
- ja = 6
- k = 3
- k2 = 1
- k3 = 0
- ka = 6
- m = 3
- m2 = 1
- m3 = 0
- ma = 6
- call c_i(ISHFT(i,i2),ia,'ISHFT(integer,integer)')
- call c_i(ISHFT(i,BIT_SIZE(i)),i3,'ISHFT(integer,integer) 2')
- call c_i(ISHFT(i,-BIT_SIZE(i)),i3,'ISHFT(integer,integer) 3')
- call c_i(ISHFT(i,0),i,'ISHFT(integer,integer) 4')
- call c_i2(ISHFT(j,j2),ja,'ISHFT(integer*2,integer*2)')
- call c_i2(ISHFT(j,BIT_SIZE(j)),j3,
- $ 'ISHFT(integer*2,integer*2) 2')
- call c_i2(ISHFT(j,-BIT_SIZE(j)),j3,
- $ 'ISHFT(integer*2,integer*2) 3')
- call c_i2(ISHFT(j,0),j,'ISHFT(integer*2,integer*2) 4')
- call c_i1(ISHFT(k,k2),ka,'ISHFT(integer*1,integer*1)')
- call c_i1(ISHFT(k,BIT_SIZE(k)),k3,
- $ 'ISHFT(integer*1,integer*1) 2')
- call c_i1(ISHFT(k,-BIT_SIZE(k)),k3,
- $ 'ISHFT(integer*1,integer*1) 3')
- call c_i1(ISHFT(k,0),k,'ISHFT(integer*1,integer*1) 4')
- call c_i8(ISHFT(m,m2),ma,'ISHFT(integer*8,integer*8)')
- call c_i8(ISHFT(m,BIT_SIZE(m)),m3,
- $ 'ISHFT(integer*8,integer*8) 2')
- call c_i8(ISHFT(m,-BIT_SIZE(m)),m3,
- $ 'ISHFT(integer*8,integer*8) 3')
- call c_i8(ISHFT(m,0),m,'ISHFT(integer*8,integer*8) 4')
-
-c ISHFTC - Section 13.13.50
-c The third argument is not optional in g77
- i = 3
- i2 = 2
- i3 = 3
- ia = 5
- j = 3
- j2 = 2
- j3 = 3
- ja = 5
- k = 3
- k2 = 2
- k3 = 3
- ka = 5
- m2 = 2
- m3 = 3
- ma = 5
-c test all the combinations of arguments
- call c_i(ISHFTC(i,i2,i3),5,'ISHFTC(integer,integer,integer)')
- call c_i(ISHFTC(i,i2,j3),5,'ISHFTC(integer,integer,integer*2)')
- call c_i(ISHFTC(i,i2,k3),5,'ISHFTC(integer,integer,integer*1)')
- call c_i(ISHFTC(i,i2,m3),5,'ISHFTC(integer,integer,integer*8)')
- call c_i(ISHFTC(i,j2,i3),5,'ISHFTC(integer,integer*2,integer)')
- call c_i(ISHFTC(i,j2,j3),5,'ISHFTC(integer,integer*2,integer*2)')
- call c_i(ISHFTC(i,j2,k3),5,'ISHFTC(integer,integer*2,integer*1)')
- call c_i(ISHFTC(i,j2,m3),5,'ISHFTC(integer,integer*2,integer*8)')
- call c_i(ISHFTC(i,k2,i3),5,'ISHFTC(integer,integer*1,integer)')
- call c_i(ISHFTC(i,k2,j3),5,'ISHFTC(integer,integer*1,integer*2)')
- call c_i(ISHFTC(i,k2,k3),5,'ISHFTC(integer,integer*1,integer*1)')
- call c_i(ISHFTC(i,k2,m3),5,'ISHFTC(integer,integer*1,integer*8)')
- call c_i(ISHFTC(i,m2,i3),5,'ISHFTC(integer,integer*8,integer)')
- call c_i(ISHFTC(i,m2,j3),5,'ISHFTC(integer,integer*8,integer*2)')
- call c_i(ISHFTC(i,m2,k3),5,'ISHFTC(integer,integer*8,integer*1)')
- call c_i(ISHFTC(i,m2,m3),5,'ISHFTC(integer,integer*8,integer*8)')
-
- call c_i2(ISHFTC(j,i2,i3),ja,'ISHFTC(integer*2,integer,integer)')
- call c_i2(ISHFTC(j,i2,j3),ja,
- $ 'ISHFTC(integer*2,integer,integer*2)')
- call c_i2(ISHFTC(j,i2,k3),ja,
- $ 'ISHFTC(integer*2,integer,integer*1)')
- call c_i2(ISHFTC(j,i2,m3),ja,
- $ 'ISHFTC(integer*2,integer,integer*8)')
- call c_i2(ISHFTC(j,j2,i3),ja,
- $ 'ISHFTC(integer*2,integer*2,integer)')
- call c_i2(ISHFTC(j,j2,j3),ja,
- $ 'ISHFTC(integer*2,integer*2,integer*2)')
- call c_i2(ISHFTC(j,j2,k3),ja,
- $ 'ISHFTC(integer*2,integer*2,integer*1)')
- call c_i2(ISHFTC(j,j2,m3),ja,
- $ 'ISHFTC(integer*2,integer*2,integer*8)')
- call c_i2(ISHFTC(j,k2,i3),ja,
- $ 'ISHFTC(integer*2,integer*1,integer)')
- call c_i2(ISHFTC(j,k2,j3),ja,
- $ 'ISHFTC(integer*2,integer*1,integer*2)')
- call c_i2(ISHFTC(j,k2,k3),ja,
- $ 'ISHFTC(integer*2,integer*1,integer*1)')
- call c_i2(ISHFTC(j,k2,m3),ja,
- $ 'ISHFTC(integer*2,integer*1,integer*8)')
- call c_i2(ISHFTC(j,m2,i3),ja,
- $ 'ISHFTC(integer*2,integer*8,integer)')
- call c_i2(ISHFTC(j,m2,j3),ja,
- $ 'ISHFTC(integer*2,integer*8,integer*2)')
- call c_i2(ISHFTC(j,m2,k3),ja,
- $ 'ISHFTC(integer*2,integer*8,integer*1)')
- call c_i2(ISHFTC(j,m2,m3),ja,
- $ 'ISHFTC(integer*2,integer*8,integer*8)')
-
- call c_i1(ISHFTC(k,i2,i3),ka,'ISHFTC(integer*1,integer,integer)')
- call c_i1(ISHFTC(k,i2,j3),ka,
- $ 'ISHFTC(integer*1,integer,integer*2)')
- call c_i1(ISHFTC(k,i2,k3),ka,
- $ 'ISHFTC(integer*1,integer,integer*1)')
- call c_i1(ISHFTC(k,i2,m3),ka,
- $ 'ISHFTC(integer*1,integer,integer*8)')
- call c_i1(ISHFTC(k,j2,i3),ka,
- $ 'ISHFTC(integer*1,integer*2,integer)')
- call c_i1(ISHFTC(k,j2,j3),ka,
- $ 'ISHFTC(integer*1,integer*2,integer*2)')
- call c_i1(ISHFTC(k,j2,k3),ka,
- $ 'ISHFTC(integer*1,integer*2,integer*1)')
- call c_i1(ISHFTC(k,j2,m3),ka,
- $ 'ISHFTC(integer*1,integer*2,integer*8)')
- call c_i1(ISHFTC(k,k2,i3),ka,
- $ 'ISHFTC(integer*1,integer*1,integer)')
- call c_i1(ISHFTC(k,k2,j3),ka,
- $ 'ISHFTC(integer*1,integer*1,integer*2)')
- call c_i1(ISHFTC(k,k2,k3),ka,
- $ 'ISHFTC(integer*1,integer*1,integer*1)')
- call c_i1(ISHFTC(k,k2,m3),ka,
- $ 'ISHFTC(integer*1,integer*1,integer*8)')
- call c_i1(ISHFTC(k,m2,i3),ka,
- $ 'ISHFTC(integer*1,integer*8,integer)')
- call c_i1(ISHFTC(k,m2,j3),ka,
- $ 'ISHFTC(integer*1,integer*8,integer*2)')
- call c_i1(ISHFTC(k,m2,k3),ka,
- $ 'ISHFTC(integer*1,integer*8,integer*1)')
- call c_i1(ISHFTC(k,m2,m3),ka,
- $ 'ISHFTC(integer*1,integer*8,integer*8)')
-
- call c_i8(ISHFTC(m,i2,i3),ma,'ISHFTC(integer*8,integer,integer)')
- call c_i8(ISHFTC(m,i2,j3),ma,
- $ 'ISHFTC(integer*8,integer,integer*2)')
- call c_i8(ISHFTC(m,i2,k3),ma,
- $ 'ISHFTC(integer*8,integer,integer*1)')
- call c_i8(ISHFTC(m,i2,m3),ma,
- $ 'ISHFTC(integer*8,integer,integer*8)')
- call c_i8(ISHFTC(m,j2,i3),ma,
- $ 'ISHFTC(integer*8,integer*2,integer)')
- call c_i8(ISHFTC(m,j2,j3),ma,
- $ 'ISHFTC(integer*8,integer*2,integer*2)')
- call c_i8(ISHFTC(m,j2,k3),ma,
- $ 'ISHFTC(integer*8,integer*2,integer*1)')
- call c_i8(ISHFTC(m,j2,m3),ma,
- $ 'ISHFTC(integer*8,integer*2,integer*8)')
- call c_i8(ISHFTC(m,k2,i3),ma,
- $ 'ISHFTC(integer*8,integer*1,integer)')
- call c_i8(ISHFTC(m,k2,j3),ma,
- $ 'ISHFTC(integer*1,integer*8,integer*2)')
- call c_i8(ISHFTC(m,k2,k3),ma,
- $ 'ISHFTC(integer*1,integer*8,integer*1)')
- call c_i8(ISHFTC(m,k2,m3),ma,
- $ 'ISHFTC(integer*1,integer*8,integer*8)')
- call c_i8(ISHFTC(m,m2,i3),ma,
- $ 'ISHFTC(integer*8,integer*8,integer)')
- call c_i8(ISHFTC(m,m2,j3),ma,
- $ 'ISHFTC(integer*8,integer*8,integer*2)')
- call c_i8(ISHFTC(m,m2,k3),ma,
- $ 'ISHFTC(integer*8,integer*8,integer*1)')
- call c_i8(ISHFTC(m,m2,m3),ma,
- $ 'ISHFTC(integer*8,integer*8,integer*8)')
-
-c test the corner cases
- call c_i(ISHFTC(i,BIT_SIZE(i),BIT_SIZE(i)),i,
- $ 'ISHFTC(i,BIT_SIZE(i),BIT_SIZE(i)) i = integer')
- call c_i(ISHFTC(i,0,BIT_SIZE(i)),i,
- $ 'ISHFTC(i,0,BIT_SIZE(i)) i = integer')
- call c_i(ISHFTC(i,-BIT_SIZE(i),BIT_SIZE(i)),i,
- $ 'ISHFTC(i,-BIT_SIZE(i),BIT_SIZE(i)) i = integer')
- call c_i2(ISHFTC(j,BIT_SIZE(j),BIT_SIZE(j)),j,
- $ 'ISHFTC(j,BIT_SIZE(j),BIT_SIZE(j)) j = integer*2')
- call c_i2(ISHFTC(j,0,BIT_SIZE(j)),j,
- $ 'ISHFTC(j,0,BIT_SIZE(j)) j = integer*2')
- call c_i2(ISHFTC(j,-BIT_SIZE(j),BIT_SIZE(j)),j,
- $ 'ISHFTC(j,-BIT_SIZE(j),BIT_SIZE(j)) j = integer*2')
- call c_i1(ISHFTC(k,BIT_SIZE(k),BIT_SIZE(k)),k,
- $ 'ISHFTC(k,BIT_SIZE(k),BIT_SIZE(k)) k = integer*1')
- call c_i1(ISHFTC(k,0,BIT_SIZE(k)),k,
- $ 'ISHFTC(k,0,BIT_SIZE(k)) k = integer*1')
- call c_i1(ISHFTC(k,-BIT_SIZE(k),BIT_SIZE(k)),k,
- $ 'ISHFTC(k,-BIT_SIZE(k),BIT_SIZE(k)) k = integer*1')
- call c_i8(ISHFTC(m,BIT_SIZE(m),BIT_SIZE(m)),m,
- $ 'ISHFTC(m,BIT_SIZE(m),BIT_SIZE(m)) m = integer*8')
- call c_i8(ISHFTC(m,0,BIT_SIZE(m)),m,
- $ 'ISHFTC(m,0,BIT_SIZE(m)) m = integer*8')
- call c_i8(ISHFTC(m,-BIT_SIZE(m),BIT_SIZE(m)),m,
- $ 'ISHFTC(m,-BIT_SIZE(m),BIT_SIZE(m)) m = integer*8')
-
-c MVBITS - Section 13.13.74
- i = 6
- call MVBITS(7,2,2,i,0)
- call c_i(i,5,'MVBITS 1')
- j = 6
- j2 = 7
- ja = 5
- call MVBITS(j2,2,2,j,0)
- call c_i2(j,ja,'MVBITS 2')
- k = 6
- k2 = 7
- ka = 5
- call MVBITS(k2,2,2,k,0)
- call c_i1(k,ka,'MVBITS 3')
- m = 6
- m2 = 7
- ma = 5
- call MVBITS(m2,2,2,m,0)
- call c_i8(m,ma,'MVBITS 4')
-
-c NOT - Section 13.13.77
-c Rather than assume integer sizes, mask off high bits
- j = 21
- j2 = 31
- ja = 10
- k = 21
- k2 = 31
- ka = 10
- m = 21
- m2 = 31
- ma = 10
- call c_i(IAND(NOT(21),31),10,'NOT(integer)')
- call c_i2(IAND(NOT(j),j2),ja,'NOT(integer*2)')
- call c_i1(IAND(NOT(k),k2),ka,'NOT(integer*1)')
- call c_i8(IAND(NOT(m),m2),ma,'NOT(integer*8)')
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_l(i,j,label)
-c Check if LOGICAL i equals j, and fail otherwise
- logical i,j
- character*(*) label
- if ( i .eqv. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_i(i,j,label)
-c Check if INTEGER i equals j, and fail otherwise
- integer i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_i2(i,j,label)
-c Check if INTEGER*2 i equals j, and fail otherwise
- integer*2 i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_i1(i,j,label)
-c Check if INTEGER*1 i equals j, and fail otherwise
- integer*1 i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_i8(i,j,label)
-c Check if INTEGER*8 i equals j, and fail otherwise
- integer*8 i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-mathematical.f b/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-mathematical.f
deleted file mode 100644
index 400e3fa6796..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-mathematical.f
+++ /dev/null
@@ -1,137 +0,0 @@
-c f90-intrinsic-mathematical.f
-c
-c Test Fortran 90 intrinsic mathematical functions - Section 13.10.3 and
-c 13.13
-c David Billinghurst <David.Billinghurst@riotinto.com>
-c
-c Notes:
-c * g77 does not fully comply with F90. Noncompliances noted in comments.
-c * Section 13.12: Specific names for intrinsic functions tested in
-c intrinsic77.f
-
- logical fail
- common /flags/ fail
- fail = .false.
-
-c ACOS - Section 13.13.3
- call c_r(ACOS(0.54030231),1.0,'ACOS(real)')
- call c_d(ACOS(0.54030231d0),1.d0,'ACOS(double)')
-
-c ASIN - Section 13.13.12
- call c_r(ASIN(0.84147098),1.0,'ASIN(real)')
- call c_d(ASIN(0.84147098d0),1.d0,'ASIN(double)')
-
-c ATAN - Section 13.13.14
- call c_r(ATAN(1.5574077),1.0,'ATAN(real)')
- call c_d(ATAN(1.5574077d0),1.d0,'ATAN(double)')
-
-c ATAN2 - Section 13.13.15
- call c_r(ATAN2(1.5574077,1.),1.0,'ATAN2(real)')
- call c_d(ATAN2(1.5574077d0,1.d0),1.d0,'ATAN2(double)')
-
-c COS - Section 13.13.22
- call c_r(COS(1.0),0.54030231,'COS(real)')
- call c_d(COS(1.d0),0.54030231d0,'COS(double)')
- call c_c(COS((1.,0.)),(0.54030231,0.),'COS(complex)')
- call c_z(COS((1.d0,0.d0)),(0.54030231d0,0.d0),
- $ 'COS(double complex)')
-
-c COSH - Section 13.13.23
- call c_r(COSH(1.0),1.5430806,'COSH(real)')
- call c_d(COSH(1.d0),1.5430806d0,'COSH(double)')
-
-c EXP - Section 13.13.34
- call c_r(EXP(1.0),2.7182818,'EXP(real)')
- call c_d(EXP(1.d0),2.7182818d0,'EXP(double)')
- call c_c(EXP((1.,0.)),(2.7182818,0.),'EXP(complex)')
- call c_z(EXP((1.d0,0.d0)),(2.7182818d0,0.d0),
- $ 'EXP(double complex)')
-
-c LOG - Section 13.13.59
- call c_r(LOG(10.0),2.3025851,'LOG(real)')
- call c_d(LOG(10.d0),2.3025851d0,'LOG(double)')
- call c_c(LOG((10.,0.)),(2.3025851,0.),'LOG(complex)')
- call c_z(LOG((10.d0,0.)),(2.3025851d0,0.d0),
- $ 'LOG(double complex)')
-
-c LOG10 - Section 13.13.60
- call c_r(LOG10(10.0),1.0,'LOG10(real)')
- call c_d(LOG10(10.d0),1.d0,'LOG10(double)')
-
-c SIN - Section 13.13.97
- call c_r(SIN(1.0),0.84147098,'SIN(real)')
- call c_d(SIN(1.d0),0.84147098d0,'SIN(double)')
- call c_c(SIN((1.,0.)),(0.84147098,0.),'SIN(complex)')
- call c_z(SIN((1.d0,0.d0)),(0.84147098d0,0.d0),
- $ 'SIN(double complex)')
-
-c SINH - Section 13.13.98
- call c_r(SINH(1.0),1.175201,'SINH(real)')
- call c_d(SINH(1.d0),1.175201d0,'SINH(double)')
-
-c SQRT - Section 13.13.102
- call c_r(SQRT(4.0),2.0,'SQRT(real)')
- call c_d(SQRT(4.d0),2.d0,'SQRT(double)')
- call c_c(SQRT((4.,0.)),(2.,0.),'SQRT(complex)')
- call c_z(SQRT((4.d0,0.)),(2.d0,0.),
- $ 'SQRT(double complex)')
-
-c TAN - Section 13.13.105
- call c_r(TAN(1.0),1.5574077,'TAN(real)')
- call c_d(TAN(1.d0),1.5574077d0,'TAN(double)')
-
-c TANH - Section 13.13.106
- call c_r(TANH(1.0),0.76159416,'TANH(real)')
- call c_d(TANH(1.d0),0.76159416d0,'TANH(double)')
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_r(a,b,label)
-c Check if REAL a equals b, and fail otherwise
- real a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_d(a,b,label)
-c Check if DOUBLE PRECISION a equals b, and fail otherwise
- double precision a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_c(a,b,label)
-c Check if COMPLEX a equals b, and fail otherwise
- complex a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_z(a,b,label)
-c Check if COMPLEX a equals b, and fail otherwise
- double complex a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-numeric.f b/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-numeric.f
deleted file mode 100644
index 4428ca042d7..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/f90-intrinsic-numeric.f
+++ /dev/null
@@ -1,282 +0,0 @@
-c f90-intrinsic-numeric.f
-c
-c Test Fortran 90 intrinsic numeric functions - Section 13.10.2 and 13.13
-c David Billinghurst <David.Billinghurst@riotinto.com>
-c
-c Notes:
-c * g77 does not fully comply with F90. Noncompliances noted in comments.
-c * Section 13.12: Specific names for intrinsic functions tested in
-c intrinsic77.f
-
- logical fail
- integer*2 j, j2, ja
- integer*1 k, k2, ka
-
- common /flags/ fail
- fail = .false.
-
-c ABS - Section 13.13.1
- j = -9
- ja = 9
- k = j
- ka = ja
- call c_i(ABS(-7),7,'ABS(integer)')
- call c_i2(ABS(j),ja,'ABS(integer*2)')
- call c_i1(ABS(k),ka,'ABS(integer*1)')
- call c_r(ABS(-7.),7.,'ABS(real)')
- call c_d(ABS(-7.d0),7.d0,'ABS(double)')
- call c_r(ABS((3.,-4.)),5.0,'ABS(complex)')
- call c_d(ABS((3.d0,-4.d0)),5.0d0,'ABS(double complex)')
-
-c AIMAG - Section 13.13.6
- call c_r(AIMAG((2.,-7.)),-7.,'AIMAG(complex)')
-c g77: AIMAG(double complex) does not comply with F90
-c call c_d(AIMAG((2.d0,-7.d0)),-7.d0,'AIMAG(double complex)')
-
-c AINT - Section 13.13.7
- call c_r(AINT(2.783),2.0,'AINT(real) 1')
- call c_r(AINT(-2.783),-2.0,'AINT(real) 2')
- call c_d(AINT(2.783d0),2.0d0,'AINT(double precision) 1')
- call c_d(AINT(-2.783d0),-2.0d0,'AINT(double precision) 2')
-c Note: g77 does not support optional argument KIND
-
-c ANINT - Section 13.13.10
- call c_r(ANINT(2.783),3.0,'ANINT(real) 1')
- call c_r(ANINT(-2.783),-3.0,'ANINT(real) 2')
- call c_d(ANINT(2.783d0),3.0d0,'ANINT(double precision) 1')
- call c_d(ANINT(-2.783d0),-3.0d0,'ANINT(double precision) 2')
-c Note: g77 does not support optional argument KIND
-
-c CEILING - Section 13.13.18
-c Not implemented
-
-c CMPLX - Section 13.13.20
- j = 1
- ja = 2
- k = 1
- ka = 2
- call c_c(CMPLX(1),(1.,0.),'CMPLX(integer)')
- call c_c(CMPLX(1,2),(1.,2.),'CMPLX(integer, integer)')
- call c_c(CMPLX(j),(1.,0.),'CMPLX(integer*2)')
- call c_c(CMPLX(j,ja),(1.,2.),'CMPLX(integer*2, integer*2)')
- call c_c(CMPLX(k),(1.,0.),'CMPLX(integer*1)')
- call c_c(CMPLX(k,ka),(1.,2.),'CMPLX(integer*1, integer*1)')
- call c_c(CMPLX(1.),(1.,0.),'CMPLX(real)')
- call c_c(CMPLX(1.d0),(1.,0.),'CMPLX(double)')
- call c_c(CMPLX(1.d0,2.d0),(1.,2.),'CMPLX(double,double)')
- call c_c(CMPLX(1.,2.),(1.,2.),'CMPLX(complex)')
- call c_c(CMPLX(1.d0,2.d0),(1.,2.),'CMPLX(double complex)')
-c NOTE: g77 does not support optional argument KIND
-
-c CONJG - Section 13.13.21
- call c_c(CONJG((2.,-7.)),(2.,7.),'CONJG(complex)')
- call c_z(CONJG((2.d0,-7.d0)),(2.d0,7.d0),'CONJG(double complex)')
-
-c DBLE - Section 13.13.27
- j = 5
- k = 5
- call c_d(DBLE(5),5.0d0,'DBLE(integer)')
- call c_d(DBLE(j),5.0d0,'DBLE(integer*2)')
- call c_d(DBLE(k),5.0d0,'DBLE(integer*1)')
- call c_d(DBLE(5.),5.0d0,'DBLE(real)')
- call c_d(DBLE(5.0d0),5.0d0,'DBLE(double)')
- call c_d(DBLE((5.0,0.5)),5.0d0,'DBLE(complex)')
- call c_d(DBLE((5.0d0,0.5d0)),5.0d0,'DBLE(double complex)')
-
-c DIM - Section 13.13.29
- j = -8
- j2 = -3
- ja = 0
- k = -8
- k2 = -3
- ka = 0
- call c_i(DIM(-8,-3),0,'DIM(integer)')
- call c_i2(DIM(j,j2),ja,'DIM(integer*2)')
- call c_i1(DIM(k,k2),ka,'DIM(integer*1)')
- call c_r(DIM(-8.,-3.),0.,'DIM(real,real)')
- call c_d(DIM(-8.d0,-3.d0),0.d0,'DIM(double,double)')
-
-c DPROD - Section 13.13.31
- call c_d(DPROD(-8.,-3.),24.d0,'DPROD(real,real)')
-
-c FLOOR - Section 13.13.36
-c Not implemented
-
-c INT - Section 13.13.47
- j = 5
- k = 5
- call c_i(INT(5),5,'INT(integer)')
- call c_i(INT(j),5,'INT(integer*2)')
- call c_i(INT(k),5,'INT(integer*1)')
- call c_i(INT(5.01),5,'INT(real)')
- call c_i(INT(5.01d0),5,'INT(double)')
-c Note: Does not accept optional second argument KIND
-
-c MAX - Section 13.13.63
- j = 1
- j2 = 2
- ja = 2
- k = 1
- k2 = 2
- ka = 2
- call c_i(MAX(1,2,3),3,'MAX(integer,integer,integer)')
- call c_i2(MAX(j,j2),ja,'MAX(integer*2,integer*2)')
- call c_i1(MAX(k,k2),ka,'MAX(integer*1,integer*1)')
- call c_r(MAX(1.,2.,3.),3.,'MAX(real,real,real)')
- call c_d(MAX(1.d0,2.d0,3.d0),3.d0,'MAX(double,double,double)')
-
-c MIN - Section 13.13.68
- j = 1
- j2 = 2
- ja = 1
- k = 1
- k2 = 2
- ka = 1
- call c_i(MIN(1,2,3),1,'MIN(integer,integer,integer)')
- call c_i2(MIN(j,j2),ja,'MIN(integer*2,integer*2)')
- call c_i1(MIN(k,k2),ka,'MIN(integer*1,integer*1)')
- call c_r(MIN(1.,2.,3.),1.,'MIN(real,real,real)')
- call c_d(MIN(1.d0,2.d0,3.d0),1.d0,'MIN(double,double,double)')
-
-c MOD - Section 13.13.72
- call c_i(MOD(8,5),3,'MOD(integer,integer) 1')
- call c_i(MOD(-8,5),-3,'MOD(integer,integer) 2')
- call c_i(MOD(8,-5),3,'MOD(integer,integer) 3')
- call c_i(MOD(-8,-5),-3,'MOD(integer,integer) 4')
- j = 8
- j2 = 5
- ja = 3
- call c_i2(MOD(j,j2),ja,'MOD(integer*2,integer*2) 1')
- call c_i2(MOD(-j,j2),-ja,'MOD(integer*2,integer*2) 2')
- call c_i2(MOD(j,-j2),ja,'MOD(integer*2,integer*2) 3')
- call c_i2(MOD(-j,-j2),-ja,'MOD(integer*2,integer*2) 4')
- k = 8
- k2 = 5
- ka = 3
- call c_i1(MOD(k,k2),ka,'MOD(integer*1,integer*1) 1')
- call c_i1(MOD(-k,k2),-ka,'MOD(integer*1,integer*1) 2')
- call c_i1(MOD(k,-k2),ka,'MOD(integer*1,integer*1) 3')
- call c_i1(MOD(-k,-k2),-ka,'MOD(integer*1,integer*1) 4')
- call c_r(MOD(8.,5.),3.,'MOD(real,real) 1')
- call c_r(MOD(-8.,5.),-3.,'MOD(real,real) 2')
- call c_r(MOD(8.,-5.),3.,'MOD(real,real) 3')
- call c_r(MOD(-8.,-5.),-3.,'MOD(real,real) 4')
- call c_d(MOD(8.d0,5.d0),3.d0,'MOD(double,double) 1')
- call c_d(MOD(-8.d0,5.d0),-3.d0,'MOD(double,double) 2')
- call c_d(MOD(8.d0,-5.d0),3.d0,'MOD(double,double) 3')
- call c_d(MOD(-8.d0,-5.d0),-3.d0,'MOD(double,double) 4')
-
-c MODULO - Section 13.13.73
-c Not implemented
-
-c NINT - Section 13.13.76
- call c_i(NINT(2.783),3,'NINT(real)')
- call c_i(NINT(2.783d0),3,'NINT(double)')
-c Optional second argument KIND not implemented
-
-c REAL - Section 13.13.86
- j = -2
- k = -2
- call c_r(REAL(-2),-2.0,'REAL(integer)')
- call c_r(REAL(j),-2.0,'REAL(integer*2)')
- call c_r(REAL(k),-2.0,'REAL(integer*1)')
- call c_r(REAL(-2.0),-2.0,'REAL(real)')
- call c_r(REAL(-2.0d0),-2.0,'REAL(double)')
- call c_r(REAL((-2.,9.)),-2.0,'REAL(complex)')
-c REAL(double complex) not implemented
-c call c_r(REAL((-2.d0,9.d0)),-2.0,'REAL(double complex)')
-
-c SIGN - Section 13.13.96
- j = -3
- j2 = 2
- ja = 3
- k = -3
- k2 = 2
- ka = 3
- call c_i(SIGN(-3,2),3,'SIGN(integer)')
- call c_i2(SIGN(j,j2),ja,'SIGN(integer*2)')
- call c_i1(SIGN(k,k2),ka,'SIGN(integer*1)')
- call c_r(SIGN(-3.0,2.),3.,'SIGN(real,real)')
- call c_d(SIGN(-3.d0,2.d0),3.d0,'SIGN(double,double)')
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_i(i,j,label)
-c Check if INTEGER i equals j, and fail otherwise
- integer i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_i2(i,j,label)
-c Check if INTEGER*2 i equals j, and fail otherwise
- integer*2 i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_i1(i,j,label)
-c Check if INTEGER*1 i equals j, and fail otherwise
- integer*1 i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_r(a,b,label)
-c Check if REAL a equals b, and fail otherwise
- real a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_d(a,b,label)
-c Check if DOUBLE PRECISION a equals b, and fail otherwise
- double precision a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_c(a,b,label)
-c Check if COMPLEX a equals b, and fail otherwise
- complex a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_z(a,b,label)
-c Check if COMPLEX a equals b, and fail otherwise
- double complex a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/int8421.f b/gcc/testsuite/g77.f-torture/execute/int8421.f
deleted file mode 100644
index 1fcc3bc4c9f..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/int8421.f
+++ /dev/null
@@ -1,20 +0,0 @@
- integer*1 i1, i11
- integer*2 i2, i22
- integer i, ii
- integer*4 i4, i44
- integer*8 i8, i88
- real r, rr
- real*4 r4, r44
- double precision d, dd
- real*8 r8, r88
- parameter (i1 = 1, i2 = 2, i4 = 4, i = 5, i8 = i + i4*i2 + i2*i1)
- parameter (r = 3.0, r4 = 4.0, r8 = 8.d0, d = i8*r + r4*i2 + r8*i1)
- if (i8 .ne. 15 ) call abort
- if (d .ne. 61.d0) call abort
- i11 = 1; i22 = 2; i44 = 4; ii = 5
- i88 = i + i4*i2 + i2*i1
- if (i88 .ne. i8) call abort
- rr = 3.0; r44 = 4.0; r88 = 8.0d0
- dd = i88*rr + r44*i22 + r88*i11
- if (dd .ne. d) call abort
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/intrinsic-f2c-z.f b/gcc/testsuite/g77.f-torture/execute/intrinsic-f2c-z.f
deleted file mode 100644
index ec7b3324379..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/intrinsic-f2c-z.f
+++ /dev/null
@@ -1,94 +0,0 @@
-c intrinsic-f2c-z.f
-c
-c Test double complex intrinsics Z*.
-c These functions are f2c extensions
-c
-c David Billinghurst <David.Billinghurst@riotinto.com>
-c
- double complex z, a
- double precision x
- logical fail
- intrinsic zabs, zcos, zexp, zlog, zsin, zsqrt
- common /flags/ fail
- fail = .false.
-
-c ZABS - Absolute value
- z = (3.0d0,-4.0d0)
- x = 5.0d0
- call c_d(ZABS(z),x,'ZABS(double complex)')
- call p_d_z(ZABS,z,x,'ZABS')
-
-c ZCOS - Cosine
- z = (3.0d0,1.0d0)
- a = (-1.52763825012d0,-0.165844401919)
- call c_z(ZCOS(z),a,'ZCOS(double complex)')
- call p_z_z(ZCOS,z,a,'ZCOS')
-
-c ZEXP - Exponential
- z = (3.0d0,1.0d0)
- a = (10.8522619142d0,16.9013965352)
- call c_z(ZEXP(z),a,'ZEXP(double complex)')
- call p_z_z(ZEXP,z,a,'ZEXP')
-
-c ZLOG - Natural logarithm
- call c_z(ZLOG(a),z,'ZLOG(double complex)')
- call p_z_z(ZLOG,a,z,'ZLOG')
-
-c ZSIN - Sine
- z = (3.0d0,1.0d0)
- a = (0.217759551622d0,-1.1634403637d0)
- call c_z(ZSIN(z),a,'ZSIN(double complex)')
- call p_z_z(ZSIN,z,a,'ZSIN')
-
-c ZSQRT - Square root
- z = (0.0d0,-4.0d0)
- a = sqrt(2.0d0)*(1.0d0,-1.0d0)
- call c_z(ZSQRT(z),a,'ZSQRT(double complex)')
- call p_z_z(ZSQRT,z,a,'ZSQRT')
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_z(a,b,label)
-c Check if DOUBLE COMPLEX a equals b, and fail otherwise
- double complex a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_d(a,b,label)
-c Check if DOUBLE PRECISION a equals b, and fail otherwise
- double precision a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine p_z_z(f,x,a,label)
-c Check if DOUBLE COMPLEX f(x) equals a for DOUBLE COMPLEX x
- double complex f,x,a
- character*(*) label
- call c_z(f(x),a,label)
- end
-
- subroutine p_d_z(f,x,a,label)
-c Check if DOUBLE PRECISION f(x) equals a for DOUBLE COMPLEX x
- double precision f,x
- double complex a
- character*(*) label
- call c_d(f(x),a,label)
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/intrinsic-unix-bessel.f b/gcc/testsuite/g77.f-torture/execute/intrinsic-unix-bessel.f
deleted file mode 100644
index 53c97fd92fd..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/intrinsic-unix-bessel.f
+++ /dev/null
@@ -1,108 +0,0 @@
-c intrinsic-unix-bessel.f
-c
-c Test Bessel function intrinsics.
-c These functions are only available if provided by system
-c
-c David Billinghurst <David.Billinghurst@riotinto.com>
-c
- real x, a
- double precision dx, da
- integer i
- integer*2 j
- integer*1 k
- integer*8 m
- logical fail
- common /flags/ fail
- fail = .false.
-
- x = 2.0
- dx = x
- i = 2
- j = i
- k = i
- m = i
-c BESJ0 - Bessel function of first kind of order zero
- a = 0.22389077
- da = a
- call c_r(BESJ0(x),a,'BESJ0(real)')
- call c_d(BESJ0(dx),da,'BESJ0(double)')
- call c_d(DBESJ0(dx),da,'DBESJ0(double)')
-
-c BESJ1 - Bessel function of first kind of order one
- a = 0.57672480
- da = a
- call c_r(BESJ1(x),a,'BESJ1(real)')
- call c_d(BESJ1(dx),da,'BESJ1(double)')
- call c_d(DBESJ1(dx),da,'DBESJ1(double)')
-
-c BESJN - Bessel function of first kind of order N
- a = 0.3528340
- da = a
- call c_r(BESJN(i,x),a,'BESJN(integer,real)')
- call c_r(BESJN(j,x),a,'BESJN(integer*2,real)')
- call c_r(BESJN(k,x),a,'BESJN(integer*1,real)')
- call c_d(BESJN(i,dx),da,'BESJN(integer,double)')
- call c_d(BESJN(j,dx),da,'BESJN(integer*2,double)')
- call c_d(BESJN(k,dx),da,'BESJN(integer*1,double)')
- call c_d(DBESJN(i,dx),da,'DBESJN(integer,double)')
- call c_d(DBESJN(j,dx),da,'DBESJN(integer*2,double)')
- call c_d(DBESJN(k,dx),da,'DBESJN(integer*1,double)')
-
-c BESY0 - Bessel function of second kind of order zero
- a = 0.51037567
- da = a
- call c_r(BESY0(x),a,'BESY0(real)')
- call c_d(BESY0(dx),da,'BESY0(double)')
- call c_d(DBESY0(dx),da,'DBESY0(double)')
-
-c BESY1 - Bessel function of second kind of order one
- a = 0.-0.1070324
- da = a
- call c_r(BESY1(x),a,'BESY1(real)')
- call c_d(BESY1(dx),da,'BESY1(double)')
- call c_d(DBESY1(dx),da,'DBESY1(double)')
-
-c BESYN - Bessel function of second kind of order N
- a = -0.6174081
- da = a
- call c_r(BESYN(i,x),a,'BESYN(integer,real)')
- call c_r(BESYN(j,x),a,'BESYN(integer*2,real)')
- call c_r(BESYN(k,x),a,'BESYN(integer*1,real)')
- call c_d(BESYN(i,dx),da,'BESYN(integer,double)')
- call c_d(BESYN(j,dx),da,'BESYN(integer*2,double)')
- call c_d(BESYN(k,dx),da,'BESYN(integer*1,double)')
- call c_d(DBESYN(i,dx),da,'DBESYN(integer,double)')
- call c_d(DBESYN(j,dx),da,'DBESYN(integer*2,double)')
- call c_d(DBESYN(k,dx),da,'DBESYN(integer*1,double)')
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_r(a,b,label)
-c Check if REAL a equals b, and fail otherwise
- real a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_d(a,b,label)
-c Check if DOUBLE PRECISION a equals b, and fail otherwise
- double precision a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/intrinsic-unix-erf.f b/gcc/testsuite/g77.f-torture/execute/intrinsic-unix-erf.f
deleted file mode 100644
index 5ab48d65036..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/intrinsic-unix-erf.f
+++ /dev/null
@@ -1,60 +0,0 @@
-c intrinsic-unix-erf.f
-c
-c Test Bessel function intrinsics.
-c These functions are only available if provided by system
-c
-c David Billinghurst <David.Billinghurst@riotinto.com>
-c
- real x, a
- double precision dx, da
- logical fail
- common /flags/ fail
- fail = .false.
-
- x = 0.6
- dx = x
-c ERF - error function
- a = 0.6038561
- da = a
- call c_r(ERF(x),a,'ERF(real)')
- call c_d(ERF(dx),da,'ERF(double)')
- call c_d(DERF(dx),da,'DERF(double)')
-
-c ERFC - complementary error function
- a = 1.0 - a
- da = a
- call c_r(ERFC(x),a,'ERFC(real)')
- call c_d(ERFC(dx),da,'ERFC(double)')
- call c_d(DERFC(dx),da,'DERFC(double)')
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_r(a,b,label)
-c Check if REAL a equals b, and fail otherwise
- real a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_d(a,b,label)
-c Check if DOUBLE PRECISION a equals b, and fail otherwise
- double precision a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/intrinsic-vax-cd.f b/gcc/testsuite/g77.f-torture/execute/intrinsic-vax-cd.f
deleted file mode 100644
index 93f1c43b0f5..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/intrinsic-vax-cd.f
+++ /dev/null
@@ -1,94 +0,0 @@
-c intrinsic-vax-cd.f
-c
-c Test double complex intrinsics CD*.
-c These functions are VAX extensions
-c
-c David Billinghurst <David.Billinghurst@riotinto.com>
-c
- double complex z, a
- double precision x
- logical fail
- intrinsic cdabs, cdcos, cdexp, cdlog, cdsin, cdsqrt
- common /flags/ fail
- fail = .false.
-
-c CDABS - Absolute value
- z = (3.0d0,-4.0d0)
- x = 5.0d0
- call c_d(CDABS(z),x,'CDABS(double complex)')
- call p_d_z(CDABS,z,x,'CDABS')
-
-c CDCOS - Cosine
- z = (3.0d0,1.0d0)
- a = (-1.52763825012d0,-0.165844401919)
- call c_z(CDCOS(z),a,'CDCOS(double complex)')
- call p_z_z(CDCOS,z,a,'CDCOS')
-
-c CDEXP - Exponential
- z = (3.0d0,1.0d0)
- a = (10.8522619142d0,16.9013965352)
- call c_z(CDEXP(z),a,'CDEXP(double complex)')
- call p_z_z(CDEXP,z,a,'CDEXP')
-
-c CDLOG - Natural logarithm
- call c_z(CDLOG(a),z,'CDLOG(double complex)')
- call p_z_z(CDLOG,a,z,'CDLOG')
-
-c CDSIN - Sine
- z = (3.0d0,1.0d0)
- a = (0.217759551622d0,-1.1634403637d0)
- call c_z(CDSIN(z),a,'CDSIN(double complex)')
- call p_z_z(CDSIN,z,a,'CDSIN')
-
-c CDSQRT - Square root
- z = (0.0d0,-4.0d0)
- a = sqrt(2.0d0)*(1.0d0,-1.0d0)
- call c_z(CDSQRT(z),a,'CDSQRT(double complex)')
- call p_z_z(CDSQRT,z,a,'CDSQRT')
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_z(a,b,label)
-c Check if DOUBLE COMPLEX a equals b, and fail otherwise
- double complex a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_d(a,b,label)
-c Check if DOUBLE PRECISION a equals b, and fail otherwise
- double precision a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine p_z_z(f,x,a,label)
-c Check if DOUBLE COMPLEX f(x) equals a for DOUBLE COMPLEX x
- double complex f,x,a
- character*(*) label
- call c_z(f(x),a,label)
- end
-
- subroutine p_d_z(f,x,a,label)
-c Check if DOUBLE PRECISION f(x) equals a for DOUBLE COMPLEX x
- double precision f,x
- double complex a
- character*(*) label
- call c_d(f(x),a,label)
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/intrinsic77.f b/gcc/testsuite/g77.f-torture/execute/intrinsic77.f
deleted file mode 100644
index 19073196885..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/intrinsic77.f
+++ /dev/null
@@ -1,586 +0,0 @@
- program intrinsic77
-c
-c Test Fortran 77 intrinsic functions (ANSI X3.9-1978 Section 15.10)
-c
-c Test:
-c * specific functions
-c * generic functions with each argument type
-c * specific functions by passing as subroutine argument
-c where permiited by Section 13.12 of Fortran 90 standard
-c
- logical fail
- common /flags/ fail
-
- fail = .false.
- call type_conversion
- call truncation
- call nearest_whole_number
- call nearest_integer
- call absolute_value
- call remaindering
- call transfer_of_sign
- call positive_difference
- call double_precision_product
- call choosing_largest_value
- call choosing_smallest_value
- call length_of_character_array
- call index_of_substring
- call imaginary_part
- call complex_conjugate
- call square_root
- call exponential
- call natural_logarithm
- call common_logarithm
- call sine
- call cosine
- call tangent
- call arcsine
- call arccosine
- call arctangent
- call hyperbolic_sine
- call hyperbolic_cosine
- call hyperbolic_tangent
- call lexically_greater_than_or_equal
- call lexically_greater_than
- call lexically_less_than_or_equal
- call lexically_less_than
-
- if ( fail ) call abort()
- end
-
- subroutine failure(label)
-c Report failure and set flag
- character*(*) label
- logical fail
- common /flags/ fail
- write(6,'(a,a,a)') 'Test ',label,' FAILED'
- fail = .true.
- end
-
- subroutine c_i(i,j,label)
-c Check if INTEGER i equals j, and fail otherwise
- integer i,j
- character*(*) label
- if ( i .ne. j ) then
- call failure(label)
- write(6,*) 'Got ',i,' expected ', j
- end if
- end
-
- subroutine c_r(a,b,label)
-c Check if REAL a equals b, and fail otherwise
- real a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_d(a,b,label)
-c Check if DOUBLE PRECISION a equals b, and fail otherwise
- double precision a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0d-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_c(a,b,label)
-c Check if COMPLEX a equals b, and fail otherwise
- complex a, b
- character*(*) label
- if ( abs(a-b) .gt. 1.0e-5 ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_l(a,b,label)
-c Check if LOGICAL a equals b, and fail otherwise
- logical a, b
- character*(*) label
- if ( a .neqv. b ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine c_ch(a,b,label)
-c Check if CHARACTER a equals b, and fail otherwise
- character*(*) a, b
- character*(*) label
- if ( a .ne. b ) then
- call failure(label)
- write(6,*) 'Got ',a,' expected ', b
- end if
- end
-
- subroutine p_i_i(f,x,i,label)
-c Check if INTEGER f(x) equals i for INTEGER x
- integer f,x,i
- character*(*) label
- call c_i(f(x),i,label)
- end
-
- subroutine p_i_ii(f,x1,x2,i,label)
-c Check if INTEGER f(x1,x2) equals i for INTEGER x
- integer f,x1,x2,i
- character*(*) label
- call c_i(f(x1,x2),i,label)
- end
-
- subroutine p_i_r(f,x,i,label)
-c Check if INTEGER f(x) equals i for REAL x
- real x
- integer f,i
- character*(*) label
- call c_i(f(x),i,label)
- end
-
- subroutine p_i_d(f,x,i,label)
-c Check if INTEGER f(x) equals i for DOUBLE PRECISION x
- double precision x
- integer f,i
- character*(*) label
- call c_i(f(x),i,label)
- end
-
- subroutine p_i_ch(f,x,a,label)
-c Check if INTEGER f(x) equals a for CHARACTER x
- character*(*) x
- integer f, a
- character*(*) label
- call c_i(f(x),a,label)
- end
-
- subroutine p_i_chch(f,x1,x2,a,label)
-c Check if INTEGER f(x1,x2) equals a for CHARACTER x1 and x2
- character*(*) x1,x2
- integer f, a
- character*(*) label
- call c_i(f(x1,x2),a,label)
- end
-
- subroutine p_r_r(f,x,a,label)
-c Check if REAL f(x) equals a for REAL x
- real f,x,a
- character*(*) label
- call c_r(f(x),a,label)
- end
-
- subroutine p_r_rr(f,x1,x2,a,label)
-c Check if REAL f(x1,x2) equals a for REAL x1, x2
- real f,x1,x2,a
- character*(*) label
- call c_r(f(x1,x2),a,label)
- end
-
- subroutine p_d_d(f,x,a,label)
-c Check if DOUBLE PRECISION f(x) equals a for DOUBLE PRECISION x
- double precision f,x,a
- character*(*) label
- call c_d(f(x),a,label)
- end
-
- subroutine p_d_rr(f,x1,x2,a,label)
-c Check if DOUBLE PRECISION f(x1,x2) equals a for real x1,x2
- double precision f,a
- real x1,x2
- character*(*) label
- call c_d(f(x1,x2),a,label)
- end
-
- subroutine p_d_dd(f,x1,x2,a,label)
-c Check if DOUBLE PRECISION f(x1,x2) equals a for DOUBLE PRECISION x1,x2
- double precision f,x1,x2,a
- character*(*) label
- call c_d(f(x1,x2),a,label)
- end
-
- subroutine p_c_c(f,x,a,label)
-c Check if COMPLEX f(x) equals a for COMPLEX x
- complex f,x,a
- character*(*) label
- call c_c(f(x),a,label)
- end
-
- subroutine p_r_c(f,x,a,label)
-c Check if REAL f(x) equals a for COMPLEX x
- complex x
- real f, a
- character*(*) label
- call c_r(f(x),a,label)
- end
-
- subroutine type_conversion
- integer i
- character*1 c
-c conversion to integer
- call c_i(INT(5),5,'INT(integer)')
- call c_i(INT(5.01),5,'INT(real)')
- call c_i(INT(5.01d0),5,'INT(double)')
- call c_i(INT((5.01,-3.0)),5,'INT(complex)')
- call c_i(IFIX(5.01),5,'IFIX(real)')
- call c_i(IDINT(5.01d0),5,'IDINT(double)')
-c conversion to real
- call c_r(REAL(-2),-2.0,'REAL(integer)')
- call c_r(REAL(-2.0),-2.0,'REAL(real)')
- call c_r(REAL(-2.0d0),-2.0,'REAL(double)')
- call c_r(REAL((-2.,9.)),-2.0,'REAL(complex)')
- call c_r(FLOAT(-2),-2.0,'FLOAT(int)')
- call c_r(SNGL(-2.0d0),-2.0,'SNGL(double)')
-c conversion to double
- call c_d(DBLE(5),5.0d0,'DBLE(integer)')
- call c_d(DBLE(5.),5.0d0,'DBLE(real)')
- call c_d(DBLE(5.0d0),5.0d0,'DBLE(double)')
- call c_d(DBLE((5.0,0.5)),5.0d0,'DBLE(complex)')
-c conversion to complex
- call c_c(CMPLX(1),(1.,0.),'CMPLX(integer)')
- call c_c(CMPLX(1,2),(1.,2.),'CMPLX(integer, integer)')
- call c_c(CMPLX(1.),(1.,0.),'CMPLX(real)')
- call c_c(CMPLX(1.,2.),(1.,2.),'CMPLX(real,real)')
- call c_c(CMPLX(1.d0),(1.,0.),'CMPLX(double)')
- call c_c(CMPLX(1.d0,2.d0),(1.,2.),'CMPLX(double,double)')
- call c_c(CMPLX(1.,2.),(1.,2.),'CMPLX(complex)')
-c character conversion
- c = 'C'
- i = ichar(c)
- call c_i(ICHAR(c),i,'ICHAR')
- call c_ch(CHAR(i),c,'CHAR')
- end
-
- subroutine truncation
- intrinsic aint, dint
- call c_r(AINT(9.2),9.0,'AINT(real)')
- call c_d(AINT(9.2d0),9.0d0,'AINT(double)')
- call c_d(DINT(9.2d0),9.0d0,'DINT(double)')
- call p_r_r(AINT,9.2,9.0,'AINT')
- call p_d_d(DINT,9.2d0,9.0d0,'DINT')
- end
-
- subroutine nearest_whole_number
- intrinsic anint, dnint
- call c_r(ANINT(9.2),9.0,'ANINT(real)')
- call c_d(ANINT(9.2d0),9.0d0,'ANINT(double)')
- call c_d(DNINT(9.2d0),9.0d0,'DNINT(double)')
- call p_r_r(ANINT,9.2,9.0,'ANINT')
- call p_d_d(DNINT,9.2d0,9.0d0,'DNINT')
- end
-
- subroutine nearest_integer
- intrinsic nint, idnint
- call c_i(NINT(9.2),9,'NINT(real)')
- call c_i(NINT(9.2d0),9,'NINT(double)')
- call c_i(IDNINT(9.2d0),9,'IDNINT(double)')
- call p_i_r(NINT,9.2,9,'NINT')
- call p_i_d(IDNINT,9.2d0,9,'IDNINT')
- end
-
- subroutine absolute_value
- intrinsic iabs, abs, dabs, cabs
- call c_i(ABS(-7),7,'ABS(integer)')
- call c_r(ABS(-7.),7.,'ABS(real)')
- call c_d(ABS(-7.d0),7.d0,'ABS(double)')
- call c_r(ABS((3.,-4.)),5.0,'ABS(complex)')
- call c_i(IABS(-7),7,'IABS(integer)')
- call c_d( DABS(-7.d0),7.d0,'DABS(double)')
- call c_r( CABS((3.,-4.)),5.0,'CABS(complex)')
- call p_i_i(IABS,-7,7,'IABS')
- call p_r_r(ABS,-7.,7.,'ABS')
- call p_d_d(DABS,-7.0d0,7.0d0,'DABS')
- call p_r_c(CABS,(3.,-4.), 5.0,'CABS')
- end
-
- subroutine remaindering
- intrinsic mod, amod, dmod
- call c_i( MOD(8,3),2,'MOD(integer,integer)')
- call c_r( MOD(8.,3.),2.,'MOD(real,real)')
- call c_d( MOD(8.d0,3.d0),2.d0,'MOD(double,double)')
- call c_r( AMOD(8.,3.),2.,'AMOD(real,real)')
- call c_d( DMOD(8.d0,3.d0),2.d0,'DMOD(double,double)')
- call p_i_ii(MOD,8,3,2,'MOD')
- call p_r_rr(AMOD,8.,3.,2.,'AMOD')
- call p_d_dd(DMOD,8.d0,3.d0,2.d0,'DMOD')
- end
-
- subroutine transfer_of_sign
- intrinsic isign,sign,dsign
- call c_i(SIGN(8,-3),-8,'SIGN(integer)')
- call c_r(SIGN(8.,-3.),-8.,'SIGN(real,real)')
- call c_d(SIGN(8.d0,-3.d0),-8.d0,'SIGN(double,double)')
- call c_i(ISIGN(8,-3),-8,'ISIGN(integer)')
- call c_d(DSIGN(8.d0,-3.d0),-8.d0,'DSIGN(double,double)')
- call p_i_ii(ISIGN,8,-3,-8,'ISIGN')
- call p_r_rr(SIGN,8.,-3.,-8.,'SIGN')
- call p_d_dd(DSIGN,8.d0,-3.d0,-8.d0,'DSIGN')
- end
-
- subroutine positive_difference
- intrinsic idim, dim, ddim
- call c_i(DIM(-8,-3),0,'DIM(integer)')
- call c_r(DIM(-8.,-3.),0.,'DIM(real,real)')
- call c_d(DIM(-8.d0,-3.d0),0.d0,'DIM(double,double)')
- call c_i(IDIM(-8,-3),0,'IDIM(integer)')
- call c_d(DDIM(-8.d0,-3.d0),0.d0,'DDIM(double,double)')
- call p_i_ii(IDIM,-8,-3,0,'IDIM')
- call p_r_rr(DIM,-8.,-3.,0.,'DIM')
- call p_d_dd(DDIM,-8.d0,-3.d0,0.d0,'DDIM')
- end
-
- subroutine double_precision_product
- intrinsic dprod
- call c_d(DPROD(-8.,-3.),24.d0,'DPROD(real,real)')
- call p_d_rr(DPROD,-8.,-3.,24.d0,'DPROD')
- end
-
- subroutine choosing_largest_value
- call c_i(MAX(1,2,3),3,'MAX(integer,integer,integer)')
- call c_r(MAX(1.,2.,3.),3.,'MAX(real,real,real)')
- call c_d(MAX(1.d0,2.d0,3.d0),3.d0,'MAX(double,double,double)')
- call c_i(MAX0(1,2,3),3,'MAX0(integer,integer,integer)')
- call c_r(AMAX1(1.,2.,3.),3.,'MAX(real,real,real)')
- call c_d(DMAX1(1.d0,2.d0,3.d0),3.d0,'DMAX1(double,double,double)')
- call c_r(AMAX0(1,2,3),3.,'AMAX0(integer,integer,integer)')
- call c_i(MAX1(1.,2.,3.),3,'MAX1(real,real,real)')
- end
-
- subroutine choosing_smallest_value
- call c_i(MIN(1,2,3),1,'MIN(integer,integer,integer)')
- call c_r(MIN(1.,2.,3.),1.,'MIN(real,real,real)')
- call c_d(MIN(1.d0,2.d0,3.d0),1.d0,'MIN(double,double,double)')
- call c_i(MIN0(1,2,3),1,'MIN0(integer,integer,integer)')
- call c_r(AMIN1(1.,2.,3.),1.,'MIN(real,real,real)')
- call c_d(DMIN1(1.d0,2.d0,3.d0),1.d0,'DMIN1(double,double,double)')
- call c_r(AMIN0(1,2,3),1.,'AMIN0(integer,integer,integer)')
- call c_i(MIN1(1.,2.,3.),1,'MIN1(real,real,real)')
- end
-
- subroutine length_of_character_array
- intrinsic len
- call c_i(LEN('ABCDEF'),6,'LEN 1')
- call p_i_ch(LEN,'ABCDEF',6,'LEN 2')
- end
-
- subroutine index_of_substring
- intrinsic index
- call c_i(INDEX('ABCDEF','C'),3,'INDEX 1')
- call p_i_chch(INDEX,'ABCDEF','C',3,'INDEX 2')
- end
-
- subroutine imaginary_part
- intrinsic aimag
- call c_r(AIMAG((2.,-7.)),-7.,'AIMAG(complex)')
- call p_r_c(AIMAG,(2.,-7.),-7.,'AIMAG(complex)')
- end
-
- subroutine complex_conjugate
- intrinsic conjg
- call c_c(CONJG((2.,-7.)),(2.,7.),'CONJG(complex)')
- call p_c_c(CONJG,(2.,-7.),(2.,7.),'CONJG')
- end
-
- subroutine square_root
- intrinsic sqrt, dsqrt, csqrt
- real x, a
- x = 4.0
- a = 2.0
- call c_r(SQRT(x),a,'SQRT(real)')
- call c_d(SQRT(1.d0*x),1.d0*a,'SQRT(double)')
- call c_c(SQRT((1.,0.)*x),(1.,0.)*a,'SQRT(complex)')
- call c_d(DSQRT(1.d0*x),1.d0*a,'DSQRT(double)')
- call c_c(CSQRT((1.,0.)*x),(1.,0.)*a,'CSQRT(complex)')
- call p_r_r(SQRT,x,a,'SQRT')
- call p_d_d(DSQRT,1.d0*x,1.d0*a,'DSQRT')
- call p_c_c(CSQRT,(1.,0.)*x,(1.,0.)*a ,'CSQRT')
- end
-
- subroutine exponential
- intrinsic exp, dexp, cexp
- real x, a
- x = 0.0
- a = 1.0
- call c_r(EXP(x),a,'EXP(real)')
- call c_d(EXP(1.d0*x),1.d0*a,'EXP(double)')
- call c_c(EXP((1.,0.)*x),(1.,0.)*a,'EXP(complex)')
- call c_d(DEXP(1.d0*x),1.d0*a,'DEXP(double)')
- call c_c(CEXP((1.,0.)*x),(1.,0.)*a,'CEXP(complex)')
- call p_r_r(EXP,x,a,'EXP')
- call p_d_d(DEXP,1.d0*x,1.d0*a,'DEXP')
- call p_c_c(CEXP,(1.,0.)*x,(1.,0.)*a ,'CEXP')
- end
-
- subroutine natural_logarithm
- intrinsic alog, dlog, clog
- real x, a
- a = 1.234
- x = exp(a)
- call c_r(LOG(x),a,'LOG(real)')
- call c_d(LOG(1.d0*x),1.d0*a,'LOG(double)')
- call c_c(LOG((1.,0.)*x),(1.,0.)*a,'LOG(complex)')
- call c_r(ALOG(x),a,'ALOG(real)')
- call c_d(DLOG(1.d0*x),1.d0*a,'DLOG(double)')
- call c_c(CLOG((1.,0.)*x),(1.,0.)*a,'CLOG(complex)')
- call p_r_r(ALOG,x,a,'LOG')
- call p_d_d(DLOG,1.d0*x,1.d0*a,'DLOG')
- call p_c_c(CLOG,(1.,0.)*x,(1.,0.)*a,'CLOG')
- end
-
- subroutine common_logarithm
- intrinsic alog10, dlog10
- real x, a
- x = 100.0
- a = 2.0
- call c_r(LOG10(x),a,'LOG10(real)')
- call c_d(LOG10(1.d0*x),1.d0*a,'LOG10(double)')
- call c_r(ALOG10(x),a,'ALOG10(real)')
- call c_d(DLOG10(1.d0*x),1.d0*a,'DLOG10(double)')
- call p_r_r(ALOG10,x,a,'ALOG10')
- call p_d_d(DLOG10,1.d0*x,1.d0*a ,'DLOG10')
- end
-
- subroutine sine
- intrinsic sin, dsin, csin
- real x, a
- a = 1.0
- x = asin(a)
- call c_r(SIN(x),a,'SIN(real)')
- call c_d(SIN(1.d0*x),1.d0*a,'SIN(double)')
- call c_c(SIN((1.,0.)*x),(1.,0.)*a,'SIN(complex)')
- call c_d(DSIN(1.d0*x),1.d0*a,'DSIN(double)')
- call c_c(CSIN((1.,0.)*x),(1.,0.)*a,'CSIN(complex)')
- call p_r_r(SIN,x,a,'SIN')
- call p_d_d(DSIN,1.d0*x,1.d0*a,'DSIN')
- call p_c_c(CSIN,(1.,0.)*x,(1.,0.)*a ,'CSIN')
- end
-
- subroutine cosine
- intrinsic cos, dcos, ccos
- real x, a
- a = 0.123456
- x = acos(a)
- call c_r(COS(x),a,'COS(real)')
- call c_d(COS(1.d0*x),1.d0*a,'COS(double)')
- call c_c(COS((1.,0.)*x),(1.,0.)*a,'COS(complex)')
- call c_r(COS(x),a,'COS(real)')
- call c_d(DCOS(1.d0*x),1.d0*a,'DCOS(double)')
- call c_c(CCOS((1.,0.)*x),(1.,0.)*a,'CCOS(complex)')
- call p_r_r(COS,x,a,'COS')
- call p_d_d(DCOS,1.d0*x,1.d0*a ,'DCOS')
- call p_c_c(CCOS,(1.,0.)*x, (1.,0.)*a ,'CCOS')
- end
-
- subroutine tangent
- intrinsic tan, dtan
- real x, a
- a = 0.5
- x = atan(a)
- call c_r(TAN(x),a,'TAN(real)')
- call c_d(TAN(1.d0*x),1.d0*a,'TAN(double)')
- call c_d(DTAN(1.d0*x),1.d0*a,'DTAN(double)')
- call p_r_r(TAN,x,a,'TAN')
- call p_d_d(DTAN,1.d0*x,1.d0*a ,'DTAN')
- end
-
- subroutine arcsine
- intrinsic asin, dasin
- real x, a
- a = 0.5
- x = sin(a)
- call c_r(ASIN(x),a,'ASIN(real)')
- call c_d(ASIN(1.d0*x),1.d0*a,'ASIN(double)')
- call c_d(DASIN(1.d0*x),1.d0*a,'DASIN(double)')
- call p_r_r(ASIN,x,a,'ASIN')
- call p_d_d(DASIN,1.d0*x,1.d0*a ,'DASIN')
- end
-
- subroutine arccosine
- intrinsic acos, dacos
- real x, a
- x = 0.70710678
- a = 0.785398
- call c_r(ACOS(x),a,'ACOS(real)')
- call c_d(ACOS(1.d0*x),1.d0*a,'ACOS(double)')
- call c_d(DACOS(1.d0*x),1.d0*a,'DACOS(double)')
- call p_r_r(ACOS,x,a,'ACOS')
- call p_d_d(DACOS,1.d0*x,1.d0*a ,'DACOS')
- end
-
- subroutine arctangent
- intrinsic atan, atan2, datan, datan2
- real x1, x2, a
- a = 0.75
- x1 = tan(a)
- x2 = 1.0
- call c_r(ATAN(x1),a,'ATAN(real)')
- call c_d(ATAN(1.d0*x1),1.d0*a,'ATAN(double)')
- call c_d(DATAN(1.d0*x1),1.d0*a,'DATAN(double)')
- call c_r(ATAN2(x1,x2),a,'ATAN2(real)')
- call c_d(ATAN2(1.d0*x1,1.d0*x2),1.d0*a,'ATAN2(double)')
- call c_d(DATAN2(1.d0*x1,1.d0*x2),1.0d0*a,'DATAN2(double)')
- call p_r_r(ATAN,x1,a,'ATAN')
- call p_d_d(DATAN,1.d0*x1,1.d0*a,'DATAN')
- call p_r_rr(ATAN2,x1,x2,a,'ATAN2')
- call p_d_dd(DATAN2,1.d0*x1,1.d0*x2,1.d0*a,'DATAN2')
- end
-
- subroutine hyperbolic_sine
- intrinsic sinh, dsinh
- real x, a
- x = 1.0
- a = 1.1752012
- call c_r(SINH(x),a,'SINH(real)')
- call c_d(SINH(1.d0*x),1.d0*a,'SINH(double)')
- call c_d(DSINH(1.d0*x),1.d0*a,'DSINH(double)')
- call p_r_r(SINH,x,a,'SINH')
- call p_d_d(DSINH,1.d0*x,1.d0*a ,'DSINH')
- end
-
- subroutine hyperbolic_cosine
- intrinsic cosh, dcosh
- real x, a
- x = 1.0
- a = 1.5430806
- call c_r(COSH(x),a,'COSH(real)')
- call c_d(COSH(1.d0*x),1.d0*a,'COSH(double)')
- call c_d(DCOSH(1.d0*x),1.d0*a,'DCOSH(double)')
- call p_r_r(COSH,x,a,'COSH')
- call p_d_d(DCOSH,1.d0*x,1.d0*a ,'DCOSH')
- end
-
- subroutine hyperbolic_tangent
- intrinsic tanh, dtanh
- real x, a
- x = 1.0
- a = 0.76159416
- call c_r(TANH(x),a,'TANH(real)')
- call c_d(TANH(1.d0*x),1.d0*a,'TANH(double)')
- call c_d(DTANH(1.d0*x),1.d0*a,'DTANH(double)')
- call p_r_r(TANH,x,a,'TANH')
- call p_d_d(DTANH,1.d0*x,1.d0*a ,'DTANH')
- end
-
- subroutine lexically_greater_than_or_equal
- call c_l(LGE('A','B'),.FALSE.,'LGE(character,character) 1')
- call c_l(LGE('B','A'),.TRUE.,'LGE(character,character) 2')
- call c_l(LGE('A','A'),.TRUE.,'LGE(character,character) 3')
- end
-
- subroutine lexically_greater_than
- call c_l(LGT('A','B'),.FALSE.,'LGT(character,character) 1')
- call c_l(LGT('B','A'),.TRUE.,'LGT(character,character) 2')
- call c_l(LGT('A','A'),.FALSE.,'LGT(character,character) 3')
- end
-
- subroutine lexically_less_than_or_equal
- call c_l(LLE('A','B'),.TRUE.,'LLE(character,character) 1')
- call c_l(LLE('B','A'),.FALSE.,'LLE(character,character) 2')
- call c_l(LLE('A','A'),.TRUE.,'LLE(character,character) 3')
- end
-
- subroutine lexically_less_than
- call c_l(LLT('A','B'),.TRUE.,'LLT(character,character) 1')
- call c_l(LLT('B','A'),.FALSE.,'LLT(character,character) 2')
- call c_l(LLT('A','A'),.FALSE.,'LLT(character,character) 3')
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/io0.f b/gcc/testsuite/g77.f-torture/execute/io0.f
deleted file mode 100644
index c56c9919077..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/io0.f
+++ /dev/null
@@ -1,46 +0,0 @@
-* Preliminary tests for a few things in the i/o library.
-* Thrown together by Dave Love not from specific bug reports --
-* other ideas welcome.
-
- character *(*) fmt
- parameter (fmt='(1x,i3,f5.1)')
-* Scratch file makes sure we can use one and avoids dealing with
-* explicit i/o in the testsuite.
- open(90, status='scratch') ! try a biggish unit number
- write(90, '()') ! extra record for interest
-* Formatted i/o can go wild (endless loop AFAIR) if we're wrongly
-* assuming an ANSI sprintf.
- write(90, fmt) 123, 123.0
- backspace 90 ! backspace problems reported on DOSish systems
- read(90, fmt) i, r
- endfile 90
- if (i/=123 .or. nint(r)/=123) call abort
- rewind 90 ! make sure we can rewind too
- read(90, '()')
- read(90, fmt) i, r
- if (i/=123 .or. nint(r)/=123) call abort
- close(90)
-* Make sure we can do unformatted i/o OK. This might be
-* problematic on DOS-like systems if we've done an fopen in text
-* mode, not binary.
- open(90, status='scratch', access='direct', form='unformatted',
- + recl=8)
- write(90, rec=1) 123, 123.0
- read(90, rec=1) i, r
- if (i/=123 .or. nint(r)/=123) call abort
- close(90)
- open(90, status='scratch', form='unformatted')
- write(90) 123, 123.0
- backspace 90
- read(90) i, r
- if (i/=123 .or. nint(r)/=123) call abort
- close(90)
-* Fails at 1998-09-01 on spurious recursive i/o check (fixed by
-* 1998-09-06 libI77 change):
- open(90, status='scratch', form='formatted', recl=16,
- + access='direct')
- write(90, '(i8,f8.1)',rec=1) 123, 123.0
- read(90, '(i8,f8.1)', rec=1) i, r
- if (i/=123 .or. nint(r)/=123) call abort
- close(90)
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/io0.x b/gcc/testsuite/g77.f-torture/execute/io0.x
index 7087bab4960..6a69a3aadab 100644
--- a/gcc/testsuite/g77.f-torture/execute/io0.x
+++ b/gcc/testsuite/g77.f-torture/execute/io0.x
@@ -3,6 +3,9 @@
# Similar restrictions exist for most simulators.
if { [istarget "mmix-knuth-mmixware"]
+ || [istarget "arm*-*-elf"]
+ || [istarget "strongarm*-*-elf"]
+ || [istarget "xscale*-*-elf"]
|| [istarget "cris-*-elf"] } {
set torture_execute_xfail [istarget]
}
diff --git a/gcc/testsuite/g77.f-torture/execute/io1.f b/gcc/testsuite/g77.f-torture/execute/io1.f
deleted file mode 100644
index c5242446a49..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/io1.f
+++ /dev/null
@@ -1,10 +0,0 @@
-* Fixed by 1998-09-28 libI77/open.c change.
- open(90,status='scratch')
- write(90, '(1X, I1 / 1X, I1)') 1, 2
- rewind 90
- write(90, '(1X, I1)') 1
- rewind 90 ! implicit ENDFILE expected
- read(90, *) i
- read(90, *, end=10) j
- call abort()
- 10 end
diff --git a/gcc/testsuite/g77.f-torture/execute/io1.x b/gcc/testsuite/g77.f-torture/execute/io1.x
index 7087bab4960..6a69a3aadab 100644
--- a/gcc/testsuite/g77.f-torture/execute/io1.x
+++ b/gcc/testsuite/g77.f-torture/execute/io1.x
@@ -3,6 +3,9 @@
# Similar restrictions exist for most simulators.
if { [istarget "mmix-knuth-mmixware"]
+ || [istarget "arm*-*-elf"]
+ || [istarget "strongarm*-*-elf"]
+ || [istarget "xscale*-*-elf"]
|| [istarget "cris-*-elf"] } {
set torture_execute_xfail [istarget]
}
diff --git a/gcc/testsuite/g77.f-torture/execute/labug1.f b/gcc/testsuite/g77.f-torture/execute/labug1.f
deleted file mode 100644
index 032fa41f899..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/labug1.f
+++ /dev/null
@@ -1,57 +0,0 @@
- PROGRAM LABUG1
-
-* This program core dumps on mips-sgi-irix6.2 when compiled
-* with egcs-19981101, egcs-19981109 and egcs-19981122 snapshots
-* with -O2
-*
-* Originally derived from LAPACK test suite.
-* Almost any change allows it to run.
-*
-* David Billinghurst, (David.Billinghurst@riotinto.com.au)
-* 25 November 1998
-*
-* .. Parameters ..
- INTEGER LDA, LDE
- PARAMETER ( LDA = 2500, LDE = 50 )
- COMPLEX CZERO
- PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ) )
-
- INTEGER I, J, M, N
- REAL V
- COMPLEX A(LDA),B(LDA),C(LDA),E(LDE,LDE),F(LDE,LDE)
- COMPLEX Z
-
- N=2
- M=1
-*
- do i = 1, m
- do j = 1, n
- e(i,j) = czero
- f(i,j) = czero
- end do
- end do
-*
- DO J = 1, N
- DO I = 1, M
- V = ABS( E(I,J) - F(I,J) )
- END DO
- END DO
-
- CALL SUB2(M,Z)
-
- END
-
- subroutine SUB2(I,A)
- integer i
- complex a
- end
-
-
-
-
-
-
-
-
-
-
diff --git a/gcc/testsuite/g77.f-torture/execute/large_vec.f b/gcc/testsuite/g77.f-torture/execute/large_vec.f
deleted file mode 100644
index 0af5b1b0b3f..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/large_vec.f
+++ /dev/null
@@ -1,3 +0,0 @@
- parameter (nmax=165000)
- double precision x(nmax)
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/le.f b/gcc/testsuite/g77.f-torture/execute/le.f
deleted file mode 100644
index 74e42750d55..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/le.f
+++ /dev/null
@@ -1,29 +0,0 @@
- program fool
-
- real foo
- integer n
- logical t
-
- foo = 2.5
- n = 5
-
- t = (n > foo)
- if (t .neqv. .true.) call abort
- t = (n >= foo)
- if (t .neqv. .true.) call abort
- t = (n < foo)
- if (t .neqv. .false.) call abort
- t = (n <= 5)
- if (t .neqv. .true.) call abort
- t = (n >= 5 )
- if (t .neqv. .true.) call abort
- t = (n == 5)
- if (t .neqv. .true.) call abort
- t = (n /= 5)
- if (t .neqv. .false.) call abort
- t = (n /= foo)
- if (t .neqv. .true.) call abort
- t = (n == foo)
- if (t .neqv. .false.) call abort
-
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/select.f b/gcc/testsuite/g77.f-torture/execute/select.f
deleted file mode 100644
index f1024330a71..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/select.f
+++ /dev/null
@@ -1,173 +0,0 @@
-C integer byte case with integer byte parameters as case(s)
- subroutine ib
- integer *1 a /1/
- integer *1 one,two,three
- parameter (one=1,two=2,three=3)
- select case (a)
- case (one)
- case (two)
- call abort
- case (three)
- call abort
- case default
- call abort
- end select
- print*,'normal ib'
- end
-C integer halfword case with integer halfword parameters
- subroutine ih
- integer *2 a /1/
- integer *2 one,two,three
- parameter (one=1,two=2,three=3)
- select case (a)
- case (one)
- case (two)
- call abort
- case (three)
- call abort
- case default
- call abort
- end select
- print*,'normal ih'
- end
-C integer case with integer parameters
- subroutine iw
- integer *4 a /1/
- integer *4 one,two,three
- parameter (one=1,two=2,three=3)
- select case (a)
- case (one)
- case (two)
- call abort
- case (three)
- call abort
- case default
- call abort
- end select
- print*,'normal iw'
- end
-C integer double case with integer double parameters
- subroutine id
- integer *8 a /1/
- integer *8 one,two,three
- parameter (one=1,two=2,three=3)
- select case (a)
- case (one)
- case (two)
- call abort
- case (three)
- call abort
- case default
- call abort
- end select
- print*,'normal id'
- end
-C integer byte select with integer case
- subroutine ib_mixed
- integer*1 s /1/
- select case (s)
- case (1)
- case (2)
- call abort
- end select
- print*,'ib ok'
- end
-C integer halfword with integer case
- subroutine ih_mixed
- integer*2 s /1/
- select case (s)
- case (1)
- case default
- call abort
- end select
- print*,'ih ok'
- end
-C integer word with integer case
- subroutine iw_mixed
- integer s /5/
- select case (s)
- case (1)
- call abort
- case (2)
- call abort
- case (3)
- call abort
- case (4)
- call abort
- case (5)
-C
- case (6)
- call abort
- case default
- call abort
- end select
- print*,'iw ok'
- end
-C integer doubleword with integer case
- subroutine id_mixed
- integer *8 s /1024/
- select case (s)
- case (1)
- call abort
- case (1023)
- call abort
- case (1025)
- call abort
- case (1024)
-C
- end select
- print*,'i8 ok'
- end
- subroutine l1_mixed
- logical*1 s /.TRUE./
- select case (s)
- case (.TRUE.)
- case (.FALSE.)
- call abort
- end select
- print*,'l1 ok'
- end
- subroutine l2_mixed
- logical*2 s /.FALSE./
- select case (s)
- case (.TRUE.)
- call abort
- case (.FALSE.)
- end select
- print*,'lh ok'
- end
- subroutine l4_mixed
- logical*4 s /.TRUE./
- select case (s)
- case (.FALSE.)
- call abort
- case (.TRUE.)
- end select
- print*,'lw ok'
- end
- subroutine l8_mixed
- logical*8 s /.TRUE./
- select case (s)
- case (.TRUE.)
- case (.FALSE.)
- call abort
- end select
- print*,'ld ok'
- end
-C main
-C -- regression cases
- call ib
- call ih
- call iw
- call id
-C -- new functionality
- call ib_mixed
- call ih_mixed
- call iw_mixed
- call id_mixed
- end
-
-
-
-
-
diff --git a/gcc/testsuite/g77.f-torture/execute/short.f b/gcc/testsuite/g77.f-torture/execute/short.f
deleted file mode 100644
index 89ae273891c..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/short.f
+++ /dev/null
@@ -1,57 +0,0 @@
- program short
-
- parameter ( N=2 )
- common /chb/ pi,sig(0:N)
- common /parm/ h(2,2)
-
-c initialize some variables
- h(2,2) = 1117
- h(2,1) = 1178
- h(1,2) = 1568
- h(1,1) = 1621
- sig(0) = -1.
- sig(1) = 0.
- sig(2) = 1.
-
- call printout
- stop
- end
-
-c ******************************************************************
-
- subroutine printout
- parameter ( N=2 )
- common /chb/ pi,sig(0:N)
- common /parm/ h(2,2)
- dimension yzin1(0:N), yzin2(0:N)
-
-c function subprograms
- z(i,j,k) = 0.5*h(i,j)*(sig(k)-1.)
-
-c a four-way average of rhobar
- do 260 k=0,N
- yzin1(k) = 0.25 *
- & ( z(2,2,k) + z(1,2,k) +
- & z(2,1,k) + z(1,1,k) )
- 260 continue
-
-c another four-way average of rhobar
- do 270 k=0,N
- rtmp1 = z(2,2,k)
- rtmp2 = z(1,2,k)
- rtmp3 = z(2,1,k)
- rtmp4 = z(1,1,k)
- yzin2(k) = 0.25 *
- & ( rtmp1 + rtmp2 + rtmp3 + rtmp4 )
- 270 continue
-
- do k=0,N
- if (yzin1(k) .ne. yzin2(k)) call abort
- enddo
- if (yzin1(0) .ne. -1371.) call abort
- if (yzin1(1) .ne. -685.5) call abort
- if (yzin1(2) .ne. 0.) call abort
-
- return
- end
-
diff --git a/gcc/testsuite/g77.f-torture/execute/u77-test.f b/gcc/testsuite/g77.f-torture/execute/u77-test.f
deleted file mode 100644
index f502bc72833..00000000000
--- a/gcc/testsuite/g77.f-torture/execute/u77-test.f
+++ /dev/null
@@ -1,421 +0,0 @@
-*** Some random stuff for testing libU77. Should be done better. It's
-* hard to test things where you can't guarantee the result. Have a
-* good squint at what it prints, though detected errors will cause
-* starred messages.
-*
-* Currently not tested:
-* ALARM
-* CHDIR (func)
-* CHMOD (func)
-* FGET (func/subr)
-* FGETC (func)
-* FPUT (func/subr)
-* FPUTC (func)
-* FSTAT (subr)
-* GETCWD (subr)
-* HOSTNM (subr)
-* IRAND
-* KILL
-* LINK (func)
-* LSTAT (subr)
-* RENAME (func/subr)
-* SIGNAL (subr)
-* SRAND
-* STAT (subr)
-* SYMLNK (func/subr)
-* UMASK (func)
-* UNLINK (func)
-*
-* NOTE! This is the testsuite version, so it should compile and
-* execute on all targets, and either run to completion (with
-* success status) or fail (by calling abort). The *other* version,
-* which is a bit more interactive and tests a couple of things
-* this one cannot, should be generally the same, and is in
-* libf2c/libU77/u77-test.f. Please keep it up-to-date.
-
- implicit none
-
- external hostnm
-* intrinsic hostnm
- integer hostnm
-
- integer i, j, k, ltarray (9), idat (3), count, rate, count_max,
- + pid, mask
- real tarray1(2), tarray2(2), r1, r2
- double precision d1
- integer(kind=2) bigi
- logical issum
- intrinsic getpid, getuid, getgid, ierrno, gerror, time8,
- + fnum, isatty, getarg, access, unlink, fstat, iargc,
- + stat, lstat, getcwd, gmtime, etime, chmod, itime, date,
- + chdir, fgetc, fputc, system_clock, second, idate, secnds,
- + time, ctime, fdate, ttynam, date_and_time, mclock, mclock8,
- + cpu_time, dtime, ftell, abort
- external lenstr, ctrlc
- integer lenstr
- logical l
- character gerr*80, c*1
- character ctim*25, line*80, lognam*20, wd*1000, line2*80,
- + ddate*8, ttime*10, zone*5, ctim2*25
- integer fstatb (13), statb (13)
- integer *2 i2zero
- integer values(8)
- integer(kind=7) sigret
-
- i = time ()
- ctim = ctime (i)
- WRITE (6,'(A/)') '1 GNU libU77 test at: ' // ctim(:lenstr (ctim))
- write (6,'(A,I3,'', '',I3)')
- + ' Logical units 5 and 6 correspond (FNUM) to'
- + // ' Unix i/o units ', fnum(5), fnum(6)
- if (lnblnk('foo ').ne.3 .or. len_trim('foo ').ne.3) then
- print *, 'LNBLNK or LEN_TRIM failed'
- call abort
- end if
-
- bigi = time8 ()
-
- call ctime (i, ctim2)
- if (ctim .ne. ctim2) then
- write (6, *) '*** CALL CTIME disagrees with CTIME(): ',
- + ctim2(:lenstr (ctim2)), ' vs. ', ctim(:lenstr (ctim))
- call doabort
- end if
-
- j = time ()
- if (i .gt. bigi .or. bigi .gt. j) then
- write (6, *) '*** TIME/TIME8/TIME sequence failures: ',
- + i, bigi, j
- call doabort
- end if
-
- print *, 'Command-line arguments: ', iargc ()
- do i = 0, iargc ()
- call getarg (i, line)
- print *, 'Arg ', i, ' is: ', line(:lenstr (line))
- end do
-
- l= isatty(6)
- line2 = ttynam(6)
- if (l) then
- line = 'and 6 is a tty device (ISATTY) named '//line2
- else
- line = 'and 6 isn''t a tty device (ISATTY)'
- end if
- write (6,'(1X,A)') line(:lenstr(line))
- call ttynam (6, line)
- if (line .ne. line2) then
- print *, '*** CALL TTYNAM disagrees with TTYNAM: ',
- + line(:lenstr (line))
- call doabort
- end if
-
-* regression test for compiler crash fixed by JCB 1998-08-04 com.c
- sigret = signal(2, ctrlc)
-
- pid = getpid()
- WRITE (6,'(A,I10)') ' Process id (GETPID): ', pid
- WRITE (6,'(A,I10)') ' User id (GETUID): ', GETUID ()
- WRITE (6,'(A,I10)') ' Group id (GETGID): ', GETGID ()
- WRITE (6, *) 'If you have the `id'' program, the following call'
- write (6, *) 'of SYSTEM should agree with the above:'
- call flush(6)
- CALL SYSTEM ('echo " " `id`')
- call flush
-
- lognam = 'blahblahblah'
- call getlog (lognam)
- write (6,*) 'Login name (GETLOG): ', lognam(:lenstr (lognam))
-
- wd = 'blahblahblah'
- call getenv ('LOGNAME', wd)
- write (6,*) 'Login name (GETENV of LOGNAME): ', wd(:lenstr (wd))
-
- call umask(0, mask)
- write(6,*) 'UMASK returns', mask
- call umask(mask)
-
- ctim = fdate()
- write (6,*) 'FDATE returns: ', ctim(:lenstr (ctim))
- call fdate (ctim)
- write (6,*) 'CALL FDATE returns: ', ctim(:lenstr (ctim))
-
- j=time()
- call ltime (j, ltarray)
- write (6,'(1x,a,9i4)') 'LTIME returns:', ltarray
- call gmtime (j, ltarray)
- write (6,'(1x,a,9i4)') 'GMTIME returns:', ltarray
-
- call system_clock(count) ! omitting optional args
- call system_clock(count, rate, count_max)
- write(6,*) 'SYSTEM_CLOCK returns: ', count, rate, count_max
-
- call date_and_time(ddate) ! omitting optional args
- call date_and_time(ddate, ttime, zone, values)
- write(6, *) 'DATE_AND_TIME returns: ', ddate, ' ', ttime, ' ',
- + zone, ' ', values
-
- write (6,*) 'Sleeping for 1 second (SLEEP) ...'
- call sleep (1)
-
-c consistency-check etime vs. dtime for first call
- r1 = etime (tarray1)
- r2 = dtime (tarray2)
- if (abs (r1-r2).gt.1.0) then
- write (6,*)
- + 'Results of ETIME and DTIME differ by more than a second:',
- + r1, r2
- call doabort
- end if
- if (.not. issum (r1, tarray1(1), tarray1(2))) then
- write (6,*) '*** ETIME didn''t return sum of the array: ',
- + r1, ' /= ', tarray1(1), '+', tarray1(2)
- call doabort
- end if
- if (.not. issum (r2, tarray2(1), tarray2(2))) then
- write (6,*) '*** DTIME didn''t return sum of the array: ',
- + r2, ' /= ', tarray2(1), '+', tarray2(2)
- call doabort
- end if
- write (6, '(A,3F10.3)')
- + ' Elapsed total, user, system time (ETIME): ',
- + r1, tarray1
-
-c now try to get times to change enough to see in etime/dtime
- write (6,*) 'Looping until clock ticks at least once...'
- do i = 1,1000
- do j = 1,1000
- end do
- call dtime (tarray2, r2)
- if (tarray2(1) .ne. 0. .or. tarray2(2) .ne. 0.) exit
- end do
- call etime (tarray1, r1)
- if (.not. issum (r1, tarray1(1), tarray1(2))) then
- write (6,*) '*** ETIME didn''t return sum of the array: ',
- + r1, ' /= ', tarray1(1), '+', tarray1(2)
- call doabort
- end if
- if (.not. issum (r2, tarray2(1), tarray2(2))) then
- write (6,*) '*** DTIME didn''t return sum of the array: ',
- + r2, ' /= ', tarray2(1), '+', tarray2(2)
- call doabort
- end if
- write (6, '(A,3F10.3)')
- + ' Differences in total, user, system time (DTIME): ',
- + r2, tarray2
- write (6, '(A,3F10.3)')
- + ' Elapsed total, user, system time (ETIME): ',
- + r1, tarray1
- write (6, *) '(Clock-tick detected after ', i, ' 1K loops.)'
-
- call idate (i,j,k)
- call idate (idat)
- write (6,*) 'IDATE (date,month,year): ',idat
- print *, '... and the VXT version (month,date,year): ', i,j,k
- if (i/=idat(2) .or. j/=idat(1) .or. k/=mod(idat(3),100)) then
- print *, '*** VXT and U77 versions don''t agree'
- call doabort
- end if
-
- call date (ctim)
- write (6,*) 'DATE (dd-mmm-yy): ', ctim(:lenstr (ctim))
-
- call itime (idat)
- write (6,*) 'ITIME (hour,minutes,seconds): ', idat
-
- call time(line(:8))
- print *, 'TIME: ', line(:8)
-
- write (6,*) 'SECNDS(0.0) returns: ',secnds(0.0)
-
- write (6,*) 'SECOND returns: ', second()
- call dumdum(r1)
- call second(r1)
- write (6,*) 'CALL SECOND returns: ', r1
-
-* compiler crash fixed by 1998-10-01 com.c change
- if (rand(0).lt.0.0 .or. rand(0).gt.1.0) then
- write (6,*) '*** rand(0) error'
- call doabort()
- end if
-
- i = getcwd(wd)
- if (i.ne.0) then
- call perror ('*** getcwd')
- call doabort
- else
- write (6,*) 'Current directory is "'//wd(:lenstr(wd))//'"'
- end if
- call chdir ('.',i)
- if (i.ne.0) then
- write (6,*) '***CHDIR to ".": ', i
- call doabort
- end if
-
- i=hostnm(wd)
- if(i.ne.0) then
- call perror ('*** hostnm')
- call doabort
- else
- write (6,*) 'Host name is ', wd(:lenstr(wd))
- end if
-
- i = access('/dev/null ', 'rw')
- if (i.ne.0) write (6,*) '***Read/write ACCESS to /dev/null: ', i
- write (6,*) 'Creating file "foo" for testing...'
- open (3,file='foo',status='UNKNOWN')
- rewind 3
- call fputc(3, 'c',i)
- call fputc(3, 'd',j)
- if (i+j.ne.0) write(6,*) '***FPUTC: ', i
-C why is it necessary to reopen? (who wrote this?)
-C the better to test with, my dear! (-- burley)
- close(3)
- open(3,file='foo',status='old')
- call fseek(3,0,0,*10)
- go to 20
- 10 write(6,*) '***FSEEK failed'
- call doabort
- 20 call fgetc(3, c,i)
- if (i.ne.0) then
- write(6,*) '***FGETC: ', i
- call doabort
- end if
- if (c.ne.'c') then
- write(6,*) '***FGETC read the wrong thing: ', ichar(c)
- call doabort
- end if
- i= ftell(3)
- if (i.ne.1) then
- write(6,*) '***FTELL offset: ', i
- call doabort
- end if
- call ftell(3, i)
- if (i.ne.1) then
- write(6,*) '***CALL FTELL offset: ', i
- call doabort
- end if
- call chmod ('foo', 'a+w',i)
- if (i.ne.0) then
- write (6,*) '***CHMOD of "foo": ', i
- call doabort
- end if
- i = fstat (3, fstatb)
- if (i.ne.0) then
- write (6,*) '***FSTAT of "foo": ', i
- call doabort
- end if
- i = stat ('foo', statb)
- if (i.ne.0) then
- write (6,*) '***STAT of "foo": ', i
- call doabort
- end if
- write (6,*) ' with stat array ', statb
- if (statb(6) .ne. getgid ()) then
- write (6,*) 'Note: FSTAT gid wrong (happens on some systems).'
- end if
- if (statb(5) .ne. getuid () .or. statb(4) .ne. 1) then
- write (6,*) '*** FSTAT uid or nlink is wrong'
- call doabort
- end if
- do i=1,13
- if (fstatb (i) .ne. statb (i)) then
- write (6,*) '*** FSTAT and STAT don''t agree on '// '
- + array element ', i, ' value ', fstatb (i), statb (i)
- call abort
- end if
- end do
- i = lstat ('foo', fstatb)
- do i=1,13
- if (fstatb (i) .ne. statb (i)) then
- write (6,*) '*** LSTAT and STAT don''t agree on '//
- + 'array element ', i, ' value ', fstatb (i), statb (i)
- call abort
- end if
- end do
-
-C in case it exists already:
- call unlink ('bar',i)
- call link ('foo ', 'bar ',i)
- if (i.ne.0) then
- write (6,*) '***LINK "foo" to "bar" failed: ', i
- call doabort
- end if
- call unlink ('foo',i)
- if (i.ne.0) then
- write (6,*) '***UNLINK "foo" failed: ', i
- call doabort
- end if
- call unlink ('foo',i)
- if (i.eq.0) then
- write (6,*) '***UNLINK "foo" again: ', i
- call doabort
- end if
-
- call gerror (gerr)
- i = ierrno()
- write (6,'(A,I3,A/1X,A)') ' The current error number is: ',
- + i,
- + ' and the corresponding message is:', gerr(:lenstr(gerr))
- write (6,*) 'This is sent to stderr prefixed by the program name'
- call getarg (0, line)
- call perror (line (:lenstr (line)))
- call unlink ('bar')
-
- print *, 'MCLOCK returns ', mclock ()
- print *, 'MCLOCK8 returns ', mclock8 ()
-
- call cpu_time (d1)
- print *, 'CPU_TIME returns ', d1
-
-C WRITE (6,*) 'You should see exit status 1'
- CALL EXIT(0)
- 99 END
-
-* Return length of STR not including trailing blanks, but always > 0.
- integer function lenstr (str)
- character*(*) str
- if (str.eq.' ') then
- lenstr=1
- else
- lenstr = lnblnk (str)
- end if
- end
-
-* Just make sure SECOND() doesn't "magically" work the second time.
- subroutine dumdum(r)
- r = 3.14159
- end
-
-* Test whether sum is approximately left+right.
- logical function issum (sum, left, right)
- implicit none
- real sum, left, right
- real mysum, delta, width
- mysum = left + right
- delta = abs (mysum - sum)
- width = abs (left) + abs (right)
- issum = (delta .le. .0001 * width)
- end
-
-* Signal handler
- subroutine ctrlc
- print *, 'Got ^C'
- call doabort
- end
-
-* A problem has been noticed, so maybe abort the test.
- subroutine doabort
-* For this version, call the ABORT intrinsic.
- intrinsic abort
- call abort
- end
-
-* Testsuite version only.
-* Don't actually reference the HOSTNM intrinsic, because some targets
-* need -lsocket, which we don't have a mechanism for supplying.
- integer function hostnm(nm)
- character*(*) nm
- nm = 'not determined by this version of u77-test.f'
- hostnm = 0
- end
diff --git a/gcc/testsuite/g77.f-torture/execute/u77-test.x b/gcc/testsuite/g77.f-torture/execute/u77-test.x
index 469732f518d..e4b89008c25 100644
--- a/gcc/testsuite/g77.f-torture/execute/u77-test.x
+++ b/gcc/testsuite/g77.f-torture/execute/u77-test.x
@@ -2,6 +2,9 @@
# link time.
if { [istarget "mmix-knuth-mmixware"]
+ || [istarget "arm*-*-elf"]
+ || [istarget "strongarm*-*-elf"]
+ || [istarget "xscale*-*-elf"]
|| [istarget "cris-*-elf"] } {
set torture_compile_xfail [istarget]
}
diff --git a/gcc/testsuite/g77.f-torture/noncompile/19981216-0.f b/gcc/testsuite/g77.f-torture/noncompile/19981216-0.f
deleted file mode 100644
index 0cc9087d6cb..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/19981216-0.f
+++ /dev/null
@@ -1,89 +0,0 @@
-* Resent-From: Craig Burley <burley@gnu.org>
-* Resent-To: craig@jcb-sc.com
-* X-Delivered: at request of burley on mescaline.gnu.org
-* Date: Wed, 16 Dec 1998 18:31:24 +0100
-* From: Dieter Stueken <stueken@conterra.de>
-* Organization: con terra GmbH
-* To: fortran@gnu.org
-* Subject: possible bug
-* Content-Type: text/plain; charset=iso-8859-1
-* X-Mime-Autoconverted: from 8bit to quoted-printable by mescaline.gnu.org id KAA09085
-* X-UIDL: 72293bf7f9fac8378ec7feca2bccbce2
-*
-* Hi,
-*
-* I'm about to compile a very old, very ugly Fortran program.
-* For one part I got:
-*
-* f77: Internal compiler error: program f771 got fatal signal 6
-*
-* instead of any detailed error message. I was able to break down the
-* problem to the following source fragment:
-*
-* -------------------------------------------
- PROGRAM WAP
-
- integer*2 ios
- character*80 name
-
- name = 'blah'
- open(unit=8,status='unknown',file=name,form='formatted',
- F iostat=ios)
-
- END
-* -------------------------------------------
-*
-* The problem seems to be caused by the "integer*2 ios" declaration.
-* So far I solved it by simply using a plain integer instead.
-*
-* I'm running gcc on a Linux system compiled/installed
-* with no special options:
-*
-* -> g77 -v
-* g77 version 0.5.23
-* Driving: g77 -v -c -xf77-version /dev/null -xnone
-* Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/2.8.1/specs
-* gcc version 2.8.1
-* /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/2.8.1/cpp -lang-c -v -undef
-* -D__GNUC__=2 -D__GNUC_MINOR__=8 -D__ELF__ -D__unix__ -D__linux__
-* -D__unix -D__linux -Asystem(posix) -D_LANGUAGE_FORTRAN -traditional
-* -Di386 -Di686 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__
-* -D__i686__ -Asystem(unix) -Acpu(i386) -Amachine(i386) /dev/null
-* /dev/null
-* GNU CPP version 2.8.1 (i386 GNU/Linux with ELF)
-* #include "..." search starts here:
-* #include <...> search starts here:
-* /usr/local/include
-* /usr/i686-pc-linux-gnulibc1/include
-* /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/2.8.1/include
-* /usr/include
-* End of search list.
-* /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/2.8.1/f771 -fnull-version
-* -quiet -dumpbase g77-version.f -version -fversion -o /tmp/cca24911.s
-* /dev/null
-* GNU F77 version 2.8.1 (i686-pc-linux-gnulibc1) compiled by GNU C version
-* 2.8.1.
-* GNU Fortran Front End version 0.5.23
-* as -V -Qy -o /tmp/cca24911.o /tmp/cca24911.s
-* GNU assembler version 2.8.1 (i486-linux), using BFD version 2.8.1
-* ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.1 -o /tmp/cca24911
-* /tmp/cca24911.o /usr/lib/crt1.o /usr/lib/crti.o
-* /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/2.8.1/crtbegin.o
-* -L/usr/lib/gcc-lib/i686-pc-linux-gnulibc1/2.8.1 -L/usr -lg2c -lm -lgcc
-* -lc -lgcc /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/2.8.1/crtend.o
-* /usr/lib/crtn.o
-* /tmp/cca24911
-* __G77_LIBF77_VERSION__: 0.5.23
-* @(#)LIBF77 VERSION 19970919
-* __G77_LIBI77_VERSION__: 0.5.23
-* @(#) LIBI77 VERSION pjw,dmg-mods 19980405
-* __G77_LIBU77_VERSION__: 0.5.23
-* @(#) LIBU77 VERSION 19970919
-*
-*
-* Regards, Dieter.
-* --
-* Dieter Stüken, con terra GmbH, Münster
-* stueken@conterra.de stueken@qgp.uni-muenster.de
-* http://www.conterra.de/ http://qgp.uni-muenster.de/~stueken
-* (0)251-980-2027 (0)251-83-334974
diff --git a/gcc/testsuite/g77.f-torture/noncompile/19990218-1.f b/gcc/testsuite/g77.f-torture/noncompile/19990218-1.f
deleted file mode 100644
index 25b7c5b2b52..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/19990218-1.f
+++ /dev/null
@@ -1,13 +0,0 @@
- double precision function fun(a,b)
- double precision a,b
- print*,'in sub: a,b=',a,b
- fun=a*b
- print*,'in sub: fun=',fun
- return
- end
- program test
- double precision a,b,c
- data a,b/1.0d-46,1.0d0/
- c=fun(a,b)
- print*,'in main: fun=',c
- end
diff --git a/gcc/testsuite/g77.f-torture/noncompile/19990826-4.f b/gcc/testsuite/g77.f-torture/noncompile/19990826-4.f
deleted file mode 100644
index 86d2a939064..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/19990826-4.f
+++ /dev/null
@@ -1,648 +0,0 @@
-* Culled from 970528-1.f in Burley's g77 test suite. Copyright
-* status not clear. Feel free to chop down if the bug is still
-* reproducible (see end of test case for how bug shows up in gdb
-* run of f771). No particular reason it should be a noncompile
-* case, other than that I didn't want to spend time "fixing" it
-* to compile cleanly (with -O0, which works) while making sure the
-* ICE remained reproducible. -- burley 1999-08-26
-
-* Date: Mon, 26 May 1997 13:00:19 +0200 (GMT+0200)
-* From: "D. O'Donoghue" <dod@da.saao.ac.za>
-* To: Craig Burley <burley@gnu.ai.mit.edu>
-* Cc: fortran@gnu.ai.mit.edu
-* Subject: Re: g77 problems
-
- program dophot
- parameter (napple = 4)
- common /window/nwindo,ixwin(50),iywin(50),iboxwin(50),itype(50)
- common/io/luout,ludebg
- common/search/nstot,thresh
- common /fitparms / acc(npmax),alim(npmax),mit,mpar,mfit1,
- + mfit2,ind(npmax)
- common /starlist/ starpar(npmax,nsmax), imtype(nsmax),
- 1shadow(npmax,nsmax),shaderr(npmax,nsmax),idstr(nsmax)
- common /aperlist/ apple(napple ,nsmax)
- common /parpred / ava(npmax)
- common /unitize / ufactor
- common /undergnd/ nfast, nslow
- common/bzero/ scale,zero
- common /ctimes / chiimp, apertime, filltime, addtime
- common / drfake / needit
- common /mfit/ psfpar(npmax),starx(nfmax),stary(nfmax),xlim,ylim
- common /vers/ version
- logical needit,screen,isub,loop,comd,burn,wrtres,fixedxy
- logical fixed,piped,debug,ex,clinfo
- character header*5760,rhead*2880
- character yn*1,version*40,ccd*4,infile*20
- character*30 numf,odir,record*80
- integer*2 instr(8)
- character*800 line
- external pseud0d, pseud2d, pseud4d, pseudmd, shape
-C
-C Initialization
- data burn, fixedxy,fixed, piped
- + /.false.,.false.,.false.,.false./
- data needit,screen,comd,isub
- + /.true.,.false.,.true.,.false. /
- data acc / .01, -.03, -.03, .01, .03, .1, .03 /
- data alim / -1.0e8, 2*-1.0e3, -1.0e8, 3*-1.0e3 /
-C
- version = 'DoPHOT Version 1.0 LINUX May 97 '
- debug=.false.
- clinfo=.false.
- line(1:800) = ' '
- odir = ' '
-C
-C
-C Read default tuneable parameters
- call tuneup ( nccd, ccd, piped, debug )
- version(33:36) = ccd(1:4)
-C
-
- ludebg=6
- if(piped)then
- yn='n'
- else
- write(*,'(''****************************************'')')
- write(*,1000) version
- write(*,'(''****************************************''//)')
-C
- write(*,'(''Screen output (y/[n])? '',$)')
- read(*,1000) yn
- end if
- if(yn.eq.'y'.or.yn.eq.'Y') then
- screen=.true.
- luout=6
- else
- luout=2
- end if
-C
- if(piped)then
- yn='y'
- else
- write(*,'(''Batch mode ([y]/n)? '',$)')
- read(*,1000) yn
- end if
- if(yn.eq.'n'.or.yn.eq.'N') comd = .false.
-C
- if(.not.comd) then
- write(*,
- * '(''Do you want windowing ([y]/n)? '',$)')
- read(*,1000)yn
- iwindo=1
- if(yn.eq.'n'.or.yn.eq.'N')then
- nwindo=0
- iwindo=0
- end if
-C
- write(*,
- * '(''Star classification info (y/[n]) ?'',$)')
- read(*,1000)yn
- clinfo=.false.
- if(yn.eq.'y'.or.yn.eq.'Y')clinfo=.true.
-C
- write(*,
- * '(''Create a star-subtracted frame (y/[n])? '',$)')
- read(*,1000) yn
- if(yn.eq.'y'.or.yn.eq.'Y') isub = .true.
-C
- write(*,'(''Apply after-burner (y/[n])? '',$)')
- read(*,1000) yn
- if ( yn.eq.'y'.or.yn.eq.'Y' ) burn = .true.
- wrtres = burn
-C
- write(*,'(''Read from fixed (X,Y) list (y/[n])? '',$)')
- read(*,1000) yn
- if ( yn.eq.'y'.or.yn.eq.'Y' ) then
- fixedxy = .true.
- fixed = .true.
- burn = .true.
- wrtres = .true.
- endif
- endif
- iopen=0
-C
-C This is the start of the loop over the input files
-c
- iframe=0
- open(10,file='timing',status='unknown',access='append')
-
-1 ifit = 0
- iapr = 0
- itmn = 0
- model = 1
- xc = 0.0
- yc = 0.0
- rc = 0.0
- ibr = 0
- ixy = 0
-C
- iframe=iframe+1
- tgetpar=0.0
- tsearch=0.0
- tshape=0.0
- timprove=0.0
-C
-C Batch mode ...
-
- if ( comd ) then
- if(iopen.eq.0)then
- iopen=1
- open(11,file='dophot.bat',status='old',err=995)
- end if
- read(11,1000,end=999)infile
-c now read in the parameter instructions. these are:
-c instr(1) : if 1, specifies uncrowded field, otherwise crowded
-c instr(2) : if 1, specifies sequential frames of same field
-c with a window around the stars of interest -
-c all other objects are ignored
-c instr(3) : if 0, takes cmin from dophot.inp (via tuneup)
-c if>0, sets cmin=instr(3)
-c instr(4) : if 0, does nothing
-c if 1, then opens a file called classifications
-c sets clinfo to .true. and writes out the star
-c typing info to this file
-c instr(5) : Delete the shd.nnnnnnn file
-c instr(6) : Delete the out.nnnnnnn file
-c instr(7) : Delete the input frame
-c instr(8) : Create a star-subtracted frame
- read(11,*)instr
- read(11,*)ifit,iapr,tmn,model,xc,yc,rc,ibr,ixy
- nocrwd = instr(1)
- iwindo=instr(2)
- if(iwindo.eq.0)nwindo=0
- itmn=tmn
- if ( instr(3).gt.0 ) cmin=instr(3)
- clinfo=.false.
- if ( instr(4).gt.0 )then
- clinfo=.true.
- open(12,file='classifications',status='unknown')
- ludebg=12
- end if
- if ( instr(8).ne.0 ) then
- isub = .true.
- else
- isub = .false.
- endif
-C
- if(ibr.ne.0) burn = .true.
- if(ixy.ne.0) then
- fixedxy = .true.
- fixed = .true.
- burn = .true.
- goto 20
- endif
- if(iwindo.eq.0)then
- write(6,10)iframe,infile(1:15)
- 10 format(' ***** DoPHOT-ing frame ',i4,': ',a)
- if(ludebg.eq.12)write(ludebg,11)iframe,infile(1:15)
- 11 format(////' ',62('*')/
- * ' * DoPHOT-ing frame ',i4,': ',a,
- * ' *'/' ',62('*'))
- end if
- if(iwindo.eq.1)then
- write(6,12)iframe,infile(1:15)
- 12 format(' ***** DoPHOT-ing frame ',i4,': ',a,
- * ' - Windowed *****')
- if(ludebg.eq.12)write(ludebg,13)iframe,infile(1:15)
- 13 format(////' ',62('*')/
- * ' * DoPHOT-ing frame ',i4,': ',a,
- * ' - Windowed *'/2x,62('*'))
- end if
-C
-C Interactive...
- else
- write(*,'(''Image name: '',$)')
- read(*,1000) infile
- if(infile(1:1).eq.' ') goto 999
-1000 format(a)
- write(*,'(''Crowded field mode ([y]/n) ? '',$)')
- read(*,1000)yn
- nocrwd=0
- if(yn.eq.'n'.or.yn.eq.'N')nocrwd=1
- if(.not.fixed) then
- write(*,1001)
-1001 format('Sky model ([1]=Plane, 2=Power, 3=Hubble)? ',$)
- read(*,1000)record
- if(record.ne.' ')then
- read(record,*) model
- else
- model=1
- end if
- else
- burn=.true.
- goto 20
- endif
- endif
-C
-C if windowing, open the file and read the window
- if(iwindo.eq.1)then
- inquire(file='windows',exist=ex)
- if(.not.ex)go to 997
- if(iframe.eq.1)open(9,file='windows',status='old')
- nwindo=0
- 2 read(9,*,end=3)intype,inx,iny,inbox
- nwindo=nwindo+1
- if(nwindo.gt.50)then
- print *,'too many windows - max = 50'
- stop
- end if
- ixwin(nwindo)=inx
- iywin(nwindo)=iny
- iboxwin(nwindo)=inbox
- itype(nwindo)=intype
- go to 2
-
- 3 rewind 9
- if(screen)print 4,(itype(j),ixwin(j),iywin(j),iboxwin(j),
- * j=1,nwindo)
- 4 format(' Windows: Type X Y Size'/
- * (I13,i6,i5,i5))
- end if
-
- t1 = cputime(0.0)
-C
-C Read FITS frame.
- call getfits(1,infile,header,nhead,nfast,nslow,numf,nc,line,ccd)
-C
-C Ignore frame if not the correct chip
- if(nc.lt.0) goto 900
-C
-C Estimate starting PSF parameters.
- 15 call getparams(nfast,nslow,gxwid,gywid,skyval,tmin,tmax,
- * iframe)
- tgetpar = cputime(t1) + tgetpar
- if(debug)write(ludebg,16)iframe,skyval,gxwid,gywid,tmin,tmax
- 16 format(' Getparams on frame ',i4,' sky ',f6.1,' gxwid ',f5.1,
- * ' gywid ',f5.1,' tmin ',f5.1,' tmax ',f5.1)
-C
-C Initialize
- do j=1,nsmax
- imtype(j) = 0
- do i=1,npmax
- shadow(i,j)=0.
- shaderr(i,j)=0.
- enddo
- enddo
-C
- skyguess=skyval
- tfac = 1.0
-C Use 4.5 X SD as fitting width
- fitr=fitfac*(gxwid*asprat*gywid)**0.25 + 0.5
- i=fitr
- irect(1)=i
- irect(2)=fitr/asprat
-C Use 4/3 X FitFac X SD as aperture width
- gmax = asprat*gywid
- if(gxwid.gt.gmax) gmax=gxwid
- aprw = 1.33*fitfac*sqrt(gmax) + 0.5
- i = aprw
- arect(1) = i
- i = aprw/asprat + 0.1
- arect(2) = i
-C
- if(irect(1).gt.50) irect(1)=50
- if(irect(2).gt.50) irect(2)=50
- if(arect(1).gt.45.) arect(1)=45.
- if(arect(2).gt.45.) arect(2)=45.
-C
- if (screen) call htype(line,skyval,.false.,fitr,ngr,ncon)
-C
-C Prompt for further information
- if ( .not.comd ) then
- write(*,1002)
- 1002 format(/'The above are the inital parameters DoPHOT'/
- * 'has found. You can change them now or accept'/
- * 'the values in [ ] by pressing enter'/)
-
- write(*,1004)tmin
- 1004 format('Enter Tmin: threshold for star detection',
- * ' [',f5.1,'] ',$)
- read(*,1000)record
- if(record.ne.' ')read(record,*)tmin
-
- write(*,1005)cmin
- 1005 format('Enter Cmin: threshold for PSF stars',
- * ' [',f5.1,'] ',$)
- read(*,1000)record
- if(record.ne.' ')read(record,*)cmin
-
- write(*,1006)
- 1006 format('Do you want to fix the aperture mag size ?',
- * ' (y/[n]) ')
- read(*,1000)record
- if(record.eq.'y'.or.record.eq.'Y')then
- write(*,1007)
- 1007 format('Enter the size in pixels: ',$)
- read(*,*)iapr
- if(iapr.gt.0) then
- arect(1)=iapr
- i = iapr/asprat + 0.1
- arect(2)=i
- end if
- endif
-C
- write(*,1008)
- 1008 format('Satisfied with other input parameters ? ([y]/n)?',$)
- read(*,1000) yn
- if(yn.eq.'n'.or.yn.eq.'N')then
- yn='n'
- else
- yn='y'
- end if
- if(.not.(yn.eq.'y'.or.yn.eq.'Y') ) call input
- else
- if ( ifit.ne.0 ) then
- irect(1)=ifit
- irect(2)=(ifit/asprat + 0.1)
- endif
- if ( iapr.ne.0 ) then
- arect(1)=iapr
- i = iapr/asprat + 0.1
- arect(2)=i
- endif
- if ( itmn.ne.0 ) tmin = itmn
- if ( .not.(xc.eq.0.0.and.yc.eq.0.0) ) then
- xcen = xc
- ycen = yc
- endif
- endif
-C
-C--------------------------------
-C
-C
- call setup ( numf,nc,screen,line,skyval,fitr,ngr,ncon,
- +nfast, nslow )
-C
-C if the uncrowded field option has been chosen, jump
-C straight to the minimum threshold
-C
- if(nocrwd.eq.1)tmax=tmin
-C
-C Adjust tfac so that thresh ends precisely on Tmin.
- if(tmin/tmax .gt. 0.999) then
- thresh = tmin
- tfac = 1.
- else
- thresh = tmax
- xnum = alog10(tmax/tmin)/alog10(2.**tfac)
- if(xnum.gt.1.5) then
- xnum = float(nint(xnum))
- else if(xnum.ge.1) then
- xnum = 2.0
- else
- xnum = 1.0
- endif
- tfac = alog10(tmax/tmin)/alog10(2.)/xnum
- endif
-C
-C------------------------------------------------------------------------
-C
-C This is the BIG LOOP which searches the frame for stars
-C with intensities > thresh.
-C
-C-----------------------------------------------------------------------
-C
- loop = .true.
- nstot = 0
- do while ( loop )
- loop = thresh/tmin .ge. 1.01
- write(luout,1050) thresh
-1050 format(/20('-')/'THRESHOLD: ', f10.3)
- if(ludebg.eq.12)write(ludebg,1050) thresh
-C
-C Fit given model to sky values.
-C
- call varipar(nstot, nfast, nslow )
- t1 = cputime(0.0)
-C
-C Identifies potential objects in cleaned array IMG
- nstar = isearch( pseud2d, nfast, nslow , clinfo)
- tsearch = cputime(t1) + tsearch
-C
- if ( (nstar .ne. 0).or.(xnum.lt.1.5) ) then
-C
-C Performs 7-parameter PSF fit and determines nature of object.
- t1 = cputime(0.0)
- call shape(pseud2d,pseud4d,nfast,nslow,clinfo)
- tshape = cputime(t1) + tshape
-C
-C Computes average sky values etc from star list
- call paravg
- t1 = cputime(0.0)
-C
-C Computes 4-parameter fits for all stellar objects using
-C new average shape parameters.
- call improve(pseud2d,nfast,nslow,clinfo)
- timprove = cputime(t1) + timprove
- end if
-C
-C Calculate aperture photometry on last pass.
- if(.not.loop) call aper ( pseud2d, nstot, nfast, nslow )
-C
- totaltime = (tgetpar+tsearch+tshape+timprove)
- write(3,1060) totaltime
- write(4,1060) totaltime
- write(luout,1060) totaltime
-1060 format('Total CPU time consumed:',F10.2,' seconds.')
- write(10,1070)infile,tgetpar,tsearch,tshape,timprove,
- * totaltime
-1070 format(a20,' T(getp/f)',f5.1,' T(search)',f5.1,
- * ' T(shape)',f5.1,' T(improve)',f5.1,
- * ' Total',f6.1)
- call title (line,skyval,.false.,fitr,ngr,ncon,strint,ztot,nums)
- rewind(2)
- rewind(3)
- rewind(4)
-C
- call output ( line )
-C
-C Now reduce the threshold and loop back
-C
- thresh = thresh/2.**tfac
- end do
-C
-C--------- END OF BIG LOOP ---------------------------------------
-C
-C If after-burner required, residuals from analytic PSF are computed
-C and stored in RES.
-C
-20 if ( burn ) then
-C
-C If using a fixed (X,Y) coordinate list, read it.
- if (fixed) then
-C Read the image frame
- call getfits(1,infile,header,nhead,nfast,nslow,numf,nc,line)
-C
-C Initialize arrays, open files etc.
- call setup ( numf,nc,screen,line,skyval,fitr,ngr,ncon,
- +nfast, nslow )
-C
-C Read the XY list
- write(luout,'(''Reading XY list ...'')')
- call xylist(numf, nc, ios )
- if(ios.ne.0) then
- fixed = .false.
- write(luout,'(''SXY file absent or incorrect...'')')
- goto 15
- endif
-C
- call htype(line,skyval,.false.,fitr,ngr,ncon)
-C
-C Remove good stars
- write(luout,'(''Cleaning frame of stars: '',i8)') nstot
- call clean ( pseud2d, nstot, nfast, nslow, -1)
-C
-C Calculate aperture photometry
-C call aper ( pseud2d, nstot, nfast, nslow )
- else
- rewind(3)
- rewind(4)
- endif
-C
-C-----------------------
-C Flag all stars close together in groups. Keep making the distance
-C criterion FITR smaller until the maximum number in a group is less
-C than NFMAX
-C
- fitr = amax1(arect(1),arect(2))
- fitr = fitr + 2.0
- nmax = 10000
- write(*,'(''Regrouping ...'')')
-C
- do while ( nmax.gt.nfmax )
- fitr = fitr - 1.0
- write(luout,'(''Min distance ='',f8.1)') fitr
- call regroup( fitr, ngr, nmax )
- enddo
-C
- xlim = irect(1)/2
- ylim = irect(2)/2
-C
-C Calculate normalized PSF residual from PSEUD2D
- call getres (pseud0d,pseud2d,strint,rmn,rmx,nfast,nslow,irect,
- +arect,ztot,nums)
- if(nums.eq.0) then
- write(luout,'(''No suitable PSF stars!'')')
- goto 30
- endif
-C
- write(luout,'(/''AFTERBURNER tuned ON!'')')
-C
-C Fit multiple stars in a group with enhanced PSF using box size IRECT.
- call mulfit( pseud2d,pseudmd,ngr,ncon,nfast,nslow,irect )
-C
-C Re-calculate aperture photometry
- call aperm ( pseudmd, nstot, nfast, nslow )
-C
- call skyadj ( nstot )
-C
- call title (line,skyval,.true.,fitr,ngr,ncon,strint,ztot,nums)
- call output ( line )
- endif
-C---------------------
-C
-C----- This section skipped if PSF residual not written out ------
-C
-30 if( isub ) then
-C
-C Write final Cleaned array.
- infile = 'x'//numf(1:nc)//'.fits'
- call putfits(2,infile,header,nhead,nfast,nslow)
- close(2)
-C
-C If afterburner used, then residual array also written out.
-C Find suitable scale for writing residual PSF to FITS "R" file.
-C
- if ( wrtres ) then
- scale=20000.0/(rmx-rmn)
- zero=-scale*rmn
- do j=-nres,nres
- jj=nres+j+1
- do i=-nres,nres
- ii=nres+i+1
- big(ii,jj)=scale*res(i,j)+zero
- enddo
- enddo
- nx=2*nres+1
-C
- infile = 'r'//numf(1:nc)//'.fits'
- zer=-zero/scale
- scl=1.0/scale
-C
-C Create a FITS header for the normalized PSF residual image
- call sethead(rhead,numf,nx,nx,zer,scl)
- scale=1.0
- zero=0.0
-C Write the normalized PSF residual image
- call putfits(2,infile,rhead,1,nx,nx)
- close(2)
- endif
-C
- end if
-C
-C
-900 close(1)
- close(3)
- close(4)
- if ( .not.screen ) close(luout)
- if(comd) then
- if(instr(5).eq.1)call system('rm shd.'//numf(1:nc))
- if(instr(6).eq.1)call system('rm out.'//numf(1:nc))
- n=1
- do while(infile(n:n).ne.' ')
- n=n+1
- end do
- if(instr(7).eq.1)call system('rm '//infile(1:n-1))
- end if
- fixed = fixedxy
- goto 1
-C
-995 print 996
-996 format(/'*** Fatal error ***'/
- * 'You asked for batch processing but'/
- * 'I cant open the "dophot.bat" file.'/
- * 'Please make one (using batchdophot)'/
- * 'and restart DoPHOT'/)
- go to 999
-
-C
-997 print 998
-998 format(/'*** Fatal error ***'/
- * 'You asked for "windowed" processing'/
- * 'but I cant open the "windows" file.'/
- * 'Please make one and restart DoPHOT'/)
-
-999 call exit(0)
- end
-
-* (gdb) r
-* Starting program: /home3/craig/gnu/f77-e/gcc/f771 -quiet < ../../play/19990826-4.f -O
-* [...]
-* Breakpoint 2, fancy_abort (
-* file=0x8285220 "../../g77-e/gcc/config/i386/i386.c", line=4399,
-* function=0x82860df "output_fp_cc0_set") at ../../g77-e/gcc/rtl.c:1010
-* (gdb) up
-* #1 0x8222fab in output_fp_cc0_set (insn=0x8382324)
-* at ../../g77-e/gcc/config/i386/i386.c:4399
-* (gdb) p insn
-* $1 = 0x3a
-* (gdb) up
-* #2 0x8222b81 in output_float_compare (insn=0x8382324, operands=0x82acc60)
-* at ../../g77-e/gcc/config/i386/i386.c:4205
-* (gdb) p insn
-* $2 = 0x8382324
-* (gdb) whatis insn
-* type = rtx
-* (gdb) pr
-* (insn 2181 2180 2191 (parallel[
-* (set (cc0)
-* (compare (reg:SF 8 %st(0))
-* (mem:SF (plus:SI (reg:SI 6 %ebp)
-* (const_int -9948 [0xffffd924])) 0)))
-* (clobber (reg:HI 0 %ax))
-* ] ) 29 {*cmpsf_cc_1} (insn_list 2173 (insn_list 2173 (nil)))
-* (expr_list:REG_DEAD (reg:DF 8 %st(0))
-* (expr_list:REG_UNUSED (reg:HI 0 %ax)
-* (nil))))
-* (gdb)
diff --git a/gcc/testsuite/g77.f-torture/noncompile/19990905-1.f b/gcc/testsuite/g77.f-torture/noncompile/19990905-1.f
deleted file mode 100644
index 026d05e4b3c..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/19990905-1.f
+++ /dev/null
@@ -1,8 +0,0 @@
-* =foo7.f in Burley's g77 test suite.
- subroutine x
- real a(n)
- common /foo/n
- continue
- entry y(a)
- call foo(a(1))
- end
diff --git a/gcc/testsuite/g77.f-torture/noncompile/9263.f b/gcc/testsuite/g77.f-torture/noncompile/9263.f
deleted file mode 100644
index e68b3e0a65f..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/9263.f
+++ /dev/null
@@ -1,7 +0,0 @@
- PARAMETER (Q=1)
- PARAMETER (P=10)
- INTEGER C(10),D(10),E(10),F(10)
- DATA (C(I),I=1,P) /10*10/ ! TERMINAL NOT INTEGER
- DATA (D(I),I=Q,10) /10*10/ ! START NOT INTEGER
- DATA (E(I),I=1,10,Q) /10*10/ ! INCREMENT NOT INTEGER
- END
diff --git a/gcc/testsuite/g77.f-torture/noncompile/970626-2.f b/gcc/testsuite/g77.f-torture/noncompile/970626-2.f
deleted file mode 100644
index c1e2348646f..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/970626-2.f
+++ /dev/null
@@ -1,4 +0,0 @@
- SUBROUTINE A(A,ALPHA,IA)
- COMPLEX A(IA,*), ALPHA(*)
- ALPHA(I)=A(I,I).ZERO)
- END
diff --git a/gcc/testsuite/g77.f-torture/noncompile/980615-0.f b/gcc/testsuite/g77.f-torture/noncompile/980615-0.f
deleted file mode 100644
index 316969f6aa8..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/980615-0.f
+++ /dev/null
@@ -1,10 +0,0 @@
-* Fixed by JCB 1998-07-25 change to stc.c.
-
-* Date: Thu, 11 Jun 1998 22:35:20 -0500
-* From: Ian A Watson <WATSON_IAN_A@lilly.com>
-* Subject: crash
-*
- CaLL foo(W)
- END
- SUBROUTINE foo(W)
- yy(I)=A(I)Q(X)
diff --git a/gcc/testsuite/g77.f-torture/noncompile/980616-0.f b/gcc/testsuite/g77.f-torture/noncompile/980616-0.f
deleted file mode 100644
index bd5e74022a3..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/980616-0.f
+++ /dev/null
@@ -1,8 +0,0 @@
-* Fixed by 1998-07-11 equiv.c change.
-* ../../gcc/f/equiv.c:666: failed assertion `ffebld_op (subscript) == FFEBLD_opCONTER'
-
-* Date: Mon, 15 Jun 1998 21:54:32 -0500
-* From: Ian A Watson <WATSON_IAN_A@lilly.com>
-* Subject: Mangler Crash
- EQUIVALENCE(I,glerf(P))
- COMMON /foo/ glerf(3)
diff --git a/gcc/testsuite/g77.f-torture/noncompile/check0.f b/gcc/testsuite/g77.f-torture/noncompile/check0.f
deleted file mode 100644
index fc3c6ca730e..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/check0.f
+++ /dev/null
@@ -1,11 +0,0 @@
-CCC Abort fixed by:
-CCC1998-04-21 Jim Wilson <wilson@cygnus.com>
-CCC
-CCC * stmt.c (check_seenlabel): When search for line number note for
-CCC warning, handle case where there is no such note.
- logical l(10)
- integer i(10)
- goto (10,20),l
- goto (10,20),i
- 10 stop
- 20 end
diff --git a/gcc/testsuite/g77.f-torture/noncompile/noncompile.exp b/gcc/testsuite/g77.f-torture/noncompile/noncompile.exp
deleted file mode 100644
index fadd1fbbe5a..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/noncompile.exp
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 1988, 90, 91, 92, 97, 1998 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This file was written by Jeff Law. (law@cs.utah.edu)
-
-#
-# These tests come from Torbjorn Granlund (tege@cygnus.com)
-# C torture test suite.
-#
-
-load_lib mike-g77.exp
-
-# Test check0.f
-prebase
-
-set src_code check0.f
-# Not really sure what the error should be here...
-set compiler_output ".*:8.*:9"
-
-set groups {passed gcc-noncompile}
-
-postbase $src_code $run $groups
-
diff --git a/gcc/testsuite/g77.f-torture/noncompile/select_no_compile.f b/gcc/testsuite/g77.f-torture/noncompile/select_no_compile.f
deleted file mode 100644
index f7dad339a81..00000000000
--- a/gcc/testsuite/g77.f-torture/noncompile/select_no_compile.f
+++ /dev/null
@@ -1,10 +0,0 @@
- integer*1 one
- integer*2 two
- parameter (one=1)
- parameter (two=2)
- select case (I)
- case (one)
- case (two)
- end select
- end
-
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000211-3.c b/gcc/testsuite/gcc.c-torture/compile/20000211-3.c
index 7e43c8ad467..7a02b685c4a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000211-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000211-3.c
@@ -3,7 +3,7 @@ void f_clos(int x)
{
switch(x) {
default:
- mumble:
+ mumble:;
}
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000518-1.c b/gcc/testsuite/gcc.c-torture/compile/20000518-1.c
index fda44b657cc..d2087796a84 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000518-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000518-1.c
@@ -6,7 +6,7 @@ extern __inline__ void test()
callit1(&&l1);
-l1:
+l1:;
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001109-1.c b/gcc/testsuite/gcc.c-torture/compile/20001109-1.c
index cce8047ae8a..6e513c9563f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20001109-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20001109-1.c
@@ -1,3 +1,5 @@
+/* This does not work on NetWare, which has a default of 1-byte alignment. */
+/* { dg-xfail-if "" { "*-*-netware*" } { "*" } { "" } } */
typedef struct _foo foo;
extern foo bar;
struct _foo {
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001109-2.c b/gcc/testsuite/gcc.c-torture/compile/20001109-2.c
index a23e56bd34b..1448215c578 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20001109-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20001109-2.c
@@ -1,3 +1,5 @@
+/* This does not work on NetWare, which has a default of 1-byte alignment. */
+/* { dg-xfail-if "" { "*-*-netware*" } { "*" } { "" } } */
extern struct foo bar;
struct foo {
int a;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010516-1.c b/gcc/testsuite/gcc.c-torture/compile/20010516-1.c
deleted file mode 100644
index 7732812cfb1..00000000000
--- a/gcc/testsuite/gcc.c-torture/compile/20010516-1.c
+++ /dev/null
@@ -1,5 +0,0 @@
-foo()
-{
- char d;
- asm volatile ( "" :: "m"(&d));
-}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010518-1.c b/gcc/testsuite/gcc.c-torture/compile/20010518-1.c
index 4ab40d8e226..0a1b284b447 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010518-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010518-1.c
@@ -25,7 +25,7 @@ enum rtx_code
UNKNOWN,
NIL,
REG,
- LAST_AND_UNUSED_RTX_CODE
+ LAST_AND_UNUSED_RTX_CODE = 256
};
typedef struct
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
index 488a1b403d3..ef24e1cf139 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
@@ -1,5 +1,5 @@
/* The array is too big. */
-/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" } { "" } } */
+/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
/* PR c/6957
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020910-1.c b/gcc/testsuite/gcc.c-torture/compile/20020910-1.c
index 31398ea3d45..092809b769c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020910-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020910-1.c
@@ -1,3 +1,8 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int a;
+#else
unsigned int x0 = 0;
typedef struct {
@@ -11,4 +16,4 @@ static void foo (void)
{
yy.field1 = (unsigned int ) (&x0);
}
-
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021108-1.c b/gcc/testsuite/gcc.c-torture/compile/20021108-1.c
index c421639035a..01b6e4ed7aa 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20021108-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20021108-1.c
@@ -3,5 +3,5 @@ main()
{
l1:
return &&l1-&&l2;
-l2:
+l2:;
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021123-1.c b/gcc/testsuite/gcc.c-torture/compile/20021123-1.c
deleted file mode 100644
index dd2aa7e09dd..00000000000
--- a/gcc/testsuite/gcc.c-torture/compile/20021123-1.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* PR c/8439 */
-/* Verify that GCC properly handles null increments. */
-
-struct empty {
-};
-
-void foo(struct empty *p)
-{
- p++;
-}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021123-2.c b/gcc/testsuite/gcc.c-torture/compile/20021123-2.c
deleted file mode 100644
index 423f8ec1964..00000000000
--- a/gcc/testsuite/gcc.c-torture/compile/20021123-2.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* PR c/8518 */
-/* Contributed by Volker Reichelt. */
-
-/* Verify that GCC doesn't get confused by the
- redefinition of an extern inline function. */
-
-extern int inline foo () { return 0; }
-extern int inline bar () { return 0; }
-static int inline bar () { return foo(); }
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021123-3.c b/gcc/testsuite/gcc.c-torture/compile/20021123-3.c
deleted file mode 100644
index 51f0e257dfd..00000000000
--- a/gcc/testsuite/gcc.c-torture/compile/20021123-3.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* PR c/8518 */
-/* Contributed by Volker Reichelt. */
-
-/* Verify that GCC doesn't get confused by the
- redefinition of an extern inline function. */
-
-extern int inline foo () { return 0; }
-extern int inline bar () { return 0; }
-static int bar () { return foo(); }
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021123-4.c b/gcc/testsuite/gcc.c-torture/compile/20021123-4.c
deleted file mode 100644
index d4306b89b99..00000000000
--- a/gcc/testsuite/gcc.c-torture/compile/20021123-4.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PR c/8588 */
-/* Contributed by Volker Reichelt. */
-
-/* Verify that GCC converts integer constants
- in shift operations. */
-
-void foo()
-{
- unsigned int i, j;
- j = (i >> 0xf0);
-}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030405-1.c b/gcc/testsuite/gcc.c-torture/compile/20030405-1.c
index 2e61f1fa3ff..f84e606c045 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20030405-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20030405-1.c
@@ -1,58 +1,30 @@
-/* PR optimization/10024 */
-extern int *allegro_errno;
-typedef long fixed;
-extern inline int
-fixfloor (fixed x)
-{
- if (x >= 0)
- return (x >> 16);
- else
- return ~((~x) >> 16);
-}
-extern inline int
-fixtoi (fixed x)
-{
- return fixfloor (x) + ((x & 0x8000) >> 15);
-}
-extern inline fixed
-ftofix (double x)
-{
- if (x > 32767.0)
- {
- *allegro_errno = 34;
- return 0x7FFFFFFF;
- }
- if (x < -32767.0)
- {
- *allegro_errno = 34;
- return -0x7FFFFFFF;
- }
- return (long) (x * 65536.0 + (x < 0 ? -0.5 : 0.5));
-}
-extern inline double
-fixtof (fixed x)
-{
- return (double) x / 65536.0;
-}
-extern inline fixed
-fixdiv (fixed x, fixed y)
+/* When compiled with -pedantic, this program will cause an ICE when the
+ constant propagator tries to set the value of *str to UNDEFINED.
+
+ This happens because *str is erroneously considered as a store alias.
+ The aliasing code is then making *str an alias leader for its alias set
+ and when the PHI node at the end of the while() is visited the first
+ time, CCP will try to assign it a value of UNDEFINED, but the default
+ value for *str is a constant. */
+typedef unsigned int size_t;
+size_t strlength (const char * const);
+char foo();
+
+static const char * const str = "mingo";
+
+bar()
{
- if (y == 0)
+ size_t c;
+ char *x;
+
+ c = strlength (str);
+ while (c < 10)
{
- *allegro_errno = 34;
- return (x < 0) ? -0x7FFFFFFF : 0x7FFFFFFF;
+ if (c > 5)
+ *x = foo ();
+ if (*x < 'a')
+ break;
}
- else
- return ftofix (fixtof (x) / fixtof (y));
-}
-extern inline fixed
-itofix (int x)
-{
- return x << 16;
-}
-int
-foo (int n)
-{
- return fixtoi (fixdiv (itofix (512), itofix (n)));
+ return *x == '3';
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/920625-1.c b/gcc/testsuite/gcc.c-torture/compile/920625-1.c
index 137e0dc1f17..6a52b029bad 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920625-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920625-1.c
@@ -11,7 +11,11 @@
(p7) mov r14 = r0
that appears to be a WAW violation. */
-/* { dg-xfail-if "missing .pred.rel.mutex directive" "ia64-*-*" { "-O1" "-O2" "-O3" "-Os" } { "" } } */
+
+/* { dg-prune-output "Assembler messages" } */
+/* { dg-prune-output "violate\[^\n\]*dependency" } */
+/* { dg-prune-output "first path encountering" } */
+/* { dg-prune-output "location of the conflicting" } */
typedef unsigned long int unsigned_word;
typedef signed long int signed_word;
diff --git a/gcc/testsuite/gcc.c-torture/compile/920625-2.c b/gcc/testsuite/gcc.c-torture/compile/920625-2.c
index 1466285f88e..291e80d0210 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920625-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920625-2.c
@@ -23,7 +23,7 @@ trashQueryResult(Widget w, Boolean delete, caddr_t call_data)
extern Cursor busy, left_ptr;
extern String cwd;
- static void freeReturnStruct(void);
+ extern void freeReturnStruct(void);
String rmstring;
int status;
XedwListReturnStruct *tmp;
@@ -58,7 +58,7 @@ copyQueryResult(Widget w, Boolean copy, caddr_t call_data)
extern void destroy_button_dialog();
extern void changestate(Boolean);
extern Cursor busy, left_ptr;
- static void freeReturnStruct(void);
+ extern void freeReturnStruct(void);
int execute(String, String, String, Boolean);
extern String cwd;
String copystring;
diff --git a/gcc/testsuite/gcc.c-torture/compile/930217-1.c b/gcc/testsuite/gcc.c-torture/compile/930217-1.c
index 70f4a4897c4..0f64a040712 100644
--- a/gcc/testsuite/gcc.c-torture/compile/930217-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/930217-1.c
@@ -1,3 +1,8 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int a;
+#else
double g ();
typedef union {
struct {
@@ -12,3 +17,4 @@ f(x, n)
((s *)&x)->u.e -= n;
x = g((double)x, -n);
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/930513-1.c b/gcc/testsuite/gcc.c-torture/compile/930513-1.c
index 2e106ae43a9..463fd89b401 100644
--- a/gcc/testsuite/gcc.c-torture/compile/930513-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/930513-1.c
@@ -1,3 +1,8 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int a;
+#else
struct s {
int f1 : 26;
int f2 : 8;
@@ -7,3 +12,4 @@ f (struct s *x)
{
return x->f2++ == 0;
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/950922-1.c b/gcc/testsuite/gcc.c-torture/compile/950922-1.c
index 73574f33e68..73c52f7740a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/950922-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/950922-1.c
@@ -40,7 +40,7 @@ f (int ch, char *fp, char *ap)
nosign:
if (_uquad != 0 || prec != 0);
break;
- default:
+ default:;
}
if ((f & 0x100) == 0) {
} else {
@@ -64,5 +64,5 @@ f (int ch, char *fp, char *ap)
}
}
- error:
+ error:;
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/961203-1.c b/gcc/testsuite/gcc.c-torture/compile/961203-1.c
index 1d879292e51..98908584333 100644
--- a/gcc/testsuite/gcc.c-torture/compile/961203-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/961203-1.c
@@ -1,8 +1,8 @@
/* The structure is too large for the xstormy16 - won't fit in 16
bits. */
-/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" } { "" } } */
-/* { dg-do assemble { xfail xstormy16-*-* m6811-*-* m6812-*-* } } */
+/* { dg-do assemble } */
+#if __INT_MAX__ >= 2147483647L
struct s {
char a[0x32100000];
int x:30, y:30;
@@ -17,3 +17,6 @@ main ()
if (p->x == p->y)
exit (1);
}
+#else
+int g;
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/980506-1.c b/gcc/testsuite/gcc.c-torture/compile/980506-1.c
index fd3496af309..9bc2d8afc3e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/980506-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/980506-1.c
@@ -1,5 +1,5 @@
/* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
-/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" } { "" } } */
+/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
/* { dg-do assemble { xfail xstormy16-*-* m6811-*-* m6812-*-* } } */
unsigned char TIFFFax2DMode[20][256];
diff --git a/gcc/testsuite/gcc.c-torture/compile/981006-1.c b/gcc/testsuite/gcc.c-torture/compile/981006-1.c
index d71637328db..718fa881af5 100644
--- a/gcc/testsuite/gcc.c-torture/compile/981006-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/981006-1.c
@@ -6,7 +6,7 @@
/* { dg-do assemble } */
/* For MIPS at least, pic is needed to trigger the problem. */
/* { dg-options "-w -Wuninitialized -Werror -fpic" } */
-/* { dg-options "-w -Wuninitialized -Werror" { target rs6000-*-aix* powerpc*-*-aix* arm*-*-* xscale*-*-* strongarm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* mn10200*-*-* cris-*-elf* cris-*-aout* mmix-*-* } } */
+/* { dg-options "-w -Wuninitialized -Werror" { target rs6000-*-aix* powerpc*-*-aix* arm*-*-* xscale*-*-* strongarm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* cris-*-elf* cris-*-aout* mmix-*-* } } */
int foo (int a, int b)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/981022-1.c b/gcc/testsuite/gcc.c-torture/compile/981022-1.c
deleted file mode 100644
index 46369fc8181..00000000000
--- a/gcc/testsuite/gcc.c-torture/compile/981022-1.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This tests a combination of two gcc extensions. Omitting the middle
- operand of ?: and using ?: as an lvalue. */
-int x, y;
-
-int main ()
-{
- (x ?: y) = 0; /* { dg-bogus "lvalue" "" { xfail *-*-* } } */
- return 0;
-}
diff --git a/gcc/testsuite/gcc.c-torture/compile/981223-1.c b/gcc/testsuite/gcc.c-torture/compile/981223-1.c
index d0939f62eaf..b6289480749 100644
--- a/gcc/testsuite/gcc.c-torture/compile/981223-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/981223-1.c
@@ -1,11 +1,11 @@
/* The problem on IA-64 is that the assembler emits
Warning: Additional NOP may be necessary to workaround Itanium
- processor A/B step errata
+ processor A/B step errata */
+
+/* { dg-prune-output "Assembler messages" } */
+/* { dg-prune-output "Additional NOP may be necessary" } */
- This can be fixed by adding "-mb-step" to the command line, which
- does in fact add the extra nop. */
-/* { dg-options "-w -mb-step" { target ia64-*-* } } */
__complex__ float
func (__complex__ float x)
diff --git a/gcc/testsuite/gcc.c-torture/compile/dll.x b/gcc/testsuite/gcc.c-torture/compile/dll.x
deleted file mode 100644
index 63a1e180e2c..00000000000
--- a/gcc/testsuite/gcc.c-torture/compile/dll.x
+++ /dev/null
@@ -1,20 +0,0 @@
-# This test examines the attribute support for DLLs.
-# Only COFF/PE formats support DLLs, (plus, as a special case
-# the mcore-elf toolchain), so the code here tries to determine
-# the file format and decide whether the test should be marked
-# as unsupported.
-
-set torture_eval_before_compile {
-
- if ![istarget "mcore-*-elf"] {
-
- set objformat [gcc_target_object_format]
-
- if { $objformat != "pe" } {
- unsupported "dll.c"
- return 1
- }
- }
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr17529.c b/gcc/testsuite/gcc.c-torture/compile/pr17529.c
index 63a96a1c363..77c7a06ddc7 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr17529.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr17529.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "PR middle-end/17529" { "*-*-*" } { "*" } { "" } } */
static inline void
bar (const int * const x)
@@ -5,7 +6,7 @@ bar (const int * const x)
__asm__ __volatile__ (""::"m" (*x));
}
-static const int y[1];
+static const int y[];
void
foo (void)
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-1.c b/gcc/testsuite/gcc.c-torture/compile/simd-1.c
index c113bd4fa2d..6a07bbb6ac6 100644
--- a/gcc/testsuite/gcc.c-torture/compile/simd-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-1.c
@@ -1,4 +1,4 @@
-typedef int v2si __attribute__ ((mode(V2SI)));
+typedef int v2si __attribute__ ((vector_size (8)));
typedef unsigned di __attribute__ ((mode(DI)));
void foo(unsigned long);
void bar() {
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-2.c b/gcc/testsuite/gcc.c-torture/compile/simd-2.c
index 694e94f0105..480c712c023 100644
--- a/gcc/testsuite/gcc.c-torture/compile/simd-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-2.c
@@ -1,4 +1,4 @@
-typedef float floatvect2 __attribute__((mode(V2SF)));
+typedef float floatvect2 __attribute__((vector_size (8)));
typedef union
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-3.c b/gcc/testsuite/gcc.c-torture/compile/simd-3.c
index f7dc54ebf8b..42a38ae56e6 100644
--- a/gcc/testsuite/gcc.c-torture/compile/simd-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-3.c
@@ -3,7 +3,7 @@
/* If double is not wider than float, we probably don't have DFmode,
or at least it's not as wide as double. */
#if DBL_MANT_DIG > FLT_MANT_DIG
-typedef float floatvect2 __attribute__((mode(V2DF)));
+typedef double floatvect2 __attribute__((vector_size (16)));
typedef union
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-4.c b/gcc/testsuite/gcc.c-torture/compile/simd-4.c
index 6ede943c47d..6329fc0968f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/simd-4.c
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-4.c
@@ -1,4 +1,4 @@
-typedef float floatvect2 __attribute__((mode(V4SF)));
+typedef float floatvect2 __attribute__((vector_size (16)));
typedef union
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-5.c b/gcc/testsuite/gcc.c-torture/compile/simd-5.c
index d82b504a505..1575dc1a8d4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/simd-5.c
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-5.c
@@ -1,7 +1,7 @@
-/* On SPARC64/SPARC-V9 it fails, except with -m32. */
-/* { dg-xfail-if "PR target/9200" { "sparc64-*-*" "sparcv9-*-*" } { "*" } { "-m32" } } */
-/* On regular SPARC it doesn't fail, except with -m64. */
-/* { dg-xfail-if "PR target/9200" { "sparc-*-*" } { "-m64" } { "" } } */
+/* On SPARC64/SPARC-V9 it fails at -O0 and -O1, except with -m32. */
+/* { dg-xfail-if "PR target/9200" { "sparc64-*-*" "sparcv9-*-*" } { "-O0" "-O1" } { "-m32" } } */
+/* On regular SPARC it doesn't fail, except with -m64 at -O0 and -O1. */
+/* { dg-xfail-if "PR target/9200" { "sparc-*-*" } { "-m64 -O0" "-m64 -O1" } { "" } } */
#define vector64 __attribute__((vector_size(8)))
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-6.c b/gcc/testsuite/gcc.c-torture/compile/simd-6.c
index 9106a73363d..7998e152f89 100644
--- a/gcc/testsuite/gcc.c-torture/compile/simd-6.c
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-6.c
@@ -1,3 +1,3 @@
-typedef int __attribute__((mode(V2SI))) vec;
+typedef int __attribute__((vector_size (8))) vec;
vec a[] = {(vec) {1, 2}, {3, 4}};
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000603-1.c b/gcc/testsuite/gcc.c-torture/execute/20000603-1.c
index 9c9f69baf04..e94a2c8e6da 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000603-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000603-1.c
@@ -1,5 +1,10 @@
+/* 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)
{
@@ -9,9 +14,9 @@ double f(struct s1 *a, struct s2 *b)
int main()
{
- struct s1 a;
- a.d = 0.0;
- if (f (&a, (struct s2 *)&a) != 2.0)
+ union u a;
+ a.x.d = 0.0;
+ if (f (&a.x, &a.y) != 2.0)
abort ();
return 0;
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010605-1.c b/gcc/testsuite/gcc.c-torture/execute/20010605-1.c
index 4bf230ba54a..c777af5bdc4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010605-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010605-1.c
@@ -2,7 +2,7 @@ int main ()
{
int v = 42;
- static inline int fff (int x)
+ inline int fff (int x)
{
return x*10;
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020227-1.x b/gcc/testsuite/gcc.c-torture/execute/20020227-1.x
index 72adedff865..4e7194792cd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020227-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/20020227-1.x
@@ -24,8 +24,8 @@ if { [istarget "sparc64-*-*"] || [istarget "sparcv9-*-*"] } {
{ "-O0" "-O1" }
}
}
-} elseif { [istarget "powerpc64-*-*"] } {
- # PowerPC-64 doesn't fail at any optimization level.
+} elseif { [istarget "powerpc64-*-*"] || [istarget "x86_64-*-*"] } {
+ # PowerPC-64 and x86_64 do not fail at any optimization level.
} elseif { [istarget "*64*-*-*"] || [istarget "alpha*-*-*"]
|| [istarget "mmix-*-*"] || [istarget "mips*-*-irix6*"] } {
# Other 64-bit targets fail at all optimization levels.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020720-1.x b/gcc/testsuite/gcc.c-torture/execute/20020720-1.x
index 58e311c0d3c..7afd9e44879 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020720-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/20020720-1.x
@@ -11,12 +11,25 @@
# and can make the optimization.
# Don't XFAIL at -O0, that should never fail.
+if { [istarget "sparc*-*-*"] } {
+ set torture_eval_before_compile {
+ global compiler_conditional_xfail_data
+ set compiler_conditional_xfail_data {
+ "PR opt/10348" \
+ { "*-*-*" } \
+ { "-fpic" "-fPIC" } \
+ { "-O0" }
+ }
+ }
+ return 0
+}
+
set torture_eval_before_compile {
global compiler_conditional_xfail_data
set compiler_conditional_xfail_data {
"This test fails to optimize completely on certain platforms." \
{ "xtensa-*-*" "sh-*-*" "arm*-*-*" "strongarm*-*-*" "xscale*-*-*" \
- "h8300*-*-*" "x86_64-*-*" "cris-*-*" } \
+ "h8300*-*-*" "cris-*-*" "frv-*-*" "powerpc-*-*spe" } \
{ "*" } \
{ "-O0" }
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20031003-1.c b/gcc/testsuite/gcc.c-torture/execute/20031003-1.c
index b60711f732b..5d39d799e50 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20031003-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20031003-1.c
@@ -1,5 +1,7 @@
/* PR optimization/9325 */
+#include <limits.h>
+
extern void abort (void);
int f1()
@@ -12,30 +14,13 @@ int f2()
return (int)(float)(2147483647);
}
-int f3()
-{
- float a = 2147483648.0f;
- return (int)a;
-}
-
-int f4()
-{
- int a = 2147483647;
- float b = (float)a;
- return (int)b;
-}
-
int main()
{
+#if INT_MAX == 2147483647
if (f1() != 2147483647)
abort ();
if (f2() != 2147483647)
abort ();
-#ifdef __OPTIMIZE__
- if (f3() != 2147483647)
- abort ();
- if (f4() != 2147483647)
- abort ();
#endif
return 0;
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/920428-2.x b/gcc/testsuite/gcc.c-torture/execute/920428-2.x
deleted file mode 100644
index c7d9f030049..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/920428-2.x
+++ /dev/null
@@ -1,6 +0,0 @@
-# This doesn't work on sparc's with -mflat.
-
-if { [istarget "sparc-*-*"] && [string match "*mflat*" $CFLAGS] } {
- set torture_execute_xfail "sparc-*-*"
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-7.x b/gcc/testsuite/gcc.c-torture/execute/920501-7.x
deleted file mode 100644
index c7d9f030049..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/920501-7.x
+++ /dev/null
@@ -1,6 +0,0 @@
-# This doesn't work on sparc's with -mflat.
-
-if { [istarget "sparc-*-*"] && [string match "*mflat*" $CFLAGS] } {
- set torture_execute_xfail "sparc-*-*"
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/920908-2.c b/gcc/testsuite/gcc.c-torture/execute/920908-2.c
index 66a6d86a7e7..31c1ae0769c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920908-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920908-2.c
@@ -1,3 +1,12 @@
+/* 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
@@ -21,3 +30,4 @@ t.c=0xffff11;
if(f(t)!=0x11)abort();
exit(0);
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/921204-1.c b/gcc/testsuite/gcc.c-torture/execute/921204-1.c
index 9e4f4a6bae7..a7bba830a34 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921204-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921204-1.c
@@ -1,3 +1,12 @@
+/* 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;
@@ -34,3 +43,4 @@ main()
abort();
exit(0);
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/930529-1.x b/gcc/testsuite/gcc.c-torture/execute/930529-1.x
index a44f482c22f..fb86979f7c1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930529-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/930529-1.x
@@ -4,15 +4,20 @@
# The problem is that the multiplication was unsigned SImode, and the
# induction variable is DImode, and we lose the truncation that
# should have happened.
+#
+# On tree-ssa branch, the loop problem is still extant, but the
+# gimple-level optimization makes it easy for the tree-rtl expanders
+# to see that the comparisons are always true, and so the loop code
+# is never exercized.
-set torture_eval_before_execute {
-
- set compiler_conditional_xfail_data {
- "division by a constant conflicts with strength reduction" \
- "alpha*-*-*" \
- { "-O3" } \
- { "" }
- }
-}
+# set torture_eval_before_execute {
+#
+# set compiler_conditional_xfail_data {
+# "division by a constant conflicts with strength reduction" \
+# "alpha*-*-*" \
+# { "-O3" } \
+# { "" }
+# }
+# }
return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/930621-1.c b/gcc/testsuite/gcc.c-torture/execute/930621-1.c
index 6131301df2f..4bb7cdbe076 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930621-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930621-1.c
@@ -1,3 +1,12 @@
+/* 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 {
@@ -17,3 +26,4 @@ main ()
abort ();
exit (0);
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/930630-1.c b/gcc/testsuite/gcc.c-torture/execute/930630-1.c
index 4befa835d0d..38ad1fdfd7b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930630-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930630-1.c
@@ -1,3 +1,12 @@
+/* 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
@@ -17,3 +26,4 @@ f (x)
if (x != 7)
abort ();
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/931031-1.c b/gcc/testsuite/gcc.c-torture/execute/931031-1.c
index 761989040f4..e9ce337955d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931031-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931031-1.c
@@ -1,3 +1,12 @@
+/* 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;
@@ -22,3 +31,4 @@ main ()
abort ();
exit (0);
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/960416-1.x b/gcc/testsuite/gcc.c-torture/execute/960416-1.x
deleted file mode 100644
index ca8e06c4077..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/960416-1.x
+++ /dev/null
@@ -1,5 +0,0 @@
-if { [istarget "h8300*-*-*"] } {
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/980602-2.c b/gcc/testsuite/gcc.c-torture/execute/980602-2.c
index 8ef23222d62..972553ed584 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980602-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980602-2.c
@@ -1,3 +1,12 @@
+/* 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;
@@ -9,3 +18,4 @@ int main()
else
abort ();
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/990208-1.x b/gcc/testsuite/gcc.c-torture/execute/990208-1.x
deleted file mode 100644
index c1710099151..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/990208-1.x
+++ /dev/null
@@ -1,14 +0,0 @@
-# Doesn't work at -O3 because of ifcvt.c optimizations which
-# cause the 2 inlined labels to be at the same location.
-
-set torture_eval_before_execute {
-
- set compiler_conditional_xfail_data {
- "ifcvt transforms 2 inlined labels to the same address" \
- { "ia64-*-*" "arm*-*-*" "strongarm*-*-*" "xscale*-*-*" } \
- { "-O3" } \
- { "" }
- }
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/991216-3.c b/gcc/testsuite/gcc.c-torture/execute/991216-3.c
deleted file mode 100644
index 948b35f9795..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/991216-3.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#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);
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/bitfld-1.x b/gcc/testsuite/gcc.c-torture/execute/bitfld-1.x
deleted file mode 100644
index 2f397b96e51..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/bitfld-1.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set torture_execute_xfail "*-*-*"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-abs-1.c b/gcc/testsuite/gcc.c-torture/execute/builtin-abs-1.c
deleted file mode 100644
index 8a34353763d..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-abs-1.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/* Test for builtin abs, labs, llabs, imaxabs. */
-/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
-
-/* These next definitions are kludges. When GCC has a <stdint.h> it
- should be used.
-*/
-#include <limits.h>
-#if INT_MAX == __LONG_LONG_MAX__
-typedef int intmax_t;
-#define INTMAX_MAX INT_MAX
-#elif LONG_MAX == __LONG_LONG_MAX__
-typedef long intmax_t;
-#define INTMAX_MAX LONG_MAX
-#else
-typedef long long intmax_t;
-#define INTMAX_MAX __LONG_LONG_MAX__
-#endif
-
-extern int abs (int);
-extern long labs (long);
-extern long long llabs (long long);
-extern intmax_t imaxabs (intmax_t);
-extern void abort (void);
-extern void exit (int);
-
-extern void link_failure (void);
-
-int
-main (void)
-{
- /* For each type, test both runtime and compile time (constant folding)
- optimization. */
- volatile int i0 = 0, i1 = 1, im1 = -1, imin = -INT_MAX, imax = INT_MAX;
- volatile long l0 = 0L, l1 = 1L, lm1 = -1L, lmin = -LONG_MAX, lmax = LONG_MAX;
- volatile long long ll0 = 0LL, ll1 = 1LL, llm1 = -1LL;
- volatile long long llmin = -__LONG_LONG_MAX__, llmax = __LONG_LONG_MAX__;
- volatile intmax_t imax0 = 0, imax1 = 1, imaxm1 = -1;
- volatile intmax_t imaxmin = -INTMAX_MAX, imaxmax = INTMAX_MAX;
- if (abs (i0) != 0)
- abort ();
- if (abs (0) != 0)
- link_failure ();
- if (abs (i1) != 1)
- abort ();
- if (abs (1) != 1)
- link_failure ();
- if (abs (im1) != 1)
- abort ();
- if (abs (-1) != 1)
- link_failure ();
- if (abs (imin) != INT_MAX)
- abort ();
- if (abs (-INT_MAX) != INT_MAX)
- link_failure ();
- if (abs (imax) != INT_MAX)
- abort ();
- if (abs (INT_MAX) != INT_MAX)
- link_failure ();
- if (labs (l0) != 0L)
- abort ();
- if (labs (0L) != 0L)
- link_failure ();
- if (labs (l1) != 1L)
- abort ();
- if (labs (1L) != 1L)
- link_failure ();
- if (labs (lm1) != 1L)
- abort ();
- if (labs (-1L) != 1L)
- link_failure ();
- if (labs (lmin) != LONG_MAX)
- abort ();
- if (labs (-LONG_MAX) != LONG_MAX)
- link_failure ();
- if (labs (lmax) != LONG_MAX)
- abort ();
- if (labs (LONG_MAX) != LONG_MAX)
- link_failure ();
- if (llabs (ll0) != 0LL)
- abort ();
- if (llabs (0LL) != 0LL)
- link_failure ();
- if (llabs (ll1) != 1LL)
- abort ();
- if (llabs (1LL) != 1LL)
- link_failure ();
- if (llabs (llm1) != 1LL)
- abort ();
- if (llabs (-1LL) != 1LL)
- link_failure ();
- if (llabs (llmin) != __LONG_LONG_MAX__)
- abort ();
- if (llabs (-__LONG_LONG_MAX__) != __LONG_LONG_MAX__)
- link_failure ();
- if (llabs (llmax) != __LONG_LONG_MAX__)
- abort ();
- if (llabs (__LONG_LONG_MAX__) != __LONG_LONG_MAX__)
- link_failure ();
- if (imaxabs (imax0) != 0)
- abort ();
- if (imaxabs (0) != 0)
- link_failure ();
- if (imaxabs (imax1) != 1)
- abort ();
- if (imaxabs (1) != 1)
- link_failure ();
- if (imaxabs (imaxm1) != 1)
- abort ();
- if (imaxabs (-1) != 1)
- link_failure ();
- if (imaxabs (imaxmin) != INTMAX_MAX)
- abort ();
- if (imaxabs (-INTMAX_MAX) != INTMAX_MAX)
- link_failure ();
- if (imaxabs (imaxmax) != INTMAX_MAX)
- abort ();
- if (imaxabs (INTMAX_MAX) != INTMAX_MAX)
- link_failure ();
- exit (0);
-}
-
-/* All the above cases should have been optimized to something else,
- even if not optimizing (unless -fno-builtin was specified). So any
- remaining calls to the original functions should abort. */
-
-static int
-abs (int x)
-{
- abort ();
-}
-
-static long
-labs (long x)
-{
- abort ();
-}
-
-static long long
-llabs (long long x)
-{
- abort ();
-}
-
-static intmax_t
-imaxabs (intmax_t x)
-{
- abort ();
-}
-
-/* When optimizing, all the constant cases should have been
- constant folded, so no calls to link_failure should remain. In any case,
- link_failure should not be called. */
-
-#ifndef __OPTIMIZE__
-void
-link_failure (void)
-{
- abort ();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-abs-2.c b/gcc/testsuite/gcc.c-torture/execute/builtin-abs-2.c
deleted file mode 100644
index b4e18796560..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-abs-2.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Test for builtin abs, labs, llabs, imaxabs. Test for __builtin versions. */
-/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
-
-/* These next definitions are kludges. When GCC has a <stdint.h> it
- should be used.
-*/
-#include <limits.h>
-#if INT_MAX == __LONG_LONG_MAX__
-typedef int intmax_t;
-#define INTMAX_MAX INT_MAX
-#elif LONG_MAX == __LONG_LONG_MAX__
-typedef long intmax_t;
-#define INTMAX_MAX LONG_MAX
-#else
-typedef long long intmax_t;
-#define INTMAX_MAX __LONG_LONG_MAX__
-#endif
-
-extern void abort (void);
-extern void exit (int);
-
-extern void link_failure (void);
-
-int
-main (void)
-{
- /* For each type, test both runtime and compile time (constant folding)
- optimization. */
- volatile int i0 = 0, i1 = 1, im1 = -1, imin = -INT_MAX, imax = INT_MAX;
- volatile long l0 = 0L, l1 = 1L, lm1 = -1L, lmin = -LONG_MAX, lmax = LONG_MAX;
- volatile long long ll0 = 0LL, ll1 = 1LL, llm1 = -1LL;
- volatile long long llmin = -__LONG_LONG_MAX__, llmax = __LONG_LONG_MAX__;
- volatile intmax_t imax0 = 0, imax1 = 1, imaxm1 = -1;
- volatile intmax_t imaxmin = -INTMAX_MAX, imaxmax = INTMAX_MAX;
- if (__builtin_abs (i0) != 0)
- abort ();
- if (__builtin_abs (0) != 0)
- link_failure ();
- if (__builtin_abs (i1) != 1)
- abort ();
- if (__builtin_abs (1) != 1)
- link_failure ();
- if (__builtin_abs (im1) != 1)
- abort ();
- if (__builtin_abs (-1) != 1)
- link_failure ();
- if (__builtin_abs (imin) != INT_MAX)
- abort ();
- if (__builtin_abs (-INT_MAX) != INT_MAX)
- link_failure ();
- if (__builtin_abs (imax) != INT_MAX)
- abort ();
- if (__builtin_abs (INT_MAX) != INT_MAX)
- link_failure ();
- if (__builtin_labs (l0) != 0L)
- abort ();
- if (__builtin_labs (0L) != 0L)
- link_failure ();
- if (__builtin_labs (l1) != 1L)
- abort ();
- if (__builtin_labs (1L) != 1L)
- link_failure ();
- if (__builtin_labs (lm1) != 1L)
- abort ();
- if (__builtin_labs (-1L) != 1L)
- link_failure ();
- if (__builtin_labs (lmin) != LONG_MAX)
- abort ();
- if (__builtin_labs (-LONG_MAX) != LONG_MAX)
- link_failure ();
- if (__builtin_labs (lmax) != LONG_MAX)
- abort ();
- if (__builtin_labs (LONG_MAX) != LONG_MAX)
- link_failure ();
- if (__builtin_llabs (ll0) != 0LL)
- abort ();
- if (__builtin_llabs (0LL) != 0LL)
- link_failure ();
- if (__builtin_llabs (ll1) != 1LL)
- abort ();
- if (__builtin_llabs (1LL) != 1LL)
- link_failure ();
- if (__builtin_llabs (llm1) != 1LL)
- abort ();
- if (__builtin_llabs (-1LL) != 1LL)
- link_failure ();
- if (__builtin_llabs (llmin) != __LONG_LONG_MAX__)
- abort ();
- if (__builtin_llabs (-__LONG_LONG_MAX__) != __LONG_LONG_MAX__)
- link_failure ();
- if (__builtin_llabs (llmax) != __LONG_LONG_MAX__)
- abort ();
- if (__builtin_llabs (__LONG_LONG_MAX__) != __LONG_LONG_MAX__)
- link_failure ();
- if (__builtin_imaxabs (imax0) != 0)
- abort ();
- if (__builtin_imaxabs (0) != 0)
- link_failure ();
- if (__builtin_imaxabs (imax1) != 1)
- abort ();
- if (__builtin_imaxabs (1) != 1)
- link_failure ();
- if (__builtin_imaxabs (imaxm1) != 1)
- abort ();
- if (__builtin_imaxabs (-1) != 1)
- link_failure ();
- if (__builtin_imaxabs (imaxmin) != INTMAX_MAX)
- abort ();
- if (__builtin_imaxabs (-INTMAX_MAX) != INTMAX_MAX)
- link_failure ();
- if (__builtin_imaxabs (imaxmax) != INTMAX_MAX)
- abort ();
- if (__builtin_imaxabs (INTMAX_MAX) != INTMAX_MAX)
- link_failure ();
- exit (0);
-}
-
-/* All the above cases should have been optimized to something else,
- not converted to function calls. So any calls to the non-__builtin
- functions should abort. */
-
-static int
-abs (int x)
-{
- abort ();
-}
-
-static long
-labs (long x)
-{
- abort ();
-}
-
-static long long
-llabs (long long x)
-{
- abort ();
-}
-
-static intmax_t
-imaxabs (intmax_t x)
-{
- abort ();
-}
-
-/* When optimizing, all the constant cases should have been
- constant folded, so no calls to link_failure should remain. In any case,
- link_failure should not be called. */
-
-#ifndef __OPTIMIZE__
-void
-link_failure (void)
-{
- abort ();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-complex-1.c b/gcc/testsuite/gcc.c-torture/execute/builtin-complex-1.c
deleted file mode 100644
index 46ab7c51c0f..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-complex-1.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* Test for builtin conj, creal, cimag. */
-/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
-
-extern float _Complex conjf (float _Complex);
-extern double _Complex conj (double _Complex);
-extern long double _Complex conjl (long double _Complex);
-
-extern float crealf (float _Complex);
-extern double creal (double _Complex);
-extern long double creall (long double _Complex);
-
-extern float cimagf (float _Complex);
-extern double cimag (double _Complex);
-extern long double cimagl (long double _Complex);
-
-extern void abort (void);
-extern void exit (int);
-
-extern void link_failure (void);
-
-int
-main (void)
-{
- /* For each type, test both runtime and compile time (constant folding)
- optimization. */
- volatile float _Complex fc = 1.0F + 2.0iF;
- volatile double _Complex dc = 1.0 + 2.0i;
- volatile long double _Complex ldc = 1.0L + 2.0iL;
- /* Test floats. */
- if (conjf (fc) != 1.0F - 2.0iF)
- abort ();
- if (__builtin_conjf (fc) != 1.0F - 2.0iF)
- abort ();
- if (conjf (1.0F + 2.0iF) != 1.0F - 2.0iF)
- link_failure ();
- if (__builtin_conjf (1.0F + 2.0iF) != 1.0F - 2.0iF)
- link_failure ();
- if (crealf (fc) != 1.0F)
- abort ();
- if (__builtin_crealf (fc) != 1.0F)
- abort ();
- if (crealf (1.0F + 2.0iF) != 1.0F)
- link_failure ();
- if (__builtin_crealf (1.0F + 2.0iF) != 1.0F)
- link_failure ();
- if (cimagf (fc) != 2.0F)
- abort ();
- if (__builtin_cimagf (fc) != 2.0F)
- abort ();
- if (cimagf (1.0F + 2.0iF) != 2.0F)
- link_failure ();
- if (__builtin_cimagf (1.0F + 2.0iF) != 2.0F)
- link_failure ();
- /* Test doubles. */
- if (conj (dc) != 1.0 - 2.0i)
- abort ();
- if (__builtin_conj (dc) != 1.0 - 2.0i)
- abort ();
- if (conj (1.0 + 2.0i) != 1.0 - 2.0i)
- link_failure ();
- if (__builtin_conj (1.0 + 2.0i) != 1.0 - 2.0i)
- link_failure ();
- if (creal (dc) != 1.0)
- abort ();
- if (__builtin_creal (dc) != 1.0)
- abort ();
- if (creal (1.0 + 2.0i) != 1.0)
- link_failure ();
- if (__builtin_creal (1.0 + 2.0i) != 1.0)
- link_failure ();
- if (cimag (dc) != 2.0)
- abort ();
- if (__builtin_cimag (dc) != 2.0)
- abort ();
- if (cimag (1.0 + 2.0i) != 2.0)
- link_failure ();
- if (__builtin_cimag (1.0 + 2.0i) != 2.0)
- link_failure ();
- /* Test long doubles. */
- if (conjl (ldc) != 1.0L - 2.0iL)
- abort ();
- if (__builtin_conjl (ldc) != 1.0L - 2.0iL)
- abort ();
- if (conjl (1.0L + 2.0iL) != 1.0L - 2.0iL)
- link_failure ();
- if (__builtin_conjl (1.0L + 2.0iL) != 1.0L - 2.0iL)
- link_failure ();
- if (creall (ldc) != 1.0L)
- abort ();
- if (__builtin_creall (ldc) != 1.0L)
- abort ();
- if (creall (1.0L + 2.0iL) != 1.0L)
- link_failure ();
- if (__builtin_creall (1.0L + 2.0iL) != 1.0L)
- link_failure ();
- if (cimagl (ldc) != 2.0L)
- abort ();
- if (__builtin_cimagl (ldc) != 2.0L)
- abort ();
- if (cimagl (1.0L + 2.0iL) != 2.0L)
- link_failure ();
- if (__builtin_cimagl (1.0L + 2.0iL) != 2.0L)
- link_failure ();
- exit (0);
-}
-
-/* All the above cases should have been optimized to something else,
- even if not optimizing (unless -fno-builtin was specified). So any
- remaining calls to the original functions should abort. */
-
-static float _Complex
-conjf (float _Complex z)
-{
- abort ();
-}
-
-static double _Complex
-conj (double _Complex z)
-{
- abort ();
-}
-
-static long double _Complex
-conjl (long double _Complex z)
-{
- abort ();
-}
-
-static float
-crealf (float _Complex z)
-{
- abort ();
-}
-
-static double
-creal (double _Complex z)
-{
- abort ();
-}
-
-static long double
-creall (long double _Complex z)
-{
- abort ();
-}
-
-static float
-cimagf (float _Complex z)
-{
- abort ();
-}
-
-static double
-cimag (double _Complex z)
-{
- abort ();
-}
-
-static long double
-cimagl (long double _Complex z)
-{
- abort ();
-}
-
-/* When optimizing, all the constant cases should have been
- constant folded, so no calls to link_failure should remain. In any case,
- link_failure should not be called. */
-
-#ifndef __OPTIMIZE__
-void
-link_failure (void)
-{
- abort ();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-constant.x b/gcc/testsuite/gcc.c-torture/execute/builtin-constant.x
deleted file mode 100644
index 7a2e3146675..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-constant.x
+++ /dev/null
@@ -1,11 +0,0 @@
-set torture_eval_before_execute {
- global compiler_conditional_xfail_data
- set compiler_conditional_xfail_data {
- "This test fails on all targets when optimizing." \
- { "*-*-*" } \
- { "-O1" } \
- { "" }
- }
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-types-compatible-p.c b/gcc/testsuite/gcc.c-torture/execute/builtin-types-compatible-p.c
index a901c725f79..a998ef776f7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-types-compatible-p.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtin-types-compatible-p.c
@@ -19,7 +19,6 @@ int main (void)
&& __builtin_types_compatible_p (typeof (hot), int)
&& __builtin_types_compatible_p (typeof (hot), typeof (laura))
&& __builtin_types_compatible_p (int[5], int[])
- && __builtin_types_compatible_p (typeof (dingos), typeof (cranberry))
&& __builtin_types_compatible_p (same1, same2)))
abort ();
@@ -28,6 +27,7 @@ int main (void)
|| __builtin_types_compatible_p (char *, const char *)
|| __builtin_types_compatible_p (long double, double)
|| __builtin_types_compatible_p (typeof (i), typeof (d))
+ || __builtin_types_compatible_p (typeof (dingos), typeof (cranberry))
|| __builtin_types_compatible_p (char, int)
|| __builtin_types_compatible_p (char *, char **))
abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c b/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c
index 1584515af78..6ca246d3922 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c
@@ -9,7 +9,6 @@ int abs_called = 0;
extern int abs (int);
extern long labs (long);
extern void abort (void);
-extern void exit (int);
void
main_test (void)
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
index cfd79baef47..6f3c3170cc1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
@@ -9,3 +9,15 @@ main ()
inside_main = 0;
return 0;
}
+
+/* When optimizing, all the constant cases should have been
+ constant folded, so no calls to link_error should remain.
+ In any case, link_error should not be called. */
+
+#ifndef __OPTIMIZE__
+void
+link_error (void)
+{
+ abort ();
+}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/strstr.c b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/strstr.c
index 737a48f63dc..fa43c934312 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/strstr.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/strstr.c
@@ -20,7 +20,7 @@ strstr(const char *s1, const char *s2)
break;
p++, q++;
}
- if (*q == 0)
+ if (*p == *q && *p == 0)
return (char *)s1;
}
return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-1-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-1-lib.c
deleted file mode 100644
index c9d8b8da7b9..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-1-lib.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "lib/strrchr.c"
-#include "lib/strlen.c"
-#include "lib/strcmp.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-1.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-1.c
deleted file mode 100644
index 8a60e7e80ae..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-1.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation.
-
- Ensure all expected transformations of builtin strlen, strcmp,
- strrchr and rindex occur and perform correctly.
-
- Written by Jakub Jelinek, 11/7/2000. */
-
-extern void abort (void);
-extern __SIZE_TYPE__ strlen (const char *);
-extern int strcmp (const char *, const char *);
-extern char *strrchr (const char *, int);
-extern char *rindex (const char *, int);
-
-int x = 6;
-char *bar = "hi world";
-
-void
-main_test (void)
-{
- const char *const foo = "hello world";
-
- if (strlen (foo) != 11)
- abort ();
- if (strlen (foo + 4) != 7)
- abort ();
- if (strlen (foo + (x++ & 7)) != 5)
- abort ();
- if (x != 7)
- abort ();
- if (strcmp (foo, "hello") <= 0)
- abort ();
- if (strcmp (foo + 2, "llo") <= 0)
- abort ();
- if (strcmp (foo, foo) != 0)
- abort ();
- if (strcmp (foo, "hello world ") >= 0)
- abort ();
- if (strcmp (foo + 10, "dx") >= 0)
- abort ();
- if (strcmp (10 + foo, "dx") >= 0)
- abort ();
- if (strcmp (bar, "") <= 0)
- abort ();
- if (strcmp ("", bar) >= 0)
- abort ();
- if (strcmp (bar+8, "") != 0)
- abort ();
- if (strcmp ("", bar+8) != 0)
- abort ();
- if (strcmp (bar+(--x), "") <= 0 || x != 6)
- abort ();
- if (strcmp ("", bar+(++x)) >= 0 || x != 7)
- abort ();
- if (strrchr (foo, 'x'))
- abort ();
- if (strrchr (foo, 'o') != foo + 7)
- abort ();
- if (strrchr (foo, 'e') != foo + 1)
- abort ();
- if (strrchr (foo + 3, 'e'))
- abort ();
- if (strrchr (foo, '\0') != foo + 11)
- abort ();
- if (strrchr (bar, '\0') != bar + 8)
- abort ();
- if (strrchr (bar + 4, '\0') != bar + 8)
- abort ();
- if (strrchr (bar + (x++ & 3), '\0') != bar + 8)
- abort ();
- if (x != 8)
- abort ();
- /* Test only one instance of rindex since the code path is the same
- as that of strrchr. */
- if (rindex ("hello", 'z') != 0)
- abort ();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_rindex (foo, 'o') != foo + 7)
- abort ();
- if (__builtin_strrchr (foo, 'o') != foo + 7)
- abort ();
- if (__builtin_strlen (foo) != 11)
- abort ();
- if (__builtin_strcmp (foo, "hello") <= 0)
- abort ();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-2-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-2-lib.c
deleted file mode 100644
index 9049fb9e1ff..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-2-lib.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "lib/strchr.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-2.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-2.c
deleted file mode 100644
index 08e87c63d30..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-2.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation.
-
- Ensure all expected transformations of builtin strchr and index
- occur and perform correctly.
-
- Written by Jakub Jelinek, 11/7/2000. */
-
-extern void abort (void);
-extern char *strchr (const char *, int);
-extern char *index (const char *, int);
-
-void
-main_test (void)
-{
- const char *const foo = "hello world";
-
- if (strchr (foo, 'x'))
- abort ();
- if (strchr (foo, 'o') != foo + 4)
- abort ();
- if (strchr (foo + 5, 'o') != foo + 7)
- abort ();
- if (strchr (foo, '\0') != foo + 11)
- abort ();
- /* Test only one instance of index since the code path is the same
- as that of strchr. */
- if (index ("hello", 'z') != 0)
- abort ();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_strchr (foo, 'o') != foo + 4)
- abort ();
- if (__builtin_index (foo, 'o') != foo + 4)
- abort ();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-3-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-3-lib.c
deleted file mode 100644
index d5326ffeb2b..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-3-lib.c
+++ /dev/null
@@ -1,17 +0,0 @@
-extern int inside_main;
-
-void *
-memset (void *dst, int c, __SIZE_TYPE__ n)
-{
- /* Single-byte memsets should be done inline when optimisation
- is enabled. */
-#ifdef __OPTIMIZE__
- if (inside_main && n < 2)
- abort ();
-#endif
-
- while (n-- != 0)
- n[(char *) dst] = c;
-
- return dst;
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-3.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-3.c
deleted file mode 100644
index cf7c1e303e8..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-3.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation.
-
- Ensure that builtin memset operations for constant length and
- non-constant assigned value don't cause compiler problems.
-
- Written by Roger Sayle, 21 April 2002. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern void *memset (void *, int, size_t);
-
-char buffer[32];
-int argc = 1;
-
-void
-main_test (void)
-{
- memset (buffer, argc, 0);
- memset (buffer, argc, 1);
- memset (buffer, argc, 2);
- memset (buffer, argc, 3);
- memset (buffer, argc, 4);
- memset (buffer, argc, 5);
- memset (buffer, argc, 6);
- memset (buffer, argc, 7);
- memset (buffer, argc, 8);
- memset (buffer, argc, 9);
- memset (buffer, argc, 10);
- memset (buffer, argc, 11);
- memset (buffer, argc, 12);
- memset (buffer, argc, 13);
- memset (buffer, argc, 14);
- memset (buffer, argc, 15);
- memset (buffer, argc, 16);
- memset (buffer, argc, 17);
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-4-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-4-lib.c
deleted file mode 100644
index 3b69c3baea8..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-4-lib.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "lib/stpcpy.c"
-#include "lib/mempcpy.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-4.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-4.c
deleted file mode 100644
index 51819b1cfa9..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-4.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation.
-
- Ensure builtin mempcpy and stpcpy perform correctly.
-
- Written by Kaveh Ghazi, 4/11/2003. */
-
-extern void abort (void);
-extern char *strcpy (char *, const char *);
-extern char *stpcpy (char *, const char *);
-typedef __SIZE_TYPE__ size_t;
-extern size_t strlen(const char *);
-extern void *memcpy (void *, const void *, size_t);
-extern void *mempcpy (void *, const void *, size_t);
-extern int memcmp (const void *, const void *, size_t);
-extern int inside_main;
-
-const char s1[] = "123";
-char p[32] = "";
-char *s2 = "defg";
-char *s3 = "FGH";
-size_t l1 = 1;
-
-void
-main_test (void)
-{
- int i;
-
-#if !defined __i386__ && !defined __x86_64__
- /* The functions below might not be optimized into direct stores on all
- arches. It depends on how many instructions would be generated and
- what limits the architecture chooses in STORE_BY_PIECES_P. */
- inside_main = 0;
-#endif
-
- if (stpcpy (p, "abcde") != p + 5 || memcmp (p, "abcde", 6))
- abort ();
- if (stpcpy (p + 16, "vwxyz" + 1) != p + 16 + 4 || memcmp (p + 16, "wxyz", 5))
- abort ();
- if (stpcpy (p + 1, "") != p + 1 + 0 || memcmp (p, "a\0cde", 6))
- abort ();
- if (stpcpy (p + 3, "fghij") != p + 3 + 5 || memcmp (p, "a\0cfghij", 9))
- abort ();
- if (mempcpy (p, "ABCDE", 6) != p + 6 || memcmp (p, "ABCDE", 6))
- abort ();
- if (mempcpy (p + 16, "VWX" + 1, 2) != p + 16 + 2 || memcmp (p + 16, "WXyz", 5))
- abort ();
- if (mempcpy (p + 1, "", 1) != p + 1 + 1 || memcmp (p, "A\0CDE", 6))
- abort ();
- if (mempcpy (p + 3, "FGHI", 4) != p + 3 + 4 || memcmp (p, "A\0CFGHIj", 9))
- abort ();
-
- i = 8;
- memcpy (p + 20, "qrstu", 6);
- if (stpcpy ((i++, p + 20 + 1), "23") != (p + 20 + 1 + 2) || i != 9 || memcmp (p + 20, "q23\0u", 6))
- abort ();
-
- memcpy (p + 25, "QRSTU", 6);
- if (mempcpy (p + 25 + 1, s1, 3) != (p + 25 + 1 + 3) || memcmp (p + 25, "Q123U", 6))
- abort ();
-
- if (stpcpy (stpcpy (p, "ABCD"), "EFG") != p + 7 || memcmp (p, "ABCDEFG", 8))
- abort();
- if (mempcpy (mempcpy (p, "abcdEFG", 4), "efg", 4) != p + 8 || memcmp (p, "abcdefg", 8))
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_stpcpy (p, "abcde") != p + 5 || memcmp (p, "abcde", 6))
- abort ();
- if (__builtin_mempcpy (p, "ABCDE", 6) != p + 6 || memcmp (p, "ABCDE", 6))
- abort ();
-
- /* If the result of stpcpy/mempcpy is ignored, gcc should use
- strcpy/memcpy. This should be optimized always, so set inside_main
- again. */
- inside_main = 1;
- stpcpy (p + 3, s2);
- if (memcmp (p, "ABCdefg", 8))
- abort ();
- mempcpy (p + 5, s3, 1);
- if (memcmp (p, "ABCdeFg", 8))
- abort ();
- mempcpy (p + 6, s3 + 1, l1);
- if (memcmp (p, "ABCdeFG", 8))
- abort ();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-5-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-5-lib.c
deleted file mode 100644
index 5be3df52fe5..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-5-lib.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "lib/memmove.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-5.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-5.c
deleted file mode 100644
index 4a18fc6400f..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-5.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation.
-
- Ensure builtin memmove and bcopy perform correctly.
-
- Written by Jakub Jelinek, 4/26/2003. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern void *memmove (void *, const void *, size_t);
-extern void bcopy (const void *, void *, size_t);
-extern int memcmp (const void *, const void *, size_t);
-
-const char s1[] = "123";
-char p[32] = "";
-
-static const struct foo
-{
- char *s;
- double d;
- long l;
-} foo[] =
-{
- { "hello world1", 3.14159, 101L },
- { "hello world2", 3.14159, 102L },
- { "hello world3", 3.14159, 103L },
- { "hello world4", 3.14159, 104L },
- { "hello world5", 3.14159, 105L },
- { "hello world6", 3.14159, 106L }
-};
-
-static const struct bar
-{
- char *s;
- const struct foo f[3];
-} bar[] =
-{
- {
- "hello world10",
- {
- { "hello1", 3.14159, 201L },
- { "hello2", 3.14159, 202L },
- { "hello3", 3.14159, 203L },
- }
- },
- {
- "hello world11",
- {
- { "hello4", 3.14159, 204L },
- { "hello5", 3.14159, 205L },
- { "hello6", 3.14159, 206L },
- }
- }
-};
-
-static const int baz[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
-
-void
-main_test (void)
-{
- const char *s;
- struct foo f1[sizeof foo/sizeof*foo];
- struct bar b1[sizeof bar/sizeof*bar];
- int bz[sizeof baz/sizeof*baz];
-
- if (memmove (f1, foo, sizeof (foo)) != f1 || memcmp (f1, foo, sizeof(foo)))
- abort();
- if (memmove (b1, bar, sizeof (bar)) != b1 || memcmp (b1, bar, sizeof(bar)))
- abort();
- bcopy (baz, bz, sizeof (baz));
- if (memcmp (bz, baz, sizeof(baz)))
- abort();
-
- if (memmove (p, "abcde", 6) != p || memcmp (p, "abcde", 6))
- abort ();
- s = s1;
- if (memmove (p + 2, ++s, 0) != p + 2 || memcmp (p, "abcde", 6) || s != s1 + 1)
- abort ();
- if (__builtin_memmove (p + 3, "", 1) != p + 3 || memcmp (p, "abc\0e", 6))
- abort ();
- bcopy ("fghijk", p + 2, 4);
- if (memcmp (p, "abfghi", 7))
- abort ();
- s = s1 + 1;
- bcopy (s++, p + 1, 0);
- if (memcmp (p, "abfghi", 7) || s != s1 + 2)
- abort ();
- __builtin_bcopy ("ABCDE", p + 4, 1);
- if (memcmp (p, "abfgAi", 7))
- abort ();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-6-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-6-lib.c
deleted file mode 100644
index 029a92e77d5..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-6-lib.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "lib/memcmp.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-6.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-6.c
deleted file mode 100644
index 869dba17baa..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-6.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation.
-
- Ensure that builtin memcmp operations when all three arguments
- are constant is optimized and performs correctly. Taken from
- PR optimize/3508.
-
- Written by Roger Sayle, 12/26/2001. */
-
-extern void abort (void);
-extern void link_error (void);
-
-typedef __SIZE_TYPE__ size_t;
-extern int memcmp (const void *, const void *, size_t);
-
-void
-main_test (void)
-{
- if (memcmp ("abcd", "efgh", 4) >= 0)
- link_error ();
- if (memcmp ("abcd", "abcd", 4) != 0)
- link_error ();
- if (memcmp ("efgh", "abcd", 4) <= 0)
- link_error ();
-}
-
-#ifndef __OPTIMIZE__
-/* When not optimizing, the above tests may generate references to
- the function link_error, but should never actually call it. */
-void
-link_error ()
-{
- abort ();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-7-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-7-lib.c
deleted file mode 100644
index 3b69c3baea8..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-7-lib.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "lib/stpcpy.c"
-#include "lib/mempcpy.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-7.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-7.c
deleted file mode 100644
index 5eb1ac4af78..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-7.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation.
-
- Ensure that builtin mempcpy and stpcpy perform correctly.
-
- Written by Jakub Jelinek, 21/05/2003. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern void *mempcpy (void *, const void *, size_t);
-extern int memcmp (const void *, const void *, size_t);
-extern char *stpcpy (char *, const char *);
-extern int inside_main;
-
-long buf1[64];
-char *buf2 = (char *) (buf1 + 32);
-long buf5[20];
-char buf7[20];
-
-int
-__attribute__((noinline))
-test (long *buf3, char *buf4, char *buf6, int n)
-{
- int i = 0;
-
- /* These should probably be handled by store_by_pieces on most arches. */
- if (mempcpy (buf1, "ABCDEFGHI", 9) != (char *) buf1 + 9
- || memcmp (buf1, "ABCDEFGHI\0", 11))
- abort ();
-
- if (mempcpy (buf1, "abcdefghijklmnopq", 17) != (char *) buf1 + 17
- || memcmp (buf1, "abcdefghijklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy (buf3, "ABCDEF", 6) != (char *) buf1 + 6
- || memcmp (buf1, "ABCDEFghijklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy (buf3, "a", 1) != (char *) buf1 + 1
- || memcmp (buf1, "aBCDEFghijklmnopq\0", 19))
- abort ();
-
- if (mempcpy ((char *) buf3 + 2, "bcd" + ++i, 2) != (char *) buf1 + 4
- || memcmp (buf1, "aBcdEFghijklmnopq\0", 19)
- || i != 1)
- abort ();
-
- /* These should probably be handled by move_by_pieces on most arches. */
- if (mempcpy ((char *) buf3 + 4, buf5, 6) != (char *) buf1 + 10
- || memcmp (buf1, "aBcdRSTUVWklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy ((char *) buf1 + ++i + 8, (char *) buf5 + 1, 1)
- != (char *) buf1 + 11
- || memcmp (buf1, "aBcdRSTUVWSlmnopq\0", 19)
- || i != 2)
- abort ();
-
- if (mempcpy ((char *) buf3 + 14, buf6, 2) != (char *) buf1 + 16
- || memcmp (buf1, "aBcdRSTUVWSlmnrsq\0", 19))
- abort ();
-
- if (mempcpy (buf3, buf5, 8) != (char *) buf1 + 8
- || memcmp (buf1, "RSTUVWXYVWSlmnrsq\0", 19))
- abort ();
-
- if (mempcpy (buf3, buf5, 17) != (char *) buf1 + 17
- || memcmp (buf1, "RSTUVWXYZ01234567\0", 19))
- abort ();
-
- __builtin_memcpy (buf3, "aBcdEFghijklmnopq\0", 19);
-
- /* These should be handled either by movstrendM or mempcpy
- call. */
- if (mempcpy ((char *) buf3 + 4, buf5, n + 6) != (char *) buf1 + 10
- || memcmp (buf1, "aBcdRSTUVWklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy ((char *) buf1 + ++i + 8, (char *) buf5 + 1, n + 1)
- != (char *) buf1 + 12
- || memcmp (buf1, "aBcdRSTUVWkSmnopq\0", 19)
- || i != 3)
- abort ();
-
- if (mempcpy ((char *) buf3 + 14, buf6, n + 2) != (char *) buf1 + 16
- || memcmp (buf1, "aBcdRSTUVWkSmnrsq\0", 19))
- abort ();
-
- i = 1;
-
- /* These might be handled by store_by_pieces. */
- if (mempcpy (buf2, "ABCDEFGHI", 9) != buf2 + 9
- || memcmp (buf2, "ABCDEFGHI\0", 11))
- abort ();
-
- if (mempcpy (buf2, "abcdefghijklmnopq", 17) != buf2 + 17
- || memcmp (buf2, "abcdefghijklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy (buf4, "ABCDEF", 6) != buf2 + 6
- || memcmp (buf2, "ABCDEFghijklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy (buf4, "a", 1) != buf2 + 1
- || memcmp (buf2, "aBCDEFghijklmnopq\0", 19))
- abort ();
-
- if (mempcpy (buf4 + 2, "bcd" + i++, 2) != buf2 + 4
- || memcmp (buf2, "aBcdEFghijklmnopq\0", 19)
- || i != 2)
- abort ();
-
- /* These might be handled by move_by_pieces. */
- if (mempcpy (buf4 + 4, buf7, 6) != buf2 + 10
- || memcmp (buf2, "aBcdRSTUVWklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy (buf2 + i++ + 8, buf7 + 1, 1)
- != buf2 + 11
- || memcmp (buf2, "aBcdRSTUVWSlmnopq\0", 19)
- || i != 3)
- abort ();
-
- if (mempcpy (buf4 + 14, buf6, 2) != buf2 + 16
- || memcmp (buf2, "aBcdRSTUVWSlmnrsq\0", 19))
- abort ();
-
- __builtin_memcpy (buf4, "aBcdEFghijklmnopq\0", 19);
-
- /* These should be handled either by movstrendM or mempcpy
- call. */
- if (mempcpy (buf4 + 4, buf7, n + 6) != buf2 + 10
- || memcmp (buf2, "aBcdRSTUVWklmnopq\0", 19))
- abort ();
-
- if (__builtin_mempcpy (buf2 + i++ + 8, buf7 + 1, n + 1)
- != buf2 + 12
- || memcmp (buf2, "aBcdRSTUVWkSmnopq\0", 19)
- || i != 4)
- abort ();
-
- if (mempcpy (buf4 + 14, buf6, n + 2) != buf2 + 16
- || memcmp (buf2, "aBcdRSTUVWkSmnrsq\0", 19))
- abort ();
-
- /* Now stpcpy tests. */
- if (stpcpy ((char *) buf3, "abcdefghijklmnop") != (char *) buf1 + 16
- || memcmp (buf1, "abcdefghijklmnop", 17))
- abort ();
-
- if (__builtin_stpcpy ((char *) buf3, "ABCDEFG") != (char *) buf1 + 7
- || memcmp (buf1, "ABCDEFG\0ijklmnop", 17))
- abort ();
-
- if (stpcpy ((char *) buf3 + i++, "x") != (char *) buf1 + 5
- || memcmp (buf1, "ABCDx\0G\0ijklmnop", 17))
- abort ();
-
- return 0;
-}
-
-void
-main_test (void)
-{
- /* All these tests are allowed to call mempcpy/stpcpy. */
- inside_main = 0;
- __builtin_memcpy (buf5, "RSTUVWXYZ0123456789", 20);
- __builtin_memcpy (buf7, "RSTUVWXYZ0123456789", 20);
- test (buf1, buf2, "rstuvwxyz", 0);
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-8-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-8-lib.c
deleted file mode 100644
index 9753c2498f1..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-8-lib.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "lib/strlen.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-8.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-8.c
deleted file mode 100644
index 220b6ed8e2e..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-8.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation.
-
- Test strlen optimizations on conditional expressions.
-
- Written by Jakub Jelinek, June 23, 2003. */
-
-typedef __SIZE_TYPE__ size_t;
-extern char *strcpy (char *, const char *);
-extern int memcmp (const void *, const void *, size_t);
-extern void abort (void);
-extern void exit (int);
-extern int inside_main;
-
-size_t g, h, i, j, k, l;
-
-size_t
-foo (void)
-{
- if (l)
- abort ();
- return ++l;
-}
-
-void
-main_test (void)
-{
- if (strlen (i ? "foo" + 1 : j ? "bar" + 1 : "baz" + 1) != 2)
- abort ();
- if (strlen (g++ ? "foo" : "bar") != 3 || g != 1)
- abort ();
- if (strlen (h++ ? "xfoo" + 1 : "bar") != 3 || h != 1)
- abort ();
- if (strlen ((i++, "baz")) != 3 || i != 1)
- abort ();
- /* The following calls might not optimize strlen call away. */
- inside_main = 0;
- if (strlen (j ? "foo" + k++ : "bar" + k++) != 3 || k != 1)
- abort ();
- if (strlen (foo () ? "foo" : "bar") != 3 || l != 1)
- abort ();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-9-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-9-lib.c
deleted file mode 100644
index 0a0bbb8865a..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-9-lib.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "lib/strcat.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-9.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-9.c
deleted file mode 100644
index ba70c397724..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-9.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation.
-
- Ensure all expected transformations of builtin strcat occur and
- perform correctly.
-
- Written by Kaveh R. Ghazi, 11/27/2000. */
-
-extern int inside_main;
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern char *strcat (char *, const char *);
-extern char *strcpy (char *, const char *);
-extern int strcmp (const char *, const char *);
-extern void *memset (void *, int, size_t);
-extern int memcmp (const void *, const void *, size_t);
-#define RESET_DST_WITH(FILLER) \
- do { memset (dst, 'X', sizeof (dst)); strcpy (dst, (FILLER)); } while (0)
-
-void main_test (void)
-{
- const char *const s1 = "hello world";
- const char *const s2 = "";
- char dst[64], *d2;
-
- RESET_DST_WITH (s1);
- if (strcat (dst, "") != dst || strcmp (dst, s1))
- abort();
- RESET_DST_WITH (s1);
- if (strcat (dst, s2) != dst || strcmp (dst, s1))
- abort();
- RESET_DST_WITH (s1); d2 = dst;
- if (strcat (++d2, s2) != dst+1 || d2 != dst+1 || strcmp (dst, s1))
- abort();
- RESET_DST_WITH (s1); d2 = dst;
- if (strcat (++d2+5, s2) != dst+6 || d2 != dst+1 || strcmp (dst, s1))
- abort();
- RESET_DST_WITH (s1); d2 = dst;
- if (strcat (++d2+5, s1+11) != dst+6 || d2 != dst+1 || strcmp (dst, s1))
- abort();
-
-#ifndef __OPTIMIZE_SIZE__
-# if !defined __i386__ && !defined __x86_64__
- /* The functions below might not be optimized into direct stores on all
- arches. It depends on how many instructions would be generated and
- what limits the architecture chooses in STORE_BY_PIECES_P. */
- inside_main = 0;
-# endif
-
- RESET_DST_WITH (s1);
- if (strcat (dst, " 1111") != dst
- || memcmp (dst, "hello world 1111\0XXX", 20))
- abort();
-
- RESET_DST_WITH (s1);
- if (strcat (dst+5, " 2222") != dst+5
- || memcmp (dst, "hello world 2222\0XXX", 20))
- abort();
-
- RESET_DST_WITH (s1); d2 = dst;
- if (strcat (++d2+5, " 3333") != dst+6 || d2 != dst+1
- || memcmp (dst, "hello world 3333\0XXX", 20))
- abort();
-
- RESET_DST_WITH (s1);
- strcat (strcat (strcat (strcat (strcat (strcat (dst, ": this "), ""),
- "is "), "a "), "test"), ".");
- if (memcmp (dst, "hello world: this is a test.\0X", 30))
- abort();
-
- /* Set inside_main again. */
- inside_main = 1;
-#endif
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- RESET_DST_WITH (s1);
- if (__builtin_strcat (dst, "") != dst || strcmp (dst, s1))
- abort();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1-lib.c
deleted file mode 100644
index a0318212e67..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1-lib.c
+++ /dev/null
@@ -1,31 +0,0 @@
-extern int inside_main;
-extern const char *p;
-
-char *
-my_strstr (const char *s1, const char *s2)
-{
- __SIZE_TYPE__ len = strlen (s2);
-
-#ifdef __OPTIMIZE__
- /* If optimizing, we should be called only in the strstr (foo + 2, p)
- case. All other cases should be optimized. */
- if (inside_main)
- if (s2 != p || strcmp (s1, "hello world" + 2) != 0)
- abort ();
-#endif
- if (len == 0)
- return (char *) s1;
- for (s1 = strchr (s1, *s2); s1; s1 = strchr (s1 + 1, *s2))
- if (strncmp (s1, s2, len) == 0)
- return (char *) s1;
- return (char *) 0;
-}
-
-char *
-strstr (const char *s1, const char *s2)
-{
- if (inside_main)
- abort ();
-
- return my_strstr (s1, s2);
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1.c
deleted file mode 100644
index 3c3e45dfa5d..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-1.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation.
-
- Ensure all expected transformations of builtin strstr occur and
- perform correctly in presence of redirect. */
-
-#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
-#define ASMNAME2(prefix, cname) STRING (prefix) cname
-#define STRING(x) #x
-
-typedef __SIZE_TYPE__ size_t;
-extern void abort (void);
-extern char *strstr (const char *, const char *)
- __asm (ASMNAME ("my_strstr"));
-
-const char *p = "rld", *q = "hello world";
-
-void
-main_test (void)
-{
- const char *const foo = "hello world";
-
- if (strstr (foo, "") != foo)
- abort ();
- if (strstr (foo + 4, "") != foo + 4)
- abort ();
- if (strstr (foo, "h") != foo)
- abort ();
- if (strstr (foo, "w") != foo + 6)
- abort ();
- if (strstr (foo + 6, "o") != foo + 7)
- abort ();
- if (strstr (foo + 1, "world") != foo + 6)
- abort ();
- if (strstr (foo + 2, p) != foo + 8)
- abort ();
- if (strstr (q, "") != q)
- abort ();
- if (strstr (q + 1, "o") != q + 4)
- abort ();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_strstr (foo + 1, "world") != foo + 6)
- abort ();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2-lib.c
deleted file mode 100644
index 16369a21794..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2-lib.c
+++ /dev/null
@@ -1,76 +0,0 @@
-extern int inside_main;
-typedef __SIZE_TYPE__ size_t;
-
-#define TEST_ABORT if (inside_main) abort()
-
-void *
-my_memcpy (void *d, const void *s, size_t n)
-{
- char *dst = (char *) d;
- const char *src = (const char *) s;
- while (n--)
- *dst++ = *src++;
- return (char *) d;
-}
-
-void
-my_bcopy (const void *s, void *d, size_t n)
-{
- char *dst = (char *) d;
- const char *src = (const char *) s;
- if (src >= dst)
- while (n--)
- *dst++ = *src++;
- else
- {
- dst += n;
- src += n;
- while (n--)
- *--dst = *--src;
- }
-}
-
-void *
-my_memset (void *d, int c, size_t n)
-{
- char *dst = (char *) d;
- while (n--)
- *dst++ = c;
- return (char *) d;
-}
-
-void
-my_bzero (void *d, size_t n)
-{
- char *dst = (char *) d;
- while (n--)
- *dst++ = '\0';
-}
-
-void *
-memcpy (void *d, const void *s, size_t n)
-{
- TEST_ABORT;
- return my_memcpy (d, s, n);
-}
-
-void
-bcopy (const void *s, void *d, size_t n)
-{
- TEST_ABORT;
- my_bcopy (s, d, n);
-}
-
-void *
-memset (void *d, int c, size_t n)
-{
- TEST_ABORT;
- return my_memset (d, c, n);
-}
-
-void
-bzero (void *d, size_t n)
-{
- TEST_ABORT;
- my_bzero (d, n);
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2.c b/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2.c
deleted file mode 100644
index e793778053a..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/string-asm-2.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation.
-
- Test memcpy and memset in presence of redirect. */
-
-#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
-#define ASMNAME2(prefix, cname) STRING (prefix) cname
-#define STRING(x) #x
-
-typedef __SIZE_TYPE__ size_t;
-extern void abort (void);
-extern void *memcpy (void *, const void *, size_t)
- __asm (ASMNAME ("my_memcpy"));
-extern void bcopy (const void *, void *, size_t)
- __asm (ASMNAME ("my_bcopy"));
-extern void *memset (void *, int, size_t)
- __asm (ASMNAME ("my_memset"));
-extern void bzero (void *, size_t)
- __asm (ASMNAME ("my_bzero"));
-extern int memcmp (const void *, const void *, size_t);
-
-struct A { char c[32]; } a = { "foobar" };
-char x[64] = "foobar", y[64];
-int i = 39, j = 6, k = 4;
-
-void
-main_test (void)
-{
- struct A b = a;
- struct A c = { { 'x' } };
-
- if (memcmp (b.c, x, 32) || c.c[0] != 'x' || memcmp (c.c + 1, x + 32, 31))
- abort ();
- if (__builtin_memcpy (y, x, i) != y || memcmp (x, y, 64))
- abort ();
- if (memcpy (y + 6, x, j) != y + 6
- || memcmp (x, y, 6) || memcmp (x, y + 6, 58))
- abort ();
- if (__builtin_memset (y + 2, 'X', k) != y + 2
- || memcmp (y, "foXXXXfoobar", 13))
- abort ();
- bcopy (y + 1, y + 2, 6);
- if (memcmp (y, "fooXXXXfobar", 13))
- abort ();
- __builtin_bzero (y + 4, 2);
- if (memcmp (y, "fooX\0\0Xfobar", 13))
- abort ();
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c b/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c
index bf648b3440c..3bf9a26f655 100644
--- a/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c
@@ -1,13 +1,8 @@
#include <stdlib.h>
-#if !defined(NO_LABEL_VALUES) && (!defined(STACK_SIZE) || STACK_SIZE >= 4000)
-#if __INT_MAX__ == 32767
-typedef unsigned long uint32;
-typedef signed long sint32;
-#else
+#if !defined(NO_LABEL_VALUES) && (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647
typedef unsigned int uint32;
typedef signed int sint32;
-#endif
typedef uint32 reg_t;
diff --git a/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c b/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c
index 4a8488d0ab4..76328c21c2e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c
@@ -1,3 +1,12 @@
+/* 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 S
{
int a:3;
@@ -13,3 +22,4 @@ main ()
abort ();
exit (0);
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/divconst-3.x b/gcc/testsuite/gcc.c-torture/execute/divconst-3.x
deleted file mode 100644
index ca8e06c4077..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/divconst-3.x
+++ /dev/null
@@ -1,5 +0,0 @@
-if { [istarget "h8300*-*-*"] } {
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x
index 0098d561c45..d53f8c23ee2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x
@@ -1,2 +1,5 @@
+if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+}
set additional_flags "-finstrument-functions"
return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/extzvsi.c b/gcc/testsuite/gcc.c-torture/execute/extzvsi.c
index ba251271896..81f16185d21 100644
--- a/gcc/testsuite/gcc.c-torture/execute/extzvsi.c
+++ b/gcc/testsuite/gcc.c-torture/execute/extzvsi.c
@@ -1,3 +1,12 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
/* Failed on powerpc due to bad extzvsi pattern. */
struct ieee
@@ -29,3 +38,4 @@ main (void)
abort ();
return 0;
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-3.x b/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-3.x
index 35f7a0a7d99..3fc750e85af 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-3.x
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-3.x
@@ -1,2 +1,2 @@
-lappend additional_flags "-fno-trapping-math"
+set options "-fno-trapping-math"
return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x b/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x
index 35f7a0a7d99..3fc750e85af 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/compare-fp-4.x
@@ -1,2 +1,2 @@
-lappend additional_flags "-fno-trapping-math"
+set options "-fno-trapping-math"
return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.c
index 45527a23aff..d4bb9c6c6b5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.c
@@ -1,5 +1,9 @@
+#ifndef FLOAT
+#define FLOAT double
+#endif
+
void
-test_isunordered(double x, double y, int true)
+test_isunordered(FLOAT x, FLOAT y, int true)
{
if (__builtin_isunordered(x, y))
{
@@ -14,7 +18,7 @@ test_isunordered(double x, double y, int true)
}
void
-test_isless(double x, double y, int true)
+test_isless(FLOAT x, FLOAT y, int true)
{
if (__builtin_isless(x, y))
{
@@ -29,7 +33,7 @@ test_isless(double x, double y, int true)
}
void
-test_islessequal(double x, double y, int true)
+test_islessequal(FLOAT x, FLOAT y, int true)
{
if (__builtin_islessequal(x, y))
{
@@ -44,7 +48,7 @@ test_islessequal(double x, double y, int true)
}
void
-test_isgreater(double x, double y, int true)
+test_isgreater(FLOAT x, FLOAT y, int true)
{
if (__builtin_isgreater(x, y))
{
@@ -59,7 +63,7 @@ test_isgreater(double x, double y, int true)
}
void
-test_isgreaterequal(double x, double y, int true)
+test_isgreaterequal(FLOAT x, FLOAT y, int true)
{
if (__builtin_isgreaterequal(x, y))
{
@@ -74,7 +78,7 @@ test_isgreaterequal(double x, double y, int true)
}
void
-test_islessgreater(double x, double y, int true)
+test_islessgreater(FLOAT x, FLOAT y, int true)
{
if (__builtin_islessgreater(x, y))
{
@@ -95,7 +99,7 @@ main()
{
struct try
{
- double x, y;
+ FLOAT x, y;
unsigned unord : 1;
unsigned lt : 1;
unsigned le : 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4q.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4q.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4q.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8.c
index 225539b83eb..7e24c66d98d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8.c
@@ -1,81 +1,85 @@
+#ifndef FLOAT
+#define FLOAT double
+#endif
+
/* Like fp-cmp-4.c, but test that the cmove patterns are correct. */
-static double
-test_isunordered(double x, double y, double a, double b)
+static FLOAT
+test_isunordered(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return __builtin_isunordered(x, y) ? a : b;
}
-static double
-test_not_isunordered(double x, double y, double a, double b)
+static FLOAT
+test_not_isunordered(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return !__builtin_isunordered(x, y) ? a : b;
}
-static double
-test_isless(double x, double y, double a, double b)
+static FLOAT
+test_isless(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return __builtin_isless(x, y) ? a : b;
}
-static double
-test_not_isless(double x, double y, double a, double b)
+static FLOAT
+test_not_isless(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return !__builtin_isless(x, y) ? a : b;
}
-static double
-test_islessequal(double x, double y, double a, double b)
+static FLOAT
+test_islessequal(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return __builtin_islessequal(x, y) ? a : b;
}
-static double
-test_not_islessequal(double x, double y, double a, double b)
+static FLOAT
+test_not_islessequal(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return !__builtin_islessequal(x, y) ? a : b;
}
-static double
-test_isgreater(double x, double y, double a, double b)
+static FLOAT
+test_isgreater(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return __builtin_isgreater(x, y) ? a : b;
}
-static double
-test_not_isgreater(double x, double y, double a, double b)
+static FLOAT
+test_not_isgreater(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return !__builtin_isgreater(x, y) ? a : b;
}
-static double
-test_isgreaterequal(double x, double y, double a, double b)
+static FLOAT
+test_isgreaterequal(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return __builtin_isgreaterequal(x, y) ? a : b;
}
-static double
-test_not_isgreaterequal(double x, double y, double a, double b)
+static FLOAT
+test_not_isgreaterequal(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return !__builtin_isgreaterequal(x, y) ? a : b;
}
-static double
-test_islessgreater(double x, double y, double a, double b)
+static FLOAT
+test_islessgreater(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return __builtin_islessgreater(x, y) ? a : b;
}
-static double
-test_not_islessgreater(double x, double y, double a, double b)
+static FLOAT
+test_not_islessgreater(FLOAT x, FLOAT y, FLOAT a, FLOAT b)
{
return !__builtin_islessgreater(x, y) ? a : b;
}
static void
-one_test(double x, double y, int expected,
- double (*pos) (double, double, double, double),
- double (*neg) (double, double, double, double))
+one_test(FLOAT x, FLOAT y, int expected,
+ FLOAT (*pos) (FLOAT, FLOAT, FLOAT, FLOAT),
+ FLOAT (*neg) (FLOAT, FLOAT, FLOAT, FLOAT))
{
if (((*pos)(x, y, 1.0, 2.0) == 1.0) != expected)
abort ();
@@ -91,7 +95,7 @@ main()
{
struct try
{
- double x, y;
+ FLOAT x, y;
int result[6];
};
@@ -115,8 +119,8 @@ main()
struct test
{
- double (*pos)(double, double, double, double);
- double (*neg)(double, double, double, double);
+ FLOAT (*pos)(FLOAT, FLOAT, FLOAT, FLOAT);
+ FLOAT (*neg)(FLOAT, FLOAT, FLOAT, FLOAT);
};
static struct test const tests[] =
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8q.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8q.c
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-8q.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
index 6b23a4ec5e2..207c6751d48 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
@@ -24,8 +24,8 @@
# C torture test suite, and other contributors.
#
-# VAX does not have hardware support for IEEE arithmetic.
-if { [istarget "vax-*-*"] } { return }
+# Disable tests on machines with no hardware support for IEEE arithmetic.
+if { [istarget "vax-*-*"] || [ istarget "powerpc-*-*spe"] } { return }
if $tracelevel then {
strace $tracelevel
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2e.x b/gcc/testsuite/gcc.c-torture/execute/loop-2e.x
index d7b9f285097..9836850d8b2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2e.x
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-2e.x
@@ -1,11 +1,4 @@
-# This doesn't work on m68k-motorola-sysv
-# It also doesn't work on m88k-motorola-sysv3
-
global target_triplet
-if { [istarget "m68k-motorola-sysv"] || [istarget "m88k-motorola-sysv3"] } {
- set torture_compile_xfail "$target_triplet"
-}
-
if { [istarget "i?86-*"] } {
set torture_eval_before_execute {
global compiler_conditional_xfail_data
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2f.x b/gcc/testsuite/gcc.c-torture/execute/loop-2f.x
deleted file mode 100644
index e68b8fbb8d2..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2f.x
+++ /dev/null
@@ -1,9 +0,0 @@
-# This doesn't work on m68k-motorola-sysv
-# It also doesn't work on m88k-motorola-sysv3
-
-global target_triplet
-if { [istarget "m68k-motorola-sysv"] || [istarget "m88k-motorola-sysv3"] } {
- set torture_compile_xfail "$target_triplet"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2g.x b/gcc/testsuite/gcc.c-torture/execute/loop-2g.x
deleted file mode 100644
index e68b8fbb8d2..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2g.x
+++ /dev/null
@@ -1,9 +0,0 @@
-# This doesn't work on m68k-motorola-sysv
-# It also doesn't work on m88k-motorola-sysv3
-
-global target_triplet
-if { [istarget "m68k-motorola-sysv"] || [istarget "m88k-motorola-sysv3"] } {
- set torture_compile_xfail "$target_triplet"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/multi-ix.c b/gcc/testsuite/gcc.c-torture/execute/multi-ix.c
index 65e9438312b..d61a3136706 100644
--- a/gcc/testsuite/gcc.c-torture/execute/multi-ix.c
+++ b/gcc/testsuite/gcc.c-torture/execute/multi-ix.c
@@ -161,7 +161,7 @@ void z(int n, ...)
while (n--)
{
int *a = va_arg (list, int *);
- bzero (a, sizeof (l));
+ __builtin_bzero (a, sizeof (l));
}
va_end (list);
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c b/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c
index 2c6108b52e6..492670b5a1e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c
@@ -2,7 +2,7 @@
main ()
{
- static double f (int x, ...)
+ double f (int x, ...)
{
va_list args;
double a;
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-1.c b/gcc/testsuite/gcc.c-torture/execute/simd-1.c
index e103fd7244a..df9f1a90798 100644
--- a/gcc/testsuite/gcc.c-torture/execute/simd-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-1.c
@@ -4,7 +4,7 @@
regardless of if the target has SIMD instructions.
*/
-typedef int __attribute__((mode(V4SI))) vecint;
+typedef int __attribute__((vector_size (16))) vecint;
typedef int __attribute__((mode(SI))) siint;
vecint i = { 150, 100, 150, 200 };
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-2.c b/gcc/testsuite/gcc.c-torture/execute/simd-2.c
index 2d1b92228f7..d4f506a7641 100644
--- a/gcc/testsuite/gcc.c-torture/execute/simd-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-2.c
@@ -3,7 +3,7 @@
regardless of if the target has SIMD instructions.
*/
-typedef int __attribute__((mode(V8HI))) vecint;
+typedef short __attribute__((vector_size (16))) vecint;
vecint i = { 150, 100, 150, 200, 0, 0, 0, 0 };
vecint j = { 10, 13, 20, 30, 1, 1, 1, 1 };
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-4.x b/gcc/testsuite/gcc.c-torture/execute/simd-4.x
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-4.x
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-5.x b/gcc/testsuite/gcc.c-torture/execute/simd-5.x
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-5.x
diff --git a/gcc/testsuite/gcc.c-torture/execute/stdarg-2.c b/gcc/testsuite/gcc.c-torture/execute/stdarg-2.c
index 3d32ec8b422..24ba732438c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/stdarg-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/stdarg-2.c
@@ -13,17 +13,14 @@ foo (int v, va_list ap)
switch (v)
{
case 5:
- foo_arg = va_arg (ap, int);
- foo_arg += va_arg (ap, double);
+ foo_arg = va_arg (ap, int) + va_arg (ap, double);
foo_arg += va_arg (ap, long long);
break;
case 8:
- foo_arg = va_arg (ap, long long);
- foo_arg += va_arg (ap, double);
+ foo_arg = va_arg (ap, long long) + va_arg (ap, double);
break;
case 11:
- foo_arg = va_arg (ap, int);
- foo_arg += va_arg (ap, long double);
+ foo_arg = va_arg (ap, int) + va_arg (ap, long double);
break;
default:
abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c
deleted file mode 100644
index 8cfb4ebe08e..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation.
-
- Ensure all expected transformations of builtin fputs occur and that
- we honor side effects in the stream argument.
-
- Written by Kaveh R. Ghazi, 10/30/2000. */
-
-#include <stdio.h>
-extern void abort(void);
-/* Declare this without args because that's what gcc does internally.
- We want to make sure it works without a helpful prototype from us.
- If stdio.h provides one, that is okay. */
-extern int fputs();
-
-int i;
-
-int main()
-{
- FILE *s_array[] = {stdout, NULL}, **s_ptr = s_array;
- const char *const s1 = "hello world";
-
- fputs ("", *s_ptr);
- fputs ("\n", *s_ptr);
- fputs ("bye", *s_ptr);
- fputs (s1, *s_ptr);
- fputs (s1+5, *s_ptr);
- fputs (s1+10, *s_ptr);
- fputs (s1+11, *s_ptr);
-
- /* Check side-effects when transforming fputs -> NOP. */
- fputs ("", *s_ptr++);
- if (s_ptr != s_array+1 || *s_ptr != 0)
- abort();
-
- /* Check side-effects when transforming fputs -> fputc. */
- s_ptr = s_array;
- fputs ("\n", *s_ptr++);
- if (s_ptr != s_array+1 || *s_ptr != 0)
- abort();
-
- /* Check side-effects when transforming fputs -> fwrite. */
- s_ptr = s_array;
- fputs ("hello\n", *s_ptr++);
- if (s_ptr != s_array+1 || *s_ptr != 0)
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- s_ptr = s_array;
- __builtin_fputs ("", *s_ptr);
- /* These builtin stubs are called by __builtin_fputs, ensure their
- prototypes are set correctly too. */
- __builtin_fputc ('\n', *s_ptr);
- __builtin_fwrite ("hello\n", 1, 6, *s_ptr);
-
- /* Check side-effects in conditional expression. */
- s_ptr = s_array;
- fputs (i++ ? "f" : "x", *s_ptr++);
- if (s_ptr != s_array+1 || *s_ptr != 0 || i != 1)
- abort();
- fputs (--i ? "\n" : "\n", *--s_ptr);
- if (s_ptr != s_array || i != 0)
- abort();
-
- return 0;
-}
-
-#if defined (__OPTIMIZE__) && ! defined (__OPTIMIZE_SIZE__)
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static int
-fputs(const char *string, FILE *stream)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c
deleted file mode 100644
index 833017ee547..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation.
-
- Ensure all expected transformations of builtin printf occur and
- that we honor side effects in the arguments.
-
- Written by Kaveh R. Ghazi, 12/4/2000. */
-
-extern int printf (const char *, ...);
-extern void abort(void);
-
-int main()
-{
- const char *const s1 = "hello world";
- const char *const s2[] = { s1, 0 }, *const*s3;
-
- printf ("%s\n", "hello");
- printf ("%s\n", *s2);
- s3 = s2;
- printf ("%s\n", *s3++);
- if (s3 != s2+1 || *s3 != 0)
- abort();
-
- printf ("%c", '\n');
- printf ("%c", **s2);
- s3 = s2;
- printf ("%c", **s3++);
- if (s3 != s2+1 || *s3 != 0)
- abort();
-
- printf ("\n");
- printf ("hello world\n");
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- __builtin_printf ("%s\n", "hello");
- /* These builtin stubs are called by __builtin_printf, ensure their
- prototypes are set correctly too. */
- __builtin_putchar ('\n');
- __builtin_puts ("hello");
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static int
-printf (const char *string, ...)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c
deleted file mode 100644
index afc76a21716..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation.
-
- Ensure all expected transformations of builtin fprintf occur and
- that we honor side effects in the arguments.
-
- Written by Kaveh R. Ghazi, 1/7/2001. */
-
-#include <stdio.h>
-extern int fprintf (FILE *, const char *, ...);
-extern void abort(void);
-
-int main()
-{
- FILE *s_array[] = {stdout, NULL}, **s_ptr = s_array;
- const char *const s1 = "hello world";
- const char *const s2[] = { s1, 0 }, *const*s3;
-
- fprintf (*s_ptr, "%s", "hello");
- fprintf (*s_ptr, "%s", "\n");
- fprintf (*s_ptr, "%s", *s2);
- s3 = s2;
- fprintf (*s_ptr, "%s", *s3++);
- if (s3 != s2+1 || *s3 != 0)
- abort();
- s3 = s2;
- fprintf (*s_ptr++, "%s", *s3++);
- if (s3 != s2+1 || *s3 != 0 || s_ptr != s_array+1 || *s_ptr != 0)
- abort();
-
- s_ptr = s_array;
- fprintf (*s_ptr, "%c", '\n');
- fprintf (*s_ptr, "%c", **s2);
- s3 = s2;
- fprintf (*s_ptr, "%c", **s3++);
- if (s3 != s2+1 || *s3 != 0)
- abort();
- s3 = s2;
- fprintf (*s_ptr++, "%c", **s3++);
- if (s3 != s2+1 || *s3 != 0 || s_ptr != s_array+1 || *s_ptr != 0)
- abort();
-
- s_ptr = s_array;
- fprintf (*s_ptr++, "hello world");
- if (s_ptr != s_array+1 || *s_ptr != 0)
- abort();
- s_ptr = s_array;
- fprintf (*s_ptr, "\n");
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- __builtin_fprintf (*s_ptr, "%s", "hello world\n");
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static int
-fprintf (FILE *stream, const char *string, ...)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/strct-varg-1.x b/gcc/testsuite/gcc.c-torture/execute/strct-varg-1.x
deleted file mode 100644
index 850736e82dc..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/strct-varg-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-# This doesn't work on mn10200
-
-if { [istarget "mn10200*-*-*"] } {
- set torture_execute_xfail "mn10200*-*-*"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-1.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-1.c
deleted file mode 100644
index 6b59c10f29b..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-1.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation.
-
- Ensure all expected transformations of builtin strstr occur and
- perform correctly.
-
- Written by Kaveh R. Ghazi, 11/6/2000. */
-
-extern void abort(void);
-extern char *strstr (const char *, const char *);
-
-int main()
-{
- const char *const foo = "hello world";
-
- if (strstr (foo, "") != foo)
- abort();
- if (strstr (foo + 4, "") != foo + 4)
- abort();
- if (strstr (foo, "h") != foo)
- abort();
- if (strstr (foo, "w") != foo + 6)
- abort();
- if (strstr (foo + 6, "o") != foo + 7)
- abort();
- if (strstr (foo + 1, "world") != foo + 6)
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_strstr (foo + 1, "world") != foo + 6)
- abort();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static char *
-strstr(const char *s1, const char *s2)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-10.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-10.c
deleted file mode 100644
index b883dd61e01..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-10.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation.
-
- Ensure all expected transformations of builtin strncat occur and
- perform correctly.
-
- Written by Kaveh R. Ghazi, 11/27/2000. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern char *strncat (char *, const char *, size_t);
-extern char *strcpy (char *, const char *);
-extern int strcmp (const char *, const char *);
-int x = 123;
-
-int main ()
-{
- const char *const s1 = "hello world";
- const char *const s2 = "";
- char dst[64], *d2;
-
- strcpy (dst, s1);
- if (strncat (dst, "", 100) != dst || strcmp (dst, s1))
- abort();
- strcpy (dst, s1);
- if (strncat (dst, s2, 100) != dst || strcmp (dst, s1))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2, s2, 100) != dst+1 || d2 != dst+1 || strcmp (dst, s1))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2+5, s2, 100) != dst+6 || d2 != dst+1 || strcmp (dst, s1))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2+5, s1+11, 100) != dst+6 || d2 != dst+1 || strcmp (dst, s1))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2+5, s1, 0) != dst+6 || d2 != dst+1 || strcmp (dst, s1))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2+5, "", ++x) != dst+6 || d2 != dst+1 || x != 124
- || strcmp (dst, s1))
- abort();
-
- strcpy (dst, s1);
- if (strncat (dst, "foo", 3) != dst || strcmp (dst, "hello worldfoo"))
- abort();
- strcpy (dst, s1);
- if (strncat (dst, "foo", 100) != dst || strcmp (dst, "hello worldfoo"))
- abort();
- strcpy (dst, s1);
- if (strncat (dst, s1, 100) != dst || strcmp (dst, "hello worldhello world"))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2, s1, 100) != dst+1 || d2 != dst+1
- || strcmp (dst, "hello worldhello world"))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2+5, s1, 100) != dst+6 || d2 != dst+1
- || strcmp (dst, "hello worldhello world"))
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strncat (++d2+5, s1+5, 100) != dst+6 || d2 != dst+1
- || strcmp (dst, "hello world world"))
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- strcpy (dst, s1);
- if (__builtin_strncat (dst, "", 100) != dst || strcmp (dst, s1))
- abort();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static char *
-strncat (char *s1, const char *s2, size_t n)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-11.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-11.c
deleted file mode 100644
index 0aa186299df..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-11.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation.
-
- Ensure all expected transformations of builtin strspn occur and
- perform correctly.
-
- Written by Kaveh R. Ghazi, 11/27/2000. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern size_t strspn (const char *, const char *);
-extern char *strcpy (char *, const char *);
-
-int main ()
-{
- const char *const s1 = "hello world";
- char dst[64], *d2;
-
- if (strspn (s1, "hello") != 5)
- abort();
- if (strspn (s1+4, "hello") != 1)
- abort();
- if (strspn (s1, "z") != 0)
- abort();
- if (strspn (s1, "hello world") != 11)
- abort();
- if (strspn (s1, "") != 0)
- abort();
- strcpy (dst, s1);
- if (strspn (dst, "") != 0)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strspn (++d2, "") != 0 || d2 != dst+1)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strspn (++d2+5, "") != 0 || d2 != dst+1)
- abort();
- if (strspn ("", s1) != 0)
- abort();
- strcpy (dst, s1);
- if (strspn ("", dst) != 0)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strspn ("", ++d2) != 0 || d2 != dst+1)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strspn ("", ++d2+5) != 0 || d2 != dst+1)
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_strspn (s1, "hello") != 5)
- abort();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static size_t
-strspn (const char *s1, const char *s2)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-12.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-12.c
deleted file mode 100644
index 1d20f1e6708..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-12.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation.
-
- Ensure all expected transformations of builtin strcspn occur and
- perform correctly.
-
- Written by Kaveh R. Ghazi, 11/27/2000. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern size_t strcspn (const char *, const char *);
-extern char *strcpy (char *, const char *);
-
-int main ()
-{
- const char *const s1 = "hello world";
- char dst[64], *d2;
-
- if (strcspn (s1, "hello") != 0)
- abort();
- if (strcspn (s1, "z") != 11)
- abort();
- if (strcspn (s1+4, "z") != 7)
- abort();
- if (strcspn (s1, "hello world") != 0)
- abort();
- if (strcspn (s1, "") != 11)
- abort();
- strcpy (dst, s1);
- if (strcspn (dst, "") != 11)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strcspn (++d2, "") != 10 || d2 != dst+1)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strcspn (++d2+5, "") != 5 || d2 != dst+1)
- abort();
- if (strcspn ("", s1) != 0)
- abort();
- strcpy (dst, s1);
- if (strcspn ("", dst) != 0)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strcspn ("", ++d2) != 0 || d2 != dst+1)
- abort();
- strcpy (dst, s1); d2 = dst;
- if (strcspn ("", ++d2+5) != 0 || d2 != dst+1)
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_strcspn (s1, "z") != 11)
- abort();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static size_t
-strcspn (const char *s1, const char *s2)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c
deleted file mode 100644
index 9d79ef0d817..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation.
-
- Ensure all builtin strlen comparisons against zero are optimized
- and perform correctly. The multiple calls to strcpy are to prevent
- the potentially "pure" strlen calls from being removed by CSE.
-
- Written by Roger Sayle, 11/02/2001. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern size_t strlen (const char *);
-extern char *strcpy (char *, const char *);
-
-int
-main ()
-{
- char str[8];
- char *ptr;
-
- ptr = str;
- strcpy (ptr, "nts");
- if (strlen (ptr) == 0)
- abort ();
-
- strcpy (ptr, "nts");
- if (strlen (ptr) < 1)
- abort ();
-
- strcpy (ptr, "nts");
- if (strlen (ptr) <= 0)
- abort ();
-
- strcpy (ptr, "nts");
- if (strlen (ptr+3) != 0)
- abort ();
-
- strcpy (ptr, "nts");
- if (strlen (ptr+3) > 0)
- abort ();
-
- strcpy (ptr, "nts");
- if (strlen (str+3) >= 1)
- abort ();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static size_t
-strlen (const char *s)
-{
- abort ();
-}
-#endif
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-14.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-14.c
deleted file mode 100644
index cb0bfcb9dff..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-14.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation.
-
- Ensure builtin memset and memcpy are optimized away correctly.
-
- Written by Roger Sayle, 11/23/2001. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern void *memset (void *s, int c, size_t n);
-extern void *memcpy (void *dest, const void *src, size_t n);
-
-char dst[32];
-char src[32];
-
-int
-main ()
-{
- memset (src, 0, 0);
- memcpy (dst, src, 0);
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-
-__attribute__ ((noinline))
-static void *
-memset (void *s, int c, size_t n)
-{
- abort ();
-}
-
-__attribute__ ((noinline))
-static void *
-memcpy (void *dest, const void *src, size_t n)
-{
- abort ();
-}
-#endif
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-15.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-15.c
deleted file mode 100644
index 2cf73da151c..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-15.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation.
-
- Ensure that short builtin memcmp are optimized and perform correctly.
- On architectures with a cmpstrsi instruction, this test doesn't determine
- which optimization is being performed, but it does check for correctness.
-
- Written by Roger Sayle, 12/02/2001. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern int memcmp (const void *, const void *, size_t);
-extern char *strcpy (char *, const char *);
-
-int
-main ()
-{
- char str[8];
-
- strcpy (str, "3141");
-
- if ( memcmp (str, str+2, 0) != 0 )
- abort ();
- if ( memcmp (str+1, str+3, 0) != 0 )
- abort ();
-
- if ( memcmp (str+1, str+3, 1) != 0 )
- abort ();
- if ( memcmp (str, str+2, 1) >= 0 )
- abort ();
- if ( memcmp (str+2, str, 1) <= 0 )
- abort ();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static int
-memcmp (const char *p1, const char *p2, size_t len)
-{
- abort ();
-}
-#endif
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c
deleted file mode 100644
index 8556b8f6517..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation.
-
- Test sprintf optimizations don't break anything and return the
- correct results.
-
- Written by Roger Sayle, June 22, 2003. */
-
-static char buffer[32];
-
-extern void abort ();
-typedef __SIZE_TYPE__ size_t;
-extern int sprintf(char*, const char*, ...);
-extern void *memset(void*, int, size_t);
-extern int memcmp(const void*, const void*, size_t);
-
-void test1()
-{
- sprintf(buffer,"foo");
-}
-
-int test2()
-{
- return sprintf(buffer,"foo");
-}
-
-void test3()
-{
- sprintf(buffer,"%s","bar");
-}
-
-int test4()
-{
- return sprintf(buffer,"%s","bar");
-}
-
-void test5(char *ptr)
-{
- sprintf(buffer,"%s",ptr);
-}
-
-
-int main()
-{
- memset (buffer, 'A', 32);
- test1 ();
- if (memcmp(buffer, "foo", 4) || buffer[4] != 'A')
- abort ();
-
- memset (buffer, 'A', 32);
- if (test2 () != 3)
- abort ();
- if (memcmp(buffer, "foo", 4) || buffer[4] != 'A')
- abort ();
-
- memset (buffer, 'A', 32);
- test3 ();
- if (memcmp(buffer, "bar", 4) || buffer[4] != 'A')
- abort ();
-
- memset (buffer, 'A', 32);
- if (test4 () != 3)
- abort ();
- if (memcmp(buffer, "bar", 4) || buffer[4] != 'A')
- abort ();
-
- memset (buffer, 'A', 32);
- test5 ("barf");
- if (memcmp(buffer, "barf", 5) || buffer[5] != 'A')
- abort ();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static int
-sprintf (char *buf, const char *fmt, ...)
-{
- abort ();
-}
-#endif
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-2.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-2.c
deleted file mode 100644
index d8ebb77be51..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-2.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation.
-
- Ensure all expected transformations of builtin strpbrk occur and
- perform correctly.
-
- Written by Kaveh R. Ghazi, 11/6/2000. */
-
-extern void abort(void);
-extern char *strpbrk (const char *, const char *);
-extern int strcmp (const char *, const char *);
-
-void fn (const char *foo, const char *const *bar)
-{
- if (strcmp(strpbrk ("hello world", "lrooo"), "llo world") != 0)
- abort();
- if (strpbrk (foo, "") != 0)
- abort();
- if (strpbrk (foo + 4, "") != 0)
- abort();
- if (strpbrk (*bar--, "") != 0)
- abort();
- if (strpbrk (*bar, "h") != foo)
- abort();
- if (strpbrk (foo, "h") != foo)
- abort();
- if (strpbrk (foo, "w") != foo + 6)
- abort();
- if (strpbrk (foo + 6, "o") != foo + 7)
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_strpbrk (foo + 6, "o") != foo + 7)
- abort();
-}
-
-int main()
-{
- const char *const foo[] = { "hello world", "bye bye world" };
- fn (foo[0], foo + 1);
- return 0;
-}
-
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static char *
-strpbrk(const char *s1, const char *s2)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c
deleted file mode 100644
index c684dbd4f13..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation.
-
- Ensure builtin memcpy and strcpy perform correctly.
-
- Written by Jakub Jelinek, 11/24/2000. */
-
-extern void abort (void);
-extern char *strcpy (char *, const char *);
-typedef __SIZE_TYPE__ size_t;
-extern void *memcpy (void *, const void *, size_t);
-extern int memcmp (const void *, const void *, size_t);
-
-char p[32] = "";
-
-int main()
-{
- if (strcpy (p, "abcde") != p || memcmp (p, "abcde", 6))
- abort ();
- if (strcpy (p + 16, "vwxyz" + 1) != p + 16 || memcmp (p + 16, "wxyz", 5))
- abort ();
- if (strcpy (p + 1, "") != p + 1 || memcmp (p, "a\0cde", 6))
- abort ();
- if (strcpy (p + 3, "fghij") != p + 3 || memcmp (p, "a\0cfghij", 9))
- abort ();
- if (memcpy (p, "ABCDE", 6) != p || memcmp (p, "ABCDE", 6))
- abort ();
- if (memcpy (p + 16, "VWX" + 1, 2) != p + 16 || memcmp (p + 16, "WXyz", 5))
- abort ();
- if (memcpy (p + 1, "", 1) != p + 1 || memcmp (p, "A\0CDE", 6))
- abort ();
- if (memcpy (p + 3, "FGHI", 4) != p + 3 || memcmp (p, "A\0CFGHIj", 9))
- abort ();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- if (__builtin_strcpy (p, "abcde") != p || memcmp (p, "abcde", 6))
- abort ();
- if (__builtin_memcpy (p, "ABCDE", 6) != p || memcmp (p, "ABCDE", 6))
- abort ();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static char *
-strcpy (char *d, const char *s)
-{
- abort ();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-7.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-7.c
deleted file mode 100644
index 5b915d7a7d3..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-7.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation.
-
- Ensure all expected transformations of builtin strncpy occur and
- perform correctly.
-
- Written by Kaveh R. Ghazi, 11/25/2000. */
-
-extern void abort (void);
-typedef __SIZE_TYPE__ size_t;
-extern char *strncpy (char *, const char *, size_t);
-extern int strcmp (const char *, const char *);
-extern int strncmp (const char *, const char *, size_t);
-extern void *memset (void *, int, size_t);
-
-int i;
-
-int main ()
-{
- const char *const src = "hello world";
- const char *src2;
- char dst[64], *dst2;
-
- memset (dst, 0, sizeof (dst));
- if (strncpy (dst, src, 4) != dst || strncmp (dst, src, 4))
- abort();
-
- memset (dst, 0, sizeof (dst));
- if (strncpy (dst+16, src, 4) != dst+16 || strncmp (dst+16, src, 4))
- abort();
-
- memset (dst, 0, sizeof (dst));
- if (strncpy (dst+32, src+5, 4) != dst+32 || strncmp (dst+32, src+5, 4))
- abort();
-
- memset (dst, 0, sizeof (dst));
- dst2 = dst;
- if (strncpy (++dst2, src+5, 4) != dst+1 || strncmp (dst2, src+5, 4)
- || dst2 != dst+1)
- abort();
-
- memset (dst, 0, sizeof (dst));
- if (strncpy (dst, src, 0) != dst || strcmp (dst, ""))
- abort();
-
- memset (dst, 0, sizeof (dst));
- dst2 = dst; src2 = src;
- if (strncpy (++dst2, ++src2, 0) != dst+1 || strcmp (dst2, "")
- || dst2 != dst+1 || src2 != src+1)
- abort();
-
- memset (dst, 0, sizeof (dst));
- dst2 = dst; src2 = src;
- if (strncpy (++dst2+5, ++src2+5, 0) != dst+6 || strcmp (dst2+5, "")
- || dst2 != dst+1 || src2 != src+1)
- abort();
-
- memset (dst, 0, sizeof (dst));
- if (strncpy (dst, src, 12) != dst || strcmp (dst, src))
- abort();
-
- /* Test at least one instance of the __builtin_ style. We do this
- to ensure that it works and that the prototype is correct. */
- memset (dst, 0, sizeof (dst));
- if (__builtin_strncpy (dst, src, 4) != dst || strncmp (dst, src, 4))
- abort();
-
- memset (dst, 0, sizeof (dst));
- if (strncpy (dst, i++ ? "xfoo" + 1 : "bar", 4) != dst
- || strcmp (dst, "bar")
- || i != 1)
- abort ();
-
- return 0;
-}
-
-#ifdef __OPTIMIZE__
-/* When optimizing, all the above cases should be transformed into
- something else. So any remaining calls to the original function
- should abort. */
-__attribute__ ((noinline))
-static char *
-strncpy(char *s1, const char *s2, size_t n)
-{
- abort();
-}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c
index 434de33db9b..2316fce87ca 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c
@@ -65,7 +65,7 @@ int main ()
s2 = s1; s3 = s1+4;
if (strncmp (++s2, ++s3+2, 1) >= 0 || s2 != s1+1 || s3 != s1+5)
abort();
-#if !defined(__OPTIMIZE__) || defined(__i386__)
+#if !defined(__OPTIMIZE__) || (defined(__i386__) && !defined(__OPTIMIZE_SIZE__))
/* These tests work on platforms which support cmpstrsi. We test it
at -O0 on all platforms to ensure the strncmp logic is correct. */
s2 = s1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-24.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-24.c
deleted file mode 100644
index c8fdaf0f95c..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-24.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Varargs and vectors! */
-
-#include <stdarg.h>
-
-#define vector __attribute__((vector_size(16)))
-
-const vector unsigned int v1 = {10,11,12,13};
-const vector unsigned int v2 = {20,21,22,23};
-
-void foo(int a, ...)
-{
- va_list args;
- vector unsigned int v;
-
- va_start (args, a);
- v = va_arg (args, vector unsigned int);
- if (a != 1 || memcmp (&v, &v1, sizeof (v)) != 0)
- abort ();
- a = va_arg (args, int);
- if (a != 2)
- abort ();
- v = va_arg (args, vector unsigned int);
- if (memcmp (&v, &v2, sizeof (v) != 0))
- abort ();
- va_end (args);
-}
-
-int main(void)
-{
- foo (1, (vector unsigned int){10,11,12,13}, 2,
- (vector unsigned int){14,15,16,17});
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-25.x b/gcc/testsuite/gcc.c-torture/execute/va-arg-25.x
index fe8d7f918f2..1658fbcc8ca 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-25.x
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-25.x
@@ -1,12 +1,13 @@
-# With -Os we default to -mpreferred-stack-boundary=2, which is not
-# enough for proper operation with V4SImode when the architecture
-# default enables SSE. Arguably setting -mpreferred-stack-boundary=2
-# under this condition is incorrect. Finding the correct set of
-# options such that we don't exchange a FAIL for an XPASS is hard;
-# simply force the stack boundary we need and forget about it for now.
+# This doesn't work on sparc*-*-*.
-if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
- set additional_flags "-mpreferred-stack-boundary=4"
+set torture_eval_before_compile {
+ global compiler_conditional_xfail_data
+ set compiler_conditional_xfail_data {
+ "PR target/12916" \
+ { "sparc*-*-*" } \
+ { "*" } \
+ { "" }
+ }
}
return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c b/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c
index 51f91d6ad46..7e90cc08f5e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c
@@ -1,6 +1,7 @@
+/* { dg-options "-finput-charset=utf-8" } */
typedef __WCHAR_TYPE__ wchar_t;
-wchar_t x[] = L"Ä";
-wchar_t y = L'Ä';
+wchar_t x[] = L"Ä";
+wchar_t y = L'Ä';
extern void abort (void);
extern void exit (int);
@@ -8,9 +9,9 @@ int main (void)
{
if (sizeof (x) / sizeof (wchar_t) != 2)
abort ();
- if (x[0] != L'Ä' || x[1] != L'\0')
+ if (x[0] != L'Ä' || x[1] != L'\0')
abort ();
- if (y != L'Ä')
+ if (y != L'Ä')
abort ();
exit (0);
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.x b/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.x
deleted file mode 100644
index 38c693d2f00..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.x
+++ /dev/null
@@ -1,3 +0,0 @@
-# Doesn't compile due to use of literal ISO8859.1 characters. PR 11439.
-set torture_compile_xfail "*-*-*"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/call386.c b/gcc/testsuite/gcc.c-torture/unsorted/call386.c
index 18498932c5b..c82a3be3450 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/call386.c
+++ b/gcc/testsuite/gcc.c-torture/unsorted/call386.c
@@ -1,7 +1,6 @@
+void foo () {}
-foo () {}
-
-main ()
+int main ()
{
int i;
for (i = 100000; i >= 0; i--)
@@ -17,4 +16,5 @@ main ()
foo ();
foo ();
}
+ return 0;
}
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/ext.c b/gcc/testsuite/gcc.c-torture/unsorted/ext.c
index 8fa8cd73363..9e8604ef2b2 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/ext.c
+++ b/gcc/testsuite/gcc.c-torture/unsorted/ext.c
@@ -1,3 +1,12 @@
+/* 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 b31 : 1;
@@ -11,3 +20,4 @@ foo(a)
{
return a.b30;
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/subcc.c b/gcc/testsuite/gcc.c-torture/unsorted/subcc.c
index d50114eee42..d89b50dbdff 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/subcc.c
+++ b/gcc/testsuite/gcc.c-torture/unsorted/subcc.c
@@ -1,4 +1,4 @@
-foo (a, c)
+int foo (a, c)
{
int b;
@@ -7,7 +7,8 @@ foo (a, c)
return 0;
}
-bar (a)
+void bar (a)
+ int a;
{
if (foo (a, 10) & 0x80000000)
printf ("y");
@@ -15,7 +16,7 @@ bar (a)
printf ("n");
}
-main ()
+int main ()
{
bar (0);
bar (1);
@@ -28,4 +29,5 @@ main ()
bar (-0x7fffffff);
puts ("");
+ return 0;
}
diff --git a/gcc/testsuite/gcc.dg/20000724-1.c b/gcc/testsuite/gcc.dg/20000724-1.c
index 5027d6e9746..3c4f2c39409 100644
--- a/gcc/testsuite/gcc.dg/20000724-1.c
+++ b/gcc/testsuite/gcc.dg/20000724-1.c
@@ -22,7 +22,7 @@ int baz(void *x)
void do_check (struct s *) asm ("do_check") __attribute__((regparm(1)));
-void do_check(struct s *x)
+void __attribute__((regparm(1))) do_check(struct s *x)
{
if (x->a.a || x->b || x->c.a.a)
abort();
diff --git a/gcc/testsuite/gcc.dg/20001012-1.c b/gcc/testsuite/gcc.dg/20001012-1.c
index 2fa7d76b0cc..061840e602b 100644
--- a/gcc/testsuite/gcc.dg/20001012-1.c
+++ b/gcc/testsuite/gcc.dg/20001012-1.c
@@ -1,6 +1,9 @@
/* { dg-do run { target sparc*-*-* } } */
/* { dg-options "-O2 -fpic" } */
+extern void abort (void);
+extern void exit (int);
+
double
foo (void)
{
diff --git a/gcc/testsuite/gcc.dg/20001012-2.c b/gcc/testsuite/gcc.dg/20001012-2.c
index b92c4a049f5..df6130d4f0a 100644
--- a/gcc/testsuite/gcc.dg/20001012-2.c
+++ b/gcc/testsuite/gcc.dg/20001012-2.c
@@ -1,6 +1,9 @@
/* { dg-do run { target sparc*-*-* } } */
/* { dg-options "-O2 -fpic" } */
+extern void abort (void);
+extern void exit (int);
+
void foo (char *x, const char *y, ...)
{
}
diff --git a/gcc/testsuite/gcc.dg/20001013-1.c b/gcc/testsuite/gcc.dg/20001013-1.c
index 163a262ebe8..371672cab75 100644
--- a/gcc/testsuite/gcc.dg/20001013-1.c
+++ b/gcc/testsuite/gcc.dg/20001013-1.c
@@ -1,7 +1,8 @@
-/* ??? It'd be nice to run this for sparc32 as well, if we could know
- for sure that we're on an ultrasparc, rather than an older cpu. */
-/* { dg-do run { target sparcv9-*-* sparc64-*-* } } */
-/* { dg-options "-O2 -m32 -mcpu=ultrasparc -mvis" } */
+/* { dg-do run { target sparc*-*-* } } */
+/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
+
+extern void abort (void);
+extern void exit (int);
int l;
diff --git a/gcc/testsuite/gcc.dg/20001023-1.c b/gcc/testsuite/gcc.dg/20001023-1.c
index ce5e532ea6c..10cb2725939 100644
--- a/gcc/testsuite/gcc.dg/20001023-1.c
+++ b/gcc/testsuite/gcc.dg/20001023-1.c
@@ -1,6 +1,9 @@
/* { dg-do run } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
+extern void abort (void);
+extern void exit (int);
+
unsigned char a[256], b[256], c[256], d[256];
void foo(unsigned char *x, int y, unsigned char *z)
diff --git a/gcc/testsuite/gcc.dg/20001101-1.c b/gcc/testsuite/gcc.dg/20001101-1.c
index 6cafff0d423..d0eb6e23ce0 100644
--- a/gcc/testsuite/gcc.dg/20001101-1.c
+++ b/gcc/testsuite/gcc.dg/20001101-1.c
@@ -1,7 +1,8 @@
-/* ??? It'd be nice to run this for sparc32 as well, if we could know
- for sure that we're on an ultrasparc, rather than an older cpu. */
-/* { dg-do run { target sparcv9-*-* sparc64-*-* } } */
-/* { dg-options "-O2 -m32 -mcpu=ultrasparc -mvis" } */
+/* { dg-do run { target sparc*-*-* } } */
+/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
+
+extern void abort (void);
+extern void exit (int);
int foo(double a, int b, int c, double *d, int h)
{
diff --git a/gcc/testsuite/gcc.dg/20001102-1.c b/gcc/testsuite/gcc.dg/20001102-1.c
index 2d9e45b0de3..c976dad45b2 100644
--- a/gcc/testsuite/gcc.dg/20001102-1.c
+++ b/gcc/testsuite/gcc.dg/20001102-1.c
@@ -1,7 +1,8 @@
-/* ??? It'd be nice to run this for sparc32 as well, if we could know
- for sure that we're on an ultrasparc, rather than an older cpu. */
-/* { dg-do run { target sparcv9-*-* sparc64-*-* } } */
-/* { dg-options "-O2 -m32 -mcpu=ultrasparc -mvis" } */
+/* { dg-do run { target sparc*-*-* } } */
+/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
+
+extern void abort (void);
+extern void exit (int);
int foo(double a, int b, int c, double *d, int h)
{
diff --git a/gcc/testsuite/gcc.dg/20001108-1.c b/gcc/testsuite/gcc.dg/20001108-1.c
index a21d5b0f98f..682257fdb09 100644
--- a/gcc/testsuite/gcc.dg/20001108-1.c
+++ b/gcc/testsuite/gcc.dg/20001108-1.c
@@ -1,6 +1,9 @@
/* { dg-do run } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
+extern void abort (void);
+extern void exit (int);
+
void die (long) __attribute__ ((noreturn));
void die (long e)
diff --git a/gcc/testsuite/gcc.dg/20001116-1.c b/gcc/testsuite/gcc.dg/20001116-1.c
index 5833dd8b161..155cfe63962 100644
--- a/gcc/testsuite/gcc.dg/20001116-1.c
+++ b/gcc/testsuite/gcc.dg/20001116-1.c
@@ -6,6 +6,6 @@
void foo (int x)
{
- if (x) /* { dg-warning "empty body in an if-statement" } */
- ;
+ if (x)
+ ; /* { dg-warning "empty body in an if-statement" } */
}
diff --git a/gcc/testsuite/gcc.dg/20001117-1.c b/gcc/testsuite/gcc.dg/20001117-1.c
index a16a62c38c7..8eb7f58b6bf 100644
--- a/gcc/testsuite/gcc.dg/20001117-1.c
+++ b/gcc/testsuite/gcc.dg/20001117-1.c
@@ -1,6 +1,9 @@
/* { dg-do run } */
/* { dg-options "-O2 -finstrument-functions" } */
+extern void abort (void);
+extern void exit (int);
+
double
foo (double a, double b)
{
diff --git a/gcc/testsuite/gcc.dg/20010202-1.c b/gcc/testsuite/gcc.dg/20010202-1.c
index e4eaae0b246..f600373b8a3 100644
--- a/gcc/testsuite/gcc.dg/20010202-1.c
+++ b/gcc/testsuite/gcc.dg/20010202-1.c
@@ -1,6 +1,9 @@
/* { dg-do compile { target i?86-*-* sparc*-*-* } } */
/* { dg-options "-O2" } */
+extern void abort (void);
+extern void exit (int);
+
typedef enum { false, true } __attribute__ ((packed)) boolean;
typedef struct {
enum {
diff --git a/gcc/testsuite/gcc.dg/20010912-1.c b/gcc/testsuite/gcc.dg/20010912-1.c
index 9d0d2e03e8d..7769b496e55 100644
--- a/gcc/testsuite/gcc.dg/20010912-1.c
+++ b/gcc/testsuite/gcc.dg/20010912-1.c
@@ -1,6 +1,7 @@
/* { dg-do run } */
/* { dg-options "-O2 -fpic" } */
/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
+/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/20011008-2.c b/gcc/testsuite/gcc.dg/20011008-2.c
index 5937bcb0e82..01ff172b4ff 100644
--- a/gcc/testsuite/gcc.dg/20011008-2.c
+++ b/gcc/testsuite/gcc.dg/20011008-2.c
@@ -1,6 +1,9 @@
/* { dg-do run } */
/* { dg-options "-O0" } */
+extern void abort (void);
+extern void exit (int);
+
struct { union {int x; int y;}; int q; } b;
union { struct {int x;}; int q; } e;
diff --git a/gcc/testsuite/gcc.dg/20011119-1.c b/gcc/testsuite/gcc.dg/20011119-1.c
index 5b3c00cd36f..0df09a3f778 100644
--- a/gcc/testsuite/gcc.dg/20011119-1.c
+++ b/gcc/testsuite/gcc.dg/20011119-1.c
@@ -74,7 +74,7 @@ main()
"call %P0\n\t"
"addl $12, %%esp\n\t"
"popl %%ebp"
- : : "i"(ustrzcat));
+ : : "i"(ustrzcat) : "memory" );
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/20011130-1.c b/gcc/testsuite/gcc.dg/20011130-1.c
index 393f82a91fb..60a2738fc65 100644
--- a/gcc/testsuite/gcc.dg/20011130-1.c
+++ b/gcc/testsuite/gcc.dg/20011130-1.c
@@ -9,7 +9,7 @@
static int __attribute__((unused)) foo (int x)
{
- static inline int bar (int x)
+ inline int bar (int x)
{
int y;
y = x;
diff --git a/gcc/testsuite/gcc.dg/20011214-1.c b/gcc/testsuite/gcc.dg/20011214-1.c
index 9dea9048c5a..dd05798fabf 100644
--- a/gcc/testsuite/gcc.dg/20011214-1.c
+++ b/gcc/testsuite/gcc.dg/20011214-1.c
@@ -1,5 +1,8 @@
/* { dg-do run } */
+extern void abort (void);
+extern void exit (int);
+
#define small __attribute__((mode(QI))) int
int main()
{
diff --git a/gcc/testsuite/gcc.dg/20020103-1.c b/gcc/testsuite/gcc.dg/20020103-1.c
index 5197fa67e1f..3082247fb0d 100644
--- a/gcc/testsuite/gcc.dg/20020103-1.c
+++ b/gcc/testsuite/gcc.dg/20020103-1.c
@@ -1,7 +1,7 @@
/* Verify that constant equivalences get reloaded properly, either by being
spilled to the stack, or regenerated, but not dropped to memory. */
/* { dg-do compile { target i?86-*-* powerpc-*-* rs6000-*-* alpha*-*-* x86_64-*-*} } */
-/* { dg-options "-O2 -fpic -fno-omit-frame-pointer" } */
+/* { dg-options "-O2 -fpic -fno-omit-frame-pointer -fno-asynchronous-unwind-tables" } */
/* { dg-final { scan-assembler-not "LC" } } */
/* Clobber all call-saved registers that can hold a pointer value. */
diff --git a/gcc/testsuite/gcc.dg/20020118-1.c b/gcc/testsuite/gcc.dg/20020118-1.c
index f00db689cc2..393f3c2aa5b 100644
--- a/gcc/testsuite/gcc.dg/20020118-1.c
+++ b/gcc/testsuite/gcc.dg/20020118-1.c
@@ -3,6 +3,8 @@
/* Test local alignment. Test new target macro STARTING_FRAME_PHASE. */
/* Origin: Aldy Hernandez <aldyh@redhat.com>. */
+extern void abort(void);
+
int main ()
{
int darisa[4] __attribute__((aligned(16))) ;
diff --git a/gcc/testsuite/gcc.dg/20020201-1.c b/gcc/testsuite/gcc.dg/20020201-1.c
index 11326378a0a..d187a66fb00 100644
--- a/gcc/testsuite/gcc.dg/20020201-1.c
+++ b/gcc/testsuite/gcc.dg/20020201-1.c
@@ -7,6 +7,9 @@
/* { dg-options "-fprofile-arcs" } */
/* { dg-do run { target native } } */
+extern void abort (void);
+extern void exit (int);
+
int rand (void);
void srand (unsigned int seed);
diff --git a/gcc/testsuite/gcc.dg/20020201-2.c b/gcc/testsuite/gcc.dg/20020201-2.c
deleted file mode 100644
index 2a13c8d83ca..00000000000
--- a/gcc/testsuite/gcc.dg/20020201-2.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This testcase caused ICE because gcc was not able to add instructions
- on edge from ENTRY block successor to itself. */
-/* { dg-do compile } */
-/* { dg-options "-O3 -fssa" } */
-
-struct A { int a1; int a2; };
-struct B { long int b[32]; };
-
-extern int bar (struct B *, struct A *);
-
-int
-foo (struct B x)
-{
- struct A a, b;
- struct B c;
- int d;
-
- while (1)
- {
- a.a1 = 0;
- a.a2 = 0;
- b = a;
- c = x;
- d = bar (&c, &b);
- if (d >= 0)
- return d;
- }
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/20020201-4.c b/gcc/testsuite/gcc.dg/20020201-4.c
deleted file mode 100644
index 3c83fe76047..00000000000
--- a/gcc/testsuite/gcc.dg/20020201-4.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* This testcase failed because recog_for_combine used to pass a different
- pattern than contained in insn to recog. */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fssa -fssa-ccp" } */
-/* { dg-options "-O2 -march=i686 -fssa -fssa-ccp" { target i?86-*-* } } */
-
-extern int bar (char *);
-
-int
-foo (void)
-{
- char b[512];
-
- bar (b);
- return __builtin_strlen (b);
-}
diff --git a/gcc/testsuite/gcc.dg/20020304-1.c b/gcc/testsuite/gcc.dg/20020304-1.c
deleted file mode 100644
index f6d6b4e49a7..00000000000
--- a/gcc/testsuite/gcc.dg/20020304-1.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O -fssa -fssa-ccp" } */
-
-double a[10][35], b[10][8];
-int c, c, d, e, f, g, h;
-
-int foo ()
-{
- int i, j, k, l;
-
- if (c > 10)
- c = 10;
-
- for (j = 0; j < c; j++)
- {
- k = 0;
- for (l = 0; l < h; l++)
- {
- if (d != 5)
- return -1;
- k = l * g;
- a[j][k] = (double) e; k++;
- a[j][k] = (double) f; k++;
- }
- for (i = 0;i < 35; i++)
- {
- if (a[j][i] >= 0.9)
- a[j][i] = 0.9;
- if (a[j][i] <= 0.1)
- a[j][i] = 0.1;
- }
- k = 0;
- b[j][k] = (double) e; k++;
- b[j][k] = (double) f; k++;
- }
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/20020312-2.c b/gcc/testsuite/gcc.dg/20020312-2.c
index 082190b3c36..322c1d04898 100644
--- a/gcc/testsuite/gcc.dg/20020312-2.c
+++ b/gcc/testsuite/gcc.dg/20020312-2.c
@@ -8,6 +8,8 @@
/* { dg-do run } */
/* { dg-options "-O -fno-pic" } */
+extern void abort (void);
+
#if defined(__alpha__)
/* PIC register is $29, but is used even without -fpic. */
#elif defined(__arc__)
@@ -18,30 +20,20 @@
/* No pic register. */
#elif defined(__cris__)
# define PIC_REG "0"
-#elif defined(__D30V__)
-/* No pic register. */
-#elif defined(__dsp1600__)
-/* No pic register. */
#elif defined(__fr30__)
/* No pic register. */
#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__)
/* No pic register. */
#elif defined(_IBMR2)
/* No pic register. */
-#elif #cpu(i370)
-/* No pic register. */
#elif defined(__i386__)
# define PIC_REG "ebx"
-#elif defined(__i960__)
-/* No pic register. */
#elif defined(__ia64__)
/* PIC register is r1, but is used even without -fpic. */
#elif defined(__M32R__)
/* No pic register. */
#elif defined(__m68k__)
# define PIC_REG "a5"
-#elif defined(__m88k__)
-# define PIC_REG "25"
#elif defined(__mc68hc1x__)
/* No pic register. */
#elif defined(__mcore__)
@@ -50,8 +42,6 @@
/* PIC register is $28, but is used even without -fpic. */
#elif defined(__MMIX__)
/* No pic register. */
-#elif defined(__mn10200__)
-/* No pic register. */
#elif defined(__mn10300__)
/* No pic register. */
#elif #cpu(ns32k)
@@ -66,8 +56,6 @@
# else
# define PIC_REG "30"
# endif
-#elif defined(__ibm032__) /* aka romp */
-/* No pic register. */
#elif defined(__s390__)
# define PIC_REG "12"
#elif defined(__sparc__)
diff --git a/gcc/testsuite/gcc.dg/20020426-2.c b/gcc/testsuite/gcc.dg/20020426-2.c
index 18a172767a1..dd7fa7ff577 100644
--- a/gcc/testsuite/gcc.dg/20020426-2.c
+++ b/gcc/testsuite/gcc.dg/20020426-2.c
@@ -3,6 +3,9 @@
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mtune=i686" { target i?86-*-* } } */
+/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
+
+extern void exit (int);
typedef struct
{
@@ -160,14 +163,14 @@ foo (unsigned int *b, unsigned int n, unsigned int s, const unsigned int *d,
return y != 0 && g != 1 ? (-5) : 0;
}
-int a[19] = { 3, 4, 0, 2, 2, [17] = 3, 3 };
-int d[19];
+unsigned int a[19] = { 3, 4, 0, 2, 2, [17] = 3, 3 };
+unsigned int d[19];
A h[1440];
int
main (void)
{
- int b = 0, c = 0;
+ unsigned int b = 0, c = 0;
A *e = 0;
foo (a, 19, 19, 0, 0, &e, &b, h, &c, d);
exit (0);
diff --git a/gcc/testsuite/gcc.dg/20020503-1.c b/gcc/testsuite/gcc.dg/20020503-1.c
index 6e669031cd6..3edc7cf9858 100644
--- a/gcc/testsuite/gcc.dg/20020503-1.c
+++ b/gcc/testsuite/gcc.dg/20020503-1.c
@@ -5,7 +5,6 @@
returned -1 for some registers (like %o0). */
/* { dg-do compile } */
/* { dg-options "-O2 -g" } */
-/* { dg-options "-O2 -g -mflat" { target sparc*-*-* } } */
void foo (char *a, char *b, char *c, char *d)
{
diff --git a/gcc/testsuite/gcc.dg/20020523-2.c b/gcc/testsuite/gcc.dg/20020523-2.c
index 5ae3da5473a..1bb5a1a6567 100644
--- a/gcc/testsuite/gcc.dg/20020523-2.c
+++ b/gcc/testsuite/gcc.dg/20020523-2.c
@@ -4,6 +4,7 @@
/* { dg-do run { target i386-*-* } } */
/* { dg-options "-march=pentium3 -msse -ffast-math -O2" } */
+#include "i386-cpuid.h"
extern void abort (void);
extern void exit (int);
@@ -27,24 +28,10 @@ typedef struct
void bail_if_no_sse (void)
{
- int fl1, fl2;
-
- /* See if we can use cpuid. */
- __asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
- "pushl %0; popfl; pushfl; popl %0; popfl"
- : "=&r" (fl1), "=&r" (fl2)
- : "i" (0x00200000));
- if (((fl1 ^ fl2) & 0x00200000) == 0)
- exit (0);
-
- /* See if cpuid gives capabilities. */
- __asm__ ("cpuid" : "=a" (fl1) : "0" (0) : "ebx", "ecx", "edx", "cc");
- if (fl1 == 0)
- exit (0);
-
+ unsigned int edx;
/* See if capabilities include SSE (25th bit; 26 for SSE2). */
- __asm__ ("cpuid" : "=a" (fl1), "=d" (fl2) : "0" (1) : "ebx", "ecx", "cc");
- if ((fl2 & (1 << 25)) == 0)
+ edx = i386_cpuid();
+ if (!(edx & bit_SSE))
exit (0);
}
diff --git a/gcc/testsuite/gcc.dg/20020531-1.c b/gcc/testsuite/gcc.dg/20020531-1.c
index c18033f3d08..19f198fcac1 100644
--- a/gcc/testsuite/gcc.dg/20020531-1.c
+++ b/gcc/testsuite/gcc.dg/20020531-1.c
@@ -4,7 +4,7 @@
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O2 -mmmx" } */
-typedef int __v8qi __attribute__ ((__mode__ (__V8QI__)));
+typedef unsigned char __v8qi __attribute__ ((vector_size (8)));
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/20021014-1.c b/gcc/testsuite/gcc.dg/20021014-1.c
index 69e2eaaba19..6ce62c34666 100644
--- a/gcc/testsuite/gcc.dg/20021014-1.c
+++ b/gcc/testsuite/gcc.dg/20021014-1.c
@@ -1,23 +1,17 @@
/* { dg-do run } */
+/* { dg-require-profiling "-p" } */
/* { dg-options "-O2 -p" } */
/* { dg-options "-O2 -p -static" { target hppa*-*-hpux* } } */
-/* { dg-error "profiler" "No profiler support" { target mmix-*-* xstormy16-*-* } 0 } */
+/* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */
/* { dg-error "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */
-/* Support for -p on solaris2 relies on mcrt1.o which comes with the
- vendor compiler. We cannot reiably predict the directory where the
- vendor compiler (and thus mcrt1.o) is installed so we can't
- necessarily find mcrt1.o even if we have it. */
-/* { dg-error "mcrt1.o" "Optional vendor profiler support missing" { target *-*-solaris2* } 0 } */
-/* Support for -p on irix relies on libprof1.a which doesn't appear to
- exist on any irix6 system currently posting testsuite results. */
-/* { dg-error "libprof1.a" "Profiler support missing" { target mips*-*-irix* } 0 } */
+/* { dg-bogus "\[Uu\]nresolved symbol ._mcount" "Profiling unsupported" { xfail *-*-netware* } 0 } */
extern void abort (void);
extern void exit (int);
int foo (void)
{
- static int bar (int x)
+ int bar (int x)
{
return x + 3;
}
diff --git a/gcc/testsuite/gcc.dg/20021018-1.c b/gcc/testsuite/gcc.dg/20021018-1.c
index 2fef73f623a..f460e77a1ea 100644
--- a/gcc/testsuite/gcc.dg/20021018-1.c
+++ b/gcc/testsuite/gcc.dg/20021018-1.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -fpic" } */
+/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/20030123-1.c b/gcc/testsuite/gcc.dg/20030123-1.c
index 1f5858808c4..319e4526a4a 100644
--- a/gcc/testsuite/gcc.dg/20030123-1.c
+++ b/gcc/testsuite/gcc.dg/20030123-1.c
@@ -1,7 +1,9 @@
/* This used to ICE due to a reload bug on s390*. */
/* { dg-do compile { target s390*-*-* } } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+extern void *alloca (__SIZE_TYPE__);
void func (char *p);
@@ -10,7 +12,7 @@ void test (void)
char *p = alloca (4096);
long idx;
- asm ("" : "=r" (idx) : : "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12");
+ asm ("" : "=r" (idx) : : "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12");
func (p + idx + 1);
}
diff --git a/gcc/testsuite/gcc.dg/20030213-1.c b/gcc/testsuite/gcc.dg/20030213-1.c
index c9fe3a40eaf..8394ba054ad 100644
--- a/gcc/testsuite/gcc.dg/20030213-1.c
+++ b/gcc/testsuite/gcc.dg/20030213-1.c
@@ -2,6 +2,7 @@
/* { dg-do link } */
/* { dg-options "-O -fpic" } */
/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
+/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
int *g;
diff --git a/gcc/testsuite/gcc.dg/20030218-1.c b/gcc/testsuite/gcc.dg/20030218-1.c
index e41152c21c1..6296d31bfce 100644
--- a/gcc/testsuite/gcc.dg/20030218-1.c
+++ b/gcc/testsuite/gcc.dg/20030218-1.c
@@ -1,14 +1,12 @@
/* { dg-do compile { target powerpc-*-eabi* } } */
-/* { dg-options "-mcpu=8540" } */
+/* { dg-options "-mspe=yes" } */
/* Test vectors that can interconvert without a cast. */
-typedef int __attribute__((mode(V2SI))) __ev64_opaque__;
-
__ev64_opaque__ opp;
-int vint __attribute__((mode(V2SI)));
-int vshort __attribute__((mode(V4HI)));
-int vfloat __attribute__((mode(V2SF)));
+int vint __attribute__((vector_size (8)));
+short vshort __attribute__((vector_size (8)));
+float vfloat __attribute__((vector_size (8)));
int
main (void)
diff --git a/gcc/testsuite/gcc.dg/20030225-1.c b/gcc/testsuite/gcc.dg/20030225-1.c
index 7c30898b4ea..ea7736331c8 100644
--- a/gcc/testsuite/gcc.dg/20030225-1.c
+++ b/gcc/testsuite/gcc.dg/20030225-1.c
@@ -6,7 +6,7 @@
/* { dg-do run } */
/* { dg-options "-O2 -fPIC" } */
/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* mmix-*-* } 0 } */
-
+/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/20030331-2.c b/gcc/testsuite/gcc.dg/20030331-2.c
index 210524da456..2fce78ea97c 100644
--- a/gcc/testsuite/gcc.dg/20030331-2.c
+++ b/gcc/testsuite/gcc.dg/20030331-2.c
@@ -1,10 +1,12 @@
// { dg-options "" }
+extern int printf (const char *, ...);
+
int foo() {
int yd;
float in[1][yd];
- static void bar() {
+ void bar() {
printf("%p\n",in[0]);
}
}
diff --git a/gcc/testsuite/gcc.dg/20030612-1.c b/gcc/testsuite/gcc.dg/20030612-1.c
index f9f212caba1..f0875124385 100644
--- a/gcc/testsuite/gcc.dg/20030612-1.c
+++ b/gcc/testsuite/gcc.dg/20030612-1.c
@@ -1,20 +1,24 @@
-/* Derived from PR middle-end/168. */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
-/* { dg-do compile } */
-/* { dg-options "-W" } */
+extern void abort (void);
-extern void foo ();
+int A, B;
-unsigned char uc;
-unsigned short int usi;
-unsigned int ui;
-
-
-void bar()
+void foo()
{
- if (uc + usi >= ui) /* { dg-bogus "between signed and unsigned" } */
- foo ();
- if (uc * usi >= ui) /* { dg-bogus "between signed and unsigned" } */
- foo ();
+ long x = 3;
+ (void)({
+ A = B + x + ((1) - 1);
+ return; /* { dg-warning "statement-expressions should end with a non-void expression" "" { xfail *-*-* } } */
+ });
}
+main()
+{
+ B = 5;
+ foo();
+ if (A != 8)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/20030708-1.c b/gcc/testsuite/gcc.dg/20030708-1.c
index b9786418ed9..d0b5b2bd2b9 100644
--- a/gcc/testsuite/gcc.dg/20030708-1.c
+++ b/gcc/testsuite/gcc.dg/20030708-1.c
@@ -1,6 +1,7 @@
/* PR c/11420 */
/* { dg-do link } */
/* { dg-options "-O2 -fpic" } */
+/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
void (* volatile fn) (void);
static void foo (void)
diff --git a/gcc/testsuite/gcc.dg/20030926-1.c b/gcc/testsuite/gcc.dg/20030926-1.c
index 085cb9b4da1..806dea76165 100644
--- a/gcc/testsuite/gcc.dg/20030926-1.c
+++ b/gcc/testsuite/gcc.dg/20030926-1.c
@@ -1,6 +1,10 @@
/* PR optimization/11741 */
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -minline-all-stringops -march=pentium4" } */
+/* { dg-options "-O2 -minline-all-stringops" } */
+/* { dg-options "-O2 -minline-all-stringops -march=pentium4" { target i?86-*-* } } */
+
+extern void *memcpy (void *, const void *, __SIZE_TYPE__);
+extern __SIZE_TYPE__ strlen (const char *);
void
foo (char *p)
diff --git a/gcc/testsuite/gcc.dg/20031202-1.c b/gcc/testsuite/gcc.dg/20031202-1.c
index ac443a28425..424e01b5dd4 100644
--- a/gcc/testsuite/gcc.dg/20031202-1.c
+++ b/gcc/testsuite/gcc.dg/20031202-1.c
@@ -1,7 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -mtune=i686" { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/20040206-1.c b/gcc/testsuite/gcc.dg/20040206-1.c
index ae5ef334c65..3f25126e335 100644
--- a/gcc/testsuite/gcc.dg/20040206-1.c
+++ b/gcc/testsuite/gcc.dg/20040206-1.c
@@ -7,5 +7,5 @@
The warning about "no return statement in function
returning non-void" is PR 13000. */
-static int foo (int a __attribute__((unused)) ) { }
-int main (void) { return foo (0); } /* { dg-warning "control may reach end" } */
+static int foo (int a __attribute__((unused)) ) { } /* { dg-warning "return" "" { xfail *-*-* } } */
+int main (void) { return foo (0); } /* { dg-bogus "uninitialized" "" { xfail *-*-* } } */
diff --git a/gcc/testsuite/gcc.dg/20040625-1.c b/gcc/testsuite/gcc.dg/20040625-1.c
index bbda6fd05fc..e05e87c9124 100644
--- a/gcc/testsuite/gcc.dg/20040625-1.c
+++ b/gcc/testsuite/gcc.dg/20040625-1.c
@@ -22,7 +22,7 @@ test (void)
{
double x = foo ();
x = bar (x);
- x /= 1024L * 1024L * 1024L;
+ x /= 1024 * 1024 * 1024;
x *= 70;
x = x < 70 ? x : 70;
x += 30;
diff --git a/gcc/testsuite/gcc.dg/20040813-1.c b/gcc/testsuite/gcc.dg/20040813-1.c
index aa8d166302d..ab09fec10e1 100644
--- a/gcc/testsuite/gcc.dg/20040813-1.c
+++ b/gcc/testsuite/gcc.dg/20040813-1.c
@@ -2,7 +2,6 @@
/* Contributed by Devang Patel <dpatel@apple.com> */
/* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* *-*-netware* alpha*-*-* hppa*64*-*-* ia64-*-* } { "*" } { "" } } */
/* { dg-options "-gstabs" } */
int
diff --git a/gcc/testsuite/gcc.dg/20040910-1.c b/gcc/testsuite/gcc.dg/20040910-1.c
index ff772ab57b4..25b51ff7e1b 100644
--- a/gcc/testsuite/gcc.dg/20040910-1.c
+++ b/gcc/testsuite/gcc.dg/20040910-1.c
@@ -1,2 +1,2 @@
/* Tests error recovery for invalid code. */
-__attribute__((foo) int f (){} /* { dg-error "(parse error|syntax error|expected '\\)') before 'int'" } */
+__attribute__((foo) int f (){} /* { dg-error "(parse|syntax) error before \"int\"" } */
diff --git a/gcc/testsuite/gcc.dg/940409-1.c b/gcc/testsuite/gcc.dg/940409-1.c
index e5049d9030e..2d20b891f3f 100644
--- a/gcc/testsuite/gcc.dg/940409-1.c
+++ b/gcc/testsuite/gcc.dg/940409-1.c
@@ -1,8 +1,6 @@
-/* GCC should allow struct S to be in a register, but it doesn't. This is
- an obscure corner case, hasn't worked since 1994, and we don't expect it
- to work anytime soon, hence XFAIL. */
+/* GCC should allow struct S to be in a register. */
/* { dg-do compile } */
struct S { volatile int field; };
-int f (register struct S arg); /* { dg-bogus "volatile field" "with arg" { xfail *-*-* } } */
-int g (register struct S); /* { dg-bogus "volatile field" "no arg" { xfail *-*-* } } */
+int f (register struct S arg); /* { dg-bogus "volatile field" "with arg" } */
+int g (register struct S); /* { dg-bogus "volatile field" "no arg" } */
diff --git a/gcc/testsuite/gcc.dg/980217-1.c b/gcc/testsuite/gcc.dg/980217-1.c
index 6d56d833c82..ad261eb7d56 100644
--- a/gcc/testsuite/gcc.dg/980217-1.c
+++ b/gcc/testsuite/gcc.dg/980217-1.c
@@ -4,6 +4,7 @@
/* { dg-options "-mieee -O2" } */
extern void abort(void);
+extern int printf(const char *, ...);
typedef int int32_t __attribute__ ((__mode__ ( __SI__ ))) ;
typedef union
diff --git a/gcc/testsuite/gcc.dg/980226-1.c b/gcc/testsuite/gcc.dg/980226-1.c
index f66e9e2a9f7..f9d915f22d4 100644
--- a/gcc/testsuite/gcc.dg/980226-1.c
+++ b/gcc/testsuite/gcc.dg/980226-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options -O2 } */
+extern int printf (const char *, ...);
extern double bar (double);
int
diff --git a/gcc/testsuite/gcc.dg/991209-1.c b/gcc/testsuite/gcc.dg/991209-1.c
index b3a47285158..2381922c660 100644
--- a/gcc/testsuite/gcc.dg/991209-1.c
+++ b/gcc/testsuite/gcc.dg/991209-1.c
@@ -1,8 +1,9 @@
/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-ansi -pedantic" } */
int foo ()
{
return 1;
}
-register char *stack_ptr __asm ("%esp");
+register char *stack_ptr __asm ("%esp"); /* { dg-warning "warning: file-scope declaration of 'stack_ptr' specifies 'register'" } */
diff --git a/gcc/testsuite/gcc.dg/991214-1.c b/gcc/testsuite/gcc.dg/991214-1.c
index c8e3a04049d..68b6b927916 100644
--- a/gcc/testsuite/gcc.dg/991214-1.c
+++ b/gcc/testsuite/gcc.dg/991214-1.c
@@ -4,7 +4,7 @@
/* Test against a problem with the combiner substituting explicit hard reg
references when it shouldn't. */
void foo (int, int) __attribute__ ((regparm (3)));
-void foo (int x, int y)
+void __attribute__((regparm(3))) foo (int x, int y)
{
__asm__ __volatile__("" : : "d" (x), "r" (y));
}
diff --git a/gcc/testsuite/gcc.dg/Wold-style-definition-1.c b/gcc/testsuite/gcc.dg/Wold-style-definition-1.c
index d4fb8bd8da1..aa016338b5e 100644
--- a/gcc/testsuite/gcc.dg/Wold-style-definition-1.c
+++ b/gcc/testsuite/gcc.dg/Wold-style-definition-1.c
@@ -5,19 +5,19 @@
/* { dg-options "-Wold-style-definition" } */
void
-bar (a) int a; { } /* { dg-warning "old-style parameter declaration" } */
+bar (a) int a; { } /* { dg-warning "old-style function definition" } */
-void bar1 () {} /* { dg-warning "old-style parameter declaration" } */
+void bar1 () {} /* { dg-warning "old-style function definition" } */
extern void bar2 (void);
-void bar2 () {} /* { dg-warning "old-style parameter declaration" } */
+void bar2 () {} /* { dg-warning "old-style function definition" } */
extern void bar3 (int);
-void bar3 (a) {} /* { dg-warning "old-style parameter declaration" } */
+void bar3 (a) {} /* { dg-warning "old-style function definition" } */
-void bar4 (a) {} /* { dg-warning "old-style parameter declaration" } */
+void bar4 (a) {} /* { dg-warning "old-style function definition" } */
void bar5 (int a) {}
diff --git a/gcc/testsuite/gcc.dg/Wpadded.c b/gcc/testsuite/gcc.dg/Wpadded.c
index 74376e52828..e55fd113f75 100644
--- a/gcc/testsuite/gcc.dg/Wpadded.c
+++ b/gcc/testsuite/gcc.dg/Wpadded.c
@@ -1,7 +1,9 @@
/* Source: EMC. */
/* { dg-do compile } */
-/* { dg-options "-Wpadded" } */
+/* -fpack-struct is necessary because the warning expected requires the initial
+ packing to be larger than 1, which cannot ge guaranteed for all targets. */
+/* { dg-options "-Wpadded -fpack-struct=8" } */
struct foo {
char bar;
diff --git a/gcc/testsuite/gcc.dg/Wreturn-type2.c b/gcc/testsuite/gcc.dg/Wreturn-type2.c
index d57a9146517..781414a1ae0 100644
--- a/gcc/testsuite/gcc.dg/Wreturn-type2.c
+++ b/gcc/testsuite/gcc.dg/Wreturn-type2.c
@@ -2,6 +2,8 @@
missing return. */
/* { dg-do compile } */
+extern void abort (void);
+
f() {} /* { dg-bogus "" "no return warning" } */
int g() { abort (); } /* { dg-bogus "" "no return warning" } */
int main() {} /* { dg-bogus "" "no return warning" } */
diff --git a/gcc/testsuite/gcc.dg/Wshadow-1.c b/gcc/testsuite/gcc.dg/Wshadow-1.c
index c9c3acb98c9..c4553a43561 100644
--- a/gcc/testsuite/gcc.dg/Wshadow-1.c
+++ b/gcc/testsuite/gcc.dg/Wshadow-1.c
@@ -10,7 +10,7 @@ void foo (double decl1) /* { dg-warning "shadows a global decl" } */
{
}
-void foo1 (int d) /* { dg-warning "previous declaration" } */
+void foo1 (int d) /* { dg-warning "previous definition" } */
{
double d; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "redeclared as different" "" { target *-*-* } 15 } */
diff --git a/gcc/testsuite/gcc.dg/Wswitch-2.c b/gcc/testsuite/gcc.dg/Wswitch-2.c
index b151e2310c7..79ba4bdcb84 100644
--- a/gcc/testsuite/gcc.dg/Wswitch-2.c
+++ b/gcc/testsuite/gcc.dg/Wswitch-2.c
@@ -13,19 +13,19 @@ foo (enum e ei, int j)
case e3: return 2;
case e4: return 3;
} /* No warning here since e2 has the same value as e3. */
- switch (ei)
+ switch (ei) /* { dg-warning "enumeration value 'e4' not handled in switch" "enum e4" } */
{
case e1: return 1;
case e2: return 2;
- } /* { dg-warning "enumeration value `e4' not handled in switch" "enum e4" } */
+ }
switch ((int) ei)
{
case e1: return 1;
} /* No warning here since switch condition was cast to int. */
- switch ((enum e) j)
+ switch ((enum e) j) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
{
case e2: return 1;
case e4: return 2;
- } /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
+ }
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/Wswitch-default.c b/gcc/testsuite/gcc.dg/Wswitch-default.c
index a1a3d39c1d9..2d4e7994c25 100644
--- a/gcc/testsuite/gcc.dg/Wswitch-default.c
+++ b/gcc/testsuite/gcc.dg/Wswitch-default.c
@@ -7,11 +7,11 @@ int
foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
enum e em, enum e en, enum e eo, enum e ep)
{
- switch (i)
+ switch (i) /* { dg-warning "switch missing default case" } */
{
case 1: return 1;
case 2: return 2;
- } /* { dg-warning "switch missing default case" } */
+ }
switch (j)
{
case 3: return 4;
@@ -25,32 +25,32 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
{
default: break;
}
- switch (ek)
+ switch (ek) /* { dg-warning "switch missing default case" } */
{
case e1: return 1;
- } /* { dg-warning "switch missing default case" } */
+ }
switch (el)
{
case e1: return 1;
default: break;
}
- switch (em)
+ switch (em) /* { dg-warning "switch missing default case" } */
{
case e1: return 1;
case e2: return 2;
- } /* { dg-warning "switch missing default case" } */
+ }
switch (en)
{
case e1: return 1;
case e2: return 2;
default: break;
}
- switch (eo)
+ switch (eo) /* { dg-warning "switch missing default case" } */
{
case e1: return 1;
case e2: return 2;
case 3: return 3;
- } /* { dg-warning "switch missing default case" } */
+ }
switch (ep)
{
case e1: return 1;
diff --git a/gcc/testsuite/gcc.dg/Wswitch-enum.c b/gcc/testsuite/gcc.dg/Wswitch-enum.c
index d031b12ce14..28c60d879ae 100644
--- a/gcc/testsuite/gcc.dg/Wswitch-enum.c
+++ b/gcc/testsuite/gcc.dg/Wswitch-enum.c
@@ -19,22 +19,22 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
case 4: return 3;
default: break;
}
- switch (ei) /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
- { /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+ switch (ei) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
+ { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
}
- switch (ej)
- { /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" { target *-*-* } 28 } */
+ switch (ej) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
+ { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 25 } */
default: break;
- } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
- switch (ek)
+ }
+ switch (ek) /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" } */
{
case e1: return 1;
- } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
- switch (el)
+ }
+ switch (el) /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" } */
{
case e1: return 1;
default: break;
- } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
+ }
switch (em)
{
case e1: return 1;
@@ -50,14 +50,14 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
{
case e1: return 1;
case e2: return 2;
- case 3: return 3;
- } /* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
+ case 3: return 3; /* { dg-warning "case value '3' not in enumerated type 'enum e'" "excess 3" } */
+ }
switch (ep)
{
case e1: return 1;
case e2: return 2;
- case 3: return 3;
+ case 3: return 3; /* { dg-warning "case value '3' not in enumerated type 'enum e'" "excess 3" } */
default: break;
- } /* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
+ }
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/Wswitch.c b/gcc/testsuite/gcc.dg/Wswitch.c
index 38c3cbbb446..686fd41614c 100644
--- a/gcc/testsuite/gcc.dg/Wswitch.c
+++ b/gcc/testsuite/gcc.dg/Wswitch.c
@@ -19,17 +19,17 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
case 4: return 3;
default: break;
}
- switch (ei) /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
- { /*{ dg-warning "enumeration value `e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+ switch (ei) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
+ { /*{ dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
}
switch (ej)
{
default: break;
}
- switch (ek)
+ switch (ek) /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" } */
{
case e1: return 1;
- } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
+ }
switch (el)
{
case e1: return 1;
@@ -50,8 +50,8 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
{
case e1: return 1;
case e2: return 2;
- case 3: return 3;
- } /* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
+ case 3: return 3; /* { dg-warning "case value '3' not in enumerated type 'enum e'" "excess 3" } */
+ }
switch (ep)
{
case e1: return 1;
diff --git a/gcc/testsuite/gcc.dg/Wunreachable-6.c b/gcc/testsuite/gcc.dg/Wunreachable-6.c
index 77b6228fc86..6aac7aab205 100644
--- a/gcc/testsuite/gcc.dg/Wunreachable-6.c
+++ b/gcc/testsuite/gcc.dg/Wunreachable-6.c
@@ -2,6 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-Wunreachable-code" } */
+extern int printf (const char *, ...);
+extern void exit (int);
+
int main(int argc, char *argv[])
{
if (argc != 1)
diff --git a/gcc/testsuite/gcc.dg/Wunreachable-7.c b/gcc/testsuite/gcc.dg/Wunreachable-7.c
index a19c94a1760..9a4d411be22 100644
--- a/gcc/testsuite/gcc.dg/Wunreachable-7.c
+++ b/gcc/testsuite/gcc.dg/Wunreachable-7.c
@@ -2,6 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-O2 -Wunreachable-code" } */
+extern int printf (const char *, ...);
+extern void exit (int);
+
int main(int argc, char *argv[])
{
if (argc != 1)
diff --git a/gcc/testsuite/gcc.dg/alias-1.c b/gcc/testsuite/gcc.dg/alias-1.c
index a723083672c..82dbc9efbf8 100644
--- a/gcc/testsuite/gcc.dg/alias-1.c
+++ b/gcc/testsuite/gcc.dg/alias-1.c
@@ -19,7 +19,7 @@ YYSTYPE
addSibMacro(
YYSTYPE list )
{
- tDefEntry** ppT = (tDefEntry**)&list; // { dg-warning "type-punned pointer" "" }
+ tDefEntry** ppT = (tDefEntry**)&list; // { dg-warning "type-punned pointer will" "" }
struct incomplete *p = (struct incomplete *)&list; // { dg-warning "type-punning to incomplete" "" }
diff --git a/gcc/testsuite/gcc.dg/align-1.c b/gcc/testsuite/gcc.dg/align-1.c
index 302d7d777a1..187eb5271d2 100644
--- a/gcc/testsuite/gcc.dg/align-1.c
+++ b/gcc/testsuite/gcc.dg/align-1.c
@@ -6,6 +6,8 @@
{ dg-options "" }
*/
+extern void abort (void);
+
struct A
{
char c;
diff --git a/gcc/testsuite/gcc.dg/altivec-1.c b/gcc/testsuite/gcc.dg/altivec-1.c
index 3d37a2e1c76..65c8fa79bf9 100644
--- a/gcc/testsuite/gcc.dg/altivec-1.c
+++ b/gcc/testsuite/gcc.dg/altivec-1.c
@@ -1,9 +1,11 @@
-/* { dg-do run { target powerpc-*-*altivec powerpc-*-*-*altivec } } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
/* { dg-options "-maltivec" } */
/* Program to test PowerPC AltiVec instructions. */
#include <altivec.h>
+#include "altivec_check.h"
extern void abort (void);
@@ -22,6 +24,8 @@ vector float f, g, h;
int main ()
{
+ altivec_check(); /* Exits if AltiVec not supported */
+
k = vec_add (a1, a2);
if (!vec_all_eq (addi, k))
abort ();
diff --git a/gcc/testsuite/gcc.dg/altivec-18.c b/gcc/testsuite/gcc.dg/altivec-18.c
index 9a3ee33f63d..af5687e0a6b 100644
--- a/gcc/testsuite/gcc.dg/altivec-18.c
+++ b/gcc/testsuite/gcc.dg/altivec-18.c
@@ -1,14 +1,13 @@
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
/* { dg-options "-maltivec -mabi=altivec" } */
-/* { dg-final { scan-assembler "vcmpgtub" { target *-*-linux* } } } */
-/* { dg-final { scan-assembler "vcmpgtsb" { target *-*-darwin* } } } */
+/* { dg-final { scan-assembler "vcmpgtub" } } */
/* { dg-final { scan-assembler "vcmpgtsh" } } */
/* { dg-final { scan-assembler "vcmpgtsw" } } */
/* Verify a statement in the GCC Manual that vector type specifiers can
- omit "signed" or "unsigned". The default is the default signedness
- of the base type, which differs depending on the ABI. */
+ omit "signed" or "unsigned", with the default being "signed" for int
+ and short, and "unsigned" for char. */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.dg/altivec-2.c b/gcc/testsuite/gcc.dg/altivec-2.c
index 3c74d392a3e..f64081ff813 100644
--- a/gcc/testsuite/gcc.dg/altivec-2.c
+++ b/gcc/testsuite/gcc.dg/altivec-2.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target powerpc-*-* } } */
+/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-options "-maltivec" } */
/* Program to test the vector_size attribute. This needs to run on a
diff --git a/gcc/testsuite/gcc.dg/altivec-3.c b/gcc/testsuite/gcc.dg/altivec-3.c
index c82f1e2a214..57b975a5e25 100644
--- a/gcc/testsuite/gcc.dg/altivec-3.c
+++ b/gcc/testsuite/gcc.dg/altivec-3.c
@@ -1,8 +1,11 @@
-/* { dg-do run { target powerpc-*-*altivec powerpc-*-*-*altivec } } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
/* { dg-options "-maltivec" } */
-typedef int int4 __attribute__ ((mode(V4SI)));
-typedef float float4 __attribute__ ((mode(V4SF)));
+#include "altivec_check.h"
+
+typedef int int4 __attribute__ ((vector_size (16)));
+typedef float float4 __attribute__ ((vector_size (16)));
int4 a1 = (int4) { 100, 200, 300, 400 };
int4 a2 = (int4) { 500, 600, 700, 800 };
@@ -46,7 +49,8 @@ compare_float4 (float *a, float *b)
abort ();
}
-main ()
+void
+main1 ()
{
int loc1 = 600, loc2 = 800;
int4 a3 = (int4) { loc1, loc2, 1000, 1200 };
@@ -64,6 +68,12 @@ main ()
ftmp = vec_add_float4 (f1, f2);
vec_store (h3, ftmp);
compare_float4 (g3, h3);
+}
+int
+main ()
+{
+ altivec_check ();
+ main1 ();
exit (0);
}
diff --git a/gcc/testsuite/gcc.dg/altivec-4.c b/gcc/testsuite/gcc.dg/altivec-4.c
index 244e31b2825..c2d4356a9a5 100644
--- a/gcc/testsuite/gcc.dg/altivec-4.c
+++ b/gcc/testsuite/gcc.dg/altivec-4.c
@@ -1,9 +1,10 @@
-/* { dg-do compile { target powerpc-*-* } } */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
/* { dg-options "-maltivec -O0 -Wall" } */
#define vector __attribute__((vector_size(16)))
-static int __attribute__((mode(V4SI))) x, y;
+static int vector x, y;
static vector signed int i,j;
static vector signed short s,t;
diff --git a/gcc/testsuite/gcc.dg/altivec-5.c b/gcc/testsuite/gcc.dg/altivec-5.c
index 61d19d9cd9b..0adfdb84d19 100644
--- a/gcc/testsuite/gcc.dg/altivec-5.c
+++ b/gcc/testsuite/gcc.dg/altivec-5.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target powerpc-*-* } } */
+/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-options "-maltivec -O2" } */
#define vector __attribute__((vector_size(16)))
diff --git a/gcc/testsuite/gcc.dg/altivec-7.c b/gcc/testsuite/gcc.dg/altivec-7.c
index 7e118d960ca..9a23940d271 100644
--- a/gcc/testsuite/gcc.dg/altivec-7.c
+++ b/gcc/testsuite/gcc.dg/altivec-7.c
@@ -1,45 +1,46 @@
/* Origin: Aldy Hernandez <aldyh@redhat.com> */
-/* { dg-do compile { target powerpc-*-* } } */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
/* { dg-options "-maltivec" } */
#include <altivec.h>
-long **longp;
+int **intp;
int *var_int;
-unsigned long **ulongp;
+unsigned int **uintp;
vector pixel *varpixel;
vector signed char *vecchar;
-vector signed long *vecint;
+vector signed int *vecint;
vector signed short *vecshort;
vector unsigned char *vecuchar;
-vector unsigned long *vecuint;
+vector unsigned int *vecuint;
vector unsigned short *vecushort;
vector float *vecfloat;
int main ()
{
- *vecfloat++ = vec_andc(vecint[0], vecfloat[1]);
- *vecfloat++ = vec_andc(vecfloat[0], vecint[1]);
- *vecfloat++ = vec_vxor(vecint[0], vecfloat[1]);
- *vecfloat++ = vec_vxor(vecfloat[0], vecint[1]);
+ *vecfloat++ = vec_andc((vector bool int)vecint[0], vecfloat[1]);
+ *vecfloat++ = vec_andc(vecfloat[0], (vector bool int)vecint[1]);
+ *vecfloat++ = vec_vxor((vector bool int)vecint[0], vecfloat[1]);
+ *vecfloat++ = vec_vxor(vecfloat[0], (vector bool int)vecint[1]);
*varpixel++ = vec_packpx(vecuint[0], vecuint[1]);
*varpixel++ = vec_vpkpx(vecuint[0], vecuint[1]);
*vecshort++ = vec_vmulosb(vecchar[0], vecchar[1]);
- *vecint++ = vec_ld(var_int[0], longp[1]);
- *vecint++ = vec_lde(var_int[0], longp[1]);
- *vecint++ = vec_ldl(var_int[0], longp[1]);
- *vecint++ = vec_lvewx(var_int[0], longp[1]);
+ *vecint++ = vec_ld(var_int[0], intp[1]);
+ *vecint++ = vec_lde(var_int[0], intp[1]);
+ *vecint++ = vec_ldl(var_int[0], intp[1]);
+ *vecint++ = vec_lvewx(var_int[0], intp[1]);
*vecint++ = vec_unpackh(vecshort[0]);
*vecint++ = vec_unpackl(vecshort[0]);
- *vecushort++ = vec_andc(vecshort[0], vecushort[1]);
- *vecushort++ = vec_andc(vecushort[0], vecshort[1]);
- *vecushort++ = vec_vxor(vecshort[0], vecushort[1]);
- *vecushort++ = vec_vxor(vecushort[0], vecshort[1]);
- *vecuint++ = vec_ld(var_int[0], ulongp[1]);
- *vecuint++ = vec_lvx(var_int[0], ulongp[1]);
+ *vecushort++ = vec_andc((vector bool short)vecshort[0], vecushort[1]);
+ *vecushort++ = vec_andc(vecushort[0], (vector bool short)vecshort[1]);
+ *vecushort++ = vec_vxor((vector bool short)vecshort[0], vecushort[1]);
+ *vecushort++ = vec_vxor(vecushort[0], (vector bool short)vecshort[1]);
+ *vecuint++ = vec_ld(var_int[0], uintp[1]);
+ *vecuint++ = vec_lvx(var_int[0], uintp[1]);
*vecuint++ = vec_vmsumubm(vecuchar[0], vecuchar[1], vecuint[2]);
- *vecuchar++ = vec_xor(vecuchar[0], vecchar[1]);
+ *vecuchar++ = vec_xor(vecuchar[0], (vector unsigned char)vecchar[1]);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/altivec-8.c b/gcc/testsuite/gcc.dg/altivec-8.c
index 2d6803a47ee..661cce76221 100644
--- a/gcc/testsuite/gcc.dg/altivec-8.c
+++ b/gcc/testsuite/gcc.dg/altivec-8.c
@@ -1,7 +1,8 @@
/* Origin: Aldy Hernandez <aldyh@redhat.com> */
/* Test rs6000_legitimate_address. PRE_INC should be invalid. */
-/* { dg-do compile { target powerpc-*-* } } */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
/* { dg-options "-maltivec" } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.dg/altivec-9.c b/gcc/testsuite/gcc.dg/altivec-9.c
index 62328221ed7..36c79d3453b 100644
--- a/gcc/testsuite/gcc.dg/altivec-9.c
+++ b/gcc/testsuite/gcc.dg/altivec-9.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target powerpc-*-* } } */
+/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-options "-maltivec -mabi=altivec -g" } */
/* PR9564 */
diff --git a/gcc/testsuite/gcc.dg/array-5.c b/gcc/testsuite/gcc.dg/array-5.c
index 7a8e3ac633d..1717de4ba8e 100644
--- a/gcc/testsuite/gcc.dg/array-5.c
+++ b/gcc/testsuite/gcc.dg/array-5.c
@@ -37,6 +37,6 @@ void func(int n, int m)
expression, and thus A is a VLA. */
int a[6][(2, 2)];
int (*p)[3];
- p = a; /* { dg-bogus "incompatible" "bad vla handling" { xfail *-*-* } } */
+ p = a; /* { dg-bogus "incompatible" "bad vla handling" } */
}
}
diff --git a/gcc/testsuite/gcc.dg/array-7.c b/gcc/testsuite/gcc.dg/array-7.c
index 9e70b26821a..b32d4ea03d6 100644
--- a/gcc/testsuite/gcc.dg/array-7.c
+++ b/gcc/testsuite/gcc.dg/array-7.c
@@ -11,4 +11,4 @@ f (void)
struct foo { int a; int b; };
}
-struct foo array[5]; /* { dg-error "array type has incomplete element type" } */
+struct foo array[5]; /* { dg-error "storage size" } */
diff --git a/gcc/testsuite/gcc.dg/array-quals-1.c b/gcc/testsuite/gcc.dg/array-quals-1.c
index 24027bc8ce3..8068895053f 100644
--- a/gcc/testsuite/gcc.dg/array-quals-1.c
+++ b/gcc/testsuite/gcc.dg/array-quals-1.c
@@ -3,8 +3,7 @@
all should end up in a read-only section. PR c/12165. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* The MMIX port always switches to the .data section at the end of a file. */
-/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* } } } */
+/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* } } } */
static const int a[2] = { 1, 2 };
const int a1[2] = { 1, 2 };
typedef const int ci;
diff --git a/gcc/testsuite/gcc.dg/asm-7.c b/gcc/testsuite/gcc.dg/asm-7.c
index 42f40e719f9..a14bb807369 100644
--- a/gcc/testsuite/gcc.dg/asm-7.c
+++ b/gcc/testsuite/gcc.dg/asm-7.c
@@ -12,8 +12,8 @@ void test(void)
__asm__ ("" : : "m"(r)); /* { dg-warning "address of register" } */
__asm__ ("" : : "m"(i));
__asm__ ("" : : "m"(m));
- __asm__ ("" : : "m"(0)); /* { dg-warning "input without lvalue" } */
- __asm__ ("" : : "m"(i+1)); /* { dg-warning "input without lvalue" } */
+ __asm__ ("" : : "m"(0)); /* { dg-error "" } */
+ __asm__ ("" : : "m"(i+1)); /* { dg-error "" } */
__asm__ ("" : : "m"(*p++));
__asm__ ("" : : "g"(r));
diff --git a/gcc/testsuite/gcc.dg/asm-names.c b/gcc/testsuite/gcc.dg/asm-names.c
index d2841a0f40c..f5e44e65f6c 100644
--- a/gcc/testsuite/gcc.dg/asm-names.c
+++ b/gcc/testsuite/gcc.dg/asm-names.c
@@ -2,28 +2,15 @@
to have an underscore prefixed, even if normal symbols are.
Problem reported by Krister Walfridsson <cato@df.lth.se>. */
-/* { dg-do link } */
+/* { dg-do compile } */
/* { dg-options "-fleading-underscore" } */
+/* { dg-final { scan-assembler-not "____frob14" } } */
extern void frobnicate (void) asm ("___frob14"); /* three underscores */
-void __frob14 (void) {} /* two underscores */
-
int
main (void)
{
frobnicate ();
return 0;
}
-
-/* In case built where the runtime expects no leading underscore on
- main(). */
-extern int xmain (void) asm ("main");
-
-int xmain (void) { return main(); }
-
-/* In case built where the runtime calls __main. */
-/* But make it weak because some targets already define this function. */
-#pragma weak ymain
-extern int ymain (void) asm ("___main");
-int ymain (void) { return main(); }
diff --git a/gcc/testsuite/gcc.dg/asmreg-1.c b/gcc/testsuite/gcc.dg/asmreg-1.c
index a779766d4a6..85827e9a9a3 100644
--- a/gcc/testsuite/gcc.dg/asmreg-1.c
+++ b/gcc/testsuite/gcc.dg/asmreg-1.c
@@ -22,7 +22,7 @@ struct kernel_dirent64
};
static inline int __attribute__ ((__always_inline__))
-__syscall_getdents64 (int fd, unsigned char * dirp, unsigned count)
+__syscall_getdents64 (int fd, char * dirp, unsigned count)
{
register unsigned long __sys_res asm ("r10");
register unsigned long __r10 __asm__ ("r10") = (unsigned long) fd;
diff --git a/gcc/testsuite/gcc.dg/attr-noinline.c b/gcc/testsuite/gcc.dg/attr-noinline.c
index ee48eb9ed7e..9124e4f7688 100644
--- a/gcc/testsuite/gcc.dg/attr-noinline.c
+++ b/gcc/testsuite/gcc.dg/attr-noinline.c
@@ -13,33 +13,33 @@ static inline void __attribute__((__noinline__)) function_declaration_both_after
static void function_declaration_both_after(void) {}
-static void function_declaration_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "previous declaration \[^\n\]* with attribute noinline" "" } */
+static void function_declaration_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "previous declaration" "" } */
-static inline void function_declaration_noinline_before(void) {} /* { dg-warning "function \[^\n\]* redeclared as inline" "" } */
+static inline void function_declaration_noinline_before(void) {} /* { dg-warning "follows declaration with attribute noinline" "" } */
-static inline void function_declaration_noinline_after(void) {} /* { dg-warning "previous declaration \[^\n\]* was inline" "" } */
+static inline void function_declaration_noinline_after(void) {} /* { dg-warning "previous definition" "" } */
-static void function_declaration_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "function \[^\n\]* redeclared with attribute noinline" "" } */
+static void function_declaration_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
-static inline void function_declaration_inline_before(void); /* { dg-warning "previous declaration \[^\n\]* was inline" "" } */
+static inline void function_declaration_inline_before(void); /* { dg-warning "previous declaration" "" } */
-static void __attribute__((__noinline__)) function_declaration_inline_before(void) {} /* { dg-warning "function \[^\n\]* redeclared with attribute noinline" "" } */
+static void __attribute__((__noinline__)) function_declaration_inline_before(void) {} /* { dg-warning "follows inline declaration" "" } */
-static inline void function_declaration_inline_noinline_before(void); /* { dg-warning "previous declaration \[^\n\]* was inline" "" } */
+static inline void function_declaration_inline_noinline_before(void); /* { dg-warning "previous declaration" "" } */
-static void function_declaration_inline_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "function \[^\n\]* redeclared with attribute noinline" "" } */
+static void function_declaration_inline_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
static void function_declaration_inline_noinline_before(void) {}
static inline void function_declaration_inline_noinline_after(void);
-static void function_declaration_inline_noinline_after(void) {} /* { dg-warning "previous declaration \[^\n\]* was inline" "" } */
+static void function_declaration_inline_noinline_after(void) {} /* { dg-warning "previous definition" "" } */
-static void function_declaration_inline_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "function \[^\n\]* redeclared with attribute noinline" "" } */
+static void function_declaration_inline_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
-static void function_declaration_noinline_inline_before(void) __attribute__((__noinline__)); /* { dg-warning "previous declaration\[^\n\]* with attribute noinline" "" } */
+static void function_declaration_noinline_inline_before(void) __attribute__((__noinline__)); /* { dg-warning "previous declaration" "" } */
-static inline void function_declaration_noinline_inline_before(void); /* { dg-warning "function \[^\n\]* redeclared as inline" "" } */
+static inline void function_declaration_noinline_inline_before(void); /* { dg-warning "follows declaration with attribute noinline" "" } */
static void function_declaration_noinline_inline_before(void) {}
diff --git a/gcc/testsuite/gcc.dg/bf-spl1.c b/gcc/testsuite/gcc.dg/bf-spl1.c
index df3f4817043..e82f3be6fe9 100644
--- a/gcc/testsuite/gcc.dg/bf-spl1.c
+++ b/gcc/testsuite/gcc.dg/bf-spl1.c
@@ -2,8 +2,10 @@
/* { dg-options { -m68000 -O2 } { target m68k-*-* } } */
/* { dg-options { -O2 } { target sparc-*-* } } */
-typedef SFtype __attribute__ ((mode (SF)));
-typedef DFtype __attribute__ ((mode (DF)));
+extern void abort (void);
+
+typedef float SFtype __attribute__ ((mode (SF)));
+typedef float DFtype __attribute__ ((mode (DF)));
typedef int HItype __attribute__ ((mode (HI)));
typedef int SItype __attribute__ ((mode (SI)));
diff --git a/gcc/testsuite/gcc.dg/bitfld-1.c b/gcc/testsuite/gcc.dg/bitfld-1.c
index ae2283cfb1f..37acb6efac2 100644
--- a/gcc/testsuite/gcc.dg/bitfld-1.c
+++ b/gcc/testsuite/gcc.dg/bitfld-1.c
@@ -25,6 +25,7 @@ struct bf1
unsigned long g: 5; /* { dg-warning "GCC extension|ISO C" } */
ui h: 5;
enum foo i: 2; /* { dg-error "narrower" } */
- enum foo j: 3;
+ /* { dg-warning "GCC extension|ISO C" "extension" { target *-*-* } 27 } */
+ enum foo j: 3; /* { dg-warning "GCC extension|ISO C" } */
unsigned int k: 256; /* { dg-error "exceeds its type" } */
};
diff --git a/gcc/testsuite/gcc.dg/bitfld-2.c b/gcc/testsuite/gcc.dg/bitfld-2.c
index d3096a7caa8..b61fec60841 100644
--- a/gcc/testsuite/gcc.dg/bitfld-2.c
+++ b/gcc/testsuite/gcc.dg/bitfld-2.c
@@ -11,13 +11,13 @@ struct bf
int b: 2;
};
-struct bf p = {4, 0}; /* { dg-warning "truncated" "" { xfail *-*-* } } */
-struct bf q = {0, 2}; /* { dg-warning "overflow" "" { xfail *-*-* } } */
+struct bf p = {4, 0}; /* { dg-warning "truncated" "" } */
+struct bf q = {0, 2}; /* { dg-warning "overflow" "" } */
struct bf r = {3, -2}; /* { dg-bogus "(truncated|overflow)" } */
void foo ()
{
- p.a = 4, p.b = 0; /* { dg-warning "truncated" "" { xfail *-*-* } } */
- q.a = 0, q.b = 2; /* { dg-warning "overflow" "" { xfail *-*-* } } */
+ p.a = 4, p.b = 0; /* { dg-warning "truncated" "" } */
+ q.a = 0, q.b = 2; /* { dg-warning "overflow" "" } */
r.a = 3, r.b = -2; /* { dg-bogus "(truncated|overflow)" } */
}
diff --git a/gcc/testsuite/gcc.dg/builtin-inf-1.c b/gcc/testsuite/gcc.dg/builtin-inf-1.c
index ca235adeec0..d2d28415899 100644
--- a/gcc/testsuite/gcc.dg/builtin-inf-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-inf-1.c
@@ -8,6 +8,6 @@ float fh = __builtin_huge_valf();
double dh = __builtin_huge_val();
long double lh = __builtin_huge_vall();
-/* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* i370-*-* c4x-*-* } 3 } */
-/* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* i370-*-* c4x-*-* } 4 } */
-/* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* i370-*-* c4x-*-* } 5 } */
+/* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* c4x-*-* } 3 } */
+/* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* c4x-*-* } 4 } */
+/* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* c4x-*-* } 5 } */
diff --git a/gcc/testsuite/gcc.dg/builtin-prefetch-1.c b/gcc/testsuite/gcc.dg/builtin-prefetch-1.c
index d547cfcd9e2..4e30275fde5 100644
--- a/gcc/testsuite/gcc.dg/builtin-prefetch-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-prefetch-1.c
@@ -5,6 +5,8 @@
/* { dg-do run } */
+extern void exit (int);
+
enum locality { none, low, moderate, high, bogus };
enum rw { read, write };
diff --git a/gcc/testsuite/gcc.dg/builtins-1.c b/gcc/testsuite/gcc.dg/builtins-1.c
index 41bd8d5788c..74144f7befa 100644
--- a/gcc/testsuite/gcc.dg/builtins-1.c
+++ b/gcc/testsuite/gcc.dg/builtins-1.c
@@ -151,8 +151,6 @@ FPTEST1 (logb)
FPTEST1RET (lrint, long)
FPTEST1RET (lround, long)
FPTEST2FPP2 (modf)
-FPTEST1ARG (nan, char *)
-FPTEST1ARG (nans, char *)
FPTEST1 (nearbyint)
FPTEST2 (nextafter)
FPTEST2 (nexttoward)
@@ -165,6 +163,7 @@ FPTEST1 (round)
FPTEST2 (scalb)
FPTEST2ARG2 (scalbln, int)
FPTEST2ARG2 (scalbn, int)
+FPTEST1RET (signbit, int)
FPTEST1 (significand)
FPTEST1 (sin)
FPTEST3FPP23VOID (sincos)
diff --git a/gcc/testsuite/gcc.dg/builtins-17.c b/gcc/testsuite/gcc.dg/builtins-17.c
index f33512cb916..a9e21fba8a3 100644
--- a/gcc/testsuite/gcc.dg/builtins-17.c
+++ b/gcc/testsuite/gcc.dg/builtins-17.c
@@ -11,7 +11,7 @@
extern void link_error(void);
extern double exp(double);
-
+extern double atan(double);
int main()
{
diff --git a/gcc/testsuite/gcc.dg/builtins-18.c b/gcc/testsuite/gcc.dg/builtins-18.c
index 86338c03e09..a47de8b609e 100644
--- a/gcc/testsuite/gcc.dg/builtins-18.c
+++ b/gcc/testsuite/gcc.dg/builtins-18.c
@@ -8,6 +8,8 @@
/* { dg-do link } */
/* { dg-options "-O2 -ffast-math" } */
+#include "builtins-config.h"
+
extern void link_error(void);
extern float cabsf (float _Complex);
@@ -23,6 +25,7 @@ main (void)
double _Complex dc = 3.0 + 4.0i;
long double _Complex ldc = 3.0L + 4.0iL;
+#ifdef HAVE_C99_RUNTIME
/* Test floats. */
if (cabsf (fc) != 5.0F)
link_error ();
@@ -32,6 +35,7 @@ main (void)
link_failure ();
if (__builtin_cabsf (3.0F + 4.0iF) != 5.0F)
link_failure ();
+#endif
/* Test doubles. */
if (cabs (dc) != 5.0)
@@ -43,6 +47,7 @@ main (void)
if (__builtin_cabs (3.0 + 4.0i) != 5.0)
link_failure ();
+#ifdef HAVE_C99_RUNTIME
/* Test long doubles. */
if (cabsl (ldc) != 5.0L)
link_error ();
@@ -52,6 +57,7 @@ main (void)
link_failure ();
if (__builtin_cabsl (3.0L + 4.0iL) != 5.0L)
link_failure ();
+#endif
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/builtins-19.c b/gcc/testsuite/gcc.dg/builtins-19.c
index a691f5eb97d..f0583a9783b 100644
--- a/gcc/testsuite/gcc.dg/builtins-19.c
+++ b/gcc/testsuite/gcc.dg/builtins-19.c
@@ -10,6 +10,9 @@
double cabs (__complex__ double);
float cabsf (__complex__ float);
long double cabsl (__complex__ long double);
+double fabs (double);
+float fabsf (float);
+long double fabsl (long double);
void link_error (void);
diff --git a/gcc/testsuite/gcc.dg/builtins-2.c b/gcc/testsuite/gcc.dg/builtins-2.c
index e3d652259b6..b1f31c84aa5 100644
--- a/gcc/testsuite/gcc.dg/builtins-2.c
+++ b/gcc/testsuite/gcc.dg/builtins-2.c
@@ -8,6 +8,28 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math" } */
+extern double atan (double);
+extern float atanf (float);
+extern long double atanl (long double);
+extern double exp (double);
+extern float expf (float);
+extern long double expl (long double);
+extern double fabs (double);
+extern float fabsf (float);
+extern long double fabsl (long double);
+extern double log (double);
+extern float logf (float);
+extern long double logl (long double);
+extern double pow (double, double);
+extern float powf (float, float);
+extern long double powl (long double, long double);
+extern double sqrt (double);
+extern float sqrtf (float);
+extern long double sqrtl (long double);
+extern double tan (double);
+extern float tanf (float);
+extern long double tanl (long double);
+
double test1(double x)
{
return log(exp(x));
diff --git a/gcc/testsuite/gcc.dg/builtins-20.c b/gcc/testsuite/gcc.dg/builtins-20.c
index a4e24a8029b..fb7dd95c84b 100644
--- a/gcc/testsuite/gcc.dg/builtins-20.c
+++ b/gcc/testsuite/gcc.dg/builtins-20.c
@@ -8,6 +8,18 @@
/* { dg-do link } */
/* { dg-options "-O2 -ffast-math" } */
+#include "builtins-config.h"
+
+extern double cos (double);
+extern double sin (double);
+extern double tan (double);
+extern float cosf (float);
+extern float sinf (float);
+extern float tanf (float);
+extern long double cosl (long double);
+extern long double sinl (long double);
+extern long double tanl (long double);
+
extern void link_error(void);
void test1(double x)
@@ -42,6 +54,7 @@ void test1f(float x)
if (cosf(x) != cosf(-x))
link_error ();
+#ifdef HAVE_C99_RUNTIME
if (sinf(x)/cosf(x) != tanf(x))
link_error ();
@@ -53,6 +66,7 @@ void test1f(float x)
if (cosf(x)*tanf(x) != sinf(x))
link_error ();
+#endif
}
void test2f(float x, float y)
@@ -70,6 +84,7 @@ void test1l(long double x)
if (cosl(x) != cosl(-x))
link_error ();
+#ifdef HAVE_C99_RUNTIME
if (sinl(x)/cosl(x) != tanl(x))
link_error ();
@@ -81,6 +96,7 @@ void test1l(long double x)
if (cosl(x)*tanl(x) != sinl(x))
link_error ();
+#endif
}
void test2l(long double x, long double y)
diff --git a/gcc/testsuite/gcc.dg/builtins-21.c b/gcc/testsuite/gcc.dg/builtins-21.c
index 38d0c4f3114..60b127fe61b 100644
--- a/gcc/testsuite/gcc.dg/builtins-21.c
+++ b/gcc/testsuite/gcc.dg/builtins-21.c
@@ -8,6 +8,16 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math" } */
+extern double fabs (double);
+extern float fabsf (float);
+extern long double fabsl (long double);
+extern double sqrt (double);
+extern float sqrtf (float);
+extern long double sqrtl (long double);
+extern double exp (double);
+extern float expf (float);
+extern long double expl (long double);
+
double test1(double x)
{
return fabs(x*x);
diff --git a/gcc/testsuite/gcc.dg/builtins-25.c b/gcc/testsuite/gcc.dg/builtins-25.c
deleted file mode 100644
index 495056615ca..00000000000
--- a/gcc/testsuite/gcc.dg/builtins-25.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation.
-
- Check that constant folding of built-in math functions doesn't
- break anything and produces the expected results.
-
- Written by Roger Sayle, 28th June 2003. */
-
-/* { dg-do link } */
-/* { dg-options "-O2" } */
-
-extern void link_error(void);
-
-extern double trunc(double);
-extern double floor(double);
-extern double ceil(double);
-
-extern float truncf(float);
-extern float floorf(float);
-extern float ceilf(float);
-
-extern long double truncl(long double);
-extern long double floorl(long double);
-extern long double ceill(long double);
-
-void test()
-{
- if (trunc (0.0) != 0.0)
- link_error ();
- if (floor (0.0) != 0.0)
- link_error ();
- if (ceil (0.0) != 0.0)
- link_error ();
-
- if (trunc (6.0) != 6.0)
- link_error ();
- if (floor (6.0) != 6.0)
- link_error ();
- if (ceil (6.0) != 6.0)
- link_error ();
-
- if (trunc (-8.0) != -8.0)
- link_error ();
- if (floor (-8.0) != -8.0)
- link_error ();
- if (ceil (-8.0) != -8.0)
- link_error ();
-
- if (trunc (3.2) != 3.0)
- link_error ();
- if (floor (3.2) != 3.0)
- link_error ();
- if (ceil (3.2) != 4.0)
- link_error ();
-
- if (trunc (-2.8) != -2.0)
- link_error ();
- if (floor (-2.8) != -3.0)
- link_error ();
- if (ceil (-2.8) != -2.0)
- link_error ();
-
- if (trunc (0.01) != 0.0)
- link_error ();
- if (floor (0.01) != 0.0)
- link_error ();
- if (ceil (0.01) != 1.0)
- link_error ();
-
- if (trunc (-0.7) != 0.0)
- link_error ();
- if (floor (-0.7) != -1.0)
- link_error ();
- if (ceil (-0.7) != 0.0)
- link_error ();
-}
-
-void testf()
-{
- if (truncf (0.0f) != 0.0f)
- link_error ();
- if (floorf (0.0f) != 0.0f)
- link_error ();
- if (ceilf (0.0f) != 0.0f)
- link_error ();
-
- if (truncf (6.0f) != 6.0f)
- link_error ();
- if (floorf (6.0f) != 6.0f)
- link_error ();
- if (ceilf (6.0f) != 6.0f)
- link_error ();
-
- if (truncf (-8.0f) != -8.0f)
- link_error ();
- if (floorf (-8.0f) != -8.0f)
- link_error ();
- if (ceilf (-8.0f) != -8.0f)
- link_error ();
-
- if (truncf (3.2f) != 3.0f)
- link_error ();
- if (floorf (3.2f) != 3.0f)
- link_error ();
- if (ceilf (3.2f) != 4.0f)
- link_error ();
-
- if (truncf (-2.8f) != -2.0f)
- link_error ();
- if (floorf (-2.8f) != -3.0f)
- link_error ();
- if (ceilf (-2.8f) != -2.0f)
- link_error ();
-
- if (truncf (0.01f) != 0.0f)
- link_error ();
- if (floorf (0.01f) != 0.0f)
- link_error ();
- if (ceilf (0.01f) != 1.0f)
- link_error ();
-
- if (truncf (-0.7f) != 0.0f)
- link_error ();
- if (floorf (-0.7f) != -1.0f)
- link_error ();
- if (ceilf (-0.7f) != 0.0f)
- link_error ();
-}
-
-void testl()
-{
- if (truncl (0.0l) != 0.0l)
- link_error ();
- if (floorl (0.0l) != 0.0l)
- link_error ();
- if (ceill (0.0l) != 0.0l)
- link_error ();
-
- if (truncl (6.0l) != 6.0l)
- link_error ();
- if (floorl (6.0l) != 6.0l)
- link_error ();
- if (ceill (6.0l) != 6.0l)
- link_error ();
-
- if (truncl (-8.0l) != -8.0l)
- link_error ();
- if (floorl (-8.0l) != -8.0l)
- link_error ();
- if (ceill (-8.0l) != -8.0l)
- link_error ();
-
- if (truncl (3.2l) != 3.0l)
- link_error ();
- if (floorl (3.2l) != 3.0l)
- link_error ();
- if (ceill (3.2l) != 4.0l)
- link_error ();
-
- if (truncl (-2.8l) != -2.0l)
- link_error ();
- if (floorl (-2.8l) != -3.0l)
- link_error ();
- if (ceill (-2.8l) != -2.0l)
- link_error ();
-
- if (truncl (0.01l) != 0.0l)
- link_error ();
- if (floorl (0.01l) != 0.0l)
- link_error ();
- if (ceill (0.01l) != 1.0l)
- link_error ();
-
- if (truncl (-0.7l) != 0.0l)
- link_error ();
- if (floorl (-0.7l) != -1.0l)
- link_error ();
- if (ceill (-0.7l) != 0.0l)
- link_error ();
-}
-
-int main()
-{
- test ();
- testf ();
- testl ();
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/builtins-34.c b/gcc/testsuite/gcc.dg/builtins-34.c
index f2625d5ef59..0055f329dd5 100644
--- a/gcc/testsuite/gcc.dg/builtins-34.c
+++ b/gcc/testsuite/gcc.dg/builtins-34.c
@@ -12,17 +12,14 @@ extern double exp10(double);
extern double exp2(double);
extern double pow10(double);
extern double expm1(double);
-extern double ldexp(double, int);
extern float exp10f(float);
extern float exp2f(float);
extern float pow10f(float);
extern float expm1f(float);
-extern float ldexpf(float, int);
extern long double exp10l(long double);
extern long double exp2l(long double);
extern long double pow10l(long double);
extern long double expm1l(long double);
-extern long double ldexpl(long double, int);
double test1(double x)
@@ -45,11 +42,6 @@ double test4(double x)
return expm1(x);
}
-double test5(double x, int exp)
-{
- return ldexp(x, exp);
-}
-
float test1f(float x)
{
return exp10f(x);
@@ -70,11 +62,6 @@ float test4f(float x)
return expm1f(x);
}
-float test5f(float x, int exp)
-{
- return ldexpf(x, exp);
-}
-
long double test1l(long double x)
{
return exp10l(x);
@@ -95,7 +82,3 @@ long double test4l(long double x)
return expm1l(x);
}
-long double test5l(long double x, int exp)
-{
- return ldexpl(x, exp);
-}
diff --git a/gcc/testsuite/gcc.dg/builtins-7.c b/gcc/testsuite/gcc.dg/builtins-7.c
index 87995a4d3a0..13e708e2997 100644
--- a/gcc/testsuite/gcc.dg/builtins-7.c
+++ b/gcc/testsuite/gcc.dg/builtins-7.c
@@ -8,6 +8,16 @@
/* { dg-do link } */
/* { dg-options "-O2 -ffast-math" } */
+extern double pow (double, double);
+extern float powf (float, float);
+extern long double powl (long double, long double);
+extern double tan (double);
+extern float tanf (float);
+extern long double tanl (long double);
+extern double atan (double);
+extern float atanf (float);
+extern long double atanl (long double);
+
extern void link_error(void);
void test(double x)
diff --git a/gcc/testsuite/gcc.dg/builtins-8.c b/gcc/testsuite/gcc.dg/builtins-8.c
index 99d1a70d01a..c3066b41cab 100644
--- a/gcc/testsuite/gcc.dg/builtins-8.c
+++ b/gcc/testsuite/gcc.dg/builtins-8.c
@@ -9,6 +9,8 @@
/* { dg-options "-O2 -ffast-math" } */
extern void abort(void);
+extern double pow(double, double);
+extern double sqrt(double);
void test(double x)
{
diff --git a/gcc/testsuite/gcc.dg/builtins-config.h b/gcc/testsuite/gcc.dg/builtins-config.h
index 05afc5ee567..d56cc1fb3a6 100644
--- a/gcc/testsuite/gcc.dg/builtins-config.h
+++ b/gcc/testsuite/gcc.dg/builtins-config.h
@@ -23,14 +23,13 @@
/* Newlib has the "f" variants of the math functions, but not the "l"
variants. TARGET_C99_FUNCTIONS is only defined if all C99
functions are present. Therefore, on systems using newlib, tests
- of builtins will fail the "l" variants, and we should therefore not
- define HAVE_C99_RUNTIME. Including <sys/types.h> gives us a way of
- seeing if _NEWLIB_VERSION is defined. Including <math.h> would work
- too, but the GLIBC math inlines cause us to generate inferior code,
- which causes the test to fail, so it is not safe. Including <limits.h>
- also fails because the include search paths are ordered such that GCC's
- version will be found before the newlib version. */
-#include <sys/types.h>
+ of builtins will fail for both the "f" and the "l" variants, and we
+ should therefore not define HAVE_C99_RUNTIME. Including <limits.h>
+ gives us a way of seeing if _NEWLIB_VERSION is defined. Include
+ <math.h> would work too, but the GLIBC math inlines cause us to
+ generate inferior code, which causes the test to fail, so it is
+ not safe to include <math.h>. */
+#include <limits.h>
#ifdef _NEWLIB_VERSION
#else
#define HAVE_C99_RUNTIME
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-2.c b/gcc/testsuite/gcc.dg/c90-const-expr-2.c
index 746093bebcf..8c2c99f5cdb 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-2.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-2.c
@@ -14,6 +14,12 @@ int *a;
int b;
long *c;
+#ifdef _LP64
+#define ZERO 0L
+#else
+#define ZERO 0
+#endif
+
/* Assertion that n is a null pointer constant: so the conditional expression
has type 'int *' instead of 'void *'.
*/
@@ -30,7 +36,7 @@ foo (void)
ASSERT_NPC ((void *)0);
ASSERT_NOT_NPC ((void *)(void *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
ASSERT_NOT_NPC ((void *)(char *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
- ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
+ ASSERT_NOT_NPC ((void *)(0, ZERO)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
/* This last one is a null pointer constant in C99 only. */
ASSERT_NOT_NPC ((void *)(1 ? 0 : (0, 0))); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
diff --git a/gcc/testsuite/gcc.dg/c90-init-1.c b/gcc/testsuite/gcc.dg/c90-init-1.c
index 1ea0bdb4006..68308d3e266 100644
--- a/gcc/testsuite/gcc.dg/c90-init-1.c
+++ b/gcc/testsuite/gcc.dg/c90-init-1.c
@@ -7,10 +7,10 @@ struct A {
int B;
short C[2];
};
-int a[10] = { 10, [4] = 15 }; /* { dg-error "ISO C89 forbids specifying subobject to initialize" } */
-struct A b = { .B = 2 }; /* { dg-error "ISO C89 forbids specifying subobject to initialize" } */
-struct A c[] = { [3].C[1] = 1 }; /* { dg-error "ISO C89 forbids specifying subobject to initialize" } */
-struct A d[] = { [4 ... 6].C[0 ... 1] = 2 }; /* { dg-error "(forbids specifying range of elements to initialize)|(ISO C89 forbids specifying subobject to initialize)" } */
+int a[10] = { 10, [4] = 15 }; /* { dg-error "ISO (C89|C90) forbids specifying subobject to initialize" } */
+struct A b = { .B = 2 }; /* { dg-error "ISO (C89|C90) forbids specifying subobject to initialize" } */
+struct A c[] = { [3].C[1] = 1 }; /* { dg-error "ISO (C89|C90) forbids specifying subobject to initialize" } */
+struct A d[] = { [4 ... 6].C[0 ... 1] = 2 }; /* { dg-error "(forbids specifying range of elements to initialize)|(ISO (C89|C90) forbids specifying subobject to initialize)" } */
int e[] = { [2] 2 }; /* { dg-error "use of designated initializer without" } */
struct A f = { C: { 0, 1 } }; /* { dg-error "use of designated initializer with " } */
int g;
diff --git a/gcc/testsuite/gcc.dg/c99-arraydecl-2.c b/gcc/testsuite/gcc.dg/c99-arraydecl-2.c
index 22d6e97be46..e2085e1a186 100644
--- a/gcc/testsuite/gcc.dg/c99-arraydecl-2.c
+++ b/gcc/testsuite/gcc.dg/c99-arraydecl-2.c
@@ -7,10 +7,10 @@
void
foo (void)
{
- int a[2, 3]; /* { dg-error "parse|syntax|expected" "bad array declarator" } */
- void b(int x[2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
- void c(int [2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
- void d(int *x[restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
- void e(int *x[static restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
- void f(int *x[restrict static 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
+ int a[2, 3]; /* { dg-error "parse|syntax" "bad array declarator" } */
+ void b(int x[2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */
+ void c(int [2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */
+ void d(int *x[restrict 2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */
+ void e(int *x[static restrict 2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */
+ void f(int *x[restrict static 2, 3]); /* { dg-error "parse|syntax" "bad array declarator" } */
}
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-2.c b/gcc/testsuite/gcc.dg/c99-const-expr-2.c
index c9f8e0ffbc8..1a457e51a7d 100644
--- a/gcc/testsuite/gcc.dg/c99-const-expr-2.c
+++ b/gcc/testsuite/gcc.dg/c99-const-expr-2.c
@@ -14,6 +14,12 @@ int *a;
int b;
long *c;
+#ifdef _LP64
+#define ZERO 0L
+#else
+#define ZERO 0
+#endif
+
/* Assertion that n is a null pointer constant: so the conditional expression
has type 'int *' instead of 'void *'.
*/
@@ -30,7 +36,7 @@ foo (void)
ASSERT_NPC ((void *)0);
ASSERT_NOT_NPC ((void *)(void *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
ASSERT_NOT_NPC ((void *)(char *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
- ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
+ ASSERT_NOT_NPC ((void *)(0, ZERO)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
/* This last one is a null pointer constant in C99 only. */
ASSERT_NPC ((void *)(1 ? 0 : (0, 0)));
diff --git a/gcc/testsuite/gcc.dg/c99-flex-array-4.c b/gcc/testsuite/gcc.dg/c99-flex-array-4.c
index ab20cf07cc4..c4a0564b599 100644
--- a/gcc/testsuite/gcc.dg/c99-flex-array-4.c
+++ b/gcc/testsuite/gcc.dg/c99-flex-array-4.c
@@ -5,7 +5,9 @@
from Tony Finch <dot@dotat.at>, adapted to a testcase by Joseph Myers
<jsm28@cam.ac.uk>. See also WG14 reflector messages 9571-3. */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* -fpack-struct is necessary because the code below assumes the initial
+ packing is larger than 1, which cannot ge guaranteed for all targets. */
+/* { dg-options "-std=iso9899:1999 -fpack-struct=8 -pedantic-errors" } */
#include <stddef.h>
diff --git a/gcc/testsuite/gcc.dg/charset/asm2.c b/gcc/testsuite/gcc.dg/charset/asm2.c
index bfca86c8e96..6726b2da5c9 100644
--- a/gcc/testsuite/gcc.dg/charset/asm2.c
+++ b/gcc/testsuite/gcc.dg/charset/asm2.c
@@ -3,13 +3,13 @@
the string "foobar" should be translated. */
/* { dg-do compile } */
/* { dg-require-iconv "IBM-1047" } */
-asm (not_a_string); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */
+asm (not_a_string); /* { dg-error "(parse|syntax) error before" "not_a_string" } */
char x[] = "foobar";
void foo (void)
{
char *y;
- asm (not_a_string2); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */
+ asm (not_a_string2); /* { dg-error "(parse|syntax) error before" "not_a_string" } */
#define FOO "walrus"
y = FOO;
diff --git a/gcc/testsuite/gcc.dg/cleanup-8.c b/gcc/testsuite/gcc.dg/cleanup-8.c
index 91e387ce799..25bc305adc1 100644
--- a/gcc/testsuite/gcc.dg/cleanup-8.c
+++ b/gcc/testsuite/gcc.dg/cleanup-8.c
@@ -1,5 +1,5 @@
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* alpha*-*-linux* powerpc*-*-linux* s390*-*-linux* sparc*-*-linux* } } */
-/* { dg-options "-fasynchronous-unwind-tables -fexceptions -O2" } */
+/* { dg-do run { target *-*-linux* powerpc*-*-darwin* } } */
+/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through signal
frames. */
@@ -78,6 +78,7 @@ static int __attribute__((noinline)) fn2 ()
static int __attribute__((noinline)) fn1 ()
{
signal (SIGSEGV, fn4);
+ signal (SIGBUS, fn4);
fn2 ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/cleanup-9.c b/gcc/testsuite/gcc.dg/cleanup-9.c
index 0c17f25f63d..4cf4a413fa4 100644
--- a/gcc/testsuite/gcc.dg/cleanup-9.c
+++ b/gcc/testsuite/gcc.dg/cleanup-9.c
@@ -1,5 +1,5 @@
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* alpha*-*-linux* powerpc*-*-linux* s390*-*-linux* sparc*-*-linux* } } */
-/* { dg-options "-fasynchronous-unwind-tables -fexceptions -O2" } */
+/* { dg-do run { target *-*-linux* powerpc*-*-darwin* } } */
+/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime
signal frames. */
@@ -80,8 +80,9 @@ static int __attribute__((noinline)) fn1 ()
struct sigaction s;
sigemptyset (&s.sa_mask);
s.sa_sigaction = fn4;
- s.sa_flags = SA_ONESHOT | SA_SIGINFO;
+ s.sa_flags = SA_RESETHAND | SA_SIGINFO;
sigaction (SIGSEGV, &s, NULL);
+ sigaction (SIGBUS, &s, NULL);
fn2 ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/compat/compat-common.h b/gcc/testsuite/gcc.dg/compat/compat-common.h
index 95b945fae41..c2664acbd19 100644
--- a/gcc/testsuite/gcc.dg/compat/compat-common.h
+++ b/gcc/testsuite/gcc.dg/compat/compat-common.h
@@ -24,5 +24,20 @@
#define DEBUG_FINI
#endif
+#ifdef __GNUC__
+#define CINT(x, y) (x + __extension__ y##i)
+#define CDBL(x, y) (x + __extension__ y##i)
+#else
+#ifdef __SUNPRO_C
+/* ??? Complex support without <complex.h>. */
+#else
+#include <complex.h>
+#endif
+#ifndef SKIP_COMPLEX_INT
+#define CINT(x, y) ((_Complex int) (x + y * _Complex_I))
+#endif
+#define CDBL(x, y) (x + y * _Complex_I)
+#endif
+
extern void abort (void);
extern int fails;
diff --git a/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c b/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c
index 80f4fbcce1e..156a417a48b 100644
--- a/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/generate-random.c b/gcc/testsuite/gcc.dg/compat/generate-random.c
index 00c422493da..cce21853a59 100644
--- a/gcc/testsuite/gcc.dg/compat/generate-random.c
+++ b/gcc/testsuite/gcc.dg/compat/generate-random.c
@@ -175,8 +175,8 @@ static struct generate_random_data unsafe_state =
in the initialization of randtbl) because the state table pointer is set
to point to randtbl[1] (as explained below).) */
- &randtbl[SEP_3 + 1], /* fptr */
- &randtbl[1], /* rptr */
+ .fptr = &randtbl[SEP_3 + 1],
+ .rptr = &randtbl[1],
/* The following things are the pointer to the state information table,
the type of the current generator, the degree of the current polynomial
@@ -188,13 +188,13 @@ static struct generate_random_data unsafe_state =
indexing every time to find the address of the last element to see if
the front and rear pointers have wrapped. */
- &randtbl[1], /* state */
+ .state = &randtbl[1],
- TYPE_3, /* rand_type */
- DEG_3, /* rand_deg */
- SEP_3, /* rand_sep */
+ .rand_type = TYPE_3,
+ .rand_deg = DEG_3,
+ .rand_sep = SEP_3,
- &randtbl[sizeof (randtbl) / sizeof (randtbl[0])] /* end_ptr */
+ .end_ptr = &randtbl[sizeof (randtbl) / sizeof (randtbl[0])]
};
/* Initialize the random number generator based on the given seed. If the
diff --git a/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h b/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
index dae20507c2f..248ffb215f8 100644
--- a/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
+++ b/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
@@ -26,3 +26,12 @@ void checkScssdss (Scssdss x, int i)
void checkScssdssc (Scssdssc x, int i)
{ if (x.c != (char)i || x.ssds.sd.d != (double)i+1
|| x.b != (char)i+2) DEBUG_CHECK }
+
+void checkSfi (Sfi x, int i)
+{ if (x.f != (float)i || x.i != i+1) DEBUG_CHECK }
+void checkSfii (Sfii x, int i)
+{ if (x.f != (float)i || x.i1 != i+1 || x.i2 != i+2) DEBUG_CHECK }
+void checkSfifi (Sfifi x, int i)
+{ if (x.fi.f != (float)i || x.fi.i != i+1) DEBUG_CHECK }
+void checkSfiifii (Sfiifii x, int i)
+{ if (x.fii.f != (float)i || x.fii.i1 != i+1 || x.fii.i2 != i+2) DEBUG_CHECK }
diff --git a/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h b/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h
index 6b8f4e721e3..9a313790f68 100644
--- a/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h
+++ b/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h
@@ -12,3 +12,8 @@ typedef struct { Sd sd; } Ssds;
typedef struct { Sd sd; char c; } Ssdsc;
typedef struct { char c; Ssds ssds; } Scssdss;
typedef struct { char c; Ssds ssds; char b; } Scssdssc;
+
+typedef struct { float f; int i; } Sfi;
+typedef struct { float f; int i1; int i2; } Sfii;
+typedef struct { float f; int i; Sfi fi; } Sfifi;
+typedef struct { float f; int i1; int i2; Sfii fii; } Sfiifii;
diff --git a/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h b/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h
index 7a118cce1a1..b11fc240451 100644
--- a/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h
+++ b/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h
@@ -24,3 +24,12 @@ void initScssdss (Scssdss *p, int i)
{ p->c = (char)i; p->ssds.sd.d = (double)i+1; }
void initScssdssc (Scssdssc *p, int i)
{ p->c = (char)i; p->ssds.sd.d = (double)i+1; p->b = (char)i+2; }
+
+void initSfi (Sfi *x, int i)
+{ x->f = (float)i; x->i = i+1; }
+void initSfii (Sfii *x, int i)
+{ x->f = (float)i; x->i1 = i+1; x->i2 = i+2; }
+void initSfifi (Sfifi *x, int i)
+{ x->fi.f = (float)i; x->fi.i = i+1; }
+void initSfiifii (Sfiifii *x, int i)
+{ x->fii.f = (float)i; x->fii.i1 = i+1; x->fii.i2 = i+2; }
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c
index 7b4b60ea77f..73f3de0e2e7 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
index 25bb389d0c1..6f550b4baec 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
@@ -144,11 +144,13 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (5,6))
-T(cd, _Complex double, (7.0,8.0))
-T(cld, _Complex long double, (8.0,9.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (5, 6))
+#endif
+T(cd, _Complex double, CDBL (7.0, 8.0))
+T(cld, _Complex long double, CDBL (8.0, 9.0))
#undef T
@@ -159,9 +161,11 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(ci)
T(cl)
T(cll)
+#endif
T(cd)
T(cld)
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
index 35354c0f7b5..1e12cc92c62 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -85,8 +84,10 @@ testva##NAME (int n, ...) \
} \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (5,6))
-T(cd, _Complex double, (7.0,8.0))
-T(cld, _Complex long double, (8.0,9.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (5, 6))
+#endif
+T(cd, _Complex double, CDBL (7.0, 8.0))
+T(cld, _Complex long double, CDBL (8.0, 9.0))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
index 8231950c6ef..adc8ece5690 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
@@ -68,9 +68,11 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (6.0,7.0))
+#ifndef SKIP_COMPLEX_INT
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1, 2))
+#endif
+T(cf, _Complex float, CDBL (6.0, 7.0))
#undef T
@@ -81,8 +83,10 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(cc)
T(cs)
+#endif
T(cf)
DEBUG_FINI
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
index fdf5b24e5ba..0db32ab53c9 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -68,6 +67,8 @@ test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04, \
check##NAME (x16, 16); \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (6.0,7.0))
+#ifndef SKIP_COMPLEX_INT
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1, 2))
+#endif
+T(cf, _Complex float, CDBL (6.0, 7.0))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c
index 6525e5e5666..5556f9510a3 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c
index 1f7d5493836..485165c716b 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
index 9dceccdd890..c153f6f19df 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -84,11 +83,13 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (4,5))
-T(cd, _Complex double, (2.0,3.0))
-T(cld, _Complex long double, (3.0,4.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (4, 5))
+#endif
+T(cd, _Complex double, CDBL (2.0, 3.0))
+T(cld, _Complex long double, CDBL (3.0, 4.0))
#undef T
@@ -99,9 +100,11 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(ci)
T(cl)
T(cll)
+#endif
T(cd)
T(cld)
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
index 564866dd223..31dddd0a033 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
@@ -62,8 +62,10 @@ testva##NAME (int n, ...) \
return rslt; \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (4,5))
-T(cd, _Complex double, (2.0,3.0))
-T(cld, _Complex long double, (3.0,4.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (4, 5))
+#endif
+T(cd, _Complex double, CDBL (2.0, 3.0))
+T(cld, _Complex long double, CDBL (3.0, 4.0))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
index c3b31f8c9bf..0ea764958d0 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
@@ -36,9 +36,11 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (1.0,2.0))
+#ifndef SKIP_COMPLEX_INT
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1 + 2))
+#endif
+T(cf, _Complex float, CDBL (1.0, 2.0))
#undef T
@@ -49,8 +51,10 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(cc)
T(cs)
+#endif
T(cf)
DEBUG_FINI
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
index 5ac68b5cc0f..175fb6ccb50 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -38,6 +37,8 @@ test1##NAME (TYPE x01) \
return x01; \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (1.0,2.0))
+#ifndef SKIP_COMPLEX_INT
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1, 2))
+#endif
+T(cf, _Complex float, CDBL (1.0, 2.0))
diff --git a/gcc/testsuite/gcc.dg/compat/sdata-section.h b/gcc/testsuite/gcc.dg/compat/sdata-section.h
index d2bde8066ef..15be8438662 100644
--- a/gcc/testsuite/gcc.dg/compat/sdata-section.h
+++ b/gcc/testsuite/gcc.dg/compat/sdata-section.h
@@ -1,5 +1,7 @@
-#ifdef __mips
+#if defined (__mips) && !defined(SKIP_ATTRIBUTE)
#define SDATA_SECTION __attribute__((__section__(".sdata")))
#else
#define SDATA_SECTION
#endif
+
+extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-1.h b/gcc/testsuite/gcc.dg/compat/struct-align-1.h
index 5283e786f5b..d9006c74159 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-1.h
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-1.h
@@ -27,6 +27,7 @@ struct B3_orig {
struct A3_orig a3;
};
+#ifndef SKIP_ATTRIBUTE
#define DESC_p_all "packed attribute for all"
struct B1_p_all {
char c;
@@ -176,3 +177,4 @@ struct B3_m_inner_p_outer {
char c;
struct A3_m_inner_p_outer a3;
} __attribute__ ((packed));
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c b/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c
index 1500fa75705..6b99ceb002f 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c
@@ -64,12 +64,14 @@ return3_##NAME (void) \
#define CHECK(NAME) test_##NAME()
SETUP (orig, 49, 1.0, 111111)
+#ifndef SKIP_ATTRIBUTE
SETUP (p_all, 50, 2.0, 222222)
SETUP (p_inner, 51, 3.0, 333333)
SETUP (p_outer, 52, 4.0, 444444)
SETUP (a_max, 53, 5.0, 555555)
SETUP (m_outer_p_inner, 54, 6.0, 666666)
SETUP (m_inner_p_outer, 55, 7.0, 777777)
+#endif
void
struct_align_1_x (void)
@@ -77,12 +79,14 @@ struct_align_1_x (void)
DEBUG_INIT
CHECK (orig);
+#ifndef SKIP_ATTRIBUTE
CHECK (p_all);
CHECK (p_inner);
CHECK (p_outer);
CHECK (a_max);
CHECK (m_outer_p_inner);
CHECK (m_inner_p_outer);
+#endif
DEBUG_FINI
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c b/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c
index 744f4de6f28..c858e10d763 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c
@@ -80,9 +80,11 @@ test_##NAME (void) \
}
TEST (orig)
+#ifndef SKIP_ATTRIBUTE
TEST (p_all)
TEST (p_inner)
TEST (p_outer)
TEST (a_max)
TEST (m_outer_p_inner)
TEST (m_inner_p_outer)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-2.h b/gcc/testsuite/gcc.dg/compat/struct-align-2.h
index c97a476c3c4..f94fe57e134 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-2.h
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-2.h
@@ -11,6 +11,7 @@ struct epoll_event_orig {
unsigned long long data;
};
+#ifndef SKIP_ATTRIBUTE
#define DESC_structmax "maximum useful struct alignment"
struct epoll_event_structmax {
unsigned int events;
@@ -71,3 +72,4 @@ struct epoll_event_pdata8 {
unsigned int events;
unsigned long long data __attribute__ ((aligned(8)));
} __attribute__ ((packed));
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c b/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c
index e59cec3f1eb..2a4ae586b76 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c
@@ -1,6 +1,8 @@
/* Disable this test for 16-bit targets. */
-#if __INT_MAX__ > 32767
+#include <limits.h>
+
+#if !(defined __GNUC__) || (INT_MAX > 32767)
#include "compat-common.h"
#include "struct-align-2.h"
@@ -38,6 +40,7 @@ return_##NAME (void) \
test_##NAME()
SETUP (orig,101, 102, 0x0101010101010101ULL)
+#ifndef SKIP_ATTRIBUTE
SETUP (structmax, 103, 104, 0x1212121212121212ULL)
SETUP (struct4, 105, 106, 0x2323232323232323ULL)
SETUP (struct8, 107, 108, 0x3434343434343434ULL)
@@ -48,6 +51,7 @@ SETUP (pstruct4, 115, 116, 0x7878787878787878ULL)
SETUP (pstruct8, 117, 118, 0x8989898989898989ULL)
SETUP (pdata4, 119, 120, 0x9A9A9A9A9A9A9A9AULL)
SETUP (pdata8, 121, 122, 0xABABABABABABABABULL)
+#endif
void
struct_align_2_x (void)
@@ -55,6 +59,7 @@ struct_align_2_x (void)
DEBUG_INIT
CHECK (orig);
+#ifndef SKIP_ATTRIBUTE
CHECK (structmax);
CHECK (struct4);
CHECK (struct8);
@@ -65,6 +70,7 @@ struct_align_2_x (void)
CHECK (pstruct8);
CHECK (pdata4);
CHECK (pdata8);
+#endif
DEBUG_FINI
@@ -76,4 +82,4 @@ struct_align_2_x (void)
void struct_align_2_x (void) {}
-#endif /* __INT_MAX__ */
+#endif /* INT_MAX */
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c b/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c
index 0a5ec6ef31d..0ca2e40c4c1 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c
@@ -1,6 +1,8 @@
/* Disable this test for 16-bit targets. */
-#if __INT_MAX__ > 32767
+#include <limits.h>
+
+#if !(defined __GNUC__) || (INT_MAX > 32767)
#include "compat-common.h"
#include "struct-align-2.h"
@@ -51,6 +53,7 @@ test_##NAME (void) \
}
TEST (orig)
+#ifndef SKIP_ATTRIBUTE
TEST (structmax)
TEST (struct4)
TEST (struct8)
@@ -61,9 +64,10 @@ TEST (pstruct4)
TEST (pstruct8)
TEST (pdata4)
TEST (pdata8)
+#endif
#else
int i; /* prevent compiling an empty file */
-#endif /* __INT_MAX__ */
+#endif /* INT_MAX */
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c
index 30ad45fe7b6..6c9589d029d 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
index b9be4f3b968..cea1ac09688 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cc, _Complex char)
CHECKS(cc, _Complex char)
@@ -23,12 +24,14 @@ TEST(Scc13, _Complex char)
TEST(Scc14, _Complex char)
TEST(Scc15, _Complex char)
TEST(Scc16, _Complex char)
+#endif
#undef T
void
struct_by_value_11_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
index c0f0ad528af..c4e47fc3549 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cc,_Complex char)
INITS(cc, _Complex char)
@@ -32,3 +32,4 @@ TEST(Scc13, _Complex char)
TEST(Scc14, _Complex char)
TEST(Scc15, _Complex char)
TEST(Scc16, _Complex char)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
index 6f943b75fe0..925ce9270b9 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cs, _Complex short)
CHECKS(cs, _Complex short)
@@ -23,12 +24,14 @@ TEST(Scs13, _Complex short)
TEST(Scs14, _Complex short)
TEST(Scs15, _Complex short)
TEST(Scs16, _Complex short)
+#endif
#undef T
void
struct_by_value_12_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
index 50a08b467af..2e8e393eeee 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cs,_Complex short)
INITS(cs, _Complex short)
@@ -32,3 +32,4 @@ TEST(Scs13, _Complex short)
TEST(Scs14, _Complex short)
TEST(Scs15, _Complex short)
TEST(Scs16, _Complex short)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
index 4418522d342..f27222f2df6 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(ci, _Complex int)
CHECKS(ci, _Complex int)
@@ -23,12 +24,14 @@ TEST(Sci13, _Complex int)
TEST(Sci14, _Complex int)
TEST(Sci15, _Complex int)
TEST(Sci16, _Complex int)
+#endif
#undef T
void
struct_by_value_13_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
index e53ee59fc43..7a3657e0f01 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(ci,_Complex int)
INITS(ci, _Complex int)
@@ -32,3 +32,4 @@ TEST(Sci13, _Complex int)
TEST(Sci14, _Complex int)
TEST(Sci15, _Complex int)
TEST(Sci16, _Complex int)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
index e5dbe736a12..bb8db70721e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cl, _Complex long)
CHECKS(cl, _Complex long)
@@ -23,12 +24,14 @@ TEST(Scl13, _Complex long)
TEST(Scl14, _Complex long)
TEST(Scl15, _Complex long)
TEST(Scl16, _Complex long)
+#endif
#undef T
void
struct_by_value_14_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
index 640b11bb06d..5abd063ef21 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cl,_Complex long)
INITS(cl, _Complex long)
@@ -32,3 +32,4 @@ TEST(Scl13, _Complex long)
TEST(Scl14, _Complex long)
TEST(Scl15, _Complex long)
TEST(Scl16, _Complex long)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
index 213568ab40a..4409c9668dc 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cll, _Complex long long)
CHECKS(cll, _Complex long long)
@@ -23,12 +24,14 @@ TEST(Scll13, _Complex long long)
TEST(Scll14, _Complex long long)
TEST(Scll15, _Complex long long)
TEST(Scll16, _Complex long long)
+#endif
#undef T
void
struct_by_value_15_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
index e7cf60a2d45..a5fec4fdb6e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cll,_Complex long long)
INITS(cll, _Complex long long)
@@ -32,3 +32,4 @@ TEST(Scll13, _Complex long long)
TEST(Scll14, _Complex long long)
TEST(Scll15, _Complex long long)
TEST(Scll16, _Complex long long)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
index 9aa8c3f33a0..273d7cc4f3e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
index f8e1a6aca06..a0342a37c0c 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
index 662419326b9..b69425a5f4e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c
index 8b0f1e8f70f..036c6b618d7 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c
index 692af0d2b45..67ac16d1d15 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c
@@ -34,7 +34,10 @@ testit##N (void) \
extern void abort (void);
-T(0) T(1) T(2) T(3) T(4) T(5) T(6) T(7)
+#ifndef SKIP_ZERO_ARRAY
+T(0)
+#endif
+T(1) T(2) T(3) T(4) T(5) T(6) T(7)
T(8) T(9) T(10) T(11) T(12) T(13) T(14) T(15)
T(16) T(17) T(18) T(19) T(20) T(21) T(22) T(23)
T(24) T(25) T(26) T(27) T(28) T(29) T(30) T(31)
@@ -50,7 +53,10 @@ struct_by_value_1_x ()
{
#define T(N) testit##N ();
-T(0) T(1) T(2) T(3) T(4) T(5) T(6) T(7)
+#ifndef SKIP_ZERO_ARRAY
+T(0)
+#endif
+T(1) T(2) T(3) T(4) T(5) T(6) T(7)
T(8) T(9) T(10) T(11) T(12) T(13) T(14) T(15)
T(16) T(17) T(18) T(19) T(20) T(21) T(22) T(23)
T(24) T(25) T(26) T(27) T(28) T(29) T(30) T(31)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c
index 72eb05a647f..8370dbac342 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c
@@ -30,7 +30,10 @@ test##N (struct S##N s1, struct S##N s2, \
check##N (s3, 192); \
}
-T(0) T(1) T(2) T(3) T(4) T(5) T(6) T(7)
+#ifndef SKIP_ZERO_ARRAY
+T(0)
+#endif
+T(1) T(2) T(3) T(4) T(5) T(6) T(7)
T(8) T(9) T(10) T(11) T(12) T(13) T(14) T(15)
T(16) T(17) T(18) T(19) T(20) T(21) T(22) T(23)
T(24) T(25) T(26) T(27) T(28) T(29) T(30) T(31)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c
index 6e02e7d0a00..1a4a6775def 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c
index 48bb0b70675..57c6da0c0bb 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c
@@ -105,7 +105,9 @@ testit##NAME##N (void) \
DEBUG_NL; \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -121,7 +123,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -137,7 +141,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
@@ -163,7 +169,9 @@ DEBUG_INIT
#define T(N, NAME, TYPE) testit##NAME##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -179,7 +187,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -195,7 +205,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c
index f5b3c713f17..3b203fab201 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -102,7 +101,9 @@ testva##NAME##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -118,7 +119,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -134,7 +137,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c
index 571bea8d414..d5a31c9d5a4 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c
index e90b710b9fc..def20ce8b03 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c
@@ -129,7 +129,9 @@ void checkScsi (Scsi x, int i)
void checkScis (Scis x, int i)
{ if (x.c != i/16 || x.i != i+1 || x.s != i+2) DEBUG_CHECK }
+#ifndef SKIP_ZERO_ARRAY
T(0, Sc)
+#endif
T(1, Sc)
T(2, Sc)
T(3, Sc)
@@ -145,7 +147,9 @@ T(12, Sc)
T(13, Sc)
T(14, Sc)
T(15, Sc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Ss)
+#endif
T(1, Ss)
T(2, Ss)
T(3, Ss)
@@ -161,7 +165,9 @@ T(12, Ss)
T(13, Ss)
T(14, Ss)
T(15, Ss)
+#ifndef SKIP_ZERO_ARRAY
T(0, Si)
+#endif
T(1, Si)
T(2, Si)
T(3, Si)
@@ -187,7 +193,9 @@ DEBUG_INIT
#define T(N, TYPE) testit##TYPE##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, Sc)
+#endif
T(1, Sc)
T(2, Sc)
T(3, Sc)
@@ -203,7 +211,9 @@ T(12, Sc)
T(13, Sc)
T(14, Sc)
T(15, Sc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Ss)
+#endif
T(1, Ss)
T(2, Ss)
T(3, Ss)
@@ -219,7 +229,9 @@ T(12, Ss)
T(13, Ss)
T(14, Ss)
T(15, Ss)
+#ifndef SKIP_ZERO_ARRAY
T(0, Si)
+#endif
T(1, Si)
T(2, Si)
T(3, Si)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c
index 2541dd06d52..fe1b09577dd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -107,7 +106,9 @@ testva##TYPE##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, Sc)
+#endif
T(1, Sc)
T(2, Sc)
T(3, Sc)
@@ -123,7 +124,9 @@ T(12, Sc)
T(13, Sc)
T(14, Sc)
T(15, Sc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Ss)
+#endif
T(1, Ss)
T(2, Ss)
T(3, Ss)
@@ -139,7 +142,9 @@ T(12, Ss)
T(13, Ss)
T(14, Ss)
T(15, Ss)
+#ifndef SKIP_ZERO_ARRAY
T(0, Si)
+#endif
T(1, Si)
T(2, Si)
T(3, Si)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c
deleted file mode 100644
index 32eaafbe23b..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test structures passed by value, including to a function with a
- variable-length argument lists. All struct members are float
- scalars. */
-
-extern void struct_by_value_5_x (void);
-extern void exit (int);
-int fails;
-
-int
-main ()
-{
- struct_by_value_5_x ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c
deleted file mode 100644
index e0cbb5782c2..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "compat-common.h"
-
-#include "fp-struct-defs.h"
-#include "fp-struct-check.h"
-#include "fp-struct-test-by-value-x.h"
-
-DEFS(f, float)
-CHECKS(f, float)
-
-TEST(Sf1, float)
-TEST(Sf2, float)
-TEST(Sf3, float)
-TEST(Sf4, float)
-TEST(Sf5, float)
-TEST(Sf6, float)
-TEST(Sf7, float)
-TEST(Sf8, float)
-TEST(Sf9, float)
-TEST(Sf10, float)
-TEST(Sf11, float)
-TEST(Sf12, float)
-TEST(Sf13, float)
-TEST(Sf14, float)
-TEST(Sf15, float)
-TEST(Sf16, float)
-
-#undef T
-
-void
-struct_by_value_5_x ()
-{
-DEBUG_INIT
-
-#define T(TYPE, MTYPE) testit##TYPE ();
-
-T(Sf1, float)
-T(Sf2, float)
-T(Sf3, float)
-T(Sf4, float)
-T(Sf5, float)
-T(Sf6, float)
-T(Sf7, float)
-T(Sf8, float)
-T(Sf9, float)
-T(Sf10, float)
-T(Sf11, float)
-T(Sf12, float)
-T(Sf13, float)
-T(Sf14, float)
-T(Sf15, float)
-T(Sf16, float)
-
-DEBUG_FINI
-
-if (fails != 0)
- abort ();
-
-#undef T
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c
deleted file mode 100644
index 9290b8fa92e..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdarg.h>
-
-#include "compat-common.h"
-
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
-const int test_va = 0;
-#else
-const int test_va = 1;
-#endif
-
-#include "fp-struct-defs.h"
-#include "fp-struct-init.h"
-#include "fp-struct-test-by-value-y.h"
-
-DEFS(f,float)
-INITS(f, float)
-
-TEST(Sf1, float)
-TEST(Sf2, float)
-TEST(Sf3, float)
-TEST(Sf4, float)
-TEST(Sf5, float)
-TEST(Sf6, float)
-TEST(Sf7, float)
-TEST(Sf8, float)
-TEST(Sf9, float)
-TEST(Sf10, float)
-TEST(Sf11, float)
-TEST(Sf12, float)
-TEST(Sf13, float)
-TEST(Sf14, float)
-TEST(Sf15, float)
-TEST(Sf16, float)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c
deleted file mode 100644
index 39dc31f4a6a..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test structures passed by value, including to a function with a
- variable-length argument lists. All struct members are double
- scalars. */
-
-extern void struct_by_value_6_x (void);
-extern void exit (int);
-int fails;
-
-int
-main ()
-{
- struct_by_value_6_x ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c
deleted file mode 100644
index 21989194cf7..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "compat-common.h"
-
-#include "fp-struct-defs.h"
-#include "fp-struct-check.h"
-#include "fp-struct-test-by-value-x.h"
-
-DEFS(d, double)
-CHECKS(d, double)
-
-TEST(Sd1, double)
-TEST(Sd2, double)
-TEST(Sd3, double)
-TEST(Sd4, double)
-TEST(Sd5, double)
-TEST(Sd6, double)
-TEST(Sd7, double)
-TEST(Sd8, double)
-TEST(Sd9, double)
-TEST(Sd10, double)
-TEST(Sd11, double)
-TEST(Sd12, double)
-TEST(Sd13, double)
-TEST(Sd14, double)
-TEST(Sd15, double)
-TEST(Sd16, double)
-
-#undef T
-
-void
-struct_by_value_6_x ()
-{
-DEBUG_INIT
-
-#define T(TYPE, MTYPE) testit##TYPE ();
-
-T(Sd1, double)
-T(Sd2, double)
-T(Sd3, double)
-T(Sd4, double)
-T(Sd5, double)
-T(Sd6, double)
-T(Sd7, double)
-T(Sd8, double)
-T(Sd9, double)
-T(Sd10, double)
-T(Sd11, double)
-T(Sd12, double)
-T(Sd13, double)
-T(Sd14, double)
-T(Sd15, double)
-T(Sd16, double)
-
-DEBUG_FINI
-
-if (fails != 0)
- abort ();
-
-#undef T
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c
deleted file mode 100644
index b5bc10025a0..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdarg.h>
-
-#include "compat-common.h"
-
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
-const int test_va = 0;
-#else
-const int test_va = 1;
-#endif
-
-#include "fp-struct-defs.h"
-#include "fp-struct-init.h"
-#include "fp-struct-test-by-value-y.h"
-
-DEFS(d, double)
-INITS(d, double)
-
-TEST(Sd1, double)
-TEST(Sd2, double)
-TEST(Sd3, double)
-TEST(Sd4, double)
-TEST(Sd5, double)
-TEST(Sd6, double)
-TEST(Sd7, double)
-TEST(Sd8, double)
-TEST(Sd9, double)
-TEST(Sd10, double)
-TEST(Sd11, double)
-TEST(Sd12, double)
-TEST(Sd13, double)
-TEST(Sd14, double)
-TEST(Sd15, double)
-TEST(Sd16, double)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c
deleted file mode 100644
index 98caf4286a4..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test structures passed by value, including to a function with a
- variable-length argument lists. All struct members are long double
- scalars. */
-
-extern void struct_by_value_7_x (void);
-extern void exit (int);
-int fails;
-
-int
-main ()
-{
- struct_by_value_7_x ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c
deleted file mode 100644
index 018db252ae4..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "compat-common.h"
-
-#include "fp-struct-defs.h"
-#include "fp-struct-check.h"
-#include "fp-struct-test-by-value-x.h"
-
-DEFS(ld, long double)
-CHECKS(ld, long double)
-
-TEST(Sld1, long double)
-TEST(Sld2, long double)
-TEST(Sld3, long double)
-TEST(Sld4, long double)
-TEST(Sld5, long double)
-TEST(Sld6, long double)
-TEST(Sld7, long double)
-TEST(Sld8, long double)
-TEST(Sld9, long double)
-TEST(Sld10, long double)
-TEST(Sld11, long double)
-TEST(Sld12, long double)
-TEST(Sld13, long double)
-TEST(Sld14, long double)
-TEST(Sld15, long double)
-TEST(Sld16, long double)
-
-#undef T
-
-void
-struct_by_value_7_x ()
-{
-DEBUG_INIT
-
-#define T(TYPE, MTYPE) testit##TYPE ();
-
-T(Sld1, long double)
-T(Sld2, long double)
-T(Sld3, long double)
-T(Sld4, long double)
-T(Sld5, long double)
-T(Sld6, long double)
-T(Sld7, long double)
-T(Sld8, long double)
-T(Sld9, long double)
-T(Sld10, long double)
-T(Sld11, long double)
-T(Sld12, long double)
-T(Sld13, long double)
-T(Sld14, long double)
-T(Sld15, long double)
-T(Sld16, long double)
-
-DEBUG_FINI
-
-if (fails != 0)
- abort ();
-
-#undef T
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c
deleted file mode 100644
index ca52a9b10f7..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdarg.h>
-
-#include "compat-common.h"
-
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
-const int test_va = 0;
-#else
-const int test_va = 1;
-#endif
-
-#include "fp-struct-defs.h"
-#include "fp-struct-init.h"
-#include "fp-struct-test-by-value-y.h"
-
-DEFS(ld, long double)
-INITS(ld, long double)
-
-TEST(Sld1, long double)
-TEST(Sld2, long double)
-TEST(Sld3, long double)
-TEST(Sld4, long double)
-TEST(Sld5, long double)
-TEST(Sld6, long double)
-TEST(Sld7, long double)
-TEST(Sld8, long double)
-TEST(Sld9, long double)
-TEST(Sld10, long double)
-TEST(Sld11, long double)
-TEST(Sld12, long double)
-TEST(Sld13, long double)
-TEST(Sld14, long double)
-TEST(Sld15, long double)
-TEST(Sld16, long double)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c
index 6fe9ce75ae0..5a376fd38cf 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c
@@ -129,7 +129,9 @@ void checkScsi (Scsi x, int i)
void checkScis (Scis x, int i)
{ if (x.c != i/16 || x.i != i+1 || x.s != i+2) DEBUG_CHECK }
+#ifndef SKIP_ZERO_ARRAY
T(0, Ssc)
+#endif
T(1, Ssc)
T(2, Ssc)
T(3, Ssc)
@@ -145,7 +147,9 @@ T(12, Ssc)
T(13, Ssc)
T(14, Ssc)
T(15, Ssc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Sis)
+#endif
T(1, Sis)
T(2, Sis)
T(3, Sis)
@@ -171,7 +175,9 @@ DEBUG_INIT
#define T(N, TYPE) testit##TYPE##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, Ssc)
+#endif
T(1, Ssc)
T(2, Ssc)
T(3, Ssc)
@@ -187,7 +193,9 @@ T(12, Ssc)
T(13, Ssc)
T(14, Ssc)
T(15, Ssc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Sis)
+#endif
T(1, Sis)
T(2, Sis)
T(3, Sis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c
index 9dadfb03c1f..b246fd44893 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -107,7 +106,9 @@ testva##TYPE##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, Ssc)
+#endif
T(1, Ssc)
T(2, Ssc)
T(3, Ssc)
@@ -123,7 +124,9 @@ T(12, Ssc)
T(13, Ssc)
T(14, Ssc)
T(15, Ssc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Sis)
+#endif
T(1, Sis)
T(2, Sis)
T(3, Sis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c
index d6e43e75b0b..5bbef770aca 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c
@@ -132,7 +132,9 @@ void checkScsi (Scsi x, int i)
void checkScis (Scis x, int i)
{ if (x.c != i/16 || x.i != i+1 || x.s != i+2) DEBUG_CHECK }
+#ifndef SKIP_ZERO_ARRAY
T(0, Scsi)
+#endif
T(1, Scsi)
T(2, Scsi)
T(3, Scsi)
@@ -148,7 +150,9 @@ T(12, Scsi)
T(13, Scsi)
T(14, Scsi)
T(15, Scsi)
+#ifndef SKIP_ZERO_ARRAY
T(0, Scis)
+#endif
T(1, Scis)
T(2, Scis)
T(3, Scis)
@@ -174,7 +178,9 @@ DEBUG_INIT
#define T(N, TYPE) testit##TYPE##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, Scsi)
+#endif
T(1, Scsi)
T(2, Scsi)
T(3, Scsi)
@@ -190,7 +196,9 @@ T(12, Scsi)
T(13, Scsi)
T(14, Scsi)
T(15, Scsi)
+#ifndef SKIP_ZERO_ARRAY
T(0, Scis)
+#endif
T(1, Scis)
T(2, Scis)
T(3, Scis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c
index 5d034048c1a..0f652180085 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -107,7 +106,9 @@ testva##TYPE##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, Scsi)
+#endif
T(1, Scsi)
T(2, Scsi)
T(3, Scsi)
@@ -123,7 +124,9 @@ T(12, Scsi)
T(13, Scsi)
T(14, Scsi)
T(15, Scsi)
+#ifndef SKIP_ZERO_ARRAY
T(0, Scis)
+#endif
T(1, Scis)
T(2, Scis)
T(3, Scis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
index dab24966db6..bf40426a63e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -563,10 +563,7 @@ int main (void)\n\
#include \"t%03d_test.h\"\n\
#undef TX\n\
if (fails)\n\
- {\n\
- fflush (stdout);\n\
- abort ();\n\
- }\n\
+ abort ();\n\
exit (0);\n\
}\n", srcdir, srcdir, filecnt, filecnt);
fclose (outfile);
@@ -1201,20 +1198,6 @@ choose_type (enum FEATURE features, struct entry *e, int r)
abort ();
}
-/* This is from gcc.c-torture/execute/builtin-bitops-1.c. */
-static int
-my_ffsll (unsigned long long x)
-{
- int i;
- if (x == 0)
- return 0;
- /* We've tested LLONG_MAX for 64 bits so this should be safe. */
- for (i = 0; i < 64; i++)
- if (x & (1ULL << i))
- break;
- return i + 1;
-}
-
void
generate_fields (enum FEATURE features, struct entry *e, struct entry *parent,
int len)
@@ -1327,9 +1310,9 @@ generate_fields (enum FEATURE features, struct entry *e, struct entry *parent,
case 'B': ma = 1; break;
case ' ':
if (e[j].type->type == TYPE_UENUM)
- mi = my_ffsll (e[j].type->maxval + 1) - 1;
+ mi = ffsll (e[j].type->maxval + 1) - 1;
else if (e[j].type->type == TYPE_SENUM)
- mi = my_ffsll (e[j].type->maxval + 1);
+ mi = ffsll (e[j].type->maxval + 1);
else
abort ();
if (!mi)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c
index bb417d76146..d1531b179bd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c
@@ -75,18 +75,18 @@ testit##TYPE (void) \
#include "fp2-struct-defs.h"
#include "fp2-struct-check.h"
-T(Sfd);
-T(Sfl);
-T(Sdf);
-T(Sdl);
-T(Slf);
-T(Sld);
-T(Sfdl);
-T(Sfld);
-T(Sdfl);
-T(Sdlf);
-T(Slfd);
-T(Sldf);
+T(Sfd)
+T(Sfl)
+T(Sdf)
+T(Sdl)
+T(Slf)
+T(Sld)
+T(Sfdl)
+T(Sfld)
+T(Sdfl)
+T(Sdlf)
+T(Slfd)
+T(Sldf)
#undef T
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c b/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c
index 2cd9c604c06..7af4068d5d0 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c
index cb3e8a905c4..0085a9f6883 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c
index 685ef6f8b03..be7139f7d54 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c
index 4463dc4cbcd..590c30aa937 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -102,7 +101,9 @@ testit##NAME##N (void) \
DEBUG_NL; \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -118,7 +119,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -134,7 +137,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
@@ -160,7 +165,9 @@ DEBUG_INIT
#define T(N, NAME, TYPE) testit##NAME##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -176,7 +183,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -192,7 +201,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c b/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c
index d8bdcc240de..7d7df8ef6cd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c
@@ -70,7 +70,9 @@ testva##NAME##N (int n, ...) \
return rslt; \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -86,7 +88,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -102,7 +106,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c
index e8b18850b1f..e985f91e444 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_x.c b/gcc/testsuite/gcc.dg/compat/vector-1_x.c
index c7e69731400..11995b496e5 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-1_x.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-setup.h"
@@ -14,9 +16,12 @@ SETUP (4, si);
SETUP (1, di);
SETUP (2, di);
+#endif
+
void
vector_1_x (void)
{
+#ifndef SKIP_ATTRIBUTE
DEBUG_INIT
CHECK (8, qi);
@@ -33,4 +38,5 @@ vector_1_x (void)
if (fails != 0)
abort ();
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_y.c b/gcc/testsuite/gcc.dg/compat/vector-1_y.c
index 1b8b6d7a49e..1cec61734b4 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-1_y.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-check.h"
@@ -13,3 +15,5 @@ TEST (2, si, 301)
TEST (4, si, 302)
TEST (1, di, 401)
TEST (2, di, 402)
+
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_x.c b/gcc/testsuite/gcc.dg/compat/vector-2_x.c
index 492878aa750..42881330557 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-2_x.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-setup.h"
@@ -9,9 +11,12 @@ SETUP (4, sf);
SETUP (16, sf);
SETUP (2, df);
+#endif
+
void
vector_2_x (void)
{
+#ifndef SKIP_ATTRIBUTE
DEBUG_INIT
CHECK (2, sf);
@@ -23,4 +28,5 @@ vector_2_x (void)
if (fails != 0)
abort ();
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_y.c b/gcc/testsuite/gcc.dg/compat/vector-2_y.c
index e100560a507..b04f9f64985 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-2_y.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-check.h"
@@ -8,3 +10,5 @@ TEST (2, sf, 301.0)
TEST (4, sf, 302.0)
TEST (16, sf, 304.0)
TEST (2, df, 402.0)
+
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/vector-check.h b/gcc/testsuite/gcc.dg/compat/vector-check.h
index f500bd4f43a..2d586d287d9 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-check.h
+++ b/gcc/testsuite/gcc.dg/compat/vector-check.h
@@ -1,6 +1,6 @@
#define TEST(NUM,TMODE,VAL) \
extern v##NUM##TMODE g_v##NUM##TMODE; \
-extern int g_##TMODE; \
+extern TMODE g_##TMODE; \
\
extern void pass_v##NUM##TMODE (v##NUM##TMODE); \
extern v##NUM##TMODE return_v##NUM##TMODE (void); \
diff --git a/gcc/testsuite/gcc.dg/compat/vector-defs.h b/gcc/testsuite/gcc.dg/compat/vector-defs.h
index cef5d76b2a2..57140f115cd 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-defs.h
+++ b/gcc/testsuite/gcc.dg/compat/vector-defs.h
@@ -1,46 +1,72 @@
/* This includes all of the vector modes that are recognized by
- c_common_type_for_mode, grouped by base mode. */
+ c_common_type_for_mode. */
typedef int __attribute__((mode(QI))) qi;
+typedef int __attribute__((mode(HI))) hi;
+typedef int __attribute__((mode(SI))) si;
+typedef int __attribute__((mode(DI))) di;
+typedef float __attribute__((mode(SF))) sf;
+typedef float __attribute__((mode(DF))) df;
+
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 5)
+
+typedef qi __attribute__((vector_size (8))) v8qi;
+typedef qi __attribute__((vector_size (16))) v16qi;
+
+typedef hi __attribute__((vector_size (4))) v2hi;
+typedef hi __attribute__((vector_size (8))) v4hi;
+typedef hi __attribute__((vector_size (16))) v8hi;
+
+typedef si __attribute__((vector_size (8))) v2si;
+typedef si __attribute__((vector_size (16))) v4si;
+
+typedef di __attribute__((vector_size (8))) v1di;
+typedef di __attribute__((vector_size (16))) v2di;
+
+typedef sf __attribute__((vector_size (8))) v2sf;
+typedef sf __attribute__((vector_size (16))) v4sf;
+typedef sf __attribute__((vector_size (64))) v16sf;
+
+typedef df __attribute__((vector_size (16))) v2df;
+
+#else
+
typedef int __attribute__((mode(V8QI))) v8qi;
typedef int __attribute__((mode(V16QI))) v16qi;
-typedef union U8QI { v8qi v; qi a[8]; } u8qi;
-typedef union U16QI { v16qi v; qi a[16]; } u16qi;
-
-typedef int __attribute__((mode(HI))) hi;
typedef int __attribute__((mode(V2HI))) v2hi;
typedef int __attribute__((mode(V4HI))) v4hi;
typedef int __attribute__((mode(V8HI))) v8hi;
-typedef union U2HI { v2hi v; hi a[2]; } u2hi;
-typedef union U4HI { v4hi v; hi a[4]; } u4hi;
-typedef union U8HI { v8hi v; hi a[8]; } u8hi;
-
-typedef int __attribute__((mode(SI))) si;
typedef int __attribute__((mode(V2SI))) v2si;
typedef int __attribute__((mode(V4SI))) v4si;
-typedef union U2SI { v2si v; si a[2]; } u2si;
-typedef union U4SI { v4si v; si a[4]; } u4si;
-
-typedef int __attribute__((mode(DI))) di;
typedef int __attribute__((mode(V1DI))) v1di;
typedef int __attribute__((mode(V2DI))) v2di;
-typedef union U1DI { v1di v; di a[1]; } u1di;
-typedef union U2DI { v2di v; di a[2]; } u2di;
-
-typedef float __attribute__((mode(SF))) sf;
typedef float __attribute__((mode(V2SF))) v2sf;
typedef float __attribute__((mode(V4SF))) v4sf;
typedef float __attribute__((mode(V16SF))) v16sf;
+typedef float __attribute__((mode(V2DF))) v2df;
+
+#endif
+
+typedef union U8QI { v8qi v; qi a[8]; } u8qi;
+typedef union U16QI { v16qi v; qi a[16]; } u16qi;
+
+typedef union U2HI { v2hi v; hi a[2]; } u2hi;
+typedef union U4HI { v4hi v; hi a[4]; } u4hi;
+typedef union U8HI { v8hi v; hi a[8]; } u8hi;
+
+typedef union U2SI { v2si v; si a[2]; } u2si;
+typedef union U4SI { v4si v; si a[4]; } u4si;
+
+typedef union U1DI { v1di v; di a[1]; } u1di;
+typedef union U2DI { v2di v; di a[2]; } u2di;
+
typedef union U2SF { v2sf v; sf a[2]; } u2sf;
typedef union U4SF { v4sf v; sf a[4]; } u4sf;
typedef union U16SF { v16sf v; sf a[16]; } u16sf;
-typedef float __attribute__((mode(DF))) df;
-typedef float __attribute__((mode(V2DF))) v2df;
-
typedef union U2DF { v2df v; df a[2]; } u2df;
diff --git a/gcc/testsuite/gcc.dg/const-elim-1.c b/gcc/testsuite/gcc.dg/const-elim-1.c
index c9c57a2784d..71a1364d599 100644
--- a/gcc/testsuite/gcc.dg/const-elim-1.c
+++ b/gcc/testsuite/gcc.dg/const-elim-1.c
@@ -7,7 +7,13 @@
/* { dg-do compile } */
/* { dg-options "-O2 -std=c99" } */
-/* { dg-final { scan-assembler-not "L\\\$?C\[^A-Z\]" } } */
+/* This test fails on all processors where we use a block move to
+ initialize "S" in test2. The RTL optimizers are not clever enough
+ to eliminate the block move, so the constant gets emitted.
+ Currently known targets with this problem: all ARM; PA32 ("hppa*.*"
+ matches "hppa2.0w" but not "hppa64"); PPC if string instructions
+ are enabled (notably under AIX); Xtensa. */
+/* { dg-final { scan-assembler-not "L\\\$?C\[^A-Z\]" { xfail arm-*-* strongarm-*-* xscale-*-* hppa-*-* hppa*.*-*-* powerpc*-*-aix* xtensa-*-* } } } */
#define I (__extension__ 1.0iF)
diff --git a/gcc/testsuite/gcc.dg/cpp/19930510-1.c b/gcc/testsuite/gcc.dg/cpp/19930510-1.c
index 724640a85f7..62c1206745a 100644
--- a/gcc/testsuite/gcc.dg/cpp/19930510-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/19930510-1.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
+extern void exit (int);
+
#define ugly 3
#ugly "foobar" 3 /* { dg-error "invalid" "invalid directive" } */
int main() { exit (0); }
diff --git a/gcc/testsuite/gcc.dg/cpp/assert4.c b/gcc/testsuite/gcc.dg/cpp/assert4.c
index 99b304f2455..e53b148f767 100644
--- a/gcc/testsuite/gcc.dg/cpp/assert4.c
+++ b/gcc/testsuite/gcc.dg/cpp/assert4.c
@@ -311,6 +311,14 @@
# error
#endif
+#if defined __mmix__
+# if !#cpu(mmix) || !#machine(mmix)
+# error
+# endif
+#elif #cpu(mmix) || #machine(mcore)
+# error
+#endif
+
#if defined __mn10300__
# if !#cpu(mn10300) || !#machine(mn10300)
# error
diff --git a/gcc/testsuite/gcc.dg/cpp/charconst-3.c b/gcc/testsuite/gcc.dg/cpp/charconst-3.c
index 9d7d2399812..7c196639131 100644
--- a/gcc/testsuite/gcc.dg/cpp/charconst-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/charconst-3.c
@@ -9,6 +9,8 @@
#include <limits.h>
+extern void abort (void);
+
int main ()
{
/* These tests require at least 2-byte ints. 8-) */
diff --git a/gcc/testsuite/gcc.dg/cpp/charconst-4.c b/gcc/testsuite/gcc.dg/cpp/charconst-4.c
index 986ea80f57e..aae33d35eef 100644
--- a/gcc/testsuite/gcc.dg/cpp/charconst-4.c
+++ b/gcc/testsuite/gcc.dg/cpp/charconst-4.c
@@ -13,6 +13,8 @@
#include <limits.h>
+extern void abort (void);
+
#if INT_MAX == 32767
# define LONG_CHARCONST '!\234a'
# define SHORT_CHARCONST '\234a'
diff --git a/gcc/testsuite/gcc.dg/cpp/if-mop.c b/gcc/testsuite/gcc.dg/cpp/if-mop.c
index 9202740e6b1..119c7392e06 100644
--- a/gcc/testsuite/gcc.dg/cpp/if-mop.c
+++ b/gcc/testsuite/gcc.dg/cpp/if-mop.c
@@ -23,3 +23,9 @@
#if (2) 4 * 2 /* { dg-error "missing bin" "close paren then immediate" } */
#endif
+
+#if == 2 /* { dg-error "no left op" } */
+#endif
+
+#if (==2) /* { dg-error "no left op" } */
+#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/lexident.c b/gcc/testsuite/gcc.dg/cpp/lexident.c
index c914023b0fd..fdf54a2e2c5 100644
--- a/gcc/testsuite/gcc.dg/cpp/lexident.c
+++ b/gcc/testsuite/gcc.dg/cpp/lexident.c
@@ -1,7 +1,7 @@
/* Copyright (C) 2000 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "-trigraphs" } */
+/* { dg-options "-trigraphs -fdollars-in-identifiers" } */
/* Test lexing of identifiers. */
diff --git a/gcc/testsuite/gcc.dg/cpp/mi6.c b/gcc/testsuite/gcc.dg/cpp/mi6.c
index aa1c8ed2ec5..c3af2d3f237 100644
--- a/gcc/testsuite/gcc.dg/cpp/mi6.c
+++ b/gcc/testsuite/gcc.dg/cpp/mi6.c
@@ -5,6 +5,8 @@
/* { dg-do compile } */
/* { dg-options "" } */
+extern void abort (void);
+
/* Each include file should not be subject to MI optimisation, since
macro definitions can change. Each header increments the variable
VAR if it is defined.
diff --git a/gcc/testsuite/gcc.dg/cpp/tr-paste.c b/gcc/testsuite/gcc.dg/cpp/tr-paste.c
index e884e83c8d5..1dd82766317 100644
--- a/gcc/testsuite/gcc.dg/cpp/tr-paste.c
+++ b/gcc/testsuite/gcc.dg/cpp/tr-paste.c
@@ -5,6 +5,8 @@
/* { dg-do compile } */
/* { dg-options "-traditional-cpp" } */
+extern int printf (const char *, ...);
+
#define A(name) X/**/name
#define B(name) \
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/mi6.c b/gcc/testsuite/gcc.dg/cpp/trad/mi6.c
index aa1c8ed2ec5..c3af2d3f237 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/mi6.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/mi6.c
@@ -5,6 +5,8 @@
/* { dg-do compile } */
/* { dg-options "" } */
+extern void abort (void);
+
/* Each include file should not be subject to MI optimisation, since
macro definitions can change. Each header increments the variable
VAR if it is defined.
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/paste.c b/gcc/testsuite/gcc.dg/cpp/trad/paste.c
index 9f1c0db3291..9b83fd30f4e 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/paste.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/paste.c
@@ -4,6 +4,8 @@
/* { dg-do compile } */
+extern int printf (const char *, ...);
+
#define A(name) X/**/name
#define B(name) \
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/strify.c b/gcc/testsuite/gcc.dg/cpp/trad/strify.c
index 500ef1ea32f..d97a439709c 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/strify.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/strify.c
@@ -4,6 +4,7 @@
#define foo(a, b) c="a"; d="b";
extern void abort ();
+extern void exit (int);
int main ()
{
diff --git a/gcc/testsuite/gcc.dg/darwin-abi-1.c b/gcc/testsuite/gcc.dg/darwin-abi-1.c
index c7c0288e8bb..3b13c6236b1 100644
--- a/gcc/testsuite/gcc.dg/darwin-abi-1.c
+++ b/gcc/testsuite/gcc.dg/darwin-abi-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target powerpc*-*-darwin* } } */
/* { dg-options "-O" } */
-/* { dg-final { scan-assembler "li r3,12345\n\tbl " } } */
+/* { dg-final { scan-assembler "li r3,12345\n\t(bl|jbsr) " } } */
/* Check that zero-size structures don't affect parameter passing. */
diff --git a/gcc/testsuite/gcc.dg/darwin-abi-2.c b/gcc/testsuite/gcc.dg/darwin-abi-2.c
index 81da83c424f..4764831e847 100644
--- a/gcc/testsuite/gcc.dg/darwin-abi-2.c
+++ b/gcc/testsuite/gcc.dg/darwin-abi-2.c
@@ -5,6 +5,7 @@
tests that the ABI is correct. */
#include <stdio.h>
+#include <stdlib.h>
#define vector __attribute__((vector_size(16)))
diff --git a/gcc/testsuite/gcc.dg/debug/20020327-1.c b/gcc/testsuite/gcc.dg/debug/20020327-1.c
index 3ad1b1b98a8..49d00a16cc7 100644
--- a/gcc/testsuite/gcc.dg/debug/20020327-1.c
+++ b/gcc/testsuite/gcc.dg/debug/20020327-1.c
@@ -1,4 +1,12 @@
/* { dg-do link } */
+#ifndef __powerpc64__
+/* Fails on powerpc64-linux due to the function Letext using a global
+ .Letext symbol that conflicts with .Letext emitted by gcc with
+ -gstabs. Some day the linker will be fixed to not require global
+ "dot" syms, but for now disable this test entirely for powerpc64.
+ Using xfail doesn't work, nor does dg-excess-errors because some
+ combinations of command line options won't cause this test to fail. */
void Letext (void) { }
+#endif
int main() { return 0; }
diff --git a/gcc/testsuite/gcc.dg/debug/debug-1.c b/gcc/testsuite/gcc.dg/debug/debug-1.c
index b413eb7223f..8cc520dcd79 100644
--- a/gcc/testsuite/gcc.dg/debug/debug-1.c
+++ b/gcc/testsuite/gcc.dg/debug/debug-1.c
@@ -3,7 +3,9 @@
/* { dg-options "-dA" } */
/* { dg-final { scan-assembler "xyzzy" } } */
-long foo(long p)
+long p;
+
+long foo(void)
{
{
long xyzzy = 0;
diff --git a/gcc/testsuite/gcc.dg/debug/debug-2.c b/gcc/testsuite/gcc.dg/debug/debug-2.c
index e11b7b0fc1f..b164ff97734 100644
--- a/gcc/testsuite/gcc.dg/debug/debug-2.c
+++ b/gcc/testsuite/gcc.dg/debug/debug-2.c
@@ -3,7 +3,9 @@
/* { dg-options "-dA" } */
/* { dg-final { scan-assembler "xyzzy" } } */
-long foo(long p)
+long p;
+
+long foo(void)
{
if (1)
{
diff --git a/gcc/testsuite/gcc.dg/decl-3.c b/gcc/testsuite/gcc.dg/decl-3.c
index b8d00d0203d..5bbe19cd224 100644
--- a/gcc/testsuite/gcc.dg/decl-3.c
+++ b/gcc/testsuite/gcc.dg/decl-3.c
@@ -1,5 +1,5 @@
/* PR c/9928 */
/* { dg-do compile } */
-enum { CODES }; /* { dg-error "previous declaration" } */
-enum { CODES }; /* { dg-error "conflicting types" } */
+enum { CODES }; /* { dg-error "previous definition" } */
+enum { CODES }; /* { dg-error "conflicting types|redeclaration of enumerator" } */
diff --git a/gcc/testsuite/gcc.dg/deprecated.c b/gcc/testsuite/gcc.dg/deprecated.c
index 83557475c44..1e07efe6314 100644
--- a/gcc/testsuite/gcc.dg/deprecated.c
+++ b/gcc/testsuite/gcc.dg/deprecated.c
@@ -6,26 +6,26 @@
typedef int INT1 __attribute__((deprecated));
typedef INT1 INT2 __attribute__ ((__deprecated__));
-typedef INT1 INT1a; /* { dg-warning "`INT1' is deprecated" "" } */
+typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" "" } */
typedef INT1 INT1b __attribute__ ((deprecated));
-INT1 should_be_unavailable; /* { dg-warning "`INT1' is deprecated" "" } */
+INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated" "" } */
INT1a should_not_be_deprecated;
INT1 f1(void) __attribute__ ((deprecated));
-INT1 f2(void) { return 0; } /* { dg-warning "`INT1' is deprecated" "" } */
+INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated" "" } */
INT2 f3(void) __attribute__ ((__deprecated__));
-INT2 f4(void) { return 0; } /* { dg-warning "`INT2' is deprecated" "" } */
-int f5(INT2 x); /* { dg-warning "`INT2' is deprecated" "" } */
-int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "`INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated" "" } */
+int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" "" } */
+int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "'INT2' is deprecated" "" } */
typedef enum {red, green, blue} Color __attribute__((deprecated));
int g1;
int g2 __attribute__ ((deprecated));
int g3 __attribute__ ((__deprecated__));
-Color k; /* { dg-warning "`Color' is deprecated" "" } */
+Color k; /* { dg-warning "'Color' is deprecated" "" } */
typedef struct {
int field1;
@@ -46,17 +46,17 @@ typedef struct {
int func1()
{
- INT1 w; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 w; /* { dg-warning "'INT1' is deprecated" "" } */
int x __attribute__ ((deprecated));
int y __attribute__ ((__deprecated__));
int z;
- int (*pf)() = f1; /* { dg-warning "`f1' is deprecated" "" } */
+ int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" "" } */
- z = w + x + y + g1 + g2 + g3; /* { dg-warning "`x' is deprecated" "" } */
- /* { dg-warning "`y' is deprecated" "" { target *-*-* } 55 } */
- /* { dg-warning "`g2' is deprecated" "" { target *-*-* } 55 } */
- /* { dg-warning "`g3' is deprecated" "" { target *-*-* } 55 } */
- return f1(); /* { dg-warning "`f1' is deprecated" "" } */
+ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
+ /* { dg-warning "'y' is deprecated" "" { target *-*-* } 55 } */
+ /* { dg-warning "'g2' is deprecated" "" { target *-*-* } 55 } */
+ /* { dg-warning "'g3' is deprecated" "" { target *-*-* } 55 } */
+ return f1(); /* { dg-warning "'f1' is deprecated" "" } */
}
int func2(S1 *p)
@@ -64,29 +64,29 @@ int func2(S1 *p)
S1 lp;
if (p->field1)
- return p->field2; /* { dg-warning "`field2' is deprecated" "" } */
- else if (lp.field4) /* { dg-warning "`field4' is deprecated" "" } */
+ return p->field2; /* { dg-warning "'field2' is deprecated" "" } */
+ else if (lp.field4) /* { dg-warning "'field4' is deprecated" "" } */
return p->field3;
p->u1.field5 = g1 + p->field7;
- p->u2.field9; /* { dg-warning "`u2' is deprecated" "" } */
- return p->u1.field6 + p->field8; /* { dg-warning "`field6' is deprecated" "" } */
- /* { dg-warning "`field8' is deprecated" "" { target *-*-* } 73 } */
+ p->u2.field9; /* { dg-warning "'u2' is deprecated" "" } */
+ return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated" "" } */
+ /* { dg-warning "'field8' is deprecated" "" { target *-*-* } 73 } */
}
struct SS1 {
int x;
- INT1 y; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
} __attribute__ ((deprecated));
-struct SS1 *p1; /* { dg-warning "`SS1' is deprecated" "" } */
+struct SS1 *p1; /* { dg-warning "'SS1' is deprecated" "" } */
struct __attribute__ ((__deprecated__)) SS2 {
int x;
- INT1 y; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
};
-struct SS2 *p2; /* { dg-warning "`SS2' is deprecated" "" } */
+struct SS2 *p2; /* { dg-warning "'SS2' is deprecated" "" } */
#endif
#ifdef __cplusplus
@@ -104,13 +104,13 @@ inline void T::member1(int) {}
int T::member2(T *p)
{
- p->member1(1); /* { xxdg-warning "`member1' is deprecated" "" } */
- (*p).member1(2); /* { xxdg-warning "`member1' is deprecated" "" } */
- p->member2(1); /* { xxdg-warning "`member2' is deprecated" "" } */
- (*p).member2(2); /* { xxdg-warning "`member2' is deprecated" "" } */
+ p->member1(1); /* { xxdg-warning "'member1' is deprecated" "" } */
+ (*p).member1(2); /* { xxdg-warning "'member1' is deprecated" "" } */
+ p->member2(1); /* { xxdg-warning "'member2' is deprecated" "" } */
+ (*p).member2(2); /* { xxdg-warning "'member2' is deprecated" "" } */
p->member3(p);
(*p).member3(p);
- return f1(); /* { xxdg-warning "`f1' is deprecated" "" } */
+ return f1(); /* { xxdg-warning "'f1' is deprecated" "" } */
}
#endif
diff --git a/gcc/testsuite/gcc.dg/dll-2.c b/gcc/testsuite/gcc.dg/dll-2.c
index 45456ce8330..5c81f4e64a1 100644
--- a/gcc/testsuite/gcc.dg/dll-2.c
+++ b/gcc/testsuite/gcc.dg/dll-2.c
@@ -8,9 +8,7 @@
In C, it's ok to redeclare a variable so this works for variables
and functions. In C++, it only works for functions. */
-/* { dg-do compile { target arm*-*-pe* } } */
-/* { dg-do compile { target i?86-pc-cygwin } } */
-/* { dg-do compile { target i?86-pc-mingw* } } */
+/* { dg-require-dll "" } */
__declspec (dllimport) int foo1 ();
__declspec (dllexport) int foo1 ();
diff --git a/gcc/testsuite/gcc.dg/doloop-1.c b/gcc/testsuite/gcc.dg/doloop-1.c
index 3561a179411..036239969e8 100644
--- a/gcc/testsuite/gcc.dg/doloop-1.c
+++ b/gcc/testsuite/gcc.dg/doloop-1.c
@@ -1,6 +1,6 @@
/* Make sure both loops are recognized as doloops.
If so, "bdnz" will be generated on ppc; if not,
- you will get "ble". */
+ you will get "ble" or "blt" or "bge". */
/* { dg-do compile { target powerpc-*-* } } */
/* { dg-options "-O2" } */
@@ -15,4 +15,3 @@ void foo (int count, char* pca, char* pcb) {
*pca = *pcb;
}
/* { dg-final { scan-assembler "bdnz" } } */
-/* { dg-final { scan-assembler-not "blt" } } */
diff --git a/gcc/testsuite/gcc.dg/fastmath-1.c b/gcc/testsuite/gcc.dg/fastmath-1.c
index 1194a6f7d42..4efe4300467 100644
--- a/gcc/testsuite/gcc.dg/fastmath-1.c
+++ b/gcc/testsuite/gcc.dg/fastmath-1.c
@@ -1,6 +1,8 @@
/* { dg-do run } */
/* { dg-options "-O2 -ffast-math" } */
+extern void abort (void);
+
int foo ( float* dists, int k)
{
if ( ( dists [ 0 ] > 0 ) == ( dists [ 1 ] > 0 ) )
diff --git a/gcc/testsuite/gcc.dg/format/attr-6.c b/gcc/testsuite/gcc.dg/format/attr-6.c
index 4e95cfb00f6..0f683223d78 100644
--- a/gcc/testsuite/gcc.dg/format/attr-6.c
+++ b/gcc/testsuite/gcc.dg/format/attr-6.c
@@ -18,4 +18,5 @@ void
foo (const char *s, int *p)
{
scanf("%ld", p); /* { dg-warning "format" "implicit scanf" } */
+ /* { dg-warning "implicit" "implicit decl warning" { target *-*-* } 20 } */
}
diff --git a/gcc/testsuite/gcc.dg/format/branch-1.c b/gcc/testsuite/gcc.dg/format/branch-1.c
index 2d071040390..cdff9276281 100644
--- a/gcc/testsuite/gcc.dg/format/branch-1.c
+++ b/gcc/testsuite/gcc.dg/format/branch-1.c
@@ -9,18 +9,18 @@ void
foo (long l, int nfoo)
{
printf ((nfoo > 1) ? "%d foos" : "%d foo", nfoo);
- printf ((l > 1) ? "%d foos" : "%d foo", l); /* { dg-warning "int format" "wrong type in conditional expr" } */
- printf ((l > 1) ? "%ld foos" : "%d foo", l); /* { dg-warning "int format" "wrong type in conditional expr" } */
- printf ((l > 1) ? "%d foos" : "%ld foo", l); /* { dg-warning "int format" "wrong type in conditional expr" } */
+ printf ((l > 1) ? "%d foos" : "%d foo", l); /* { dg-warning "int" "wrong type in conditional expr" } */
+ printf ((l > 1) ? "%ld foos" : "%d foo", l); /* { dg-warning "int" "wrong type in conditional expr" } */
+ printf ((l > 1) ? "%d foos" : "%ld foo", l); /* { dg-warning "int" "wrong type in conditional expr" } */
/* Should allow one case to have extra arguments. */
printf ((nfoo > 1) ? "%d foos" : "1 foo", nfoo);
printf ((nfoo > 1) ? "many foos" : "1 foo", nfoo); /* { dg-warning "too many" "too many args in all branches" } */
printf ((nfoo > 1) ? "%d foos" : "", nfoo);
printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "1 foo" : "no foos"), nfoo);
printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "%d foo" : "%d foos"), nfoo);
- printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "%d foo" : "%ld foos"), nfoo); /* { dg-warning "long int format" "wrong type" } */
- printf ((nfoo > 1) ? "%ld foos" : ((nfoo > 0) ? "%d foo" : "%d foos"), nfoo); /* { dg-warning "long int format" "wrong type" } */
- printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "%ld foo" : "%d foos"), nfoo); /* { dg-warning "long int format" "wrong type" } */
+ printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "%d foo" : "%ld foos"), nfoo); /* { dg-warning "long int" "wrong type" } */
+ printf ((nfoo > 1) ? "%ld foos" : ((nfoo > 0) ? "%d foo" : "%d foos"), nfoo); /* { dg-warning "long int" "wrong type" } */
+ printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "%ld foo" : "%d foos"), nfoo); /* { dg-warning "long int" "wrong type" } */
/* Extra arguments to NULL should be complained about. */
printf (NULL, "foo"); /* { dg-warning "too many" "NULL extra args" } */
/* { dg-warning "null" "null format arg" { target *-*-* } 25 } */
diff --git a/gcc/testsuite/gcc.dg/format/c90-strftime-1.c b/gcc/testsuite/gcc.dg/format/c90-strftime-1.c
index 0d75e9194db..1739f7b75ee 100644
--- a/gcc/testsuite/gcc.dg/format/c90-strftime-1.c
+++ b/gcc/testsuite/gcc.dg/format/c90-strftime-1.c
@@ -1,7 +1,7 @@
/* Test for strftime formats. Formats using C90 features. */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1990 -pedantic -Wformat" } */
+/* { dg-options "-std=iso9899:1990 -pedantic -Wformat -Wformat-y2k" } */
#include "format.h"
diff --git a/gcc/testsuite/gcc.dg/format/c90-strftime-2.c b/gcc/testsuite/gcc.dg/format/c90-strftime-2.c
index 9742e44d055..8b8398ed930 100644
--- a/gcc/testsuite/gcc.dg/format/c90-strftime-2.c
+++ b/gcc/testsuite/gcc.dg/format/c90-strftime-2.c
@@ -2,7 +2,7 @@
pedantic C90 mode. */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1990 -pedantic -Wformat" } */
+/* { dg-options "-std=iso9899:1990 -pedantic -Wformat -Wformat-y2k" } */
#include "format.h"
diff --git a/gcc/testsuite/gcc.dg/format/c99-strftime-1.c b/gcc/testsuite/gcc.dg/format/c99-strftime-1.c
index a643d2999a6..1730738df42 100644
--- a/gcc/testsuite/gcc.dg/format/c99-strftime-1.c
+++ b/gcc/testsuite/gcc.dg/format/c99-strftime-1.c
@@ -1,7 +1,7 @@
/* Test for strftime formats. Formats using C99 features. */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1999 -pedantic -Wformat" } */
+/* { dg-options "-std=iso9899:1999 -pedantic -Wformat -Wformat-y2k" } */
#include "format.h"
diff --git a/gcc/testsuite/gcc.dg/format/cmn-err-1.c b/gcc/testsuite/gcc.dg/format/cmn-err-1.c
index 3fb2fd2ff46..ac4b1f0f442 100644
--- a/gcc/testsuite/gcc.dg/format/cmn-err-1.c
+++ b/gcc/testsuite/gcc.dg/format/cmn-err-1.c
@@ -24,7 +24,6 @@ int main()
cmn_err_func (0, "%lld %llD %llo %llO %llx %llX %llu",
ll, ll, ll, ll, ll, ll, ll);
cmn_err_func (0, "%b %s", i, "\01Foo", string);
- cmn_err_func (0, "%p", string);
cmn_err_func (0, "%i", i); /* { dg-error "unknown|too many" } */
cmn_err_func (0, "%d", l); /* { dg-error "expects type" } */
@@ -32,6 +31,6 @@ int main()
cmn_err_func (0, "%b", i); /* { dg-error "too few" } */
cmn_err_func (0, "%b", i, i); /* { dg-error "expects type" } */
cmn_err_func (0, "%b", string, i); /* { dg-error "expects type" } */
- cmn_err_func (0, "%p", 3); /* { dg-error "expects type" } */
+
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/format/diag-1.c b/gcc/testsuite/gcc.dg/format/diag-1.c
index 1c9a246165b..998e35b9b47 100644
--- a/gcc/testsuite/gcc.dg/format/diag-1.c
+++ b/gcc/testsuite/gcc.dg/format/diag-1.c
@@ -12,7 +12,7 @@ foo (double d)
printf ("%hhf", d); /* { dg-warning "hh" "%hhf warning" } */
/* This should get a message referring to `ll', not to `q'. */
printf ("%llf", d); /* { dg-warning "ll" "%llf warning" } */
- /* This should get a message referring to `size_t format', not to
- `unsigned int format' or similar. */
- printf ("%zu", d); /* { dg-warning "size_t format" "size_t format warning" } */
+ /* This should get a message referring to 'size_t', not to
+ 'unsigned int' or similar. */
+ printf ("%zu", d); /* { dg-warning "size_t" "size_t format warning" } */
}
diff --git a/gcc/testsuite/gcc.dg/format/ext-1.c b/gcc/testsuite/gcc.dg/format/ext-1.c
index e69e756085c..3b020892afd 100644
--- a/gcc/testsuite/gcc.dg/format/ext-1.c
+++ b/gcc/testsuite/gcc.dg/format/ext-1.c
@@ -92,7 +92,7 @@ foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
*/
printf ("%*2$.*1$m", i, i);
printf ("%1$*2$.*1$m", i, i); /* { dg-warning "no argument" "printf %1\$m" } */
- /* As an extension, glibc includes the "I" flag for decimal integer
+ /* As an extension, glibc includes the "I" flag for decimal
formats, to output using the locale's digits (e.g. in Arabic).
In GCC, we require this to be in the standard place for flags, though
glibc allows it also after width or precision.
@@ -102,12 +102,12 @@ foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
printf ("%Ix", u); /* { dg-warning "flag" "bad use of I flag" } */
printf ("%IX", u); /* { dg-warning "flag" "bad use of I flag" } */
printf ("%In", n); /* { dg-warning "flag" "bad use of I flag" } */
- printf ("%If", d); /* { dg-warning "flag" "bad use of I flag" } */
- printf ("%IF", d); /* { dg-warning "flag" "bad use of I flag" } */
- printf ("%Ie", d); /* { dg-warning "flag" "bad use of I flag" } */
- printf ("%IE", d); /* { dg-warning "flag" "bad use of I flag" } */
- printf ("%Ig", d); /* { dg-warning "flag" "bad use of I flag" } */
- printf ("%IG", d); /* { dg-warning "flag" "bad use of I flag" } */
+ printf ("%If", d);
+ printf ("%IF", d);
+ printf ("%Ie", d);
+ printf ("%IE", d);
+ printf ("%Ig", d);
+ printf ("%IG", d);
printf ("%Ia", d); /* { dg-warning "flag" "bad use of I flag" } */
printf ("%IA", d); /* { dg-warning "flag" "bad use of I flag" } */
printf ("%Ic", i); /* { dg-warning "flag" "bad use of I flag" } */
diff --git a/gcc/testsuite/gcc.dg/format/ext-3.c b/gcc/testsuite/gcc.dg/format/ext-3.c
index e71731ed987..937e11212f7 100644
--- a/gcc/testsuite/gcc.dg/format/ext-3.c
+++ b/gcc/testsuite/gcc.dg/format/ext-3.c
@@ -3,7 +3,7 @@
*/
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wformat" } */
+/* { dg-options "-std=gnu99 -Wformat -Wformat-y2k" } */
#include "format.h"
diff --git a/gcc/testsuite/gcc.dg/format/format.h b/gcc/testsuite/gcc.dg/format/format.h
index 230d1410136..e55d23cd4d3 100644
--- a/gcc/testsuite/gcc.dg/format/format.h
+++ b/gcc/testsuite/gcc.dg/format/format.h
@@ -28,33 +28,10 @@ __extension__ typedef unsigned long long int ullong;
typedef llong quad_t;
typedef ullong u_quad_t;
-/* This next definition is a kludge. When GCC has a <stdint.h> it
- should be used.
-*/
-/* (T *) if E is zero, (void *) otherwise. */
-#define type_if_not(T, E) __typeof__(0 ? (T *)0 : (void *)(E))
-
-/* (T *) if E is nonzero, (void *) otherwise. */
-#define type_if(T, E) type_if_not(T, !(E))
-
-/* Combine pointer types, all but one (void *). */
-#define type_comb2(T1, T2) __typeof__(0 ? (T1)0 : (T2)0)
-#define type_comb3(T1, T2, T3) type_comb2(T1, type_comb2(T2, T3))
-
-#define maybe_int_ptr type_if(int, sizeof(int) == sizeof(llong))
-#define maybe_uint_ptr type_if(unsigned int, sizeof(unsigned int) == sizeof(ullong))
-#define maybe_long_ptr type_if(long, sizeof(long) == sizeof(llong) && sizeof(long) > sizeof(int))
-#define maybe_ulong_ptr type_if(unsigned long, sizeof(unsigned long) == sizeof(ullong) && sizeof(unsigned long) > sizeof(unsigned int))
-#define maybe_long_long_ptr type_if(llong, sizeof(llong) > sizeof(long))
-#define maybe_ulong_long_ptr type_if(ullong, sizeof(ullong) > sizeof(unsigned long))
-
-#define intmax_type_ptr type_comb3(maybe_int_ptr, maybe_long_ptr, maybe_long_long_ptr)
-#define uintmax_type_ptr type_comb3(maybe_uint_ptr, maybe_ulong_ptr, maybe_ulong_long_ptr)
-
-typedef __typeof__(*((intmax_type_ptr)0)) intmax_t;
-typedef __typeof__(*((uintmax_type_ptr)0)) uintmax_t;
+__extension__ typedef __INTMAX_TYPE__ intmax_t;
+__extension__ typedef __UINTMAX_TYPE__ uintmax_t;
-#if __STDC_VERSION__ < 199901L
+#if __STDC_VERSION__ < 199901L && !defined(restrict)
#define restrict /* "restrict" not in old C standard. */
#endif
diff --git a/gcc/testsuite/gcc.dg/format/multattr-3.c b/gcc/testsuite/gcc.dg/format/multattr-3.c
index 40467fe2d4c..1d4979a4e74 100644
--- a/gcc/testsuite/gcc.dg/format/multattr-3.c
+++ b/gcc/testsuite/gcc.dg/format/multattr-3.c
@@ -13,16 +13,16 @@ void
foo (long l, int nfoo)
{
printf (ngettext ("%d foo", "%d foos", nfoo), nfoo);
- printf (ngettext ("%d foo", "%d foos", l), l); /* { dg-warning "int format" "wrong type in conditional expr" } */
- printf (ngettext ("%d foo", "%ld foos", l), l); /* { dg-warning "int format" "wrong type in conditional expr" } */
- printf (ngettext ("%ld foo", "%d foos", l), l); /* { dg-warning "int format" "wrong type in conditional expr" } */
+ printf (ngettext ("%d foo", "%d foos", l), l); /* { dg-warning "int" "wrong type in conditional expr" } */
+ printf (ngettext ("%d foo", "%ld foos", l), l); /* { dg-warning "int" "wrong type in conditional expr" } */
+ printf (ngettext ("%ld foo", "%d foos", l), l); /* { dg-warning "int" "wrong type in conditional expr" } */
/* Should allow one case to have extra arguments. */
printf (ngettext ("1 foo", "%d foos", nfoo), nfoo);
printf (ngettext ("1 foo", "many foos", nfoo), nfoo); /* { dg-warning "too many" "too many args in all branches" } */
printf (ngettext ("", "%d foos", nfoo), nfoo);
printf (ngettext ("1 foo", (nfoo > 0) ? "%d foos" : "no foos", nfoo), nfoo);
printf (ngettext ("%d foo", (nfoo > 0) ? "%d foos" : "no foos", nfoo), nfoo);
- printf (ngettext ("%ld foo", (nfoo > 0) ? "%d foos" : "no foos", nfoo), nfoo); /* { dg-warning "long int format" "wrong type" } */
- printf (ngettext ("%d foo", (nfoo > 0) ? "%ld foos" : "no foos", nfoo), nfoo); /* { dg-warning "long int format" "wrong type" } */
- printf (ngettext ("%d foo", (nfoo > 0) ? "%d foos" : "%ld foos", nfoo), nfoo); /* { dg-warning "long int format" "wrong type" } */
+ printf (ngettext ("%ld foo", (nfoo > 0) ? "%d foos" : "no foos", nfoo), nfoo); /* { dg-warning "long int" "wrong type" } */
+ printf (ngettext ("%d foo", (nfoo > 0) ? "%ld foos" : "no foos", nfoo), nfoo); /* { dg-warning "long int" "wrong type" } */
+ printf (ngettext ("%d foo", (nfoo > 0) ? "%d foos" : "%ld foos", nfoo), nfoo); /* { dg-warning "long int" "wrong type" } */
}
diff --git a/gcc/testsuite/gcc.dg/format/no-y2k-1.c b/gcc/testsuite/gcc.dg/format/no-y2k-1.c
index ee68cd6db9f..4dfd5a04ebd 100644
--- a/gcc/testsuite/gcc.dg/format/no-y2k-1.c
+++ b/gcc/testsuite/gcc.dg/format/no-y2k-1.c
@@ -1,7 +1,7 @@
-/* Test for warnings for Y2K problems being disabled by -Wno-format-y2k. */
+/* Test for warnings for Y2K problems not being on by default. */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
-/* { dg-options "-std=gnu99 -Wformat -Wno-format-y2k" } */
+/* { dg-options "-std=gnu99 -Wformat" } */
#include "format.h"
diff --git a/gcc/testsuite/gcc.dg/format/xopen-1.c b/gcc/testsuite/gcc.dg/format/xopen-1.c
index 934dcb18cd8..9b098fb1ca3 100644
--- a/gcc/testsuite/gcc.dg/format/xopen-1.c
+++ b/gcc/testsuite/gcc.dg/format/xopen-1.c
@@ -89,13 +89,13 @@ foo (int i, unsigned int u, wint_t lc, wchar_t *ls, int *ip, double d,
/* The use of operand number $ formats is an X/Open extension. */
scanf ("%1$d", ip);
printf ("%1$d", i);
- printf ("%1$d", l); /* { dg-warning "arg 2" "mismatched args with $ format" } */
+ printf ("%1$d", l); /* { dg-warning "arg 2|argument 2" "mismatched args with $ format" } */
printf ("%3$*2$.*1$ld", i2, i, l);
printf ("%4$ld%7$ld%5$d%6$d%3$d%1$d%2$d", i, i, i, l, i, i, l);
scanf ("%4$ld%7$ld%5$d%6$d%3$d%1$d%2$d", ip, ip, ip, lp, ip, ip, lp);
printf ("%1$d%d", i, i); /* { dg-warning "missing" "mixing $ and non-$ formats" } */
printf ("%%%1$d%%%2$d", i, i);
- printf ("%d%2$d", i); /* { dg-warning "type character" "mixing $ and non-$ formats" } */
+ printf ("%d%2$d", i); /* { dg-warning "used after format" "mixing $ and non-$ formats" } */
printf ("%1$*d", i, i); /* { dg-warning "missing" "mixing $ and non-$ formats" } */
printf ("%*1$d", i); /* { dg-warning "missing" "mixing $ and non-$ formats" } */
scanf ("%1$d%d", ip, ip); /* { dg-warning "missing" "mixing $ and non-$ formats" } */
diff --git a/gcc/testsuite/gcc.dg/fshort-wchar.c b/gcc/testsuite/gcc.dg/fshort-wchar.c
index 074e872358b..9f4946307f0 100644
--- a/gcc/testsuite/gcc.dg/fshort-wchar.c
+++ b/gcc/testsuite/gcc.dg/fshort-wchar.c
@@ -7,6 +7,8 @@
Test that __WCHAR_MAX__ is correct with -fshort-wchar. */
+extern void abort (void);
+
int main ()
{
__WCHAR_TYPE__ w = ~(__WCHAR_TYPE__) 0;
diff --git a/gcc/testsuite/gcc.dg/funcdef-storage-1.c b/gcc/testsuite/gcc.dg/funcdef-storage-1.c
index 9aa963a0288..7ced3a14b2e 100644
--- a/gcc/testsuite/gcc.dg/funcdef-storage-1.c
+++ b/gcc/testsuite/gcc.dg/funcdef-storage-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-options "" } */
void
flarm(void)
@@ -7,3 +8,8 @@ flarm(void)
foo();
}
+
+static void
+foo(void)
+{
+}
diff --git a/gcc/testsuite/gcc.dg/funcorder.c b/gcc/testsuite/gcc.dg/funcorder.c
index b064d1cc467..a3edc1272f9 100644
--- a/gcc/testsuite/gcc.dg/funcorder.c
+++ b/gcc/testsuite/gcc.dg/funcorder.c
@@ -1,8 +1,10 @@
/* { dg-do compile } */
/* { dg-options "-O2 -funit-at-a-time" } */
-/* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "link_error,%r" } else { scan-assembler-not "link_error" } } } */
+/* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "link_error,%r" { xfail hppa*64*-*-* } } else { scan-assembler-not "link_error" } } } */
/* In unit-at-time the functions should be assembled in order
- e q t main, so we realize that they are pure. */
+ e q t main, so we realize that they are pure. The test is
+ xfailed on hppa64 because variable r in q is sign extended
+ to 64-bits. As a result, "if (t!=mem)" is not simplified. */
static int mem;
static int e(void) __attribute__ ((noinline));
diff --git a/gcc/testsuite/gcc.dg/i386-387-1.c b/gcc/testsuite/gcc.dg/i386-387-1.c
index 74a76b63807..92b671bf99c 100644
--- a/gcc/testsuite/gcc.dg/i386-387-1.c
+++ b/gcc/testsuite/gcc.dg/i386-387-1.c
@@ -7,6 +7,8 @@
/* { dg-final { scan-assembler "call\t_?atan2" } } */
/* { dg-final { scan-assembler "call\t_?log" } } */
/* { dg-final { scan-assembler "call\t_?exp" } } */
+/* { dg-final { scan-assembler "call\t_?tan" } } */
+/* { dg-final { scan-assembler "call\t_?fmod" } } */
double f1(double x) { return __builtin_sin(x); }
double f2(double x) { return __builtin_cos(x); }
@@ -14,3 +16,5 @@ double f3(double x) { return __builtin_sqrt(x); }
double f4(double x, double y) { return __builtin_atan2(x,y); }
double f5(double x) { return __builtin_log(x); }
double f6(double x) { return __builtin_exp(x); }
+double f7(double x) { return __builtin_tan(x); }
+double f8(double x, double y) { return __builtin_fmod(x,y); }
diff --git a/gcc/testsuite/gcc.dg/i386-387-2.c b/gcc/testsuite/gcc.dg/i386-387-2.c
index bfda85bc171..11eb0cc9aa5 100644
--- a/gcc/testsuite/gcc.dg/i386-387-2.c
+++ b/gcc/testsuite/gcc.dg/i386-387-2.c
@@ -7,6 +7,8 @@
/* { dg-final { scan-assembler "fpatan" } } */
/* { dg-final { scan-assembler "fyl2x" } } */
/* { dg-final { scan-assembler "f2xm1" } } */
+/* { dg-final { scan-assembler "fptan" } } */
+/* { dg-final { scan-assembler "fprem" } } */
double f1(double x) { return __builtin_sin(x); }
double f2(double x) { return __builtin_cos(x); }
@@ -14,3 +16,5 @@ double f3(double x) { return __builtin_sqrt(x); }
double f4(double x, double y) { return __builtin_atan2(x,y); }
double f5(double x) { return __builtin_log(x); }
double f6(double x) { return __builtin_exp(x); }
+double f7(double x) { return __builtin_tan(x); }
+double f8(double x, double y) { return __builtin_fmod(x,y); }
diff --git a/gcc/testsuite/gcc.dg/i386-387-5.c b/gcc/testsuite/gcc.dg/i386-387-5.c
index 2c86dd0869a..7c512977420 100644
--- a/gcc/testsuite/gcc.dg/i386-387-5.c
+++ b/gcc/testsuite/gcc.dg/i386-387-5.c
@@ -2,6 +2,9 @@
/* { dg-do compile { target "i?86-*-*" } } */
/* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */
/* { dg-final { scan-assembler "call\t_?atan" } } */
+/* { dg-final { scan-assembler "call\t_?log1p" } } */
+/* { dg-final { scan-assembler "call\t_?drem" } } */
double f1(double x) { return __builtin_atan(x); }
-
+double f2(double x) { return __builtin_log1p(x); }
+double f3(double x, double y) { return __builtin_drem(x,y); }
diff --git a/gcc/testsuite/gcc.dg/i386-387-6.c b/gcc/testsuite/gcc.dg/i386-387-6.c
index 8eb29a11320..c8e5311c091 100644
--- a/gcc/testsuite/gcc.dg/i386-387-6.c
+++ b/gcc/testsuite/gcc.dg/i386-387-6.c
@@ -2,5 +2,9 @@
/* { dg-do compile { target "i?86-*-*" } } */
/* { dg-options "-O -ffast-math -mfpmath=387 -march=i686 -mno-fancy-math-387" } */
/* { dg-final { scan-assembler "fpatan" } } */
+/* { dg-final { scan-assembler "fyl2xp1" } } */
+/* { dg-final { scan-assembler "fprem1" } } */
double f1(double x) { return __builtin_atan(x); }
+double f2(double x) { return __builtin_log1p(x); }
+double f3(double x, double y) { return __builtin_drem(x,y); }
diff --git a/gcc/testsuite/gcc.dg/i386-asm-1.c b/gcc/testsuite/gcc.dg/i386-asm-1.c
index aae0de845b3..826f5b6dbe3 100644
--- a/gcc/testsuite/gcc.dg/i386-asm-1.c
+++ b/gcc/testsuite/gcc.dg/i386-asm-1.c
@@ -2,7 +2,8 @@
/* { dg-do run { target i?86-*-* } } */
/* { dg-options "-O2" } */
-static int bar(int x) __asm__("bar");
+extern void abort (void);
+static int bar(int x) __asm__("bar") __attribute__((regparm(1)));
static int __attribute__((regparm(1), noinline, used))
bar(int x)
{
diff --git a/gcc/testsuite/gcc.dg/i386-bitfield1.c b/gcc/testsuite/gcc.dg/i386-bitfield1.c
index 26154f57d11..21916c1cc7e 100644
--- a/gcc/testsuite/gcc.dg/i386-bitfield1.c
+++ b/gcc/testsuite/gcc.dg/i386-bitfield1.c
@@ -1,7 +1,7 @@
// Test for bitfield alignment in structs on IA-32
// { dg-do run { target i?86-*-* } }
// { dg-options "-O2" }
-// { dg-options "-mno-align-double -mno-ms-bitfields" { target *-*-interix* } }
+// { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-interix* i?86-*-cygwin* i?86-*-mingw*} }
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/i386-bitfield2.c b/gcc/testsuite/gcc.dg/i386-bitfield2.c
index 2ea798207dc..9e5da397877 100644
--- a/gcc/testsuite/gcc.dg/i386-bitfield2.c
+++ b/gcc/testsuite/gcc.dg/i386-bitfield2.c
@@ -1,7 +1,7 @@
// Test for bitfield alignment in structs on IA-32
// { dg-do run { target i?86-*-* } }
// { dg-options "-O2" }
-// { dg-options "-mno-align-double -mno-ms-bitfields" { target *-*-interix* } }
+// { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-interix* i?86-*-cygwin* i?86-*-mingw* } }
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/i386-cadd.c b/gcc/testsuite/gcc.dg/i386-cadd.c
index ef6c16bee78..2c6360b946b 100644
--- a/gcc/testsuite/gcc.dg/i386-cadd.c
+++ b/gcc/testsuite/gcc.dg/i386-cadd.c
@@ -2,6 +2,8 @@
/* { dg-options "-O2 -march=k8" } */
/* { dg-final { scan-assembler "sbb" } } */
+extern void abort (void);
+
/* Conditional increment is best done using sbb $-1, val. */
int t[]={0,0,0,0,1,1,1,1,1,1};
q()
diff --git a/gcc/testsuite/gcc.dg/i386-fpcvt-3.c b/gcc/testsuite/gcc.dg/i386-fpcvt-3.c
index 69d7e3d2cd6..f47cd70ed9a 100644
--- a/gcc/testsuite/gcc.dg/i386-fpcvt-3.c
+++ b/gcc/testsuite/gcc.dg/i386-fpcvt-3.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler-not "cvtss2sd" } } */
+extern double fabs (double);
float a,b;
main()
{
diff --git a/gcc/testsuite/gcc.dg/i386-local.c b/gcc/testsuite/gcc.dg/i386-local.c
index 0c3103007cf..45d6aba53db 100644
--- a/gcc/testsuite/gcc.dg/i386-local.c
+++ b/gcc/testsuite/gcc.dg/i386-local.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -funit-at-a-time" } */
-/* { dg-final { scan-assembler "magic\[^\\n\]*eax" } } */
+/* { dg-final { scan-assembler "magic\[^\\n\]*eax" { target i?86-*-* } } } */
+/* { dg-final { scan-assembler "magic\[^\\n\]*edi" { target x86_64-*-* } } } */
/* Verify that local calling convention is used. */
static t(int) __attribute__ ((noinline));
diff --git a/gcc/testsuite/gcc.dg/i386-loop-3.c b/gcc/testsuite/gcc.dg/i386-loop-3.c
index c1b4bcea5be..59ed5bf589f 100644
--- a/gcc/testsuite/gcc.dg/i386-loop-3.c
+++ b/gcc/testsuite/gcc.dg/i386-loop-3.c
@@ -4,6 +4,9 @@
/* { dg-do run { target i?86-*-* } } */
/* { dg-options "-mtune=k6 -O3 -ffast-math -funroll-loops" } */
+extern void *memset (void *, int, __SIZE_TYPE__);
+extern void abort (void);
+
typedef struct
{
unsigned char colormod;
diff --git a/gcc/testsuite/gcc.dg/i386-memset-1.c b/gcc/testsuite/gcc.dg/i386-memset-1.c
index f450dd7287e..b87a05b8df7 100644
--- a/gcc/testsuite/gcc.dg/i386-memset-1.c
+++ b/gcc/testsuite/gcc.dg/i386-memset-1.c
@@ -10,6 +10,10 @@
/* { dg-do run { target "i?86-*-*" } } */
/* { dg-options "-O2 -minline-all-stringops" } */
+extern void *memset (void *, int, __SIZE_TYPE__);
+extern void abort (void);
+extern void exit (int);
+
#ifndef MAX_OFFSET
#define MAX_OFFSET (sizeof (long long))
#endif
diff --git a/gcc/testsuite/gcc.dg/i386-mmx-3.c b/gcc/testsuite/gcc.dg/i386-mmx-3.c
index b417ddae9ba..d4d61095c8a 100644
--- a/gcc/testsuite/gcc.dg/i386-mmx-3.c
+++ b/gcc/testsuite/gcc.dg/i386-mmx-3.c
@@ -3,7 +3,7 @@
/* { dg-do compile { target i?86-*-* x86_64-*-*} } */
/* { dg-options "-O1 -mmmx -march=k8" } */
-typedef int v4hi __attribute__ ((mode (V4HI)));
+typedef short v4hi __attribute__ ((vector_size (8)));
static inline v4hi cvtsi_v4hi (int i)
{
diff --git a/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c b/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c
index 0780b050bdd..8d4a083e5d8 100644
--- a/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c
+++ b/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -march=pentium4" } */
+/* { dg-options "-O2 -march=pentium4" { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentium4 -m32" { target x86_64-*-* } } */
/* { dg-final { scan-assembler-not "imull" } } */
/* Should be done not using imull. */
diff --git a/gcc/testsuite/gcc.dg/i386-regparm.c b/gcc/testsuite/gcc.dg/i386-regparm.c
index 601688f6489..18206ea7fc3 100644
--- a/gcc/testsuite/gcc.dg/i386-regparm.c
+++ b/gcc/testsuite/gcc.dg/i386-regparm.c
@@ -1,5 +1,4 @@
/* { dg-do compile { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
/* { dg-options "-W -Wall" } */
/* Verify that GCC correctly detects non-matching regparm attributes. */
diff --git a/gcc/testsuite/gcc.dg/i386-sse-4.c b/gcc/testsuite/gcc.dg/i386-sse-4.c
index c94e7f8607f..7f6d817f4d6 100644
--- a/gcc/testsuite/gcc.dg/i386-sse-4.c
+++ b/gcc/testsuite/gcc.dg/i386-sse-4.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O0 -msse" } */
-typedef void __vr __attribute__ ((__mode__ (__V4SF__)));
+typedef float __vr __attribute__ ((vector_size (16)));
struct vector
{
diff --git a/gcc/testsuite/gcc.dg/i386-sse-5.c b/gcc/testsuite/gcc.dg/i386-sse-5.c
index a35e5d60cb6..81184fcb67e 100644
--- a/gcc/testsuite/gcc.dg/i386-sse-5.c
+++ b/gcc/testsuite/gcc.dg/i386-sse-5.c
@@ -1,5 +1,4 @@
/* { dg-do compile { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
/* { dg-options "-Winline -O2 -march=i386" } */
typedef double v2df __attribute__ ((vector_size (16)));
v2df p;
diff --git a/gcc/testsuite/gcc.dg/i386-sse-8.c b/gcc/testsuite/gcc.dg/i386-sse-8.c
index 7ae52fdca7c..8ec5e7034a5 100644
--- a/gcc/testsuite/gcc.dg/i386-sse-8.c
+++ b/gcc/testsuite/gcc.dg/i386-sse-8.c
@@ -1,11 +1,9 @@
/* PR target/14313 */
/* Origin: <Pawe Sikora <pluto@ds14.agh.edu.pl> */
-/* The xstormy16 doesn't support V2DI. */
-/* { dg-do compile { xfail xstormy16-*-* } } */
+/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-options "-march=pentium3" { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
int main()
{
diff --git a/gcc/testsuite/gcc.dg/ia64-asm-1.c b/gcc/testsuite/gcc.dg/ia64-asm-1.c
index 48b24d31a7a..7222bbd214b 100644
--- a/gcc/testsuite/gcc.dg/ia64-asm-1.c
+++ b/gcc/testsuite/gcc.dg/ia64-asm-1.c
@@ -1,6 +1,8 @@
/* { dg-do run { target ia64-*-* } } */
/* { dg-options } */
+extern void abort (void);
+
/* Test that "=S" properly avoids the post-increment on the memory address. */
static void foo(int *x)
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-1.c b/gcc/testsuite/gcc.dg/ia64-sync-1.c
index d2a9b0bb6e8..c33bf3bf338 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-1.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-1.c
@@ -6,6 +6,9 @@
#include <ia64intrin.h>
+extern void abort (void);
+extern void *memcpy (void *, const void *, __SIZE_TYPE__);
+
static int AI[12];
static int init_noret_si[12] = { 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0 };
static int test_noret_si[12] = { 1, 1, 1, 0, 1, 4, 22, -12, 7, 8, 9, 7 };
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-2.c b/gcc/testsuite/gcc.dg/ia64-sync-2.c
index 8d745b01535..e7dd65ff5bc 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-2.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-2.c
@@ -5,6 +5,9 @@
#include <ia64intrin.h>
+extern void abort (void);
+extern void *memcpy (void *, const void *, __SIZE_TYPE__);
+
static int AI[18];
static int init_si[18] = { 0,0,0,1,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 };
static int test_si[18] = { 1,1,1,1,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 };
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-3.c b/gcc/testsuite/gcc.dg/ia64-sync-3.c
index e718c1115e2..c2772f759b6 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-3.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-3.c
@@ -5,6 +5,9 @@
#include <ia64intrin.h>
+extern void abort (void);
+extern void *memcpy (void *, const void *, __SIZE_TYPE__);
+
static int AI[4];
static int init_si[4] = { -30,-30,-50,-50 };
static int test_si[4] = { -115,-115,25,25 };
diff --git a/gcc/testsuite/gcc.dg/iftrap-2.c b/gcc/testsuite/gcc.dg/iftrap-2.c
index 909a85fcef8..4aa8ee7d62c 100644
--- a/gcc/testsuite/gcc.dg/iftrap-2.c
+++ b/gcc/testsuite/gcc.dg/iftrap-2.c
@@ -3,6 +3,8 @@
/* { dg-do compile { target rs6000-*-* powerpc-*-* sparc*-*-* ia64-*-* } } */
/* { dg-final { scan-assembler-not "^\t(trap|ta|break)\[ \t\]" } } */
+extern void abort(void);
+
void f1(int p)
{
if (p)
diff --git a/gcc/testsuite/gcc.dg/inline-2.c b/gcc/testsuite/gcc.dg/inline-2.c
index 28991bccb9f..80e7848aca2 100644
--- a/gcc/testsuite/gcc.dg/inline-2.c
+++ b/gcc/testsuite/gcc.dg/inline-2.c
@@ -11,7 +11,8 @@ static int foo(void)
int bar(void)
{
- return foo() + 1;
+ /* Call twice to avoid bypassing the limit for functions called once. */
+ return foo() + foo() + 1;
}
/* { dg-final { scan-assembler-not "jsr" { target alpha*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/intermod-1.c b/gcc/testsuite/gcc.dg/intermod-1.c
index 296adf976cb..9f8d19deb6a 100644
--- a/gcc/testsuite/gcc.dg/intermod-1.c
+++ b/gcc/testsuite/gcc.dg/intermod-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-final { scan-assembler-not {foo[1-9]\.} } } */
+/* { dg-final { scan-assembler-not {foo[1-9]\.[0-9]} } } */
/* Check that we don't get .0 suffixes on static variables when not using
intermodule analysis. */
diff --git a/gcc/testsuite/gcc.dg/intmax_t-1.c b/gcc/testsuite/gcc.dg/intmax_t-1.c
index 38e42f5b5c2..799d00cfdbc 100644
--- a/gcc/testsuite/gcc.dg/intmax_t-1.c
+++ b/gcc/testsuite/gcc.dg/intmax_t-1.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-Wall" } */
-/* { dg-error "" "" { target *-*-solaris2.5.1 mmix-*-* mips*-*-elf* } 0 } */
/* Compile with -Wall to get a warning if built-in and system intmax_t don't
match. */
diff --git a/gcc/testsuite/gcc.dg/loop-2.c b/gcc/testsuite/gcc.dg/loop-2.c
index 8acc65d116f..fa96f89278c 100644
--- a/gcc/testsuite/gcc.dg/loop-2.c
+++ b/gcc/testsuite/gcc.dg/loop-2.c
@@ -3,6 +3,9 @@
0 iterations of the loop rather than the correct 1. */
/* { dg-do run } */
+extern void abort (void);
+extern void exit (int);
+
__inline__ int tag() { return 0; }
void f ();
diff --git a/gcc/testsuite/gcc.dg/loop-3.c b/gcc/testsuite/gcc.dg/loop-3.c
index 3cc6643e15d..ba6fe556315 100644
--- a/gcc/testsuite/gcc.dg/loop-3.c
+++ b/gcc/testsuite/gcc.dg/loop-3.c
@@ -3,7 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-O3" } */
-/* { dg-options "-O3 -mtune=i386" { target i?86-*-* } } */
+/* { dg-options "-O3 -mtune=i386" { target i?86-*-* x86_64-*-* } } */
#if defined(STACK_SIZE) && (STACK_SIZE < 65536)
# define BYTEMEM_SIZE 10000L
diff --git a/gcc/testsuite/gcc.dg/m-un-2.c b/gcc/testsuite/gcc.dg/m-un-2.c
index bb617369163..d957f868405 100644
--- a/gcc/testsuite/gcc.dg/m-un-2.c
+++ b/gcc/testsuite/gcc.dg/m-un-2.c
@@ -16,7 +16,7 @@ struct vtable mtable = {
malloc,
free
}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */
- /* { dg-warning "initialization for `mtable._realloc'" "warning regression" { target *-*-* } {18} } */
+ /* { dg-warning "initialization for 'mtable._realloc'" "warning regression" { target *-*-* } {18} } */
/* With designated initializers, we assume you meant to leave out the
initialization of any blank fields. */
diff --git a/gcc/testsuite/gcc.dg/mips-args-2.c b/gcc/testsuite/gcc.dg/mips-args-2.c
index f53bfb2cde5..c34751c1c51 100644
--- a/gcc/testsuite/gcc.dg/mips-args-2.c
+++ b/gcc/testsuite/gcc.dg/mips-args-2.c
@@ -1,5 +1,8 @@
/* Check the _MIPSEB and _MIPSEL macros are accurate. */
/* { dg-do run { target mips*-*-* } } */
+extern void abort (void);
+extern void exit (int);
+
short foo = 1;
int main ()
{
diff --git a/gcc/testsuite/gcc.dg/mips-args-3.c b/gcc/testsuite/gcc.dg/mips-args-3.c
index 9ce3553fa94..e1fde8646df 100644
--- a/gcc/testsuite/gcc.dg/mips-args-3.c
+++ b/gcc/testsuite/gcc.dg/mips-args-3.c
@@ -1,6 +1,9 @@
/* __mips, and related defines, guarantee that certain assembly
instructions can be used. Check a few examples. */
/* { dg-do run { target mips*-*-* } } */
+extern void abort (void);
+extern void exit (int);
+
typedef int int32 __attribute__ ((mode (SI)));
typedef int int64 __attribute__ ((mode (DI)));
int foo (float inf, int64 in64, int32 in32)
diff --git a/gcc/testsuite/gcc.dg/mips-movcc-1.c b/gcc/testsuite/gcc.dg/mips-movcc-1.c
index 70a7dc738b5..b433a4d45b5 100644
--- a/gcc/testsuite/gcc.dg/mips-movcc-1.c
+++ b/gcc/testsuite/gcc.dg/mips-movcc-1.c
@@ -4,30 +4,20 @@
/* { dg-final { scan-assembler "movn" } } */
/* { dg-final { scan-assembler "movt" } } */
-void ext_int (int);
-
-#if __mips < 4
-asm ("# movz movn");
-#else
int
sub1 (int i, int j, int k)
{
- ext_int (k ? i : j);
+ return k ? i : j;
}
int
sub2 (int i, int j, long l)
{
- ext_int (!l ? i : j);
+ return !l ? i : j;
}
-#endif
-#if __mips < 4 || __mips_soft_float
-asm ("# movt");
-#else
int
sub3 (int i, int j, float f)
{
- ext_int (f ? i : j);
+ return f ? i : j;
}
-#endif
diff --git a/gcc/testsuite/gcc.dg/mips-movcc-2.c b/gcc/testsuite/gcc.dg/mips-movcc-2.c
index 22d58e94a1e..d8ea4cc6ba1 100644
--- a/gcc/testsuite/gcc.dg/mips-movcc-2.c
+++ b/gcc/testsuite/gcc.dg/mips-movcc-2.c
@@ -4,30 +4,20 @@
/* { dg-final { scan-assembler "movn" } } */
/* { dg-final { scan-assembler "movf" } } */
-void ext_long (long);
-
-#if __mips < 4
-asm ("# movz movn");
-#else
long
sub4 (long i, long j, long k)
{
- ext_long (k ? i : j);
+ return k ? i : j;
}
long
sub5 (long i, long j, int k)
{
- ext_long (!k ? i : j);
+ return !k ? i : j;
}
-#endif
-#if __mips < 4 || __mips_soft_float
-asm ("# movf");
-#else
long
sub6 (long i, long j, float f)
{
- ext_long (!f ? i : j);
+ return !f ? i : j;
}
-#endif
diff --git a/gcc/testsuite/gcc.dg/mips-movcc-3.c b/gcc/testsuite/gcc.dg/mips-movcc-3.c
index 3a3a43be15d..9e515fa6a30 100644
--- a/gcc/testsuite/gcc.dg/mips-movcc-3.c
+++ b/gcc/testsuite/gcc.dg/mips-movcc-3.c
@@ -7,45 +7,38 @@
/* { dg-final { scan-assembler "movn.d" } } */
/* { dg-final { scan-assembler "movf.d" } } */
-#if __mips < 4 || __mips_soft_float
-asm ("# movz.s movn.s movt.s movz.d movn.d movf.d");
-#else
-void ext_float (float);
-void ext_double (double);
-
float
sub7 (float f, float g, int i)
{
- ext_float (i ? f : g);
+ return i ? f : g;
}
float
sub8 (float f, float g, long l)
{
- ext_float (!l ? f : g);
+ return !l ? f : g;
}
float
sub9 (float f, float g, float h)
{
- ext_float (h ? f : g);
+ return h ? f : g;
}
double
suba (double f, double g, int i)
{
- ext_double (i ? f : g);
+ return i ? f : g;
}
double
subb (double f, double g, long l)
{
- ext_double (!l ? f : g);
+ return !l ? f : g;
}
double
subc (double f, double g, double h)
{
- ext_double (!h ? f : g);
+ return !h ? f : g;
}
-#endif
diff --git a/gcc/testsuite/gcc.dg/mips-nmadd-1.c b/gcc/testsuite/gcc.dg/mips-nmadd-1.c
index 1bf7895f2a8..1d84042b1f3 100644
--- a/gcc/testsuite/gcc.dg/mips-nmadd-1.c
+++ b/gcc/testsuite/gcc.dg/mips-nmadd-1.c
@@ -5,9 +5,6 @@
/* { dg-final { scan-assembler "nmsub.s" } } */
/* { dg-final { scan-assembler "nmsub.d" } } */
-#if (__mips != 4 && __mips != 64) || __mips_soft_float
-asm ("# nmadd.s nmadd.d nmsub.s nmsub.d");
-#else
float
sub1 (float f, float g, float h)
{
@@ -31,4 +28,3 @@ sub4 (double f, double g, double h)
{
return -((f * g) - h);
}
-#endif
diff --git a/gcc/testsuite/gcc.dg/mips-nmadd-2.c b/gcc/testsuite/gcc.dg/mips-nmadd-2.c
index 20b83bd21ae..a2af6ba505a 100644
--- a/gcc/testsuite/gcc.dg/mips-nmadd-2.c
+++ b/gcc/testsuite/gcc.dg/mips-nmadd-2.c
@@ -5,9 +5,6 @@
/* { dg-final { scan-assembler "nmsub.s" } } */
/* { dg-final { scan-assembler "nmsub.d" } } */
-#if (__mips != 4 && __mips != 64) || __mips_soft_float
-asm ("# nmadd.s nmadd.d nmsub.s nmsub.d");
-#else
float
sub1 (float f, float g, float h)
{
@@ -31,4 +28,3 @@ sub4 (double f, double g, double h)
{
return -((f * g) - h);
}
-#endif
diff --git a/gcc/testsuite/gcc.dg/mips-rsqrt-1.c b/gcc/testsuite/gcc.dg/mips-rsqrt-1.c
index b228ddba296..1f742b2fe4b 100644
--- a/gcc/testsuite/gcc.dg/mips-rsqrt-1.c
+++ b/gcc/testsuite/gcc.dg/mips-rsqrt-1.c
@@ -3,9 +3,6 @@
/* { dg-final { scan-assembler "rsqrt.d" } } */
/* { dg-final { scan-assembler "rsqrt.s" } } */
-#if (__mips != 4 && __mips != 64) || __mips_soft_float
-asm ("# rsqrt.d rsqrt.s");
-#else
extern double sqrt(double);
extern float sqrtf(float);
@@ -18,4 +15,4 @@ float bar(float x)
{
return 1.0f/sqrtf(x);
}
-#endif
+
diff --git a/gcc/testsuite/gcc.dg/mips-rsqrt-2.c b/gcc/testsuite/gcc.dg/mips-rsqrt-2.c
index a4cddcd0a0d..5c014abc180 100644
--- a/gcc/testsuite/gcc.dg/mips-rsqrt-2.c
+++ b/gcc/testsuite/gcc.dg/mips-rsqrt-2.c
@@ -3,9 +3,6 @@
/* { dg-final { scan-assembler "rsqrt.d" } } */
/* { dg-final { scan-assembler "rsqrt.s" } } */
-#if (__mips != 4 && __mips != 64) || __mips_soft_float
-asm ("# rsqrt.d rsqrt.s");
-#else
extern double sqrt(double);
extern float sqrtf(float);
@@ -18,4 +15,4 @@ float bar(float x)
{
return sqrtf(1.0f/x);
}
-#endif
+
diff --git a/gcc/testsuite/gcc.dg/nest.c b/gcc/testsuite/gcc.dg/nest.c
index adb9f0dca82..89ecdd58a06 100644
--- a/gcc/testsuite/gcc.dg/nest.c
+++ b/gcc/testsuite/gcc.dg/nest.c
@@ -1,12 +1,13 @@
/* PR 5967, PR 7114 */
/* { dg-do run } */
+/* { dg-require-profiling "-pg" } */
/* { dg-options "-O2 -pg" } */
/* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */
-/* { dg-error "profiler" "No profiler support" { target mmix-*-* xstormy16-*-* } 0 } */
-/* Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
- See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */
-/* { dg-error "gcrt1.o" "Profiler support missing" { target mips*-*-irix* } 0 } */
+/* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */
/* { dg-error "-pg not supported" "Profiler support missing" { target *-*-sco3.2v5* } 0 } */
+/* { dg-bogus "\[Uu\]nresolved symbol ._mcount" "Profiling unsupported" { xfail *-*-netware* } 0 } */
+
+extern void abort (void);
long foo (long x)
{
diff --git a/gcc/testsuite/gcc.dg/noncompile/20001228-1.c b/gcc/testsuite/gcc.dg/noncompile/20001228-1.c
index 79efe117aac..73a44a859a5 100644
--- a/gcc/testsuite/gcc.dg/noncompile/20001228-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/20001228-1.c
@@ -1,6 +1,6 @@
void rof(void)
{
union { int a; } u;
- for (u.a = 0; u; u.a++) /* { dg-error "invalid operand" } */
+ for (u.a = 0; u; u.a++) /* { dg-error "used union" } */
;
}
diff --git a/gcc/testsuite/gcc.dg/noncompile/20020213-1.c b/gcc/testsuite/gcc.dg/noncompile/20020213-1.c
index 77798b57c4b..c1de5663ace 100644
--- a/gcc/testsuite/gcc.dg/noncompile/20020213-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/20020213-1.c
@@ -24,8 +24,8 @@ int main ()
return 0;
}
-/* { dg-warning "passing arg 2 of" "2nd incompatible" { target *-*-* } 15 } */
-/* { dg-warning "passing arg 1 of" "1st incompatible" { target *-*-* } 16 } */
-/* { dg-warning "passing arg 2 of" "2nd incompatible" { target *-*-* } 16 } */
-/* { dg-warning "passing arg 1 of" "1st incompatible" { target *-*-* } 18 } */
-/* { dg-warning "passing arg 1 of" "1st incompatible" { target *-*-* } 20 } */
+/* { dg-warning "passing argument 2 of" "2nd incompatible" { target *-*-* } 15 } */
+/* { dg-warning "passing argument 1 of" "1st incompatible" { target *-*-* } 16 } */
+/* { dg-warning "passing argument 2 of" "2nd incompatible" { target *-*-* } 16 } */
+/* { dg-warning "passing argument 1 of" "1st incompatible" { target *-*-* } 18 } */
+/* { dg-warning "passing argument 1 of" "1st incompatible" { target *-*-* } 20 } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/20020220-1.c b/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
index c455f7e9d30..aa57dc3d493 100644
--- a/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
@@ -6,7 +6,7 @@ int foo (const char*, const char*);
void bar (void)
{
const char *s = "bar";
- int i; /* { dg-error "previously declared here" } */
+ int i; /* { dg-error "previous declaration" } */
int size = 2;
int i = foo (s, s + size); /* { dg-error "redeclaration of" } */
}
diff --git a/gcc/testsuite/gcc.dg/noncompile/920507-1.c b/gcc/testsuite/gcc.dg/noncompile/920507-1.c
index 64ddce7f1ff..c1a3523008c 100644
--- a/gcc/testsuite/gcc.dg/noncompile/920507-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/920507-1.c
@@ -1,6 +1,7 @@
-void
+int *
x(void)
{
register int *a asm("unknown_register"); /* { dg-error "invalid register" } */
int *v[1] = {a};
+ return v[1];
}
diff --git a/gcc/testsuite/gcc.dg/noncompile/921102-1.c b/gcc/testsuite/gcc.dg/noncompile/921102-1.c
index 8b66f712ef7..ef04b1b2aae 100644
--- a/gcc/testsuite/gcc.dg/noncompile/921102-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/921102-1.c
@@ -1 +1 @@
-int x[]={[0.3 ... 4.6]9}; /* { dg-error "nonconstant array|near init" } */
+int x[]={[0.3 ... 4.6]9}; /* { dg-error "not of integer type|near init" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/971104-1.c b/gcc/testsuite/gcc.dg/noncompile/971104-1.c
index ed7cb523c3b..54337b209c9 100644
--- a/gcc/testsuite/gcc.dg/noncompile/971104-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/971104-1.c
@@ -1,3 +1,4 @@
+extern int printf(const char *, ...);
typedef unsigned short ushort;
struct sembuf {
ushort sem_num;
diff --git a/gcc/testsuite/gcc.dg/noncompile/990416-1.c b/gcc/testsuite/gcc.dg/noncompile/990416-1.c
index 6b69ead2fe1..72aa3cd131c 100644
--- a/gcc/testsuite/gcc.dg/noncompile/990416-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/990416-1.c
@@ -1,3 +1,4 @@
+extern void *memcpy (void *, const void *, __SIZE_TYPE__);
typedef int word_type;
static void
diff --git a/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c b/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c
index 19864b9b353..0c707e3729a 100644
--- a/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c
+++ b/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c
@@ -6,7 +6,7 @@
int g95_type_for_mode (enum machine_mode);
int
-g95_type_for_mode (enum machine_mode mode)
-{ /* { dg-error "has incomplete type" } */
+g95_type_for_mode (enum machine_mode mode) /* { dg-error "incomplete type" } */
+{
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/noncompile/init-4.c b/gcc/testsuite/gcc.dg/noncompile/init-4.c
index 906c115b8cc..2d8bef3cb01 100644
--- a/gcc/testsuite/gcc.dg/noncompile/init-4.c
+++ b/gcc/testsuite/gcc.dg/noncompile/init-4.c
@@ -1,3 +1,2 @@
struct a { char *b; } c[D] /* { dg-error "undeclared" } */
- = /* { dg-error "storage size" } */
- { { "" } } ; /* { dg-warning "braces around scalar initializer|near" } */
+ = { { "" } } ; /* { dg-warning "braces around scalar initializer|near" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/label-1.c b/gcc/testsuite/gcc.dg/noncompile/label-1.c
index c646b48fb8d..e9bde7b3b7b 100644
--- a/gcc/testsuite/gcc.dg/noncompile/label-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/label-1.c
@@ -28,7 +28,7 @@ void c(void)
/* can't have two labels with the same name in the same function */
void d(void)
{
- l: dummy(); /* { dg-error "previously defined" "prev def same scope" } */
+ l: dummy(); /* { dg-error "previous definition" "prev def same scope" } */
l: dummy(); /* { dg-error "duplicate label" "dup label same scope" } */
goto l;
}
@@ -36,7 +36,7 @@ void d(void)
/* even at different scopes */
void e(void)
{
- l: dummy(); /* { dg-error "previously defined" "prev def diff scope" } */
+ l: dummy(); /* { dg-error "previous definition" "prev def diff scope" } */
{
l: dummy(); /* { dg-error "duplicate label" "dup label diff scope" } */
}
@@ -150,7 +150,7 @@ void m(void)
void n(void)
{
- __label__ l; /* { dg-error "previously declared" "outer label decl" } */
+ __label__ l; /* { dg-error "previous declaration" "outer label decl" } */
void nest(void)
{
l: goto l; /* { dg-error "duplicate label" "inner label defn" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c b/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c
index 0c5599434f8..76d4d96edaf 100644
--- a/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c
@@ -4,7 +4,7 @@
void
foo(int i)
{
- my_label: /* { dg-error "previously defined" "prev label" } */
+ my_label: /* { dg-error "previous definition" "prev label" } */
i++;
diff --git a/gcc/testsuite/gcc.dg/noncompile/redecl-1.c b/gcc/testsuite/gcc.dg/noncompile/redecl-1.c
index f4db95013e2..416c258c0d4 100644
--- a/gcc/testsuite/gcc.dg/noncompile/redecl-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/redecl-1.c
@@ -5,6 +5,5 @@ int
foo ()
{
int bar; /* { dg-error "previous.*decl" "previous.*decl" } */
- volatile int bar; /* { dg-error "conflicting types" "conflicting types" } */
+ volatile int bar; /* { dg-error "conflicting type qualifiers" "conflicting type qualifiers" } */
}
-
diff --git a/gcc/testsuite/gcc.dg/noncompile/scope.c b/gcc/testsuite/gcc.dg/noncompile/scope.c
index 0bfc3f284db..7f09c27cffd 100644
--- a/gcc/testsuite/gcc.dg/noncompile/scope.c
+++ b/gcc/testsuite/gcc.dg/noncompile/scope.c
@@ -1,3 +1,5 @@
+extern void abort (void);
+extern void exit (int);
static int v = 3;
f ()
diff --git a/gcc/testsuite/gcc.dg/noreturn-1.c b/gcc/testsuite/gcc.dg/noreturn-1.c
index 3bf62c15b40..3bd6a26c582 100644
--- a/gcc/testsuite/gcc.dg/noreturn-1.c
+++ b/gcc/testsuite/gcc.dg/noreturn-1.c
@@ -7,8 +7,8 @@ extern void exit (int);
extern void foo1(void) __attribute__ ((__noreturn__));
void
foo1(void)
-{ /* { dg-warning "`noreturn' function does return" "detect falling off end of noreturn" } */
-}
+{
+} /* { dg-warning "'noreturn' function does return" "detect falling off end of noreturn" } */
extern void foo2(void) __attribute__ ((__noreturn__));
void
@@ -26,16 +26,16 @@ foo3(void)
extern void foo4(void);
void
foo4(void)
-{
+{ /* { dg-warning "candidate for attribute 'noreturn'" "detect noreturn candidate" } */
exit(0);
-} /* { dg-warning "candidate for attribute `noreturn'" "detect noreturn candidate" } */
+}
extern void foo5(void) __attribute__ ((__noreturn__));
void
foo5(void)
{
- return; /* { dg-warning "`noreturn' has a `return' statement" "detect invalid return" } */
-} /* { dg-warning "`noreturn' function does return" "detect return from noreturn" } */
+ return; /* { dg-warning "'noreturn' has a 'return' statement" "detect invalid return" } */
+} /* { dg-warning "function does return" "detect return from noreturn" } */
extern void foo6(void);
void
@@ -56,4 +56,4 @@ void
foo8(void)
{
foo7();
-} /* { dg-warning "`noreturn' function does return" "detect return from tail call" } */
+} /* { dg-warning "'noreturn' function does return" "detect return from tail call" } */
diff --git a/gcc/testsuite/gcc.dg/noreturn-4.c b/gcc/testsuite/gcc.dg/noreturn-4.c
index 4a2de5f4200..91f64573a55 100644
--- a/gcc/testsuite/gcc.dg/noreturn-4.c
+++ b/gcc/testsuite/gcc.dg/noreturn-4.c
@@ -5,6 +5,6 @@ extern void exit (int) __attribute__ ((__noreturn__));
int
main (void)
-{
+{ /* { dg-warning "warning: function might be possible candidate for attribute 'noreturn'" "warn for main" } */
exit (0);
-} /* { dg-warning "warning: function might be possible candidate for attribute `noreturn'" "warn for main" } */
+}
diff --git a/gcc/testsuite/gcc.dg/noreturn-5.c b/gcc/testsuite/gcc.dg/noreturn-5.c
index 07381a66d24..e69087a4d74 100644
--- a/gcc/testsuite/gcc.dg/noreturn-5.c
+++ b/gcc/testsuite/gcc.dg/noreturn-5.c
@@ -4,4 +4,5 @@
The testsuite uses -ansi -pedantic-errors by default, so this has
to override. */
extern void xxx (int) __attribute__((noreturn));
-__volatile extern void xxx (int);
+typedef void voidfn (int);
+__volatile extern voidfn xxx;
diff --git a/gcc/testsuite/gcc.dg/old-style-asm-1.c b/gcc/testsuite/gcc.dg/old-style-asm-1.c
index c33707e609c..8af007795a7 100644
--- a/gcc/testsuite/gcc.dg/old-style-asm-1.c
+++ b/gcc/testsuite/gcc.dg/old-style-asm-1.c
@@ -1,6 +1,6 @@
/* PR inline-asm/8832 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -dP" } */
/* Verify that GCC doesn't optimize
old style asm instructions. */
@@ -18,10 +18,6 @@ void foo(int v)
/* The purpose of the test below is to check that there are two branches
in the generated code, supposedly corresponding to the if-statements.
- Warning: this is fragile and assumes that one of the generated labels
- for the branches matches the string "L2", or as with
- mmix-knuth-mmixware, "L:2". That assumption is generally invalid,
- because for example it depends on the target macro
- ASM_GENERATE_INTERNAL_LABEL to generate a name matching this regexp (as
- with the default definition). */
-/* { dg-final { scan-assembler "L(:|\\\$0*)?2" } } */
+ It tries to check for jump_insn (set (pc) pattern, so that jump_insns
+ corresponding to return are not taken into account. */
+/* { dg-final { scan-assembler "jump_insn.*set \\(pc\\).*jump_insn.*set \\(pc\\)"} } */
diff --git a/gcc/testsuite/gcc.dg/pack-test-2.c b/gcc/testsuite/gcc.dg/pack-test-2.c
index f15ac842bb4..974d982c505 100644
--- a/gcc/testsuite/gcc.dg/pack-test-2.c
+++ b/gcc/testsuite/gcc.dg/pack-test-2.c
@@ -3,9 +3,11 @@
/* { dg-do compile { target *-*-linux* *-*-cygwin* powerpc*-*-eabi* } } */
-#pragma pack(push) /* { dg-error "malformed" } */
#pragma pack(pop) /* { dg-error "without matching" } */
+#pragma pack(push)
+#pragma pack(pop) /* reset */
+
#pragma pack(push, foo, 1)
#pragma pack(pop, foo, 1) /* { dg-error "malformed" } (/
#pragma pack(pop) /* reset */
diff --git a/gcc/testsuite/gcc.dg/pch/inline-4.c b/gcc/testsuite/gcc.dg/pch/inline-4.c
index e4db473f3cf..60e35aa6266 100644
--- a/gcc/testsuite/gcc.dg/pch/inline-4.c
+++ b/gcc/testsuite/gcc.dg/pch/inline-4.c
@@ -1,4 +1,5 @@
#include "inline-4.h"
+extern int printf (const char *, ...);
int main(void) {
printf (getstring());
return 0;
diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp
index 8ed26ba7ef7..79fd9e77139 100644
--- a/gcc/testsuite/gcc.dg/pch/pch.exp
+++ b/gcc/testsuite/gcc.dg/pch/pch.exp
@@ -37,6 +37,21 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"
}
+set test "largefile.c"
+set testh "largefile.hs"
+set f [open $test w]
+set v 0
+for { set v 0 } { $v < 10000 } { incr v } {
+ puts $f "#define MACRO_${v} \"1234567890\" \"$v\""
+}
+puts $f "#include \"largefile.h\""
+close $f
+set f [open $testh w]
+close $f
+dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"
+file delete $test
+file delete $testh
+
set dg-do-what-default "$old_dg_do_what_default"
# All done.
diff --git a/gcc/testsuite/gcc.dg/pch/warn-1.c b/gcc/testsuite/gcc.dg/pch/warn-1.c
index 779577dd8ae..6e895818c63 100644
--- a/gcc/testsuite/gcc.dg/pch/warn-1.c
+++ b/gcc/testsuite/gcc.dg/pch/warn-1.c
@@ -2,7 +2,7 @@
#define DEFINED_VALUE 3
-#include "warn-1.h"/* { dg-error "not used because `DEFINED_VALUE' is defined|No such file" } */
+#include "warn-1.h"/* { dg-error "not used because `DEFINED_VALUE' is defined|No such file|they were invalid" } */
int main(void)
{
diff --git a/gcc/testsuite/gcc.dg/postincr-1.c b/gcc/testsuite/gcc.dg/postincr-1.c
index 6aa203cb2ea..752cda40c22 100644
--- a/gcc/testsuite/gcc.dg/postincr-1.c
+++ b/gcc/testsuite/gcc.dg/postincr-1.c
@@ -1,6 +1,8 @@
/* Simple test for proper postincrement semantics. */
/* { dg-do run } */
+extern void abort (void);
+
int i;
int c;
int *f ()
diff --git a/gcc/testsuite/gcc.dg/ppc-fsel-1.c b/gcc/testsuite/gcc.dg/ppc-fsel-1.c
index 266b8dbd5a5..8d364352ac9 100644
--- a/gcc/testsuite/gcc.dg/ppc-fsel-1.c
+++ b/gcc/testsuite/gcc.dg/ppc-fsel-1.c
@@ -1,8 +1,8 @@
/* { dg-do compile { target powerpc*-*-* } } */
-/* { dg-options "-O -mpowerpc-gfxopt" } */
+/* { dg-options "-O -mpowerpc-gfxopt -fno-trapping-math" } */
/* { dg-final { scan-assembler "fsel" } } */
-/* Check that fsel can be generated even without -ffast-math. */
+/* If the user doesn't care about signals, fsel can be used in many cases. */
double foo(double a, double b, double c, double d)
{
diff --git a/gcc/testsuite/gcc.dg/ppc-ldstruct.c b/gcc/testsuite/gcc.dg/ppc-ldstruct.c
index e3912d52826..da6001fcd3c 100644
--- a/gcc/testsuite/gcc.dg/ppc-ldstruct.c
+++ b/gcc/testsuite/gcc.dg/ppc-ldstruct.c
@@ -1,6 +1,8 @@
/* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* } } */
/* { dg-options "-O -mlong-double-128" } */
+#include <stdlib.h>
+
/* SVR4 and EABI both specify that 'long double' is aligned to a 128-bit
boundary in structures. */
diff --git a/gcc/testsuite/gcc.dg/ppc-sdata-1.c b/gcc/testsuite/gcc.dg/ppc-sdata-1.c
index 9df7fc38327..bd9fa6e8e34 100644
--- a/gcc/testsuite/gcc.dg/ppc-sdata-1.c
+++ b/gcc/testsuite/gcc.dg/ppc-sdata-1.c
@@ -2,8 +2,8 @@
/* { dg-options "-O2 -fno-common -G 8 -meabi -msdata=eabi" } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata2," } } */
-/* { dg-final { scan-assembler "sdat@sdarel\\(13\\)" } } */
-/* { dg-final { scan-assembler "sdat2@sda21\\(2\\)" } } */
+/* { dg-final { scan-assembler "sdat@sda21\\((13|0)\\)" } } */
+/* { dg-final { scan-assembler "sdat2@sda21\\((2|0)\\)" } } */
int sdat = 2;
diff --git a/gcc/testsuite/gcc.dg/ppc64-abi-1.c b/gcc/testsuite/gcc.dg/ppc64-abi-1.c
index d0cb9cd6c90..fa196595f38 100644
--- a/gcc/testsuite/gcc.dg/ppc64-abi-1.c
+++ b/gcc/testsuite/gcc.dg/ppc64-abi-1.c
@@ -1,5 +1,4 @@
/* { dg-do run { target powerpc64-*-* } } */
-/* { dg-require-effective-target lp64 } */
/* { dg-options "-O2" } */
#include <stdarg.h>
#include <signal.h>
diff --git a/gcc/testsuite/gcc.dg/ppc64-abi-2.c b/gcc/testsuite/gcc.dg/ppc64-abi-2.c
index e6baa25f4a3..93c121c463d 100644
--- a/gcc/testsuite/gcc.dg/ppc64-abi-2.c
+++ b/gcc/testsuite/gcc.dg/ppc64-abi-2.c
@@ -1,5 +1,4 @@
/* { dg-do run { target powerpc64-*-linux* } } */
-/* { dg-require-effective-target lp64 } */
/* { dg-options "-O2 -fprofile -mprofile-kernel -maltivec -mabi=altivec" } */
#include <stdarg.h>
#include <signal.h>
diff --git a/gcc/testsuite/gcc.dg/ppc64-abi-3.c b/gcc/testsuite/gcc.dg/ppc64-abi-3.c
index 346839c4f89..a1262f2860d 100644
--- a/gcc/testsuite/gcc.dg/ppc64-abi-3.c
+++ b/gcc/testsuite/gcc.dg/ppc64-abi-3.c
@@ -1,5 +1,4 @@
/* { dg-do compile { target powerpc64-*-linux* } } */
-/* { dg-require-effective-target lp64 } */
/* { dg-options "-Wall" } */
/* Testcase to check for ABI compliance of parameter passing
for the PowerPC64 ABI. */
@@ -9,7 +8,7 @@ typedef int __attribute__((vector_size(8))) v2si;
v4si
f(v4si v)
-{ /* { dg-error "altivec instructions are disabled" "PR18631" { xfail *-*-* } } */
+{ /* { dg-error "altivec instructions are disabled" } */
return v;
}
@@ -24,7 +23,6 @@ main()
{
v4si v;
v2si w;
- v = f (v); /* { dg-error "altivec instructions are disabled" "PR18631" { xfail *-*-* } } */
+ v = f (v); /* { dg-error "altivec instructions are disabled" } */
w = g (w);
- return 0;
}
diff --git a/gcc/testsuite/gcc.dg/pr16286.c b/gcc/testsuite/gcc.dg/pr16286.c
index 99b52d7f9cd..21c24b2de19 100644
--- a/gcc/testsuite/gcc.dg/pr16286.c
+++ b/gcc/testsuite/gcc.dg/pr16286.c
@@ -2,25 +2,18 @@
/* { dg-options "-maltivec" } */
/* PR 16286
- Compilation of a simple Altivec test program fails if vector, pixel
- and/or bool are #undefined when compiling with -maltivec. This may be
- done for building C++ programs that use the STL <vector>. */
+ * Compilation of a simple Altivec test program fails if vector is #undefined
+ * when compiling with -maltivec. This may be done for building C++ programs
+ * that use the STL <vector>.
+ */
#include <altivec.h>
#undef vector
-#undef pixel
-#undef bool
void test(void)
{
__vector unsigned int a, b;
- __vector __pixel v0;
- __vector __bool v1;
-
a = vec_and(a, b);
- vec_step (b);
}
-/* { dg-bogus "(syntax|parse) error before \"vector\"" "-maltivec" { target powerpc*-*-* } 0 } */
-/* { dg-bogus "(syntax|parse) error before \"pixel\"" "-maltivec" { target powerpc*-*-* } 0 } */
-/* { dg-bogus "(syntax|parse) error before \"bool\"" "-maltivec" { target powerpc*-*-* } 0 } */
+/* { dg-bogus "syntax error before \"vector\"" "-maltivec" { target powerpc*-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/pr17055-1.c b/gcc/testsuite/gcc.dg/pr17055-1.c
index faac48bc331..4c30973c165 100644
--- a/gcc/testsuite/gcc.dg/pr17055-1.c
+++ b/gcc/testsuite/gcc.dg/pr17055-1.c
@@ -1,7 +1,6 @@
/* PR middle-end/17055. */
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math" } */
-/* { dg-options "-O2 -ffast-math -fno-common" { target hppa*-*-hpux* } } */
/* This test used to abort, beacuse we do an "integer" fold to zero, i.e.
x - x = (T)0 where T is the type of x. Unfortunately, fold_convert
diff --git a/gcc/testsuite/gcc.dg/pragma-align-2.c b/gcc/testsuite/gcc.dg/pragma-align-2.c
index e33f24a27da..3d5e0da3270 100644
--- a/gcc/testsuite/gcc.dg/pragma-align-2.c
+++ b/gcc/testsuite/gcc.dg/pragma-align-2.c
@@ -11,12 +11,6 @@ void abort (void);
#pragma align 64(x64)
#pragma align 128(x128)
-#define MACRO 128
-#define MACRO2(A) A
-
-#pragma align MACRO(y128)
-#pragma align MACRO2(MACRO) (z128)
-
#pragma align 8(not_defined)
#pragma align 9(odd_align) /* { dg-error "invalid alignment" } */
@@ -25,7 +19,7 @@ void abort (void);
#pragma align bad_align /* { dg-error "malformed" } */
#pragma align 1(bad_align /* { dg-error "malformed" } */
-int x, x1, x2, x4, x8, y8, z8, x16, x32, x64, x128, y128, z128;
+int x, x1, x2, x4, x8, y8, z8, x16, x32, x64, x128;
#pragma align 16(x) /* { dg-error "must appear before" } */
@@ -56,11 +50,5 @@ main ()
if (__alignof__ (x128) < 128)
abort ();
- if (__alignof__ (y128) < 128)
- abort ();
-
- if (__alignof__ (z128) < 128)
- abort ();
-
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/pragma-align.c b/gcc/testsuite/gcc.dg/pragma-align.c
index f5d457e69d5..73869327034 100644
--- a/gcc/testsuite/gcc.dg/pragma-align.c
+++ b/gcc/testsuite/gcc.dg/pragma-align.c
@@ -1,6 +1,8 @@
/* Prove that HANDLE_SYSTEMV_PRAGMA alignment handling works somewhat. */
-/* { dg-do compile { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* *-*-solaris2.* } } */
+
+extern void abort (void);
struct {
char one;
@@ -39,4 +41,3 @@ main()
if(sizeof(resetalign) != sizeof(defaultalign)) abort();
return 0;
}
-
diff --git a/gcc/testsuite/gcc.dg/pragma-darwin.c b/gcc/testsuite/gcc.dg/pragma-darwin.c
index e3bcfb958a8..da70c8918a0 100644
--- a/gcc/testsuite/gcc.dg/pragma-darwin.c
+++ b/gcc/testsuite/gcc.dg/pragma-darwin.c
@@ -5,6 +5,8 @@
/* The mark pragma is to help decorate IDEs. */
+extern void abort(void);
+
#pragma mark hey hey ho
/* The options pragma used to do a lot, now it's only for emulating
diff --git a/gcc/testsuite/gcc.dg/pragma-re-1.c b/gcc/testsuite/gcc.dg/pragma-re-1.c
index 80b1d3731f2..9b9edadc9fe 100644
--- a/gcc/testsuite/gcc.dg/pragma-re-1.c
+++ b/gcc/testsuite/gcc.dg/pragma-re-1.c
@@ -8,4 +8,4 @@
#pragma redefine_extname foo bar
extern int foo(void);
-void *p = (void *)foo;
+int (*p)(void) = foo;
diff --git a/gcc/testsuite/gcc.dg/qual-return-1.c b/gcc/testsuite/gcc.dg/qual-return-1.c
index 5cab75c93d7..ac94df6d2bb 100644
--- a/gcc/testsuite/gcc.dg/qual-return-1.c
+++ b/gcc/testsuite/gcc.dg/qual-return-1.c
@@ -1,7 +1,7 @@
/* Test for warnings for qualified function return types. */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
-/* { dg-options "-std=gnu99 -W" } */
+/* { dg-options "-std=gnu99 -Wreturn-type" } */
/* Qualifying a function return type makes no sense. */
@@ -11,13 +11,11 @@ const int int_fn2 (void) { return 0; } /* { dg-warning "qualifiers" "int defn" }
const void void_fn (void); /* { dg-warning "qualifiers" "void decl" } */
const void (*void_ptr) (void); /* { dg-warning "qualifiers" "void ptr" } */
-const void void_fn2 (void) { } /* { dg-warning "qualifiers" "void defn" } */
+const void void_fn2 (void) { } /* { dg-warning "qualified" "void defn" } */
-/* "volatile void" is a GNU extension, so only warn at -pedantic. */
-
-volatile void vvoid_fn (void);
-volatile void (*vvoid_ptr) (void);
-volatile void vvoid_fn2 (void) { }
+volatile void vvoid_fn (void); /* { dg-warning "qualifiers" "void decl" } */
+volatile void (*vvoid_ptr) (void); /* { dg-warning "qualifiers" "void ptr" } */
+volatile void vvoid_fn2 (void) { } /* { dg-warning "qualified" "void defn" } */
int *restrict ip_fn (void); /* { dg-warning "qualifiers" "restrict decl" } */
int *restrict (*ip_ptr) (void); /* { dg-warning "qualifiers" "restrict ptr" } */
diff --git a/gcc/testsuite/gcc.dg/qual-return-2.c b/gcc/testsuite/gcc.dg/qual-return-2.c
index 272787ee7c2..22a1946b03f 100644
--- a/gcc/testsuite/gcc.dg/qual-return-2.c
+++ b/gcc/testsuite/gcc.dg/qual-return-2.c
@@ -5,10 +5,9 @@
/* Qualifying a function return type makes no sense. */
-/* "volatile void" is a GNU extension, so only warn at -pedantic.
- Strictly, the first two of these should warn only if the function is
- somewhere used or defined. */
+/* The first two of these shouldn't warn (with just -pedantic) as long
+ as the function is not defined. */
-volatile void vvoid_fn (void); /* { dg-warning "qualified" "volatile decl" } */
-volatile void (*vvoid_ptr) (void); /* { dg-warning "qualified" "volatile ptr" } */
+volatile void vvoid_fn (void);
+volatile void (*vvoid_ptr) (void);
volatile void vvoid_fn2 (void) { } /* { dg-warning "qualified" "volatile defn" } */
diff --git a/gcc/testsuite/gcc.dg/redecl-1.c b/gcc/testsuite/gcc.dg/redecl-1.c
index d2355ba7aa2..14877667e91 100644
--- a/gcc/testsuite/gcc.dg/redecl-1.c
+++ b/gcc/testsuite/gcc.dg/redecl-1.c
@@ -64,7 +64,7 @@ void test4(void)
void prime5(void)
{
- extern double bar5(double); /* { dg-error "previous" "" { xfail *-*-* } } */
+ extern double bar5(double); /* { dg-error "previous" "" } */
}
void test5(void)
@@ -74,7 +74,7 @@ void test5(void)
/* Extern then static, both at file scope. */
-extern int test6(int); /* { dg-warning "previous" "" { xfail *-*-* } } */
+extern int test6(int); /* { dg-warning "previous" "" } */
static int test6(int x)
{ return x; } /* { dg-warning "follows non-static" } */
@@ -83,7 +83,7 @@ static int test6(int x)
void prime7(void)
{
- extern int test7(int); /* { dg-warning "previous" "" { xfail *-*-* } } */
+ extern int test7(int); /* { dg-warning "previous" "" } */
}
static int test7(int x)
@@ -93,7 +93,7 @@ static int test7(int x)
void prime8(void)
{
- test8(); /* { dg-warning "previous" "" { xfail *-*-* } } */
+ test8(); /* { dg-warning "previous" "" } */
/* { dg-warning "implicit" "" { target *-*-* } 96 } */
}
diff --git a/gcc/testsuite/gcc.dg/return-type-1.c b/gcc/testsuite/gcc.dg/return-type-1.c
index 037dbbf0823..2507cafa5e4 100644
--- a/gcc/testsuite/gcc.dg/return-type-1.c
+++ b/gcc/testsuite/gcc.dg/return-type-1.c
@@ -5,5 +5,5 @@
/* { dg-options "-O -Wreturn-type" } */
int
foo(void)
-{ /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */
-}
+{
+} /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */
diff --git a/gcc/testsuite/gcc.dg/return-type-3.c b/gcc/testsuite/gcc.dg/return-type-3.c
index b6fa16539a4..e06ba7c0233 100644
--- a/gcc/testsuite/gcc.dg/return-type-3.c
+++ b/gcc/testsuite/gcc.dg/return-type-3.c
@@ -3,7 +3,7 @@
call optimization. The return clobber insn was cleaned up and
the warning was never issued. */
/* { dg-do compile } */
-/* { dg-options "-foptimize-sibling-calls -Wreturn-type" } */
+/* { dg-options "-O -foptimize-sibling-calls -Wreturn-type" } */
extern void foo(void);
diff --git a/gcc/testsuite/gcc.dg/sequence-pt-1.c b/gcc/testsuite/gcc.dg/sequence-pt-1.c
index 5220227c43c..3b9214233cd 100644
--- a/gcc/testsuite/gcc.dg/sequence-pt-1.c
+++ b/gcc/testsuite/gcc.dg/sequence-pt-1.c
@@ -56,9 +56,8 @@ foo (int a, int b, int n, int p, int *ptr, struct s *sptr,
ap[a+=1] += a++; /* { dg-warning "undefined" "sequence point warning" } */
a = a++, b = a; /* { dg-warning "undefined" "sequence point warning" } */
b = a, a = a++; /* { dg-warning "undefined" "sequence point warning" } */
- a = (b++ ? n : a) + b; /* { dg-warning "undefined" "sequence point warning" { xfail *-*-* } } */
+ a = (b++ ? n : a) + b; /* { dg-warning "undefined" "sequence point warning" } */
b ? a = a++ : a; /* { dg-warning "undefined" "sequence point warning" } */
- b ? a : a = a++; /* { dg-warning "undefined" "sequence point warning" } */
b && (a = a++); /* { dg-warning "undefined" "sequence point warning" } */
(a = a++) && b; /* { dg-warning "undefined" "sequence point warning" } */
b, (a = a++); /* { dg-warning "undefined" "sequence point warning" } */
diff --git a/gcc/testsuite/gcc.dg/setjmp-1.c b/gcc/testsuite/gcc.dg/setjmp-1.c
index 85e0fb4261f..35e192de0c9 100644
--- a/gcc/testsuite/gcc.dg/setjmp-1.c
+++ b/gcc/testsuite/gcc.dg/setjmp-1.c
@@ -13,7 +13,7 @@ extern void set_float_handler (jmp_buf *);
#define GT 0x04
int
-compare_float (double a, double b) /* { dg-bogus "clobbered" "spurious clobbered warning" { xfail *-*-* } } */
+compare_float (double a, double b) /* { dg-bogus "clobbered" "spurious clobbered warning" } */
{
jmp_buf handler;
int result;
diff --git a/gcc/testsuite/gcc.dg/sibcall-1.c b/gcc/testsuite/gcc.dg/sibcall-1.c
index f9b1f7899b4..4521ace9e15 100644
--- a/gcc/testsuite/gcc.dg/sibcall-1.c
+++ b/gcc/testsuite/gcc.dg/sibcall-1.c
@@ -11,6 +11,9 @@
marker. Self-recursion tail calls are optimized for all targets,
regardless of presence of sibcall patterns. */
+extern void abort (void);
+extern void exit (int);
+
extern void recurser_void (int);
extern void track (int);
diff --git a/gcc/testsuite/gcc.dg/sibcall-2.c b/gcc/testsuite/gcc.dg/sibcall-2.c
index cb2d1d599c6..4c226c496e3 100644
--- a/gcc/testsuite/gcc.dg/sibcall-2.c
+++ b/gcc/testsuite/gcc.dg/sibcall-2.c
@@ -11,6 +11,9 @@
marker. Self-recursion tail calls are optimized for all targets,
regardless of presence of sibcall patterns. */
+extern void abort (void);
+extern void exit (int);
+
extern void recurser_void (void);
extern void track (void);
diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c
index b494b4018f2..86bc8da38e5 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail arc-*-* avr-*-* c4x-*-* cris-*-* h8300-*-* i370-*-* i960-*-* ip2k-*-* m32r-*-* m68hc1?-*-* m681?-*-* m680*-*-* m68k-*-* mcore-*-* mips*-*-* mn10?00-*-* ns32k-*-* s390*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
+/* { dg-do run { xfail arc-*-* avr-*-* c4x-*-* cris-*-* h8300-*-* ip2k-*-* m32r-*-* m68hc1?-*-* m681?-*-* m680*-*-* m68k-*-* mcore-*-* mips*-*-irix* mips*-*-linux-gnu mn10300-*-* ns32k-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
/* The option -foptimize-sibling-calls is the default, but serves as
@@ -13,6 +13,9 @@
(except targets where the test does not work due to the return address
not saved on the regular stack). */
+extern void abort (void);
+extern void exit (int);
+
static void recurser_void1 (int);
static void recurser_void2 (int);
extern void track (int);
@@ -27,7 +30,7 @@ int main ()
reasonably sure is to make them have the same contents (regarding the
n tests). */
-static void
+static void __attribute__((noinline))
recurser_void1 (int n)
{
if (n == 0 || n == 7 || n == 8)
@@ -39,7 +42,7 @@ recurser_void1 (int n)
recurser_void2 (n + 1);
}
-static void
+static void __attribute__((noinline))
recurser_void2 (int n)
{
if (n == 0 || n == 7 || n == 8)
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c
index 222859d3aba..bbb03735490 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail arc-*-* avr-*-* c4x-*-* cris-*-* h8300-*-* i370-*-* i960-*-* ip2k-*-* m32r-*-* m68hc1?-*-* m681?-*-* m680*-*-* m68k-*-* mcore-*-* mips*-*-* mn10?00-*-* ns32k-*-* s390*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
+/* { dg-do run { xfail arc-*-* avr-*-* c4x-*-* cris-*-* h8300-*-* ip2k-*-* m32r-*-* m68hc1?-*-* m681?-*-* m680*-*-* m68k-*-* mcore-*-* mips*-*-irix* mips*-*-linux-gnu mn10300-*-* ns32k-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
/* The option -foptimize-sibling-calls is the default, but serves as
@@ -13,6 +13,9 @@
(except targets where the test does not work due to the return address
not saved on the regular stack). */
+extern void abort (void);
+extern void exit (int);
+
static void recurser_void1 (void);
static void recurser_void2 (void);
extern void track (void);
@@ -28,7 +31,7 @@ int main ()
reasonably sure is to make them have the same contents (regarding the
n tests). */
-static void
+static void __attribute__((noinline))
recurser_void1 (void)
{
if (n == 0 || n == 7 || n == 8)
@@ -40,7 +43,7 @@ recurser_void1 (void)
recurser_void2 ();
}
-static void
+static void __attribute__((noinline))
recurser_void2 (void)
{
if (n == 0 || n == 7 || n == 8)
diff --git a/gcc/testsuite/gcc.dg/sibcall-5.c b/gcc/testsuite/gcc.dg/sibcall-5.c
index 424908dba5a..da95f13e25c 100644
--- a/gcc/testsuite/gcc.dg/sibcall-5.c
+++ b/gcc/testsuite/gcc.dg/sibcall-5.c
@@ -2,6 +2,8 @@
/* { dg-do run { target i?86-*-* } } */
/* { dg-options "-O2" } */
+extern void abort (void);
+
int (*f)(int, int) __attribute__((regparm(2)));
int (*g)(int, int, int) __attribute__((regparm(3)));
diff --git a/gcc/testsuite/gcc.dg/sibcall-6.c b/gcc/testsuite/gcc.dg/sibcall-6.c
index 771a14e8b56..bb855108ee1 100644
--- a/gcc/testsuite/gcc.dg/sibcall-6.c
+++ b/gcc/testsuite/gcc.dg/sibcall-6.c
@@ -6,9 +6,12 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Andreas Bauer <baueran@in.tum.de> */
-/* { dg-do run { target i?86-*-* x86_64-*-*} } */
+/* { dg-do run { target i?86-*-* s390*-*-* x86_64-*-*} } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
+extern void abort (void);
+extern void exit (int);
+
int foo (int);
int bar (int);
diff --git a/gcc/testsuite/gcc.dg/simd-1.c b/gcc/testsuite/gcc.dg/simd-1.c
index fff6292d1a0..e36c5beec5c 100644
--- a/gcc/testsuite/gcc.dg/simd-1.c
+++ b/gcc/testsuite/gcc.dg/simd-1.c
@@ -4,19 +4,19 @@
/* Origin: Aldy Hernandez <aldyh@redhat.com>. */
/* Purpose: Program to test generic SIMD support. */
-typedef int __attribute__((mode(V4SI))) v4si;
-typedef int __attribute__((mode(V8HI))) v8hi;
-typedef int __attribute__((mode(V2SI))) v2si;
-typedef unsigned int __attribute__((mode(V4SI))) uv4si;
+typedef int __attribute__((vector_size (16))) v4si;
+typedef short __attribute__((vector_size (16))) v8hi;
+typedef int __attribute__((vector_size (8))) v2si;
+typedef unsigned int __attribute__((vector_size (16))) uv4si;
v4si a, b;
v2si c, d;
v8hi e;
uv4si f;
-int foo __attribute__((mode(DI)));
-int foo1 __attribute__((mode(SI)));
-int foo2 __attribute__((mode(V4HI)));
+long long foo;
+int foo1;
+short foo2 __attribute__((vector_size (8)));
void
hanneke ()
@@ -32,7 +32,7 @@ hanneke ()
e = (typeof (e)) a;
/* Different signed SIMD assignment. */
- f = a; /* { dg-error "incompatible types in assignment" } */
+ f = a;
/* Casted different signed SIMD assignment. */
f = (uv4si) a;
diff --git a/gcc/testsuite/gcc.dg/sparc-ret.c b/gcc/testsuite/gcc.dg/sparc-ret.c
index 629bbb155ef..3a4ddea58ec 100644
--- a/gcc/testsuite/gcc.dg/sparc-ret.c
+++ b/gcc/testsuite/gcc.dg/sparc-ret.c
@@ -3,8 +3,8 @@
Making sure that Ultrasparc return instructions do not read
below the stack. */
-/* { dg-do compile { target sparc*-*-* } } */
-/* { dg-options "-mcpu=ultrasparc -O -m32" } */
+/* { dg-do compile { target sparc-*-* } } */
+/* { dg-options "-mcpu=ultrasparc -O" } */
int bar (int a, int b, int c, int d, int e, int f, int g, int h)
@@ -14,7 +14,7 @@ int bar (int a, int b, int c, int d, int e, int f, int g, int h)
toto (&res);
return h;
}
-/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } */
+/* { dg-final { global compiler_flags; if ![string match "*-m64 *" $compiler_flags] { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } } */
int bar2 ()
{
@@ -23,5 +23,4 @@ int bar2 ()
toto (&res);
return res;
}
-/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } */
-
+/* { dg-final { global compiler_flags; if ![string match "*-m64 *" $compiler_flags] { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } } */
diff --git a/gcc/testsuite/gcc.dg/special/gcsec-1.c b/gcc/testsuite/gcc.dg/special/gcsec-1.c
index f2a63d1b520..68d4066fa39 100644
--- a/gcc/testsuite/gcc.dg/special/gcsec-1.c
+++ b/gcc/testsuite/gcc.dg/special/gcsec-1.c
@@ -5,6 +5,7 @@
/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" } */
/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target native } } */
+/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" { target *-*-netware* } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/special/mips-abi.exp b/gcc/testsuite/gcc.dg/special/mips-abi.exp
index a13d2794f36..3c900d7a82e 100644
--- a/gcc/testsuite/gcc.dg/special/mips-abi.exp
+++ b/gcc/testsuite/gcc.dg/special/mips-abi.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,9 +25,8 @@ if {![istarget mips*-*-*] || [gcc_target_object_format] != "elf"} {
return
}
-# A list of all assembler ABI flags. We should use SGI-compatible
-# flags where possible.
-set asm_abi_flags {-32 -n32 -64 -mabi=o64 -mabi=eabi}
+# A list of all assembler ABI flags.
+set asm_abi_flags {-mabi=32 -mabi=n32 -mabi=64 -mabi=o64 -mabi=eabi}
# Try to assemble mips-abi.s (an empty file), passing -v in order to
# get the assembler command line. Check whether an appropriate ABI
@@ -38,7 +37,7 @@ set asm_abi_flags {-32 -n32 -64 -mabi=o64 -mabi=eabi}
# ABI flag is expected.
# FLAGS is a list of options for gcc.
proc check_mips_abi {name abis flags} {
- global srcdir subdir asm_abi_flags
+ global srcdir subdir
lappend flags "-v"
set lines [gcc_target_compile "$srcdir/$subdir/mips-abi.s" \
@@ -54,7 +53,7 @@ proc check_mips_abi {name abis flags} {
# ABI options.
if {[lsearch -exact $abis $arg] >= 0} {
incr good
- } elseif {[lsearch -exact $asm_abi_flags $arg] >= 0} {
+ } elseif {[string match "-mabi=*" $arg]} {
incr bad
}
}
@@ -83,29 +82,23 @@ if {[board_info $target exists multilib_flags]} {
# See whether the default command line specifies an ABI.
set default_abi ""
foreach flag $default_flags {
- if {[string first "-mabi" $flag] == 0} {
+ if {[string match "-mabi=*" $flag]} {
set default_abi $flag
}
}
# If the command line does specify an ABI, just check for the
# appropriate assembler flag.
-switch -- $default_abi {
- -mabi=eabi { check_mips_abi "EABI" "-mabi=eabi" "" }
- -mabi=32 { check_mips_abi "o32" "-32" "" }
- -mabi=n32 { check_mips_abi "n32" "-n32" "" }
- -mabi=o64 { check_mips_abi "o64" "-mabi=o64" "" }
- -mabi=64 { check_mips_abi "n64" "-64" "" }
- "" {
- # An ABI should be passed to the assembler by default.
- # It doesn't seem worthwhile to duplicate the
- # configuration to ABI logic here, so just accept any ABI.
- check_mips_abi "default" $asm_abi_flags ""
+if {$default_abi != ""} {
+ check_mips_abi "command line" $default_abi ""
+} else {
+ # An ABI should be passed to the assembler by default.
+ # It doesn't seem worthwhile to duplicate the
+ # configuration to ABI logic here, so just accept any ABI.
+ check_mips_abi "default" $asm_abi_flags ""
- # See whether passing a -mabi flag does the right thing.
- # Only try ABIs that the SGI assembler also understands.
- check_mips_abi "o32" "-32" "-mabi=32"
- check_mips_abi "n32" "-n32" "-mabi=n32"
- check_mips_abi "64" "-64" "-mabi=64"
+ # See whether passing a -mabi flag does the right thing.
+ foreach abi $asm_abi_flags {
+ check_mips_abi $abi $abi $abi
}
}
diff --git a/gcc/testsuite/gcc.dg/special/wkali-2.c b/gcc/testsuite/gcc.dg/special/wkali-2.c
index b53d4f27024..c36024632c6 100644
--- a/gcc/testsuite/gcc.dg/special/wkali-2.c
+++ b/gcc/testsuite/gcc.dg/special/wkali-2.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-require-weak "" } */
+/* { dg-require-alias "" } */
/* { dg-additional-sources "wkali-2a.c wkali-2b.c" } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tls/alias-1.c b/gcc/testsuite/gcc.dg/tls/alias-1.c
index 3372da3d10c..fa8dd29d94b 100644
--- a/gcc/testsuite/gcc.dg/tls/alias-1.c
+++ b/gcc/testsuite/gcc.dg/tls/alias-1.c
@@ -1,4 +1,5 @@
/* { dg-do link } */
+/* { dg-warning "visibility" "unsupported" { target sparc*-sun-solaris2.* } 22 } */
/* Test that encode_section_info handles the change from externally
defined to locally defined (via hidden). Extracted from glibc. */
diff --git a/gcc/testsuite/gcc.dg/tls/diag-2.c b/gcc/testsuite/gcc.dg/tls/diag-2.c
index 4f2b90b8f7e..5e7e17bee5a 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-2.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-2.c
@@ -1,21 +1,21 @@
/* Invalid __thread specifiers. */
-__thread extern int g1; /* { dg-error "`__thread' before `extern'" } */
-__thread static int g2; /* { dg-error "`__thread' before `static'" } */
-__thread __thread int g3; /* { dg-error "duplicate `__thread'" } */
-typedef __thread int g4; /* { dg-error "multiple storage classes" } */
+__thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */
+__thread static int g2; /* { dg-error "'__thread' before 'static'" } */
+__thread __thread int g3; /* { dg-error "duplicate '__thread'" } */
+typedef __thread int g4; /* { dg-error "'__thread' used with 'typedef'" } */
void foo()
{
- __thread int l1; /* { dg-error "implicitly auto and declared `__thread'" } */
- auto __thread int l2; /* { dg-error "multiple storage classes" } */
- __thread extern int l3; /* { dg-error "`__thread' before `extern'" } */
- register __thread int l4; /* { dg-error "multiple storage classes" } */
+ __thread int l1; /* { dg-error "implicitly auto and declared '__thread'" } */
+ auto __thread int l2; /* { dg-error "'__thread' used with 'auto'" } */
+ __thread extern int l3; /* { dg-error "'__thread' before 'extern'" } */
+ register __thread int l4; /* { dg-error "'__thread' used with 'register'" } */
}
__thread void f1 (); /* { dg-error "invalid storage class for function" } */
extern __thread void f2 (); /* { dg-error "invalid storage class for function" } */
static __thread void f3 (); /* { dg-error "invalid storage class for function" } */
-__thread void f4 () { } /* { dg-error "function definition declared `__thread'" } */
+__thread void f4 () { } /* { dg-error "function definition declared '__thread'" } */
void bar(__thread int p1); /* { dg-error "storage class specified for parameter" } */
diff --git a/gcc/testsuite/gcc.dg/tls/diag-3.c b/gcc/testsuite/gcc.dg/tls/diag-3.c
index 89d1bea8ede..f1ce06b70d8 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-3.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-3.c
@@ -1,7 +1,7 @@
/* Report invalid extern and __thread combinations. */
extern int j; /* { dg-error "previous declaration" } */
-__thread int j; /* { dg-error "follows non thread-local" } */
+__thread int j; /* { dg-error "follows non-thread-local" } */
extern __thread int i; /* { dg-error "previous declaration" } */
int i; /* { dg-error "follows thread-local" } */
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c b/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c
index 304e92afa8f..0e521d84e3f 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c
@@ -26,9 +26,10 @@ void test_builtin_##FN(TYPE x, TYPE y) \
{ if (__builtin_##FN(x,y) != __builtin_##FN(x,y)) link_failure_builtin_##FN(); }
/* Also test the regular (non-__builtin_) function. */
-#define TEST1(FN, TYPE) \
+#define TEST1(FN, TYPE, RTYPE) \
BUILTIN_TEST1(FN, TYPE) \
extern void link_failure_##FN(void); \
+extern RTYPE FN(TYPE); \
void test_##FN(TYPE x) { if (FN(x) != FN(x)) link_failure_##FN(); }
/* Test the __builtin_ functions taking void arguments (with the "f"
@@ -153,12 +154,32 @@ void test_builtin_##FN##l(_Complex long double ld1, _Complex long double ld2) \
/* These macros additionally test the non-__builtin_ functions. */
/* Test the functions taking one FP argument (with the "f" and "l"
- variants). */
+ variants) and returning that type. */
#define FPTEST1(FN) \
BUILTIN_FPTEST1(FN) \
extern void link_failure_##FN(void); \
extern void link_failure_##FN##f(void); \
extern void link_failure_##FN##l(void); \
+extern double FN(double); \
+extern float FN##f(float); \
+extern long double FN##l(long double); \
+void test_##FN(double d) \
+{ if (FN(d) != FN(d)) link_failure_##FN(); } \
+void test_##FN##f(float f) \
+{ if (FN##f(f) != FN##f(f)) link_failure_##FN##f(); } \
+void test_##FN##l(long double ld) \
+{ if (FN##l(ld) != FN##l(ld)) link_failure_##FN##l(); }
+
+/* Test the functions taking one FP argument (with the "f" and "l"
+ variants) and returning TYPE. */
+#define FPTEST1T(FN, TYPE) \
+BUILTIN_FPTEST1(FN) \
+extern void link_failure_##FN(void); \
+extern void link_failure_##FN##f(void); \
+extern void link_failure_##FN##l(void); \
+extern TYPE FN(double); \
+extern TYPE FN##f(float); \
+extern TYPE FN##l(long double); \
void test_##FN(double d) \
{ if (FN(d) != FN(d)) link_failure_##FN(); } \
void test_##FN##f(float f) \
@@ -173,6 +194,9 @@ BUILTIN_FPTEST2(FN) \
extern void link_failure_##FN(void); \
extern void link_failure_##FN##f(void); \
extern void link_failure_##FN##l(void); \
+extern double FN(double, double); \
+extern float FN##f(float, float); \
+extern long double FN##l(long double, long double); \
void test_##FN(double d1, double d2) \
{ if (FN(d1,d2) != FN(d1,d2)) link_failure_##FN(); } \
void test_##FN##f(float f1, float f2) \
@@ -188,6 +212,9 @@ BUILTIN_FPTEST2ARG1(FN, TYPE) \
extern void link_failure_##FN(void); \
extern void link_failure_##FN##f(void); \
extern void link_failure_##FN##l(void); \
+extern double FN(TYPE, double); \
+extern float FN##f(TYPE, float); \
+extern long double FN##l(TYPE, long double); \
void test_##FN(TYPE x, double d) \
{ if (FN(x,d) != FN(x,d)) link_failure_##FN(); } \
void test_##FN##f(TYPE x, float f) \
@@ -203,6 +230,9 @@ BUILTIN_FPTEST2ARG2(FN, TYPE) \
extern void link_failure_##FN(void); \
extern void link_failure_##FN##f(void); \
extern void link_failure_##FN##l(void); \
+extern double FN(double, TYPE); \
+extern float FN##f(float, TYPE); \
+extern long double FN##l(long double, TYPE); \
void test_##FN(double d, TYPE x) \
{ if (FN(d,x) != FN(d,x)) link_failure_##FN(); } \
void test_##FN##f(float f, TYPE x) \
@@ -217,6 +247,9 @@ BUILTIN_FPTEST3(FN) \
extern void link_failure_##FN(void); \
extern void link_failure_##FN##f(void); \
extern void link_failure_##FN##l(void); \
+extern double FN(double, double, double); \
+extern float FN##f(float, float, float); \
+extern long double FN##l(long double, long double, long double); \
void test_##FN(double d1, double d2, double d3) \
{ if (FN(d1,d2,d3) != FN(d1,d2,d3)) link_failure_##FN(); } \
void test_##FN##f(float f1, float f2, float f3) \
@@ -225,12 +258,32 @@ void test_##FN##l(long double ld1, long double ld2, long double ld3) \
{ if (FN##l(ld1,ld2,ld3) != FN##l(ld1,ld2,ld3)) link_failure_##FN##l(); }
/* Test the functions taking one complex argument (with the "f" and
- "l" variants). */
+ "l" variants) and returning that type. */
#define CPTEST1(FN) \
BUILTIN_CPTEST1(FN) \
extern void link_failure_##FN(void); \
extern void link_failure_##FN##f(void); \
extern void link_failure_##FN##l(void); \
+extern _Complex double FN(_Complex double); \
+extern _Complex float FN##f(_Complex float); \
+extern _Complex long double FN##l(_Complex long double); \
+void test_##FN(_Complex double d) \
+{ if (FN(d) != FN(d)) link_failure_##FN(); } \
+void test_##FN##f(_Complex float f) \
+{ if (FN##f(f) != FN##f(f)) link_failure_##FN##f(); } \
+void test_##FN##l(_Complex long double ld) \
+{ if (FN##l(ld) != FN##l(ld)) link_failure_##FN##l(); }
+
+/* Test the functions taking one complex argument (with the "f" and
+ "l" variants) and returning the real type. */
+#define CPTEST1R(FN) \
+BUILTIN_CPTEST1(FN) \
+extern void link_failure_##FN(void); \
+extern void link_failure_##FN##f(void); \
+extern void link_failure_##FN##l(void); \
+extern double FN(_Complex double); \
+extern float FN##f(_Complex float); \
+extern long double FN##l(_Complex long double); \
void test_##FN(_Complex double d) \
{ if (FN(d) != FN(d)) link_failure_##FN(); } \
void test_##FN##f(_Complex float f) \
@@ -245,6 +298,9 @@ BUILTIN_CPTEST2(FN) \
extern void link_failure_##FN(void); \
extern void link_failure_##FN##f(void); \
extern void link_failure_##FN##l(void); \
+extern _Complex double FN(_Complex double, _Complex double); \
+extern _Complex float FN##f(_Complex float, _Complex float); \
+extern _Complex long double FN##l(_Complex long double, _Complex long double); \
void test_##FN(_Complex double d1, _Complex double d2) \
{ if (FN(d1,d2) != FN(d1,d2)) link_failure_##FN(); } \
void test_##FN##f(_Complex float f1, _Complex float f2) \
@@ -283,35 +339,35 @@ FPTEST2 (fmod)
FPTEST1 (gamma)
BUILTIN_FPTEST0 (huge_val)
FPTEST2 (hypot)
-FPTEST1 (ilogb)
+FPTEST1T (ilogb, int)
BUILTIN_FPTEST0 (inf)
FPTEST1 (j0)
FPTEST1 (j1)
FPTEST2ARG1 (jn, int)
FPTEST2ARG2 (ldexp, int)
FPTEST1 (lgamma)
-FPTEST1 (llrint)
-FPTEST1 (llround)
+FPTEST1T (llrint, long long)
+FPTEST1T (llround, long long)
FPTEST1 (log)
FPTEST1 (log10)
FPTEST1 (log1p)
FPTEST1 (log2)
FPTEST1 (logb)
-FPTEST1 (lrint)
-FPTEST1 (lround)
+FPTEST1T (lrint, long)
+FPTEST1T (lround, long)
BUILTIN_FPTEST1ARG (nan, char *)
BUILTIN_FPTEST1ARG (nans, char *)
FPTEST1 (nearbyint)
FPTEST2 (nextafter)
-FPTEST2 (nexttoward)
+FPTEST2ARG2 (nexttoward, long double)
FPTEST2 (pow)
FPTEST1 (pow10)
FPTEST2 (remainder)
FPTEST1 (rint)
FPTEST1 (round)
FPTEST2 (scalb)
-FPTEST2ARG2 (scalbln, int)
FPTEST2ARG2 (scalbn, int)
+FPTEST2ARG2 (scalbln, long int)
FPTEST1 (significand)
FPTEST1 (sin)
FPTEST1 (sinh)
@@ -328,7 +384,7 @@ FPTEST2ARG1 (yn, int)
/*CPTEST1 (cabs) See http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00040.html */
CPTEST1 (cacos)
CPTEST1 (cacosh)
-CPTEST1 (carg)
+CPTEST1R (carg)
CPTEST1 (casin)
CPTEST1 (casinh)
CPTEST1 (catan)
@@ -336,32 +392,34 @@ CPTEST1 (catanh)
CPTEST1 (ccos)
CPTEST1 (ccosh)
CPTEST1 (cexp)
-CPTEST1 (cimag)
+CPTEST1R (cimag)
/*CPTEST1 (clog)*/
CPTEST1 (conj)
CPTEST2 (cpow)
CPTEST1 (cproj)
-CPTEST1 (creal)
+CPTEST1R (creal)
CPTEST1 (csin)
CPTEST1 (csinh)
CPTEST1 (csqrt)
CPTEST1 (ctan)
CPTEST1 (ctanh)
+typedef __INTMAX_TYPE__ intmax_t;
+
/* Various other const builtins. */
-TEST1 (abs, int)
+TEST1 (abs, int, int)
BUILTIN_TEST1 (clz, int)
BUILTIN_TEST1 (clzl, long)
BUILTIN_TEST1 (clzll, long long)
BUILTIN_TEST1 (ctz, int)
BUILTIN_TEST1 (ctzl, long)
BUILTIN_TEST1 (ctzll, long long)
-TEST1 (ffs, int)
-TEST1 (ffsl, long)
-TEST1 (ffsll, long long)
-TEST1 (imaxabs, int)
-TEST1 (labs, long)
-TEST1 (llabs, long long)
+TEST1 (ffs, int, int)
+TEST1 (ffsl, long, int)
+TEST1 (ffsll, long long, int)
+TEST1 (imaxabs, intmax_t, intmax_t)
+TEST1 (labs, long, long)
+TEST1 (llabs, long long, long long)
BUILTIN_TEST1 (parity, int)
BUILTIN_TEST1 (parityl, long)
BUILTIN_TEST1 (parityll, long long)
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
index 352f5b037b1..4d7de84cbb5 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation.
+/* Copyright (C) 2003, 2004 Free Software Foundation.
Verify that built-in math function constant folding of log & exp is
correctly performed by the compiler.
@@ -13,9 +13,10 @@
#define M_EF 2.7182818284590452353602874713526624977572470936999595749669676277241F
#define M_EL 2.7182818284590452353602874713526624977572470936999595749669676277241L
/* Precision for comparison tests. */
-#define PREC 0.0000001
+#define PREC (sizeof (float) < sizeof (double) ? 0.0000001 : PRECF)
#define PRECF 0.0001F
-#define PRECL 0.0000000000001L
+#define PRECL (sizeof (float) < sizeof (long double) \
+ ? 0.0000000000001L : PRECF)
#define PROTOTYPE(FN) extern double FN(double); extern float FN##f(float); \
extern long double FN##l(long double);
#define PROTOTYPE2(FN) extern double FN(double, double); \
@@ -36,6 +37,7 @@ PROTOTYPE2(pow)
void test(double d1, double d2, float f1, float f2,
long double ld1, long double ld2)
{
+ /* Test logN(1) -> 0. */
#define LOG_1(LOG) \
extern void link_failure_##LOG##_1(void); \
if (LOG(1.0) != 0.0 || LOG##f(1.0F) != 0.0F || LOG##l(1.0L) != 0.0L) \
@@ -45,6 +47,7 @@ void test(double d1, double d2, float f1, float f2,
LOG_1(log2);
LOG_1(log10);
+ /* Test logN(N) -> 1. */
#define LOG_N(LOG, BASE) \
extern void link_failure_##LOG##_N(void); \
if (LOG(BASE) != 1.0 || LOG##f(BASE##F) != 1.0F || LOG##l(BASE##L) != 1.0L) \
@@ -54,6 +57,7 @@ void test(double d1, double d2, float f1, float f2,
LOG_N(log2, 2.0);
LOG_N(log10, 10.0);
+ /* Test logN(expN(x)) -> x. */
#define LOGEXP_SAME(LOG, EXP) \
extern void link_failure_##LOG##_##EXP##_same(void); \
if (LOG(EXP(d1)) != d1 || LOG##f(EXP##f(f1)) != f1 \
@@ -64,6 +68,7 @@ void test(double d1, double d2, float f1, float f2,
LOGEXP_SAME(log10,exp10);
LOGEXP_SAME(log10,pow10);
+ /* Test logN(expM(x)) -> x*logN(M). */
#define LOGEXP(LOG, EXP, BASE) \
extern void link_failure_##LOG##_##EXP(void); \
if (LOG(EXP(d1)) != d1*LOG(BASE) || LOG##f(EXP##f(f1)) != f1*LOG##f(BASE##F) \
@@ -82,6 +87,7 @@ void test(double d1, double d2, float f1, float f2,
LOGEXP(log10,exp10,10.0);
LOGEXP(log10,pow10,10.0);
+ /* Test logN(sqrt(x)) -> 0.5*logN(x). */
#define LOG_SQRT(LOG) \
extern void link_failure_##LOG##_sqrt(void); \
if (LOG(sqrt(d1)) != 0.5*LOG(d1) || LOG##f(sqrtf(f1)) != 0.5F*LOG##f(f1) \
@@ -91,6 +97,18 @@ void test(double d1, double d2, float f1, float f2,
LOG_SQRT(log2);
LOG_SQRT(log10);
+ /* Test sqrt(expN(x)) -> expN(x*0.5). */
+#define SQRT_EXP(EXP) \
+ extern void link_failure_sqrt_##EXP(void); \
+ if (sqrt(EXP(d1)) != EXP(d1*0.5) || sqrtf(EXP##f(f1)) != EXP##f(f1*0.5F) \
+ || sqrtl(EXP##l(ld1)) != EXP##l(ld1*0.5L)) link_failure_sqrt_##EXP()
+
+ SQRT_EXP(exp);
+ SQRT_EXP(exp2);
+ SQRT_EXP(exp10);
+ SQRT_EXP(pow10);
+
+ /* Test logN(cbrt(x)) -> (1/3)*logN(x). */
#define LOG_CBRT(LOG) \
extern void link_failure_##LOG##_cbrt(void); \
if (LOG(cbrt(d1)) != (1.0/3)*LOG(d1) \
@@ -101,15 +119,39 @@ void test(double d1, double d2, float f1, float f2,
LOG_CBRT(log2);
LOG_CBRT(log10);
-#define LOGPOW(LOG, POW) \
+ /* Test cbrt(expN(x)) -> expN(x/3). */
+#define CBRT_EXP(EXP) \
+ extern void link_failure_cbrt_##EXP(void); \
+ if (cbrt(EXP(d1)) != EXP(d1/3.0) || cbrtf(EXP##f(f1)) != EXP##f(f1/3.0F) \
+ || cbrtl(EXP##l(ld1)) != EXP##l(ld1/3.0L)) link_failure_cbrt_##EXP()
+
+ CBRT_EXP(exp);
+ CBRT_EXP(exp2);
+ CBRT_EXP(exp10);
+ CBRT_EXP(pow10);
+
+ /* Test logN(pow(x,y)) -> y*logN(x). */
+#define LOG_POW(LOG, POW) \
extern void link_failure_##LOG##_##POW(void); \
if (LOG(POW(d1,d2)) != d2*LOG(d1) || LOG##f(POW##f(f1,f2)) != f2*LOG##f(f1) \
|| LOG##l(POW##l(ld1,ld2)) != ld2*LOG##l(ld1)) link_failure_##LOG##_##POW()
- LOGPOW(log,pow);
- LOGPOW(log2,pow);
- LOGPOW(log10,pow);
+ LOG_POW(log,pow);
+ LOG_POW(log2,pow);
+ LOG_POW(log10,pow);
+
+ /* Test pow(expN(x),y)) -> expN(x*y). */
+#define POW_EXP(POW, EXP) \
+ extern void link_failure_##POW##_##EXP(void); \
+ if (POW(EXP(d1),d2) != EXP(d1*d2) || POW##f(EXP##f(f1),f2) != EXP##f(f1*f2) \
+ || POW##l(EXP##l(ld1),ld2) != EXP##l(ld1*ld2)) link_failure_##POW##_##EXP()
+
+ POW_EXP(pow, exp);
+ POW_EXP(pow, exp2);
+ POW_EXP(pow, exp10);
+ POW_EXP(pow, pow10);
+ /* Test expN(0) -> 1. */
#define EXP_0(EXP) \
extern void link_failure_##EXP##_0(void); \
if (EXP(0.0) != 1.0 || EXP##f(0.0F) != 1.0F || EXP##l(0.0L) != 1.0L) \
@@ -120,6 +162,7 @@ void test(double d1, double d2, float f1, float f2,
EXP_0(exp10);
EXP_0(pow10);
+ /* Test expN(1) -> N. */
#define EXP_N(EXP, BASE) \
extern void link_failure_##EXP##_N(void); \
if (EXP(1.0) != BASE || EXP##f(1.0F) != BASE##F || EXP##l(1.0L) != BASE##L) \
@@ -130,6 +173,7 @@ void test(double d1, double d2, float f1, float f2,
EXP_N(exp10, 10.0);
EXP_N(pow10, 10.0);
+ /* Test expN(integer) -> N*N*N*... */
#define EXP_INT(EXP, BASE) \
extern void link_failure_##EXP##_INT(void); \
if (EXP(5.0) < (BASE)*(BASE)*(BASE)*(BASE)*(BASE) - PREC \
@@ -145,6 +189,7 @@ void test(double d1, double d2, float f1, float f2,
EXP_INT(exp10, 10.0);
EXP_INT(pow10, 10.0);
+ /* Test expN(logN(x)) -> x. */
#define EXPLOG_SAME(EXP, LOG) \
extern void link_failure_##EXP##_##LOG##_same(void); \
if (EXP(LOG(d1)) != d1 || EXP##f(LOG##f(f1)) != f1 \
@@ -155,6 +200,7 @@ void test(double d1, double d2, float f1, float f2,
EXPLOG_SAME(exp10, log10);
EXPLOG_SAME(pow10, log10);
+ /* Test expN(x)*expN(y)) -> expN(x+y). */
#define EXPXEXP(EXP) \
extern void link_failure_##EXP##X##EXP(void); \
if (EXP(d1)*EXP(d2) != EXP(d1+d2) || EXP##f(f1)*EXP##f(f2) != EXP##f(f1+f2) \
@@ -165,6 +211,8 @@ void test(double d1, double d2, float f1, float f2,
EXPXEXP(exp10);
EXPXEXP(pow10);
+ /* Test x/expN(y) -> x*expN(-y). */
+ /* Test expN(x)/expN(y) -> expN(x-y). */
#define DIVEXP(EXP) \
extern void link_failure_div1_##EXP(void); \
if (d1/EXP(d2) != d1*EXP(-d2) || f1/EXP##f(f2) != f1*EXP##f(-f2) \
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-1.c b/gcc/testsuite/gcc.dg/torture/builtin-math-1.c
index 47b91d7e25d..d052f5347bc 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-math-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-math-1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation.
Verify that built-in math function constant folding of constant
arguments is correctly performed by the compiler.
@@ -7,6 +7,34 @@
/* { dg-do link } */
+extern double atan (double);
+extern float atanf (float);
+extern long double atanl (long double);
+extern double cbrt (double);
+extern float cbrtf (float);
+extern long double cbrtl (long double);
+extern double cos (double);
+extern float cosf (float);
+extern long double cosl (long double);
+extern double exp (double);
+extern float expf (float);
+extern long double expl (long double);
+extern double log (double);
+extern float logf (float);
+extern long double logl (long double);
+extern double pow (double, double);
+extern float powf (float, float);
+extern long double powl (long double, long double);
+extern double sin (double);
+extern float sinf (float);
+extern long double sinl (long double);
+extern double sqrt (double);
+extern float sqrtf (float);
+extern long double sqrtl (long double);
+extern double tan (double);
+extern float tanf (float);
+extern long double tanl (long double);
+
/* All references to link_error should go away at compile-time. */
extern void link_error(void);
@@ -18,6 +46,15 @@ void test (float f, double d, long double ld)
if (sqrt (1.0) != 1.0)
link_error ();
+ if (cbrt (0.0) != 0.0)
+ link_error ();
+
+ if (cbrt (1.0) != 1.0)
+ link_error ();
+
+ if (cbrt (-1.0) != -1.0)
+ link_error ();
+
if (exp (0.0) != 1.0)
link_error ();
@@ -55,6 +92,15 @@ void test (float f, double d, long double ld)
if (sqrtf (1.0F) != 1.0F)
link_error ();
+ if (cbrtf (0.0F) != 0.0F)
+ link_error ();
+
+ if (cbrtf (1.0F) != 1.0F)
+ link_error ();
+
+ if (cbrtf (-1.0F) != -1.0F)
+ link_error ();
+
if (expf (0.0F) != 1.0F)
link_error ();
@@ -92,6 +138,15 @@ void test (float f, double d, long double ld)
if (sqrtl (1.0L) != 1.0L)
link_error ();
+ if (cbrtl (0.0L) != 0.0L)
+ link_error ();
+
+ if (cbrtl (1.0L) != 1.0L)
+ link_error ();
+
+ if (cbrtl (-1.0L) != -1.0L)
+ link_error ();
+
if (expl (0.0L) != 1.0L)
link_error ();
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c b/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c
index d49de7f66de..c8c8609f62c 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c
@@ -15,6 +15,7 @@ int
main (void)
{
volatile int i = 0;
+ extern void exit (int);
if (i)
tabort ();
if (i)
@@ -60,6 +61,7 @@ t_exit (void)
void
_exit (int i)
{
+ extern void abort (void);
abort ();
}
@@ -81,5 +83,6 @@ t_Exit (void)
void
_Exit (int i)
{
+ extern void abort (void);
abort ();
}
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-power-1.c b/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
index 7cdc00c23fb..45566118a81 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
@@ -63,7 +63,7 @@ void test(double d1, double d2, double d3,
|| FN##l(powl(ld1,ld2)) != powl(ld1,ld2/N)) \
link_failure_##FN##_pow()
- /*ROOT_POW(sqrt,2); Invalid. */
+ ROOT_POW(sqrt,2);
/*ROOT_POW(cbrt,3); Intentionally not implemented. */
/* Test pow(pow(x,y),z) -> pow(x,y*z). */
diff --git a/gcc/testsuite/gcc.dg/torture/mips-sdata-1.c b/gcc/testsuite/gcc.dg/torture/mips-sdata-1.c
index b665d96cd56..8ffd4d84857 100644
--- a/gcc/testsuite/gcc.dg/torture/mips-sdata-1.c
+++ b/gcc/testsuite/gcc.dg/torture/mips-sdata-1.c
@@ -1,6 +1,6 @@
/* Check that sdata-accesses are applied regardless of size or ABI. */
/* { dg-options -mexplicit-relocs } */
-/* { dg-do compile { target mips*-*-* } } */
+/* { dg-do compile { target mips*-*-elf* } } */
struct s { int x[4]; };
struct s my_struct __attribute__((__section__(".sdata")));
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c
index c9431f2d2d2..2fd47f753cf 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom3" } */
+/* { dg-options "-O1 -fdump-tree-dom3" } */
struct rtx_def;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c
index 8d18ed8fcbd..322f3ab3891 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c
@@ -19,4 +19,4 @@ rgn_rank (rtx insn1, rtx insn2)
}
/* There should be two IF conditionals. */
-/* { dg-final { scan-tree-dump-times "if " 2 "dom1" } } */
+/* { dg-final { scan-tree-dump-times "if " 2 "dom1" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
index cb3e284464d..426e2eab51a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
@@ -33,4 +33,4 @@ void test55 (int x, int y)
that the && should be emitted (based on BRANCH_COST). Fix this
by teaching dom to look through && and register all components
as true. */
-/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! powerpc*-*-* } } } } */
+/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040703-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040703-1.c
index 25e470a59b6..8f6ae167d3d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20040703-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040703-1.c
@@ -9,4 +9,4 @@ float foo(float x)
}
/* We should *not* fold the arithmetic. */
-/* { dg-final { scan-tree-dump-times "0\\.0" 0 "dom2"} } */
+/* { dg-final { scan-tree-dump-times "0.0" 0 "dom2"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c b/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
index afe83be4751..c07b0f1db8b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
@@ -1,11 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
-#ifdef __hppa__
-#define REGISTER "1"
-#else
#define REGISTER "0"
-#endif
void baz(void)
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c b/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c
index 9fbfc701511..ddb0ddcbc6a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c
@@ -2,12 +2,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
-#ifdef __hppa__
-#define REGISTER "1"
-#else
#define REGISTER "0"
-#endif
-
+
static inline int source(void)
{
register int hardreg __asm__(REGISTER);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
index 31818879dfb..72abd35854c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
@@ -24,13 +24,6 @@ void xxx(void)
/* { dg-final { scan-tree-dump-times "Added canonical iv to loop 1, 4 iterations" 1 "ivcanon"} } */
/* { dg-final { scan-tree-dump-times "Unrolled loop 1 completely" 1 "cunroll"} } */
/* { dg-final { scan-tree-dump-times "foo" 5 "vars"} } */
-
-/* Because hppa and ia64 targets include an external declaration for foo as
- well as the calls we need to look for something more specific then just
- foo in order to count only the calls and not the declaration. */
-
-/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* } } } */
-/* { dg-final { scan-assembler-times "foo,%r" 5 { target hppa*-*-* } } } */
-/* { dg-final { scan-assembler-times "= foo" 5 { target ia64*-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 5} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
index 8ba535b597a..a1dabfd9bcb 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
@@ -23,18 +23,9 @@ void xxx(void)
arr_base[iter].y = foo ();
}
-/* Access to arr_base[iter].y should be strength reduced. Depending on
- whether we have an addressing mode of type [base + offset], one of the
- following forms might get chosen:
+/* Access to arr_base[iter].y should be strength reduced. */
- -- induction variable with base &arr_base[0].y, the memory access of
- form *iv = ...
- -- induction variable with base 0, the memory access of form
- *(iv + &arr_base[0].y) = ...
-
- In any case, we should not have 'arr_base.[^0].* =' */
-
-/* { dg-final { scan-tree-dump-times "arr_base.\[^0\]\[^\\n\\r\]*=" 0 "vars" } } */
+/* { dg-final { scan-tree-dump-times "arr_base\[^\\n\\r\]*=" 0 "vars" } } */
/* And the original induction variable should be eliminated. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
index fe5b981e70e..4ec6fd04bcd 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
@@ -3,11 +3,11 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-vars" } */
-void foo(long);
+void foo(int);
void xxx(void)
{
- long iter, jter;
+ int iter, jter;
for (iter = 0, jter = 2; iter < 100; iter++, jter++)
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-1.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-1.c
index c018fbb9dec..652f402dc83 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/sra-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized --param sra-max-structure-size=32" } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
/* Tests for SRA. */
diff --git a/gcc/testsuite/gcc.dg/ultrasp2.c b/gcc/testsuite/gcc.dg/ultrasp2.c
index 1b8e5827a29..1fd821c34e8 100644
--- a/gcc/testsuite/gcc.dg/ultrasp2.c
+++ b/gcc/testsuite/gcc.dg/ultrasp2.c
@@ -4,10 +4,7 @@
/* { dg-do compile } */
/* { dg-options "" } */
-/* { dg-options "-O0 -m64" { target sparc64-*-* } } */
-/* { dg-options "-O0 -m64" { target sparcv9-*-* } } */
-/* { dg-options "" { target sparc-*-solaris2.[0-6] } } */
-/* { dg-options "" { target sparc-*-solaris2.[0-6].* } } */
+/* { dg-options "-O0" { target sparc64-*-* sparcv9-*-* } } */
short foo() {
short i = (short)(1<<15);
diff --git a/gcc/testsuite/gcc.dg/ultrasp3.c b/gcc/testsuite/gcc.dg/ultrasp3.c
index 5156c17e822..4458658a58e 100644
--- a/gcc/testsuite/gcc.dg/ultrasp3.c
+++ b/gcc/testsuite/gcc.dg/ultrasp3.c
@@ -1,6 +1,9 @@
/* { dg-options "" } */
/* { dg-options "-mcpu=ultrasparc -mv8plus" { target sparc-*-* } } */
+extern void abort (void);
+extern void exit (int);
+
unsigned long long foo (unsigned long long x)
{
return 0x73500000735LL * x;
diff --git a/gcc/testsuite/gcc.dg/ultrasp4.c b/gcc/testsuite/gcc.dg/ultrasp4.c
index b421688f004..6cd08b23d71 100644
--- a/gcc/testsuite/gcc.dg/ultrasp4.c
+++ b/gcc/testsuite/gcc.dg/ultrasp4.c
@@ -1,10 +1,7 @@
/* Simplified from PR target/5309. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-options "-O2 -m64 -mcpu=ultrasparc" { target sparc64-*-* } } */
-/* { dg-options "-O2 -m64 -mcpu=ultrasparc" { target sparcv9-*-* } } */
-/* { dg-options "-O2" { target sparc-*-solaris2.[0-6] } } */
-/* { dg-options "-O2" { target sparc-*-solaris2.[0-6].* } } */
+/* { dg-options "-O2 -mcpu=ultrasparc" { target sparc64-*-* sparcv9-*-* } } */
long bar (unsigned int);
long foo (long x, unsigned int y)
diff --git a/gcc/testsuite/gcc.dg/ultrasp8.c b/gcc/testsuite/gcc.dg/ultrasp8.c
index 068b5cae2de..f9289fae0ea 100644
--- a/gcc/testsuite/gcc.dg/ultrasp8.c
+++ b/gcc/testsuite/gcc.dg/ultrasp8.c
@@ -1,7 +1,7 @@
/* PR target/10067 */
/* Originator: <dat94ali@ludat.lth.se> */
/* { dg-do compile { target sparc*-*-* } } */
-/* { dg-options "-O2 -m64 -mtune=supersparc" { target sparc64-*-* } } */
+/* { dg-options "-O2 -mtune=supersparc" { target sparc64-*-* sparcv9-*-* } } */
struct _reent;
diff --git a/gcc/testsuite/gcc.dg/uninit-1.c b/gcc/testsuite/gcc.dg/uninit-1.c
index 91838810fda..060ec250ba7 100644
--- a/gcc/testsuite/gcc.dg/uninit-1.c
+++ b/gcc/testsuite/gcc.dg/uninit-1.c
@@ -13,7 +13,7 @@ extern void free (void *);
void remove_dupes (struct list *el)
{
- struct list *p, *q, *r; /* { dg-bogus "r" "uninitialized variable warning" { xfail *-*-* } } */
+ struct list *p, *q, *r; /* { dg-bogus "r" "uninitialized variable warning" } */
for (p = el; p; p = p->next)
{
diff --git a/gcc/testsuite/gcc.dg/uninit-2.c b/gcc/testsuite/gcc.dg/uninit-2.c
index 5035a309ebd..352bbac06c5 100644
--- a/gcc/testsuite/gcc.dg/uninit-2.c
+++ b/gcc/testsuite/gcc.dg/uninit-2.c
@@ -25,7 +25,7 @@ macroexpand (struct cpp_reader *pfile, struct definition *defn)
if (nargs >= 0)
{
- enum cpp_token token; /* { dg-bogus "token" "uninitialized variable warning" { xfail *-*-* } } */
+ enum cpp_token token; /* { dg-bogus "token" "uninitialized variable warning" } */
int i, rest_args;
i = 0;
rest_args = 0;
diff --git a/gcc/testsuite/gcc.dg/uninit-3.c b/gcc/testsuite/gcc.dg/uninit-3.c
index 78c4254dea5..ac5bfec8e72 100644
--- a/gcc/testsuite/gcc.dg/uninit-3.c
+++ b/gcc/testsuite/gcc.dg/uninit-3.c
@@ -8,7 +8,7 @@ extern void error (char *);
int
parse_charconst (const char *start, const char *end)
{
- int c; /* { dg-bogus "c" "uninitialized variable warning" { xfail *-*-* } } */
+ int c; /* { dg-bogus "c" "uninitialized variable warning" } */
int nchars, retval;
nchars = 0;
diff --git a/gcc/testsuite/gcc.dg/uninit-4.c b/gcc/testsuite/gcc.dg/uninit-4.c
index a27317ebed5..c51d00802b7 100644
--- a/gcc/testsuite/gcc.dg/uninit-4.c
+++ b/gcc/testsuite/gcc.dg/uninit-4.c
@@ -23,7 +23,7 @@ extern struct operation cpp_lex (void);
void
cpp_parse_expr (void)
{
- int rprio; /* { dg-bogus "rprio" "uninitialized variable warning" { xfail *-*-* } } */
+ int rprio; /* { dg-bogus "rprio" "uninitialized variable warning" } */
struct operation op;
for (;;)
diff --git a/gcc/testsuite/gcc.dg/uninit-5.c b/gcc/testsuite/gcc.dg/uninit-5.c
index ac760d69e03..ae7a8de7646 100644
--- a/gcc/testsuite/gcc.dg/uninit-5.c
+++ b/gcc/testsuite/gcc.dg/uninit-5.c
@@ -1,5 +1,4 @@
-/* Spurious uninitialized-variable warnings.
- These cases are documented as not working in the gcc manual. */
+/* Spurious uninitialized-variable warnings. */
/* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */
@@ -10,7 +9,7 @@ extern void foo(void);
void
func1(int cond)
{
- int x; /* { dg-bogus "x" "uninitialized variable warning" { xfail *-*-* } } */
+ int x; /* { dg-bogus "x" "uninitialized variable warning" } */
if(cond)
x = 1;
@@ -24,7 +23,7 @@ func1(int cond)
void
func2 (int cond)
{
- int x; /* { dg-bogus "x" "uninitialized variable warning" { xfail *-*-* } } */
+ int x; /* { dg-bogus "x" "uninitialized variable warning" } */
int flag = 0;
if(cond)
diff --git a/gcc/testsuite/gcc.dg/uninit-6.c b/gcc/testsuite/gcc.dg/uninit-6.c
index 2c428df79b6..b0f2083ab4b 100644
--- a/gcc/testsuite/gcc.dg/uninit-6.c
+++ b/gcc/testsuite/gcc.dg/uninit-6.c
@@ -34,12 +34,12 @@ struct tree *
make_something(int a, int b, int c)
{
struct tree *rv;
- struct tree *field; /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */
+ struct tree *field;
rv = malloc (sizeof (struct tree));
rv->car = 0;
- APPEND(rv, field, INTEGER_T, a);
+ APPEND(rv, field, INTEGER_T, a); /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */
APPEND(rv, field, PTR_T, b);
APPEND(rv, field, INTEGER_T, c);
diff --git a/gcc/testsuite/gcc.dg/uninit-8.c b/gcc/testsuite/gcc.dg/uninit-8.c
index 94117da37c9..98700f4aa1f 100644
--- a/gcc/testsuite/gcc.dg/uninit-8.c
+++ b/gcc/testsuite/gcc.dg/uninit-8.c
@@ -11,7 +11,7 @@ void
add_bignums (int *out, int *x, int *y)
{
int p, sum;
- int carry; /* { dg-bogus "carry" "uninitialized variable warning" { xfail *-*-* } } */
+ int carry; /* { dg-bogus "carry" "uninitialized variable warning" } */
p = 0;
for (; *x; x++, y++, out++, p++)
diff --git a/gcc/testsuite/gcc.dg/uninit-9.c b/gcc/testsuite/gcc.dg/uninit-9.c
index 62681f9e0fd..2a8ccb69f32 100644
--- a/gcc/testsuite/gcc.dg/uninit-9.c
+++ b/gcc/testsuite/gcc.dg/uninit-9.c
@@ -23,7 +23,7 @@ func(struct foo *list, int count)
{
int n_clobbers = 0;
int i;
- struct foo **clob_list; /* { dg-bogus "clob_list" "uninitialized variable warning" { xfail *-*-* } } */
+ struct foo **clob_list; /* { dg-bogus "clob_list" "uninitialized variable warning" } */
if(list[0].type == PARALLEL)
{
diff --git a/gcc/testsuite/gcc.dg/uninit-C.c b/gcc/testsuite/gcc.dg/uninit-C.c
index ddef41cbf79..3ecbf8ae43a 100644
--- a/gcc/testsuite/gcc.dg/uninit-C.c
+++ b/gcc/testsuite/gcc.dg/uninit-C.c
@@ -4,7 +4,7 @@
/* Not all platforms support TImode integers. */
#if defined(__LP64__) || defined(__sparc__)
-typedef int TItype __attribute__ ((mode (TI)));
+typedef int TItype __attribute__ ((mode (TI))); /* { dg-error "no data type for mode" "TI" { target sparc-sun-solaris2.[0-6]* } } */
#else
typedef long TItype;
#endif
diff --git a/gcc/testsuite/gcc.dg/uninit-H.c b/gcc/testsuite/gcc.dg/uninit-H.c
index b93bf8daac2..8098822b660 100644
--- a/gcc/testsuite/gcc.dg/uninit-H.c
+++ b/gcc/testsuite/gcc.dg/uninit-H.c
@@ -10,20 +10,8 @@
# define ASM __asm__("r1")
#elif defined __s390__
# define ASM __asm__("r15")
-#elif defined __mips
-# define ASM __asm__("$sp")
-#elif defined __sparc__
-# define ASM __asm__("sp")
-#elif defined __ia64__
-# define ASM __asm__("r12")
-#elif defined __hppa__
-# define ASM __asm__("%r30")
-#elif defined __xtensa__
-# define ASM __asm__("sp")
#else
-/* The register name should be target-dependent so for other targets,
- we just silence the test. */
-# define ASM = 0
+# define ASM
#endif
void *load_PCB (void)
diff --git a/gcc/testsuite/gcc.dg/unused-4.c b/gcc/testsuite/gcc.dg/unused-4.c
index 53236008007..99e845f45a3 100644
--- a/gcc/testsuite/gcc.dg/unused-4.c
+++ b/gcc/testsuite/gcc.dg/unused-4.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Wunused -O3" } */
-static const int i = 0; /* { dg-warning "defined but not used" } */
+static const int i = 0;
static void f() { } /* { dg-warning "defined but not used" } */
static inline void g() { }
diff --git a/gcc/testsuite/gcc.dg/va-arg-1.c b/gcc/testsuite/gcc.dg/va-arg-1.c
index a14823725da..ecd0e4d84bf 100644
--- a/gcc/testsuite/gcc.dg/va-arg-1.c
+++ b/gcc/testsuite/gcc.dg/va-arg-1.c
@@ -7,7 +7,7 @@ volatile int i;
void foo()
{
- i = va_arg(v, char); /* { dg-warning "is promoted to|so you should" "char" } */
- i = va_arg(v, short); /* { dg-warning "is promoted to" "short" } */
- i = va_arg(v, float); /* { dg-warning "is promoted to" "float" } */
+ i = va_arg(v, char); /* { dg-warning "is promoted to|so you should|abort" "char" } */
+ i = va_arg(v, short); /* { dg-warning "is promoted to|abort" "short" } */
+ i = va_arg(v, float); /* { dg-warning "is promoted to|abort" "float" } */
}
diff --git a/gcc/testsuite/gcc.dg/vect/pr16105.c b/gcc/testsuite/gcc.dg/vect/pr16105.c
index 38295815b44..f8822ef5189 100644
--- a/gcc/testsuite/gcc.dg/vect/pr16105.c
+++ b/gcc/testsuite/gcc.dg/vect/pr16105.c
@@ -1,5 +1,8 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_float } */
+/* { dg-do compile { target powerpc*-*-* i?86-*-* } } */
+/* { dg-do compile { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#define VECTOR_SIZE 512
typedef float afloat __attribute__ ((__aligned__(16)));
diff --git a/gcc/testsuite/gcc.dg/vect/tree-vect.h b/gcc/testsuite/gcc.dg/vect/tree-vect.h
index a2195a8a227..c282e38cb9a 100644
--- a/gcc/testsuite/gcc.dg/vect/tree-vect.h
+++ b/gcc/testsuite/gcc.dg/vect/tree-vect.h
@@ -13,14 +13,12 @@ sig_ill_handler (int sig)
void check_vect (void)
{
signal(SIGILL, sig_ill_handler);
-#if defined(__ppc__) || defined(__ppc64__) || defined(__powerpc__) || defined(powerpc)
+#if defined(__ppc__) || defined(__ppc64__)
/* Altivec instruction, 'vor %v0,%v0,%v0'. */
asm volatile (".long 0x10000484");
#elif defined(__i386__) || defined(__x86_64__)
/* SSE2 instruction: movsd %xmm0,%xmm0 */
asm volatile (".byte 0xf2,0x0f,0x10,0xc0");
-#elif defined(__sparc__)
- asm volatile (".word\t0x81b007c0");
#endif
signal (SIGILL, SIG_DFL);
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-1.c b/gcc/testsuite/gcc.dg/vect/vect-1.c
index 3e9449e92e0..fc6d7ef0e94 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-1.c
@@ -1,6 +1,6 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_int } */
-/* { dg-require-effective-target vect_float } */
+/* { dg-do compile { target powerpc*-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#define N 16
@@ -29,7 +29,7 @@ foo (int n)
char image[N][N];
char block[N][N];
- /* Not vectorizable yet (cross-iteration cycle). */
+ /* Not vetorizable yet (cross-iteration cycle). */
diff = 0;
for (i = 0; i < N; i++) {
diff += (cb[i] - cc[i]);
@@ -37,7 +37,7 @@ foo (int n)
ibar (&diff);
- /* Not vectorizable yet (outer-loop: not attempted.
+ /* Not vetorizable yet (outer-loop: not attempted.
inner-loop: cross iteration cycle; multi-dimensional arrays). */
diff = 0;
for (i = 0; i < N; i++) {
@@ -62,7 +62,7 @@ foo (int n)
fbar (a);
- /* Not vectorizable yet (access pattern). */
+ /* Not vetorizable yet (access pattern). */
for (i = 0; i < N/2; i++){
a[i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i];
d[i] = b[2*i] * c[2*i+1] + b[2*i+1] * c[2*i];
@@ -99,4 +99,3 @@ foo (int n)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-10.c b/gcc/testsuite/gcc.dg/vect/vect-10.c
index ea27b1b7659..b14f8eaa11e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-10.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-10.c
@@ -1,5 +1,6 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_int } */
+/* { dg-do compile { target powerpc*-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#define N 16
@@ -13,7 +14,7 @@ int foo ()
short c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
- /* Not vectorizable yet (strided access pattern). */
+ /* Not vetorizable yet (strided access pattern). */
for (i = 0; i < N/2; i++)
{
a[i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i];
diff --git a/gcc/testsuite/gcc.dg/vect/vect-11.c b/gcc/testsuite/gcc.dg/vect/vect-11.c
index 1ad27604627..cfcc642f913 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-11.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-11.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -12,7 +15,7 @@ int main1 ()
int ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
- /* Not vectorizable yet (integer mult). */
+ /* Not vetorizable yet (integer mult). */
for (i = 0; i < N; i++)
{
ia[i] = ib[i] * ic[i];
diff --git a/gcc/testsuite/gcc.dg/vect/vect-12.c b/gcc/testsuite/gcc.dg/vect/vect-12.c
index 359dc4f416c..902a18a250b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-12.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-12.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -15,7 +18,7 @@ int main1 ()
short sc[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
short sb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
- /* Not vectorizable yet (multiple types with different nunits in vector). */
+ /* Not vetorizable yet (multiple types with different nunits in vector). */
for (i = 0; i < N; i++)
{
ia[i] = ib[i] + ic[i];
diff --git a/gcc/testsuite/gcc.dg/vect/vect-13.c b/gcc/testsuite/gcc.dg/vect/vect-13.c
index ad21072ce03..052abe12d18 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-13.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-13.c
@@ -1,4 +1,6 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -36,5 +38,4 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_max } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-14.c b/gcc/testsuite/gcc.dg/vect/vect-14.c
index 26a834b33dd..f6207c85c1c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-14.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-14.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -11,7 +14,7 @@ int main1 ()
int ia[N];
- /* Not vectorizable yet (induction). */
+ /* Not vetorizable yet (induction). */
for ( i = 0; i < N; i++) {
ia[i] = i;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-15.c b/gcc/testsuite/gcc.dg/vect/vect-15.c
index aa521d36d81..96c173dab16 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-15.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-15.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -11,7 +14,7 @@ int main1 ()
int a[N];
int b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
- /* Not vectorizable yet (reverse access and forward access). */
+ /* Not vetorizable yet (reverse access and forward access). */
for (i = N; i > 0; i--)
{
a[N-i] = b[i-1];
diff --git a/gcc/testsuite/gcc.dg/vect/vect-16.c b/gcc/testsuite/gcc.dg/vect/vect-16.c
index f6f134ed4d6..3bbfbe7b8bc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-16.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -13,7 +18,7 @@ int main1 ()
float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
float diff;
- /* Not vectorizable yet (reduction). */
+ /* Not vetorizable yet (reduction). */
diff = 0;
for (i = 0; i < N; i++) {
diff += (b[i] - c[i]);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-17.c b/gcc/testsuite/gcc.dg/vect/vect-17.c
index 20345992fc3..bae19e0ad2c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-17.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-17.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -124,5 +127,4 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-*} } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-18.c b/gcc/testsuite/gcc.dg/vect/vect-18.c
index c2c1ad6bf93..88b0fc020c2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-18.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-18.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -123,5 +126,4 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-*} } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-19.c b/gcc/testsuite/gcc.dg/vect/vect-19.c
index 27f168e7a56..dbfc2722488 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-19.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-19.c
@@ -1,5 +1,8 @@
-/* { dg-require-effective-target vect_int } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -123,5 +126,4 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-*} } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-2.c b/gcc/testsuite/gcc.dg/vect/vect-2.c
index 4a21f03d65a..aa862c111f6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-2.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -34,4 +37,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-20.c b/gcc/testsuite/gcc.dg/vect/vect-20.c
index 04b3cdf02db..c5f4cef00dc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-20.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-20.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -19,9 +22,28 @@ main1 ()
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0};
+ int ic[N] =
+ {1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0};
- signed char ca[N];
- signed char cb[N] =
+ char ca[N];
+ char cb[N] =
+ {1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0};
+
+ char cc[N] =
{1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0,
@@ -42,6 +64,15 @@ main1 ()
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0};
+ short sc[N] =
+ {1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0};
/* Check ints. */
@@ -95,5 +126,4 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-*} } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-21.c b/gcc/testsuite/gcc.dg/vect/vect-21.c
index a24749820fc..fbe8e6a6ab7 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-21.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-21.c
@@ -1,5 +1,8 @@
-/* { dg-require-effective-target vect_int } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -124,5 +127,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-22.c b/gcc/testsuite/gcc.dg/vect/vect-22.c
index 42e3b974d19..0538515eb7d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-22.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-22.c
@@ -1,5 +1,8 @@
-/* { dg-require-effective-target vect_int } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -19,9 +22,28 @@ main1 ()
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0};
+ int ic[N] =
+ {1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0};
- signed char ca[N];
- signed char cb[N] =
+ char ca[N];
+ char cb[N] =
+ {1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0};
+
+ char cc[N] =
{1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0,
@@ -42,6 +64,16 @@ main1 ()
1,1,0,0,1,0,1,0,
1,1,0,0,1,0,1,0};
+ short sc[N] =
+ {1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0,
+ 1,1,0,0,1,0,1,0};
+
/* Check ints. */
for (i = 0; i < N; i++)
@@ -95,5 +127,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-23.c b/gcc/testsuite/gcc.dg/vect/vect-23.c
index 97c44748285..801c0c88e72 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-23.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-23.c
@@ -1,5 +1,8 @@
-/* { dg-require-effective-target vect_int } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -124,5 +127,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-24.c b/gcc/testsuite/gcc.dg/vect/vect-24.c
index 273bb039dc0..db71cb47479 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-24.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-24.c
@@ -1,5 +1,8 @@
-/* { dg-require-effective-target vect_int } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -124,5 +127,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-25.c b/gcc/testsuite/gcc.dg/vect/vect-25.c
index 8edc5fc19b1..36db45d084e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-25.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-25.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -50,4 +53,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-26.c b/gcc/testsuite/gcc.dg/vect/vect-26.c
index a34449bc30f..cebfc5a24f5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-26.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-26.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -35,6 +38,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-27.c b/gcc/testsuite/gcc.dg/vect/vect-27.c
index 4652fdf4777..d2e8c944559 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-27.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-27.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -40,6 +43,5 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-27a.c b/gcc/testsuite/gcc.dg/vect/vect-27a.c
new file mode 100644
index 00000000000..cede285b835
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-27a.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-28.c b/gcc/testsuite/gcc.dg/vect/vect-28.c
index 42118d4ea9c..26ebfc1a6e5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-28.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-28.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -38,6 +41,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-29.c b/gcc/testsuite/gcc.dg/vect/vect-29.c
index 818e2c831ea..c0383c7c8a6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-29.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-29.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -43,7 +46,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-29a.c b/gcc/testsuite/gcc.dg/vect/vect-29a.c
new file mode 100644
index 00000000000..cede285b835
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-29a.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-3.c b/gcc/testsuite/gcc.dg/vect/vect-3.c
index 99c1a091442..1f3d0f84ac0 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-3.c
@@ -1,5 +1,7 @@
-/* { dg-require-effective-target vect_int } */
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -46,7 +48,6 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-30.c b/gcc/testsuite/gcc.dg/vect/vect-30.c
index c6f03ed2121..b2c18ef81a3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-30.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-30.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -59,6 +64,4 @@ int main (void)
return 0;
}
-/* Need misalignment support, or cgraph to delay emitting the arrays until
- after vectorization can force-align them. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-31.c b/gcc/testsuite/gcc.dg/vect/vect-31.c
index a27de677b21..b15f1569ef4 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-31.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-31.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -86,5 +89,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-32.c b/gcc/testsuite/gcc.dg/vect/vect-32.c
index 6d4745343ca..bf5af33724e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-32.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-32.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -35,4 +38,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-33.c b/gcc/testsuite/gcc.dg/vect/vect-33.c
index 94625a1f000..8742ef5d243 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-33.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-33.c
@@ -1,5 +1,7 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_int } */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-S -O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-S -O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -37,5 +39,3 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-34.c b/gcc/testsuite/gcc.dg/vect/vect-34.c
index aea0f2d4546..dc77060174f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-34.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-34.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -36,4 +39,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-35.c b/gcc/testsuite/gcc.dg/vect/vect-35.c
index 4aa7693a5da..b29da494942 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-35.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-35.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -45,4 +48,3 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-36.c b/gcc/testsuite/gcc.dg/vect/vect-36.c
index 023af294c13..ce89097bfdc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-36.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-36.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -41,5 +44,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-37.c b/gcc/testsuite/gcc.dg/vect/vect-37.c
index 03937e59861..97f31106602 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-37.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-37.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -56,4 +59,3 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-38.c b/gcc/testsuite/gcc.dg/vect/vect-38.c
index 6c2f80c02b8..df2cf9c2c5d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-38.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-38.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_double } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -35,4 +38,4 @@ int main (void)
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-4.c b/gcc/testsuite/gcc.dg/vect/vect-4.c
index 7d4503a9cd9..36e20ede599 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-4.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -36,4 +41,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-40.c b/gcc/testsuite/gcc.dg/vect/vect-40.c
index fe3dd7773c5..2e5f845579e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-40.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-40.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -50,4 +55,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"} } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-41.c b/gcc/testsuite/gcc.dg/vect/vect-41.c
index 686618c6750..ea0edf35e66 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-41.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-41.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -51,4 +56,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-42.c b/gcc/testsuite/gcc.dg/vect/vect-42.c
index a29f26718f9..efd5f9bff39 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-42.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-42.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -53,4 +58,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"} } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-43.c b/gcc/testsuite/gcc.dg/vect/vect-43.c
index 317d9ada90c..f39433b7a0c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-43.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-43.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -54,4 +59,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-44.c b/gcc/testsuite/gcc.dg/vect/vect-44.c
index f23fbad0a90..0dcfd7cf8a3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-44.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-44.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -54,6 +59,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-45.c b/gcc/testsuite/gcc.dg/vect/vect-45.c
index b970a8622d8..e53f5726a20 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-45.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-45.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-46.c b/gcc/testsuite/gcc.dg/vect/vect-46.c
index 8a59b583a60..d28c0151ce9 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-46.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-46.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -50,5 +55,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-47.c b/gcc/testsuite/gcc.dg/vect/vect-47.c
index 73253ecb468..ac9d219efca 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-47.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-47.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -52,4 +57,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-48.c b/gcc/testsuite/gcc.dg/vect/vect-48.c
index 106a57342e6..be00088d291 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-48.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-48.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -52,6 +57,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-48a.c b/gcc/testsuite/gcc.dg/vect/vect-48a.c
new file mode 100644
index 00000000000..cede285b835
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-48a.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-49.c b/gcc/testsuite/gcc.dg/vect/vect-49.c
index c933070c3e8..ef8049f2ebf 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-49.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-49.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-5.c b/gcc/testsuite/gcc.dg/vect/vect-5.c
index 09cf0b9fa37..b0407ec7f4a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-5.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-5.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -52,4 +57,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-50.c b/gcc/testsuite/gcc.dg/vect/vect-50.c
index 1245a77ad7f..4f8c6cbf8f3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-50.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-50.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -49,6 +54,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-51.c b/gcc/testsuite/gcc.dg/vect/vect-51.c
index 1a3befd7989..07f632ebd87 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-51.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-51.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-52.c b/gcc/testsuite/gcc.dg/vect/vect-52.c
index 24228cd799b..a2c8e6c4aac 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-52.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-52.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
@@ -51,6 +56,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-53.c b/gcc/testsuite/gcc.dg/vect/vect-53.c
index 49aba7d2bcc..89bdd6e6d59 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-53.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-53.c
@@ -1,5 +1,10 @@
-/* { dg-require-effective-target vect_float } */
-
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
+
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-54.c b/gcc/testsuite/gcc.dg/vect/vect-54.c
index b169bb33452..712b77c0a67 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-54.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-54.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -50,6 +55,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-55.c b/gcc/testsuite/gcc.dg/vect/vect-55.c
index 016ff4d5918..b799e28df17 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-55.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-55.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-56.c b/gcc/testsuite/gcc.dg/vect/vect-56.c
index 90570167e06..725dc123a24 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-56.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-56.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -50,6 +55,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-56a.c b/gcc/testsuite/gcc.dg/vect/vect-56a.c
new file mode 100644
index 00000000000..cede285b835
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-56a.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-57.c b/gcc/testsuite/gcc.dg/vect/vect-57.c
index 8f970c4e1f7..87862d03dd0 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-57.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-57.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-58.c b/gcc/testsuite/gcc.dg/vect/vect-58.c
index df814d9452d..8809bd7d18b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-58.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-58.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -51,6 +56,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-59.c b/gcc/testsuite/gcc.dg/vect/vect-59.c
index 29d7e2cf1c4..0b5a00d3993 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-59.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-59.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-6.c b/gcc/testsuite/gcc.dg/vect/vect-6.c
index 514e8753aa1..2c7d084d372 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-6.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -53,6 +58,5 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-60.c b/gcc/testsuite/gcc.dg/vect/vect-60.c
index 26a3627cf44..37f3d0e9982 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-60.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-60.c
@@ -1,4 +1,10 @@
-/* { dg-require-effective-target vect_float } */
+
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -51,6 +57,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-61.c b/gcc/testsuite/gcc.dg/vect/vect-61.c
index cf25daee660..6df22a61c40 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-61.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-61.c
@@ -1,5 +1,7 @@
-/* { dg-require-effective-target vect_int } */
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-62.c b/gcc/testsuite/gcc.dg/vect/vect-62.c
index cdc28da544c..28154c1f2c3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-62.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-62.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -63,4 +66,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-63.c b/gcc/testsuite/gcc.dg/vect/vect-63.c
index aa80680dc9c..b68a0597930 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-63.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-63.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-64.c b/gcc/testsuite/gcc.dg/vect/vect-64.c
index bf84ac86434..67a659cfec5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-64.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-64.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -13,7 +16,7 @@ int main1 ()
int ic[N][N][3][13];
int id[N][N][N];
- /* Multidimensional array. Not aligned: vectorizable. */
+ /* Multidimensional array. Not aligned: not vectorizable. */
for (i = 0; i < N; i++)
{
for (j = 0; j < N; j++)
@@ -31,7 +34,7 @@ int main1 ()
}
}
- /* Multidimensional array. Not aligned: vectorizable. */
+ /* Multidimensional array. Not aligned: not vectorizable. */
for (i = 0; i < N; i++)
{
for (j = 0; j < N; j++)
@@ -81,5 +84,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-65.c b/gcc/testsuite/gcc.dg/vect/vect-65.c
index 0c12d1b9ea5..0ec838d309b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-65.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-65.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -79,4 +82,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-66.c b/gcc/testsuite/gcc.dg/vect/vect-66.c
index e363ac349a4..593a12bbd59 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-66.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-66.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -52,7 +55,7 @@ int main1 ()
{
for (j = 0; j < 4; j++)
{
- ic[2][1][6][j+1] = 5;
+ ic[2][1][6][j] = 5;
}
}
@@ -61,7 +64,7 @@ int main1 ()
{
for (j = 0; j < 4; j++)
{
- if (ic[2][1][6][j+1] != 5)
+ if (ic[2][1][6][j] != 5)
abort();
}
}
@@ -77,5 +80,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-67.c b/gcc/testsuite/gcc.dg/vect/vect-67.c
index 7b54a95b01b..ade2ace6e02 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-67.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-67.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -42,4 +45,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-68.c b/gcc/testsuite/gcc.dg/vect/vect-68.c
index 4dfaad31ee7..0237e2b78c2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-68.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-68.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -85,5 +88,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-69.c b/gcc/testsuite/gcc.dg/vect/vect-69.c
index ed213741cd9..753371fd563 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-69.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-69.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -112,5 +115,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-7.c b/gcc/testsuite/gcc.dg/vect/vect-7.c
index e92cea42ad0..ca4e9c2b423 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-7.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-7.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -45,6 +48,4 @@ int main (void)
return main1 ();
}
-/* Fails for targets that don't vectorize PLUS. */
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail alpha*-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-72.c b/gcc/testsuite/gcc.dg/vect/vect-72.c
index 8d9266ef7df..1a2ad070963 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-72.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-72.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -40,7 +43,5 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-72a.c b/gcc/testsuite/gcc.dg/vect/vect-72a.c
new file mode 100644
index 00000000000..cede285b835
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-72a.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-73.c b/gcc/testsuite/gcc.dg/vect/vect-73.c
index a0639fd669a..4df315d1f0d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-73.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-73.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -37,4 +40,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-74.c b/gcc/testsuite/gcc.dg/vect/vect-74.c
index 0c08f0aebc9..593ba64b922 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-74.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-74.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -41,4 +46,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-75.c b/gcc/testsuite/gcc.dg/vect/vect-75.c
index 6ddbfdaf65e..f5fee582d2d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-75.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-75.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -41,5 +44,4 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-76.c b/gcc/testsuite/gcc.dg/vect/vect-76.c
index 999fcb60312..17d6ff7b52f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-76.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-76.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -68,5 +71,4 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77.c b/gcc/testsuite/gcc.dg/vect/vect-77.c
index 43a6999a148..9f5697d6035 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-77.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-77.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -39,6 +42,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77a.c b/gcc/testsuite/gcc.dg/vect/vect-77a.c
new file mode 100644
index 00000000000..8dea9de9ebb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-77a.c
@@ -0,0 +1,5 @@
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-78.c b/gcc/testsuite/gcc.dg/vect/vect-78.c
index d44c4979205..75ad3c29843 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-78.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-78.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -40,6 +43,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { lp64 || vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-79.c b/gcc/testsuite/gcc.dg/vect/vect-79.c
index aae9caff094..a350a2fb82c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-79.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-79.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-8.c b/gcc/testsuite/gcc.dg/vect/vect-8.c
index 7712a02cfab..d3513f76ba8 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-8.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-8.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -34,6 +39,4 @@ int main (void)
return main1 (N);
}
-/* Need misalignment support, or cgraph to delay emitting the arrays until
- after vectorization can force-align them. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-80.c b/gcc/testsuite/gcc.dg/vect/vect-80.c
index 112e892f531..fd32ee82029 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-80.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-80.c
@@ -1,4 +1,9 @@
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target mipsisa64*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -mpaired-single" { target mipsisa64*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -42,6 +47,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-82.c b/gcc/testsuite/gcc.dg/vect/vect-82.c
index 0328c16004c..133005c4f26 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-82.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-82.c
@@ -1,4 +1,5 @@
/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-82_64.c b/gcc/testsuite/gcc.dg/vect/vect-82_64.c
index beb15856030..088e5d896de 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-82_64.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-82_64.c
@@ -1,5 +1,5 @@
/* { dg-do run { target powerpc*-*-* } } */
-/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" } */
+/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-83.c b/gcc/testsuite/gcc.dg/vect/vect-83.c
index ce12629538a..0b65f766072 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-83.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-83.c
@@ -1,4 +1,5 @@
/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-83_64.c b/gcc/testsuite/gcc.dg/vect/vect-83_64.c
index 776adade061..f74d6992cf3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-83_64.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-83_64.c
@@ -1,5 +1,5 @@
/* { dg-do run { target powerpc*-*-* } } */
-/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" } */
+/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-9.c b/gcc/testsuite/gcc.dg/vect/vect-9.c
index 98b9451845c..0501bb8eadd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-9.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-9.c
@@ -1,4 +1,7 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-all.c b/gcc/testsuite/gcc.dg/vect/vect-all.c
index 343864cbdf1..bfdbcd6360f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-all.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-all.c
@@ -1,5 +1,7 @@
-/* { dg-require-effective-target vect_int } */
-/* { dg-require-effective-target vect_float } */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -213,5 +215,3 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 10 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-none.c b/gcc/testsuite/gcc.dg/vect/vect-none.c
index f5303b93e18..a9d44759d1d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-none.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-none.c
@@ -1,6 +1,6 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_int } */
-/* { dg-require-effective-target vect_float } */
+/* { dg-do compile { target powerpc*-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */
#define N 16
@@ -89,7 +89,15 @@ foo (int n)
char block[N][N];
- /* Test 1 - type cast. */
+ /* Test 1 - unknown loop bound. */
+ for (i = 0; i < n; i++)
+ {
+ a[i] = b[i];
+ }
+ fbar (a);
+
+
+ /* Test 2 - type cast. */
for (i = 0; i < N; i++)
{
ia[i] = (int) sb[i];
@@ -97,7 +105,7 @@ foo (int n)
fbar (a);
- /* Test 2 - strided access pattern. */
+ /* Test 3 - strided access pattern. */
for (i = 0; i < N/2; i++)
{
a[i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i];
@@ -106,7 +114,7 @@ foo (int n)
fbar (a);
- /* Test 3 - no target support for integer mult. */
+ /* Test 4 - no target support for integer mult. */
for (i = 0; i < N; i++)
{
ia[i] = ib[i] * ic[i];
@@ -114,7 +122,7 @@ foo (int n)
ibar (ia);
- /* Test 4 - two types with different nunits in vector. */
+ /* Test 5 - two types with different nunits in vector. */
for (i = 0; i < N; i++)
{
ia[i] = ib[i] + ic[i];
@@ -124,7 +132,7 @@ foo (int n)
sbar (sa);
- /* Test 5 - too conservative dependence test. */
+ /* Test 6 - too conservative dependence test. */
for (i = 0; i < N; i++){
a[i] = b[i] + c[i];
a[i+1] = b[i] + c[i];
@@ -132,14 +140,14 @@ foo (int n)
fbar (a);
- /* Test 6 - condition in loop. */
+ /* Test 7 - condition in loop. */
for (i = 0; i < N; i++){
a[i] = (b[i] > 0 ? b[i] : 0);
}
fbar (a);
- /* Test 7 - cross-iteration cycle. */
+ /* Test 8 - cross-iteration cycle. */
diff = 0;
for (i = 0; i < N; i++) {
diff += (cb[i] - cc[i]);
@@ -147,7 +155,7 @@ foo (int n)
ibar (&diff);
- /* Test 8 - outer-loop not attempted; inner-loop has cross
+ /* Test 9 - outer-loop not attempted; inner-loop has cross
iteration cycle and multi-dimensional arrays. */
diff = 0;
for (i = 0; i < N; i++) {
@@ -158,14 +166,14 @@ foo (int n)
ibar (&diff);
- /* Test 9 - induction. */
+ /* Test 10 - induction. */
for ( i = 0; i < N; i++) {
a[i] = i;
}
fbar (a);
- /* Test 10 - reverse access and forward access. */
+ /* Test 11 - reverse access and forward access. */
for (i = N; i > 0; i--)
{
a[N-i] = b[i-1];
@@ -181,4 +189,5 @@ foo (int n)
}
/* { dg-final { scan-tree-dump-times "vectorized " 3 "vect"} } */
-/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 3 "vect"} } */
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect"} } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp
index 3f52ed68e19..ee8394880ba 100644
--- a/gcc/testsuite/gcc.dg/vect/vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/vect.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1997 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,68 +19,17 @@
# Load support procs.
load_lib gcc-dg.exp
-# Set up flags used for tests that don't specify options.
-set DEFAULT_VECTCFLAGS ""
-
-# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" \
- "-ftree-vectorizer-verbose=3" "-fdump-tree-vect-stats"
-
-# If the target system supports vector instructions, the default action
-# for a test is 'run', otherwise it's 'compile'. Save current default.
-# Executing vector instructions on a system without hardware vector support
-# is also disabled by a call to check_vect, but disabling execution here is
-# more efficient.
-global dg-do-what-default
-set save-dg-do-what-default ${dg-do-what-default}
-
-# Skip these tests for targets that do not support generating vector
-# code. Set additional target-dependent vector flags, which can be
-# overridden by using dg-options in individual tests.
-if [istarget "powerpc*-*-*"] {
- # If there are powerpc targets to skip, do it here.
-
- lappend DEFAULT_VECTCFLAGS "-maltivec"
- if [check_vmx_hw_available] {
- set dg-do-what-default run
- } else {
- if [is-effective-target ilp32] {
- # Specify a cpu that supports VMX for compile-only tests.
- lappend DEFAULT_VECTCFLAGS "-mcpu=7400"
- }
- set dg-do-what-default compile
- }
-} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
- lappend DEFAULT_VECTCFLAGS "-msse2"
- set dg-do-what-default run
-} elseif [istarget "mipsisa64*-*-*"] {
- lappend DEFAULT_VECTCFLAGS "-mpaired-single"
- set dg-do-what-default run
-} elseif [istarget "sparc*-*-*"] {
- lappend DEFAULT_VECTCFLAGS "-mcpu=ultrasparc" "-mvis"
- set dg-do-what-default run
-} elseif [istarget "alpha*-*-*"] {
- lappend DEFAULT_VECTCFLAGS "-mmax"
- if [check_alpha_max_hw_available] {
- set dg-do-what-default run
- } else {
- set dg-do-what-default compile
- }
-} elseif [istarget "ia64-*-*"] {
- set dg-do-what-default run
-} else {
- return
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
}
# Initialize `dg'.
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
- "" $DEFAULT_VECTCFLAGS
-
-# Clean up.
-set dg-do-what-default ${save-dg-do-what-default}
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" $DEFAULT_CFLAGS
# All done.
dg-finish
diff --git a/gcc/testsuite/gcc.dg/visibility-1.c b/gcc/testsuite/gcc.dg/visibility-1.c
index 864b971dd64..f76c3ca9154 100644
--- a/gcc/testsuite/gcc.dg/visibility-1.c
+++ b/gcc/testsuite/gcc.dg/visibility-1.c
@@ -1,7 +1,7 @@
/* Test visibility attribute on function definition. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "foo" } } */
+/* { dg-final { scan-assembler "\\.hidden.*foo" } } */
void
__attribute__((visibility ("hidden")))
diff --git a/gcc/testsuite/gcc.dg/visibility-2.c b/gcc/testsuite/gcc.dg/visibility-2.c
index 0977abac2b8..e62dbbb4cd5 100644
--- a/gcc/testsuite/gcc.dg/visibility-2.c
+++ b/gcc/testsuite/gcc.dg/visibility-2.c
@@ -1,7 +1,7 @@
/* Test that visibility attribute on declaration extends to definition. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "foo" } } */
+/* { dg-final { scan-assembler "\\.hidden.*foo" } } */
void
__attribute__((visibility ("hidden")))
diff --git a/gcc/testsuite/gcc.dg/visibility-3.c b/gcc/testsuite/gcc.dg/visibility-3.c
index cb5a71524f6..e0bf01fb130 100644
--- a/gcc/testsuite/gcc.dg/visibility-3.c
+++ b/gcc/testsuite/gcc.dg/visibility-3.c
@@ -1,7 +1,7 @@
/* Test visibility attribute on forward declaration of global variable */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "xyzzy" } } */
+/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */
int
__attribute__((visibility ("hidden")))
diff --git a/gcc/testsuite/gcc.dg/visibility-4.c b/gcc/testsuite/gcc.dg/visibility-4.c
index af0d461c3d9..1a0b3ca37da 100644
--- a/gcc/testsuite/gcc.dg/visibility-4.c
+++ b/gcc/testsuite/gcc.dg/visibility-4.c
@@ -1,7 +1,7 @@
/* Test visibility attribute on forward declaration of global variable */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "xyzzy" } } */
+/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */
extern int
__attribute__((visibility ("hidden")))
diff --git a/gcc/testsuite/gcc.dg/visibility-5.c b/gcc/testsuite/gcc.dg/visibility-5.c
index 0302768c91b..b1f46d2040a 100644
--- a/gcc/testsuite/gcc.dg/visibility-5.c
+++ b/gcc/testsuite/gcc.dg/visibility-5.c
@@ -2,7 +2,7 @@
already had a forward declaration. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "foo" } } */
+/* { dg-final { scan-assembler "\\.hidden.*foo" } } */
void foo();
diff --git a/gcc/testsuite/gcc.dg/visibility-6.c b/gcc/testsuite/gcc.dg/visibility-6.c
index 4e9deebec37..632f2ac2059 100644
--- a/gcc/testsuite/gcc.dg/visibility-6.c
+++ b/gcc/testsuite/gcc.dg/visibility-6.c
@@ -2,7 +2,7 @@
already had a forward declaration. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "xyzzy" } } */
+/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */
extern int xyzzy;
diff --git a/gcc/testsuite/gcc.dg/visibility-7.c b/gcc/testsuite/gcc.dg/visibility-7.c
index f5e6e9aae5c..5bdc2b02808 100644
--- a/gcc/testsuite/gcc.dg/visibility-7.c
+++ b/gcc/testsuite/gcc.dg/visibility-7.c
@@ -1,7 +1,7 @@
/* Test warning from conflicting visibility specifications. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "xyzzy" } } */
+/* { dg-final { scan-assembler "\\.hidden.*xyzzy" } } */
extern int
__attribute__((visibility ("hidden")))
diff --git a/gcc/testsuite/gcc.dg/visibility-8.c b/gcc/testsuite/gcc.dg/visibility-8.c
index 89f89c0822b..fc3a1055757 100644
--- a/gcc/testsuite/gcc.dg/visibility-8.c
+++ b/gcc/testsuite/gcc.dg/visibility-8.c
@@ -2,7 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-std=gnu99" } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "__GI_fputs_unlocked" } } */
+/* { dg-final { scan-assembler "\\.hidden.*__GI_fputs_unlocked" } } */
int fputs_unlocked (const char *restrict, int *restrict)
__asm__ ("__GI_fputs_unlocked")
diff --git a/gcc/testsuite/gcc.dg/visibility-9.c b/gcc/testsuite/gcc.dg/visibility-9.c
index 9d575168491..ac6493ef323 100644
--- a/gcc/testsuite/gcc.dg/visibility-9.c
+++ b/gcc/testsuite/gcc.dg/visibility-9.c
@@ -2,7 +2,7 @@
/* { dg-do compile } */
/* { dg-require-visibility "" } */
/* { dg-options "-fvisibility=hidden" } */
-/* { dg-final { scan-hidden "foo" } } */
+/* { dg-final { scan-assembler "\\.hidden.*foo" } } */
void foo();
diff --git a/gcc/testsuite/gcc.dg/visibility-a.c b/gcc/testsuite/gcc.dg/visibility-a.c
index 23a51d7e5a4..17492342f15 100644
--- a/gcc/testsuite/gcc.dg/visibility-a.c
+++ b/gcc/testsuite/gcc.dg/visibility-a.c
@@ -1,7 +1,7 @@
/* Test that #pragma GCC visibility works. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
-/* { dg-final { scan-hidden "foo" } } */
+/* { dg-final { scan-assembler "\\.hidden.*foo" } } */
#pragma GCC visibility push(hidden)
void foo();
diff --git a/gcc/testsuite/gcc.dg/warn-1.c b/gcc/testsuite/gcc.dg/warn-1.c
index 5039abcb8a5..dc2cd0e7c71 100644
--- a/gcc/testsuite/gcc.dg/warn-1.c
+++ b/gcc/testsuite/gcc.dg/warn-1.c
@@ -5,14 +5,12 @@
static void foo (p)
int p;
-{ /* { dg-warning "passing arg of" } */
+{
}
-static void bar (void)
+void bar (void)
{
void *vp;
- foo (vp); /* { dg-warning "" } */
+ foo (vp); /* { dg-warning "passing argument 1 of" } */
}
-
-void (*tourist_guide[]) (void) = { &bar };
diff --git a/gcc/testsuite/gcc.dg/wchar_t-1.c b/gcc/testsuite/gcc.dg/wchar_t-1.c
index 877b50e9871..6d95c69c304 100644
--- a/gcc/testsuite/gcc.dg/wchar_t-1.c
+++ b/gcc/testsuite/gcc.dg/wchar_t-1.c
@@ -5,7 +5,7 @@
match. */
#define _STDDEF_H
-#include <wchar.h> /* { dg-excess-errors "" { xfail *-*-darwin* } } */
+#include <wchar.h>
__WCHAR_TYPE__ __wc_t__;
wchar_t *wc_t_p;
diff --git a/gcc/testsuite/gcc.dg/weak/weak-3.c b/gcc/testsuite/gcc.dg/weak/weak-3.c
index 338d9ad9db4..da4367a7135 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-3.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-3.c
@@ -54,7 +54,7 @@ extern void * ffoo1f (void);
extern void * ffoox1f (void);
void * foo1f (void)
{
- if (ffoo1f)
+ if (ffoo1f) /* { dg-warning "" } */
ffoo1f ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/weak/weak-6.c b/gcc/testsuite/gcc.dg/weak/weak-6.c
index 531c581dc26..711003ccd03 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-6.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-6.c
@@ -3,5 +3,5 @@
extern void * foo (void);
void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */
-
+/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */
#pragma weak foo
diff --git a/gcc/testsuite/gcc.dg/weak/weak-7.c b/gcc/testsuite/gcc.dg/weak/weak-7.c
index bf2bbb95635..7c4a4dc7c25 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-7.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-7.c
@@ -3,5 +3,5 @@
extern void * foo (void);
void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */
-
+/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */
extern void * foo (void) __attribute__((weak));
diff --git a/gcc/testsuite/gcc.dg/wint_t-1.c b/gcc/testsuite/gcc.dg/wint_t-1.c
index b4f4e0a2a5e..3f88dcbeab0 100644
--- a/gcc/testsuite/gcc.dg/wint_t-1.c
+++ b/gcc/testsuite/gcc.dg/wint_t-1.c
@@ -5,7 +5,7 @@
match. */
#define _STDDEF_H
-#include <wchar.h> /* { dg-excess-errors "" { xfail *-*-darwin* } } */
+#include <wchar.h>
__WINT_TYPE__ __wi_t__;
wint_t *wi_t_p;
diff --git a/gcc/testsuite/gcc.dg/wtr-conversion-1.c b/gcc/testsuite/gcc.dg/wtr-conversion-1.c
index 18d26165f2a..15086f245fe 100644
--- a/gcc/testsuite/gcc.dg/wtr-conversion-1.c
+++ b/gcc/testsuite/gcc.dg/wtr-conversion-1.c
@@ -23,8 +23,8 @@ testfunc1 ()
foo_i (cd); /* { dg-warning "as integer rather than complex" "prototype conversion warning" } */
foo_f (i); /* { dg-warning "as floating rather than integer" "prototype conversion warning" } */
- foo_f (f); /* { dg-warning "as `float' rather than `double'" "prototype conversion warning" } */
- foo_f (ld); /* { dg-warning "as `float' rather than `double'" "prototype conversion warning" } */
+ foo_f (f); /* { dg-warning "as 'float' rather than 'double'" "prototype conversion warning" } */
+ foo_f (ld); /* { dg-warning "as 'float' rather than 'double'" "prototype conversion warning" } */
foo_f (cd); /* { dg-warning "as floating rather than complex" "prototype conversion warning" } */
foo_ld (i); /* { dg-warning "as floating rather than integer" "prototype conversion warning" } */
diff --git a/gcc/testsuite/gcc.dg/wtr-static-1.c b/gcc/testsuite/gcc.dg/wtr-static-1.c
index 310c1eab925..42760e8cf6b 100644
--- a/gcc/testsuite/gcc.dg/wtr-static-1.c
+++ b/gcc/testsuite/gcc.dg/wtr-static-1.c
@@ -4,7 +4,7 @@
/* { dg-do compile } */
/* { dg-options "-Wtraditional" } */
-static void testfunc1(void);
+static void testfunc1(void); /* { dg-warning "previous declaration" } */
void testfunc1() {} /* { dg-warning "non-static.*follows static" "non-static follows static" } */
# 11 "sys-header.h" 3
diff --git a/gcc/testsuite/gcc.misc-tests/arm-isr.c b/gcc/testsuite/gcc.misc-tests/arm-isr.c
index f79e241633d..737f9ffb643 100644
--- a/gcc/testsuite/gcc.misc-tests/arm-isr.c
+++ b/gcc/testsuite/gcc.misc-tests/arm-isr.c
@@ -1,3 +1,6 @@
+extern void abort ();
+extern void exit (int);
+
#ifndef __thumb__
/* There used to be a couple of bugs in the ARM's prologue and epilogue
generation for ISR routines. The wrong epilogue instruction would be
diff --git a/gcc/testsuite/gcc.misc-tests/bprob-1.c b/gcc/testsuite/gcc.misc-tests/bprob-1.c
index 94202504fb5..8c6018c566d 100644
--- a/gcc/testsuite/gcc.misc-tests/bprob-1.c
+++ b/gcc/testsuite/gcc.misc-tests/bprob-1.c
@@ -4,6 +4,8 @@
This test is the same as gcov-4.c. The "count" comments are left in to
make comparisons easier; they are ignored for this test. */
+extern void abort (void);
+
int do_something (int i)
{
return i;
diff --git a/gcc/testsuite/gcc.misc-tests/bprob-2.c b/gcc/testsuite/gcc.misc-tests/bprob-2.c
index 4615b34f4ff..e0931f39c46 100644
--- a/gcc/testsuite/gcc.misc-tests/bprob-2.c
+++ b/gcc/testsuite/gcc.misc-tests/bprob-2.c
@@ -3,6 +3,9 @@
This is the same as test gcc.c-torture/execute/980526-1.c and
gcc.misc-tests/gcov-3.c */
+extern void abort (void);
+extern void exit (int);
+
int expect_do1 = 1, expect_do2 = 2;
static int doit(int x){
diff --git a/gcc/testsuite/gcc.misc-tests/bprob.exp b/gcc/testsuite/gcc.misc-tests/bprob.exp
index c0035f0a47e..554bf76dde9 100644
--- a/gcc/testsuite/gcc.misc-tests/bprob.exp
+++ b/gcc/testsuite/gcc.misc-tests/bprob.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,18 +17,16 @@
# Test the functionality of programs compiled with profile-directed block
# ordering using -fprofile-arcs followed by -fbranch-probabilities.
+load_lib target-supports.exp
+
# Some targets don't have any implementation of __bb_init_func or are
# missing other needed machinery.
-if { [istarget mmix-*-*]
- || [istarget cris-*-*]
- || [istarget h8300-*-*] } {
+if { ![check_profiling_available "-fprofile-arcs"] } {
return
}
# The procedures in profopt.exp need these parameters.
set tool gcc
-set profile_option -fprofile-arcs
-set feedback_option -fbranch-probabilities
set prof_ext gcda
set perf_ext tim
@@ -49,11 +47,19 @@ if $tracelevel then {
# Load support procs.
load_lib profopt.exp
-foreach src [lsort [glob -nocomplain $srcdir/$subdir/bprob-*.c]] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $src] then {
- continue
- }
+set profile_options "-fprofile-arcs"
+set feedback_options "-fbranch-probabilities"
+if {[check_profiling_available "-ftree-based-profiling"]} {
+ lappend profile_options "-ftree-based-profiling -fprofile-arcs"
+ lappend feedback_options "-ftree-based-profiling -fbranch-probabilities"
+}
- profopt-execute $src
+foreach profile_option $profile_options feedback_option $feedback_options {
+ foreach src [lsort [glob -nocomplain $srcdir/$subdir/bprob-*.c]] {
+ # If we're only testing specific files and this isn't one of them, skip it.
+ if ![runtest_file_p $runtests $src] then {
+ continue
+ }
+ profopt-execute $src
+ }
}
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-3.c b/gcc/testsuite/gcc.misc-tests/gcov-3.c
index 36fe64f802b..fcccdeeff41 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-3.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-3.c
@@ -4,6 +4,9 @@
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
/* { dg-do run { target native } } */
+extern void abort (void);
+extern void exit (int);
+
int expect_do1 = 1, expect_do2 = 2;
static int doit(int x){
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4.c b/gcc/testsuite/gcc.misc-tests/gcov-4.c
index 27ef508cfe6..9d8ab1c1097 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-4.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-4.c
@@ -4,6 +4,8 @@
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
/* { dg-do run { target native } } */
+extern void abort (void);
+
int do_something (int i)
{
return i;
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4b.c b/gcc/testsuite/gcc.misc-tests/gcov-4b.c
index 139f10d86c9..7653c5897ad 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-4b.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-4b.c
@@ -4,6 +4,8 @@
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
/* { dg-do run { target native } } */
+extern void abort (void);
+
int do_something (int i)
{
return i;
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-6.c b/gcc/testsuite/gcc.misc-tests/gcov-6.c
index 90273d56396..aefab3ed33a 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-6.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-6.c
@@ -6,6 +6,8 @@
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
/* { dg-do run { target native } } */
+extern void exit (int);
+
int val;
void
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-7.c b/gcc/testsuite/gcc.misc-tests/gcov-7.c
index 700cec6f533..2e0f6e8b03c 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-7.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-7.c
@@ -6,6 +6,9 @@
#include <setjmp.h>
+extern void abort (void);
+extern void exit (int);
+
jmp_buf env;
int val;
int longjmp_taken;
diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c
index 5774963d04f..a44c6076481 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c
+++ b/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c
@@ -3,6 +3,8 @@
/* { dg-do compile { target i?86-*-* } } */
+extern void exit (int);
+
char *msg = "howdy there";
void foo (char *p)
diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c
index 301e8b7ed9f..09a67d83426 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c
+++ b/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c
@@ -4,6 +4,8 @@
/* { dg-do compile { target i?86-*-* } } */
+extern void exit (int);
+
char *msg = "howdy there";
void foo (char *p)
diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c
index bdd236ade88..0ad3220e856 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c
+++ b/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c
@@ -3,6 +3,8 @@
/* { dg-do compile { target i?86-*-* } } */
+extern void exit (int);
+
char *msg = "howdy there";
void foo (char *p)
diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c
index 783fc822dae..15275775caa 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c
+++ b/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c
@@ -3,6 +3,8 @@
/* { dg-do compile { target i?86-*-* } } */
+extern void exit (int);
+
char *msg = "howdy there";
void foo (char *p)
diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
index 2290478902d..25a752a6b2c 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
+++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,16 +46,27 @@ set PREFETCH_NONE [list \
# instructions as nops.
set PREFETCH_SSE [list \
- { -march=i386 -mtune=pentium3 } \
- { -march=i386 -mtune=pentium4 } \
- { -march=i386 -mtune=athlon } \
- { -march=i386 -mtune=athlon-4 } \
+ { -march=i686 -mtune=pentium3 } \
+ { -march=i686 -mtune=pentium3m } \
+ { -march=i686 -mtune=pentium-m } \
+ { -march=i686 -mtune=pentium4 } \
+ { -march=i686 -mtune=pentium4m } \
+ { -march=i686 -mtune=prescott } \
+ { -march=i686 -mtune=athlon } \
+ { -march=i686 -mtune=athlon-4 } \
+ { -march=i686 -mtune=c3-2 } \
{ -march=pentium3 } \
- { -march=pentium4 } ]
+ { -march=pentium3m } \
+ { -march=pentium-m } \
+ { -march=pentium4 } \
+ { -march=pentium4m } \
+ { -march=prescott } \
+ { -march=c3-2 } ]
# Generate 3DNow! prefetch instructions for the following.
set PREFETCH_3DNOW [list \
+ { -march=c3 } \
{ -march=k6-2 } \
{ -march=k6-3 } ]
diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp
index 7aa99667566..9c8936db05a 100644
--- a/gcc/testsuite/gcc.misc-tests/linkage.exp
+++ b/gcc/testsuite/gcc.misc-tests/linkage.exp
@@ -53,6 +53,11 @@ if [isnative] then {
if [ string match "*32-bit*" $file_string ] {
set native_cflags "-m31"
}
+ } elseif [istarget "x86_64-*-linux*"] {
+ set file_string [exec file "linkage-x.o"]
+ if [ string match "*32-bit*" $file_string ] {
+ set native_cflags "-m32"
+ }
} elseif [istarget "*-hp-hpux*"] {
set file_string [exec file "linkage-x.o"]
if [ string match "*ELF-64*" $file_string ] {
diff --git a/gcc/testsuite/gfortran.dg/data_char_1.f90 b/gcc/testsuite/gfortran.dg/data_char_1.f90
index cce31af6c4a..a2acf1ed165 100644
--- a/gcc/testsuite/gfortran.dg/data_char_1.f90
+++ b/gcc/testsuite/gfortran.dg/data_char_1.f90
@@ -1,4 +1,3 @@
-! { dg-do run }
! Test character variables in data statements
! Also substrings of cahracter variables.
! PR14976 PR16228
@@ -9,5 +8,5 @@ program data_char_1
data b(:)(1:4), b(1)(5:5), b(2)(5:5) /'abcdefg', 'hi', 'j', 'k'/
if ((a(1) .ne. 'Hello') .or. (a(2) .ne. 'orld ')) call abort
- if ((b(1) .ne. 'abcdj') .or. (b(2) .ne. 'hi k')) call abort
+ if ((b(1) .ne. 'adcdl') .or. (b(2) .ne. 'hi l')) call abort
end program
diff --git a/gcc/testsuite/gfortran.dg/direct_io_1.f90 b/gcc/testsuite/gfortran.dg/direct_io_1.f90
index 92eff2942b4..db79c6e9598 100644
--- a/gcc/testsuite/gfortran.dg/direct_io_1.f90
+++ b/gcc/testsuite/gfortran.dg/direct_io_1.f90
@@ -1,4 +1,3 @@
-! { dg-do run }
! PR 16908
! Segfaulted on second set of writes. We weren't handling partial records
! properly when calculating the file position.
diff --git a/gcc/testsuite/gfortran.dg/entry_1.f90 b/gcc/testsuite/gfortran.dg/entry_1.f90
index dae868ec851..0e7f296ce1b 100644
--- a/gcc/testsuite/gfortran.dg/entry_1.f90
+++ b/gcc/testsuite/gfortran.dg/entry_1.f90
@@ -1,4 +1,3 @@
-! { dg-do run }
! Test alternate entry points in a module procedure
! Also check that references to sibling entry points are resolved correctly.
module m
@@ -12,7 +11,7 @@ end subroutine
subroutine test1
implicit none
- call indirecta (foo)
+ call indidecta (foo)
call indirectb (bar)
end subroutine
diff --git a/gcc/testsuite/gfortran.dg/g77/20030326-1.f b/gcc/testsuite/gfortran.dg/g77/20030326-1.f
index 2f44a405872..219cffa8bde 100644
--- a/gcc/testsuite/gfortran.dg/g77/20030326-1.f
+++ b/gcc/testsuite/gfortran.dg/g77/20030326-1.f
@@ -4,7 +4,7 @@ C larson@w6yx.stanford.edu
C
integer a, b, c
- c = -2147483648 / -1 ! { dg-warning "outside symmetric range" "" }
+ c = -2147483648 / -1 ! { dg-bogus "Arithmetic overflow" "Arithmetic overflow" { xfail *-*-* } } PR 16512
a = 1
b = 0
diff --git a/gcc/testsuite/gfortran.dg/g77/README b/gcc/testsuite/gfortran.dg/g77/README
index 1a60f47b443..4e143e44cf4 100755
--- a/gcc/testsuite/gfortran.dg/g77/README
+++ b/gcc/testsuite/gfortran.dg/g77/README
@@ -90,7 +90,7 @@ Directory g77.f-torture/compile
20010519-1.f Y Add dg-warnings for ASSIGN
20020307-1.f Y
20030115-1.f Y Add dg-warnings for ASSIGN
-20030326-1.f Y
+20030326-1.f Y XFAIL PR 16512
8485.f Y
960317-1.f Y
970125-0.f Y Add dg-excess-errors. Investigate.later.
diff --git a/gcc/testsuite/gfortran.dg/g77/select_no_compile.f b/gcc/testsuite/gfortran.dg/g77/select_no_compile.f
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/g77/select_no_compile.f
diff --git a/gcc/testsuite/gfortran.dg/getenv_1.f90 b/gcc/testsuite/gfortran.dg/getenv_1.f90
index fb0a809e643..8a96bd7f6eb 100644
--- a/gcc/testsuite/gfortran.dg/getenv_1.f90
+++ b/gcc/testsuite/gfortran.dg/getenv_1.f90
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg do-run }
! Test the getenv and get_environment_variable intrinsics.
! Ignore the return value because it's not supported/meaningful on all targets
program getenv_1
diff --git a/gcc/testsuite/gfortran.dg/pr16597.f90 b/gcc/testsuite/gfortran.dg/pr16597.f90
index 071bf86d613..ff1dcb838ae 100644
--- a/gcc/testsuite/gfortran.dg/pr16597.f90
+++ b/gcc/testsuite/gfortran.dg/pr16597.f90
@@ -1,4 +1,3 @@
-! { dg-do run }
! pr 16597
! libgfortran
! reading a direct access record after it was written did
diff --git a/gcc/testsuite/gfortran.dg/pr17143.f90 b/gcc/testsuite/gfortran.dg/pr17143.f90
index 0ebcbdacc37..4be4e2b92b9 100644
--- a/gcc/testsuite/gfortran.dg/pr17143.f90
+++ b/gcc/testsuite/gfortran.dg/pr17143.f90
@@ -1,4 +1,3 @@
-! { dg-do run }
! pr17143
! does not print 2*63 correctly
character*25 l
diff --git a/gcc/testsuite/gfortran.dg/pr17164.f90 b/gcc/testsuite/gfortran.dg/pr17164.f90
index a0dfff9aa00..0cfd9941774 100644
--- a/gcc/testsuite/gfortran.dg/pr17164.f90
+++ b/gcc/testsuite/gfortran.dg/pr17164.f90
@@ -1,4 +1,3 @@
-! { dg-do run }
! pr17164
! index aborts when substring is longer than string
implicit none
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_mod_ulo.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_mod_ulo.f90
index 4fdf42c37d7..7050c2ccd53 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_mod_ulo.f90
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_mod_ulo.f90
@@ -47,19 +47,16 @@ program mod_modulotest
call integertest ((/-8, 5/), (/-3, 2/))
call integertest ((/8, -5/), (/3, -2/))
call integertest ((/-8, -5/), (/-3, -3/))
- call integertest ((/ 2, -1/), (/0, 0/))
call real4test ((/3.0, 2.5/), (/0.5, 0.5/))
call real4test ((/-3.0, 2.5/), (/-0.5, 2.0/))
call real4test ((/3.0, -2.5/), (/0.5, -2.0/))
call real4test ((/-3.0, -2.5/), (/-0.5, -0.5/))
- call real4test ((/ 2.0, -1.0/), (/ 0.0, 0.0 /))
call real8test ((/3.0_8, 2.5_8/), (/0.5_8, 0.5_8/))
call real8test ((/-3.0_8, 2.5_8/), (/-0.5_8, 2.0_8/))
call real8test ((/3.0_8, -2.5_8/), (/0.5_8, -2.0_8/))
call real8test ((/-3.0_8, -2.5_8/), (/-0.5_8, -0.5_8/))
- call real8test ((/ 2.0_8, -1.0_8/), (/ 0.0_8, 0.0_8 /))
! Check large numbers
call real4test ((/2e34, 1.0/), (/0.0, 0.0/))
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/read_eof.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/read_eof.f90
index b4bc8239b23..92e454025b5 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/read_eof.f90
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/read_eof.f90
@@ -1,6 +1,5 @@
! PR 13919, segfault when file is empty
- open(unit=8,status='scratch')
+ open(unit=8,file='/dev/null')
read(8,*,end=1)i
- call abort
1 continue
end
diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp
index 2926d0be680..9bf71d78d26 100644
--- a/gcc/testsuite/lib/compat.exp
+++ b/gcc/testsuite/lib/compat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -49,7 +49,23 @@ if ![info exists COMPAT_OPTIONS] {
set option_list $COMPAT_OPTIONS
+# Subsets of tests can be selectively disabled by members of this list:
+# - ATTRIBUTE: disable all tests using the __attribute__ extension,
+# - COMPLEX_INT: disable all tests using the complex integral types extension,
+# - VA: disable all tests using the variable number of arguments feature,
+# - ZERO_ARRAY: disable all tests using the zero-sized arrays extension.
+# The default skip lists can be overriden by
+# COMPAT_SKIPS="[list {skip_1}...{skip_n}]"
+# where skip_i are skip identifiers. You can put this in the environment
+# before site.exp is written or add it to site.exp directly.
+if ![info exists COMPAT_SKIPS] {
+ set COMPAT_SKIPS [list {}]
+}
+
+set skip_list $COMPAT_SKIPS
+
load_lib dg.exp
+load_lib gcc-dg.exp
#
# compat-obj -- compile to an object file
@@ -59,15 +75,26 @@ load_lib dg.exp
# OPTALL is the list of compiler options to use with all tests
# OPTFILE is the list of compiler options to use with this file
# OPTSTR is the options to print with test messages
+# XFAILDATA is the xfail data to be passed to the compiler
#
-proc compat-obj { source dest optall optfile optstr } {
+proc compat-obj { source dest optall optfile optstr xfaildata } {
global testcase
global tool
+ global compiler_conditional_xfail_data
+ global skip_list
+
+ # Add the skip specifiers.
+ foreach skip $skip_list {
+ if { ![string match $skip ""] } {
+ lappend optall "-DSKIP_$skip"
+ }
+ }
# Set up the options for compiling this file.
set options ""
lappend options "additional_flags=$optfile $optall"
+ set compiler_conditional_xfail_data $xfaildata
set comp_output [${tool}_target_compile "$source" "$dest" object $options]
${tool}_check_compile "$testcase $dest compile" $optstr $dest $comp_output
}
@@ -120,44 +147,78 @@ proc compat-run { testname objlist dest optall optfile optstr } {
}
#
-# compat-flags -- get special tool flags to use for a source file
+# compat-get-options-main -- get target requirements for a test and
+# options for the primary source file and the test as a whole
+#
+# SRC is the full pathname of the primary source file.
+#
+proc compat-get-options-main { src } {
+ # dg-options sets a variable called dg-extra-tool-flags.
+ set dg-extra-tool-flags ""
+
+ # dg-require-* sets dg-do-what.
+ upvar dg-do-what dg-do-what
+
+ set tmp [dg-get-options $src]
+ foreach op $tmp {
+ set cmd [lindex $op 0]
+ if { ![string compare "dg-options" $cmd] \
+ || [string match "dg-require-*" $cmd] } {
+ set status [catch "$op" errmsg]
+ if { $status != 0 } {
+ perror "src: $errmsg for \"$op\"\n"
+ unresolved "$src: $errmsg for \"$op\""
+ return
+ }
+ } elseif { ![string compare "dg-xfail-if" $cmd] } {
+ warning "compat.exp does not support $cmd in primary source file"
+ } else {
+ # Ignore unrecognized dg- commands, but warn about them.
+ warning "compat.exp does not support $cmd"
+ }
+ }
+
+ # Return flags to use for compiling the primary source file and for
+ # linking.
+ return ${dg-extra-tool-flags}
+}
+
+#
+# compat-get-options -- get special tool flags to use for a secondary
+# source file
#
-# SRC is the full patchname of the source file.
+# SRC is the full pathname of the source file.
# The result is a list of options to use.
#
# This code is copied from proc dg-test in dg.exp from DejaGNU.
#
proc compat-get-options { src } {
- # Define our own special function `unknown` so we catch spelling errors.
- # But first rename the existing one so we can restore it afterwards.
- catch {rename dg-save-unknown ""}
- rename unknown dg-save-unknown
- proc unknown { args } {
- return -code error "unknown dg option: $args"
- }
-
# dg-options sets a variable called dg-extra-tool-flags.
set dg-extra-tool-flags ""
+
+ # dg-xfail-if sets compiler_conditional_xfail_data.
+ global compiler_conditional_xfail_data
+ set compiler_conditional_xfail_data ""
+
set tmp [dg-get-options $src]
foreach op $tmp {
set cmd [lindex $op 0]
- if ![string compare "dg-options" $cmd] {
+ if { ![string compare "dg-options" $cmd] \
+ || ![string compare "dg-xfail-if" $cmd] } {
set status [catch "$op" errmsg]
if { $status != 0 } {
perror "src: $errmsg for \"$op\"\n"
unresolved "$src: $errmsg for \"$op\""
return
}
+ } elseif { [string match "dg-require-*" $cmd] } {
+ warning "compat.exp does not support $cmd in secondary source files"
} else {
# Ignore unrecognized dg- commands, but warn about them.
warning "compat.exp does not support $cmd"
}
}
- # Restore normal error handling.
- rename unknown ""
- rename dg-save-unknown unknown
-
return ${dg-extra-tool-flags}
}
@@ -176,6 +237,22 @@ proc compat-execute { src1 sid use_alt } {
global verbose
global testcase
global gluefile
+ global compiler_conditional_xfail_data
+ global dg-do-what-default
+
+ # Get extra flags for this test from the primary source file, and
+ # process other dg-* options that this suite supports. Warn about
+ # unsupported flags.
+ verbose "compat-execute: $src1" 1
+ set dg-do-what [list ${dg-do-what-default} "" P]
+ set extra_flags_1 [compat-get-options-main $src1]
+
+ # Check whether this test is supported for this target.
+ if { [lindex ${dg-do-what} 1 ] == "N" } {
+ unsupported "$src1"
+ verbose "$src1 not supported on this target, skipping it" 3
+ return
+ }
# Set up the names of the other source files.
regsub "_main.*" $src1 "" base
@@ -186,9 +263,10 @@ proc compat-execute { src1 sid use_alt } {
# Use the dg-options mechanism to specify extra flags for this test.
# The extra flags in each file are used to compile that file, and the
# extra flags in *_main.* are also used for linking.
- set extra_flags_1 [compat-get-options $src1]
set extra_flags_2 [compat-get-options $src2]
+ set compile_xfail_2 $compiler_conditional_xfail_data
set extra_flags_3 [compat-get-options $src3]
+ set compile_xfail_3 $compiler_conditional_xfail_data
# Define the names of the object files.
regsub "sid" "sid_main_tst.o" $sid obj1
@@ -199,6 +277,7 @@ proc compat-execute { src1 sid use_alt } {
# Get the base name of this test, for use in messages.
regsub "^$srcdir/?" $src1 "" testcase
+ regsub "^$tmpdir/?" $testcase "tmpdir-" testcase
regsub "_main.*" $testcase "" testcase
# Set up the base name of executable files so they'll be unique.
regsub -all "\[./\]" $testcase "-" execbase
@@ -243,15 +322,19 @@ proc compat-execute { src1 sid use_alt } {
# later. Skip this if we don't have an alternate compiler.
if { $use_alt != 0 } then {
compat-use-alt-compiler
- compat-obj "$src2" "$obj2_alt" $alt_option $extra_flags_2 $optstr
- compat-obj "$src3" "$obj3_alt" $alt_option $extra_flags_3 $optstr
+ compat-obj "$src2" "$obj2_alt" $alt_option $extra_flags_2 \
+ $optstr $compile_xfail_2
+ compat-obj "$src3" "$obj3_alt" $alt_option $extra_flags_3 \
+ $optstr $compile_xfail_3
}
# Compile pieces with the compiler under test.
compat-use-tst-compiler
- compat-obj "$src1" "$obj1" $tst_option $extra_flags_1 $optstr
- compat-obj "$src2" "$obj2_tst" $tst_option $extra_flags_2 $optstr
- compat-obj "$src3" "$obj3_tst" $tst_option $extra_flags_3 $optstr
+ compat-obj "$src1" "$obj1" $tst_option $extra_flags_1 $optstr ""
+ compat-obj "$src2" "$obj2_tst" $tst_option $extra_flags_2 \
+ $optstr $compile_xfail_2
+ compat-obj "$src3" "$obj3_tst" $tst_option $extra_flags_3 \
+ $optstr $compile_xfail_3
# Link (using the compiler under test), run, and clean up tests.
compat-run "${obj2_tst}-${obj3_tst}" \
diff --git a/gcc/testsuite/lib/f-torture.exp b/gcc/testsuite/lib/f-torture.exp
deleted file mode 100644
index 88e8773a07a..00000000000
--- a/gcc/testsuite/lib/f-torture.exp
+++ /dev/null
@@ -1,333 +0,0 @@
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-dejagnu@gnu.org.
-
-# This file was written by Rob Savoye. (rob@cygnus.com)
-
-# The default option list can be overridden by
-# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
-
-if ![info exists TORTURE_OPTIONS] {
- set TORTURE_OPTIONS [list \
- { -O0 } { -O1 } { -O2 } \
- { -O2 -fomit-frame-pointer -finline-functions } \
- { -O2 -fomit-frame-pointer -finline-functions -funroll-loops } \
- { -O2 -fomit-frame-pointer -finline-functions -funroll-all-loops } \
- { -O3 -g } \
- { -Os }]
-}
-
-
-# Split TORTURE_OPTIONS into two choices: one for testcases with loops and
-# one for testcases without loops.
-
-set torture_with_loops $TORTURE_OPTIONS
-set torture_without_loops ""
-foreach option $TORTURE_OPTIONS {
- if ![string match "*loop*" $option] {
- lappend torture_without_loops $option
- }
-}
-
-#
-# f-torture-compile -- runs the Tege C-torture test
-#
-# SRC is the full pathname of the testcase.
-# OPTION is the specific compiler flag we're testing (eg: -O2).
-#
-proc f-torture-compile { src option } {
- global output
- global srcdir tmpdir
- global host_triplet
-
- set output "$tmpdir/[file tail [file rootname $src]].o"
-
- regsub "^$srcdir/?" $src "" testcase
- # If we couldn't rip $srcdir out of `src' then just do the best we can.
- # The point is to reduce the unnecessary noise in the logs. Don't strip
- # out too much because different testcases with the same name can confuse
- # `test-tool'.
- if [string match "/*" $testcase] {
- set testcase "[file tail [file dirname $src]]/[file tail $src]"
- }
-
- verbose "Testing $testcase, $option" 1
-
- # Run the compiler and analyze the results.
- set options ""
- lappend options "additional_flags=-w $option"
-
- set comp_output [g77_target_compile "$src" "$output" object $options];
-
- # Set a few common compiler messages.
- set fatal_signal "*77*: Internal compiler error: program*got fatal signal"
-
- if [string match "$fatal_signal 6" $comp_output] then {
- g77_fail $testcase "Got Signal 6, $option"
- remote_file build delete $output
- return
- }
-
- if [string match "$fatal_signal 11" $comp_output] then {
- g77_fail $testcase "Got Signal 11, $option"
- remote_file build delete $output
- return
- }
-
- # Prune warnings we know are unwanted.
- set comp_output [prune_warnings $comp_output]
-
- # We shouldn't get these because of -w, but just in case.
- if [string match "*77*:*warning:*" $comp_output] then {
- warning "$testcase: (with warnings) $option"
- send_log "$comp_output\n"
- unresolved "$testcase, $option"
- remote_file build delete $output
- return
- }
-
- set unsupported_message [g77_check_unsupported_p $comp_output]
- if { $unsupported_message != "" } {
- unsupported "$testcase: $unsupported_message"
- remote_file build delete $output
- return
- }
-
- # remove any leftover LF/CR to make sure any output is legit
- regsub -all -- "\[\r\n\]*" $comp_output "" comp_output
- # If any message remains, we fail.
- if ![string match "" $comp_output] then {
- g77_fail $testcase $option
- remote_file build delete $output
- return
- }
-
- g77_pass $testcase $option
- remote_file build delete $output
-}
-
-#
-# f-torture-execute -- utility to compile and execute a testcase
-#
-# SRC is the full pathname of the testcase.
-#
-# If the testcase has an associated .x file, we source that to run the
-# test instead. We use .x so that we don't lengthen the existing filename
-# to more than 14 chars.
-#
-proc f-torture-execute { src } {
- global tmpdir tool srcdir output compiler_conditional_xfail_data
-
- # Check for alternate driver.
- if [file exists [file rootname $src].x] {
- verbose "Using alternate driver [file rootname [file tail $src]].x" 2
- set done_p 0
- catch "set done_p \[source [file rootname $src].x\]"
- if { $done_p } {
- return
- }
- }
-
- # Look for a loop within the source code - if we don't find one,
- # don't pass -funroll[-all]-loops.
- global torture_with_loops torture_without_loops
- if [expr [search_for_re $src "do *\[0-9\]"]+[search_for_re $src "end *do"]] then {
- set option_list $torture_with_loops
- } else {
- set option_list $torture_without_loops
- }
-
- set executable $tmpdir/[file tail [file rootname $src].x]
-
- regsub "^$srcdir/?" $src "" testcase
- # If we couldn't rip $srcdir out of `src' then just do the best we can.
- # The point is to reduce the unnecessary noise in the logs. Don't strip
- # out too much because different testcases with the same name can confuse
- # `test-tool'.
- if [string match "/*" $testcase] {
- set testcase "[file tail [file dirname $src]]/[file tail $src]"
- }
-
- foreach option $option_list {
- # torture_{compile,execute}_xfail are set by the .x script
- # (if present)
- if [info exists torture_compile_xfail] {
- setup_xfail $torture_compile_xfail
- }
-
- # torture_execute_before_{compile,execute} can be set by the .x script
- # (if present)
- if [info exists torture_eval_before_compile] {
- set ignore_me [eval $torture_eval_before_compile]
- }
-
- remote_file build delete $executable
- verbose "Testing $testcase, $option" 1
-
- set options ""
- lappend options "additional_flags=-w $option"
- set comp_output [g77_target_compile "$src" "$executable" executable $options];
-
- # Set a few common compiler messages.
- set fatal_signal "*77*: Internal compiler error: program*got fatal signal"
-
- if [string match "$fatal_signal 6" $comp_output] then {
- g77_fail $testcase "Got Signal 6, $option"
- remote_file build delete $executable
- continue
- }
-
- if [string match "$fatal_signal 11" $comp_output] then {
- g77_fail $testcase "Got Signal 11, $option"
- remote_file build delete $executable
- continue
- }
-
- # We shouldn't get these because of -w, but just in case.
- if [string match "*77*:*warning:*" $comp_output] then {
- warning "$testcase: (with warnings) $option"
- send_log "$comp_output\n"
- unresolved "$testcase, $option"
- remote_file build delete $executable
- continue
- }
-
- set comp_output [prune_warnings $comp_output]
-
- set unsupported_message [g77_check_unsupported_p $comp_output]
-
- if { $unsupported_message != "" } {
- unsupported "$testcase: $unsupported_message"
- continue
- } elseif ![file exists $executable] {
- if ![is3way] {
- fail "$testcase compilation, $option"
- untested "$testcase execution, $option"
- continue
- } else {
- # FIXME: since we can't test for the existance of a remote
- # file without short of doing an remote file list, we assume
- # that since we got no output, it must have compiled.
- pass "$testcase compilation, $option"
- }
- } else {
- pass "$testcase compilation, $option"
- }
-
- # See if this source file uses "long long" types, if it does, and
- # no_long_long is set, skip execution of the test.
- if [target_info exists no_long_long] then {
- if [expr [search_for_re $src "integer\*8"]] then {
- untested "$testcase execution, $option"
- continue
- }
- }
-
- if [info exists torture_execute_xfail] {
- setup_xfail $torture_execute_xfail
- }
-
- if [info exists torture_eval_before_execute] {
- set ignore_me [eval $torture_eval_before_execute]
- }
-
- set result [g77_load "$executable" "" ""]
- set status [lindex $result 0];
- set output [lindex $result 1];
- if { $status == "pass" } {
- remote_file build delete $executable
- }
- $status "$testcase execution, $option"
- }
-}
-
-#
-# search_for_re -- looks for a case-insensitive regexp match in a file
-#
-proc search_for_re { file pattern } {
- set fd [open $file r]
- while { [gets $fd cur_line]>=0 } {
- if [regexp -nocase -- "$pattern" $cur_line] then {
- close $fd
- return 1
- }
- }
- close $fd
- return 0
-}
-
-#
-# f-torture -- the f-torture testcase source file processor
-#
-# This runs compilation only tests (no execute tests).
-# SRC is the full pathname of the testcase, or just a file name in which case
-# we prepend $srcdir/$subdir.
-#
-# If the testcase has an associated .x file, we source that to run the
-# test instead. We use .x so that we don't lengthen the existing filename
-# to more than 14 chars.
-#
-proc f-torture { args } {
- global srcdir subdir compiler_conditional_xfail_data
-
- set src [lindex $args 0];
- if { [llength $args] > 1 } {
- set options [lindex $args 1];
- } else {
- set options ""
- }
-
- # Prepend $srdir/$subdir if missing.
- if ![string match "*/*" $src] {
- set src "$srcdir/$subdir/$src"
- }
-
- # Check for alternate driver.
- if [file exists [file rootname $src].x] {
- verbose "Using alternate driver [file rootname [file tail $src]].x" 2
- set done_p 0
- catch "set done_p \[source [file rootname $src].x\]"
- if { $done_p } {
- return
- }
- }
-
- # Look for a loop within the source code - if we don't find one,
- # don't pass -funroll[-all]-loops.
- global torture_with_loops torture_without_loops
- if [expr [search_for_re $src "do *\[0-9\]"]+[search_for_re $src "end *do"]] then {
- set option_list $torture_with_loops
- } else {
- set option_list $torture_without_loops
- }
-
- # loop through all the options
- foreach option $option_list {
- # torture_compile_xfail is set by the .x script (if present)
- if [info exists torture_compile_xfail] {
- setup_xfail $torture_compile_xfail
- }
-
- # torture_execute_before_compile is set by the .x script (if present)
- if [info exists torture_eval_before_compile] {
- set ignore_me [eval $torture_eval_before_compile]
- }
-
- f-torture-compile $src "$option $options"
- }
-}
diff --git a/gcc/testsuite/lib/file-format.exp b/gcc/testsuite/lib/file-format.exp
index a4168b6d614..ab69f930614 100644
--- a/gcc/testsuite/lib/file-format.exp
+++ b/gcc/testsuite/lib/file-format.exp
@@ -24,6 +24,7 @@
proc gcc_target_object_format { } {
global gcc_target_object_format_saved
+ global tool
if [info exists gcc_target_object_format_saved] {
verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2
@@ -33,7 +34,7 @@ proc gcc_target_object_format { } {
puts $open_file "void foo(void) { }"
close $open_file
- gcc_target_compile objfmtst.c objfmtst.o object ""
+ ${tool}_target_compile objfmtst.c objfmtst.o object ""
catch {
set output [exec $objdump_name --file-headers objfmtst.o ]
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index 81ac484ae29..b863785ee38 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -49,7 +49,7 @@ proc g++_version { } {
set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0];
set output [lindex $tmp 1];
- regexp "version.*$" $output version
+ regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then {
if [is_remote host] {
clone_output "$compiler $version\n"
@@ -170,12 +170,32 @@ proc g++_link_flags { paths } {
# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
# (for the 64-bit ABI). The right way to do this would be to modify
# unix.exp -- but that's not an option since it's part of DejaGNU
- # proper, so we do it here. We really only need to do
- # this on IRIX, but it shouldn't hurt to do it anywhere else.
- setenv LD_LIBRARY_PATH $ld_library_path
- setenv SHLIB_PATH $ld_library_path
- setenv LD_LIBRARYN32_PATH $ld_library_path
- setenv LD_LIBRARY64_PATH $ld_library_path
+ # proper, so we do it here.
+ # The same applies to Darwin (DYLD_LIBRARY_PATH), Solaris 32 bit
+ # (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX
+ # (SHLIB_PATH).
+ # Doing this does cause trouble when testing cross-compilers.
+ if {![is_remote target]} {
+ global env;
+ if [info exists env(LD_LIBRARY_PATH)] {
+ # If we've already added these directories once, keep the
+ # existing path.
+ if {$ld_library_path == $env(LD_LIBRARY_PATH)
+ || [string first $ld_library_path: \
+ $env(LD_LIBRARY_PATH)] == 0} {
+ set ld_library_path $env(LD_LIBRARY_PATH)
+ } elseif { $env(LD_LIBRARY_PATH) != "" } {
+ append ld_library_path ":$env(LD_LIBRARY_PATH)"
+ }
+ }
+ setenv LD_LIBRARY_PATH $ld_library_path
+ setenv SHLIB_PATH $ld_library_path
+ setenv LD_LIBRARYN32_PATH $ld_library_path
+ setenv LD_LIBRARY64_PATH $ld_library_path
+ setenv LD_LIBRARY_PATH_32 $ld_library_path
+ setenv LD_LIBRARY_PATH_64 $ld_library_path
+ setenv DYLD_LIBRARY_PATH $ld_library_path
+ }
return "$flags"
}
@@ -196,6 +216,7 @@ proc g++_init { args } {
global TOOL_EXECUTABLE TOOL_OPTIONS
global GXX_UNDER_TEST
global TESTING_IN_BUILD_TREE
+ global target_triplet
if ![info exists GXX_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] {
@@ -228,16 +249,7 @@ proc g++_init { args } {
unset gluefile
}
- if { [target_info needs_status_wrapper] != "" } {
- set gluefile ${tmpdir}/g++-testglue.o;
- set result [build_wrapper $gluefile];
- if { $result != "" } {
- set gluefile [lindex $result 0];
- set wrap_flags [lindex $result 1];
- } else {
- unset gluefile
- }
- }
+ g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o"
set ALWAYS_CXXFLAGS ""
@@ -259,6 +271,10 @@ proc g++_init { args } {
# error-message parsing machinery.
lappend ALWAYS_CXXFLAGS "additional_flags=-fmessage-length=0"
+ if { [string match "powerpc-*-darwin*" $target_triplet] } {
+ lappend ALWAYS_CXXFLAGS "ldflags=-multiply_defined suppress"
+ }
+
verbose -log "ALWAYS_CXXFLAGS set to $ALWAYS_CXXFLAGS"
verbose "g++ is initialized" 3
diff --git a/gcc/testsuite/lib/g77-dg.exp b/gcc/testsuite/lib/g77-dg.exp
deleted file mode 100644
index 4734075fe52..00000000000
--- a/gcc/testsuite/lib/g77-dg.exp
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (C) 1997, 1999, 2000, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-load_lib gcc-dg.exp
-
-# Define g77 callbacks for dg.exp.
-
-proc g77-dg-test { prog do_what extra_tool_flags } {
- set result \
- [gcc-dg-test-1 g77_target_compile $prog $do_what $extra_tool_flags]
-
- set comp_output [lindex $result 0]
- set output_file [lindex $result 1]
-
- # Put the error message on the same line as the line number
- # Remove the line of source code with the error and
- # the " ^" that points to error
- regsub -all "\n\[^\n\]*\n *\\^\n" $comp_output "" comp_output
-
- return [list $comp_output $output_file]
-}
-
-proc g77-dg-prune { system text } {
- return [gcc-dg-prune $system $text]
-}
-
-# Utility routines.
-
-# Modified dg-runtest that can cycle through a list of optimization options
-# as c-torture does.
-proc g77-dg-runtest { testcases default-extra-flags } {
- return [gcc-dg-runtest $testcases ${default-extra-flags}]
-}
diff --git a/gcc/testsuite/lib/g77.exp b/gcc/testsuite/lib/g77.exp
index 8f20eb48cc8..f8c517163bf 100644
--- a/gcc/testsuite/lib/g77.exp
+++ b/gcc/testsuite/lib/g77.exp
@@ -50,7 +50,7 @@ proc g77_version { } {
set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0];
set output [lindex $tmp 1];
- regexp "version.*$" $output version
+ regexp "version\[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then {
if [is_remote host] {
clone_output "$compiler $version\n"
@@ -120,6 +120,7 @@ proc g77_link_flags { paths } {
setenv SHLIB_PATH $ld_library_path
setenv LD_LIBRARYN32_PATH $ld_library_path
setenv LD_LIBRARY64_PATH $ld_library_path
+ setenv DYLD_LIBRARY_PATH $ld_library_path
return "$flags"
}
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index bb2369c2110..740073fb8c8 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,6 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+load_lib wrapper.exp
+
#
# ${tool}_check_compile -- Reports and returns pass/fail for a compilation
#
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index ee1d4d84a64..ca2812d499c 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -4,21 +4,23 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
load_lib dg.exp
load_lib file-format.exp
load_lib target-supports.exp
load_lib scanasm.exp
+load_lib scantree.exp
load_lib prune.exp
+load_lib libgloss.exp
if ![info exists TORTURE_OPTIONS] {
# It is theoretically beneficial to group all of the O2/O3 options together,
@@ -39,6 +41,62 @@ if ![info exists TORTURE_OPTIONS] {
{ -Os } ]
}
+global GCC_UNDER_TEST
+if ![info exists GCC_UNDER_TEST] {
+ set GCC_UNDER_TEST "[find_gcc]"
+}
+
+global rootme
+set libgcc_s_path "${rootme}"
+set compiler [lindex $GCC_UNDER_TEST 0]
+if { [is_remote host] == 0 && [which $compiler] != 0 } {
+ foreach i "[exec $compiler --print-multi-lib]" {
+ set mldir ""
+ regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
+ set mldir [string trimright $mldir "\;@"]
+ if { "$mldir" == "." } {
+ continue
+ }
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ append libgcc_s_path ":${rootme}/${mldir}"
+ }
+ }
+}
+
+# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
+# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
+# (for the 64-bit ABI). The right way to do this would be to modify
+# unix.exp -- but that's not an option since it's part of DejaGNU
+# proper, so we do it here. We really only need to do
+# this on IRIX, but it shouldn't hurt to do it anywhere else.
+# Doing this does cause trouble when testing cross-compilers.
+if {![is_remote target]} {
+ if [info exists env(LD_LIBRARY_PATH)] {
+ setenv LD_LIBRARY_PATH "$libgcc_s_path:$env(LD_LIBRARY_PATH)"
+ } else {
+ setenv LD_LIBRARY_PATH $libgcc_s_path
+ }
+ if [info exists env(SHLIB_PATH)] {
+ setenv SHLIB_PATH "$libgcc_s_path:$env(SHLIB_PATH)"
+ } else {
+ setenv SHLIB_PATH $libgcc_s_path
+ }
+ if [info exists env(LD_LIBRARYN32_PATH)] {
+ setenv LD_LIBRARYN32_PATH "$libgcc_s_path:$env(LD_LIBRARYN32_PATH)"
+ } else {
+ setenv LD_LIBRARYN32_PATH $libgcc_s_path
+ }
+ if [info exists env(LD_LIBRARY64_PATH)] {
+ setenv LD_LIBRARY64_PATH "$libgcc_s_path:$env(LD_LIBRARY64_PATH)"
+ } else {
+ setenv LD_LIBRARY64_PATH $libgcc_s_path
+ }
+ if [info exists env(DYLD_LIBRARY_PATH)] {
+ setenv DYLD_LIBRARY_PATH "$libgcc_s_path:$env(DYLD_LIBRARY_PATH)"
+ } else {
+ setenv DYLD_LIBRARY_PATH $libgcc_s_path
+ }
+}
# Split TORTURE_OPTIONS into two choices: one for testcases with loops and
# one for testcases without loops.
@@ -118,8 +176,10 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
if { $do_what == "repo" } {
set object_file "$output_file"
set output_file "[file rootname [file tail $prog]].exe"
- concat comp_output \
- [$target_compile "$object_file" "$output_file" "executable" $options]
+ set comp_output \
+ [ concat $comp_output \
+ [$target_compile "$object_file" "$output_file" \
+ "executable" $options] ]
}
return [list $comp_output $output_file]
@@ -130,8 +190,17 @@ proc gcc-dg-test { prog do_what extra_tool_flags } {
}
proc gcc-dg-prune { system text } {
+ global additional_prunes
+
set text [prune_gcc_output $text]
+ foreach p $additional_prunes {
+ if { [string length $p] > 0 } {
+ # Following regexp matches a complete line containing $p.
+ regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text
+ }
+ }
+
# If we see "region xxx is full" then the testcase is too big for ram.
# This is tricky to deal with in a large testsuite like c-torture so
# deal with it here. Just mark the testcase as unsupported.
@@ -166,7 +235,7 @@ proc gcc-dg-runtest { testcases default-extra-flags } {
global runtests
foreach test $testcases {
- # If we're only testing specific files and this isn't one of
+ # If we're only testing specific files and this isn't one of
# them, skip it.
if ![runtest_file_p $runtests $test] {
continue
@@ -217,7 +286,7 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } {
global runtests
foreach test $testcases {
- # If we're only testing specific files and this isn't one of
+ # If we're only testing specific files and this isn't one of
# them, skip it.
if ![runtest_file_p $runtests $test] {
continue
@@ -228,7 +297,7 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } {
foreach flags $DEBUG_TORTURE_OPTIONS {
set doit 1
if { [string match {*/debug-[126].c} "$nshort"] \
- && [string match "*1" [lindex "$flags" 0] ] } {
+ && [string match "*1" [lindex "$flags" 0] ] } {
set doit 0
}
@@ -237,7 +306,7 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } {
# assembler output, but stabs debugging does not.
# http://gcc.gnu.org/ml/gcc-regression/2003-04/msg00095.html
if { [string match {*/debug-[12].c} "$nshort"] \
- && [string match "*O3*" "$flags"] \
+ && [string match "*O*" "$flags"] \
&& ( [string match "*coff*" "$flags"] \
|| [string match "*stabs*" "$flags"] ) } {
set doit 0
@@ -267,6 +336,23 @@ proc dg-require-weak { args } {
}
}
+# If this target does not support the "visibility" attribute, skip this
+# test.
+
+proc dg-require-visibility { args } {
+ upvar dg-do-what dg-do-what
+ upvar name name
+
+ set visibility_available [ check_visibility_available ]
+ if { $visibility_available == -1 } {
+ unresolved "$name"
+ }
+ if { $visibility_available != 1 } {
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ return
+ }
+}
+
# If this target does not support the "alias" attribute, skip this
# test.
@@ -295,12 +381,24 @@ proc dg-require-gc-sections { args } {
}
}
+# If this target does not support profiling, skip this test.
+
+proc dg-require-profiling { args } {
+ if { ![ check_profiling_available ${args} ] } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ return
+ }
+}
+
# If this target does not support DLL attributes skip this test.
-proc dg-require-dll { args } {
+proc dg-require-dll { args } {
global target_triplet
- # As a special case, the mcore-*-elf supports dllimport/dllexport.
- if { [string match "mcore-*-elf" $target_triplet] } {
+ # As a special case, the mcore-*-elf supports these attributes.
+ # All Symbian OS targets also support these attributes.
+ if { [string match "mcore-*-elf" $target_triplet]
+ || [string match "*-*-symbianelf" $target_triplet]} {
return
}
# PE/COFF targets support dllimport/dllexport.
@@ -312,6 +410,38 @@ proc dg-require-dll { args } {
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
}
+proc dg-require-iconv { args } {
+ if { ![ check_iconv_available ${args} ] } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ return
+ }
+ return
+}
+
+# If this target does not support named sections skip this test.
+
+proc dg-require-named-sections { args } {
+ upvar name name
+
+ if { ![ check_named_sections_available ] } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ }
+}
+
+# Prune any messages matching ARGS[1] (a regexp) from test output.
+proc dg-prune-output { args } {
+ global additional_prunes
+
+ if { [llength $args] != 2 } {
+ error "[lindex $args 1]: need one argument"
+ return
+ }
+
+ lappend additional_prunes [lindex $args 1]
+}
+
# Like check_conditional_xfail, but callable from a dg test.
proc dg-xfail-if { args } {
@@ -324,11 +454,10 @@ proc dg-xfail-if { args } {
}
-# We need to make sure that additional_files and additional_sources
-# are both cleared out after every test. It is not enough to clear
-# them out *before* the next test run because gcc-target-compile gets
-# run directly from some .exp files (outside of any test). (Those
-# uses should eventually be eliminated.)
+# We need to make sure that additional_* are cleared out after every
+# test. It is not enough to clear them out *before* the next test run
+# because gcc-target-compile gets run directly from some .exp files
+# (outside of any test). (Those uses should eventually be eliminated.)
# Because the DG framework doesn't provide a hook that is run at the
# end of a test, we must replace dg-test with a wrapper.
@@ -339,15 +468,19 @@ if { [info procs saved-dg-test] == [list] } {
proc dg-test { args } {
global additional_files
global additional_sources
+ global additional_prunes
global errorInfo
if { [ catch { eval saved-dg-test $args } errmsg ] } {
set saved_info $errorInfo
set additional_files ""
set additional_sources ""
+ set additional_prunes ""
error $errmsg $saved_info
}
set additional_files ""
set additional_sources ""
+ set additional_prunes ""
}
}
+set additional_prunes ""
diff --git a/gcc/testsuite/lib/gcc.exp b/gcc/testsuite/lib/gcc.exp
index 29c687be2c9..2f553387666 100644
--- a/gcc/testsuite/lib/gcc.exp
+++ b/gcc/testsuite/lib/gcc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@ proc default_gcc_version { } {
set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0];
set output [lindex $tmp 1];
- regexp "version.*$" $output version
+ regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then {
clone_output "$compiler_name $version\n"
} else {
@@ -106,18 +106,8 @@ proc gcc_init { args } {
if ![info exists tmpdir] then {
set tmpdir /tmp
}
- if {[target_info needs_status_wrapper] != "" && \
- [target_info needs_status_wrapper] != "0" && \
- ![info exists gluefile]} {
- set gluefile ${tmpdir}/gcc-testglue.o;
- set result [build_wrapper $gluefile];
- if { $result != "" } {
- set gluefile [lindex $result 0];
- set wrap_flags [lindex $result 1];
- } else {
- unset gluefile
- }
- }
+
+ gcc_maybe_build_wrapper "${tmpdir}/gcc-testglue.o"
}
#
diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp
index 95af06a10d1..07787cc5bcc 100644
--- a/gcc/testsuite/lib/gfortran.exp
+++ b/gcc/testsuite/lib/gfortran.exp
@@ -24,7 +24,6 @@
#
load_lib prune.exp
load_lib gcc-defs.exp
-load_lib target-libpath.exp
#
# GFORTRAN_UNDER_TEST is the compiler under test.
@@ -104,14 +103,43 @@ proc gfortran_link_flags { paths } {
if { "$mldir" == "." } {
continue
}
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
append ld_library_path ":${rootme}/${mldir}"
}
}
}
}
- set_ld_library_path_env_vars
+ # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
+ # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
+ # (for the 64-bit ABI). The right way to do this would be to modify
+ # unix.exp -- but that's not an option since it's part of DejaGNU
+ # proper, so we do it here.
+ # The same applies to Darwin (DYLD_LIBRARY_PATH), Solaris 32 bit
+ # (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX
+ # (SHLIB_PATH).
+ # Doing this does cause trouble when testing cross-compilers.
+ if {![is_remote target]} {
+ global env;
+ if [info exists env(LD_LIBRARY_PATH)] {
+ # If we've already added these directories once, keep the
+ # existing path.
+ if {$ld_library_path == $env(LD_LIBRARY_PATH)
+ || [string first $ld_library_path: \
+ $env(LD_LIBRARY_PATH)] == 0} {
+ set ld_library_path $env(LD_LIBRARY_PATH)
+ } elseif { $env(LD_LIBRARY_PATH) != "" } {
+ append ld_library_path ":$env(LD_LIBRARY_PATH)"
+ }
+ }
+ setenv LD_LIBRARY_PATH $ld_library_path
+ setenv SHLIB_PATH $ld_library_path
+ setenv LD_LIBRARYN32_PATH $ld_library_path
+ setenv LD_LIBRARY64_PATH $ld_library_path
+ setenv LD_LIBRARY_PATH_32 $ld_library_path
+ setenv LD_LIBRARY_PATH_64 $ld_library_path
+ setenv DYLD_LIBRARY_PATH $ld_library_path
+ }
return "$flags"
}
@@ -133,10 +161,6 @@ proc gfortran_init { args } {
global GFORTRAN_UNDER_TEST
global TESTING_IN_BUILD_TREE
- # We set LC_ALL and LANG to C so that we get the same error messages as expected.
- setenv LC_ALL C
- setenv LANG C
-
if ![info exists GFORTRAN_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] {
set GFORTRAN_UNDER_TEST $TOOL_EXECUTABLE;
diff --git a/gcc/testsuite/lib/mike-g77.exp b/gcc/testsuite/lib/mike-g77.exp
deleted file mode 100644
index ccc9041e3ec..00000000000
--- a/gcc/testsuite/lib/mike-g77.exp
+++ /dev/null
@@ -1,262 +0,0 @@
-# Copyright (C) 1988, 90, 91, 92, 95, 96, 97, 1998 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This file was derived from mike-g++.exp written by Mike Stump <mrs@cygnus.com>
-
-# Please email any bugs, comments, and/or additions to this file to:
-# fortran@gnu.org
-
-#
-# mike_cleanup -- remove any files that are created by the testcase
-#
-proc mike_cleanup { src_code output_file assembly_file } {
- remote_file build delete $output_file $assembly_file;
-}
-
-#
-# prebase -- sets up a Mike Stump (mrs@cygnus.com) style g77 test
-#
-proc prebase { } {
- global compiler_output
- global not_compiler_output
- global compiler_result
- global not_compiler_result
- global program_output
- global groups
- global run
- global actions
- global target_regexp
-
- set compiler_output "^$"
- set not_compiler_output ".*Internal compiler error.*"
- set compiler_result ""
- set not_compiler_result ""
- set program_output ".*PASS.*"
- set groups {}
- set run no
- set actions assemble
- set target_regexp ".*"
-}
-
-#
-# run the test
-#
-proc postbase { src_code run groups args } {
- global verbose
- global srcdir
- global subdir
- global not_compiler_output
- global compiler_output
- global compiler_result
- global not_compiler_result
- global program_output
- global actions
- global target_regexp
- global host_triplet
- global target_triplet
- global tool
- global tmpdir
- global G77_UNDER_TEST
- global GROUP
-
- if ![info exists G77_UNDER_TEST] {
- error "No compiler specified for testing."
- }
-
- if ![regexp $target_regexp $target_triplet] {
- unsupported $subdir/$src_code
- return
- }
-
- if { [llength $args] > 0 } {
- set comp_options [lindex $args 0];
- } else {
- set comp_options ""
- }
-
- set fail_message $subdir/$src_code
- set pass_message $subdir/$src_code
-
- if [info exists GROUP] {
- if {[lsearch $groups $GROUP] == -1} {
- return
- }
- }
-
- if [string match $run yes] {
- set actions run
- }
-
- set output_file "$tmpdir/[file tail [file rootname $src_code]]"
- set assembly_file "$output_file"
- append assembly_file ".S"
-
- set compile_type "none"
-
- case $actions {
- compile
- {
- set compile_type "assembly";
- set output_file $assembly_file;
- }
- assemble
- {
- set compile_type "object";
- append output_file ".o";
- }
- link
- {
- set compile_type "executable";
- append output_file ".exe";
- }
- run
- {
- set compile_type "executable";
- append output_file ".exe";
- set run yes;
- }
- default
- {
- set output_file "";
- set compile_type "none";
- }
- }
-
- set src_file "$srcdir/$subdir/$src_code"
- set options ""
- lappend options "compiler=$G77_UNDER_TEST"
-
- if { $comp_options != "" } {
- lappend options "additional_flags=$comp_options"
- }
-
- set comp_output [g77_target_compile $src_file $output_file $compile_type $options];
-
- set pass no
-
- # Delete things like "ld.so warning" messages.
- set comp_output [prune_warnings $comp_output]
-
- if [regexp -- $not_compiler_output $comp_output] {
- if { $verbose > 1 } {
- send_user "\nChecking:\n$not_compiler_output\nto make sure it does not match:\n$comp_output\nbut it does.\n\n"
- } else {
- send_log "\nCompiler output:\n$comp_output\n\n"
- }
- fail $fail_message
- # The framework doesn't like to see any error remnants,
- # so remove them.
- uplevel {
- if [info exists errorInfo] {
- unset errorInfo
- }
- }
- mike_cleanup $src_code $output_file $assembly_file
- return
- }
-
- # remove any leftover CRs.
- regsub -all -- "\r" $comp_output "" comp_output
-
- regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $comp_output "" comp_output
- regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $comp_output "" comp_output
-
- set unsupported_message [${tool}_check_unsupported_p $comp_output]
- if { $unsupported_message != "" } {
- unsupported "$subdir/$src_code: $unsupported_message"
- mike_cleanup $src_code $output_file $assembly_file
- return
- }
-
- if { $verbose > 1 } {
- send_user "\nChecking:\n$compiler_output\nto see if it matches:\n$comp_output\n"
- } else {
- send_log "\nCompiler output:\n$comp_output\n\n"
- }
- if [regexp -- $compiler_output $comp_output] {
- if { $verbose > 1 } {
- send_user "Yes, it matches.\n\n"
- }
- set pass yes
- if [file exists [file rootname [file tail $src_code]].s] {
- set fd [open [file rootname [file tail $src_code]].s r]
- set dot_s [read $fd]
- close $fd
- if { $compiler_result != "" } {
- verbose "Checking .s file for $compiler_result" 2
- if [regexp -- $compiler_result $dot_s] {
- verbose "Yes, it matches." 2
- } else {
- verbose "Nope, doesn't match." 2
- verbose $dot_s 4
- set pass no
- }
- }
- if { $not_compiler_result != "" } {
- verbose "Checking .s file for not $not_compiler_result" 2
- if ![regexp -- $not_compiler_result $dot_s] {
- verbose "Nope, not found (that's good)." 2
- } else {
- verbose "Uh oh, it was found." 2
- verbose $dot_s 4
- set pass no
- }
- }
- }
- if [string match $run yes] {
- set result [g77_load $output_file]
- set status [lindex $result 0];
- set output [lindex $result 1];
- if { $status == -1 } {
- mike_cleanup $src_code $output_file $assembly_file;
- return;
- }
- if { $verbose > 1 } {
- send_user "Checking:\n$program_output\nto see if it matches:\n$output\n\n"
- }
- if ![regexp -- $program_output $output] {
- set pass no
- if { $verbose > 1 } {
- send_user "Nope, does not match.\n\n"
- }
- } else {
- if { $verbose > 1 } {
- send_user "Yes, it matches.\n\n"
- }
- }
- }
- } else {
- if { $verbose > 1 } {
- send_user "Nope, does not match.\n\n"
- }
- }
-
- if [string match $pass "yes"] {
- pass $pass_message
- } else {
- fail $fail_message
- }
-
- # The framework doesn't like to see any error remnants,
- # so remove them.
- uplevel {
- if [info exists errorInfo] {
- unset errorInfo
- }
- }
-
- mike_cleanup $src_code $output_file $assembly_file
-}
diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp
index 1817c7022e8..d75cf1aaf8b 100644
--- a/gcc/testsuite/lib/objc.exp
+++ b/gcc/testsuite/lib/objc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1996, 1997, 2000, 2001, 2002
+# Copyright (C) 1992, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -56,7 +56,7 @@ proc default_objc_version { } {
set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0];
set output [lindex $tmp 1];
- regexp "version.*$" $output version
+ regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then {
clone_output "$compiler_name $version\n"
} else {
@@ -107,16 +107,8 @@ proc objc_init { args } {
if ![info exists tmpdir] then {
set tmpdir /tmp
}
- if { [target_info needs_status_wrapper]!="" && ![info exists gluefile] } {
- set gluefile ${tmpdir}/objc-testglue.o;
- set result [build_wrapper $gluefile];
- if { $result != "" } {
- set gluefile [lindex $result 0];
- set wrap_flags [lindex $result 1];
- } else {
- unset gluefile
- }
- }
+
+ objc_maybe_build_wrapper "${tmpdir}/objc-testglue.o"
set objc_libgcc_s_path "${rootme}"
set compiler [lindex $OBJC_UNDER_TEST 0]
@@ -173,7 +165,14 @@ proc objc_target_compile { source dest type options } {
# at it (and associated headers).
set objcpath "[get_multilibs]"
+
set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc.a]
+ if { $libobjc_dir == ""} {
+ verbose "see if we have -fgnu-runtime in [target_info name]"
+ if [regexp ".*-fgnu-runtime.*" [target_info name]] {
+ set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc-gnu.a]
+ }
+ }
if { $libobjc_dir != "" } {
set objc_include_dir "${srcdir}/../../libobjc"
lappend options "additional_flags=-I${objc_include_dir}"
@@ -188,12 +187,17 @@ proc objc_target_compile { source dest type options } {
# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
# (for the 64-bit ABI). The right way to do this would be to modify
# unix.exp -- but that's not an option since it's part of DejaGNU
- # proper, so we do it here. We really only need to do
- # this on IRIX, but it shouldn't hurt to do it anywhere else.
+ # proper, so we do it here.
+ # The same applies to Darwin (DYLD_LIBRARY_PATH), Solaris 32 bit
+ # (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX
+ # (SHLIB_PATH).
setenv LD_LIBRARY_PATH $ld_library_path
setenv SHLIB_PATH $ld_library_path
setenv LD_LIBRARYN32_PATH $ld_library_path
setenv LD_LIBRARY64_PATH $ld_library_path
+ setenv LD_LIBRARY_PATH_32 $ld_library_path
+ setenv LD_LIBRARY_PATH_64 $ld_library_path
+ setenv DYLD_LIBRARY_PATH $ld_library_path
return [target_compile $source $dest $type $options]
}
diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp
index 4d32ff2fdbe..e8a7ac12354 100644
--- a/gcc/testsuite/lib/profopt.exp
+++ b/gcc/testsuite/lib/profopt.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,12 +37,6 @@ global tool profile_option feedback_option prof_ext
if ![info exists tool] {
error "Tools is not specified."
}
-if ![info exists profile_option] {
- error "No profile option specified for first compile."
-}
-if ![info exists feedback_option] {
- error "No feedback option specified for second compile."
-}
if ![info exists prof_ext] {
error "No profile data file extension specified."
}
@@ -130,6 +124,13 @@ proc profopt-execute { src } {
global tool profile_option feedback_option prof_ext perf_ext perf_delta
global verbose
+ if ![info exists profile_option] {
+ error "No profile option specified for first compile."
+ }
+ if ![info exists feedback_option] {
+ error "No feedback option specified for second compile."
+ }
+
regsub "^$srcdir/?" $src "" testcase
# If we couldn't rip $srcdir out of `src' then just do the best we can.
# The point is to reduce the unnecessary noise in the logs. Don't strip
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index 8105340cfcd..d706eacd1c0 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,15 +19,22 @@
proc prune_gcc_output { text } {
#send_user "Before:$text\n"
- regsub -all "(^|\n)\[^\n\]*: In ((static member )?function|member|method|(copy )?constructor|instantiation|program|subroutine|block-data) \[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: In ((static member )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data) \[^\n\]*" $text "" text
regsub -all "(^|\n)\[^\n\]*: At (top level|global scope):\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: instantiated from \[^\n\]*" $text "" text
regsub -all "(^|\n)collect2: ld returned \[^\n\]*" $text "" text
+ regsub -all "(^|\n)collect: re(compiling|linking)\[^\n\]*" $text "" text
regsub -all "(^|\n)Please submit.*instructions\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[0-9\]\[0-9\]* errors\." $text "" text
# Ignore harmless -fpic warnings.
regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC) ignored for target\[^\n\]*" $text "" text
regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC)( and -fpic are| is)? not supported\[^\n\]*" $text "" text
+ # Ignore errata warning from IA64 assembler.
+ regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
+ regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
+
# It would be nice to avoid passing anything to gcc that would cause it to
# issue these messages (since ignoring them seems like a hack on our part),
# but that's too difficult in the general case. For example, sometimes
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index cf414fb25cd..9116afc1c41 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -48,11 +48,14 @@ proc dg-scan { name positive testcase output_file orig_args } {
set text [read $fd]
close $fd
- set match [regexp -- [lindex $orig_args 0] $text]
+ set pattern [lindex $orig_args 0]
+ set printable_pattern [string map {\t \\t \n \\n \r \\r \\ \\\\} $pattern]
+
+ set match [regexp -- $pattern $text]
if { $match == $positive } {
- pass "$testcase $name [lindex $orig_args 0]"
+ pass "$testcase $name $printable_pattern"
} else {
- fail "$testcase $name [lindex $orig_args 0]"
+ fail "$testcase $name $printable_pattern"
}
}
@@ -76,6 +79,32 @@ proc scan-assembler-not { args } {
dg-scan "scan-assembler-not" 0 $testcase $output_file $args
}
+# Check that a symbol is defined as a hidden symbol in the .s file
+# produced by the compiler.
+
+proc scan-hidden { args } {
+ upvar 2 name testcase
+ set output_file "[file rootname [file tail $testcase]].s"
+
+ set symbol [lindex $args 0]
+ set args [lreplace $args 0 0 "hidden\[ \t_\]*$symbol"]
+
+ dg-scan "scan-hidden" 1 $testcase $output_file $args
+}
+
+# Check that a symbol is not defined as a hidden symbol in the .s file
+# produced by the compiler.
+
+proc scan-not-hidden { args } {
+ upvar 2 name testcase
+ set output_file "[file rootname [file tail $testcase]].s"
+
+ set symbol [lindex $args 0]
+ set args [lreplace $args 0 0 "hidden\[ \t_\]*$symbol"]
+
+ dg-scan "scan-not-hidden" 0 $testcase $output_file $args
+}
+
# Look for a pattern in OUTPUT_FILE. See dg-scan for details.
proc scan-file { output_file args } {
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 38d416ccb77..25d1f8d5837 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4,15 +4,15 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# gcc-patches@gcc.gnu.org
@@ -31,13 +31,13 @@ proc check_weak_available { } {
global target_cpu
# All mips targets should support it
-
+
if { [ string first "mips" $target_cpu ] >= 0 } {
return 1
}
# All solaris2 targets should support it
-
+
if { [regexp ".*-solaris2.*" $target_triplet] } {
return 1
}
@@ -63,6 +63,36 @@ proc check_weak_available { } {
}
###############################
+# proc check_visibility_available { }
+###############################
+
+# The visibility attribute is only support in some object formats
+# This proc returns 1 if it is supported, 0 if not, -1 if unsure.
+
+proc check_visibility_available { } {
+ global target_triplet
+ global target_cpu
+
+ # On NetWare, support makes no sense.
+
+ if { [string match "*-*-netware*" $target_triplet] } {
+ return 0
+ }
+
+ # ELF supports it if the system has recent GNU ld and gas.
+ # As a start we return 1 for all ELF systems; we'll let people
+ # add exceptions as necessary.
+
+ set objformat [gcc_target_object_format]
+
+ switch $objformat {
+ elf { return 1 }
+ unknown { return -1 }
+ default { return 0 }
+ }
+}
+
+###############################
# proc check_alias_available { }
###############################
@@ -75,19 +105,24 @@ proc check_weak_available { } {
proc check_alias_available { } {
global alias_available_saved
-
+ global tool
+
if [info exists alias_available_saved] {
verbose "check_alias_available returning saved $alias_available_saved" 2
} else {
- verbose "check_alias_available compiling testfile" 2
- set f [open "tmp.c" "w"]
+ set src alias[pid].c
+ set obj alias[pid].o
+ verbose "check_alias_available compiling testfile $src" 2
+ set f [open $src "w"]
# Compile a small test program. The definition of "g" is
# necessary to keep the Solaris assembler from complaining
# about the program.
+ puts $f "#ifdef __cplusplus\nextern \"C\"\n#endif\n"
puts $f "void g() {} void f() __attribute__((alias(\"g\")));"
close $f
- set lines [gcc_target_compile "tmp.c" "tmp.o" object ""]
- file delete "tmp.c"
+ set lines [${tool}_target_compile $src $obj object ""]
+ file delete $src
+ remote_file build delete $obj
if [string match "" $lines] then {
# No error messages, everything is OK.
@@ -113,7 +148,7 @@ proc check_alias_available { } {
}
}
}
-
+
verbose "check_alias_available returning $alias_available_saved" 2
}
@@ -124,10 +159,13 @@ proc check_alias_available { } {
proc check_gc_sections_available { } {
global gc_sections_available_saved
+ global tool
if {![info exists gc_sections_available_saved]} {
# Check if the ld used by gcc supports --gc-sections.
- set gcc_ld [lindex [gcc_target_compile "-print-prog-name=ld" "" "none" ""] 0]
+ set gcc_spec [${tool}_target_compile "-dumpspecs" "" "none" ""]
+ regsub ".*\n\*linker:\[ \t\]*\n(\[^ \t\n\]*).*" "$gcc_spec" {\1} linker
+ set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=$linker" "" "none" ""] 0]
set ld_output [remote_exec host "$gcc_ld" "--help"]
if { [ string first "--gc-sections" $ld_output ] >= 0 } {
set gc_sections_available_saved 1
@@ -137,3 +175,175 @@ proc check_gc_sections_available { } {
}
return $gc_sections_available_saved
}
+
+# Return true if profiling is supported on the target.
+
+proc check_profiling_available { test_what } {
+ global profiling_available_saved
+
+ verbose "Profiling argument is <$test_what>" 1
+
+ # These conditions depend on the argument so examine them before
+ # looking at the cache variable.
+
+ # Support for -p on solaris2 relies on mcrt1.o which comes with the
+ # vendor compiler. We cannot reliably predict the directory where the
+ # vendor compiler (and thus mcrt1.o) is installed so we can't
+ # necessarily find mcrt1.o even if we have it.
+ if { [istarget *-*-solaris2*] && [lindex $test_what 1] == "-p" } {
+ return 0
+ }
+
+ # Support for -p on irix relies on libprof1.a which doesn't appear to
+ # exist on any irix6 system currently posting testsuite results.
+ # Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
+ # See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html
+ if { [istarget mips*-*-irix*]
+ && ([lindex $test_what 1] == "-p" || [lindex $test_what 1] == "-pg") } {
+ return 0
+ }
+
+ # Now examine the cache variable.
+ if {![info exists profiling_available_saved]} {
+ # Some targets don't have any implementation of __bb_init_func or are
+ # missing other needed machinery.
+ if { [istarget mmix-*-*]
+ || [istarget arm*-*-eabi*]
+ || [istarget arm*-*-elf]
+ || [istarget arm*-*-symbianelf*]
+ || [istarget powerpc-*-eabi*]
+ || [istarget strongarm*-*-elf]
+ || [istarget xscale*-*-elf]
+ || [istarget cris-*-*]
+ || [istarget h8300-*-*]
+ || [istarget mips*-*-elf]
+ || [istarget *-*-windiss] } {
+ set profiling_available_saved 0
+ } else {
+ set profiling_available_saved 1
+ }
+ }
+
+ return $profiling_available_saved
+}
+
+# Return true if iconv is supported on the target. In particular IBM-1047.
+
+proc check_iconv_available { test_what } {
+ global tool
+ global libiconv
+
+ set result ""
+
+ set src iconv[pid].c
+ set exe iconv[pid].x
+ verbose "check_iconv_available compiling testfile $src" 2
+ set f [open $src "w"]
+ # Compile a small test program.
+ puts $f "#include <iconv.h>\n"
+ puts $f "int main (void)\n {\n iconv_t cd; \n"
+ puts $f "cd = iconv_open (\"[lindex $test_what 1]\", \"UTF-8\");\n"
+ puts $f "if (cd == (iconv_t) -1)\n return 1;\n"
+ puts $f "return 0;\n}"
+ close $f
+
+ set lines [${tool}_target_compile $src $exe executable "libs=$libiconv" ]
+ file delete $src
+
+ if [string match "" $lines] then {
+ # No error messages, everything is OK.
+
+ set result [${tool}_load "./$exe" "" ""]
+ set status [lindex $result 0];
+ remote_file build delete $exe
+
+ verbose "check_iconv_available status is <$status>" 2
+
+ if { $status == "pass" } then {
+ return 1
+ }
+ }
+
+ return 0
+}
+
+# Return true if named sections are supported on this target.
+# This proc does not cache results, because the answer may vary
+# when cycling over subtarget options (e.g. irix o32/n32/n64) in
+# the same test run.
+proc check_named_sections_available { } {
+ global tool
+
+ set src named[pid].c
+ set obj named[pid].o
+ verbose "check_named_sections_available compiling testfile $src" 2
+ set f [open $src "w"]
+ # Compile a small test program.
+ puts $f "int __attribute__ ((section(\"whatever\"))) foo;"
+ close $f
+ set lines [${tool}_target_compile $src $obj object ""]
+ file delete $src
+ remote_file build delete $obj
+
+ # If we got no error messages, everything is OK.
+ set answer [string match "" $lines]
+ verbose "check_named_sections_available returning $answer" 2
+ return $answer
+}
+
+# Return 1 if the target supports executing AltiVec instructions, 0
+# otherwise. Cache the result.
+
+proc check_vmx_hw_available { } {
+ global vmx_hw_available_saved
+ global tool
+
+ if [info exists vmx_hw_available_saved] {
+ verbose "check_hw_available returning saved $vmx_hw_available_saved" 2
+ } else {
+ set vmx_hw_available_saved 0
+
+ # Some simulators are known to not support VMX instructions.
+ if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] } {
+ verbose "check_hw_available returning 0" 2
+ return $vmx_hw_available_saved
+ }
+
+ # Set up, compile, and execute a test program containing VMX
+ # instructions. Include the current process ID in the file
+ # names to prevent conflicts with invocations for multiple
+ # testsuites.
+ set src vmx[pid].c
+ set exe vmx[pid].x
+
+ set f [open $src "w"]
+ puts $f "int main() {"
+ puts $f "#ifdef __MACH__"
+ puts $f " asm volatile (\"vor v0,v0,v0\");"
+ puts $f "#else"
+ puts $f " asm volatile (\"vor 0,0,0\");"
+ puts $f "#endif"
+ puts $f " return 0; }"
+ close $f
+
+ verbose "check_vmx_hw_available compiling testfile $src" 2
+ set lines [${tool}_target_compile $src $exe executable ""]
+ file delete $src
+
+ if [string match "" $lines] then {
+ # No error message, compilation succeeded.
+ set result [${tool}_load "./$exe" "" ""]
+ set status [lindex $result 0]
+ remote_file build delete $exe
+ verbose "check_vmx_hw_available testfile status is <$status>" 2
+
+ if { $status == "pass" } then {
+ set vmx_hw_available_saved 1
+ }
+ } else {
+ verbose "check_vmx_hw_availalble testfile compilation failed" 2
+ }
+ }
+
+ return $vmx_hw_available_saved
+}
diff --git a/gcc/testsuite/lib/treelang.exp b/gcc/testsuite/lib/treelang.exp
index e3d6c49aed2..94bb8a0b115 100644
--- a/gcc/testsuite/lib/treelang.exp
+++ b/gcc/testsuite/lib/treelang.exp
@@ -1,4 +1,5 @@
-# Copyright (C) 1988, 90, 91, 92, 95, 96, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +15,261 @@
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# This file was written by Rob Savoye (rob@cygnus.com)
+# Currently maintained by James A. Morrison (ja2morri@uwaterloo.ca)
+
# Having this file here magically tells dejagnu that the treelang
# directory is worthy of testing
+# This file is basically treelang.exp with treelang replaced with treelang.
+
+# This file is loaded by the tool init file (eg: unix.exp). It provides
+# default definitions for treelang_start, etc. and other supporting cast members.
+
+# These globals are used by treelang_start if no compiler arguments are provided.
+# They are also used by the various testsuites to define the environment:
+# where to find stdio.h, libc.a, etc.
+
+load_lib libgloss.exp
+load_lib prune.exp
+load_lib gcc-defs.exp
+
+#
+# TREELANG_UNDER_TEST is the compiler under test.
+#
+
+#
+# default_treelang_version -- extract and print the version number of the compiler
+#
+
+proc default_treelang_version { } {
+ global TREELANG_UNDER_TEST
+
+ treelang_init;
+
+ # ignore any arguments after the command
+ set compiler [lindex $TREELANG_UNDER_TEST 0]
+
+ if ![is_remote host] {
+ set compiler_name [which $compiler];
+ } else {
+ set compiler_name $compiler;
+ }
+
+ # verify that the compiler exists
+ if { $compiler_name != 0 } then {
+ set tmp [remote_exec host "$compiler -v"]
+ set status [lindex $tmp 0];
+ set output [lindex $tmp 1];
+ regexp " version \[^\n\r\]*" $output version
+ if { $status == 0 && [info exists version] } then {
+ clone_output "$compiler_name $version\n"
+ } else {
+ clone_output "Couldn't determine version of $compiler_name: $output\n"
+ }
+ } else {
+ # compiler does not exist (this should have already been detected)
+ warning "$compiler does not exist"
+ }
+}
+
+# treelang_init -- called at the start of each .exp script.
+#
+# There currently isn't much to do, but always using it allows us to
+# make some enhancements without having to go back and rewrite the scripts.
+#
+
+set treelang_initialized 0
+
+proc treelang_init { args } {
+ global rootme
+ global tmpdir
+ global libdir
+ global gluefile wrap_flags
+ global treelang_initialized
+ global TREELANG_UNDER_TEST
+ global TOOL_EXECUTABLE
+ global treelang_libgcc_s_path
+
+ if { $treelang_initialized == 1 } { return; }
+
+ if ![info exists TREELANG_UNDER_TEST] then {
+ if [info exists TOOL_EXECUTABLE] {
+ set TREELANG_UNDER_TEST $TOOL_EXECUTABLE;
+ } else {
+ set TREELANG_UNDER_TEST [find_gcc]
+ }
+ }
+
+ if ![info exists tmpdir] then {
+ set tmpdir /tmp
+ }
+
+ treelang_maybe_build_wrapper "${tmpdir}/treelang-testglue.o"
+
+ set treelang_libgcc_s_path "${rootme}"
+ set compiler [lindex $TREELANG_UNDER_TEST 0]
+ if { [is_remote host] == 0 && [which $compiler] != 0 } {
+ foreach i "[exec $compiler --print-multi-lib]" {
+ set mldir ""
+ regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
+ set mldir [string trimright $mldir "\;@"]
+ if { "$mldir" == "." } {
+ continue
+ }
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+ append treelang_libgcc_s_path ":${rootme}/${mldir}"
+ }
+ }
+ }
+}
+
+proc treelang_target_compile { source dest type options } {
+ global rootme;
+ global tmpdir;
+ global gluefile wrap_flags;
+ global srcdir
+ global TREELANG_UNDER_TEST
+ global TOOL_OPTIONS
+ global ld_library_path
+ global treelang_libgcc_s_path
+
+ set ld_library_path ".:${treelang_libgcc_s_path}"
+ lappend options "libs=-ltreelang"
+
+ if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
+ lappend options "libs=${gluefile}"
+ lappend options "ldflags=$wrap_flags"
+ }
+
+ # TOOL_OPTIONS must come first, so that it doesn't override testcase
+ # specific options.
+ if [info exists TOOL_OPTIONS] {
+ set options [concat "additional_flags=$TOOL_OPTIONS" $options];
+ }
+
+ # If we have built libtreelang along with the compiler (which usually
+ # _is not_ the case on Mac OS X systems), point the test harness
+ # at it (and associated headers).
+
+ return [target_compile $source $dest $type $options]
+}
+
+#
+# treelang_pass -- utility to record a testcase passed
+#
+
+proc treelang_pass { testcase cflags } {
+ if { "$cflags" == "" } {
+ pass "$testcase"
+ } else {
+ pass "$testcase, $cflags"
+ }
+}
+
+#
+# treelang_fail -- utility to record a testcase failed
+#
+
+proc treelang_fail { testcase cflags } {
+ if { "$cflags" == "" } {
+ fail "$testcase"
+ } else {
+ fail "$testcase, $cflags"
+ }
+}
+
+#
+# treelang_finish -- called at the end of every .exp script that calls treelang_init
+#
+# The purpose of this proc is to hide all quirks of the testing environment
+# from the testsuites. It also exists to undo anything that treelang_init did
+# (that needs undoing).
+#
+
+proc treelang_finish { } {
+ # The testing harness apparently requires this.
+ global errorInfo;
+
+ if [info exists errorInfo] then {
+ unset errorInfo
+ }
+
+ # Might as well reset these (keeps our caller from wondering whether
+ # s/he has to or not).
+ global prms_id bug_id
+ set prms_id 0
+ set bug_id 0
+}
+
+proc treelang_exit { } {
+ global gluefile;
+
+ if [info exists gluefile] {
+ file_on_build delete $gluefile;
+ unset gluefile;
+ }
+}
+
+# If this is an older version of dejagnu (without runtest_file_p),
+# provide one and assume the old syntax: foo1.exp bar1.c foo2.exp bar2.c.
+# This can be deleted after next dejagnu release.
+
+if { [info procs runtest_file_p] == "" } then {
+ proc runtest_file_p { runtests testcase } {
+ if { $runtests != "" && [regexp "\[.\]\[cC\]" $runtests] } then {
+ if { [lsearch $runtests [file tail $testcase]] >= 0 } then {
+ return 1
+ } else {
+ return 0
+ }
+ }
+ return 1
+ }
+}
+
+# Provide a definition of this if missing (delete after next dejagnu release).
+
+if { [info procs prune_warnings] == "" } then {
+ proc prune_warnings { text } {
+ return $text
+ }
+}
+
+# Utility used by mike-gcc.exp and c-torture.exp.
+# Check the compiler(/assembler/linker) output for text indicating that
+# the testcase should be marked as "unsupported".
+#
+# When dealing with a large number of tests, it's difficult to weed out the
+# ones that are too big for a particular cpu (eg: 16 bit with a small amount
+# of memory). There are various ways to deal with this. Here's one.
+# Fortunately, all of the cases where this is likely to happen will be using
+# gld so we can tell what the error text will look like.
+
+proc ${tool}_check_unsupported_p { output } {
+ if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] {
+ return "memory full"
+ }
+ return ""
+}
+
+# Prune messages from treelang that aren't useful.
+
+proc prune_treelang_output { text } {
+ #send_user "Before:$text\n"
+ regsub -all "(^|\n)\[^\n\]*: In (function|method) \[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: At top level:\[^\n\]*" $text "" text
+
+ # It would be nice to avoid passing anything to treelang that would cause it to
+ # issue these messages (since ignoring them seems like a hack on our part),
+ # but that's too difficult in the general case. For example, sometimes
+ # you need to use -B to point treelang at crt0.o, but there are some targets
+ # that don't have crt0.o.
+ regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
+ regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
+
+ #send_user "After:$text\n"
+
+ return $text
+}
diff --git a/gcc/testsuite/objc.dg/bitfield-2.m b/gcc/testsuite/objc.dg/bitfield-2.m
index 83b31748371..6875c6c4d87 100644
--- a/gcc/testsuite/objc.dg/bitfield-2.m
+++ b/gcc/testsuite/objc.dg/bitfield-2.m
@@ -4,7 +4,7 @@
/* { dg-options "-fnext-runtime -fsigned-char" } */
/* { dg-do run { target *-*-darwin* } } */
-struct objc_object { struct objc_class *class_pointer; } *id;
+typedef struct objc_object { struct objc_class *class_pointer; } *id;
extern void abort(void);
extern int strcmp(const char *, const char *);
diff --git a/gcc/testsuite/objc.dg/bitfield-4.m b/gcc/testsuite/objc.dg/bitfield-4.m
index 858bac2b003..4883497e8bb 100644
--- a/gcc/testsuite/objc.dg/bitfield-4.m
+++ b/gcc/testsuite/objc.dg/bitfield-4.m
@@ -19,11 +19,10 @@
@implementation WithBitfields {
char *isa; /* { dg-error "conflicting instance variable type .char \\*isa." } */
/* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 12 } */
- unsigned a: 5; /* { dg-error "conflicting instance variable type .unsigned a: 5." } */
- /* { dg-error "previous declaration of .unsigned a: 3." "" { target *-*-* } 13 } */
+ unsigned a: 5; /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
+ /* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 13 } */
signed b: 4; /* This one is fine. */
int c: 3; /* { dg-error "conflicting instance variable type .int c: 3." } */
/* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 15 } */
}
@end
-
diff --git a/gcc/testsuite/objc.dg/call-super-2.m b/gcc/testsuite/objc.dg/call-super-2.m
index cd7db41bffe..41eafc83780 100644
--- a/gcc/testsuite/objc.dg/call-super-2.m
+++ b/gcc/testsuite/objc.dg/call-super-2.m
@@ -3,6 +3,7 @@
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do compile } */
+#include <stddef.h>
#include <objc/objc.h>
#include <objc/Object.h>
@@ -44,11 +45,11 @@
@implementation Derived
+ (int) class_func1
{
- int i = (int)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 47 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 47 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 47 } */
- return i + (int)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */
+ int i = (size_t)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 48 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 48 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 48 } */
+ return i + (size_t)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */
}
+ (int) class_func2
{
@@ -65,12 +66,12 @@
}
+ (int) class_func5
{
- int i = (int)[Derived class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */
- return i + (int)[Object class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */
+ int i = (size_t)[Derived class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */
+ return i + (size_t)[Object class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */
}
+ (int) class_func6
{
- return (int)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */
+ return (size_t)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */
}
+ (int) class_func7
{
@@ -78,8 +79,8 @@
}
- (int) instance_func1
{
- int i = (int)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */
- return i + (int)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */
+ int i = (size_t)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */
+ return i + (size_t)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */
}
- (int) instance_func2
{
@@ -95,12 +96,12 @@
}
- (int) instance_func5
{
- int i = (int)[Derived instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+instance_func1." } */
- return i + (int)[Object instance_func1]; /* { dg-warning ".Object. may not respond to .\\+instance_func1." } */
+ int i = (size_t)[Derived instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+instance_func1." } */
+ return i + (size_t)[Object instance_func1]; /* { dg-warning ".Object. may not respond to .\\+instance_func1." } */
}
- (int) instance_func6
{
- return (int)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */
+ return (size_t)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */
}
- (int) instance_func7
{
@@ -111,11 +112,11 @@
@implementation Derived (Categ)
+ (int) categ_class_func1
{
- int i = (int)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */
+ int i = (size_t)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */
i += [self class_func1];
i += [self categ_class_func2];
- i += (int)[self categ_instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+categ_instance_func1." } */
- return i + (int)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */
+ i += (size_t)[self categ_instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+categ_instance_func1." } */
+ return i + (size_t)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */
}
+ (int) categ_class_func2
{
@@ -124,13 +125,13 @@
}
- (int) categ_instance_func1
{
- int i = (int)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */
+ int i = (size_t)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */
i += [(Derived <Func> *)self categ_instance_func2];
- i += (int)[(Object <Func> *)self categ_instance_func2]; /* { dg-warning ".Object. may not respond to .\\-categ_instance_func2." } */
- /* { dg-warning ".\\-categ_instance_func2. not implemented by protocol" "" { target *-*-* } 129 } */
- i += (int)[(id <Func>)self categ_instance_func2]; /* { dg-warning ".\\-categ_instance_func2. not implemented by protocol" } */
+ i += (size_t)[(Object <Func> *)self categ_instance_func2]; /* { dg-warning ".Object. may not respond to .\\-categ_instance_func2." } */
+ /* { dg-warning ".\\-categ_instance_func2. not implemented by protocol" "" { target *-*-* } 130 } */
+ i += (size_t)[(id <Func>)self categ_instance_func2]; /* { dg-warning ".\\-categ_instance_func2. not implemented by protocol" } */
i += [(id)self categ_instance_func2];
- return i + (int)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */
+ return i + (size_t)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */
}
- (int) categ_instance_func2
{
diff --git a/gcc/testsuite/objc.dg/const-str-3.m b/gcc/testsuite/objc.dg/const-str-3.m
index edc03ff62c7..7d4f80863d2 100644
--- a/gcc/testsuite/objc.dg/const-str-3.m
+++ b/gcc/testsuite/objc.dg/const-str-3.m
@@ -6,6 +6,8 @@
/* { dg-do run { target *-*-darwin* } } */
#include <stdio.h>
+#include <stdlib.h>
+#include <memory.h>
#include <objc/objc.h>
#include <objc/Object.h>
diff --git a/gcc/testsuite/objc.dg/desig-init-1.m b/gcc/testsuite/objc.dg/desig-init-1.m
index 44abe440d7b..cd56324f403 100644
--- a/gcc/testsuite/objc.dg/desig-init-1.m
+++ b/gcc/testsuite/objc.dg/desig-init-1.m
@@ -22,7 +22,7 @@
0,
[Cls meth1],
[2 + 1] = 3,
- [2 * 2 ... 5] = (int)[0 meth2], /* { dg-warning "invalid receiver type" } */
+ [2 * 2 ... 5] = (size_t)[0 meth2], /* { dg-warning "invalid receiver type" } */
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 25 } */
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 25 } */
diff --git a/gcc/testsuite/objc.dg/encode-2.m b/gcc/testsuite/objc.dg/encode-2.m
index ebfd8d3fa2d..b9003696c02 100644
--- a/gcc/testsuite/objc.dg/encode-2.m
+++ b/gcc/testsuite/objc.dg/encode-2.m
@@ -6,7 +6,7 @@
- The k-th parameter (k > 1) has offset equal to the
sum of:
- the offset of the k-1-st paramter
- - the int-promoted size of the k-1-st parameter.
+ - the (void *)-promoted size of the k-1-st parameter.
Note that the encoded offsets need not correspond
to the actual placement of parameters (relative to 'self')
@@ -39,7 +39,7 @@ typedef struct { float x, y; } XXPoint;
typedef struct { float width, height; } XXSize;
typedef struct _XXRect { XXPoint origin; XXSize size; } XXRect;
-(id)setRect:(XXRect)r withInt:(int)i;
--(void) char:(char)c float:(float)f double:(double)d long:(long)l;
+-(void) char:(signed char)c float:(float)f double:(double)d long:(long)l;
@end
XXRect my_rect;
@@ -57,7 +57,7 @@ unsigned offs1, offs2, offs3, offs4, offs5, offs6, offs7;
CHECK_IF(offs == offs1);
return nil;
}
--(void) char:(char)c float:(float)f double:(double)d long:(long)l {
+-(void) char:(signed char)c float:(float)f double:(double)d long:(long)l {
unsigned offs = sizeof(self);
CHECK_IF(offs == offs3);
offs += sizeof(_cmd);
@@ -78,6 +78,7 @@ int main(void) {
Foo *foo = [[Foo alloc] init];
Class fooClass = OBJC_GETCLASS("Foo");
METHOD meth;
+ const char *string;
meth = CLASS_GETINSTANCEMETHOD(fooClass, @selector(setRect:withInt:));
offs2 = 9999;
@@ -88,8 +89,12 @@ int main(void) {
meth = CLASS_GETINSTANCEMETHOD(fooClass, @selector(char:float:double:long:));
offs2 = 9999;
- sscanf(meth->method_types, "v%u@%u:%uc%uf%ud%ul%u", &offs1, &offs2, &offs3,
- &offs4, &offs5, &offs6, &offs7);
+ if (sizeof (long) == 8)
+ string = "v%u@%u:%uc%uf%ud%uq%u";
+ else
+ string = "v%u@%u:%uc%uf%ud%ul%u";
+ sscanf(meth->method_types, string, &offs1, &offs2, &offs3,
+ &offs4, &offs5, &offs6, &offs7);
CHECK_IF(!offs2);
[foo char:'c' float:2.3 double:3.5 long:2345L];
diff --git a/gcc/testsuite/objc.dg/encode-3.m b/gcc/testsuite/objc.dg/encode-3.m
index b30b956b157..20a85b43bdf 100644
--- a/gcc/testsuite/objc.dg/encode-3.m
+++ b/gcc/testsuite/objc.dg/encode-3.m
@@ -28,7 +28,7 @@ union __XXAngle { unsigned int alpha, beta; };
typedef struct { float x, y; union __XXAngle a; } XXPoint;
typedef struct { double width, height; } XXSize;
typedef struct _XXRect { XXPoint origin; XXSize size; struct _XXRect *next; } XXRect;
-- (void) char:(char)c float:(float)f double:(double)d unsigned:(unsigned)u short:(short)s long:(long)l;
+- (void) char:(signed char)c float:(float)f double:(double)d unsigned:(unsigned)u short:(short)s long:(long)l;
- (void *)setRect:(XXRect)r withBool:(ProtoBool)b withInt:(int)i;
+ (Enum *)getEnum:(XXPoint *)pt enum:(enum Enum)e bool:(ObjCBool)b;
+ (ProtoBool **)getBool:(ObjCBool **)b;
@@ -46,8 +46,14 @@ static void scan_initial(const char *pattern) {
}
int main(void) {
+ const char *string;
+
meth = [proto descriptionForInstanceMethod: @selector(char:float:double:unsigned:short:long:)];
- scan_initial("v%u@%u:%uc%uf%ud%uI%us%ul%u");
+ if (sizeof (long) == 8)
+ string = "v%u@%u:%uc%uf%ud%uI%us%uq%u";
+ else
+ string = "v%u@%u:%uc%uf%ud%uI%us%ul%u";
+ scan_initial(string);
CHECK_IF(offs3 == offs2 + sizeof(int) && offs4 == offs3 + sizeof(float));
CHECK_IF(offs5 == offs4 + sizeof(double) && offs6 == offs5 + sizeof(unsigned));
CHECK_IF(offs7 == offs6 + sizeof(int) && totsize == offs7 + sizeof(long));
diff --git a/gcc/testsuite/objc.dg/encode-4.m b/gcc/testsuite/objc.dg/encode-4.m
index 1f179e1dad5..a754c6955cb 100644
--- a/gcc/testsuite/objc.dg/encode-4.m
+++ b/gcc/testsuite/objc.dg/encode-4.m
@@ -31,7 +31,7 @@ struct Nested {
};
@interface Int1: Object {
- char a, b;
+ signed char a, b;
Int2 *int2;
struct Nested nested;
}
diff --git a/gcc/testsuite/objc.dg/id-1.m b/gcc/testsuite/objc.dg/id-1.m
index abc17bc67cc..ceb4d898131 100644
--- a/gcc/testsuite/objc.dg/id-1.m
+++ b/gcc/testsuite/objc.dg/id-1.m
@@ -1,6 +1,7 @@
-/* Test the id type warning. */
+/* Test attempt to redefine 'id' in an incompatible fashion. */
/* { dg-do compile } */
-typedef int id;
+typedef int id; /* { dg-error "conflicting types for .id." } */
+/* { dg-error "previous declaration of .id. was here" "" { target *-*-* } 0 } */
-id b; /* { dg-warning "nexpected type for `id'" } */
+id b;
diff --git a/gcc/testsuite/objc.dg/image-info.m b/gcc/testsuite/objc.dg/image-info.m
index 84e6ad8d0e2..02511bc4b82 100644
--- a/gcc/testsuite/objc.dg/image-info.m
+++ b/gcc/testsuite/objc.dg/image-info.m
@@ -35,4 +35,4 @@ extern void abort(void);
}
@end
-/* { dg-final { scan-assembler "\n.data\n.section __OBJC, __image_info\n\t.align.*\nL_OBJC_IMAGE_INFO:\n\t.long\t0\n\t.long\t1\n.data\n.objc_module_info\n" } } */
+/* { dg-final { scan-assembler "\n.data\n.section __OBJC, __image_info.*\n\t.align.*\nL_OBJC_IMAGE_INFO.*:\n\t.long\t0\n\t.long\t1\n.data\n.objc_module_info\n" } } */
diff --git a/gcc/testsuite/objc.dg/method-1.m b/gcc/testsuite/objc.dg/method-1.m
index 391ee629c70..a73a0f4921d 100644
--- a/gcc/testsuite/objc.dg/method-1.m
+++ b/gcc/testsuite/objc.dg/method-1.m
@@ -16,9 +16,8 @@
@end
@implementation class3
-- (int) meth1 { return 0; }
+- (int) meth1 { return 0; } /* { dg-error "previous definition" } */
- (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
-/* { dg-error "previously defined here" "" { target *-*-* } 19 } */
@end
@interface class4
@@ -26,7 +25,6 @@
@end
@implementation class4
-+ (void) meth1 {}
++ (void) meth1 {} /* { dg-error "previous definition" } */
+ (void) meth1 {} /* { dg-error "redefinition of" } */
-/* { dg-error "previously defined here" "" { target *-*-* } 29 } */
@end
diff --git a/gcc/testsuite/objc.dg/method-6.m b/gcc/testsuite/objc.dg/method-6.m
index a4ca787b7f6..8bed64bee1a 100644
--- a/gcc/testsuite/objc.dg/method-6.m
+++ b/gcc/testsuite/objc.dg/method-6.m
@@ -19,7 +19,7 @@ void foo(void) {
Class receiver;
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
- /* { dg-warning "using .\\-\\(unsigned\\)port." "" { target *-*-* } 9 } */
+ /* { dg-warning "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */
/* { dg-warning "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */
[receiver starboard]; /* { dg-warning ".Class. may not respond to .\\+starboard." } */
diff --git a/gcc/testsuite/objc.dg/method-9.m b/gcc/testsuite/objc.dg/method-9.m
index ba832840062..3921663ec8f 100644
--- a/gcc/testsuite/objc.dg/method-9.m
+++ b/gcc/testsuite/objc.dg/method-9.m
@@ -37,7 +37,7 @@
/* { dg-warning "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */
/* The following warning is a consequence of picking the "wrong" method signature. */
- /* { dg-warning "passing arg 1 of .initWithData:. from incompatible pointer type" "" { target *-*-* } 33 } */
+ /* { dg-warning "passing argument 1 of .initWithData:. from incompatible pointer type" "" { target *-*-* } 33 } */
return result;
}
@end
diff --git a/gcc/testsuite/objc.dg/naming-1.m b/gcc/testsuite/objc.dg/naming-1.m
index 69d98b7be51..1be7eba664c 100644
--- a/gcc/testsuite/objc.dg/naming-1.m
+++ b/gcc/testsuite/objc.dg/naming-1.m
@@ -9,9 +9,7 @@ void foo(void)
{
int View; /* ok */
View = 1; /* ok */
- View *view; /* { dg-error "`view' undeclared" } */
- /* { dg-error "is reported only once" "" { target *-*-* } 12 } */
- /* { dg-error "function it appears in" "" { target *-*-* } 12 } */
+ View *view; /* { dg-error "undeclared|only once|it appears" } */
}
void bar(void)
diff --git a/gcc/testsuite/objc.dg/nested-func-1.m b/gcc/testsuite/objc.dg/nested-func-1.m
index 7a182bd938e..8ec3f722c11 100644
--- a/gcc/testsuite/objc.dg/nested-func-1.m
+++ b/gcc/testsuite/objc.dg/nested-func-1.m
@@ -4,6 +4,7 @@
/* { dg-options "-lobjc" } */
/* { dg-do run } */
#include <stdio.h>
+#include <stdlib.h>
#include <objc/objc.h>
#include <objc/Object.h>
diff --git a/gcc/testsuite/objc.dg/proto-lossage-4.m b/gcc/testsuite/objc.dg/proto-lossage-4.m
index 8df169da4ee..447e67e12e6 100644
--- a/gcc/testsuite/objc.dg/proto-lossage-4.m
+++ b/gcc/testsuite/objc.dg/proto-lossage-4.m
@@ -19,20 +19,23 @@ long foo(void) {
Obj *objrcvr;
Obj <Proto> *objrcvr2;
- /* NB: Since 'receiver' is an invalid ObjC message receiver, the compiler
- should warn but then search for methods as if we were messaging 'id'. */
-
receiver += [receiver someValue]; /* { dg-warning "invalid receiver type .long int." } */
- receiver += [receiver anotherValue]; /* { dg-warning "invalid receiver type .long int." } */
+/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 22 } */
+/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 22 } */
+/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 22 } */
+/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 22 } */
- receiver += [(Obj *)receiver someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
+ receiver += [receiver anotherValue]; /* { dg-warning "invalid receiver type .long int." } */
/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 28 } */
+
+ receiver += [(Obj *)receiver someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
+/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 31 } */
receiver += [(Obj *)receiver anotherValue];
receiver += [(Obj <Proto> *)receiver someValue];
receiver += [(Obj <Proto> *)receiver anotherValue];
receiver += [objrcvr someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 34 } */
+/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 37 } */
receiver += [objrcvr anotherValue];
receiver += [(Obj <Proto> *)objrcvr someValue];
@@ -40,13 +43,9 @@ long foo(void) {
receiver += [objrcvr2 someValue];
receiver += [objrcvr2 anotherValue];
receiver += [(Obj *)objrcvr2 someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 42 } */
+/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 45 } */
receiver += [(Obj *)objrcvr2 anotherValue];
return receiver;
}
-
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/objc.dg/proto-qual-1.m b/gcc/testsuite/objc.dg/proto-qual-1.m
index 6ae12909380..126bae76e89 100644
--- a/gcc/testsuite/objc.dg/proto-qual-1.m
+++ b/gcc/testsuite/objc.dg/proto-qual-1.m
@@ -8,6 +8,10 @@
#include <objc/objc-api.h>
#endif
+/* The encoded parameter sizes will be rounded up to match pointer alignment. */
+#define ROUND(s,a) (a * ((s + a - 1) / a))
+#define aligned_sizeof(T) ROUND(sizeof(T),__alignof(void *))
+
extern int sscanf(const char *str, const char *format, ...);
extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort()
@@ -34,15 +38,15 @@ static void scan_initial(const char *pattern) {
totsize = offs0 = offs1 = offs2 = offs3 = offs4 = offs5 = offs6 = offs7 = (unsigned)-1;
sscanf(meth->types, pattern, &totsize, &offs0, &offs1, &offs2, &offs3,
&offs4, &offs5, &offs6, &offs7);
- CHECK_IF(!offs0 && offs1 == sizeof(id) && offs2 == offs1 + sizeof(SEL) && totsize >= offs2);
+ CHECK_IF(!offs0 && offs1 == aligned_sizeof(id) && offs2 == offs1 + aligned_sizeof(SEL) && totsize >= offs2);
}
int main(void) {
meth = [proto descriptionForInstanceMethod: @selector(address:with:)];
- scan_initial("O@%u@%u:%uNR@%uo^^S%u");
- CHECK_IF(offs3 == offs2 + sizeof(id) && totsize == offs3 + sizeof(unsigned));
+ scan_initial("O@%u@%u:%uRN@%uo^^S%u");
+ CHECK_IF(offs3 == offs2 + aligned_sizeof(id) && totsize == offs3 + aligned_sizeof(unsigned));
meth = [proto descriptionForClassMethod: @selector(retainArgument:with:)];
- scan_initial("Vv%u@%u:%uOo@%un^*%u");
- CHECK_IF(offs3 == offs2 + sizeof(id) && totsize == offs3 + sizeof(char **));
+ scan_initial("Vv%u@%u:%uoO@%un^*%u");
+ CHECK_IF(offs3 == offs2 + aligned_sizeof(id) && totsize == offs3 + aligned_sizeof(char **));
return 0;
}
diff --git a/gcc/testsuite/objc.dg/selector-1.m b/gcc/testsuite/objc.dg/selector-1.m
index b23cc90a284..b9cc5e0807d 100644
--- a/gcc/testsuite/objc.dg/selector-1.m
+++ b/gcc/testsuite/objc.dg/selector-1.m
@@ -19,7 +19,7 @@ typedef struct objc_selector *SEL;
- (void) foo
{
SEL a,b,c;
- a = @selector(b1ar); /* { dg-warning "creating selector for non existant method b1ar" } */
+ a = @selector(b1ar); /* { dg-warning "creating selector for nonexistent method .b1ar." } */
b = @selector(bar);
}
@end
diff --git a/gcc/testsuite/objc.dg/special/unclaimed-category-1.m b/gcc/testsuite/objc.dg/special/unclaimed-category-1.m
index 8b8af5ed307..b3a8c28b5e6 100644
--- a/gcc/testsuite/objc.dg/special/unclaimed-category-1.m
+++ b/gcc/testsuite/objc.dg/special/unclaimed-category-1.m
@@ -4,6 +4,8 @@
#include <objc/objc-api.h>
#include <objc/Object.h>
+extern void abort (void);
+
/* Test loading unclaimed categories - categories of a class defined
separately from the class itself. */
diff --git a/gcc/testsuite/objc.dg/symtab-1.m b/gcc/testsuite/objc.dg/symtab-1.m
index 44e7b5aab34..d031cb46d06 100644
--- a/gcc/testsuite/objc.dg/symtab-1.m
+++ b/gcc/testsuite/objc.dg/symtab-1.m
@@ -21,4 +21,4 @@
-(void)checkValues { }
@end
-/* { dg-final { scan-assembler "L_OBJC_SYMBOLS:\n\t.long\t0\n\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived\n\t.long\tL_OBJC_CLASS_Base\n" } } */
+/* { dg-final { scan-assembler "L_OBJC_SYMBOLS.*:\n\t.long\t0\n\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived.*\n\t.long\tL_OBJC_CLASS_Base.*\n" } } */
diff --git a/gcc/testsuite/objc.dg/try-catch-1.m b/gcc/testsuite/objc.dg/try-catch-1.m
index e40fdf85994..c47e41c9601 100644
--- a/gcc/testsuite/objc.dg/try-catch-1.m
+++ b/gcc/testsuite/objc.dg/try-catch-1.m
@@ -1,11 +1,8 @@
-/* Test if the compiler accepts @throw / @try..@catch..@finally
- syntax. This will only be usable on MacOS X 10.3 and later. */
+/* Test if the compiler accepts @throw / @try..@catch..@finally syntax. */
/* Developed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-options "-fobjc-exceptions" } */
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile } */
-#include <objc/objc.h>
-#include <objc/objc-runtime.h>
#include <objc/Object.h>
#include <stdio.h>
#include <setjmp.h>
diff --git a/gcc/testsuite/objc.dg/try-catch-2.m b/gcc/testsuite/objc.dg/try-catch-2.m
index fc314f3f128..b2550da1148 100644
--- a/gcc/testsuite/objc.dg/try-catch-2.m
+++ b/gcc/testsuite/objc.dg/try-catch-2.m
@@ -2,11 +2,9 @@
all uncaught exceptions. */
/* Developed by Ziemowit Laski <zlaski@apple.com>. */
-/* { dg-options "-fobjc-exceptions -lobjc" } */
-/* { dg-do run { target *-*-darwin[789]* } } */
+/* { dg-options "-fobjc-exceptions" } */
+/* { dg-do run } */
-#include <objc/objc.h>
-#include <objc/objc-runtime.h>
#include <objc/Object.h>
#include <stdio.h>
@@ -72,10 +70,6 @@ void test (Object* sendPort)
CHECK_IF(!sendPort);
CHECK_IF(!cleanupPorts);
}
- @catch(Object *obj) { /* { dg-warning "Exception already handled by preceding .\\@catch\\(id\\)." } */
- printf ("Exception caught by incorrect handler!\n");
- CHECK_IF(0);
- }
}
int main (void) {
diff --git a/gcc/testsuite/objc.dg/try-catch-3.m b/gcc/testsuite/objc.dg/try-catch-3.m
index f49362fbf31..af2829e2c2f 100644
--- a/gcc/testsuite/objc.dg/try-catch-3.m
+++ b/gcc/testsuite/objc.dg/try-catch-3.m
@@ -2,7 +2,7 @@
@catch block. (Yes, I managed to break this.) */
/* Author: Ziemowit Laski <zlaski@apple.com> */
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile } */
/* { dg-options "-fobjc-exceptions" } */
#include <objc/Object.h>
diff --git a/gcc/testsuite/objc.dg/try-catch-4.m b/gcc/testsuite/objc.dg/try-catch-4.m
index 54aea233fed..dedcc4ec4f7 100644
--- a/gcc/testsuite/objc.dg/try-catch-4.m
+++ b/gcc/testsuite/objc.dg/try-catch-4.m
@@ -2,7 +2,7 @@
exceptions being caught by previous @catch blocks. */
/* Author: Ziemowit Laski <zlaski@apple.com> */
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile } */
/* { dg-options "-Wall -fobjc-exceptions" } */
@interface Exception
diff --git a/gcc/testsuite/objc.dg/type-size-2.m b/gcc/testsuite/objc.dg/type-size-2.m
index 446de48345a..da6bdb8f9fb 100644
--- a/gcc/testsuite/objc.dg/type-size-2.m
+++ b/gcc/testsuite/objc.dg/type-size-2.m
@@ -1,6 +1,6 @@
/* Make sure that array arguments to methods are given the size of pointers. */
/* As in the case of ivars, arrays without size (e.g., 'int []') are
- encoded as pointers as well. */
+ encoded as pointers. */
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do run } */
diff --git a/gcc/testsuite/objc.dg/zero-link-2.m b/gcc/testsuite/objc.dg/zero-link-2.m
index 92b4ab11b0c..8fba04230b6 100644
--- a/gcc/testsuite/objc.dg/zero-link-2.m
+++ b/gcc/testsuite/objc.dg/zero-link-2.m
@@ -25,4 +25,3 @@ int main(void) {
/* { dg-final { scan-assembler "_OBJC_CLASS_REFERENCES_0" } } */
/* { dg-final { scan-assembler-not "objc_getClass" } } */
-
diff --git a/gcc/testsuite/objc/execute/_cmd.m b/gcc/testsuite/objc/execute/_cmd.m
index f2b05b6527b..72c555e6d42 100644
--- a/gcc/testsuite/objc/execute/_cmd.m
+++ b/gcc/testsuite/objc/execute/_cmd.m
@@ -14,7 +14,7 @@
@end
@implementation TestClass
-+ (const char*) method;
++ (const char*) method
{
return sel_get_name (_cmd);
}
diff --git a/gcc/testsuite/objc/execute/next_mapping.h b/gcc/testsuite/objc/execute/next_mapping.h
index 67c2ce34257..0a361896e12 100644
--- a/gcc/testsuite/objc/execute/next_mapping.h
+++ b/gcc/testsuite/objc/execute/next_mapping.h
@@ -1,10 +1,12 @@
/* This file "renames" various ObjC GNU runtime entry points
(and fakes the existence of several others)
if the NeXT runtime is being used. */
-/* Author: Ziemowit Laski <zlaski@apple.com> */
+/* Authors: Ziemowit Laski <zlaski@apple.com> */
+/* David Ayers <d.ayers@inode.at> */
#ifdef __NEXT_RUNTIME__
#include <objc/objc-class.h>
+#include <objc/Object.h>
#include <ctype.h>
#define objc_get_class(C) objc_getClass(C)
@@ -848,4 +850,52 @@ void objc_layout_structure_get_info (struct objc_struct_layout *layout,
*type = layout->prev_type;
}
+/* A small, portable NSConstantString implementation for use with the NeXT
+ runtime.
+
+ On full-fledged Mac OS X systems, NSConstantString is provided
+ as part of the Foundation framework. However, on bare Darwin systems,
+ Foundation is not included, and hence there is no NSConstantString
+ implementation to link against.
+
+ This code is derived from the GNU runtime's NXConstantString implementation.
+*/
+
+struct objc_class _NSConstantStringClassReference;
+
+@interface NSConstantString : Object
+{
+ char *c_string;
+ unsigned int len;
+}
+
+-(const char *) cString;
+-(unsigned int) length;
+
+@end
+
+@implementation NSConstantString
+
+-(const char *) cString
+{
+ return (c_string);
+}
+
+-(unsigned int) length
+{
+ return (len);
+}
+
+@end
+
+/* The NSConstantString metaclass will need to be initialized before we can
+ send messages to strings. */
+
+void objc_constant_string_init (void) __attribute__((constructor));
+void objc_constant_string_init (void) {
+ memcpy (&_NSConstantStringClassReference,
+ objc_getClass ("NSConstantString"),
+ sizeof (_NSConstantStringClassReference));
+}
+
#endif /* #ifdef __NEXT_RUNTIME__ */
diff --git a/gcc/testsuite/objc/execute/string1.m b/gcc/testsuite/objc/execute/string1.m
index 58a603c1f1f..ac49bd1f4f3 100644
--- a/gcc/testsuite/objc/execute/string1.m
+++ b/gcc/testsuite/objc/execute/string1.m
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "next_mapping.h"
#else
#include <objc/NXConstStr.h>
#endif
diff --git a/gcc/testsuite/objc/execute/string2.m b/gcc/testsuite/objc/execute/string2.m
index 01fb85c1189..63b0e9b8056 100644
--- a/gcc/testsuite/objc/execute/string2.m
+++ b/gcc/testsuite/objc/execute/string2.m
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "next_mapping.h"
#else
#include <objc/NXConstStr.h>
#endif
diff --git a/gcc/testsuite/objc/execute/string3.m b/gcc/testsuite/objc/execute/string3.m
index a8d29696899..442952478b7 100644
--- a/gcc/testsuite/objc/execute/string3.m
+++ b/gcc/testsuite/objc/execute/string3.m
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "next_mapping.h"
#else
#include <objc/NXConstStr.h>
#endif
diff --git a/gcc/testsuite/objc/execute/string4.m b/gcc/testsuite/objc/execute/string4.m
index 16025cbaed6..87b081c084d 100644
--- a/gcc/testsuite/objc/execute/string4.m
+++ b/gcc/testsuite/objc/execute/string4.m
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "next_mapping.h"
#else
#include <objc/NXConstStr.h>
#endif
diff --git a/gcc/testsuite/treelang/ChangeLog b/gcc/testsuite/treelang/ChangeLog
index ca767d024fc..c60765b837c 100644
--- a/gcc/testsuite/treelang/ChangeLog
+++ b/gcc/testsuite/treelang/ChangeLog
@@ -1,3 +1,24 @@
+2004-10-02 James A. Morrison <phython@gcc.gnu.org>
+
+ * compile/autofunc.tree: New File.
+ * compile/badchar.tree: New File.
+ * compile/externvar.tree: New File.
+ * compile/mismatch.tree: New File.
+ * compile/noproto.tree: New File.
+ * compile/novar.tree: New File.
+ * compile/var_defs.tree: Add duplicate variable.
+
+2004-07-31 James A. Morrison <phython@gcc.gnu.org>
+
+ * compile/vars_def.tree: New File.
+ * compile/badreturn.tree: New File.
+
+2004-01-18 James A. Morrison <ja2morri@uwaterloo.ca>
+
+ * compile/compile.exp: New File.
+ * compile/tabs.tree: Test whether the front end
+ compiles code with tabs in it.
+
2003-02-25 Tim Josling <tej@melbpc.org.au>
* treetests.exp (run3): set options to force aggressive GC, to
diff --git a/gcc/testsuite/treelang/a01gcci01.c b/gcc/testsuite/treelang/a01gcci01.c
index 4d857fac9cb..b7140199d4d 100644
--- a/gcc/testsuite/treelang/a01gcci01.c
+++ b/gcc/testsuite/treelang/a01gcci01.c
@@ -27,6 +27,7 @@
int add(int, int);
int subtract(int, int);
int first_nonzero(int, int);
+extern int printf(char *template, ...);
int
main (int argc, char *argv[])