├── evaluation ├── ddfuzz │ ├── mem-funcs │ │ ├── faust.txt │ │ ├── mir.txt │ │ ├── pcre2.txt │ │ ├── qbe.txt │ │ └── bison.txt │ └── seeds │ │ ├── faust │ │ ├── effect.dsp │ │ ├── error24.dsp │ │ ├── multirate_2.dsp │ │ ├── multirate_3.dsp │ │ ├── badfaust.dsp │ │ ├── multirate_1.dsp │ │ ├── multirate_4.dsp │ │ ├── numsimplerr2.dsp │ │ ├── numsimplerr5.dsp │ │ ├── numsimplerr7.dsp │ │ ├── uselessrec.dsp │ │ ├── exp10.dsp │ │ ├── numsimplerr6.dsp │ │ ├── t1.dsp │ │ ├── test13.dsp │ │ ├── dimensioncheck_2.dsp │ │ ├── good.dsp │ │ ├── test12.dsp │ │ ├── test14.dsp │ │ ├── dimensioncheck_3.dsp │ │ ├── mr_delay.dsp │ │ ├── mr_prim.dsp │ │ ├── multirate_5.dsp │ │ ├── multirate_6.dsp │ │ ├── numsimplerr8.dsp │ │ ├── partialapp.dsp │ │ ├── test010.dsp │ │ ├── dimensioncheck_1.dsp │ │ ├── dimensioncheck_6.dsp │ │ ├── dimensioncheck_7.dsp │ │ ├── mr_binop.dsp │ │ ├── mr_cast.dsp │ │ ├── dimensioncheck_4.dsp │ │ ├── dimensioncheck_5.dsp │ │ ├── intcast01.dsp │ │ ├── test10.dsp │ │ ├── testpow1.dsp │ │ ├── testpow2.dsp │ │ ├── clipped_samplerate.dsp │ │ ├── foo.dsp │ │ ├── test2.dsp │ │ ├── badcpp.dsp │ │ ├── t3.dsp │ │ ├── test21.dsp │ │ ├── k-min.dsp │ │ ├── numsimplerr3.dsp │ │ ├── shareFixDelays.dsp │ │ ├── test19.dsp │ │ ├── test5.dsp │ │ ├── test5b.dsp │ │ ├── waveform3.dsp │ │ ├── 20091211-hbg-bug.dsp │ │ ├── PM-bug3bis.dsp │ │ ├── t2.dsp │ │ ├── delay01.dsp │ │ ├── sharedelays.dsp │ │ ├── sound.dsp │ │ ├── PM-bug3tris.dsp │ │ ├── error25.dsp │ │ ├── error26.dsp │ │ ├── numsimplerr1.dsp │ │ ├── test6.dsp │ │ ├── waveform2.dsp │ │ ├── floatcastbug.dsp │ │ ├── k-alias.dsp │ │ ├── test7.dsp │ │ ├── find-import.dsp │ │ ├── numsimplerr4.dsp │ │ ├── shortdelays.dsp │ │ ├── test24.dsp │ │ ├── testif1.dsp │ │ ├── v1.dsp │ │ ├── v2.dsp │ │ ├── waveform6.dsp │ │ ├── path2d.dsp │ │ ├── ratepass_1.dsp │ │ ├── ratepass_6.dsp │ │ ├── ratepass_7.dsp │ │ ├── test18.dsp │ │ ├── test8.dsp │ │ ├── testif2.dsp │ │ ├── tp0.dsp │ │ ├── tp2.dsp │ │ ├── bug-power-partialappl.dsp │ │ ├── mr_ffun.dsp │ │ ├── path2c.dsp │ │ ├── rateconflict_1.dsp │ │ ├── ratepass_11.dsp │ │ ├── ratepass_2.dsp │ │ ├── ratepass_4.dsp │ │ ├── ratepass_9.dsp │ │ ├── schema1.dsp │ │ ├── error27-tblsize-nonconst.dsp │ │ ├── intcast02.dsp │ │ ├── ratepass_5.dsp │ │ ├── test25.dsp │ │ ├── test9.dsp │ │ ├── waveform1.dsp │ │ ├── ratepass_12.dsp │ │ ├── test23.dsp │ │ ├── 20091213-empty-label-bug.dsp │ │ ├── test11.dsp │ │ ├── delay02.dsp │ │ ├── path2b.dsp │ │ ├── test17.dsp │ │ ├── v3.dsp │ │ ├── castsimplify.dsp │ │ ├── waveform4.dsp │ │ ├── error23.dsp │ │ ├── ratepass_8.dsp │ │ ├── test27.dsp │ │ ├── test22.dsp │ │ ├── test26.dsp │ │ ├── slowdelay1.dsp │ │ ├── bug20100223.dsp │ │ ├── schema2.dsp │ │ ├── waveform5.dsp │ │ ├── PM-bug5.dsp │ │ ├── associativity.dsp │ │ ├── error22.dsp │ │ ├── mr_oversample.dsp │ │ ├── path1.dsp │ │ ├── error07.dsp │ │ ├── mr_undersample.dsp │ │ ├── path2.dsp │ │ ├── ratepass_10.dsp │ │ ├── shortdelays2.dsp │ │ ├── autocast.dsp │ │ ├── felix1.dsp │ │ ├── path3.dsp │ │ ├── rateconflict_2.dsp │ │ ├── ratepass_3.dsp │ │ ├── PM-bug11.dsp │ │ ├── PM-bug12.dsp │ │ ├── error02.dsp │ │ ├── PM-bug19.dsp │ │ ├── PM-bug3-4.dsp │ │ ├── error03.dsp │ │ ├── path4.dsp │ │ ├── PM-bug7.dsp │ │ ├── error08.dsp │ │ ├── 20100120b-bug.dsp │ │ ├── test3.dsp │ │ ├── error01.dsp │ │ ├── 20aout08.dsp │ │ ├── error06.dsp │ │ ├── test4.dsp │ │ ├── APF.dsp │ │ ├── BPF.dsp │ │ ├── HPF.dsp │ │ ├── LPF.dsp │ │ ├── notch.dsp │ │ ├── osc_enable.dsp │ │ ├── comb_delay1.dsp │ │ ├── comb_delay2.dsp │ │ ├── highShelf.dsp │ │ ├── lowShelf.dsp │ │ ├── peakNotch.dsp │ │ ├── peakingEQ.dsp │ │ ├── PM-bug3.dsp │ │ ├── table1.dsp │ │ ├── t5.dsp │ │ ├── k.dsp │ │ ├── spectral_level.dsp │ │ ├── schema5.dsp │ │ ├── error05.dsp │ │ ├── PM-bug13.dsp │ │ ├── SHbug.dsp │ │ ├── delays.dsp │ │ ├── test14bis.dsp │ │ ├── 20180424-env-bug.dsp │ │ ├── PM-bug17.dsp │ │ ├── logical.dsp │ │ ├── 20180211-bug.dsp │ │ ├── error04.dsp │ │ ├── bs.dsp │ │ ├── schema4.dsp │ │ ├── v4.dsp │ │ ├── PM-bug4.dsp │ │ ├── test15.dsp │ │ ├── virtual_analog_oscillators.dsp │ │ ├── PM-bug10.dsp │ │ ├── reverb_designer.dsp │ │ ├── parabolic-env.dsp │ │ ├── 20100120-bug.dsp │ │ ├── t6.dsp │ │ ├── schema3.dsp │ │ ├── test20.dsp │ │ ├── bug-sampo-power.dsp │ │ ├── prefix.dsp │ │ ├── bug127.dsp │ │ ├── cubic_distortion.dsp │ │ ├── PM-bug2.dsp │ │ ├── parametric_eq.dsp │ │ ├── test-max-int.dsp │ │ └── BUG20180710.dsp │ │ ├── pcre2 │ │ └── id:000000,time:0,orig:seed │ │ ├── .DS_Store │ │ ├── mir │ │ ├── 920618-1.c │ │ ├── 920409-1.c │ │ ├── 20011128-1.c │ │ ├── 20040705-2.c │ │ ├── 20040705-1.c │ │ ├── 920829-1.c │ │ ├── 920731-1.c │ │ ├── 920721-1.c │ │ ├── 920603-1.c │ │ ├── 920812-1.c │ │ ├── 921019-2.c │ │ ├── 961017-1.c │ │ ├── 920428-1.c │ │ ├── 920506-1.c │ │ ├── README.md │ │ ├── 20140326-1.c │ │ ├── 991030-1.c │ │ ├── 20001221-1.c │ │ ├── 921016-1.c │ │ ├── 921104-1.c │ │ ├── mod-1.c │ │ ├── 20020911-1.c │ │ ├── 960219-1.c │ │ ├── 20001112-1.c │ │ ├── 980602-1.c │ │ ├── pr58387.c │ │ ├── 20000519-2.c │ │ ├── 20040706-1.c │ │ ├── 20091229-1.c │ │ ├── pr59388.c │ │ ├── 920429-1.c │ │ ├── 950605-1.c │ │ ├── pr23941.c │ │ ├── 20010222-1.c │ │ ├── 20011217-1.c │ │ ├── 920501-1.c │ │ ├── 20001009-1.c │ │ ├── 920604-1.c │ │ ├── 921218-1.c │ │ ├── 930527-1.c │ │ ├── 930916-1.c │ │ ├── 961112-1.c │ │ ├── 961122-2.c │ │ ├── inst-check.c │ │ ├── pr34070-1.c │ │ ├── 20030128-1.c │ │ ├── 20080408-1.c │ │ ├── 921123-1.c │ │ ├── bf-layout-1.c │ │ ├── pr35390.c │ │ ├── pr43629.c │ │ ├── 930429-2.c │ │ ├── 950607-1.c │ │ ├── pr71335.c │ │ ├── 20000717-2.c │ │ ├── 20010711-1.c │ │ ├── 20011114-1.c │ │ ├── 20070724-1.c │ │ ├── 920909-1.c │ │ ├── 921202-2.c │ │ ├── 921207-1.c │ │ ├── 931110-2.c │ │ ├── 960402-1.c │ │ ├── pr33779-2.c │ │ ├── pr34070-2.c │ │ ├── 20011109-2.c │ │ ├── 931012-1.c │ │ ├── 960419-2.c │ │ ├── 990324-1.c │ │ ├── pr69097-1.c │ │ ├── 941025-1.c │ │ ├── pr34982.c │ │ ├── pr36077.c │ │ ├── pr52209.c │ │ ├── 20000121-1.c │ │ ├── 20000503-1.c │ │ ├── 20040707-1.c │ │ ├── 930429-1.c │ │ ├── 931208-1.c │ │ ├── 940115-1.c │ │ ├── 941101-1.c │ │ ├── scope-1.c │ │ ├── 950511-1.c │ │ ├── 991202-1.c │ │ ├── 20060127-1.c │ │ ├── 931228-1.c │ │ ├── 960321-1.c │ │ ├── 960419-1.c │ │ ├── divconst-3.c │ │ ├── pr19515.c │ │ ├── pr33779-1.c │ │ ├── pr56250.c │ │ ├── 20030821-1.c │ │ ├── 20040208-1.c │ │ ├── 930702-1.c │ │ ├── pr34099.c │ │ ├── pr48973-2.c │ │ ├── 20010520-1.c │ │ ├── 20080529-1.c │ │ ├── 941110-1.c │ │ ├── 960326-1.c │ │ ├── pr20187-1.c │ │ ├── pr49123.c │ │ ├── 20010422-1.c │ │ ├── 20021119-1.c │ │ ├── 20030316-1.c │ │ ├── 20040704-1.c │ │ ├── 950915-1.c │ │ ├── 990106-1.c │ │ ├── 990222-1.c │ │ ├── 990604-1.c │ │ ├── 991202-2.c │ │ ├── pr21964-1.c │ │ ├── pr22348.c │ │ ├── pr42512.c │ │ ├── 20000412-5.c │ │ ├── 20090623-1.c │ │ ├── pr31136.c │ │ ├── pr33631.c │ │ ├── 20000715-2.c │ │ ├── 20051104-1.c │ │ ├── 20090207-1.c │ │ ├── 20100209-1.c │ │ ├── 930818-1.c │ │ ├── pr36691.c │ │ ├── pr44555.c │ │ ├── 20000731-2.c │ │ ├── 20010723-1.c │ │ ├── 930123-1.c │ │ ├── 950706-1.c │ │ ├── 20010221-1.c │ │ ├── 20071011-1.c │ │ ├── 921208-1.c │ │ ├── 990117-1.c │ │ ├── pr49186.c │ │ ├── pr51023.c │ │ ├── ptr-arith-1.c │ │ ├── struct-ini-1.c │ │ ├── 20021118-3.c │ │ ├── 920922-1.c │ │ ├── 931110-1.c │ │ ├── loop-4.c │ │ ├── pr22429.c │ │ ├── pr31605.c │ │ ├── pr42544.c │ │ ├── 20000412-2.c │ │ ├── 20010206-1.c │ │ ├── 20011019-1.c │ │ ├── 20150611-1.c │ │ ├── 921218-2.c │ │ ├── 940122-1.c │ │ ├── 950426-2.c │ │ ├── func-ptr-1.c │ │ ├── loop-1.c │ │ ├── loop-14.c │ │ ├── loop-2.c │ │ ├── pr21331.c │ │ ├── pr29797-2.c │ │ ├── pr35163.c │ │ ├── 20000205-1.c │ │ ├── 20040319-1.c │ │ ├── 20070212-2.c │ │ ├── 20071205-1.c │ │ ├── 961026-1.c │ │ ├── pr24142.c │ │ ├── 20000314-1.c │ │ ├── 20030403-1.c │ │ ├── 20030718-1.c │ │ ├── 920710-1.c │ │ ├── 951115-1.c │ │ ├── 951204-1.c │ │ ├── 960218-1.c │ │ ├── 980424-1.c │ │ ├── 980604-1.c │ │ ├── 980929-1.c │ │ ├── loop-6.c │ │ ├── pr46019.c │ │ ├── pr48814-2.c │ │ ├── vrp-4.c │ │ ├── 20000819-1.c │ │ ├── 20031211-2.c │ │ ├── 960405-1.c │ │ ├── loop-11.c │ │ ├── pr58385.c │ │ ├── 20020225-2.c │ │ ├── 20050131-1.c │ │ ├── 930921-1.c │ │ ├── 980618-1.c │ │ ├── pr19689.c │ │ ├── pr22630.c │ │ ├── 20000706-4.c │ │ ├── 20001013-1.c │ │ ├── 20030120-2.c │ │ ├── 20060110-1.c │ │ ├── 950503-1.c │ │ ├── 961004-1.c │ │ ├── loop-7.c │ │ ├── pr44828.c │ │ ├── pr48973-1.c │ │ ├── pr69320-3.c │ │ ├── vrp-1.c │ │ ├── 20000605-3.c │ │ ├── 930614-1.c │ │ ├── 960116-1.c │ │ ├── pr22098-2.c │ │ ├── pr85582-1.c │ │ ├── vrp-2.c │ │ ├── 20001130-1.c │ │ ├── 20040313-1.c │ │ ├── 981206-1.c │ │ ├── 20030920-1.c │ │ ├── 930622-1.c │ │ ├── pr22098-1.c │ │ ├── 20011126-1.c │ │ ├── 920202-1.c │ │ ├── 950621-1.c │ │ ├── 980612-1.c │ │ ├── pr40404.c │ │ ├── 20001017-2.c │ │ ├── 20021010-1.c │ │ ├── 20021120-2.c │ │ ├── loop-2d.c │ │ ├── loop-4b.c │ │ ├── pr29797-1.c │ │ ├── 20020904-1.c │ │ ├── 20021219-1.c │ │ ├── 20050104-1.c │ │ ├── 931005-1.c │ │ ├── loop-9.c │ │ ├── multdi-1.c │ │ ├── pr38422.c │ │ ├── 930126-1.c │ │ ├── 941021-1.c │ │ ├── 950714-1.c │ │ ├── 990829-1.c │ │ ├── 990923-1.c │ │ ├── 991216-4.c │ │ ├── pr58662.c │ │ ├── 20000412-1.c │ │ ├── 20000528-1.c │ │ ├── 930713-1.c │ │ ├── 960302-1.c │ │ ├── 991023-1.c │ │ ├── vrp-3.c │ │ ├── 930603-2.c │ │ ├── 951003-1.c │ │ ├── 980506-2.c │ │ ├── pr17078-1.c │ │ ├── 20000225-1.c │ │ ├── 20000605-2.c │ │ ├── 20000731-1.c │ │ ├── 20010604-1.c │ │ ├── 20020127-1.c │ │ ├── 20021118-1.c │ │ ├── 20060102-1.c │ │ ├── 20100805-1.c │ │ ├── 921013-1.c │ │ ├── 930719-1.c │ │ ├── loop-3.c │ │ ├── pr23604.c │ │ ├── pr57875.c │ │ ├── 20000706-3.c │ │ ├── 20000717-1.c │ │ ├── 20020819-1.c │ │ ├── 20020916-1.c │ │ ├── 20040820-1.c │ │ ├── 20041210-1.c │ │ ├── 950929-1.c │ │ ├── 991221-1.c │ │ ├── loop-2b.c │ │ ├── 20080222-1.c │ │ ├── 960301-1.c │ │ ├── pr24851.c │ │ ├── pr69320-4.c │ │ ├── 921124-1.c │ │ ├── 960317-1.c │ │ ├── pr22098-3.c │ │ ├── 20000217-1.c │ │ ├── 20000419-1.c │ │ ├── 20040831-1.c │ │ ├── 921112-1.c │ │ ├── 991202-3.c │ │ ├── pr42721.c │ │ ├── 20051012-1.c │ │ ├── 930622-2.c │ │ ├── 980602-2.c │ │ ├── 990527-1.c │ │ ├── loop-3b.c │ │ ├── pr57321.c │ │ ├── 20000717-3.c │ │ ├── 980526-3.c │ │ ├── pr41317.c │ │ ├── pr41917.c │ │ ├── 20000523-1.c │ │ ├── 20070212-1.c │ │ ├── 930208-1.c │ │ ├── 930513-1.c │ │ ├── 930518-1.c │ │ ├── divconst-1.c │ │ ├── pr37125.c │ │ ├── pr48717.c │ │ ├── 20000722-1.c │ │ ├── loop-8.c │ │ ├── 20000622-1.c │ │ ├── 20000707-1.c │ │ ├── 20030203-1.c │ │ ├── 20060110-2.c │ │ ├── 921123-2.c │ │ ├── 970923-1.c │ │ ├── 980709-1.c │ │ ├── 990525-1.c │ │ ├── index-1.c │ │ ├── pr57131.c │ │ ├── 20010717-1.c │ │ ├── 20011115-1.c │ │ ├── 20020328-1.c │ │ ├── 930513-2.c │ │ ├── 960513-1.c │ │ ├── 20030828-1.c │ │ ├── 961122-1.c │ │ ├── pr37931.c │ │ ├── 20010123-1.c │ │ ├── 921208-2.c │ │ ├── 20000314-2.c │ │ ├── 20010114-1.c │ │ ├── 920721-3.c │ │ ├── 990827-1.c │ │ ├── pr68911.c │ │ ├── vrp-5.c │ │ ├── 20000313-1.c │ │ ├── 960909-1.c │ │ └── 980505-2.c │ │ ├── qbe │ │ ├── _rpo.ssa │ │ ├── _fix1.ssa │ │ ├── _fix2.ssa │ │ ├── fixarg.ssa │ │ ├── _fix3.ssa │ │ ├── align.ssa │ │ ├── cup.ssa │ │ └── ldhoist.ssa │ │ └── bison │ │ └── hello.y └── README.magma.md ├── img └── dataflow-paper.png ├── lib ├── Transforms │ └── CMakeLists.txt └── CMakeLists.txt ├── .gitignore └── .gitmodules /evaluation/ddfuzz/mem-funcs/faust.txt: -------------------------------------------------------------------------------- 1 | [fuzzalloc] 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/effect.dsp: -------------------------------------------------------------------------------- 1 | process = _; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error24.dsp: -------------------------------------------------------------------------------- 1 | 2 | process = : 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/multirate_2.dsp: -------------------------------------------------------------------------------- 1 | process = [](0); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/multirate_3.dsp: -------------------------------------------------------------------------------- 1 | process = <:#; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/badfaust.dsp: -------------------------------------------------------------------------------- 1 | process = foo; 2 | 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/multirate_1.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(4); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/multirate_4.dsp: -------------------------------------------------------------------------------- 1 | process = serialize; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr2.dsp: -------------------------------------------------------------------------------- 1 | process = (0,0) + 0; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr5.dsp: -------------------------------------------------------------------------------- 1 | process = 0,0,0 : +; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr7.dsp: -------------------------------------------------------------------------------- 1 | process = 0,0 : mem; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/uselessrec.dsp: -------------------------------------------------------------------------------- 1 | process = *(3)~!; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/exp10.dsp: -------------------------------------------------------------------------------- 1 | process = pow(10, _); 2 | 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr6.dsp: -------------------------------------------------------------------------------- 1 | process = 0,0 : sin; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/t1.dsp: -------------------------------------------------------------------------------- 1 | main = +; 2 | 3 | process = 3.14; 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test13.dsp: -------------------------------------------------------------------------------- 1 | 2 | process = (+ <: _, cos)~ sin; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/dimensioncheck_2.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(4):[](0); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/good.dsp: -------------------------------------------------------------------------------- 1 | process = 0.01 : (+,1.0:fmod)~_; 2 | 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test12.dsp: -------------------------------------------------------------------------------- 1 | 2 | t(x,y) = x-y, y-x; 3 | process = t~_; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test14.dsp: -------------------------------------------------------------------------------- 1 | 2 | process = (+ <: _, cos)~ sin : _,!; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/dimensioncheck_3.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(2)<:#:serialize; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/mr_delay.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(4):serialize:@(3); 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/mr_prim.dsp: -------------------------------------------------------------------------------- 1 | process = abs:vectorize(4):serialize:abs; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/multirate_5.dsp: -------------------------------------------------------------------------------- 1 | process = _ : (vectorize(4),abs) ~ sqrt ; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/multirate_6.dsp: -------------------------------------------------------------------------------- 1 | process = * ~ (vectorize(4) : [](0))); 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr8.dsp: -------------------------------------------------------------------------------- 1 | process = (0,1:+), (0,2:-), (0,3:*) : -; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/partialapp.dsp: -------------------------------------------------------------------------------- 1 | X = (2,3); 2 | process = *(!)(!,X,!); 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test010.dsp: -------------------------------------------------------------------------------- 1 | // bug dominique 2 | 3 | process = _:_; 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/mem-funcs/mir.txt: -------------------------------------------------------------------------------- 1 | [fuzzalloc] 2 | fun:gen_malloc 3 | fun:c2mir_calloc 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/dimensioncheck_1.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(4):serialize; 2 | 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/dimensioncheck_6.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(2)<:/:serialize; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/dimensioncheck_7.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(2),2:*:serialize; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/mr_binop.dsp: -------------------------------------------------------------------------------- 1 | process = *(2):vectorize(4):serialize:+(1); 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/mr_cast.dsp: -------------------------------------------------------------------------------- 1 | process = int:vectorize(4):serialize:float; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/mem-funcs/pcre2.txt: -------------------------------------------------------------------------------- 1 | [fuzzalloc] 2 | fun:default_malloc 3 | fun:memctl_malloc 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/mem-funcs/qbe.txt: -------------------------------------------------------------------------------- 1 | [fuzzalloc] 2 | fun:emalloc 3 | fun:alloc 4 | fun:vnew 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/dimensioncheck_4.dsp: -------------------------------------------------------------------------------- 1 | process = * ~ (vectorize(4) : serialize); 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/dimensioncheck_5.dsp: -------------------------------------------------------------------------------- 1 | process = vectorize(2)<:+:abs:serialize; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/pcre2/id:000000,time:0,orig:seed: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000 2 | -------------------------------------------------------------------------------- /img/dataflow-paper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HexHive/datAFLow/HEAD/img/dataflow-paper.png -------------------------------------------------------------------------------- /lib/Transforms/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(Instrumentation) 2 | add_subdirectory(Utils) 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/intcast01.dsp: -------------------------------------------------------------------------------- 1 | process = int(int(hslider("toto", 0, -10, 10, 0.1))) : int; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test10.dsp: -------------------------------------------------------------------------------- 1 | // partage des expressions lentes 2 | 3 | process = +~_; 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/testpow1.dsp: -------------------------------------------------------------------------------- 1 | // Test real if 2 | 3 | process(x) = x^2 : *(x); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/testpow2.dsp: -------------------------------------------------------------------------------- 1 | // Test real if 2 | 3 | process(x) = 2*x^2 : /(x); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/clipped_samplerate.dsp: -------------------------------------------------------------------------------- 1 | import("math.lib"); 2 | process = _,(SR:float):@; 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/foo.dsp: -------------------------------------------------------------------------------- 1 | import("stdfaust.lib"); 2 | process = os.osc(400),os.osc(600); 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test2.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | process = TF2(1.25,1.73,1,1.73,1); 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/badcpp.dsp: -------------------------------------------------------------------------------- 1 | process = ffunction(float foof|foo|fool (float), ,""); 2 | 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/t3.dsp: -------------------------------------------------------------------------------- 1 | import("stdfaust.lib"); 2 | 3 | process = +; 4 | 5 | main = dm.zita_light; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test21.dsp: -------------------------------------------------------------------------------- 1 | 2 | d = hslider("delay", 0, 0, 1000, 1) : int; 3 | process = @(d); 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HexHive/datAFLow/HEAD/evaluation/ddfuzz/seeds/.DS_Store -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/k-min.dsp: -------------------------------------------------------------------------------- 1 | 2 | vol = hslider("volume", 0.2, 0, 1, 0.1); 3 | process = 1 * vol; 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr3.dsp: -------------------------------------------------------------------------------- 1 | 2 | import("stdfaust.lib"); 3 | 4 | process = ba.take((1,1), (1,1)); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/shareFixDelays.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | process = _ <: @(200), @(300) : +; 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test19.dsp: -------------------------------------------------------------------------------- 1 | // example of simplification 2 | 3 | foo = +~@(1000); 4 | 5 | process = foo; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test5.dsp: -------------------------------------------------------------------------------- 1 | fii(x) = (x+x')/2; 2 | foo = +~fii; 3 | 4 | process = foo : mem : mem; 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test5b.dsp: -------------------------------------------------------------------------------- 1 | fii(x) = (x+x')/2; 2 | foo = +~fii; 3 | 4 | process = foo : mem : mem; 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/waveform3.dsp: -------------------------------------------------------------------------------- 1 | process = waveform {1.1,2.2,3.3,4.4,5.5,6.6,7.7}, %(7)~+(3) : rdtable; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/20091211-hbg-bug.dsp: -------------------------------------------------------------------------------- 1 | // Faust Template 2 | process = hbargraph("toto", -1, 1); 3 | 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug3bis.dsp: -------------------------------------------------------------------------------- 1 | fact (0) = 1; 2 | fact (n) = n*fact(n-1); 3 | 4 | 5 | process = fact(6); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/t2.dsp: -------------------------------------------------------------------------------- 1 | // test that -pn option doesn't pass inside components 2 | main = component("foo.lib"); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920618-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main(){if(1.17549435e-38F<=1.1)exit(0);abort();} 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/delay01.dsp: -------------------------------------------------------------------------------- 1 | // now @ accepts float delays converted to int automatically 2 | process = @(7.3); 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/sharedelays.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | process = _ <: delay1s(200), delay1s(300) : +; 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/sound.dsp: -------------------------------------------------------------------------------- 1 | 2 | process = 0,_~+(1):soundfile("son[url:{'sound1';'sound2'}]",4):!,!,_,_,_,_; 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug3tris.dsp: -------------------------------------------------------------------------------- 1 | fact (0) = 1; 2 | fact (n) = n*fact(n-1); 3 | 4 | 5 | 6 | process = fact(6); 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error25.dsp: -------------------------------------------------------------------------------- 1 | nlf2(c,s) = (*(c),*(s),*(0-s),*(c)) :> (_,_) ~ (_,_); 2 | process = nlf2(1000,1); 3 | 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error26.dsp: -------------------------------------------------------------------------------- 1 | nlf2(c,s) = (*(c),*(s),*(0-s),*(c)) <: (_,_) ~ (_,_); 2 | process = nlf2(1000,1); 3 | 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr1.dsp: -------------------------------------------------------------------------------- 1 | bad(1) = 0; 2 | bad(n) = bad(n-1); 3 | process = bad((1,1)); 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test6.dsp: -------------------------------------------------------------------------------- 1 | fii(x) = (x+x')/2; 2 | foo = +~sin; 3 | faa = +~sin; 4 | 5 | process = _ <: foo + faa ; 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/waveform2.dsp: -------------------------------------------------------------------------------- 1 | process = waveform {10,20,30,40,50,60,70}, ((%(7)~+(3)):max(0):min(7-1)) : rdtable; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/floatcastbug.dsp: -------------------------------------------------------------------------------- 1 | // variable (but bounded) delays using the @ operator 2 | 3 | 4 | process = float(10); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/k-alias.dsp: -------------------------------------------------------------------------------- 1 | 2 | vol = hslider("volume [osc:/vol 0 10]", 0.1, 0, 1, 0.1); 3 | process = 1 * vol; 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test7.dsp: -------------------------------------------------------------------------------- 1 | fii(x) = (x+x')/2; 2 | foo = +~sin; 3 | faa = +~sin; 4 | 5 | process = +~fii : mem : mem; 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920409-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | x(){signed char c=-1;return c<0;}main(){if(x()!=1)abort();exit(0);} 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/find-import.dsp: -------------------------------------------------------------------------------- 1 | // check that imported libraries are found 2 | import("music.lib"); 3 | 4 | process = noise; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/numsimplerr4.dsp: -------------------------------------------------------------------------------- 1 | import("stdfaust.lib"); 2 | 3 | bad(1) = 0; 4 | bad(n) = bad(n-1); 5 | process = bad((1,1)); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/shortdelays.dsp: -------------------------------------------------------------------------------- 1 | // check short delay are correctly compiled 2 | 3 | process = _ <: sum(i,4, @(i+4)/(i+1)); 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test24.dsp: -------------------------------------------------------------------------------- 1 | //Variante du bug de Julius Smith 2 | 3 | x = hslider("toto", 0, 0, 100, 1); 4 | process = x-x',3*x; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/testif1.dsp: -------------------------------------------------------------------------------- 1 | // Test real if 2 | if(c,t,e) = select2(c,e,t); 3 | 4 | process(x) = if(x<0, 0, x) : abs; 5 | 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/v1.dsp: -------------------------------------------------------------------------------- 1 | // route visualisation test 2 | 3 | //process = +: _: abs; 4 | 5 | process = + : route(1,1,1,1) : abs; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/v2.dsp: -------------------------------------------------------------------------------- 1 | // route visualisation test 2 | 3 | //process = +: _: abs; 4 | 5 | process = route(3,2,1,2,3,1) : *; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/waveform6.dsp: -------------------------------------------------------------------------------- 1 | w1(x) = waveform {10,20,30,40,50,60},int(x):rdtable; 2 | 3 | process(x,y) = y*(sin(w1(4*abs(x)))); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/path2d.dsp: -------------------------------------------------------------------------------- 1 | foo(x) = vgroup( "foo", x); 2 | 3 | process = tgroup("toto", foo(hslider("slid2", 0,0,1,0.1))); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_1.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw2 = vectorize(2) : [0]; 4 | 5 | process = up2 ~ dw2; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_6.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | dw2 = vectorize(2) : [0]; 3 | process = ((up2) ~ dw2, dw2):+; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_7.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw3 = vectorize(3) : [0]; 4 | 5 | process = up2 : dw3; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test18.dsp: -------------------------------------------------------------------------------- 1 | // example of simplification 2 | 3 | xchg = _,_ <: !,_,_,!; 4 | Z1 = xchg~_ : !,_; 5 | 6 | process = Z1; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test8.dsp: -------------------------------------------------------------------------------- 1 | // partage des expressions interieur exterieur 2 | 3 | foo = +~sin; 4 | 5 | process = foo : mem : sin; 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/testif2.dsp: -------------------------------------------------------------------------------- 1 | // Test real if 2 | if(c,t,e) = select2(c,e,t); 3 | 4 | process(x) = if(x<0, 0, int(x)) : abs; 5 | 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/tp0.dsp: -------------------------------------------------------------------------------- 1 | import("stdfaust.lib"); 2 | 3 | process = 0,_~+(1):soundfile("sound[url:{'tango.wav'}]",2):!,!,_,_; 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/tp2.dsp: -------------------------------------------------------------------------------- 1 | // error detection 2 | 3 | process = nentry("part",0, -10, 10, 1), +(1)~_ : soundfile("tango.wav",4); 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/bug-power-partialappl.dsp: -------------------------------------------------------------------------------- 1 | // With faust 0.9.22 '^(2)' is not equivalent to '_^2' 2 | process = ^(2), _^2, /(2); 3 | 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/mr_ffun.dsp: -------------------------------------------------------------------------------- 1 | asinh = ffunction ( float asinhf(float), , ""); 2 | process = asinh:vectorize(4):serialize:asinh; 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/path2c.dsp: -------------------------------------------------------------------------------- 1 | foo(x) = vgroup( "foo", x); 2 | 3 | process = tgroup("toto", foo(hslider("../slid2", 0,0,1,0.1))); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/rateconflict_1.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw3 = vectorize(3) : [0]; 4 | 5 | process = up2 ~ dw3; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_11.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | dw2 = vectorize(2) : [0]; 3 | 4 | process = (up2,dw2) ~ (dw2,up2); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_2.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw2 = vectorize(2) : [0]; 4 | 5 | process = (up2,_:+) ~ dw2; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_4.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw2 = vectorize(2) : [0]; 4 | 5 | process = (up2,up2:+) ~ dw2; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_9.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | dw2 = vectorize(2) : [0]; 3 | 4 | process = (up2,up2) ~ (dw2,dw2); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/schema1.dsp: -------------------------------------------------------------------------------- 1 | inverse(x:y) = inverse(y):inverse(x); 2 | inverse(x) = x; 3 | 4 | 5 | process = inverse(sin:sqrt:abs); 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20011128-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main() 3 | { 4 | char blah[33] = "01234567890123456789"; 5 | exit (0); 6 | } 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040705-2.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target int32plus } */ 2 | #define FIELDS2 long long l; 3 | #include "20040629-1.c" 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error27-tblsize-nonconst.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | foo(i) = rdtable(SR, time%6, i); 4 | 5 | process = foo(time%128); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/intcast02.dsp: -------------------------------------------------------------------------------- 1 | // variable (but bounded) delays using the @ operator 2 | process = @(hslider("delay (samples)", 0, 0, 10, 1)); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_5.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw2 = vectorize(2) : [0]; 4 | 5 | process = ((up2) ~ dw2, dw2); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test25.dsp: -------------------------------------------------------------------------------- 1 | //This program crash on faust 0.9.9.1 2 | 3 | v = hslider("volume",0,0,100,1); 4 | process = +(v-v'), *(3*v); 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test9.dsp: -------------------------------------------------------------------------------- 1 | // partage des expressions lentes 2 | 3 | vol = hslider("vol", 0, 0, 1, 0.1); 4 | 5 | process = +~*(sin(vol)); 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/waveform1.dsp: -------------------------------------------------------------------------------- 1 | process = waveform {0.1, 0.123, 0.142567, 0.152637391, 0.568453, 0.1, 0.123, 0.142567, 0.152637391, 0.568453}; 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040705-1.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target int32plus } */ 2 | 3 | #define FIELDS1 long long l; 4 | #include "20040629-1.c" 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920829-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long long c=2863311530LL,c3=2863311530LL*3; 3 | main(){if(c*3!=c3)abort();exit(0);} 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_12.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | dw2 = vectorize(2) : [0]; 3 | 4 | process = ((up2,dw2) ~ (dw2,up2)):(_,dw2); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test23.dsp: -------------------------------------------------------------------------------- 1 | //This program crash on faust 0.9.9.1 2 | 3 | SR = fconstant(int fSamplingFreq, ); 4 | process = SR-SR'; 5 | 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/20091213-empty-label-bug.dsp: -------------------------------------------------------------------------------- 1 | // the following expression creates a segmentation fault 2 | 3 | process = hslider("",0,-8,8,1); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test11.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | //foo (d) = (+:delay1s(d)) ~ _; 4 | foo (d) = (+:@(d)) ~ _; 5 | process = _ <: foo(30), foo(20); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920731-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f(x){int i;for(i=0;i<8&&(x&1)==0;x>>=1,i++);return i;} 3 | main(){if(f(4)!=2)abort();exit(0);} 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/delay02.dsp: -------------------------------------------------------------------------------- 1 | // now @ accepts variable delais provided that they are bounded and positive 2 | process = @(hslider("delay", 0, 0, 1000, 1)); 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/path2b.dsp: -------------------------------------------------------------------------------- 1 | foo(n,x,y) = vgroup( "foo %n", *(x*y)); 2 | 3 | process = tgroup("toto", vgroup("foo", hslider("../slid2", 0,0,1,0.1))); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test17.dsp: -------------------------------------------------------------------------------- 1 | // example of simplification 2 | 3 | fv = component("freeverb.dsp"); 4 | 5 | process = _,_ <: fv, fv : _, _, *(-1), *(-1) :> _,_; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/v3.dsp: -------------------------------------------------------------------------------- 1 | // route visualisation test 2 | 3 | //process = +: _: abs; 4 | 5 | foo = route(3,2,1,2,3,1) : *; 6 | 7 | process = (_,_,_) ~ foo; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920721-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long f(short a,short b){return (long)a/b;} 3 | main(){if(f(-32768,-1)!=32768L)abort();else exit(0);} 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/castsimplify.dsp: -------------------------------------------------------------------------------- 1 | // check that redondant cast are removed from the code 2 | process = (int : int), float, float(hslider("foo", 0, 0, 10, 1)); 3 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/waveform4.dsp: -------------------------------------------------------------------------------- 1 | process = (waveform {10,20,30,40,50,60,70}, %(7)~+(3) : rdtable), (waveform {1.1,2.2,3.3,4.4,5.5,6.6,7.7}, %(7)~+(3) : rdtable); 2 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920603-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f(got){if(got!=0xffff)abort();} 3 | main(){signed char c=-1;unsigned u=(unsigned short)c;f(u);exit(0);} 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920812-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef int t; 3 | f(t y){switch(y){case 1:return 1;}return 0;} 4 | main(){if(f((t)1)!=1)abort();exit(0);} 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error23.dsp: -------------------------------------------------------------------------------- 1 | // delay with negative values 2 | filter = *(0.01) : +~*(0.99); 3 | d = hslider("delay", 0, -10, 1000, 1) : int; 4 | process = @(d); 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_8.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw3 = vectorize(3) : [0]; 4 | dw2 = vectorize(2) : [0]; 5 | 6 | process = up2 <: (dw3,dw2); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test27.dsp: -------------------------------------------------------------------------------- 1 | // bug conan : this program should compile but it doesn't on faust-0.9.9.1 2 | 3 | process = ffunction(int random (), , ""); 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921019-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main() 3 | { 4 | double x,y=0.5; 5 | x=y/0.2; 6 | if(x!=x) 7 | abort(); 8 | exit(0); 9 | } 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/961017-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main () 3 | { 4 | unsigned char z = 0; 5 | 6 | do ; 7 | while (--z > 0); 8 | exit (0); 9 | } 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test22.dsp: -------------------------------------------------------------------------------- 1 | //Bug discovered by julius smith 2 | 3 | SR = fconstant(int fSamplingFreq, ); 4 | R = 1.0-4410.0/SR; 5 | process = (1-1') / (1-R*R); 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test26.dsp: -------------------------------------------------------------------------------- 1 | //mise en cache des expressions recursives 2 | x = 1:+~_; 3 | y = 2:*~_; 4 | 5 | foo(x,y,u,v) = x+y+u, y-x+v; 6 | 7 | process = foo~(_,_); 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/slowdelay1.dsp: -------------------------------------------------------------------------------- 1 | // Faust Template 2 | process = fvariable(float toto, "bidule.h"), (fvariable(float toto, "bidule.h")' <: _,_); 3 | //process = 1' <: _,_; 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920428-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | x(const char*s){char a[1];const char*ss=s;a[*s++]|=1;return(int)ss+1==(int)s;} 3 | main(){if(x("")!=1)abort();exit(0);} 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920506-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int l[]={0,1}; 3 | main(){int*p=l;switch(*p++){case 0:exit(0);case 1:break;case 2:break;case 3:case 4:break;}abort();} 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/README.md: -------------------------------------------------------------------------------- 1 | Tests in the directory are GCC tests from gcc.c-torture/execute. 2 | 3 | COPYING and COPYING3 are licenses of GCC whose sources contain the 4 | tests. 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/mem-funcs/bison.txt: -------------------------------------------------------------------------------- 1 | [fuzzalloc] 2 | fun:xmalloc 3 | fun:xnmalloc 4 | fun:xcalloc 5 | fun:xncalloc 6 | fun:xrealloc 7 | fun:xnrealloc 8 | fun:xstrdup 9 | fun:xnstrdup 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/bug20100223.dsp: -------------------------------------------------------------------------------- 1 | // Must be an integer signal 2 | // therefore pow can't be used 3 | // and a template version was introduced 4 | 5 | process = (+(1) <:*) ~_; 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/schema2.dsp: -------------------------------------------------------------------------------- 1 | // exemple de schema illisible 2 | toto(0,f) = _; 3 | toto(1,f) = f(1); 4 | toto(n,f) = f(n) : toto(n-1,f); 5 | 6 | process = toto(10,\(i).(*(i))); 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/waveform5.dsp: -------------------------------------------------------------------------------- 1 | w1(x) = waveform {10,20,30,40,50},int(x):rdtable; 2 | 3 | process = *(sin(w1(4*hslider("value",0,0,1,0.01)))), w1(4*hslider("value",0,0,1,0.01)); 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20140326-1.c: -------------------------------------------------------------------------------- 1 | int a; 2 | 3 | int 4 | main (void) 5 | { 6 | char e[2] = { 0, 0 }, f = 0; 7 | if (a == 131072) 8 | f = e[a]; 9 | return f; 10 | } 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/991030-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | double x = 0x1.fp1; 3 | int main() 4 | { 5 | if (x != 3.875) 6 | abort (); 7 | exit (0); 8 | } 9 | 10 | 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug5.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | freq = hslider("freq", 440, 20, 20000, 0.1); 3 | partial(i) = osc(i*freq); 4 | process = par(i, 5, partial(i)); 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/associativity.dsp: -------------------------------------------------------------------------------- 1 | // check associativity rules 2 | 3 | first((x,xs)) = x; 4 | first((x:xs)) = x; 5 | 6 | process = first(par(i,8,*(i+1))) : first(seq(i,10,+(i+1))); 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error22.dsp: -------------------------------------------------------------------------------- 1 | // can't compute interval of recursive signal 2 | filter = *(0.01) : +~*(0.99); 3 | d = hslider("delay", 0, 0, 1000, 1) : filter : int; 4 | process = @(d); 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/mr_oversample.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw2 = vectorize(2) : [0]; 4 | 5 | filter = _<:_,@(1):+:*(0.5); 6 | 7 | process = up2:exp:filter:dw2; 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/path1.dsp: -------------------------------------------------------------------------------- 1 | foo(n,x,y) = vgroup( "foo %n", *(x*y)); 2 | 3 | process = tgroup("toto", par(i, 4, foo(i, hslider("slid1", 0,0,1,0.1), hslider("slid2", 0,0,1,0.1)))); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20001221-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main () 3 | { 4 | unsigned long long a; 5 | if (! (a = 0xfedcba9876543210ULL)) 6 | abort (); 7 | exit (0); 8 | } 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921016-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main() 3 | { 4 | int j=1081; 5 | struct 6 | { 7 | signed int m:11; 8 | }l; 9 | if((l.m=j)==j)abort(); 10 | exit(0); 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921104-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main () 3 | { 4 | unsigned long val = 1; 5 | 6 | if (val > (unsigned long) ~0) 7 | abort(); 8 | exit (0); 9 | } 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/mod-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (x, y) 3 | { 4 | if (x % y != 0) 5 | abort (); 6 | } 7 | 8 | main () 9 | { 10 | f (-5, 5); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error07.dsp: -------------------------------------------------------------------------------- 1 | // WARNING : shadowed pattern-matching rule: (x) => x,3:*; previous rule was: (x) => x,2:*; 2 | 3 | foo(x) = x*2; 4 | foo(x) = x*3; 5 | process = foo(10); 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/mr_undersample.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | 3 | dw2 = vectorize(2) : [0]; 4 | 5 | filter = _<:_,@(1):+:*(0.5); 6 | 7 | process = *(2):dw2:exp:filter:up2; 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/path2.dsp: -------------------------------------------------------------------------------- 1 | foo(n,x,y) = vgroup( "foo %n", *(x*y)); 2 | 3 | process = tgroup("toto", par(i, 4, foo(i, hslider("slid", 0,0,1,0.1), hslider("../common", 0,0,1,0.1)))); 4 | 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_10.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | up4 = up2:up2; 3 | 4 | dw2 = vectorize(2) : [0]; 5 | dw4 = vectorize(4) : [0]; 6 | 7 | process = (up2,up4) ~ (dw2,dw4); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/shortdelays2.dsp: -------------------------------------------------------------------------------- 1 | // check short delay are correctly compiled 2 | // and shared (/(x):@(y) ==> @(y):/(x) when x is constant) 3 | 4 | process = _ <: sum(i,4, /(i+1) : @(i+4)); 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/_rpo.ssa: -------------------------------------------------------------------------------- 1 | function $test() { 2 | @start 3 | jmp @foo 4 | @baz 5 | jnz 1, @end, @foo 6 | @bar 7 | jmp @end 8 | @foo 9 | jnz 0, @bar, @baz 10 | @end 11 | ret 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/autocast.dsp: -------------------------------------------------------------------------------- 1 | // An automatic int cast should be generated 2 | smooth(c) = *(1-c) : +~*(c); 3 | process = @(hslider("delay", 0, 0, 10000, 1) : smooth(0.9999) : int : &(16535)); 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/felix1.dsp: -------------------------------------------------------------------------------- 1 | import("math.lib"); 2 | import("music.lib"); 3 | process = delay(512, hypot(2,4)); 4 | zprocess = 512 + hypot(2,4); 5 | xprocess = 512 + hypot(2,button("foo")); 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/path3.dsp: -------------------------------------------------------------------------------- 1 | foo(n,x,y) = vgroup( "foo %n", *(x*y)); 2 | 3 | process = tgroup("toto", par(i, 4, foo(i, hslider("slid1", 0,0,1,0.1), hslider("/t:toto/slid2", 0,0,1,0.1)))); 4 | 5 | 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/rateconflict_2.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | dw2 = vectorize(2) : [0]; 3 | 4 | up4 = up2:up2; 5 | dw4 = vectorize(4) : [0]; 6 | 7 | process = up2 ~ ( (up4~dw2) : dw2); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/ratepass_3.dsp: -------------------------------------------------------------------------------- 1 | up2 = vectorize(1) <: # : serialize; 2 | dw2 = vectorize(2) : [0]; 3 | 4 | up4 = up2:up2; 5 | dw4 = vectorize(4) : [0]; 6 | 7 | process = up2 ~ ( (up4~dw4) : dw2); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20020911-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | unsigned short c = 0x8000; 3 | int main() 4 | { 5 | if ((c-0x8000) < 0 || (c-0x8000) > 0x7fff) 6 | abort(); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960219-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (int i) 3 | { 4 | if (((1 << i) & 1) == 0) 5 | abort (); 6 | } 7 | 8 | main () 9 | { 10 | f (0); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug11.dsp: -------------------------------------------------------------------------------- 1 | //ERROR: undefined symbol BoxIdent[f] 2 | 3 | f = *(2); 4 | 5 | dup(x) = (x,x); 6 | 7 | faa(1, dup(f)) = f; 8 | 9 | process = faa(1,dup(6)); 10 | 11 | 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug12.dsp: -------------------------------------------------------------------------------- 1 | // example of partially applied rules 2 | // transformed into a symbolic box 3 | 4 | foo(x,x,z) = z*2; 5 | foo(x,y,z) = z*3; 6 | process = foo(1,1), foo(2,1); 7 | 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error02.dsp: -------------------------------------------------------------------------------- 1 | // ERROR : pattern matching failed, no rule of case {(2) => 2; (1) => 1; } matches argument list (3) 2 | 3 | foo(1) = 1; 4 | foo(2) = 2; 5 | process = foo(3); 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20001112-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main () 3 | { 4 | long long i = 1; 5 | 6 | i = i * 2 + 1; 7 | 8 | if (i != 3) 9 | abort (); 10 | exit (0); 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980602-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main() 3 | { 4 | int i; 5 | for (i = 1; i < 100; i++) 6 | ; 7 | if (i == 100) 8 | exit (0); 9 | abort (); 10 | } 11 | 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr58387.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | 3 | int a = -1; 4 | 5 | int main () 6 | { 7 | int b = a == 0 ? 0 : -a; 8 | if (b < 1) 9 | abort (); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug19.dsp: -------------------------------------------------------------------------------- 1 | // pattern matching doesn't go inside groups 2 | 3 | 4 | foo(hgroup("", x)) = x*2; 5 | 6 | foo(x) = x*3; 7 | 8 | 9 | process = foo(hgroup("", 10)); 10 | 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug3-4.dsp: -------------------------------------------------------------------------------- 1 | toto (n) = fact(n) 2 | with { 3 | fact (0) = 1; 4 | fact (n) = n*fact(n-1); 5 | }; 6 | 7 | foo (x:y) = (y:x); 8 | 9 | process = foo(sin:sqrt); 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error03.dsp: -------------------------------------------------------------------------------- 1 | //ERROR : pattern matching failed, no rule of case {(y,x,x) => y,123:*; } matches argument list (1,10,6) 2 | 3 | foo(x,x,y) = y*123; 4 | 5 | process = foo(1,10,6); 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/path4.dsp: -------------------------------------------------------------------------------- 1 | a = hslider("/v:foo/slid1", 0,0,1,0.1); 2 | b = hslider("/v:foo/h:faa/slid2", 0,0,1,0.1); 3 | c = hslider("/v:foo/h:faa/slid3", 0,0,1,0.1); 4 | 5 | process = a+b+c; 6 | 7 | 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000519-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long x = -1L; 3 | 4 | int main() 5 | { 6 | long b = (x != -1L); 7 | 8 | if (b) 9 | abort(); 10 | 11 | exit(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040706-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main () 3 | { 4 | int i; 5 | for (i = 0; i < 10; i++) 6 | continue; 7 | if (i < 10) 8 | abort (); 9 | exit (0); 10 | } 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20091229-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long long foo(long long v) { return v / -0x080000000LL; } 3 | int main(int argc, char **argv) { if (foo(0x080000000LL) != -1) abort(); exit (0); } 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr59388.c: -------------------------------------------------------------------------------- 1 | /* PR tree-optimization/59388 */ 2 | 3 | int a; 4 | struct S { unsigned int f:1; } b; 5 | 6 | int 7 | main () 8 | { 9 | a = (0 < b.f) | b.f; 10 | return a; 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug7.dsp: -------------------------------------------------------------------------------- 1 | n = 666; 2 | 3 | fact(0) = 1; 4 | fact(n) = n*fact(n-1); 5 | 6 | ack(0) = 1; 7 | ack(1) = 1; 8 | ack(n) = 1 + ack(n-1) + ack(n-2); 9 | 10 | process = ack (15), fact(10); 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error08.dsp: -------------------------------------------------------------------------------- 1 | // WARNING : shadowed pattern-matching rule: (x,x) => x,1:+; previous rule was: (x,y) => y; 2 | 3 | foo(x,y) = y; 4 | foo(x,x) = x+1; 5 | process = foo(1,1), foo(3,4); 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920429-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef unsigned char t;int i,j; 3 | t*f(t*p){t c;c=*p++;i=((c&2)?1:0);j=(c&7)+1;return p;} 4 | main(){t*p0="ab",*p1;p1=f(p0);if(p0+1!=p1)abort();exit(0);} 5 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950605-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (c) 3 | unsigned char c; 4 | { 5 | if (c != 0xFF) 6 | abort (); 7 | } 8 | 9 | main () 10 | { 11 | f (-1); 12 | exit (0); 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr23941.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | double d = __FLT_MIN__ / 2.0; 3 | int main() 4 | { 5 | double x = __FLT_MIN__ / 2.0; 6 | if (x != d) 7 | abort (); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.user 2 | CMakeCache.txt 3 | CMakeFiles 4 | CMakeScripts 5 | Testing 6 | Makefile 7 | cmake_install.cmake 8 | install_manifest.txt 9 | compile_commands.json 10 | CTestTestfile.cmake 11 | _deps 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/20100120b-bug.dsp: -------------------------------------------------------------------------------- 1 | // BUG 20 Jan 20010 : the following code creates a segmentation fault 2 | 3 | //process = vslider("2:0:cos", 0, 0, 1, 0.01); 4 | process = vslider("Cos", 0, 0, 1, 0.01); 5 | 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test3.dsp: -------------------------------------------------------------------------------- 1 | 2 | IIR2P(b0,b1,b2,a1,a2) = + ~ conv2 : conv3 3 | with { 4 | conv2(x) = 0 - a1*x - a2*x'; 5 | conv3(x) = b0*x + b1*x' + b2*x''; 6 | }; 7 | 8 | process = IIR2P(1.25,1.73,1,1.73,1); 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010222-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a[2] = { 18, 6 }; 3 | 4 | int main () 5 | { 6 | int b = (-3 * a[0] -3 * a[1]) / 12; 7 | if (b != -6) 8 | abort (); 9 | exit (0); 10 | } 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20011217-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | main() 4 | { 5 | double x = 1.0; 6 | double y = 2.0; 7 | 8 | if ((y > x--) != 1) 9 | abort (); 10 | exit (0); 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920501-1.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target untyped_assembly } */ 2 | extern void exit (int); 3 | int s[2]; 4 | x(){if(!s[0]){s[1+s[1]]=s[1];return 1;}} 5 | main(){s[0]=s[1]=0;if(x(0)!=1)abort();exit(0);} 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error01.dsp: -------------------------------------------------------------------------------- 1 | //ERROR : inconsistent number of parameters in pattern-matching rule: (x,y) => y; 2 | 3 | foo = case { (x,y) => y; (x,x) => x+1; }; 4 | foo(x,y) = y; 5 | process = foo(1,1), foo(3,4); 6 | 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20001009-1.c: -------------------------------------------------------------------------------- 1 | int a,b; 2 | main() 3 | { 4 | int c=-2; 5 | int d=0xfe; 6 | int e=a&1; 7 | int f=b&2; 8 | if ((char)(c|(e&f)) == (char)d) 9 | return 0; 10 | else 11 | abort(); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920604-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long long 3 | mod (a, b) 4 | long long a, b; 5 | { 6 | return a % b; 7 | } 8 | 9 | int 10 | main () 11 | { 12 | mod (1LL, 2LL); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921218-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f() 3 | { 4 | return (unsigned char)("\377"[0]); 5 | } 6 | 7 | main() 8 | { 9 | if (f() != (unsigned char)(0377)) 10 | abort(); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930527-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (unsigned char x) 3 | { 4 | return (0x50 | (x >> 4)) ^ 0xff; 5 | } 6 | 7 | main () 8 | { 9 | if (f (0) != 0xaf) 10 | abort (); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/20aout08.dsp: -------------------------------------------------------------------------------- 1 | // exemple de code pas tres optimisé et pas bien 2 | // normalisé (avec 0994jpar) 3 | 4 | neg(x) = -x; 5 | half(x) = x/2; 6 | 7 | // process = half : neg; 8 | process = neg : half; 9 | 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error06.dsp: -------------------------------------------------------------------------------- 1 | //ERROR : pattern matching failed, no rule of case {(z,y,x,x) => (x,(10,y:*):+),(100,z:*):+; } matches argument list (4,7,2,#1) 2 | 3 | foo(x,x,y,z) = x+10*y+100*z; 4 | process = foo(4,7,2); 5 | 6 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test4.dsp: -------------------------------------------------------------------------------- 1 | 2 | IIR2P(b0,b1,b2,a1,a2) = + ~ conv2 : conv3 3 | with { 4 | conv2 = _ <: 0 - _*a1 - mem*a2 ; 5 | conv3 = _ <: _*b0 + mem*b1 + (mem:mem)*b2; 6 | }; 7 | 8 | process = IIR2P(1.25,1.73,1,1.73,1); 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930916-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (n) 3 | unsigned n; 4 | { 5 | if ((int) n >= 0) 6 | abort (); 7 | } 8 | 9 | main () 10 | { 11 | unsigned x = ~0; 12 | f (x); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/961112-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (x) 3 | { 4 | if (x != 0 || x == 0) 5 | return 0; 6 | return 1; 7 | } 8 | 9 | main () 10 | { 11 | if (f (3)) 12 | abort (); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/961122-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | f (int a) 4 | { 5 | return ((a >= 0 && a <= 10) && ! (a >= 0)); 6 | } 7 | 8 | main () 9 | { 10 | if (f (0)) 11 | abort (); 12 | exit (0); 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/inst-check.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void exit (int); 4 | f(m) 5 | { 6 | int i,s=0; 7 | for(i=0;i> 1) > 0; 6 | } 7 | 8 | main () 9 | { 10 | if (!f (9)) 11 | abort (); 12 | if (f (-9)) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950607-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main () 3 | { 4 | struct { long status; } h; 5 | 6 | h.status = 0; 7 | if (((h.status & 128) == 1) && ((h.status & 32) == 0)) 8 | abort (); 9 | exit (0); 10 | } 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr71335.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a; 3 | int 4 | main () 5 | { 6 | int b = 0; 7 | while (a < 0 || b) 8 | { 9 | b = 0; 10 | for (; b < 9; b++) 11 | ; 12 | } 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/comb_delay1.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | // 10 samples delay modulation 4 | modulator = @(osc(1000) : +(1) : *(5) : min(10) : max(0)); 5 | fix = @(100); 6 | source = osc(440); 7 | 8 | process = source : modulator : fix; 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/comb_delay2.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | // 10 samples delay modulation 4 | modulator = @(osc(1000) : +(1) : *(5) : min(10) : max(0)); 5 | fix = @(100); 6 | source = osc(440); 7 | 8 | process = source : fix : modulator; 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/highShelf.dsp: -------------------------------------------------------------------------------- 1 | import("maxmsp.lib"); 2 | 3 | G = hslider("Gain [unit:dB]", 0, -10, 10, 0.1); 4 | F = hslider("Freq", 1000, 100, 10000, 1); 5 | Q = hslider("Q", 1, 0.01, 100, 0.01); 6 | 7 | process(x) = highShelf(x,F,G,Q); 8 | 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/lowShelf.dsp: -------------------------------------------------------------------------------- 1 | import("maxmsp.lib"); 2 | 3 | G = hslider("Gain [unit:dB]", 0, -10, 10, 0.1); 4 | F = hslider("Freq", 1000, 100, 10000, 1); 5 | Q = hslider("Q", 1, 0.01, 100, 0.01); 6 | 7 | process(x) = lowShelf(x,F,G,Q); 8 | 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/peakNotch.dsp: -------------------------------------------------------------------------------- 1 | import("maxmsp.lib"); 2 | 3 | G = hslider("Gain [unit: lin]", 1, 0, 8, 0.01); 4 | F = hslider("Freq", 1000, 100, 10000, 1); 5 | Q = hslider("Q", 1, 0.01, 100, 0.01); 6 | 7 | process(x) = peakNotch(x,F,G,Q); 8 | 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/peakingEQ.dsp: -------------------------------------------------------------------------------- 1 | import("maxmsp.lib"); 2 | 3 | G = hslider("Gain [unit:dB]", 0, -10, 10, 0.1); 4 | F = hslider("Freq", 1000, 100, 10000, 1); 5 | Q = hslider("Q", 1, 0.01, 100, 0.01); 6 | 7 | process(x) = peakingEQ(x,F,G,Q); 8 | 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000717-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static void 3 | compare (long long foo) 4 | { 5 | if (foo < 4294967297LL) 6 | abort(); 7 | } 8 | int main(void) 9 | { 10 | compare (8589934591LL); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010711-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | void foo (int *a) {} 3 | 4 | int main () 5 | { 6 | int a; 7 | if (&a == 0) 8 | abort (); 9 | else 10 | { 11 | foo (&a); 12 | exit (0); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20011114-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | char foo(char bar[]) 3 | { 4 | return bar[1]; 5 | } 6 | extern char foo(char *); 7 | int main(void) 8 | { 9 | if (foo("xy") != 'y') 10 | abort (); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20070724-1.c: -------------------------------------------------------------------------------- 1 | void abort (void); 2 | 3 | static unsigned char magic[] = "\235"; 4 | static unsigned char value = '\235'; 5 | 6 | int main() 7 | { 8 | if (value != magic[0]) 9 | abort (); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920909-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f(a){switch(a){case 0x402:return a+1;case 0x403:return a+2;case 0x404:return a+3;case 0x405:return a+4;case 0x406:return 1;case 0x407:return 4;}return 0;} 3 | main(){if(f(1))abort();exit(0);} 4 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921202-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | f(long long x) 4 | { 5 | x >>= 8; 6 | return x & 0xff; 7 | } 8 | 9 | main() 10 | { 11 | if (f(0x0123456789ABCDEFLL) != 0xCD) 12 | abort(); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921207-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f() 3 | { 4 | unsigned b = 0; 5 | 6 | if (b > ~0U) 7 | b = ~0U; 8 | 9 | return b; 10 | } 11 | main() 12 | { 13 | if (f()!=0) 14 | abort(); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/931110-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main () 3 | { 4 | static int a[] = {3, 4}; 5 | register int *b; 6 | int c; 7 | 8 | b = a; 9 | c = *b++ % 8; 10 | if (c != 3) 11 | abort (); 12 | exit (0); 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960402-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (signed long long int x) 3 | { 4 | return x > 0xFFFFFFFFLL || x < -0x80000000LL; 5 | } 6 | 7 | main () 8 | { 9 | if (f (0) != 0) 10 | abort (); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr33779-2.c: -------------------------------------------------------------------------------- 1 | int foo(int i) 2 | { 3 | return ((int)((unsigned)(i + 1) * 4)) / 4; 4 | } 5 | 6 | extern void abort(void); 7 | int main() 8 | { 9 | if (foo(0x3fffffff) != 0) 10 | abort (); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr34070-2.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | int f(unsigned int x, int n) 4 | { 5 | return ((int)x) / (1 << n); 6 | } 7 | 8 | int main() 9 | { 10 | if (f(-1, 1) != 0) 11 | abort (); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(FuzzallocCommon OBJECT 2 | Common/BaggyBounds.c 3 | Common/Metadata.c 4 | ) 5 | link_libraries(FuzzallocCommon) 6 | 7 | add_subdirectory(Analysis) 8 | add_subdirectory(Runtime) 9 | add_subdirectory(Transforms) 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug3.dsp: -------------------------------------------------------------------------------- 1 | fact = case { 2 | (0) => 1; 3 | (n) => n*fact(n-1); 4 | }; 5 | 6 | toto = case { 7 | (fact(5)) => *; 8 | //(120) => *; 9 | (x) => x; 10 | }; 11 | 12 | process = toto(fact(6)), toto(fact(5)); 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/table1.dsp: -------------------------------------------------------------------------------- 1 | // Generate incorrect code where itbl1mydspSIG0 is read without being initialized (use interp-tracer -trace 7 table1.dsp) 2 | 3 | t1 = rdtable(100, (1:+~_)); 4 | t2 = rdtable(50, t1(2:+~_)); 5 | 6 | process = t2(3:(+,50:%)~_); -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20011109-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main(void) 3 | { 4 | char *c1 = "foo"; 5 | char *c2 = "foo"; 6 | int i; 7 | for (i = 0; i < 3; i++) 8 | if (c1[i] != c2[i]) 9 | abort (); 10 | exit (0); 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/931012-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (int b, int c) 3 | { 4 | if (b != 0 && b != 1 && c != 0) 5 | b = 0; 6 | return b; 7 | } 8 | 9 | main () 10 | { 11 | if (!f (1, 2)) 12 | abort(); 13 | exit(0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960419-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | #define SIZE 8 3 | 4 | main() 5 | { 6 | int a[SIZE] = {1}; 7 | int i; 8 | 9 | for (i = 1; i < SIZE; i++) 10 | if (a[i] != 0) 11 | abort(); 12 | 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990324-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | void f(long i) 3 | { 4 | if ((signed char)i < 0 || (signed char)i == 0) 5 | abort (); 6 | else 7 | exit (0); 8 | } 9 | 10 | main() 11 | { 12 | f(0xffffff01); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr69097-1.c: -------------------------------------------------------------------------------- 1 | /* PR tree-optimization/69097 */ 2 | 3 | int a, b; 4 | unsigned int c; 5 | 6 | int 7 | main () 8 | { 9 | int d = b; 10 | b = ~(~a + (~d | b)); 11 | a = ~(~c >> b); 12 | c = a % b; 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/_fix1.ssa: -------------------------------------------------------------------------------- 1 | function $test() { 2 | @start 3 | %x =w copy 1 4 | @loop 5 | jnz %x, @noz, @isz 6 | @noz 7 | %x =w copy 0 8 | jmp @end 9 | @isz 10 | %x =w copy 1 11 | jmp @loop 12 | @end 13 | %z =w add 10, %x 14 | ret 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/941025-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long f (x, y) 3 | long x,y; 4 | { 5 | return (x > 1) ? y : (y & 1); 6 | } 7 | 8 | main () 9 | { 10 | if (f (2L, 0xdecadeL) != 0xdecadeL) 11 | abort (); 12 | exit (0); 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr34982.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | static void something(); 4 | 5 | int main() 6 | { 7 | something(-1); 8 | return 0; 9 | } 10 | 11 | static void something(int i) 12 | { 13 | if (i != -1) 14 | abort (); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr36077.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | unsigned int test (unsigned int x) 4 | { 5 | return x / 0x80000001U / 0x00000002U; 6 | } 7 | 8 | int main() 9 | { 10 | if (test(2) != 0) 11 | abort (); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr52209.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/52209 */ 2 | 3 | extern void abort (void); 4 | struct S0 { int f2 : 1; } c; 5 | int b; 6 | 7 | int 8 | main () 9 | { 10 | b = -1 ^ c.f2; 11 | if (b != -1) 12 | abort (); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/t5.dsp: -------------------------------------------------------------------------------- 1 | import("stdfaust.lib"); 2 | 3 | // int(exp) are not simplified in route expressions, why ? 4 | 5 | ok = route(4, 4, par(i, 4, (i*5)/4)); 6 | xbug = route(4, 4, par(i, 4, int((i*5)/4))); 7 | bug = route(4, 4, 1, int(7/2)); 8 | process = bug; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000121-1.c: -------------------------------------------------------------------------------- 1 | void big(long long u) { } 2 | 3 | void doit(unsigned int a,unsigned int b,char *id) 4 | { 5 | big(*id); 6 | big(a); 7 | big(b); 8 | } 9 | 10 | int main(void) 11 | { 12 | doit(1,1,"\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000503-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | unsigned long 3 | sub (int a) 4 | { 5 | return ((0 > a - 2) ? 0 : a - 2) * sizeof (long); 6 | } 7 | 8 | main () 9 | { 10 | if (sub (0) != 0) 11 | abort (); 12 | 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040707-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct s { char c1, c2; }; 3 | void foo (struct s s) 4 | { 5 | static struct s s1; 6 | s1 = s; 7 | } 8 | int main () 9 | { 10 | static struct s s2; 11 | foo (s2); 12 | exit (0); 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930429-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | char * 3 | f (char *p) 4 | { 5 | short x = *p++ << 16; 6 | return p; 7 | } 8 | 9 | main () 10 | { 11 | char *p = ""; 12 | if (f (p) != p + 1) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/931208-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f () 3 | { 4 | unsigned long x, y = 1; 5 | 6 | x = ((y * 8192) - 216) / 16; 7 | return x; 8 | } 9 | 10 | main () 11 | { 12 | if (f () != 498) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/940115-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (cp, end) 3 | char *cp; 4 | char *end; 5 | { 6 | return (cp < end); 7 | } 8 | 9 | main () 10 | { 11 | if (! f ((char *) 0, (char *) 1)) 12 | abort(); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/941101-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f () 3 | { 4 | int var = 7; 5 | 6 | if ((var/7) == 1) 7 | return var/7; 8 | return 0; 9 | } 10 | 11 | main () 12 | { 13 | if (f () != 1) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/scope-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int v = 3; 3 | 4 | f () 5 | { 6 | int v = 4; 7 | { 8 | extern int v; 9 | if (v != 3) 10 | abort (); 11 | } 12 | } 13 | 14 | main () 15 | { 16 | f (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/k.dsp: -------------------------------------------------------------------------------- 1 | declare name "k"; 2 | declare version "1.0"; 3 | declare author "Grame"; 4 | declare license "BSD"; 5 | declare copyright "(c)GRAME 2009"; 6 | 7 | 8 | vol = hslider("volume", 0.1, 0, 1, 0.1); 9 | process = 1 * vol; 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/spectral_level.dsp: -------------------------------------------------------------------------------- 1 | // Spectrum analyzer 2 | 3 | declare name "spectral_level"; 4 | 5 | fl = library("filter.lib"); 6 | 7 | BandsPerOctave = 3; // third-octave filter bank 8 | process = fl.mth_octave_spectral_level_demo(BandsPerOctave) <: _,_; 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950511-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main () 3 | { 4 | unsigned long long xx; 5 | unsigned long long *x = (unsigned long long *) &xx; 6 | 7 | *x = -3; 8 | *x = *x * *x; 9 | if (*x != 9) 10 | abort (); 11 | exit (0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/991202-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int x, y; 3 | 4 | int 5 | main() 6 | { 7 | x = 2; 8 | y = x; 9 | do 10 | { 11 | x = y; 12 | y = 2 * y; 13 | } 14 | while ( ! ((y - x) >= 20)); 15 | exit (0); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/_fix2.ssa: -------------------------------------------------------------------------------- 1 | function $test() { 2 | @start 3 | %x =w copy 1 4 | @loop 5 | jnz %x, @noz, @isz 6 | @noz 7 | %x =w copy 0 8 | jnz %x, @loop, @end 9 | @isz 10 | %x =w copy 1 11 | jmp @loop 12 | @end 13 | %z =w add 10, %x 14 | ret 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/schema5.dsp: -------------------------------------------------------------------------------- 1 | // exemple de schema non encore simplifié 2 | 3 | 4 | fold(1,f,x) = x(0); 5 | fold(n,f,x) = f(fold(n-1,f,x),x(n-1)); 6 | fpar(n) = fold(n,\(x,y).(x,y)); 7 | partial(i) = 2*i; 8 | 9 | process = fpar(5, \(i,x).(partial(i))); 10 | 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20060127-1.c: -------------------------------------------------------------------------------- 1 | void abort (); 2 | 3 | void 4 | f (long long a) 5 | { 6 | if ((a & 0xffffffffLL) != 0) 7 | abort (); 8 | } 9 | 10 | long long a = 0x1234567800000000LL; 11 | 12 | int 13 | main () 14 | { 15 | f (a); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/931228-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (x) 3 | { 4 | x &= 010000; 5 | x &= 007777; 6 | x ^= 017777; 7 | x &= 017770; 8 | return x; 9 | } 10 | 11 | main () 12 | { 13 | if (f (-1) != 017770) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960321-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | char a[10] = "deadbeef"; 3 | 4 | char 5 | acc_a (long i) 6 | { 7 | return a[i-2000000000L]; 8 | } 9 | 10 | main () 11 | { 12 | if (acc_a (2000000000L) != 'd') 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960419-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static int i; 3 | 4 | void 5 | check(x) 6 | int x; 7 | { 8 | if (!x) 9 | abort(); 10 | } 11 | 12 | main() 13 | { 14 | int *p = &i; 15 | 16 | check(p != (void *)0); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/divconst-3.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long long 3 | f (long long x) 4 | { 5 | return x / 10000000000LL; 6 | } 7 | 8 | main () 9 | { 10 | if (f (10000000000LL) != 1 || f (100000000000LL) != 10) 11 | abort (); 12 | exit (0); 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr19515.c: -------------------------------------------------------------------------------- 1 | /* PR 19515 */ 2 | 3 | typedef union { 4 | char a2[8]; 5 | }aun; 6 | 7 | void abort (void); 8 | 9 | int main(void) 10 | { 11 | aun a = {{0}}; 12 | 13 | if (a.a2[2] != 0) 14 | abort (); 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr33779-1.c: -------------------------------------------------------------------------------- 1 | int foo(int i) 2 | { 3 | if (((unsigned)(i + 1)) * 4 == 0) 4 | return 1; 5 | return 0; 6 | } 7 | 8 | extern void abort(void); 9 | int main() 10 | { 11 | if (foo(0x3fffffff) == 0) 12 | abort (); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr56250.c: -------------------------------------------------------------------------------- 1 | /* PR tree-optimization/56250 */ 2 | 3 | extern void abort (void); 4 | 5 | int 6 | main () 7 | { 8 | unsigned int x = 2; 9 | unsigned int y = (0U - x / 2) / 2; 10 | if (-1U / x != y) 11 | abort (); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error05.dsp: -------------------------------------------------------------------------------- 1 | //ERROR : inconsistent number of parameters in pattern-matching rule: (x,z) => z; previous rule was: (x,x,z) => x; 2 | // test for unconsistent pattern matching rules 3 | fuu (x,x,z) = x; 4 | fuu (x,z) = z; 5 | 6 | process = fuu(1,1), fuu(1,2); 7 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030821-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | int 4 | foo (int x) 5 | { 6 | if ((int) (x & 0x80ffffff) != (int) (0x8000fffe)) 7 | abort (); 8 | 9 | return 0; 10 | } 11 | 12 | int 13 | main () 14 | { 15 | return foo (0x8000fffe); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040208-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main () { 3 | #ifndef _WIN32 /* long double > 64 bits */ 4 | long double x; 5 | 6 | x = 0x1.0p-500L; 7 | x *= 0x1.0p-522L; 8 | if (x != 0x1.0p-1022L) abort (); 9 | #endif 10 | exit (0); 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930702-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | fp (double a, int b) 3 | { 4 | if (a != 33 || b != 11) 5 | abort (); 6 | } 7 | 8 | main () 9 | { 10 | int (*f) (double, int) = fp; 11 | 12 | fp (33, 11); 13 | f (33, 11); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr34099.c: -------------------------------------------------------------------------------- 1 | int foo (int b, int c) 2 | { 3 | int x; 4 | if (b) 5 | return x & c; 6 | else 7 | return 1; 8 | } 9 | extern void abort (void); 10 | int main() 11 | { 12 | if (foo(1, 0) != 0) 13 | abort (); 14 | return 0; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr48973-2.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/48973 */ 2 | 3 | extern void abort (void); 4 | struct S { int f : 1; } s; 5 | int v = -1; 6 | 7 | int 8 | main () 9 | { 10 | s.f = v < 0; 11 | if ((unsigned int) s.f != -1U) 12 | abort (); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug13.dsp: -------------------------------------------------------------------------------- 1 | foo = abs,abs; 2 | x = 666; 3 | n = 18; 4 | 5 | 6 | 7 | fact(0) = 1; 8 | fact(n) = n*fact(n-1); 9 | 10 | map(foo, (x,xs)) = foo(x), map(foo,xs); 11 | map(foo, x) = foo(x); 12 | 13 | 14 | process = map(fact, (10,11,12,13)); 15 | 16 | 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/SHbug.dsp: -------------------------------------------------------------------------------- 1 | // Bug discovered June 30, 2009 2 | // partial application of primitives should work 3 | // 4 | 5 | myselect2(t,a,b)=select2(t,a,b); 6 | sampleAndHold(t) = select2(t,_) ~ _; 7 | 8 | process = sampleAndHold(int(button("sample"))); 9 | 10 | 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/delays.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | 3 | smooth(c) = *(1-c) : +~*(c); 4 | 5 | process = (@(nentry("d1", 200, 0, 1000, 1)) : smooth(0.999)), 6 | (@(nentry("d2", 200, 0, 2000, 1)) : smooth(0.999)), 7 | (@(nentry("d3", 400, 200, 3000, 1)) : smooth(0.999)); 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test14bis.dsp: -------------------------------------------------------------------------------- 1 | // bug dans version 0.9.9.3-bis 2 | // (ne se produit pas avec les version 0.9.9.2 et 0.9.9.3) 3 | // le compilateur se plaint de ne pas avoir de type associé 4 | // à la deuxième sortie qui est pourtant inutilisée 5 | process = (+ <: _, _)~ _ : _,!; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010520-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static unsigned int expr_hash_table_size = 1; 3 | 4 | int 5 | main () 6 | { 7 | int del = 1; 8 | unsigned int i = 0; 9 | 10 | if (i < expr_hash_table_size && del) 11 | exit (0); 12 | abort (); 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20080529-1.c: -------------------------------------------------------------------------------- 1 | /* PR target/36362 */ 2 | 3 | extern void abort (void); 4 | 5 | int 6 | test (float c) 7 | { 8 | return !!c * 7LL == 0; 9 | } 10 | 11 | int 12 | main (void) 13 | { 14 | if (test (1.0f) != 0) 15 | abort (); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/941110-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (const int x) 3 | { 4 | int y = 0; 5 | y = x ? y : -y; 6 | { 7 | const int *p = &x; 8 | } 9 | return y; 10 | } 11 | 12 | main () 13 | { 14 | if (f (0)) 15 | abort (); 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960326-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct s 3 | { 4 | int a; 5 | int b; 6 | short c; 7 | int d[3]; 8 | }; 9 | 10 | struct s s = { .b = 3, .d = {2,0,0} }; 11 | 12 | main () 13 | { 14 | if (s.b != 3) 15 | abort (); 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr20187-1.c: -------------------------------------------------------------------------------- 1 | int a = 0x101; 2 | int b = 0x100; 3 | 4 | int 5 | test (void) 6 | { 7 | return (((unsigned char) (unsigned long long) ((a ? a : 1) & (a * b))) 8 | ? 0 : 1); 9 | } 10 | 11 | int 12 | main (void) 13 | { 14 | return 1 - test (); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr49123.c: -------------------------------------------------------------------------------- 1 | /* PR lto/49123 */ 2 | 3 | extern void abort (void); 4 | static struct S { int f : 1; } s; 5 | static int v = -1; 6 | 7 | int 8 | main () 9 | { 10 | s.f = v < 0; 11 | if ((unsigned int) s.f != -1U) 12 | abort (); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010422-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | unsigned int foo(unsigned int x) 3 | { 4 | if (x < 5) 5 | x = 4; 6 | else 7 | x = 8; 8 | return x; 9 | } 10 | 11 | int main(void) 12 | { 13 | if (foo (8) != 8) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20021119-1.c: -------------------------------------------------------------------------------- 1 | /* PR 8639. */ 2 | 3 | extern void abort(void); 4 | 5 | int foo (int i) 6 | { 7 | int r; 8 | r = (80 - 4 * i) / 20; 9 | return r; 10 | } 11 | 12 | int main () 13 | { 14 | if (foo (1) != 3) 15 | abort (); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030316-1.c: -------------------------------------------------------------------------------- 1 | /* PR target/9164 */ 2 | /* The comparison operand was sign extended erraneously. */ 3 | 4 | int 5 | main (void) 6 | { 7 | long j = 0x40000000; 8 | if ((unsigned int) (0x40000000 + j) < 0L) 9 | abort (); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040704-1.c: -------------------------------------------------------------------------------- 1 | /* PR 16348: Make sure that condition-first false loops DTRT. */ 2 | 3 | extern void abort (); 4 | 5 | int main() 6 | { 7 | for (; 0 ;) 8 | { 9 | abort (); 10 | label: 11 | return 0; 12 | } 13 | goto label; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950915-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long int a = 100000; 3 | long int b = 21475; 4 | 5 | long 6 | f () 7 | { 8 | return ((long long) a * (long long) b) >> 16; 9 | } 10 | 11 | main () 12 | { 13 | if (f () < 0) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990106-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | foo(bufp) 3 | char *bufp; 4 | { 5 | int x = 80; 6 | return (*bufp++ = x ? 'a' : 'b'); 7 | } 8 | 9 | main() 10 | { 11 | char x; 12 | 13 | if (foo (&x) != 'a') 14 | abort (); 15 | 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990222-1.c: -------------------------------------------------------------------------------- 1 | char line[4] = { '1', '9', '9', '\0' }; 2 | 3 | int main() 4 | { 5 | char *ptr = line + 3; 6 | 7 | while ((*--ptr += 1) > '9') *ptr = '0'; 8 | if (line[0] != '2' || line[1] != '0' || line[2] != '0') 9 | abort(); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990604-1.c: -------------------------------------------------------------------------------- 1 | int b; 2 | void f () 3 | { 4 | int i = 0; 5 | if (b == 0) 6 | do { 7 | b = i; 8 | i++; 9 | } while (i < 10); 10 | } 11 | 12 | int main () 13 | { 14 | f (); 15 | if (b != 9) 16 | abort (); 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/991202-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | 3 | int 4 | f1 () 5 | { 6 | unsigned long x, y = 1; 7 | 8 | x = ((y * 8192) - 216) % 16; 9 | return x; 10 | } 11 | 12 | int 13 | main () 14 | { 15 | if (f1 () != 8) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr21964-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | void 3 | foo (int n, int m) 4 | { 5 | if (m == 0) 6 | exit (0); 7 | else if (n != 0) 8 | abort (); 9 | else 10 | foo (n++, m - 1); 11 | } 12 | 13 | int 14 | main (void) 15 | { 16 | foo (0, 4); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr22348.c: -------------------------------------------------------------------------------- 1 | void abort (void); 2 | void f(int i) 3 | { 4 | if (i>4 + 3 * 16) 5 | abort(); 6 | } 7 | 8 | int main() 9 | { 10 | unsigned int buflen, i; 11 | buflen = 4 + 3 * 16; 12 | for (i = 4; i < buflen; i+= 3) 13 | f(i); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr42512.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | short g_3; 4 | 5 | int main (void) 6 | { 7 | int l_2; 8 | for (l_2 = -1; l_2 != 0; l_2 = (unsigned char)(l_2 - 1)) 9 | g_3 |= l_2; 10 | if (g_3 != -1) 11 | abort (); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/20180424-env-bug.dsp: -------------------------------------------------------------------------------- 1 | // environement should be passed as arguments without triggering an error 2 | 3 | foo = environment { 4 | x = 1; 5 | y = 2; 6 | }; 7 | 8 | faa(e) = e; 9 | 10 | process = faa(foo).y; // the result should be 2 here 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug17.dsp: -------------------------------------------------------------------------------- 1 | // example of not very explicit error message 2 | 3 | 4 | foo(x,y,y) = y*2; 5 | foo(x,y,z) = y*3; 6 | 7 | //process = 2:foo(1,2); 8 | 9 | //process = foo(1,1,1), ((1,1) : (foo(1,1), foo(1,2))); 10 | 11 | process = foo(1,1), foo(1,2); 12 | 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/logical.dsp: -------------------------------------------------------------------------------- 1 | // Test logical operators 2 | 3 | land = int(_*12345) & int(_*67895); 4 | lor = int(_*12345) | int(_*67895); 5 | lxor = int(_*12345) xor int(_*67895); 6 | 7 | process = land, lor, lxor, select2(land, 100, 200), select2(lor, 10, 20), select2(lxor, 1, 2); 8 | 9 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000412-5.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main( void ) { 3 | struct { 4 | int node; 5 | int type; 6 | } lastglob[1] = { { 0 , 1 } }; 7 | 8 | if (lastglob[0].node != 0 || lastglob[0].type != 1) 9 | abort (); 10 | exit (0); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20090623-1.c: -------------------------------------------------------------------------------- 1 | int * __restrict__ x; 2 | 3 | int foo (int y) 4 | { 5 | *x = y; 6 | return *x; 7 | } 8 | 9 | extern void abort (void); 10 | 11 | int main() 12 | { 13 | int i = 0; 14 | x = &i; 15 | if (foo(1) != 1) 16 | abort (); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr31136.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | struct S { 4 | unsigned b4:4; 5 | unsigned b6:6; 6 | } s; 7 | 8 | int main() 9 | { 10 | s.b6 = 31; 11 | s.b4 = s.b6; 12 | s.b6 = s.b4; 13 | if (s.b6 != 15) 14 | abort (); 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr33631.c: -------------------------------------------------------------------------------- 1 | typedef union 2 | { 3 | int __lock; 4 | } pthread_mutex_t; 5 | 6 | extern void abort (void); 7 | 8 | int main() 9 | { 10 | struct { int c; pthread_mutex_t m; } r = { .m = 0 }; 11 | if (r.c != 0) 12 | abort (); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000715-2.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | extern void exit(int); 3 | 4 | unsigned int foo(unsigned int a) 5 | { 6 | return ((unsigned char)(a + 1)) * 4; 7 | } 8 | 9 | int main(void) 10 | { 11 | if (foo((unsigned char)~0)) 12 | abort (); 13 | exit(0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20051104-1.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/23567 */ 2 | 3 | struct 4 | { 5 | int len; 6 | char *name; 7 | } s; 8 | 9 | int 10 | main (void) 11 | { 12 | s.len = 0; 13 | s.name = ""; 14 | if (s.name [s.len] != 0) 15 | s.name [s.len] = 0; 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20090207-1.c: -------------------------------------------------------------------------------- 1 | int foo(int i) 2 | { 3 | int a[32]; 4 | a[1] = 3; 5 | a[0] = 1; 6 | a[i] = 2; 7 | return a[0]; 8 | } 9 | extern void abort (void); 10 | int main() 11 | { 12 | if (foo (0) != 2 13 | || foo (1) != 1) 14 | abort (); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20100209-1.c: -------------------------------------------------------------------------------- 1 | int bar(int foo) 2 | { 3 | return (int)(((unsigned long long)(long long)foo) / 8); 4 | } 5 | extern void abort (void); 6 | int main() 7 | { 8 | if (sizeof (long long) > sizeof (int) 9 | && bar(-1) != -1) 10 | abort (); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930818-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static double one = 1.0; 3 | 4 | f() 5 | { 6 | int colinear; 7 | colinear = (one == 0.0); 8 | if (colinear) 9 | abort (); 10 | return colinear; 11 | } 12 | main() 13 | { 14 | if (f()) abort(); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr36691.c: -------------------------------------------------------------------------------- 1 | unsigned char g_5; 2 | 3 | void func_1 (void) 4 | { 5 | for (g_5 = 9; g_5 >= 4; g_5 -= 5) 6 | ; 7 | } 8 | 9 | extern void abort (void); 10 | int main (void) 11 | { 12 | func_1 (); 13 | if (g_5 != 0) 14 | abort (); 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr44555.c: -------------------------------------------------------------------------------- 1 | struct a { 2 | char b[100]; 3 | }; 4 | int foo(struct a *a) 5 | { 6 | if (&a->b) 7 | return 1; 8 | return 0; 9 | } 10 | extern void abort (void); 11 | int main() 12 | { 13 | if (foo((struct a *)0) != 0) 14 | abort (); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/20180211-bug.dsp: -------------------------------------------------------------------------------- 1 | // Bug Julius 2018-02-11 2 | // Missing interval computation for << and >> 3 | // 4 | // Expected behavior: two delay lines of same size (131072) 5 | // should be allocated 6 | 7 | x = nentry("Log2(Delay)",15,5,16,1); 8 | process = @(pow(2.0f, x)), @(1< 0) - (n < 0); 6 | } 7 | 8 | main () 9 | { 10 | if (f (-1) != -1) 11 | abort (); 12 | if (f (1) != 1) 13 | abort (); 14 | if (f (0) != 0) 15 | abort (); 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010221-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | 3 | int n = 2; 4 | 5 | main () 6 | { 7 | int i, x = 45; 8 | 9 | for (i = 0; i < n; i++) 10 | { 11 | if (i != 0) 12 | x = ( i > 0 ) ? i : 0; 13 | } 14 | 15 | if (x != 1) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20071011-1.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | void foo(int *p) 3 | { 4 | int x; 5 | int y; 6 | x = *p; 7 | *p = 0; 8 | y = *p; 9 | if (x != y) 10 | return; 11 | abort (); 12 | } 13 | 14 | int main() 15 | { 16 | int a = 1; 17 | foo(&a); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921208-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | double 3 | f(double x) 4 | { 5 | return x*x; 6 | } 7 | 8 | double 9 | Int(double (*f)(double), double a) 10 | { 11 | return (*f)(a); 12 | } 13 | 14 | main() 15 | { 16 | if (Int(&f,2.0) != 4.0) 17 | abort(); 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990117-1.c: -------------------------------------------------------------------------------- 1 | int 2 | foo (int x, int y, int i, int j) 3 | { 4 | double tmp1 = ((double) x / y); 5 | double tmp2 = ((double) i / j); 6 | 7 | return tmp1 < tmp2; 8 | } 9 | 10 | main () 11 | { 12 | if (foo (2, 24, 3, 4) == 0) 13 | abort (); 14 | return 0; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr49186.c: -------------------------------------------------------------------------------- 1 | /* PR target/49186 */ 2 | extern void abort (void); 3 | 4 | int 5 | main () 6 | { 7 | int x; 8 | unsigned long long uv = 0x1000000001ULL; 9 | 10 | x = (uv < 0x80) ? 1 : ((uv < 0x800) ? 2 : 3); 11 | if (x != 3) 12 | abort (); 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr51023.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/51023 */ 2 | 3 | extern void abort (void); 4 | 5 | short int 6 | foo (long int x) 7 | { 8 | return x; 9 | } 10 | 11 | int 12 | main () 13 | { 14 | long int a = 0x4272AL; 15 | if (foo (a) == a) 16 | abort (); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/ptr-arith-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | char * 3 | f (char *s, unsigned int i) 4 | { 5 | return &s[i + 3 - 1]; 6 | } 7 | 8 | main () 9 | { 10 | char *str = "abcdefghijkl"; 11 | char *x2 = f (str, 12); 12 | if (str + 14 != x2) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/struct-ini-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct S 3 | { 4 | char f1; 5 | int f2[2]; 6 | }; 7 | 8 | struct S object = {'X', 8, 9}; 9 | 10 | main () 11 | { 12 | if (object.f1 != 'X' || object.f2[0] != 8 || object.f2[1] != 9) 13 | abort (); 14 | exit (0); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20021118-3.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | extern void exit (int); 3 | 4 | int 5 | foo (int x) 6 | { 7 | if (x == -2 || -x - 100 >= 0) 8 | abort (); 9 | return 0; 10 | } 11 | 12 | int 13 | main () 14 | { 15 | foo (-3); 16 | foo (-99); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920922-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | unsigned long* 3 | f(p)unsigned long*p; 4 | { 5 | unsigned long a = (*p++) >> 24; 6 | return p + a; 7 | } 8 | 9 | main () 10 | { 11 | unsigned long x = 0x80000000UL; 12 | if (f(&x) != &x + 0x81) 13 | abort(); 14 | exit(0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/931110-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef struct 3 | { 4 | short f:3, g:3, h:10; 5 | } small; 6 | 7 | struct 8 | { 9 | int i; 10 | small s[10]; 11 | } x; 12 | 13 | main () 14 | { 15 | int i; 16 | for (i = 0; i < 10; i++) 17 | x.s[i].f = 0; 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-4.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | f() 4 | { 5 | int j = 1; 6 | long i; 7 | for (i = -0x70000000L; i < 0x60000000L; i += 0x10000000L) j <<= 1; 8 | return j; 9 | } 10 | 11 | int 12 | main () 13 | { 14 | if (f () != 8192) 15 | abort (); 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr22429.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | #define N (1 << (sizeof(int) * __CHAR_BIT__ - 2)) 4 | 5 | int f(int n) 6 | { 7 | if (-N <= n && n <= N-1) 8 | return 1; 9 | return 0; 10 | } 11 | 12 | int main () 13 | { 14 | if (f (N)) 15 | abort (); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr31605.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | void put_field (unsigned int start, unsigned int len) 3 | { 4 | int cur_bitshift = ((start + len) % 8) - 8; 5 | if (cur_bitshift > -8) 6 | exit (0); 7 | } 8 | 9 | int 10 | main () 11 | { 12 | put_field (0, 1); 13 | abort (); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr42544.c: -------------------------------------------------------------------------------- 1 | /* PR c/42544 */ 2 | 3 | extern void abort (void); 4 | 5 | int 6 | main () 7 | { 8 | signed short s = -1; 9 | if (sizeof (long long) == sizeof (unsigned int)) 10 | return 0; 11 | if ((unsigned int) s >= 0x100000000ULL) 12 | abort (); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ext/aflplusplus"] 2 | path = ext/aflplusplus 3 | url = https://github.com/aflplusplus/aflplusplus 4 | [submodule "ext/svf"] 5 | path = ext/svf 6 | url = https://github.com/svf-tools/svf 7 | [submodule "ext/abseil-cpp"] 8 | path = ext/abseil 9 | url = https://github.com/abseil/abseil-cpp 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000412-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int f(int a,int *y) 3 | { 4 | int x = a; 5 | 6 | if (a==0) 7 | return *y; 8 | 9 | return f(a-1,&x); 10 | } 11 | 12 | int main(int argc,char **argv) 13 | { 14 | if (f (100, (int *) 0) != 1) 15 | abort (); 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010206-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int foo (void) 3 | { 4 | int i; 5 | #line 1 "20010206-1.c" 6 | if (0) i = 1; else i 7 | #line 1 "20010206-1.c" 8 | = 26; 9 | return i; 10 | } 11 | 12 | int main () 13 | { 14 | if (foo () != 26) 15 | abort (); 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20011019-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | extern void abort (void); 3 | 4 | struct { int a; int b[5]; } x; 5 | int *y; 6 | 7 | int foo (void) 8 | { 9 | return y - x.b; 10 | } 11 | 12 | int main (void) 13 | { 14 | y = x.b; 15 | if (foo ()) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20150611-1.c: -------------------------------------------------------------------------------- 1 | int a, c, d; 2 | short b; 3 | 4 | int 5 | main () 6 | { 7 | int e[1]; 8 | for (; b < 2; b++) 9 | { 10 | a = 0; 11 | if (b == 28378) 12 | a = e[b]; 13 | if (!(d || b)) 14 | for (; c;) 15 | ; 16 | } 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921218-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f() 3 | { 4 | long l2; 5 | unsigned short us; 6 | unsigned long ul; 7 | short s2; 8 | 9 | ul = us = l2 = s2 = -1; 10 | return ul; 11 | } 12 | 13 | main() 14 | { 15 | if (f()!=(unsigned short)-1) 16 | abort(); 17 | exit(0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/940122-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | char *a = 0; 3 | char *b = 0; 4 | 5 | g (x) 6 | int x; 7 | { 8 | if ((!!a) != (!!b)) 9 | abort (); 10 | } 11 | 12 | f (x) 13 | int x; 14 | { 15 | g (x * x); 16 | } 17 | 18 | main () 19 | { 20 | f (100); 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950426-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main() 3 | { 4 | long int i = -2147483647L - 1L; /* 0x80000000 */ 5 | char ca = 1; 6 | 7 | if (i >> ca != -1073741824L) 8 | abort (); 9 | 10 | if (i >> i / -2000000000L != -1073741824L) 11 | abort (); 12 | 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/func-ptr-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static double f (float a); 3 | static double (*fp) (float a); 4 | 5 | main () 6 | { 7 | fp = f; 8 | if (fp ((float) 1) != 1.0) 9 | abort (); 10 | exit (0); 11 | } 12 | 13 | static double 14 | f (float a) 15 | { 16 | return a; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main () 3 | { 4 | int i, j, k[3]; 5 | 6 | j = 0; 7 | for (i=0; i < 3; i++) 8 | { 9 | k[i] = j++; 10 | } 11 | 12 | for (i=2; i >= 0; i--) 13 | { 14 | if (k[i] != i) 15 | abort (); 16 | } 17 | 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-14.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a3[3]; 3 | 4 | void f(int *a) 5 | { 6 | int i; 7 | 8 | for (i=3; --i;) 9 | a[i] = 42 / i; 10 | } 11 | 12 | int 13 | main () 14 | { 15 | f(a3); 16 | 17 | if (a3[1] != 42 || a3[2] != 21) 18 | abort (); 19 | 20 | exit (0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a[2]; 3 | 4 | f (b) 5 | { 6 | unsigned int i; 7 | for (i = 0; i < b; i++) 8 | a[i] = i - 2; 9 | } 10 | 11 | main () 12 | { 13 | a[0] = a[1] = 0; 14 | f (2); 15 | if (a[0] != -2 || a[1] != -1) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr21331.c: -------------------------------------------------------------------------------- 1 | void abort (void); 2 | 3 | int bar (void) { return -1; } 4 | 5 | unsigned long 6 | foo () 7 | { unsigned long retval; 8 | retval = bar (); 9 | if (retval == -1) return 0; 10 | return 3; } 11 | 12 | main () 13 | { if (foo () != 0) abort (); 14 | return 0; } 15 | 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr29797-2.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | 3 | unsigned long bar(void) { return 32768; } 4 | 5 | int main() 6 | { 7 | unsigned long nStyle = bar (); 8 | if (nStyle & 32768) 9 | nStyle |= 65536; 10 | if (nStyle != (32768 | 65536)) 11 | abort (); 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr35163.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | 3 | int main() 4 | { 5 | signed char a = -30; 6 | signed char b = -31; 7 | #if(__SIZEOF_INT__ >= 4) 8 | if (a > (unsigned short)b) 9 | #else 10 | if ((long) a > (unsigned short)b) 11 | #endif 12 | abort (); 13 | return 0; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/error04.dsp: -------------------------------------------------------------------------------- 1 | //ERROR : inconsistent number of parameters in pattern-matching rule: (x,y) => -; previous rule was: (5) => +; 2 | 3 | // Faust should complain about inconsistent number of patterns 4 | // between the foo rules 5 | 6 | foo (5) = +; 7 | foo (x,y) = -; 8 | 9 | process = foo(3,2); 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000205-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static int f (int a) 3 | { 4 | if (a == 0) 5 | return 0; 6 | do 7 | if (a & 128) 8 | return 1; 9 | while (f (0)); 10 | return 0; 11 | } 12 | 13 | int main(void) 14 | { 15 | if (f (~128)) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040319-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | 3 | blah (int zzz) 4 | { 5 | int foo; 6 | if (zzz >= 0) 7 | return 1; 8 | foo = (zzz >= 0 ? (zzz) : -(zzz)); 9 | return foo; 10 | } 11 | 12 | main() 13 | { 14 | if (blah (-1) != 1) 15 | abort (); 16 | else 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20070212-2.c: -------------------------------------------------------------------------------- 1 | int f(int k, int i1, int j1) 2 | { 3 | int *f1; 4 | if(k) 5 | f1 = &i1; 6 | else 7 | f1 = &j1; 8 | i1 = 0; 9 | return *f1; 10 | } 11 | 12 | extern void abort (void); 13 | 14 | int main() 15 | { 16 | if (f(1, 1, 2) != 0) 17 | abort (); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20071205-1.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/34337 */ 2 | 3 | extern void abort (void); 4 | 5 | int 6 | foo (int x) 7 | { 8 | return ((x << 8) & 65535) | 255; 9 | } 10 | 11 | int 12 | main (void) 13 | { 14 | if (foo (0x32) != 0x32ff || foo (0x174) != 0x74ff) 15 | abort (); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/961026-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | test (arg) 4 | int arg; 5 | { 6 | if (arg > 0 || arg == 0) 7 | return 0; 8 | return -1; 9 | } 10 | 11 | main () 12 | { 13 | if (test (0) != 0) 14 | abort (); 15 | if (test (-1) != -1) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr24142.c: -------------------------------------------------------------------------------- 1 | void abort (void); 2 | 3 | int f (int a, int b) 4 | { 5 | if (a == 1) 6 | a = 0; 7 | if (b == 0) 8 | a = 1; 9 | if (a != 0) 10 | return 0; 11 | return 1; 12 | } 13 | 14 | int main (void) 15 | { 16 | if (f (1, 1) != 1) 17 | abort (); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/bs.dsp: -------------------------------------------------------------------------------- 1 | // Test the BS variable access 2 | 3 | process = ramp(BS, 10) 4 | with { 5 | ramp = case { 6 | (0) => _; 7 | (n) => \(y,x).(if(y+x/n < x, y+x/n, if(y-x/n > x, y-x/n, x))) ~ _; 8 | }; 9 | if(cond,then,else) = select2(cond,else,then); 10 | BS = fvariable(int count, ); 11 | }; 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/schema4.dsp: -------------------------------------------------------------------------------- 1 | // exemple de schema illisible 2 | 3 | import("music.lib"); 4 | freq = hslider("freq", 440, 20, 20000, 0.1); 5 | partial(i) = osc(i*freq); 6 | partial0 = osc(0*freq); 7 | partial1 = osc(1*freq); 8 | partial2 = osc(2*freq); 9 | process = partial(0), partial1, partial(2); 10 | 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/v4.dsp: -------------------------------------------------------------------------------- 1 | // route visualisation test 2 | import("stdfaust.lib"); 3 | 4 | R = 3; 5 | 6 | r1(N,M) = ro.interleave(N,M); // time 2mn 7 | r2(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M + int(i/N) + 1))); // time 0.1s 8 | 9 | process = r1(R,R); // time 2mn 10 | //process = r2(R,R); // time 0.3s -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000314-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main () 3 | { 4 | long winds = 0; 5 | 6 | while (winds != 0) 7 | { 8 | if (*(char *) winds) 9 | break; 10 | } 11 | 12 | if (winds == 0 || winds != 0 || *(char *) winds) 13 | exit (0); 14 | 15 | abort (); 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030403-1.c: -------------------------------------------------------------------------------- 1 | /* The non-destructive folder was always emitting >= when folding 2 | comparisons to signed_max+1. */ 3 | 4 | #include 5 | 6 | int 7 | main () 8 | { 9 | unsigned long count = 8; 10 | 11 | if (count > INT_MAX) 12 | abort (); 13 | 14 | return (0); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030718-1.c: -------------------------------------------------------------------------------- 1 | /* PR c/10320 2 | The function temp was not being emitted in a prerelease of 3.4 20030406. 3 | Contributed by pinskia@physics.uc.edu */ 4 | 5 | static inline void temp(); 6 | int main() 7 | { 8 | temp(); 9 | return 0; 10 | } 11 | static void temp(){} 12 | 13 | 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920710-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main() 3 | { 4 | if ((double) 18446744073709551615ULL < 1.84467440737095e+19 || 5 | (double) 18446744073709551615ULL > 1.84467440737096e+19) 6 | abort(); 7 | 8 | if (16777217L != (float)16777217e0) 9 | abort(); 10 | 11 | exit(0); 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/951115-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int var = 0; 3 | 4 | g () 5 | { 6 | var = 1; 7 | } 8 | 9 | f () 10 | { 11 | int f2 = 0; 12 | 13 | if (f2 == 0) 14 | ; 15 | 16 | g (); 17 | } 18 | 19 | main () 20 | { 21 | f (); 22 | if (var != 1) 23 | abort (); 24 | exit (0); 25 | } 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/951204-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (char *x) 3 | { 4 | *x = 'x'; 5 | } 6 | 7 | main () 8 | { 9 | int i; 10 | char x = '\0'; 11 | 12 | for (i = 0; i < 100; ++i) 13 | { 14 | f (&x); 15 | if (*(const char *) &x != 'x') 16 | abort (); 17 | } 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960218-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int glob; 3 | 4 | g (x) 5 | { 6 | glob = x; 7 | return 0; 8 | } 9 | 10 | f (x) 11 | { 12 | int a = ~x; 13 | while (a) 14 | a = g (a); 15 | } 16 | 17 | main () 18 | { 19 | f (3); 20 | if (glob != -4) 21 | abort (); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980424-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int i, a[99]; 3 | 4 | void f (int one) 5 | { 6 | if (one != 1) 7 | abort (); 8 | } 9 | 10 | void 11 | g () 12 | { 13 | f (a[i & 0x3f]); 14 | } 15 | 16 | int 17 | main () 18 | { 19 | a[0] = 1; 20 | i = 0x40; 21 | g (); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980604-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a = 1; 3 | int b = -1; 4 | 5 | int c = 1; 6 | int d = 0; 7 | 8 | main () 9 | { 10 | double e; 11 | double f; 12 | double g; 13 | 14 | f = c; 15 | g = d; 16 | e = (a < b) ? f : g; 17 | if (e) 18 | abort (); 19 | exit(0); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980929-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | void f(int i) 3 | { 4 | if (i != 1000) 5 | abort (); 6 | } 7 | 8 | 9 | int main() 10 | { 11 | int n=1000; 12 | int i; 13 | 14 | f(n); 15 | for(i=0; i<1; ++i) { 16 | f(n); 17 | n=666; 18 | &n; 19 | } 20 | 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-6.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main() 3 | { 4 | char c; 5 | char d; 6 | int nbits; 7 | c = -1; 8 | for (nbits = 1 ; nbits < 100; nbits++) { 9 | d = (1 << nbits) - 1; 10 | if (d == c) 11 | break; 12 | } 13 | if (nbits == 100) 14 | abort(); 15 | exit(0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr46019.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/46019 */ 2 | 3 | extern void abort (void); 4 | 5 | int 6 | main (void) 7 | { 8 | unsigned long long l = 0x40000000000ULL; 9 | int n; 10 | for (n = 0; n < 8; n++) 11 | if (l / (0x200000000ULL << n) != (0x200 >> n)) 12 | abort (); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr48814-2.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | int arr[] = {1,2,3,4}; 4 | int count = 0; 5 | 6 | int 7 | incr (void) 8 | { 9 | return ++count; 10 | } 11 | 12 | int main() 13 | { 14 | arr[count++] = incr (); 15 | if (count != 2 || arr[count] != 3) 16 | abort (); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/vrp-4.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | extern void abort (); 3 | 4 | void test(int x, int y) 5 | { 6 | int c; 7 | 8 | if (x == 1) abort(); 9 | if (y == 1) abort(); 10 | 11 | c = x / y; 12 | 13 | if (c != 1) abort(); 14 | } 15 | 16 | int main() 17 | { 18 | test(2, 2); 19 | exit (0); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug4.dsp: -------------------------------------------------------------------------------- 1 | import("music.lib"); 2 | fold = case { 3 | (1,f,x) => x(0); 4 | (n,f,x) => f(fold(n-1,f,x),x(n-1)); 5 | }; 6 | fpar(n) = fold(n,\(x,y).(x,y)); 7 | freq = hslider("freq", 440, 20, 20000, 0.1); 8 | partial(i) = osc(i*freq); 9 | process = fpar(5, partial); 10 | 11 | 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test15.dsp: -------------------------------------------------------------------------------- 1 | durationSamples = 100; 2 | grainAmplitude = 2.8; 3 | 4 | rdur = 1.0/durationSamples; 5 | rdur2 = rdur*rdur; 6 | curve = -8.0 * grainAmplitude * rdur2; 7 | 8 | slope = 4* grainAmplitude * (rdur - rdur2) + (curve : +~_:mem); 9 | amplitude = slope : + ~_:mem; 10 | 11 | process = slope, amplitude; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/virtual_analog_oscillators.dsp: -------------------------------------------------------------------------------- 1 | ol = library("oscillator.lib"); 2 | fl = library("filter.lib"); 3 | el = library("effect.lib"); 4 | 5 | process = 6 | vgroup("[1]", ol.virtual_analog_oscillator_demo) : 7 | vgroup("[2]", el.moog_vcf_demo) : 8 | vgroup("[3]", fl.spectral_level_demo) <: 9 | _,_; 10 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000819-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a[2] = { 2, 0 }; 3 | 4 | void foo(int *sp, int cnt) 5 | { 6 | int *p, *top; 7 | 8 | top = sp; sp -= cnt; 9 | 10 | for(p = sp; p <= top; p++) 11 | if (*p < 2) exit(0); 12 | } 13 | 14 | int main() 15 | { 16 | foo(a + 1, 1); 17 | abort(); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20031211-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct a 3 | { 4 | unsigned int bitfield : 3; 5 | }; 6 | 7 | int main() 8 | { 9 | struct a a; 10 | 11 | a.bitfield = 131; 12 | foo (a.bitfield); 13 | exit (0); 14 | } 15 | 16 | foo(unsigned int z) 17 | { 18 | if (z != 3) 19 | abort (); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960405-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | #define X 5.9486574767861588254287966331400356538172e4931L 3 | 4 | long double x = X + X; 5 | long double y = 2.0L * X; 6 | 7 | main () 8 | { 9 | #if ! defined (__vax__) && ! defined (_CRAY) 10 | if (x != y) 11 | abort (); 12 | #endif 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-11.c: -------------------------------------------------------------------------------- 1 | static int a[199]; 2 | 3 | static void 4 | foo () 5 | { 6 | int i; 7 | for (i = 198; i >= 0; i--) 8 | a[i] = i; 9 | } 10 | 11 | int 12 | main () 13 | { 14 | int i; 15 | foo (); 16 | for (i = 0; i < 199; i++) 17 | if (a[i] != i) 18 | abort (); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr58385.c: -------------------------------------------------------------------------------- 1 | /* PR tree-optimization/58385 */ 2 | 3 | extern void abort (void); 4 | 5 | int a, b = 1; 6 | 7 | int 8 | foo () 9 | { 10 | b = 0; 11 | return 0; 12 | } 13 | 14 | int 15 | main () 16 | { 17 | ((0 || a) & foo () >= 0) <= 1 && 1; 18 | if (b) 19 | abort (); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug10.dsp: -------------------------------------------------------------------------------- 1 | // additional arguments of pm rule where thrown away 2 | 3 | cond(1,x,y) = x; 4 | cond(b,x,y) = y; 5 | 6 | fact(n) = cond(n>0, \(n).(n*fact(n-1)), \(n).(1)) (n); 7 | 8 | fact2(n) = cond(n>0, \(n).(n*fact2(n-1)), \(n).(1), n); 9 | 10 | process = fact(10), fact(-10), fact2(10); 11 | 12 | 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/reverb_designer.dsp: -------------------------------------------------------------------------------- 1 | el = library("effect.lib"); 2 | 3 | N = 16; // Feedback Delay Network (FDN) order (power of 2, 2 to 16) 4 | NB = 5; // Number of T60-controlled frequency-bands (3 or more) 5 | BSO = 3; // Order of each lowpass/highpass bandsplit (odd positive integer) 6 | 7 | process = el.fdnrev0_demo(N,NB,BSO); 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20020225-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static int 3 | test(int x) 4 | { 5 | union 6 | { 7 | int i; 8 | double d; 9 | } a; 10 | a.d = 0; 11 | a.i = 1; 12 | return x >> a.i; 13 | } 14 | 15 | int main(void) 16 | { 17 | if (test (5) != 2) 18 | abort (); 19 | exit (0); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20050131-1.c: -------------------------------------------------------------------------------- 1 | /* Verify that we do not lose side effects on a MOD expression. */ 2 | 3 | #include 4 | #include 5 | 6 | int 7 | foo (int a) 8 | { 9 | int x = 0 % a++; 10 | return a; 11 | } 12 | 13 | main() 14 | { 15 | if (foo (9) != 10) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930921-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (x) 3 | unsigned x; 4 | { 5 | return (unsigned) (((unsigned long long) x * 0xAAAAAAAB) >> 32) >> 1; 6 | } 7 | 8 | main () 9 | { 10 | unsigned i; 11 | 12 | for (i = 0; i < 10000; i++) 13 | if (f (i) != i / 3) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980618-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | void func(int, int); 3 | 4 | int main() 5 | { 6 | int x = 7; 7 | func(!x, !7); 8 | exit (0); 9 | } 10 | 11 | void func(int x, int y) 12 | { 13 | if (x == y) 14 | return; 15 | else 16 | abort (); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr19689.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target int32plus } */ 2 | extern void abort (void); 3 | 4 | struct 5 | { 6 | int b : 29; 7 | } f; 8 | 9 | void foo (short j) 10 | { 11 | f.b = j; 12 | } 13 | 14 | int main() 15 | { 16 | foo (-55); 17 | if (f.b != -55) 18 | abort (); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr22630.c: -------------------------------------------------------------------------------- 1 | void abort (void); 2 | 3 | int j; 4 | 5 | void bla (int *r) 6 | { 7 | int *p, *q; 8 | 9 | p = q = r; 10 | if (!p) 11 | p = &j; 12 | 13 | if (p != q) 14 | j = 1; 15 | } 16 | 17 | int main (void) 18 | { 19 | bla (0); 20 | if (!j) 21 | abort (); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000706-4.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | extern void exit(int); 3 | 4 | int *c; 5 | 6 | void bar(int b) 7 | { 8 | if (*c != 1 || b != 2) 9 | abort(); 10 | } 11 | 12 | void foo(int a, int b) 13 | { 14 | c = &a; 15 | bar(b); 16 | } 17 | 18 | int main() 19 | { 20 | foo(1, 2); 21 | exit(0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20001013-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct x { 3 | int a, b; 4 | } z = { -4028, 4096 }; 5 | 6 | int foo(struct x *p, int y) 7 | { 8 | if ((y & 0xff) != y || -p->b >= p->a) 9 | return 1; 10 | return 0; 11 | } 12 | 13 | main() 14 | { 15 | if (foo (&z, 10)) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030120-2.c: -------------------------------------------------------------------------------- 1 | /* PR 8848 */ 2 | 3 | extern void abort (); 4 | 5 | int foo(int status) 6 | { 7 | int s = 0; 8 | if (status == 1) s=1; 9 | if (status == 3) s=3; 10 | if (status == 4) s=4; 11 | return s; 12 | } 13 | 14 | int main() 15 | { 16 | if (foo (3) != 3) 17 | abort (); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20060110-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | long long 4 | f (long long a) 5 | { 6 | return (a << 32) >> 32; 7 | } 8 | long long a = 0x1234567876543210LL; 9 | long long b = (0x1234567876543210LL << 32) >> 32; 10 | int 11 | main () 12 | { 13 | if (f (a) != b) 14 | abort (); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950503-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | main () 3 | { 4 | int tmp; 5 | unsigned long long utmp1, utmp2; 6 | 7 | tmp = 16; 8 | 9 | utmp1 = (~((unsigned long long) 0)) >> tmp; 10 | utmp2 = (~((unsigned long long) 0)) >> 16; 11 | 12 | if (utmp1 != utmp2) 13 | abort (); 14 | exit (0); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/961004-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int k = 0; 3 | 4 | main() 5 | { 6 | int i; 7 | int j; 8 | 9 | for (i = 0; i < 2; i++) 10 | { 11 | if (k) 12 | { 13 | if (j != 2) 14 | abort (); 15 | } 16 | else 17 | { 18 | j = 2; 19 | k++; 20 | } 21 | } 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-7.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | void foo (unsigned int n) 3 | { 4 | int i, j = -1; 5 | 6 | for (i = 0; i < 10 && j < 0; i++) 7 | { 8 | if ((1UL << i) == n) 9 | j = i; 10 | } 11 | 12 | if (j < 0) 13 | abort (); 14 | } 15 | 16 | main() 17 | { 18 | foo (64); 19 | exit (0); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr44828.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | static signed char 4 | foo (signed char si1, signed char si2) 5 | { 6 | return si1 * si2; 7 | } 8 | 9 | int a = 0x105F61CA; 10 | 11 | int 12 | main (void) 13 | { 14 | int b = 0x0332F5C8; 15 | if (foo (b, a) > 0) 16 | abort (); 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr48973-1.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/48973 */ 2 | 3 | extern void abort (void); 4 | struct S { int f : 1; } s; 5 | int v = -1; 6 | 7 | void 8 | foo (unsigned int x) 9 | { 10 | if (x != -1U) 11 | abort (); 12 | } 13 | 14 | int 15 | main () 16 | { 17 | s.f = (v & 1) > 0; 18 | foo (s.f); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr69320-3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static int a[40] = {7, 5, 3, 3, 0, 0, 3}; 4 | short b; 5 | int c = 5; 6 | int main() { 7 | b = 0; 8 | for (; b <= 3; b++) 9 | if (a[b + 6] ^ (0 || c)) 10 | ; 11 | else 12 | break; 13 | if (b != 4) 14 | abort (); 15 | exit (0); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/vrp-1.c: -------------------------------------------------------------------------------- 1 | 2 | extern void abort (); 3 | extern void exit (int); 4 | 5 | int f (int a) { 6 | if (a != 2) { 7 | a = -a; 8 | if (a == 2) 9 | return 0; 10 | return 1; 11 | } 12 | return 1; 13 | } 14 | 15 | int main (int argc, char *argv[]) { 16 | if (f (-2)) 17 | abort (); 18 | exit (0); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/fixarg.ssa: -------------------------------------------------------------------------------- 1 | # regression test for 3bec2c60 2 | 3 | export 4 | function w $test() { 5 | @start 6 | %x1 =l alloc8 8 7 | %x2 =l alloc8 8 8 | %r =w cnel %x1, %x2 # both operands need fixing 9 | ret %r 10 | } 11 | 12 | # >>> driver 13 | # extern int test(); 14 | # int main() { return !(test() == 1); } 15 | # <<< 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/parabolic-env.dsp: -------------------------------------------------------------------------------- 1 | durationSamples = 100; 2 | grainAmplitude = 2.8; 3 | 4 | rdur = 1.0/durationSamples; 5 | rdur2 = rdur*rdur; 6 | curve = -8.0 * grainAmplitude * rdur2; 7 | 8 | slope = 4* grainAmplitude * (rdur - rdur2) + (curve : +~_:mem); 9 | amplitude = slope : + ~_:mem; 10 | 11 | 12 | process = slope, amplitude; -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000605-3.c: -------------------------------------------------------------------------------- 1 | struct F { int x; int y; }; 2 | 3 | int main() 4 | { 5 | int timeout = 0; 6 | int x = 0; 7 | while (1) 8 | { 9 | const struct F i = { x++, }; 10 | if (i.x > 0) 11 | break; 12 | if (++timeout > 5) 13 | goto die; 14 | } 15 | return 0; 16 | die: 17 | abort (); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930614-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f (double *ty) 3 | { 4 | *ty = -1.0; 5 | } 6 | 7 | main () 8 | { 9 | double foo[6]; 10 | double tx = 0.0, ty, d; 11 | 12 | f (&ty); 13 | 14 | if (ty < 0) 15 | ty = -ty; 16 | d = (tx > ty) ? tx : ty; 17 | if (ty != d) 18 | abort (); 19 | exit (0); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960116-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static inline 3 | p (int *p) 4 | { 5 | return !((long) p & 1); 6 | } 7 | 8 | int 9 | f (int *q) 10 | { 11 | if (p (q) && *q) 12 | return 1; 13 | return 0; 14 | } 15 | 16 | main () 17 | { 18 | if (f ((int*) 0xffffffff) != 0) 19 | abort (); 20 | exit (0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr22098-2.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | extern void exit (int); 3 | typedef __UINTPTR_TYPE__ uintptr_t; 4 | int 5 | main (void) 6 | { 7 | int a = 0; 8 | int *p; 9 | uintptr_t b; 10 | b = (uintptr_t)(p = &(int []){0, 1, 2}[1]); 11 | if (*p != 1 || *(int *)b != 1) 12 | abort (); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr85582-1.c: -------------------------------------------------------------------------------- 1 | /* PR target/85582 */ 2 | 3 | int a, b, d = 2, e; 4 | long long c = 1; 5 | 6 | int 7 | main () 8 | { 9 | int g = 6; 10 | L1: 11 | e = d; 12 | if (a) 13 | goto L1; 14 | g--; 15 | int i = c >> ~(~e | ~g); 16 | L2: 17 | c = (b % c) * i; 18 | if (!e) 19 | goto L2; 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/vrp-2.c: -------------------------------------------------------------------------------- 1 | extern void abort (); 2 | extern void exit (int); 3 | 4 | int f (int a) { 5 | if (a != 2) { 6 | a = a > 0 ? a : -a; 7 | if (a == 2) 8 | return 0; 9 | return 1; 10 | } 11 | return 1; 12 | } 13 | 14 | int main (int argc, char *argv[]) { 15 | if (f (-2)) 16 | abort (); 17 | exit (0); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/_fix3.ssa: -------------------------------------------------------------------------------- 1 | function w $test() { 2 | @start 3 | %x =w copy 100 4 | %s =w copy 0 5 | @l 6 | %c =w cslew %x, 10 7 | jnz %c, @a, @b 8 | @a 9 | %s =w add %s, %x 10 | %x =w sub %x, 1 11 | jmp @c 12 | @b 13 | %s =w sub %s, %x 14 | jmp @c 15 | @c 16 | %x =w sub %x, 1 17 | jnz %x, @l, @end 18 | @end 19 | ret %s 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/20100120-bug.dsp: -------------------------------------------------------------------------------- 1 | // BUG : the compiler reports : 2 | // faust: extended/minprim.cpp:40: virtual CTree* MinPrim::computeSigOutput(const std::vector >&): Assertion `args.size() == arity()' failed. 3 | // like it was trying to evaluate 2:min 4 | 5 | process = vslider("2:min", 0, 0, 1, 0.01); 6 | 7 | 8 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20001130-1.c: -------------------------------------------------------------------------------- 1 | static inline int bar(void) { return 1; } 2 | static int mem[3]; 3 | 4 | static int foo(int x) 5 | { 6 | if (x != 0) 7 | return x; 8 | 9 | mem[x++] = foo(bar()); 10 | 11 | if (x != 1) 12 | abort(); 13 | 14 | return 0; 15 | } 16 | 17 | int main() 18 | { 19 | foo(0); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040313-1.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/14470 */ 2 | /* Origin: Lodewijk Voge */ 3 | 4 | extern void abort(void); 5 | 6 | int main() 7 | { 8 | int t[1025] = { 1024 }, d; 9 | 10 | d = 0; 11 | d = t[d]++; 12 | if (t[0] != 1025) 13 | abort(); 14 | if (d != 1024) 15 | abort(); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/981206-1.c: -------------------------------------------------------------------------------- 1 | /* Verify unaligned address aliasing on Alpha EV[45]. */ 2 | 3 | extern void exit (int); 4 | static unsigned short x, y; 5 | 6 | void foo() 7 | { 8 | x = 0x345; 9 | y = 0x567; 10 | } 11 | 12 | int main() 13 | { 14 | foo (); 15 | if (x != 0x345 || y != 0x567) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030920-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | int main() 4 | { 5 | int hicount = 0; 6 | unsigned char *c; 7 | char *str = "\x7f\xff"; 8 | for (c = (unsigned char *)str; *c ; c++) { 9 | if (!(((unsigned int)(*c)) < 0x80)) hicount++; 10 | } 11 | if (hicount != 1) 12 | abort (); 13 | return 0; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930622-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a = 1, b; 3 | 4 | g () { return 0; } 5 | h (x) {} 6 | 7 | f () 8 | { 9 | if (g () == -1) 10 | return 0; 11 | a = g (); 12 | if (b >= 1) 13 | h (a); 14 | return 0; 15 | } 16 | 17 | main () 18 | { 19 | f (); 20 | if (a != 0) 21 | abort (); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr22098-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | extern void exit (int); 3 | typedef __UINTPTR_TYPE__ uintptr_t; 4 | int 5 | main (void) 6 | { 7 | int a = 0; 8 | int *p; 9 | uintptr_t b; 10 | b = (uintptr_t)(p = &(int []){0, 1, 2}[++a]); 11 | if (a != 1 || *p != 1 || *(int *)b != 1) 12 | abort (); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/align.ssa: -------------------------------------------------------------------------------- 1 | export 2 | function $test() { 3 | @start 4 | %x =l alloc16 16 5 | %y =l add %x, 8 6 | %m =w rem %y, 16 7 | storew %m, %y 8 | %n =w loadw %y 9 | storew %n, $a 10 | ret 11 | } 12 | 13 | # >>> driver 14 | # extern void test(void); 15 | # int a; 16 | # int main() { test(); return !(a == 8 || a == -8); } 17 | # <<< 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/t6.dsp: -------------------------------------------------------------------------------- 1 | // compare interleave with equivalent route expression 2 | 3 | import("stdfaust.lib"); 4 | 5 | R = 20; 6 | 7 | r1(N,M) = ro.interleave(N,M); // time 2mn 8 | r2(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M + int(i/N) + 1))); // time 0.1s 9 | 10 | //process = r1(R,R); // time 2mn 11 | process = r2(R,R); // time 0.3s -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20011126-1.c: -------------------------------------------------------------------------------- 1 | /* Produced a overflow in ifcvt.c, causing S to contain 0xffffffff7fffffff. */ 2 | 3 | int a = 1; 4 | 5 | int main () 6 | { 7 | long long s; 8 | 9 | s = a; 10 | if (s < 0) 11 | s = -2147483648LL; 12 | else 13 | s = 2147483647LL; 14 | 15 | if (s < 0) 16 | abort (); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920202-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static int rule_text_needs_stack_pop = 0; 3 | static int input_stack_pos = 1; 4 | 5 | f (void) 6 | { 7 | rule_text_needs_stack_pop = 1; 8 | 9 | if (input_stack_pos <= 0) 10 | return 1; 11 | else 12 | return 0; 13 | } 14 | 15 | main () 16 | { 17 | f (); 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950621-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct s 3 | { 4 | int a; 5 | int b; 6 | struct s *dummy; 7 | }; 8 | 9 | f (struct s *sp) 10 | { 11 | return sp && sp->a == -1 && sp->b == -1; 12 | } 13 | 14 | main () 15 | { 16 | struct s x; 17 | x.a = x.b = -1; 18 | if (f (&x) == 0) 19 | abort (); 20 | exit (0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980612-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct fd 3 | { 4 | unsigned char a; 5 | unsigned char b; 6 | } f = { 5 }; 7 | 8 | struct fd *g() { return &f; } 9 | int h() { return -1; } 10 | 11 | int main() 12 | { 13 | struct fd *f = g(); 14 | f->b = h(); 15 | if (((f->a & 0x7f) & ~0x10) <= 2) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr40404.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | #if (__SIZEOF_INT__ <= 2) 4 | struct S { 5 | unsigned long ui17 : 17; 6 | } s; 7 | #else 8 | struct S { 9 | unsigned int ui17 : 17; 10 | } s; 11 | #endif 12 | int main() 13 | { 14 | s.ui17 = 0x1ffff; 15 | if (s.ui17 >= 0xfffffffeu) 16 | abort (); 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/schema3.dsp: -------------------------------------------------------------------------------- 1 | // exemple de schema illisible 2 | 3 | import("music.lib"); 4 | fold = case { 5 | (1,f,x) => x(0); 6 | (n,f,x) => f(fold(n-1,f,x),x(n-1)); 7 | }; 8 | fpar(n) = fold(n,\(x,y).(x,y)); 9 | freq = hslider("freq", 440, 20, 20000, 0.1); 10 | partial(i) = osc(i*freq); 11 | process = fpar(5, partial); 12 | 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20001017-2.c: -------------------------------------------------------------------------------- 1 | void 2 | fn_4parms (unsigned char a, long *b, long *c, unsigned int *d) 3 | { 4 | if (*b != 1 || *c != 2 || *d != 3) 5 | abort (); 6 | } 7 | 8 | int 9 | main () 10 | { 11 | unsigned char a = 0; 12 | unsigned long b = 1, c = 2; 13 | unsigned int d = 3; 14 | 15 | fn_4parms (a, &b, &c, &d); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20021010-1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void exit (int); 4 | int 5 | sub () 6 | { 7 | int dummy = 0, a = 16; 8 | 9 | if (a / INT_MAX / 16 == 0) 10 | return 0; 11 | else 12 | return a / INT_MAX / 16; 13 | } 14 | 15 | int 16 | main () 17 | { 18 | if (sub () != 0) 19 | abort (); 20 | 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20021120-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int g1, g2; 3 | 4 | void foo (int x) 5 | { 6 | int y; 7 | 8 | if (x) 9 | y = 793; 10 | else 11 | y = 793; 12 | g1 = 7930 / y; 13 | g2 = 7930 / x; 14 | } 15 | 16 | int main () 17 | { 18 | foo (793); 19 | if (g1 != 10 || g2 != 10) 20 | abort (); 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-2d.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a[2]; 3 | 4 | f (b) 5 | { 6 | unsigned int i; 7 | int *p; 8 | for (p = &a[b], i = b; --i < ~0; ) 9 | *--p = i * 3 + (int)a; 10 | } 11 | 12 | main () 13 | { 14 | a[0] = a[1] = 0; 15 | f (2); 16 | if (a[0] != (int)a || a[1] != (int)a + 3) 17 | abort (); 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-4b.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | f() 4 | { 5 | int j = 1; 6 | long i; 7 | i = 0x60000000L; 8 | do 9 | { 10 | j <<= 1; 11 | i += 0x10000000L; 12 | } while (i < -0x60000000L); 13 | return j; 14 | } 15 | 16 | int 17 | main () 18 | { 19 | if (f () != 2) 20 | abort (); 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr29797-1.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target int32plus } */ 2 | extern void abort(void); 3 | 4 | unsigned int bar(void) { return 32768; } 5 | 6 | int main() 7 | { 8 | unsigned int nStyle = bar (); 9 | if (nStyle & 32768) 10 | nStyle |= 65536; 11 | if (nStyle != (32768 | 65536)) 12 | abort (); 13 | return 0; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20020904-1.c: -------------------------------------------------------------------------------- 1 | /* PR c/7102 */ 2 | 3 | /* Verify that GCC zero-extends integer constants 4 | in unsigned binary operations. */ 5 | 6 | typedef unsigned char u8; 7 | 8 | u8 fun(u8 y) 9 | { 10 | u8 x=((u8)255)/y; 11 | return x; 12 | } 13 | 14 | int main(void) 15 | { 16 | if (fun((u8)2) != 127) 17 | abort (); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20021219-1.c: -------------------------------------------------------------------------------- 1 | /* PR optimization/8988 */ 2 | /* Contributed by Kevin Easton */ 3 | 4 | void foo(char *p1, char **p2) 5 | {} 6 | 7 | int main(void) 8 | { 9 | char str[] = "foo { xx }"; 10 | char *ptr = str + 5; 11 | 12 | foo(ptr, &ptr); 13 | 14 | while (*ptr && (*ptr == 13 || *ptr == 32)) 15 | ptr++; 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20050104-1.c: -------------------------------------------------------------------------------- 1 | /* PR tree-optimization/19060 */ 2 | 3 | void abort (void); 4 | 5 | static 6 | long long min () 7 | { 8 | return -__LONG_LONG_MAX__ - 1; 9 | } 10 | 11 | void 12 | foo (long long j) 13 | { 14 | if (j > 10 || j < min ()) 15 | abort (); 16 | } 17 | 18 | int 19 | main (void) 20 | { 21 | foo (10); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/931005-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef struct 3 | { 4 | char x; 5 | } T; 6 | 7 | T 8 | f (s1) 9 | T s1; 10 | { 11 | T s1a; 12 | s1a.x = s1.x; 13 | return s1a; 14 | } 15 | 16 | main () 17 | { 18 | T s1a, s1b; 19 | s1a.x = 100; 20 | s1b = f (s1a); 21 | if (s1b.x != 100) 22 | abort (); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-9.c: -------------------------------------------------------------------------------- 1 | /* Source: Neil Booth, from PR # 115. */ 2 | 3 | int false() 4 | { 5 | return 0; 6 | } 7 | 8 | extern void abort (void); 9 | 10 | int main (int argc,char *argv[]) 11 | { 12 | int count = 0; 13 | 14 | while (false() || count < -123) 15 | ++count; 16 | 17 | if (count) 18 | abort (); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/multdi-1.c: -------------------------------------------------------------------------------- 1 | /* PR target/9348 */ 2 | 3 | #define u_l_l unsigned long long 4 | #define l_l long long 5 | 6 | l_l mpy_res; 7 | 8 | u_l_l mpy (long a, long b) 9 | { 10 | return (u_l_l) a * (u_l_l) b; 11 | } 12 | 13 | int main(void) 14 | { 15 | mpy_res = mpy(1,-1); 16 | if (mpy_res != -1LL) 17 | abort (); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr38422.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/38422 */ 2 | 3 | extern void abort (void); 4 | 5 | struct S 6 | { 7 | int s : (sizeof (int) * __CHAR_BIT__ - 2); 8 | } s; 9 | 10 | void 11 | foo (void) 12 | { 13 | s.s *= 2; 14 | } 15 | 16 | int 17 | main () 18 | { 19 | s.s = 24; 20 | foo (); 21 | if (s.s != 48) 22 | abort (); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/README.magma.md: -------------------------------------------------------------------------------- 1 | # Magma 2 | 3 | [Magma](https://hexhive.epfl.ch/magma/) can be patched to support datAFLow as 4 | follows: 5 | 6 | ```bash 7 | git clone https://github.com/hexhive/magma 8 | cd magma 9 | git apply magma/magma.patch 10 | ``` 11 | 12 | Magma can then be run as usual. We provide a sample `captainrc` file that 13 | reproduces the results in the paper. 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930126-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct s { 3 | unsigned long long a:8, b:32; 4 | }; 5 | 6 | struct s 7 | f(struct s x) 8 | { 9 | x.b = 0xcdef1234; 10 | return x; 11 | } 12 | 13 | main() 14 | { 15 | static struct s i; 16 | i.a = 12; 17 | i = f(i); 18 | if (i.a != 12 || i.b != 0xcdef1234) 19 | abort(); 20 | exit(0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/941021-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | double glob_dbl; 3 | 4 | f (pdbl, value) 5 | double *pdbl; 6 | double value; 7 | { 8 | if (pdbl == 0) 9 | pdbl = &glob_dbl; 10 | 11 | *pdbl = value; 12 | } 13 | 14 | main () 15 | { 16 | f ((void *) 0, 55.1); 17 | 18 | if (glob_dbl != 55.1) 19 | abort (); 20 | exit (0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950714-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int array[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; 3 | 4 | main () 5 | { 6 | int i, j; 7 | int *p; 8 | 9 | for (i = 0; i < 10; i++) 10 | for (p = &array[0]; p != &array[9]; p++) 11 | if (*p == i) 12 | goto label; 13 | 14 | label: 15 | if (i != 1) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990829-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | double test (const double le, const double ri) 3 | { 4 | double val = ( ri - le ) / ( ri * ( le + 1.0 ) ); 5 | return val; 6 | } 7 | 8 | int main () 9 | { 10 | double retval; 11 | 12 | retval = test(1.0,2.0); 13 | if (retval < 0.24 || retval > 0.26) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990923-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | #define mask 0xffff0000L 3 | #define value 0xabcd0000L 4 | 5 | long 6 | foo (long x) 7 | { 8 | if ((x & mask) == value) 9 | return x & 0xffffL; 10 | return 1; 11 | } 12 | 13 | int 14 | main (void) 15 | { 16 | if (foo (value) != 0 || foo (0) != 1) 17 | abort (); 18 | 19 | exit (0); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/991216-4.c: -------------------------------------------------------------------------------- 1 | /* Test against a problem with loop reversal. */ 2 | extern void exit (int); 3 | static void bug(int size, int tries) 4 | { 5 | int i; 6 | int num = 0; 7 | while (num < size) 8 | { 9 | for (i = 1; i < tries; i++) num++; 10 | } 11 | } 12 | 13 | int main() 14 | { 15 | bug(5, 10); 16 | exit (0); 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr58662.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | int a, c, d; 4 | volatile int b; 5 | 6 | static int 7 | foo (int p1, short p2) 8 | { 9 | return p1 / p2; 10 | } 11 | 12 | int 13 | main () 14 | { 15 | char e; 16 | d = foo (a == 0, (0, 35536)); 17 | e = d % 14; 18 | b = e && c; 19 | if (b != 0) 20 | abort (); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test20.dsp: -------------------------------------------------------------------------------- 1 | // sharing in second order trandfert function 2 | // only two sample memories should be used 3 | 4 | TF2(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2) 5 | with { 6 | conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x''; 7 | conv2(k0,k1,x) = k0*x + k1*x'; 8 | sub(x,y) = y-x; 9 | }; 10 | 11 | process = TF2(1.25,1.73,1,1.73,1); 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000412-1.c: -------------------------------------------------------------------------------- 1 | short int i = -1; 2 | const char * const wordlist[207]; 3 | 4 | extern void exit (int); 5 | const char * const * 6 | foo(void) 7 | { 8 | register const char * const *wordptr = &wordlist[207u + i]; 9 | return wordptr; 10 | } 11 | 12 | int 13 | main() 14 | { 15 | if (foo() != &wordlist[206]) 16 | abort (); 17 | exit(0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000528-1.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 Free Software Foundation */ 2 | /* Contributed by Alexandre Oliva */ 3 | 4 | extern void exit (int); 5 | unsigned long l = (unsigned long)-2; 6 | unsigned short s; 7 | 8 | int main () { 9 | long t = l; 10 | s = t; 11 | if (s != (unsigned short)-2) 12 | abort (); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930713-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef struct 3 | { 4 | char x; 5 | } T; 6 | 7 | T 8 | f (s1) 9 | T s1; 10 | { 11 | T s1a; 12 | s1a.x = 17; 13 | return s1a; 14 | } 15 | 16 | main () 17 | { 18 | T s1a, s1b; 19 | s1a.x = 13; 20 | s1b = f (s1a); 21 | if (s1a.x != 13 || s1b.x != 17) 22 | abort (); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960302-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long a = 1; 3 | 4 | foo () 5 | { 6 | switch (a % 2 % 2 % 2 % 2 % 2 % 2 % 2 % 2) 7 | { 8 | case 0: 9 | return 0; 10 | case 1: 11 | return 1; 12 | default: 13 | return -1; 14 | } 15 | } 16 | 17 | main () 18 | { 19 | if (foo () != 1) 20 | abort (); 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/991023-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | 3 | 4 | int blah; 5 | foo() 6 | { 7 | int i; 8 | 9 | for (i=0 ; i< 7 ; i++) 10 | { 11 | if (i == 7 - 1) 12 | blah = 0xfcc; 13 | else 14 | blah = 0xfee; 15 | } 16 | return blah; 17 | } 18 | 19 | 20 | main() 21 | { 22 | if (foo () != 0xfcc) 23 | abort (); 24 | exit (0); 25 | } 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/vrp-3.c: -------------------------------------------------------------------------------- 1 | extern void abort (); 2 | extern void exit (int); 3 | 4 | int f (int a) { 5 | if (a < 12) { 6 | if (a > -15) { 7 | a = a > 0 ? a : -a; 8 | if (a == 2) 9 | return 0; 10 | return 1; 11 | } 12 | } 13 | return 1; 14 | } 15 | 16 | int main (int argc, char *argv[]) { 17 | if (f (-2)) 18 | abort (); 19 | exit (0); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/cup.ssa: -------------------------------------------------------------------------------- 1 | # counts up from -1988 to 1991 2 | 3 | export 4 | function $test() { 5 | @start 6 | @loop 7 | %n0 =l phi @start -1988, @loop %n1 8 | %n1 =l add 1, %n0 9 | %cmp =w cslel 1991, %n1 10 | jnz %cmp, @end, @loop 11 | @end 12 | ret 13 | } 14 | 15 | # >>> driver 16 | # extern void test(void); 17 | # int main() { test(); return 0; } 18 | # <<< 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930603-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int w[2][2]; 3 | 4 | f () 5 | { 6 | int i, j; 7 | 8 | for (i = 0; i < 2; i++) 9 | for (j = 0; j < 2; j++) 10 | if (i == j) 11 | w[i][j] = 1; 12 | } 13 | 14 | main () 15 | { 16 | f (); 17 | if (w[0][0] != 1 || w[1][1] != 1 || w[1][0] != 0 || w[0][1] != 0) 18 | abort (); 19 | exit (0); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/951003-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int f (i) { return 12; } 3 | int g () { return 0; } 4 | 5 | main () 6 | { 7 | int i, s; 8 | 9 | for (i = 0; i < 32; i++) 10 | { 11 | s = f (i); 12 | 13 | if (i == g ()) 14 | s = 42; 15 | if (i == 0 || s == 12) 16 | ; 17 | else 18 | abort (); 19 | } 20 | 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980506-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static void *self(void *p){ return p; } 3 | 4 | int 5 | f() 6 | { 7 | struct { int i; } s, *sp; 8 | int *ip = &s.i; 9 | 10 | s.i = 1; 11 | sp = self(&s); 12 | 13 | *ip = 0; 14 | return sp->i+1; 15 | } 16 | 17 | main() 18 | { 19 | if (f () != 1) 20 | abort (); 21 | else 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr17078-1.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | 3 | void test(int *ptr) 4 | { 5 | int i = 1; 6 | goto useless; 7 | if (0) 8 | { 9 | useless: 10 | i = 0; 11 | } 12 | else 13 | i = 1; 14 | *ptr = i; 15 | } 16 | 17 | int main() 18 | { 19 | int i = 1; 20 | test(&i); 21 | if (i) 22 | abort (); 23 | return 0; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/bug-sampo-power.dsp: -------------------------------------------------------------------------------- 1 | // BUG 2010 05 03 in Faust 0.9.22 2 | //---------------------------------------------------------- 3 | // Faustpower definition not generated when power is used in 4 | // initialisation classes (that is in table contents). 5 | 6 | mytbl(r) = rdtable(128, (1 : +~_ : _^2), r); 7 | process(x) = mytbl(int(abs(x)*127)) : _^2; 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000225-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main () 3 | { 4 | int nResult; 5 | int b=0; 6 | int i = -1; 7 | 8 | do 9 | { 10 | if (b!=0) { 11 | abort (); 12 | nResult=1; 13 | } else { 14 | nResult=0; 15 | } 16 | i++; 17 | b=(i+2)*4; 18 | } while (i < 0); 19 | exit (0); 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000605-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct F { int i; }; 3 | 4 | void f1(struct F *x, struct F *y) 5 | { 6 | int timeout = 0; 7 | for (; ((const struct F*)x)->i < y->i ; x->i++) 8 | if (++timeout > 5) 9 | abort (); 10 | } 11 | 12 | main() 13 | { 14 | struct F x, y; 15 | x.i = 0; 16 | y.i = 1; 17 | f1 (&x, &y); 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000731-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | double 3 | foo (void) 4 | { 5 | return 0.0; 6 | } 7 | 8 | void 9 | do_sibcall (void) 10 | { 11 | (void) foo (); 12 | } 13 | 14 | int 15 | main (void) 16 | { 17 | double x; 18 | 19 | for (x = 0; x < 20; x++) 20 | do_sibcall (); 21 | if (!(x >= 10)) 22 | abort (); 23 | exit (0); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010604-1.c: -------------------------------------------------------------------------------- 1 | #include 2 | extern void exit (int); 3 | 4 | int f (int a, int b, int c, _Bool d, _Bool e, _Bool f, char g) 5 | { 6 | if (g != 1 || d != true || e != true || f != true) abort (); 7 | return a + b + c; 8 | } 9 | 10 | int main (void) 11 | { 12 | if (f (1, 2, -3, true, true, true, '\001')) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20020127-1.c: -------------------------------------------------------------------------------- 1 | /* This used to fail on h8300. */ 2 | 3 | extern void abort (void); 4 | extern void exit (int); 5 | 6 | unsigned long 7 | foo (unsigned long n) 8 | { 9 | return (~n >> 3) & 1; 10 | } 11 | 12 | int 13 | main () 14 | { 15 | if (foo (1 << 3) != 0) 16 | abort (); 17 | 18 | if (foo (0) != 1) 19 | abort (); 20 | 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20021118-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct s { int f[4]; }; 3 | 4 | int foo (struct s s, int x1, int x2, int x3, int x4, int x5, int x6, int x7) 5 | { 6 | return s.f[3] + x7; 7 | } 8 | 9 | int main () 10 | { 11 | struct s s = { 1, 2, 3, 4 }; 12 | 13 | if (foo (s, 100, 200, 300, 400, 500, 600, 700) != 704) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20060102-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (); 2 | 3 | int f(int x) 4 | { 5 | return (x >> (sizeof (x) * __CHAR_BIT__ - 1)) ? -1 : 1; 6 | } 7 | 8 | volatile int one = 1; 9 | int main (void) 10 | { 11 | /* Test that the function above returns different values for 12 | different signs. */ 13 | if (f(one) == f(-one)) 14 | abort (); 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20100805-1.c: -------------------------------------------------------------------------------- 1 | unsigned int foo (unsigned int a, unsigned int b) 2 | { 3 | unsigned i; 4 | a = a & 1; 5 | for (i = 0; i < b; ++i) 6 | a = a << 1 | a >> (sizeof (unsigned int) * 8 - 1); 7 | return a; 8 | } 9 | extern void abort (void); 10 | int main() 11 | { 12 | if (foo (1, sizeof (unsigned int) * 8 + 1) != 2) 13 | abort (); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921013-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f(d,x,y,n) 3 | int*d; 4 | float*x,*y; 5 | int n; 6 | { 7 | while(n--){*d++=*x++==*y++;} 8 | } 9 | 10 | main() 11 | { 12 | int r[4]; 13 | float a[]={5,1,3,5}; 14 | float b[]={2,4,3,0}; 15 | int i; 16 | f(r,a,b,4); 17 | for(i=0;i<4;i++) 18 | if((a[i]==b[i])!=r[i]) 19 | abort(); 20 | exit(0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930719-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | f (foo, bar, com) 4 | { 5 | unsigned align; 6 | if (foo) 7 | return 0; 8 | while (1) 9 | { 10 | switch (bar) 11 | { 12 | case 1: 13 | if (com != 0) 14 | return align; 15 | *(char *) 0 = 0; 16 | } 17 | } 18 | } 19 | 20 | main () 21 | { 22 | f (0, 1, 1); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-3.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | #include 3 | 4 | int n = 0; 5 | 6 | g (i) 7 | { 8 | n++; 9 | } 10 | 11 | f (m) 12 | { 13 | int i; 14 | i = m; 15 | do 16 | { 17 | g (i * INT_MAX / 2); 18 | } 19 | while (--i > 0); 20 | } 21 | 22 | main () 23 | { 24 | f (4); 25 | if (n != 4) 26 | abort (); 27 | exit (0); 28 | } 29 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr23604.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | int g(int i, int j) 4 | { 5 | if (i>-1) 6 | if (i<2) 7 | { 8 | if (i != j) 9 | { 10 | if (j != 0) 11 | return 0; 12 | } 13 | } 14 | return 1; 15 | } 16 | 17 | int main(void) 18 | { 19 | if (!g(1, 0)) 20 | abort (); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr57875.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/57875 */ 2 | 3 | extern void abort (void); 4 | int a[1], b, c, d, f, i; 5 | char e[1]; 6 | 7 | int 8 | main () 9 | { 10 | for (; i < 1; i++) 11 | if (!d) 12 | { 13 | if (!c) 14 | f = 2; 15 | e[0] &= f ^= 0; 16 | } 17 | b = a[e[0] >> 1 & 1]; 18 | if (b != 0) 19 | abort (); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000706-3.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | extern void exit(int); 3 | 4 | int c; 5 | 6 | void baz(int *p) 7 | { 8 | c = *p; 9 | } 10 | 11 | void bar(int b) 12 | { 13 | if (c != 1 || b != 2) 14 | abort(); 15 | } 16 | 17 | void foo(int a, int b) 18 | { 19 | baz(&a); 20 | bar(b); 21 | } 22 | 23 | int main() 24 | { 25 | foo(1, 2); 26 | exit(0); 27 | } 28 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000717-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef struct trio { int a, b, c; } trio; 3 | 4 | int 5 | bar (int i, trio t) 6 | { 7 | if (t.a == t.b || t.a == t.c) 8 | abort (); 9 | } 10 | 11 | int 12 | foo (trio t, int i) 13 | { 14 | return bar (i, t); 15 | } 16 | 17 | main () 18 | { 19 | trio t = { 1, 2, 3 }; 20 | 21 | foo (t, 4); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20020819-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | foo () 3 | { 4 | return 0; 5 | } 6 | 7 | main() 8 | { 9 | int i, j, k, ccp_bad = 0; 10 | 11 | for (i = 0; i < 10; i++) 12 | { 13 | for (j = 0; j < 10; j++) 14 | if (foo ()) 15 | ccp_bad = 1; 16 | 17 | k = ccp_bad != 0; 18 | if (k) 19 | abort (); 20 | } 21 | 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20020916-1.c: -------------------------------------------------------------------------------- 1 | /* Distilled from try_pre_increment in flow.c. If-conversion inserted 2 | new instructions at the wrong place on ppc. */ 3 | 4 | int foo(int a) 5 | { 6 | int x; 7 | x = 0; 8 | if (a > 0) x = 1; 9 | if (a < 0) x = 1; 10 | return x; 11 | } 12 | 13 | int main() 14 | { 15 | if (foo(1) != 1) 16 | abort(); 17 | return 0; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040820-1.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/17099 */ 2 | 3 | extern void exit (int); 4 | extern void abort (void); 5 | 6 | void 7 | check (int a) 8 | { 9 | if (a != 1) 10 | abort (); 11 | } 12 | 13 | void 14 | test (int a, int b) 15 | { 16 | check ((a ? 1 : 0) | (b ? 2 : 0)); 17 | } 18 | 19 | int 20 | main (void) 21 | { 22 | test (1, 0); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20041210-1.c: -------------------------------------------------------------------------------- 1 | /* The FR-V port used to fail this test because the andcc patterns 2 | wrongly claimed to set the C and V flags. */ 3 | #include 4 | 5 | extern void exit (int); 6 | int x[4] = { INT_MIN / 2, INT_MAX, 2, 4 }; 7 | 8 | int 9 | main () 10 | { 11 | if (x[0] < x[1]) 12 | if ((x[2] & x[3]) < 0) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/950929-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int f (char *p) { } 3 | 4 | main () 5 | { 6 | char c; 7 | char c2; 8 | int i = 0; 9 | char *pc = &c; 10 | char *pc2 = &c2; 11 | int *pi = &i; 12 | 13 | *pc2 = 1; 14 | *pi = 1; 15 | *pc2 &= *pi; 16 | f (pc2); 17 | *pc2 = 1; 18 | *pc2 &= *pi; 19 | if (*pc2 != 1) 20 | abort (); 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/991221-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int main( void ) 3 | { 4 | unsigned long totalsize = 80; 5 | unsigned long msize = 64; 6 | 7 | if (sizeof(long) != 4) 8 | exit(0); 9 | 10 | if ( totalsize > (2147483647L * 2UL + 1) 11 | || (msize != 0 && ((msize - 1) > (2147483647L * 2UL + 1) ))) 12 | abort(); 13 | exit( 0 ); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-2b.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | #include 3 | 4 | int a[2]; 5 | 6 | f (int i) 7 | { 8 | for (; i < INT_MAX; i++) 9 | { 10 | a[i] = -2; 11 | if (&a[i] == &a[1]) 12 | break; 13 | } 14 | } 15 | 16 | main () 17 | { 18 | a[0] = a[1] = 0; 19 | f (0); 20 | if (a[0] != -2 || a[1] != -2) 21 | abort (); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/prefix.dsp: -------------------------------------------------------------------------------- 1 | declare name "prefix"; 2 | declare version "1.0"; 3 | declare author "Grame"; 4 | declare license "BSD"; 5 | declare copyright "(c)GRAME 2009"; 6 | 7 | //------------------------------------------------- 8 | // Simple prefix test for documentator 9 | //------------------------------------------------- 10 | 11 | 12 | process = prefix (3,*(7)); 13 | 14 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20080222-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | struct container 4 | { 5 | unsigned char data[1]; 6 | }; 7 | 8 | unsigned char space[6] = {1, 2, 3, 4, 5, 6}; 9 | 10 | int 11 | foo (struct container *p) 12 | { 13 | return p->data[4]; 14 | } 15 | 16 | int 17 | main () 18 | { 19 | if (foo ((struct container *) space) != 5) 20 | abort (); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960301-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct foo { 3 | unsigned : 12; 4 | unsigned field : 4; 5 | } foo; 6 | unsigned oldfoo; 7 | 8 | int 9 | bar (unsigned k) 10 | { 11 | oldfoo = foo.field; 12 | foo.field = k; 13 | if (k) 14 | return 1; 15 | return 2; 16 | } 17 | 18 | main () 19 | { 20 | if (bar (1U) != 1) 21 | abort (); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr24851.c: -------------------------------------------------------------------------------- 1 | /* We used to handle pointer addition wrongly 2 | at the time of recombining to an ARRAY_REF 3 | in the case of 4 | p + -4B 5 | where -4B is represented as unsigned. */ 6 | 7 | void abort(void); 8 | int main() 9 | { 10 | int a[10], *p, *q; 11 | q = &a[1]; 12 | p = &q[-1]; 13 | if (p >= &a[9]) 14 | abort (); 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr69320-4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int a; 4 | char b, d; 5 | short c; 6 | short fn1(int p1, int p2) { return p2 >= 2 ? p1 : p1 > p2; } 7 | 8 | int main() { 9 | int *e = &a, *f = &a; 10 | b = 1; 11 | for (; b <= 9; b++) { 12 | c = *e != 5 || d; 13 | *f = fn1(c || b, a); 14 | } 15 | if ((long long) a != 1) 16 | abort (); 17 | exit (0); 18 | } 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921124-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | f(x, d1, d2, d3) 3 | double d1, d2, d3; 4 | { 5 | return x; 6 | } 7 | 8 | g(b,s,x,y,i,j) 9 | char *b,*s; 10 | double x,y; 11 | { 12 | if (x != 1.0 || y != 2.0 || i != 3 || j != 4) 13 | abort(); 14 | } 15 | 16 | main() 17 | { 18 | g("","", 1.0, 2.0, f(3, 0.0, 0.0, 0.0), f(4, 0.0, 0.0, 0.0)); 19 | exit(0); 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960317-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | f (unsigned bitcount, int mant) 4 | { 5 | int mask = -1 << bitcount; 6 | { 7 | if (! (mant & -mask)) 8 | goto ab; 9 | if (mant & ~mask) 10 | goto auf; 11 | } 12 | ab: 13 | return 0; 14 | auf: 15 | return 1; 16 | } 17 | 18 | main () 19 | { 20 | if (f (0, -1)) 21 | abort (); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr22098-3.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | extern void exit (int); 3 | typedef __UINTPTR_TYPE__ uintptr_t; 4 | int n = 0; 5 | int f (void) { return ++n; } 6 | int 7 | main (void) 8 | { 9 | int a = 0; 10 | int *p; 11 | uintptr_t b; 12 | b = (uintptr_t)(p = &(int []){0, f(), 2}[1]); 13 | if (*p != 1 || *(int *)b != 1 || n != 1) 14 | abort (); 15 | exit (0); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/bug127.dsp: -------------------------------------------------------------------------------- 1 | // regression test for #127 by @magnetophon, fixed in 2.5.21 (rev. cc8253f7) 2 | 3 | group(x) = vgroup("foo", x); 4 | //this compiles: 5 | // group(x) = vgroup("foo", (_,_)); 6 | 7 | test(1,group) = (group(_,_)); 8 | //this compiles: 9 | // test(1,group) = (vgroup("foo",(_,_))); 10 | 11 | process = 12 | test(1,group); 13 | //this compiles: 14 | // (group(_,_)); 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/cubic_distortion.dsp: -------------------------------------------------------------------------------- 1 | declare name "cubic_distortion"; 2 | 3 | ol = library("oscillator.lib"); 4 | fl = library("filter.lib"); 5 | el = library("effect.lib"); 6 | 7 | process = 8 | // ol.oscr_demo : el.cubicnl_demo : fl.spectral_level_demo <: _,_; 9 | vgroup("[1]",ol.oscr_demo) : 10 | vgroup("[2]",el.cubicnl_demo) : 11 | vgroup("[3]",fl.spectral_level_demo) <: _,_; 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000217-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | unsigned short int showbug(unsigned short int *a, unsigned short int *b) 3 | { 4 | *a += *b -8; 5 | return (*a >= 8); 6 | } 7 | 8 | int main() 9 | { 10 | unsigned short int x = 0; 11 | unsigned short int y = 10; 12 | 13 | if (showbug(&x, &y) != 0) 14 | abort (); 15 | 16 | exit (0); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000419-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct foo { int a, b, c; }; 3 | 4 | void 5 | brother (int a, int b, int c) 6 | { 7 | if (a) 8 | abort (); 9 | } 10 | 11 | void 12 | sister (struct foo f, int b, int c) 13 | { 14 | brother ((f.b == b), b, c); 15 | } 16 | 17 | int 18 | main () 19 | { 20 | struct foo f = { 7, 8, 9 }; 21 | sister (f, 1, 2); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20040831-1.c: -------------------------------------------------------------------------------- 1 | /* This testcase was being miscompiled, because operand_equal_p 2 | returned that (unsigned long) d and (long) d are equal. */ 3 | extern void abort (void); 4 | extern void exit (int); 5 | 6 | int 7 | main (void) 8 | { 9 | double d = -12.0; 10 | long l = (d > 10000) ? (unsigned long) d : (long) d; 11 | if (l != -12) 12 | abort (); 13 | exit (0); 14 | } 15 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921112-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | union u { 3 | struct { int i1, i2; } t; 4 | double d; 5 | } x[2], v; 6 | 7 | f (x, v) 8 | union u *x, v; 9 | { 10 | *++x = v; 11 | } 12 | 13 | main() 14 | { 15 | x[1].t.i1 = x[1].t.i2 = 0; 16 | v.t.i1 = 1; 17 | v.t.i2 = 2; 18 | f (x, v); 19 | if (x[1].t.i1 != 1 || x[1].t.i2 != 2) 20 | abort (); 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/991202-3.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | 3 | unsigned int f (unsigned int a) 4 | { 5 | return a * 65536 / 8; 6 | } 7 | 8 | unsigned int g (unsigned int a) 9 | { 10 | return a * 65536; 11 | } 12 | 13 | unsigned int h (unsigned int a) 14 | { 15 | return a / 8; 16 | } 17 | 18 | int main () 19 | { 20 | if (f (65536) != h (g (65536))) 21 | abort (); 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr42721.c: -------------------------------------------------------------------------------- 1 | /* PR c/42721 */ 2 | 3 | extern void abort (void); 4 | 5 | static unsigned long long 6 | foo (unsigned long long x, unsigned long long y) 7 | { 8 | return x / y; 9 | } 10 | 11 | static int a, b; 12 | 13 | int 14 | main (void) 15 | { 16 | unsigned long long c = 1; 17 | b ^= c && (foo (a, -1ULL) != 1L); 18 | if (b != 1) 19 | abort (); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/PM-bug2.dsp: -------------------------------------------------------------------------------- 1 | 2 | // here in both case we should be equivalent to "process = *,*;" 3 | foo(x,y) = (y,x); 4 | 5 | choice1 = case { 6 | ((3,2:-)) => *; 7 | ((4,2:-)) => /; 8 | (x) => +; 9 | }; 10 | 11 | choice2 = case { 12 | ((2,3:foo:-)) => *; 13 | ((2,4:foo:-)) => /; 14 | (x) => +; 15 | }; 16 | 17 | process = choice1(1), choice2(1); 18 | 19 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/parametric_eq.dsp: -------------------------------------------------------------------------------- 1 | ol = library("oscillator.lib"); 2 | fl = library("filter.lib"); 3 | 4 | //process = ol.sawtooth_demo : fl.parametric_eq_demo : 5 | // fl.mth_octave_spectral_level_demo(2) <: _,_; 6 | process = 7 | vgroup("[1]", ol.sawtooth_demo) : 8 | vgroup("[2]", fl.parametric_eq_demo) : 9 | vgroup("[3]", fl.mth_octave_spectral_level_demo(2)) 10 | <: _,_; 11 | 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20051012-1.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target untyped_assembly } */ 2 | extern void abort (void); 3 | 4 | struct type 5 | { 6 | int *a; 7 | 8 | int b:16; 9 | unsigned int p:9; 10 | } t; 11 | 12 | unsigned int 13 | foo () 14 | { 15 | return t.p; 16 | } 17 | 18 | int 19 | main (void) 20 | { 21 | t.p = 8; 22 | if (foo (t) != 8) 23 | abort (); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930622-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long double 3 | ll_to_ld (long long n) 4 | { 5 | return n; 6 | } 7 | 8 | long long 9 | ld_to_ll (long double n) 10 | { 11 | return n; 12 | } 13 | 14 | main () 15 | { 16 | long long n; 17 | 18 | if (ll_to_ld (10LL) != 10.0) 19 | abort (); 20 | #if 0 21 | if (ld_to_ll (10.0) != 10) 22 | abort (); 23 | #endif 24 | exit (0); 25 | } 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980602-2.c: -------------------------------------------------------------------------------- 1 | /* The bit-field below would have a problem if __INT_MAX__ is too 2 | small. */ 3 | extern void exit (int); 4 | #if __INT_MAX__ < 2147483647 5 | int 6 | main (void) 7 | { 8 | exit (0); 9 | } 10 | #else 11 | struct { 12 | unsigned bit : 30; 13 | } t; 14 | 15 | int main() 16 | { 17 | if (!(t.bit++)) 18 | exit (0); 19 | else 20 | abort (); 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990527-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int sum; 3 | 4 | void 5 | g (int i) 6 | { 7 | sum += i; 8 | } 9 | 10 | void 11 | f(int j) 12 | { 13 | int i; 14 | 15 | for (i = 0; i < 9; i++) 16 | { 17 | j++; 18 | g (j); 19 | j = 9; 20 | } 21 | } 22 | 23 | int 24 | main () 25 | { 26 | f (0); 27 | if (sum != 81) 28 | abort (); 29 | exit (0); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-3b.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | #include 3 | 4 | int n = 0; 5 | 6 | g (i) 7 | { 8 | n++; 9 | } 10 | 11 | f (m) 12 | { 13 | int i; 14 | i = m; 15 | do 16 | { 17 | g (i * 4); 18 | i -= INT_MAX / 8; 19 | } 20 | while (i > 0); 21 | } 22 | 23 | main () 24 | { 25 | f (INT_MAX/8*4); 26 | if (n != 4) 27 | abort (); 28 | exit (0); 29 | } 30 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr57321.c: -------------------------------------------------------------------------------- 1 | /* PR tree-optimization/57321 */ 2 | 3 | int a = 1, *b, **c; 4 | 5 | static int 6 | foo (int *p) 7 | { 8 | if (*p == a) 9 | { 10 | int *i[7][5] = { { 0 } }; 11 | int **j[1][1]; 12 | j[0][0] = &i[0][0]; 13 | *b = &p != c; 14 | } 15 | return 0; 16 | } 17 | 18 | int 19 | main () 20 | { 21 | int i = 0; 22 | foo (&i); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/qbe/ldhoist.ssa: -------------------------------------------------------------------------------- 1 | # loads must not be unsafely hoisted 2 | 3 | export 4 | function w $f(w %n, l %p) { 5 | @start 6 | %r =w copy 0 7 | @loop 8 | %n =w sub %n, 1 9 | %c =w csgew %n, 0 10 | jnz %c, @loop1, @end 11 | @loop1 12 | %r =w loadw %p 13 | jmp @loop 14 | @end 15 | ret %r 16 | } 17 | 18 | # >>> driver 19 | # extern int f(int, int *); 20 | # int main() { return f(0, 0); } 21 | # <<< 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000717-3.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int c = -1; 3 | 4 | foo (p) 5 | int *p; 6 | { 7 | int x; 8 | int a; 9 | 10 | a = p[0]; 11 | x = a + 5; 12 | a = c; 13 | p[0] = x - 15; 14 | return a; 15 | } 16 | 17 | int main() 18 | { 19 | int b = 1; 20 | int a = foo(&b); 21 | 22 | if (a != -1 || b != (1 + 5 - 15)) 23 | abort (); 24 | 25 | exit (0); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980526-3.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int compare(x, y) 3 | unsigned int x; 4 | unsigned int y; 5 | { 6 | if (x==y) 7 | return 0; 8 | else 9 | return 1; 10 | } 11 | 12 | main() 13 | { 14 | unsigned int i, j, k, l; 15 | i = 5; j = 2; k=0; l=2; 16 | if (compare(5%(~(unsigned) 2), i%~j) 17 | || compare(0, k%~l)) 18 | abort(); 19 | else 20 | exit(0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr41317.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | struct A 4 | { 5 | int i; 6 | }; 7 | struct B 8 | { 9 | struct A a; 10 | int j; 11 | }; 12 | 13 | static void 14 | foo (struct B *p) 15 | { 16 | ((struct A *)p)->i = 1; 17 | } 18 | 19 | int main() 20 | { 21 | struct A a; 22 | a.i = 0; 23 | foo ((struct B *)&a); 24 | if (a.i != 1) 25 | abort (); 26 | return 0; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr41917.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/41917 */ 2 | 3 | extern void abort (void); 4 | unsigned int a = 1; 5 | 6 | int 7 | main (void) 8 | { 9 | unsigned int b, c, d; 10 | 11 | if (sizeof (int) != 4 || (int) 0xc7d24b5e > 0) 12 | return 0; 13 | 14 | c = 0xc7d24b5e; 15 | d = a | -2; 16 | b = (d == 0) ? c : (c % d); 17 | if (b != c) 18 | abort (); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/test-max-int.dsp: -------------------------------------------------------------------------------- 1 | //------------------------------------------------- 2 | // Check that min and max are able to bound 3 | // infinite intervals 4 | //-------------------------------------------------- 5 | 6 | import("music.lib"); 7 | 8 | clip(lo,hi) = max(lo) : min(hi); 9 | smooth(c) = *(1-c) : +~*(c); 10 | d = hslider("delay",0,0,100,1) : smooth(0.999) : clip(0,100); 11 | 12 | process = @(d); 13 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000523-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | main (void) 4 | { 5 | long long x; 6 | int n; 7 | 8 | if (sizeof (long long) < 8) 9 | exit (0); 10 | 11 | n = 9; 12 | x = (((long long) n) << 55) / 0xff; 13 | 14 | if (x == 0) 15 | abort (); 16 | 17 | x = (((long long) 9) << 55) / 0xff; 18 | 19 | if (x == 0) 20 | abort (); 21 | 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20070212-1.c: -------------------------------------------------------------------------------- 1 | struct f 2 | { 3 | int i; 4 | }; 5 | 6 | int g(int i, int c, struct f *ff, int *p) 7 | { 8 | int *t; 9 | if (c) 10 | t = &i; 11 | else 12 | t = &ff->i; 13 | *p = 0; 14 | return *t; 15 | } 16 | 17 | extern void abort(void); 18 | 19 | int main() 20 | { 21 | struct f f; 22 | f.i = 1; 23 | if (g(5, 0, &f, &f.i) != 0) 24 | abort (); 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930208-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef union { 3 | long l; 4 | struct { char b3, b2, b1, b0; } c; 5 | } T; 6 | 7 | f (T u) 8 | { 9 | ++u.c.b0; 10 | ++u.c.b3; 11 | return (u.c.b1 != 2 || u.c.b2 != 2); 12 | } 13 | 14 | main () 15 | { 16 | T u; 17 | u.c.b1 = 2; 18 | u.c.b2 = 2; 19 | u.c.b0 = ~0; 20 | u.c.b3 = ~0; 21 | if (f (u)) 22 | abort(); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/bison/hello.y: -------------------------------------------------------------------------------- 1 | %{ 2 | 3 | #include 4 | #include 5 | int yylex(void); 6 | int yyerror(const char *s); 7 | 8 | %} 9 | 10 | %token HI BYE 11 | 12 | %% 13 | 14 | program: 15 | hi bye 16 | ; 17 | 18 | hi: 19 | HI { printf("Hello World\n"); } 20 | ; 21 | bye: 22 | BYE { printf("Bye World\n"); exit(0); } 23 | ; 24 | 25 | 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930513-1.c: -------------------------------------------------------------------------------- 1 | /* { dg-additional-options "-Wl,-u,_printf_float" { target newlib_nano_io } } */ 2 | 3 | #include 4 | extern void exit (int); 5 | char buf[2]; 6 | 7 | f (fp) 8 | int (*fp)(char *, const char *, ...); 9 | { 10 | (*fp)(buf, "%.0f", 5.0); 11 | } 12 | 13 | main () 14 | { 15 | f (&sprintf); 16 | if (buf[0] != '5' || buf[1] != 0) 17 | abort (); 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930518-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int bar = 0; 3 | 4 | f (p) 5 | int *p; 6 | { 7 | int foo = 2; 8 | 9 | while (foo > bar) 10 | { 11 | foo -= bar; 12 | *p++ = foo; 13 | bar = 1; 14 | } 15 | } 16 | 17 | main () 18 | { 19 | int tab[2]; 20 | tab[0] = tab[1] = 0; 21 | f (tab); 22 | if (tab[0] != 2 || tab[1] != 1) 23 | abort (); 24 | exit (0); 25 | } 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/divconst-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef struct 3 | { 4 | unsigned a, b, c, d; 5 | } t1; 6 | 7 | f (t1 *ps) 8 | { 9 | ps->a = 10000; 10 | ps->b = ps->a / 3; 11 | ps->c = 10000; 12 | ps->d = ps->c / 3; 13 | } 14 | 15 | main () 16 | { 17 | t1 s; 18 | f (&s); 19 | if (s.a != 10000 || s.b != 3333 || s.c != 10000 || s.d != 3333) 20 | abort (); 21 | exit (0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr37125.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | static inline unsigned int 4 | mod_rhs(int rhs) 5 | { 6 | if (rhs == 0) return 1; 7 | return rhs; 8 | } 9 | 10 | void func_44 (unsigned int p_45); 11 | void func_44 (unsigned int p_45) 12 | { 13 | if (!((p_45 * -9) % mod_rhs (-9))) { 14 | abort(); 15 | } 16 | } 17 | 18 | int main (void) 19 | { 20 | func_44 (2); 21 | return 0; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr48717.c: -------------------------------------------------------------------------------- 1 | /* PR tree-optimization/48717 */ 2 | 3 | extern void abort (void); 4 | 5 | int v = 1, w; 6 | 7 | unsigned short 8 | foo (unsigned short x, unsigned short y) 9 | { 10 | return x + y; 11 | } 12 | 13 | void 14 | bar (void) 15 | { 16 | v = foo (~w, w); 17 | } 18 | 19 | int 20 | main () 21 | { 22 | bar (); 23 | if (v != (unsigned short) -1) 24 | abort (); 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000722-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct s { char *p; int t; }; 3 | 4 | extern void bar (void); 5 | extern void foo (struct s *); 6 | 7 | int main(void) 8 | { 9 | bar (); 10 | bar (); 11 | exit (0); 12 | } 13 | 14 | void 15 | bar (void) 16 | { 17 | foo (& (struct s) { "hi", 1 }); 18 | } 19 | 20 | void foo (struct s *p) 21 | { 22 | if (p->t != 1) 23 | abort(); 24 | p->t = 2; 25 | } 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/loop-8.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | double a[3] = { 0.0, 1.0, 2.0 }; 3 | 4 | void bar (int x, double *y) 5 | { 6 | if (x || *y != 1.0) 7 | abort (); 8 | } 9 | 10 | int main () 11 | { 12 | double c; 13 | int d; 14 | for (d = 0; d < 3; d++) 15 | { 16 | c = a[d]; 17 | if (c > 0.0) goto e; 18 | } 19 | bar(1, &c); 20 | exit (1); 21 | e: 22 | bar(0, &c); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/faust/BUG20180710.dsp: -------------------------------------------------------------------------------- 1 | import("stdfaust.lib"); 2 | // This program should compile but the interval of the table is not 3 | // correctly computed by faust 2.8.0 4 | 5 | phase(f) = f/48000.0 : (+, 1.0 : fmod) ~ _; 6 | sinwave(f) = phase(f) * 2 * ma.PI : sin : +(1) : /(2); 7 | tosc(f) = 48000, sinwave(1), int(max(0, min(phase(f)*48000, 47999))) : rdtable; 8 | 9 | process = os.osc(440) : @(tosc(10)*100); 10 | 11 | 12 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000622-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long foo(long a, long b, long c) 3 | { 4 | if (a != 12 || b != 1 || c != 11) 5 | abort(); 6 | return 0; 7 | } 8 | long bar (long a, long b) 9 | { 10 | return b; 11 | } 12 | void baz (long a, long b, void *c) 13 | { 14 | long d; 15 | d = (long)c; 16 | foo(d, bar (a, 1), b); 17 | } 18 | int main() 19 | { 20 | baz (10, 11, (void *)12); 21 | exit(0); 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000707-1.c: -------------------------------------------------------------------------------- 1 | extern void abort(void); 2 | extern void exit(int); 3 | 4 | struct baz { 5 | int a, b, c; 6 | }; 7 | 8 | void 9 | foo (int a, int b, int c) 10 | { 11 | if (a != 4) 12 | abort (); 13 | } 14 | 15 | void 16 | bar (struct baz x, int b, int c) 17 | { 18 | foo (x.b, b, c); 19 | } 20 | 21 | int 22 | main () 23 | { 24 | struct baz x = { 3, 4, 5 }; 25 | bar (x, 1, 2); 26 | exit (0); 27 | } 28 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030203-1.c: -------------------------------------------------------------------------------- 1 | void f(int); 2 | int do_layer3(int single) 3 | { 4 | int stereo1; 5 | 6 | if(single >= 0) /* stream is stereo, but force to mono */ 7 | stereo1 = 1; 8 | else 9 | stereo1 = 2; 10 | f(single); 11 | 12 | return stereo1; 13 | } 14 | 15 | extern void abort (); 16 | int main() 17 | { 18 | if (do_layer3(-1) != 2) 19 | abort (); 20 | return 0; 21 | } 22 | 23 | void f(int i) {} 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20060110-2.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | long long 4 | f (long long a, long long b) 5 | { 6 | return ((a + b) << 32) >> 32; 7 | } 8 | 9 | long long a = 0x1234567876543210LL; 10 | long long b = 0x2345678765432101LL; 11 | long long c = ((0x1234567876543210LL + 0x2345678765432101LL) << 32) >> 32; 12 | 13 | int 14 | main () 15 | { 16 | if (f (a, b) != c) 17 | abort (); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921123-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef struct 3 | { 4 | unsigned short b0, b1, b2, b3; 5 | } four_quarters; 6 | 7 | four_quarters x; 8 | int a, b; 9 | 10 | void f (four_quarters j) 11 | { 12 | b = j.b2; 13 | a = j.b3; 14 | } 15 | 16 | main () 17 | { 18 | four_quarters x; 19 | x.b0 = x.b1 = x.b2 = 0; 20 | x.b3 = 38; 21 | f(x); 22 | if (a != 38) 23 | abort(); 24 | exit (0); 25 | } 26 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/970923-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | ts(a) 4 | int a; 5 | { 6 | if (a < 1000 && a > 2000) 7 | return 1; 8 | else 9 | return 0; 10 | } 11 | 12 | int 13 | tu(a) 14 | unsigned int a; 15 | { 16 | if (a < 1000 && a > 2000) 17 | return 1; 18 | else 19 | return 0; 20 | } 21 | 22 | 23 | main() 24 | { 25 | if (ts (0) || tu (0)) 26 | abort (); 27 | exit (0); 28 | } 29 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980709-1.c: -------------------------------------------------------------------------------- 1 | /* { dg-xfail-if "Can not call system libm.a with -msoft-float" { powerpc-*-aix* rs6000-*-aix* } { "-msoft-float" } { "" } } */ 2 | #include 3 | extern void exit (int); 4 | 5 | main() 6 | { 7 | volatile double a; 8 | double c; 9 | a = 32.0; 10 | c = pow(a, 1.0/3.0); 11 | if (c + 0.1 > 3.174802 12 | && c - 0.1 < 3.174802) 13 | exit (0); 14 | else 15 | abort (); 16 | } 17 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990525-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | struct blah { 3 | int m1, m2; 4 | }; 5 | 6 | void die(struct blah arg) 7 | { 8 | int i ; 9 | struct blah buf[1]; 10 | 11 | for (i = 0; i < 1 ; buf[i++] = arg) 12 | ; 13 | if (buf[0].m1 != 1) { 14 | abort (); 15 | } 16 | } 17 | 18 | int main() 19 | { 20 | struct blah s = { 1, 2 }; 21 | 22 | die(s); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/index-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int a[] = 3 | { 4 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 5 | 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 6 | 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 7 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 8 | }; 9 | 10 | int 11 | f (long n) 12 | { 13 | return a[n - 100000]; 14 | } 15 | 16 | main () 17 | { 18 | if (f (100030L) != 30) 19 | abort(); 20 | exit (0); 21 | } 22 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr57131.c: -------------------------------------------------------------------------------- 1 | /* PR rtl-optimization/57131 */ 2 | 3 | extern void abort (void); 4 | 5 | int 6 | main () 7 | { 8 | volatile int x1 = 0; 9 | volatile long long x2 = 0; 10 | volatile int x3 = 0; 11 | volatile int x4 = 1; 12 | volatile int x5 = 1; 13 | volatile long long x6 = 1; 14 | long long t = ((x1 * (x2 << x3)) / (x4 * x5)) + x6; 15 | 16 | if (t != 1) 17 | abort (); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010717-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | int 4 | main () 5 | { 6 | int i, j; 7 | unsigned long u, r1, r2; 8 | 9 | i = -16; 10 | j = 1; 11 | u = i + j; 12 | 13 | /* no sign extension upon shift */ 14 | r1 = u >> 1; 15 | /* sign extension upon shift, but there shouldn't be */ 16 | r2 = ((unsigned long) (i + j)) >> 1; 17 | 18 | if (r1 != r2) 19 | abort (); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20011115-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | 3 | static inline int 4 | foo (void) 5 | { 6 | #ifdef __OPTIMIZE__ 7 | extern int undefined_reference; 8 | return undefined_reference; 9 | #else 10 | return 0; 11 | #endif 12 | } 13 | 14 | static inline int 15 | bar (void) 16 | { 17 | if (foo == foo) 18 | return 1; 19 | else 20 | return foo (); 21 | } 22 | 23 | int main (void) 24 | { 25 | exit (0); 26 | } 27 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20020328-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int b = 0; 3 | 4 | func () { } 5 | 6 | void 7 | testit(int x) 8 | { 9 | if (x != 20) 10 | abort (); 11 | } 12 | 13 | int 14 | main() 15 | 16 | { 17 | int a = 0; 18 | 19 | if (b) 20 | func(); 21 | 22 | /* simplify_and_const_int would incorrectly omit the mask in 23 | the line below. */ 24 | testit ((a + 23) & 0xfffffffc); 25 | exit (0); 26 | } 27 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/930513-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | sub3 (i) 3 | const int *i; 4 | { 5 | } 6 | 7 | eq (a, b) 8 | { 9 | static int i = 0; 10 | if (a != i) 11 | abort (); 12 | i++; 13 | } 14 | 15 | main () 16 | { 17 | int i; 18 | 19 | for (i = 0; i < 4; i++) 20 | { 21 | const int j = i; 22 | int k; 23 | sub3 (&j); 24 | k = j; 25 | eq (k, k); 26 | } 27 | exit (0); 28 | } 29 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960513-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long double 3 | f (d, i) 4 | long double d; 5 | int i; 6 | { 7 | long double e; 8 | 9 | d = -d; 10 | e = d; 11 | if (i == 1) 12 | d *= 2; 13 | d -= e * d; 14 | d -= e * d; 15 | d -= e * d; 16 | d -= e * d; 17 | d -= e * d; 18 | return d; 19 | } 20 | 21 | main () 22 | { 23 | if (! (int) (f (2.0L, 1))) 24 | abort (); 25 | exit (0); 26 | } 27 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20030828-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | const int *p; 3 | 4 | int bar (void) 5 | { 6 | return *p + 1; 7 | } 8 | 9 | main () 10 | { 11 | /* Variable 'i' is never used but it's aliased to a global pointer. The 12 | alias analyzer was not considering that 'i' may be used in the call to 13 | bar(). */ 14 | const int i = 5; 15 | p = &i; 16 | if (bar() != 6) 17 | abort (); 18 | exit (0); 19 | } 20 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/961122-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | long long acc; 3 | 4 | addhi (short a) 5 | { 6 | acc += (long long) a << 32; 7 | } 8 | 9 | subhi (short a) 10 | { 11 | acc -= (long long) a << 32; 12 | } 13 | 14 | main () 15 | { 16 | acc = 0xffff00000000ll; 17 | addhi (1); 18 | if (acc != 0x1000000000000ll) 19 | abort (); 20 | subhi (1); 21 | if (acc != 0xffff00000000ll) 22 | abort (); 23 | exit (0); 24 | } 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr37931.c: -------------------------------------------------------------------------------- 1 | /* PR middle-end/37931 */ 2 | 3 | extern void abort (void); 4 | 5 | int 6 | foo (int a, unsigned int b) 7 | { 8 | return (a | 1) & (b | 1); 9 | } 10 | 11 | int 12 | main (void) 13 | { 14 | if (foo (6, 0xc6) != 7) 15 | abort (); 16 | if (foo (0x80, 0xc1) != 0x81) 17 | abort (); 18 | if (foo (4, 4) != 5) 19 | abort (); 20 | if (foo (5, 4) != 5) 21 | abort (); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010123-1.c: -------------------------------------------------------------------------------- 1 | extern void abort (); 2 | extern void exit (int); 3 | 4 | struct s 5 | { 6 | int value; 7 | char *string; 8 | }; 9 | 10 | int main (void) 11 | { 12 | int i; 13 | for (i = 0; i < 4; i++) 14 | { 15 | struct s *t = & (struct s) { 3, "hey there" }; 16 | if (t->value != 3) 17 | abort(); 18 | t->value = 4; 19 | if (t->value != 4) 20 | abort(); 21 | } 22 | exit (0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/921208-2.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target untyped_assembly } */ 2 | /* { dg-require-stack-size "100000 * 4 + 1024" } */ 3 | 4 | extern void exit (int); 5 | g(){} 6 | 7 | f() 8 | { 9 | int i; 10 | float a[100000]; 11 | 12 | for (i = 0; i < 1; i++) 13 | { 14 | g(1.0, 1.0 + i / 2.0 * 3.0); 15 | g(2.0, 1.0 + i / 2.0 * 3.0); 16 | } 17 | } 18 | 19 | main () 20 | { 21 | f(); 22 | exit(0); 23 | } 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000314-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef unsigned long long uint64; 3 | const uint64 bigconst = 1ULL << 34; 4 | 5 | int a = 1; 6 | 7 | static 8 | uint64 getmask(void) 9 | { 10 | if (a) 11 | return bigconst; 12 | else 13 | return 0; 14 | } 15 | 16 | main() 17 | { 18 | uint64 f = getmask(); 19 | if (sizeof (long long) == 8 20 | && f != bigconst) abort (); 21 | exit (0); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20010114-1.c: -------------------------------------------------------------------------------- 1 | /* Origin: PR c/1540 from Mattias Lampe , 2 | adapted to a testcase by Joseph Myers . 3 | GCC 2.95.2 fails, CVS GCC of 2001-01-13 passes. */ 4 | extern void abort (void); 5 | extern void exit (int); 6 | 7 | int 8 | main (void) 9 | { 10 | int array1[1] = { 1 }; 11 | int array2[2][1]= { { 1 }, { 0 } }; 12 | if (array1[0] != 1) 13 | abort (); 14 | exit (0); 15 | } 16 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/920721-3.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | static inline fu (unsigned short data) 3 | { 4 | return data; 5 | } 6 | ru(i) 7 | { 8 | if(fu(i++)!=5)abort(); 9 | if(fu(++i)!=7)abort(); 10 | } 11 | static inline fs (signed short data) 12 | { 13 | return data; 14 | } 15 | rs(i) 16 | { 17 | if(fs(i++)!=5)abort(); 18 | if(fs(++i)!=7)abort(); 19 | } 20 | 21 | 22 | main() 23 | { 24 | ru(5); 25 | rs(5); 26 | exit(0); 27 | } 28 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/990827-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | unsigned test(unsigned one , unsigned bit) 3 | { 4 | unsigned val= bit & 1; 5 | unsigned zero= one >> 1; 6 | 7 | val++; 8 | return zero + ( val>> 1 ); 9 | } 10 | 11 | int main() 12 | { 13 | if (test (1,0) != 0) 14 | abort (); 15 | if (test (1,1) != 1) 16 | abort (); 17 | if (test (1,65535) != 1) 18 | abort (); 19 | exit (0); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/pr68911.c: -------------------------------------------------------------------------------- 1 | extern void abort (void); 2 | 3 | char a; 4 | int b, c; 5 | short d; 6 | 7 | int main () 8 | { 9 | unsigned e = 2; 10 | unsigned timeout = 0; 11 | 12 | for (; c < 2; c++) 13 | { 14 | int f = ~e / 7; 15 | if (f) 16 | a = e = ~(b && d); 17 | while (e < 94) 18 | { 19 | e++; 20 | if (++timeout > 100) 21 | goto die; 22 | } 23 | } 24 | return 0; 25 | die: 26 | abort (); 27 | } 28 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/vrp-5.c: -------------------------------------------------------------------------------- 1 | /* { dg-require-effective-target int32plus } */ 2 | extern void exit (int); 3 | extern void abort (); 4 | 5 | void test(unsigned int a, unsigned int b) 6 | { 7 | if (a < 5) 8 | abort(); 9 | if (b < 5) 10 | abort(); 11 | if (a + b != 0U) 12 | abort(); 13 | } 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | unsigned int x = 0x80000000; 18 | test(x, x); 19 | exit (0); 20 | } 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/20000313-1.c: -------------------------------------------------------------------------------- 1 | unsigned int buggy (unsigned int *param) 2 | { 3 | unsigned int accu, zero = 0, borrow; 4 | accu = - *param; 5 | borrow = - (accu > zero); 6 | *param += accu; 7 | return borrow; 8 | } 9 | 10 | int main (void) 11 | { 12 | unsigned int param = 1; 13 | unsigned int borrow = buggy (¶m); 14 | 15 | if (param != 0) 16 | abort (); 17 | if (borrow + 1 != 0) 18 | abort (); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/960909-1.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | int 3 | ffs (x) 4 | int x; 5 | { 6 | int bit, mask; 7 | 8 | if (x == 0) 9 | return 0; 10 | 11 | for (bit = 1, mask = 1; !(x & mask); bit++, mask <<= 1) 12 | ; 13 | 14 | return bit; 15 | } 16 | 17 | f (x) 18 | int x; 19 | { 20 | int y; 21 | y = ffs (x) - 1; 22 | if (y < 0) 23 | abort (); 24 | } 25 | 26 | main () 27 | { 28 | f (1); 29 | exit (0); 30 | } 31 | -------------------------------------------------------------------------------- /evaluation/ddfuzz/seeds/mir/980505-2.c: -------------------------------------------------------------------------------- 1 | extern void exit (int); 2 | typedef unsigned short Uint16; 3 | typedef unsigned int Uint; 4 | 5 | Uint f () 6 | { 7 | Uint16 token; 8 | Uint count; 9 | static Uint16 values[1] = {0x9300}; 10 | 11 | token = values[0]; 12 | count = token >> 8; 13 | 14 | return count; 15 | } 16 | 17 | int 18 | main () 19 | { 20 | if (f () != 0x93) 21 | abort (); 22 | exit (0); 23 | } 24 | --------------------------------------------------------------------------------