* [RFC] Test coverage for --param boundary values
@ 2016-07-08 10:43 Martin Liška
2016-07-08 12:48 ` [RFC, v2] " Martin Liška
0 siblings, 1 reply; 12+ messages in thread
From: Martin Liška @ 2016-07-08 10:43 UTC (permalink / raw)
To: GCC Patches; +Cc: Jakub Jelinek
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
Hello.
As I already briefly discussed my attempt with Jakub, it would be interesting to provide
compile tests that would cover boundary values of params.
That revealed e.g. PR rtl-optimization/71634 and many similar.
The crucial part of the patch is selection of a proper source file that would expose boundary
values. Second question is what optimization level to pick up as a base level.
My initial attempt is nanojpeg ([1]), which is a single file implementation of JPEG compression/decompression
algorithm. Well, testing all boundary values takes 3m20s on i7 machine (it's single-threaded) and it introduces
232 new PASSes.
Thoughts?
Thanks,
Martin
[1] http://keyj.emphy.de/nanojpeg/
[-- Attachment #2: 0001-Add-tests-that-test-boundary-values-of-params.patch --]
[-- Type: text/x-patch, Size: 182132 bytes --]
From 65e04c1a71451218777cfade499ffcdca5f8313f Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 8 Jul 2016 10:59:24 +0200
Subject: [PATCH] Add tests that test boundary values of params
gcc/testsuite/ChangeLog:
2016-07-08 Martin Liska <mliska@suse.cz>
* gcc.dg/params/nanojpeg.h: New test.
* gcc.dg/params/param-boundary-align-loop-iterations-0.c: New test.
* gcc.dg/params/param-boundary-align-threshold-1.c: New test.
* gcc.dg/params/param-boundary-allow-store-data-races-0.c: New test.
* gcc.dg/params/param-boundary-allow-store-data-races-1.c: New test.
* gcc.dg/params/param-boundary-asan-globals-0.c: New test.
* gcc.dg/params/param-boundary-asan-globals-1.c: New test.
* gcc.dg/params/param-boundary-asan-instrument-reads-0.c: New test.
* gcc.dg/params/param-boundary-asan-instrument-reads-1.c: New test.
* gcc.dg/params/param-boundary-asan-instrument-writes-0.c: New test.
* gcc.dg/params/param-boundary-asan-instrument-writes-1.c: New test.
* gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-0.c: New test.
* gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-2147483647.c: New test.
* gcc.dg/params/param-boundary-asan-memintrin-0.c: New test.
* gcc.dg/params/param-boundary-asan-memintrin-1.c: New test.
* gcc.dg/params/param-boundary-asan-stack-0.c: New test.
* gcc.dg/params/param-boundary-asan-stack-1.c: New test.
* gcc.dg/params/param-boundary-asan-use-after-return-0.c: New test.
* gcc.dg/params/param-boundary-asan-use-after-return-1.c: New test.
* gcc.dg/params/param-boundary-builtin-expect-probability-0.c: New test.
* gcc.dg/params/param-boundary-builtin-expect-probability-100.c: New test.
* gcc.dg/params/param-boundary-case-values-threshold-0.c: New test.
* gcc.dg/params/param-boundary-chkp-max-ctor-size-100.c: New test.
* gcc.dg/params/param-boundary-comdat-sharing-probability-0.c: New test.
* gcc.dg/params/param-boundary-cxx-max-namespaces-for-diagnostic-help-0.c: New test.
* gcc.dg/params/param-boundary-early-inlining-insns-0.c: New test.
* gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-1.c: New test.
* gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-999999.c: New test.
* gcc.dg/params/param-boundary-fsm-scale-path-blocks-1.c: New test.
* gcc.dg/params/param-boundary-fsm-scale-path-blocks-10.c: New test.
* gcc.dg/params/param-boundary-fsm-scale-path-stmts-1.c: New test.
* gcc.dg/params/param-boundary-fsm-scale-path-stmts-10.c: New test.
* gcc.dg/params/param-boundary-gcse-after-reload-critical-fraction-0.c: New test.
* gcc.dg/params/param-boundary-gcse-after-reload-partial-fraction-0.c: New test.
* gcc.dg/params/param-boundary-gcse-cost-distance-ratio-0.c: New test.
* gcc.dg/params/param-boundary-gcse-unrestricted-cost-0.c: New test.
* gcc.dg/params/param-boundary-ggc-min-expand-0.c: New test.
* gcc.dg/params/param-boundary-ggc-min-heapsize-0.c: New test.
* gcc.dg/params/param-boundary-graphite-max-arrays-per-scop-0.c: New test.
* gcc.dg/params/param-boundary-graphite-max-bbs-per-function-0.c: New test.
* gcc.dg/params/param-boundary-graphite-max-nb-scop-params-0.c: New test.
* gcc.dg/params/param-boundary-graphite-min-loops-per-function-0.c: New test.
* gcc.dg/params/param-boundary-hot-bb-count-ws-permille-0.c: New test.
* gcc.dg/params/param-boundary-hot-bb-count-ws-permille-1000.c: New test.
* gcc.dg/params/param-boundary-hot-bb-frequency-fraction-0.c: New test.
* gcc.dg/params/param-boundary-hsa-gen-debug-stores-0.c: New test.
* gcc.dg/params/param-boundary-hsa-gen-debug-stores-1.c: New test.
* gcc.dg/params/param-boundary-indir-call-topn-profile-0.c: New test.
* gcc.dg/params/param-boundary-indir-call-topn-profile-1.c: New test.
* gcc.dg/params/param-boundary-inline-min-speedup-0.c: New test.
* gcc.dg/params/param-boundary-inline-unit-growth-0.c: New test.
* gcc.dg/params/param-boundary-integer-share-limit-2.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-array-index-hint-bonus-0.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-eval-threshold-0.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-loop-hint-bonus-0.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-0.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-100.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-0.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-100.c: New test.
* gcc.dg/params/param-boundary-ipa-cp-value-list-size-0.c: New test.
* gcc.dg/params/param-boundary-ipa-max-aa-steps-0.c: New test.
* gcc.dg/params/param-boundary-ipa-max-agg-items-0.c: New test.
* gcc.dg/params/param-boundary-ipa-sra-ptr-growth-factor-0.c: New test.
* gcc.dg/params/param-boundary-ipcp-unit-growth-0.c: New test.
* gcc.dg/params/param-boundary-ira-loop-reserved-regs-0.c: New test.
* gcc.dg/params/param-boundary-ira-max-conflict-table-size-0.c: New test.
* gcc.dg/params/param-boundary-ira-max-loops-num-0.c: New test.
* gcc.dg/params/param-boundary-iv-always-prune-cand-set-bound-0.c: New test.
* gcc.dg/params/param-boundary-iv-consider-all-candidates-bound-0.c: New test.
* gcc.dg/params/param-boundary-iv-max-considered-uses-0.c: New test.
* gcc.dg/params/param-boundary-l1-cache-line-size-0.c: New test.
* gcc.dg/params/param-boundary-l1-cache-size-0.c: New test.
* gcc.dg/params/param-boundary-l2-cache-size-0.c: New test.
* gcc.dg/params/param-boundary-large-function-growth-0.c: New test.
* gcc.dg/params/param-boundary-large-function-insns-0.c: New test.
* gcc.dg/params/param-boundary-large-stack-frame-0.c: New test.
* gcc.dg/params/param-boundary-large-stack-frame-growth-0.c: New test.
* gcc.dg/params/param-boundary-large-unit-insns-0.c: New test.
* gcc.dg/params/param-boundary-lim-expensive-0.c: New test.
* gcc.dg/params/param-boundary-loop-block-tile-size-0.c: New test.
* gcc.dg/params/param-boundary-loop-invariant-max-bbs-in-loop-0.c: New test.
* gcc.dg/params/param-boundary-loop-max-datarefs-for-datadeps-0.c: New test.
* gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-0.c: New test.
* gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-100.c: New test.
* gcc.dg/params/param-boundary-lra-max-considered-reload-pseudos-0.c: New test.
* gcc.dg/params/param-boundary-lto-max-partition-0.c: New test.
* gcc.dg/params/param-boundary-lto-max-partition-2147483647.c: New test.
* gcc.dg/params/param-boundary-lto-min-partition-0.c: New test.
* gcc.dg/params/param-boundary-lto-partitions-1.c: New test.
* gcc.dg/params/param-boundary-max-average-unrolled-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-combine-insns-2.c: New test.
* gcc.dg/params/param-boundary-max-combine-insns-4.c: New test.
* gcc.dg/params/param-boundary-max-completely-peel-loop-nest-depth-0.c: New test.
* gcc.dg/params/param-boundary-max-completely-peel-times-0.c: New test.
* gcc.dg/params/param-boundary-max-completely-peeled-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-crossjump-edges-0.c: New test.
* gcc.dg/params/param-boundary-max-cse-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-cse-path-length-1.c: New test.
* gcc.dg/params/param-boundary-max-cselib-memory-locations-0.c: New test.
* gcc.dg/params/param-boundary-max-delay-slot-insn-search-0.c: New test.
* gcc.dg/params/param-boundary-max-delay-slot-live-search-0.c: New test.
* gcc.dg/params/param-boundary-max-dse-active-local-stores-0.c: New test.
* gcc.dg/params/param-boundary-max-early-inliner-iterations-0.c: New test.
* gcc.dg/params/param-boundary-max-fields-for-field-sensitive-0.c: New test.
* gcc.dg/params/param-boundary-max-fsm-thread-length-1.c: New test.
* gcc.dg/params/param-boundary-max-fsm-thread-length-999999.c: New test.
* gcc.dg/params/param-boundary-max-fsm-thread-path-insns-1.c: New test.
* gcc.dg/params/param-boundary-max-fsm-thread-path-insns-999999.c: New test.
* gcc.dg/params/param-boundary-max-fsm-thread-paths-1.c: New test.
* gcc.dg/params/param-boundary-max-fsm-thread-paths-999999.c: New test.
* gcc.dg/params/param-boundary-max-gcse-insertion-ratio-0.c: New test.
* gcc.dg/params/param-boundary-max-gcse-memory-0.c: New test.
* gcc.dg/params/param-boundary-max-goto-duplication-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-grow-copy-bb-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-hoist-depth-0.c: New test.
* gcc.dg/params/param-boundary-max-inline-insns-auto-0.c: New test.
* gcc.dg/params/param-boundary-max-inline-insns-recursive-0.c: New test.
* gcc.dg/params/param-boundary-max-inline-insns-recursive-auto-0.c: New test.
* gcc.dg/params/param-boundary-max-inline-insns-single-0.c: New test.
* gcc.dg/params/param-boundary-max-inline-recursive-depth-0.c: New test.
* gcc.dg/params/param-boundary-max-inline-recursive-depth-auto-0.c: New test.
* gcc.dg/params/param-boundary-max-isl-operations-0.c: New test.
* gcc.dg/params/param-boundary-max-iterations-computation-cost-0.c: New test.
* gcc.dg/params/param-boundary-max-iterations-to-track-0.c: New test.
* gcc.dg/params/param-boundary-max-jump-thread-duplication-stmts-0.c: New test.
* gcc.dg/params/param-boundary-max-last-value-rtl-0.c: New test.
* gcc.dg/params/param-boundary-max-loop-header-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-modulo-backtrack-attempts-0.c: New test.
* gcc.dg/params/param-boundary-max-once-peeled-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-partial-antic-length-0.c: New test.
* gcc.dg/params/param-boundary-max-peel-branches-0.c: New test.
* gcc.dg/params/param-boundary-max-peel-times-0.c: New test.
* gcc.dg/params/param-boundary-max-peeled-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-pending-list-length-0.c: New test.
* gcc.dg/params/param-boundary-max-pipeline-region-blocks-0.c: New test.
* gcc.dg/params/param-boundary-max-pipeline-region-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-pow-sqrt-depth-1.c: New test.
* gcc.dg/params/param-boundary-max-pow-sqrt-depth-32.c: New test.
* gcc.dg/params/param-boundary-max-predicted-iterations-0.c: New test.
* gcc.dg/params/param-boundary-max-reload-search-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-99.c: New test.
* gcc.dg/params/param-boundary-max-sched-extend-regions-iters-0.c: New test.
* gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-1.c: New test.
* gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-10.c: New test.
* gcc.dg/params/param-boundary-max-sched-ready-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-sched-region-blocks-0.c: New test.
* gcc.dg/params/param-boundary-max-sched-region-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-slsr-cand-scan-1.c: New test.
* gcc.dg/params/param-boundary-max-slsr-cand-scan-999999.c: New test.
* gcc.dg/params/param-boundary-max-speculative-devirt-maydefs-0.c: New test.
* gcc.dg/params/param-boundary-max-ssa-name-query-depth-1.c: New test.
* gcc.dg/params/param-boundary-max-stores-to-sink-0.c: New test.
* gcc.dg/params/param-boundary-max-tail-merge-comparisons-0.c: New test.
* gcc.dg/params/param-boundary-max-tail-merge-iterations-0.c: New test.
* gcc.dg/params/param-boundary-max-tracked-strlens-0.c: New test.
* gcc.dg/params/param-boundary-max-tree-if-conversion-phi-args-2.c: New test.
* gcc.dg/params/param-boundary-max-unroll-times-0.c: New test.
* gcc.dg/params/param-boundary-max-unrolled-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-unswitch-insns-0.c: New test.
* gcc.dg/params/param-boundary-max-unswitch-level-0.c: New test.
* gcc.dg/params/param-boundary-max-variable-expansions-in-unroller-0.c: New test.
* gcc.dg/params/param-boundary-max-vartrack-expr-depth-0.c: New test.
* gcc.dg/params/param-boundary-max-vartrack-reverse-op-size-0.c: New test.
* gcc.dg/params/param-boundary-max-vartrack-size-0.c: New test.
* gcc.dg/params/param-boundary-min-crossjump-insns-1.c: New test.
* gcc.dg/params/param-boundary-min-inline-recursive-probability-0.c: New test.
* gcc.dg/params/param-boundary-min-insn-to-prefetch-ratio-0.c: New test.
* gcc.dg/params/param-boundary-min-nondebug-insn-uid-1.c: New test.
* gcc.dg/params/param-boundary-min-size-for-stack-sharing-0.c: New test.
* gcc.dg/params/param-boundary-min-spec-prob-0.c: New test.
* gcc.dg/params/param-boundary-min-vect-loop-bound-1.c: New test.
* gcc.dg/params/param-boundary-parloops-chunk-size-0.c: New test.
* gcc.dg/params/param-boundary-parloops-schedule-auto.c: New test.
* gcc.dg/params/param-boundary-parloops-schedule-dynamic.c: New test.
* gcc.dg/params/param-boundary-parloops-schedule-guided.c: New test.
* gcc.dg/params/param-boundary-parloops-schedule-runtime.c: New test.
* gcc.dg/params/param-boundary-parloops-schedule-static.c: New test.
* gcc.dg/params/param-boundary-partial-inlining-entry-probability-0.c: New test.
* gcc.dg/params/param-boundary-predictable-branch-outcome-0.c: New test.
* gcc.dg/params/param-boundary-predictable-branch-outcome-50.c: New test.
* gcc.dg/params/param-boundary-prefetch-latency-0.c: New test.
* gcc.dg/params/param-boundary-prefetch-min-insn-to-mem-ratio-0.c: New test.
* gcc.dg/params/param-boundary-profile-func-internal-id-0.c: New test.
* gcc.dg/params/param-boundary-profile-func-internal-id-1.c: New test.
* gcc.dg/params/param-boundary-sccvn-max-alias-queries-per-access-0.c: New test.
* gcc.dg/params/param-boundary-sccvn-max-scc-size-10.c: New test.
* gcc.dg/params/param-boundary-scev-max-expr-complexity-0.c: New test.
* gcc.dg/params/param-boundary-scev-max-expr-size-0.c: New test.
* gcc.dg/params/param-boundary-sched-autopref-queue-depth-0.c: New test.
* gcc.dg/params/param-boundary-sched-mem-true-dep-cost-0.c: New test.
* gcc.dg/params/param-boundary-sched-pressure-algorithm-1.c: New test.
* gcc.dg/params/param-boundary-sched-pressure-algorithm-2.c: New test.
* gcc.dg/params/param-boundary-sched-spec-prob-cutoff-0.c: New test.
* gcc.dg/params/param-boundary-sched-spec-prob-cutoff-100.c: New test.
* gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-0.c: New test.
* gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-100.c: New test.
* gcc.dg/params/param-boundary-selsched-insns-to-rename-0.c: New test.
* gcc.dg/params/param-boundary-selsched-max-lookahead-0.c: New test.
* gcc.dg/params/param-boundary-selsched-max-sched-times-0.c: New test.
* gcc.dg/params/param-boundary-simultaneous-prefetches-0.c: New test.
* gcc.dg/params/param-boundary-sink-frequency-threshold-0.c: New test.
* gcc.dg/params/param-boundary-sink-frequency-threshold-100.c: New test.
* gcc.dg/params/param-boundary-slp-max-insns-in-bb-0.c: New test.
* gcc.dg/params/param-boundary-sms-dfa-history-0.c: New test.
* gcc.dg/params/param-boundary-sms-loop-average-count-threshold-0.c: New test.
* gcc.dg/params/param-boundary-sms-max-ii-factor-0.c: New test.
* gcc.dg/params/param-boundary-sms-min-sc-1.c: New test.
* gcc.dg/params/param-boundary-sra-max-scalarization-size-Osize-0.c: New test.
* gcc.dg/params/param-boundary-sra-max-scalarization-size-Ospeed-0.c: New test.
* gcc.dg/params/param-boundary-ssp-buffer-size-1.c: New test.
* gcc.dg/params/param-boundary-switch-conversion-max-branch-ratio-1.c: New test.
* gcc.dg/params/param-boundary-tm-max-aggregate-size-0.c: New test.
* gcc.dg/params/param-boundary-tracer-dynamic-coverage-0.c: New test.
* gcc.dg/params/param-boundary-tracer-dynamic-coverage-100.c: New test.
* gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-0.c: New test.
* gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-100.c: New test.
* gcc.dg/params/param-boundary-tracer-max-code-growth-0.c: New test.
* gcc.dg/params/param-boundary-tracer-min-branch-probability-0.c: New test.
* gcc.dg/params/param-boundary-tracer-min-branch-probability-100.c: New test.
* gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-0.c: New test.
* gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-100.c: New test.
* gcc.dg/params/param-boundary-tracer-min-branch-ratio-0.c: New test.
* gcc.dg/params/param-boundary-tracer-min-branch-ratio-100.c: New test.
* gcc.dg/params/param-boundary-tree-reassoc-width-0.c: New test.
* gcc.dg/params/param-boundary-uninit-control-dep-attempts-1.c: New test.
* gcc.dg/params/param-boundary-unlikely-bb-count-fraction-1.c: New test.
* gcc.dg/params/param-boundary-unlikely-bb-count-fraction-10000.c: New test.
* gcc.dg/params/param-boundary-use-canonical-types-0.c: New test.
* gcc.dg/params/param-boundary-use-canonical-types-1.c: New test.
* gcc.dg/params/param-boundary-vect-max-peeling-for-alignment-64.c: New test.
* gcc.dg/params/param-boundary-vect-max-version-for-alias-checks-0.c: New test.
* gcc.dg/params/param-boundary-vect-max-version-for-alignment-checks-0.c: New test.
* gcc.dg/params/params.exp: New file.
---
gcc/testsuite/gcc.dg/params/nanojpeg.h | 899 +++++++++++++++++++++
.../param-boundary-align-loop-iterations-0.c | 4 +
.../params/param-boundary-align-threshold-1.c | 4 +
.../param-boundary-allow-store-data-races-0.c | 4 +
.../param-boundary-allow-store-data-races-1.c | 4 +
.../gcc.dg/params/param-boundary-asan-globals-0.c | 4 +
.../gcc.dg/params/param-boundary-asan-globals-1.c | 4 +
.../param-boundary-asan-instrument-reads-0.c | 4 +
.../param-boundary-asan-instrument-reads-1.c | 4 +
.../param-boundary-asan-instrument-writes-0.c | 4 +
.../param-boundary-asan-instrument-writes-1.c | 4 +
...ry-asan-instrumentation-with-call-threshold-0.c | 4 +
...nstrumentation-with-call-threshold-2147483647.c | 4 +
.../params/param-boundary-asan-memintrin-0.c | 4 +
.../params/param-boundary-asan-memintrin-1.c | 4 +
.../gcc.dg/params/param-boundary-asan-stack-0.c | 4 +
.../gcc.dg/params/param-boundary-asan-stack-1.c | 4 +
.../param-boundary-asan-use-after-return-0.c | 4 +
.../param-boundary-asan-use-after-return-1.c | 4 +
.../param-boundary-builtin-expect-probability-0.c | 4 +
...param-boundary-builtin-expect-probability-100.c | 4 +
.../param-boundary-case-values-threshold-0.c | 4 +
.../params/param-boundary-chkp-max-ctor-size-100.c | 4 +
.../param-boundary-comdat-sharing-probability-0.c | 4 +
...dary-cxx-max-namespaces-for-diagnostic-help-0.c | 4 +
.../params/param-boundary-early-inlining-insns-0.c | 4 +
.../param-boundary-fsm-maximum-phi-arguments-1.c | 4 +
...ram-boundary-fsm-maximum-phi-arguments-999999.c | 4 +
.../param-boundary-fsm-scale-path-blocks-1.c | 4 +
.../param-boundary-fsm-scale-path-blocks-10.c | 4 +
.../params/param-boundary-fsm-scale-path-stmts-1.c | 4 +
.../param-boundary-fsm-scale-path-stmts-10.c | 4 +
...oundary-gcse-after-reload-critical-fraction-0.c | 4 +
...boundary-gcse-after-reload-partial-fraction-0.c | 4 +
.../param-boundary-gcse-cost-distance-ratio-0.c | 4 +
.../param-boundary-gcse-unrestricted-cost-0.c | 4 +
.../params/param-boundary-ggc-min-expand-0.c | 4 +
.../params/param-boundary-ggc-min-heapsize-0.c | 4 +
...param-boundary-graphite-max-arrays-per-scop-0.c | 4 +
...aram-boundary-graphite-max-bbs-per-function-0.c | 4 +
.../param-boundary-graphite-max-nb-scop-params-0.c | 4 +
...am-boundary-graphite-min-loops-per-function-0.c | 4 +
.../param-boundary-hot-bb-count-ws-permille-0.c | 4 +
.../param-boundary-hot-bb-count-ws-permille-1000.c | 4 +
.../param-boundary-hot-bb-frequency-fraction-0.c | 4 +
.../params/param-boundary-hsa-gen-debug-stores-0.c | 4 +
.../params/param-boundary-hsa-gen-debug-stores-1.c | 4 +
.../param-boundary-indir-call-topn-profile-0.c | 4 +
.../param-boundary-indir-call-topn-profile-1.c | 4 +
.../params/param-boundary-inline-min-speedup-0.c | 4 +
.../params/param-boundary-inline-unit-growth-0.c | 4 +
.../params/param-boundary-integer-share-limit-2.c | 4 +
...aram-boundary-ipa-cp-array-index-hint-bonus-0.c | 4 +
.../param-boundary-ipa-cp-eval-threshold-0.c | 4 +
.../param-boundary-ipa-cp-loop-hint-bonus-0.c | 4 +
.../param-boundary-ipa-cp-recursion-penalty-0.c | 4 +
.../param-boundary-ipa-cp-recursion-penalty-100.c | 4 +
.../param-boundary-ipa-cp-single-call-penalty-0.c | 4 +
...param-boundary-ipa-cp-single-call-penalty-100.c | 4 +
.../param-boundary-ipa-cp-value-list-size-0.c | 4 +
.../params/param-boundary-ipa-max-aa-steps-0.c | 4 +
.../params/param-boundary-ipa-max-agg-items-0.c | 4 +
.../param-boundary-ipa-sra-ptr-growth-factor-0.c | 4 +
.../params/param-boundary-ipcp-unit-growth-0.c | 4 +
.../param-boundary-ira-loop-reserved-regs-0.c | 4 +
.../param-boundary-ira-max-conflict-table-size-0.c | 4 +
.../params/param-boundary-ira-max-loops-num-0.c | 4 +
...ram-boundary-iv-always-prune-cand-set-bound-0.c | 4 +
...m-boundary-iv-consider-all-candidates-bound-0.c | 4 +
.../param-boundary-iv-max-considered-uses-0.c | 4 +
.../params/param-boundary-l1-cache-line-size-0.c | 4 +
.../gcc.dg/params/param-boundary-l1-cache-size-0.c | 4 +
.../gcc.dg/params/param-boundary-l2-cache-size-0.c | 4 +
.../param-boundary-large-function-growth-0.c | 4 +
.../params/param-boundary-large-function-insns-0.c | 4 +
.../params/param-boundary-large-stack-frame-0.c | 4 +
.../param-boundary-large-stack-frame-growth-0.c | 4 +
.../params/param-boundary-large-unit-insns-0.c | 4 +
.../gcc.dg/params/param-boundary-lim-expensive-0.c | 4 +
.../params/param-boundary-loop-block-tile-size-0.c | 4 +
...ram-boundary-loop-invariant-max-bbs-in-loop-0.c | 4 +
...ram-boundary-loop-max-datarefs-for-datadeps-0.c | 4 +
...dary-lra-inheritance-ebb-probability-cutoff-0.c | 4 +
...ry-lra-inheritance-ebb-probability-cutoff-100.c | 4 +
...-boundary-lra-max-considered-reload-pseudos-0.c | 4 +
.../params/param-boundary-lto-max-partition-0.c | 4 +
.../param-boundary-lto-max-partition-2147483647.c | 4 +
.../params/param-boundary-lto-min-partition-0.c | 4 +
.../params/param-boundary-lto-partitions-1.c | 4 +
.../param-boundary-max-average-unrolled-insns-0.c | 4 +
.../params/param-boundary-max-combine-insns-2.c | 4 +
.../params/param-boundary-max-combine-insns-4.c | 4 +
...oundary-max-completely-peel-loop-nest-depth-0.c | 4 +
.../param-boundary-max-completely-peel-times-0.c | 4 +
.../param-boundary-max-completely-peeled-insns-0.c | 4 +
.../params/param-boundary-max-crossjump-edges-0.c | 4 +
.../gcc.dg/params/param-boundary-max-cse-insns-0.c | 4 +
.../params/param-boundary-max-cse-path-length-1.c | 4 +
.../param-boundary-max-cselib-memory-locations-0.c | 4 +
.../param-boundary-max-delay-slot-insn-search-0.c | 4 +
.../param-boundary-max-delay-slot-live-search-0.c | 4 +
.../param-boundary-max-dse-active-local-stores-0.c | 4 +
...param-boundary-max-early-inliner-iterations-0.c | 4 +
...ram-boundary-max-fields-for-field-sensitive-0.c | 4 +
.../param-boundary-max-fsm-thread-length-1.c | 4 +
.../param-boundary-max-fsm-thread-length-999999.c | 4 +
.../param-boundary-max-fsm-thread-path-insns-1.c | 4 +
...ram-boundary-max-fsm-thread-path-insns-999999.c | 4 +
.../params/param-boundary-max-fsm-thread-paths-1.c | 4 +
.../param-boundary-max-fsm-thread-paths-999999.c | 4 +
.../param-boundary-max-gcse-insertion-ratio-0.c | 4 +
.../params/param-boundary-max-gcse-memory-0.c | 4 +
.../param-boundary-max-goto-duplication-insns-0.c | 4 +
.../param-boundary-max-grow-copy-bb-insns-0.c | 4 +
.../params/param-boundary-max-hoist-depth-0.c | 4 +
.../param-boundary-max-inline-insns-auto-0.c | 4 +
.../param-boundary-max-inline-insns-recursive-0.c | 4 +
...am-boundary-max-inline-insns-recursive-auto-0.c | 4 +
.../param-boundary-max-inline-insns-single-0.c | 4 +
.../param-boundary-max-inline-recursive-depth-0.c | 4 +
...am-boundary-max-inline-recursive-depth-auto-0.c | 4 +
.../params/param-boundary-max-isl-operations-0.c | 4 +
...am-boundary-max-iterations-computation-cost-0.c | 4 +
.../param-boundary-max-iterations-to-track-0.c | 4 +
...-boundary-max-jump-thread-duplication-stmts-0.c | 4 +
.../params/param-boundary-max-last-value-rtl-0.c | 4 +
| 4 +
...aram-boundary-max-modulo-backtrack-attempts-0.c | 4 +
.../param-boundary-max-once-peeled-insns-0.c | 4 +
.../param-boundary-max-partial-antic-length-0.c | 4 +
.../params/param-boundary-max-peel-branches-0.c | 4 +
.../params/param-boundary-max-peel-times-0.c | 4 +
.../params/param-boundary-max-peeled-insns-0.c | 4 +
.../param-boundary-max-pending-list-length-0.c | 4 +
.../param-boundary-max-pipeline-region-blocks-0.c | 4 +
.../param-boundary-max-pipeline-region-insns-0.c | 4 +
.../params/param-boundary-max-pow-sqrt-depth-1.c | 4 +
.../params/param-boundary-max-pow-sqrt-depth-32.c | 4 +
.../param-boundary-max-predicted-iterations-0.c | 4 +
.../param-boundary-max-reload-search-insns-0.c | 4 +
.../param-boundary-max-rtl-if-conversion-insns-0.c | 4 +
...param-boundary-max-rtl-if-conversion-insns-99.c | 4 +
...ram-boundary-max-sched-extend-regions-iters-0.c | 4 +
...aram-boundary-max-sched-insn-conflict-delay-1.c | 4 +
...ram-boundary-max-sched-insn-conflict-delay-10.c | 4 +
.../param-boundary-max-sched-ready-insns-0.c | 4 +
.../param-boundary-max-sched-region-blocks-0.c | 4 +
.../param-boundary-max-sched-region-insns-0.c | 4 +
.../params/param-boundary-max-slsr-cand-scan-1.c | 4 +
.../param-boundary-max-slsr-cand-scan-999999.c | 4 +
...ram-boundary-max-speculative-devirt-maydefs-0.c | 4 +
.../param-boundary-max-ssa-name-query-depth-1.c | 4 +
.../params/param-boundary-max-stores-to-sink-0.c | 4 +
.../param-boundary-max-tail-merge-comparisons-0.c | 4 +
.../param-boundary-max-tail-merge-iterations-0.c | 4 +
.../params/param-boundary-max-tracked-strlens-0.c | 4 +
...am-boundary-max-tree-if-conversion-phi-args-2.c | 4 +
.../params/param-boundary-max-unroll-times-0.c | 4 +
.../params/param-boundary-max-unrolled-insns-0.c | 4 +
.../params/param-boundary-max-unswitch-insns-0.c | 4 +
.../params/param-boundary-max-unswitch-level-0.c | 4 +
...oundary-max-variable-expansions-in-unroller-0.c | 4 +
.../param-boundary-max-vartrack-expr-depth-0.c | 4 +
...param-boundary-max-vartrack-reverse-op-size-0.c | 4 +
.../params/param-boundary-max-vartrack-size-0.c | 4 +
.../params/param-boundary-min-crossjump-insns-1.c | 4 +
...m-boundary-min-inline-recursive-probability-0.c | 4 +
.../param-boundary-min-insn-to-prefetch-ratio-0.c | 4 +
.../param-boundary-min-nondebug-insn-uid-1.c | 4 +
.../param-boundary-min-size-for-stack-sharing-0.c | 4 +
.../gcc.dg/params/param-boundary-min-spec-prob-0.c | 4 +
.../params/param-boundary-min-vect-loop-bound-1.c | 4 +
.../params/param-boundary-parloops-chunk-size-0.c | 4 +
.../params/param-boundary-parloops-schedule-auto.c | 4 +
.../param-boundary-parloops-schedule-dynamic.c | 4 +
.../param-boundary-parloops-schedule-guided.c | 4 +
.../param-boundary-parloops-schedule-runtime.c | 4 +
.../param-boundary-parloops-schedule-static.c | 4 +
...boundary-partial-inlining-entry-probability-0.c | 4 +
.../param-boundary-predictable-branch-outcome-0.c | 4 +
.../param-boundary-predictable-branch-outcome-50.c | 4 +
.../params/param-boundary-prefetch-latency-0.c | 4 +
...ram-boundary-prefetch-min-insn-to-mem-ratio-0.c | 4 +
.../param-boundary-profile-func-internal-id-0.c | 4 +
.../param-boundary-profile-func-internal-id-1.c | 4 +
...boundary-sccvn-max-alias-queries-per-access-0.c | 4 +
.../params/param-boundary-sccvn-max-scc-size-10.c | 4 +
.../param-boundary-scev-max-expr-complexity-0.c | 4 +
.../params/param-boundary-scev-max-expr-size-0.c | 4 +
.../param-boundary-sched-autopref-queue-depth-0.c | 4 +
.../param-boundary-sched-mem-true-dep-cost-0.c | 4 +
.../param-boundary-sched-pressure-algorithm-1.c | 4 +
.../param-boundary-sched-pressure-algorithm-2.c | 4 +
.../param-boundary-sched-spec-prob-cutoff-0.c | 4 +
.../param-boundary-sched-spec-prob-cutoff-100.c | 4 +
...param-boundary-sched-state-edge-prob-cutoff-0.c | 4 +
...ram-boundary-sched-state-edge-prob-cutoff-100.c | 4 +
.../param-boundary-selsched-insns-to-rename-0.c | 4 +
.../param-boundary-selsched-max-lookahead-0.c | 4 +
.../param-boundary-selsched-max-sched-times-0.c | 4 +
.../param-boundary-simultaneous-prefetches-0.c | 4 +
.../param-boundary-sink-frequency-threshold-0.c | 4 +
.../param-boundary-sink-frequency-threshold-100.c | 4 +
.../params/param-boundary-slp-max-insns-in-bb-0.c | 4 +
.../params/param-boundary-sms-dfa-history-0.c | 4 +
...m-boundary-sms-loop-average-count-threshold-0.c | 4 +
.../params/param-boundary-sms-max-ii-factor-0.c | 4 +
.../gcc.dg/params/param-boundary-sms-min-sc-1.c | 4 +
...m-boundary-sra-max-scalarization-size-Osize-0.c | 4 +
...-boundary-sra-max-scalarization-size-Ospeed-0.c | 4 +
.../params/param-boundary-ssp-buffer-size-1.c | 4 +
...boundary-switch-conversion-max-branch-ratio-1.c | 4 +
.../param-boundary-tm-max-aggregate-size-0.c | 4 +
.../param-boundary-tracer-dynamic-coverage-0.c | 4 +
.../param-boundary-tracer-dynamic-coverage-100.c | 4 +
...m-boundary-tracer-dynamic-coverage-feedback-0.c | 4 +
...boundary-tracer-dynamic-coverage-feedback-100.c | 4 +
.../param-boundary-tracer-max-code-growth-0.c | 4 +
...aram-boundary-tracer-min-branch-probability-0.c | 4 +
...am-boundary-tracer-min-branch-probability-100.c | 4 +
...dary-tracer-min-branch-probability-feedback-0.c | 4 +
...ry-tracer-min-branch-probability-feedback-100.c | 4 +
.../param-boundary-tracer-min-branch-ratio-0.c | 4 +
.../param-boundary-tracer-min-branch-ratio-100.c | 4 +
.../params/param-boundary-tree-reassoc-width-0.c | 4 +
.../param-boundary-uninit-control-dep-attempts-1.c | 4 +
.../param-boundary-unlikely-bb-count-fraction-1.c | 4 +
...ram-boundary-unlikely-bb-count-fraction-10000.c | 4 +
.../params/param-boundary-use-canonical-types-0.c | 4 +
.../params/param-boundary-use-canonical-types-1.c | 4 +
...am-boundary-vect-max-peeling-for-alignment-64.c | 4 +
...-boundary-vect-max-version-for-alias-checks-0.c | 4 +
...ndary-vect-max-version-for-alignment-checks-0.c | 4 +
gcc/testsuite/gcc.dg/params/params.exp | 31 +
234 files changed, 1858 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/params/nanojpeg.h
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-align-loop-iterations-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-align-threshold-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-2147483647.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-case-values-threshold-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-chkp-max-ctor-size-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-comdat-sharing-probability-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-cxx-max-namespaces-for-diagnostic-help-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-early-inlining-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-999999.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-10.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-10.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-critical-fraction-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-partial-fraction-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-gcse-cost-distance-ratio-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-gcse-unrestricted-cost-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-expand-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-heapsize-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-arrays-per-scop-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-bbs-per-function-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-nb-scop-params-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-graphite-min-loops-per-function-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-1000.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-frequency-fraction-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-inline-min-speedup-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-inline-unit-growth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-integer-share-limit-2.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-array-index-hint-bonus-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-eval-threshold-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-loop-hint-bonus-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-value-list-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-aa-steps-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-agg-items-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipa-sra-ptr-growth-factor-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ipcp-unit-growth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ira-loop-reserved-regs-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ira-max-conflict-table-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ira-max-loops-num-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-iv-always-prune-cand-set-bound-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-iv-consider-all-candidates-bound-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-iv-max-considered-uses-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-line-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-l2-cache-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-large-function-growth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-large-function-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-growth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-large-unit-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lim-expensive-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-loop-block-tile-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-loop-invariant-max-bbs-in-loop-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-loop-max-datarefs-for-datadeps-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lra-max-considered-reload-pseudos-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-2147483647.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lto-min-partition-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-lto-partitions-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-average-unrolled-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-2.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-4.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-loop-nest-depth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-times-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peeled-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-crossjump-edges-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-cse-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-cse-path-length-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-cselib-memory-locations-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-insn-search-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-live-search-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-dse-active-local-stores-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-early-inliner-iterations-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-fields-for-field-sensitive-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-999999.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-999999.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-999999.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-insertion-ratio-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-memory-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-goto-duplication-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-grow-copy-bb-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-hoist-depth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-auto-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-auto-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-single-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-auto-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-isl-operations-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-computation-cost-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-to-track-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-jump-thread-duplication-stmts-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-last-value-rtl-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-loop-header-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-modulo-backtrack-attempts-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-once-peeled-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-partial-antic-length-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-peel-branches-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-peel-times-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-peeled-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-pending-list-length-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-blocks-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-32.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-predicted-iterations-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-reload-search-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-99.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-sched-extend-regions-iters-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-10.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-sched-ready-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-blocks-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-999999.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-speculative-devirt-maydefs-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-ssa-name-query-depth-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-stores-to-sink-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-comparisons-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-iterations-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-tracked-strlens-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-tree-if-conversion-phi-args-2.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-unroll-times-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-unrolled-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-insns-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-level-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-variable-expansions-in-unroller-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-expr-depth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-reverse-op-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-min-crossjump-insns-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-min-inline-recursive-probability-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-min-insn-to-prefetch-ratio-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-min-nondebug-insn-uid-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-min-size-for-stack-sharing-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-min-spec-prob-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-min-vect-loop-bound-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-parloops-chunk-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-auto.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-dynamic.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-guided.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-runtime.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-static.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-partial-inlining-entry-probability-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-50.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-prefetch-latency-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-prefetch-min-insn-to-mem-ratio-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-alias-queries-per-access-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-scc-size-10.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-complexity-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-autopref-queue-depth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-mem-true-dep-cost-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-2.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-selsched-insns-to-rename-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-lookahead-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-sched-times-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-simultaneous-prefetches-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-slp-max-insns-in-bb-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sms-dfa-history-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sms-loop-average-count-threshold-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sms-max-ii-factor-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sms-min-sc-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Osize-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Ospeed-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-ssp-buffer-size-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-switch-conversion-max-branch-ratio-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tm-max-aggregate-size-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-max-code-growth-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-100.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-tree-reassoc-width-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-uninit-control-dep-attempts-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-10000.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-1.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-vect-max-peeling-for-alignment-64.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alias-checks-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alignment-checks-0.c
create mode 100644 gcc/testsuite/gcc.dg/params/params.exp
diff --git a/gcc/testsuite/gcc.dg/params/nanojpeg.h b/gcc/testsuite/gcc.dg/params/nanojpeg.h
new file mode 100644
index 0000000..57aefca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/nanojpeg.h
@@ -0,0 +1,899 @@
+// NanoJPEG -- KeyJ's Tiny Baseline JPEG Decoder
+// version 1.3.2 (2014-02-02)
+// by Martin J. Fiedler <martin.fiedler@gmx.net>
+//
+// This software is published under the terms of KeyJ's Research License,
+// version 0.2. Usage of this software is subject to the following conditions:
+// 0. There's no warranty whatsoever. The author(s) of this software can not
+// be held liable for any damages that occur when using this software.
+// 1. This software may be used freely for both non-commercial and commercial
+// purposes.
+// 2. This software may be redistributed freely as long as no fees are charged
+// for the distribution and this license information is included.
+// 3. This software may be modified freely except for this license information,
+// which must not be changed in any way.
+// 4. If anything other than configuration, indentation or comments have been
+// altered in the code, the original author(s) must receive a copy of the
+// modified code.
+
+
+///////////////////////////////////////////////////////////////////////////////
+// DOCUMENTATION SECTION //
+// read this if you want to know what this is all about //
+///////////////////////////////////////////////////////////////////////////////
+
+// INTRODUCTION
+// ============
+//
+// This is a minimal decoder for baseline JPEG images. It accepts memory dumps
+// of JPEG files as input and generates either 8-bit grayscale or packed 24-bit
+// RGB images as output. It does not parse JFIF or Exif headers; all JPEG files
+// are assumed to be either grayscale or YCbCr. CMYK or other color spaces are
+// not supported. All YCbCr subsampling schemes with power-of-two ratios are
+// supported, as are restart intervals. Progressive or lossless JPEG is not
+// supported.
+// Summed up, NanoJPEG should be able to decode all images from digital cameras
+// and most common forms of other non-progressive JPEG images.
+// The decoder is not optimized for speed, it's optimized for simplicity and
+// small code. Image quality should be at a reasonable level. A bicubic chroma
+// upsampling filter ensures that subsampled YCbCr images are rendered in
+// decent quality. The decoder is not meant to deal with broken JPEG files in
+// a graceful manner; if anything is wrong with the bitstream, decoding will
+// simply fail.
+// The code should work with every modern C compiler without problems and
+// should not emit any warnings. It uses only (at least) 32-bit integer
+// arithmetic and is supposed to be endianness independent and 64-bit clean.
+// However, it is not thread-safe.
+
+
+// COMPILE-TIME CONFIGURATION
+// ==========================
+//
+// The following aspects of NanoJPEG can be controlled with preprocessor
+// defines:
+//
+// _NJ_EXAMPLE_PROGRAM = Compile a main() function with an example
+// program.
+// _NJ_INCLUDE_HEADER_ONLY = Don't compile anything, just act as a header
+// file for NanoJPEG. Example:
+// #define _NJ_INCLUDE_HEADER_ONLY
+// #include "nanojpeg.c"
+// int main(void) {
+// njInit();
+// // your code here
+// njDone();
+// }
+// NJ_USE_LIBC=1 = Use the malloc(), free(), memset() and memcpy()
+// functions from the standard C library (default).
+// NJ_USE_LIBC=0 = Don't use the standard C library. In this mode,
+// external functions njAlloc(), njFreeMem(),
+// njFillMem() and njCopyMem() need to be defined
+// and implemented somewhere.
+// NJ_USE_WIN32=0 = Normal mode (default).
+// NJ_USE_WIN32=1 = If compiling with MSVC for Win32 and
+// NJ_USE_LIBC=0, NanoJPEG will use its own
+// implementations of the required C library
+// functions (default if compiling with MSVC and
+// NJ_USE_LIBC=0).
+// NJ_CHROMA_FILTER=1 = Use the bicubic chroma upsampling filter
+// (default).
+// NJ_CHROMA_FILTER=0 = Use simple pixel repetition for chroma upsampling
+// (bad quality, but faster and less code).
+
+
+// API
+// ===
+//
+// For API documentation, read the "header section" below.
+
+
+// EXAMPLE
+// =======
+//
+// A few pages below, you can find an example program that uses NanoJPEG to
+// convert JPEG files into PGM or PPM. To compile it, use something like
+// gcc -O3 -D_NJ_EXAMPLE_PROGRAM -o nanojpeg nanojpeg.c
+// You may also add -std=c99 -Wall -Wextra -pedantic -Werror, if you want :)
+
+
+///////////////////////////////////////////////////////////////////////////////
+// HEADER SECTION //
+// copy and pase this into nanojpeg.h if you want //
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _NANOJPEG_H
+#define _NANOJPEG_H
+
+// nj_result_t: Result codes for njDecode().
+typedef enum _nj_result {
+ NJ_OK = 0, // no error, decoding successful
+ NJ_NO_JPEG, // not a JPEG file
+ NJ_UNSUPPORTED, // unsupported format
+ NJ_OUT_OF_MEM, // out of memory
+ NJ_INTERNAL_ERR, // internal error
+ NJ_SYNTAX_ERROR, // syntax error
+ __NJ_FINISHED, // used internally, will never be reported
+} nj_result_t;
+
+// njInit: Initialize NanoJPEG.
+// For safety reasons, this should be called at least one time before using
+// using any of the other NanoJPEG functions.
+void njInit(void);
+
+// njDecode: Decode a JPEG image.
+// Decodes a memory dump of a JPEG file into internal buffers.
+// Parameters:
+// jpeg = The pointer to the memory dump.
+// size = The size of the JPEG file.
+// Return value: The error code in case of failure, or NJ_OK (zero) on success.
+nj_result_t njDecode(const void* jpeg, const int size);
+
+// njGetWidth: Return the width (in pixels) of the most recently decoded
+// image. If njDecode() failed, the result of njGetWidth() is undefined.
+int njGetWidth(void);
+
+// njGetHeight: Return the height (in pixels) of the most recently decoded
+// image. If njDecode() failed, the result of njGetHeight() is undefined.
+int njGetHeight(void);
+
+// njIsColor: Return 1 if the most recently decoded image is a color image
+// (RGB) or 0 if it is a grayscale image. If njDecode() failed, the result
+// of njGetWidth() is undefined.
+int njIsColor(void);
+
+// njGetImage: Returns the decoded image data.
+// Returns a pointer to the most recently image. The memory layout it byte-
+// oriented, top-down, without any padding between lines. Pixels of color
+// images will be stored as three consecutive bytes for the red, green and
+// blue channels. This data format is thus compatible with the PGM or PPM
+// file formats and the OpenGL texture formats GL_LUMINANCE8 or GL_RGB8.
+// If njDecode() failed, the result of njGetImage() is undefined.
+unsigned char* njGetImage(void);
+
+// njGetImageSize: Returns the size (in bytes) of the image data returned
+// by njGetImage(). If njDecode() failed, the result of njGetImageSize() is
+// undefined.
+int njGetImageSize(void);
+
+// njDone: Uninitialize NanoJPEG.
+// Resets NanoJPEG's internal state and frees all memory that has been
+// allocated at run-time by NanoJPEG. It is still possible to decode another
+// image after a njDone() call.
+void njDone(void);
+
+#endif//_NANOJPEG_H
+
+
+///////////////////////////////////////////////////////////////////////////////
+// CONFIGURATION SECTION //
+// adjust the default settings for the NJ_ defines here //
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef NJ_USE_LIBC
+ #define NJ_USE_LIBC 1
+#endif
+
+#ifndef NJ_USE_WIN32
+ #ifdef _MSC_VER
+ #define NJ_USE_WIN32 (!NJ_USE_LIBC)
+ #else
+ #define NJ_USE_WIN32 0
+ #endif
+#endif
+
+#ifndef NJ_CHROMA_FILTER
+ #define NJ_CHROMA_FILTER 1
+#endif
+
+
+///////////////////////////////////////////////////////////////////////////////
+// EXAMPLE PROGRAM //
+// just define _NJ_EXAMPLE_PROGRAM to compile this (requires NJ_USE_LIBC) //
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef _NJ_EXAMPLE_PROGRAM
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main(int argc, char* argv[]) {
+ int size;
+ char *buf;
+ FILE *f;
+
+ if (argc < 2) {
+ printf("Usage: %s <input.jpg> [<output.ppm>]\n", argv[0]);
+ return 2;
+ }
+ f = fopen(argv[1], "rb");
+ if (!f) {
+ printf("Error opening the input file.\n");
+ return 1;
+ }
+ fseek(f, 0, SEEK_END);
+ size = (int) ftell(f);
+ buf = malloc(size);
+ fseek(f, 0, SEEK_SET);
+ size = (int) fread(buf, 1, size, f);
+ fclose(f);
+
+ njInit();
+ if (njDecode(buf, size)) {
+ printf("Error decoding the input file.\n");
+ return 1;
+ }
+
+ f = fopen((argc > 2) ? argv[2] : (njIsColor() ? "nanojpeg_out.ppm" : "nanojpeg_out.pgm"), "wb");
+ if (!f) {
+ printf("Error opening the output file.\n");
+ return 1;
+ }
+ fprintf(f, "P%d\n%d %d\n255\n", njIsColor() ? 6 : 5, njGetWidth(), njGetHeight());
+ fwrite(njGetImage(), 1, njGetImageSize(), f);
+ fclose(f);
+ njDone();
+ return 0;
+}
+
+#endif
+
+
+///////////////////////////////////////////////////////////////////////////////
+// IMPLEMENTATION SECTION //
+// you may stop reading here //
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _NJ_INCLUDE_HEADER_ONLY
+
+#ifdef _MSC_VER
+ #define NJ_INLINE static __inline
+ #define NJ_FORCE_INLINE static __forceinline
+#else
+ #define NJ_INLINE static inline
+ #define NJ_FORCE_INLINE static inline
+#endif
+
+#if NJ_USE_LIBC
+ #include <stdlib.h>
+ #include <string.h>
+ #define njAllocMem malloc
+ #define njFreeMem free
+ #define njFillMem memset
+ #define njCopyMem memcpy
+#elif NJ_USE_WIN32
+ #include <windows.h>
+ #define njAllocMem(size) ((void*) LocalAlloc(LMEM_FIXED, (SIZE_T)(size)))
+ #define njFreeMem(block) ((void) LocalFree((HLOCAL) block))
+ NJ_INLINE void njFillMem(void* block, unsigned char value, int count) { __asm {
+ mov edi, block
+ mov al, value
+ mov ecx, count
+ rep stosb
+ } }
+ NJ_INLINE void njCopyMem(void* dest, const void* src, int count) { __asm {
+ mov edi, dest
+ mov esi, src
+ mov ecx, count
+ rep movsb
+ } }
+#else
+ extern void* njAllocMem(int size);
+ extern void njFreeMem(void* block);
+ extern void njFillMem(void* block, unsigned char byte, int size);
+ extern void njCopyMem(void* dest, const void* src, int size);
+#endif
+
+typedef struct _nj_code {
+ unsigned char bits, code;
+} nj_vlc_code_t;
+
+typedef struct _nj_cmp {
+ int cid;
+ int ssx, ssy;
+ int width, height;
+ int stride;
+ int qtsel;
+ int actabsel, dctabsel;
+ int dcpred;
+ unsigned char *pixels;
+} nj_component_t;
+
+typedef struct _nj_ctx {
+ nj_result_t error;
+ const unsigned char *pos;
+ int size;
+ int length;
+ int width, height;
+ int mbwidth, mbheight;
+ int mbsizex, mbsizey;
+ int ncomp;
+ nj_component_t comp[3];
+ int qtused, qtavail;
+ unsigned char qtab[4][64];
+ nj_vlc_code_t vlctab[4][65536];
+ int buf, bufbits;
+ int block[64];
+ int rstinterval;
+ unsigned char *rgb;
+} nj_context_t;
+
+static nj_context_t nj;
+
+static const char njZZ[64] = { 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18,
+11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35,
+42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45,
+38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63 };
+
+NJ_FORCE_INLINE unsigned char njClip(const int x) {
+ return (x < 0) ? 0 : ((x > 0xFF) ? 0xFF : (unsigned char) x);
+}
+
+#define W1 2841
+#define W2 2676
+#define W3 2408
+#define W5 1609
+#define W6 1108
+#define W7 565
+
+NJ_INLINE void njRowIDCT(int* blk) {
+ int x0, x1, x2, x3, x4, x5, x6, x7, x8;
+ if (!((x1 = blk[4] << 11)
+ | (x2 = blk[6])
+ | (x3 = blk[2])
+ | (x4 = blk[1])
+ | (x5 = blk[7])
+ | (x6 = blk[5])
+ | (x7 = blk[3])))
+ {
+ blk[0] = blk[1] = blk[2] = blk[3] = blk[4] = blk[5] = blk[6] = blk[7] = blk[0] << 3;
+ return;
+ }
+ x0 = (blk[0] << 11) + 128;
+ x8 = W7 * (x4 + x5);
+ x4 = x8 + (W1 - W7) * x4;
+ x5 = x8 - (W1 + W7) * x5;
+ x8 = W3 * (x6 + x7);
+ x6 = x8 - (W3 - W5) * x6;
+ x7 = x8 - (W3 + W5) * x7;
+ x8 = x0 + x1;
+ x0 -= x1;
+ x1 = W6 * (x3 + x2);
+ x2 = x1 - (W2 + W6) * x2;
+ x3 = x1 + (W2 - W6) * x3;
+ x1 = x4 + x6;
+ x4 -= x6;
+ x6 = x5 + x7;
+ x5 -= x7;
+ x7 = x8 + x3;
+ x8 -= x3;
+ x3 = x0 + x2;
+ x0 -= x2;
+ x2 = (181 * (x4 + x5) + 128) >> 8;
+ x4 = (181 * (x4 - x5) + 128) >> 8;
+ blk[0] = (x7 + x1) >> 8;
+ blk[1] = (x3 + x2) >> 8;
+ blk[2] = (x0 + x4) >> 8;
+ blk[3] = (x8 + x6) >> 8;
+ blk[4] = (x8 - x6) >> 8;
+ blk[5] = (x0 - x4) >> 8;
+ blk[6] = (x3 - x2) >> 8;
+ blk[7] = (x7 - x1) >> 8;
+}
+
+NJ_INLINE void njColIDCT(const int* blk, unsigned char *out, int stride) {
+ int x0, x1, x2, x3, x4, x5, x6, x7, x8;
+ if (!((x1 = blk[8*4] << 8)
+ | (x2 = blk[8*6])
+ | (x3 = blk[8*2])
+ | (x4 = blk[8*1])
+ | (x5 = blk[8*7])
+ | (x6 = blk[8*5])
+ | (x7 = blk[8*3])))
+ {
+ x1 = njClip(((blk[0] + 32) >> 6) + 128);
+ for (x0 = 8; x0; --x0) {
+ *out = (unsigned char) x1;
+ out += stride;
+ }
+ return;
+ }
+ x0 = (blk[0] << 8) + 8192;
+ x8 = W7 * (x4 + x5) + 4;
+ x4 = (x8 + (W1 - W7) * x4) >> 3;
+ x5 = (x8 - (W1 + W7) * x5) >> 3;
+ x8 = W3 * (x6 + x7) + 4;
+ x6 = (x8 - (W3 - W5) * x6) >> 3;
+ x7 = (x8 - (W3 + W5) * x7) >> 3;
+ x8 = x0 + x1;
+ x0 -= x1;
+ x1 = W6 * (x3 + x2) + 4;
+ x2 = (x1 - (W2 + W6) * x2) >> 3;
+ x3 = (x1 + (W2 - W6) * x3) >> 3;
+ x1 = x4 + x6;
+ x4 -= x6;
+ x6 = x5 + x7;
+ x5 -= x7;
+ x7 = x8 + x3;
+ x8 -= x3;
+ x3 = x0 + x2;
+ x0 -= x2;
+ x2 = (181 * (x4 + x5) + 128) >> 8;
+ x4 = (181 * (x4 - x5) + 128) >> 8;
+ *out = njClip(((x7 + x1) >> 14) + 128); out += stride;
+ *out = njClip(((x3 + x2) >> 14) + 128); out += stride;
+ *out = njClip(((x0 + x4) >> 14) + 128); out += stride;
+ *out = njClip(((x8 + x6) >> 14) + 128); out += stride;
+ *out = njClip(((x8 - x6) >> 14) + 128); out += stride;
+ *out = njClip(((x0 - x4) >> 14) + 128); out += stride;
+ *out = njClip(((x3 - x2) >> 14) + 128); out += stride;
+ *out = njClip(((x7 - x1) >> 14) + 128);
+}
+
+#define njThrow(e) do { nj.error = e; return; } while (0)
+#define njCheckError() do { if (nj.error) return; } while (0)
+
+static int njShowBits(int bits) {
+ unsigned char newbyte;
+ if (!bits) return 0;
+ while (nj.bufbits < bits) {
+ if (nj.size <= 0) {
+ nj.buf = (nj.buf << 8) | 0xFF;
+ nj.bufbits += 8;
+ continue;
+ }
+ newbyte = *nj.pos++;
+ nj.size--;
+ nj.bufbits += 8;
+ nj.buf = (nj.buf << 8) | newbyte;
+ if (newbyte == 0xFF) {
+ if (nj.size) {
+ unsigned char marker = *nj.pos++;
+ nj.size--;
+ switch (marker) {
+ case 0x00:
+ case 0xFF:
+ break;
+ case 0xD9: nj.size = 0; break;
+ default:
+ if ((marker & 0xF8) != 0xD0)
+ nj.error = NJ_SYNTAX_ERROR;
+ else {
+ nj.buf = (nj.buf << 8) | marker;
+ nj.bufbits += 8;
+ }
+ }
+ } else
+ nj.error = NJ_SYNTAX_ERROR;
+ }
+ }
+ return (nj.buf >> (nj.bufbits - bits)) & ((1 << bits) - 1);
+}
+
+NJ_INLINE void njSkipBits(int bits) {
+ if (nj.bufbits < bits)
+ (void) njShowBits(bits);
+ nj.bufbits -= bits;
+}
+
+NJ_INLINE int njGetBits(int bits) {
+ int res = njShowBits(bits);
+ njSkipBits(bits);
+ return res;
+}
+
+NJ_INLINE void njByteAlign(void) {
+ nj.bufbits &= 0xF8;
+}
+
+static void njSkip(int count) {
+ nj.pos += count;
+ nj.size -= count;
+ nj.length -= count;
+ if (nj.size < 0) nj.error = NJ_SYNTAX_ERROR;
+}
+
+NJ_INLINE unsigned short njDecode16(const unsigned char *pos) {
+ return (pos[0] << 8) | pos[1];
+}
+
+static void njDecodeLength(void) {
+ if (nj.size < 2) njThrow(NJ_SYNTAX_ERROR);
+ nj.length = njDecode16(nj.pos);
+ if (nj.length > nj.size) njThrow(NJ_SYNTAX_ERROR);
+ njSkip(2);
+}
+
+NJ_INLINE void njSkipMarker(void) {
+ njDecodeLength();
+ njSkip(nj.length);
+}
+
+NJ_INLINE void njDecodeSOF(void) {
+ int i, ssxmax = 0, ssymax = 0;
+ nj_component_t* c;
+ njDecodeLength();
+ if (nj.length < 9) njThrow(NJ_SYNTAX_ERROR);
+ if (nj.pos[0] != 8) njThrow(NJ_UNSUPPORTED);
+ nj.height = njDecode16(nj.pos+1);
+ nj.width = njDecode16(nj.pos+3);
+ nj.ncomp = nj.pos[5];
+ njSkip(6);
+ switch (nj.ncomp) {
+ case 1:
+ case 3:
+ break;
+ default:
+ njThrow(NJ_UNSUPPORTED);
+ }
+ if (nj.length < (nj.ncomp * 3)) njThrow(NJ_SYNTAX_ERROR);
+ for (i = 0, c = nj.comp; i < nj.ncomp; ++i, ++c) {
+ c->cid = nj.pos[0];
+ if (!(c->ssx = nj.pos[1] >> 4)) njThrow(NJ_SYNTAX_ERROR);
+ if (c->ssx & (c->ssx - 1)) njThrow(NJ_UNSUPPORTED); // non-power of two
+ if (!(c->ssy = nj.pos[1] & 15)) njThrow(NJ_SYNTAX_ERROR);
+ if (c->ssy & (c->ssy - 1)) njThrow(NJ_UNSUPPORTED); // non-power of two
+ if ((c->qtsel = nj.pos[2]) & 0xFC) njThrow(NJ_SYNTAX_ERROR);
+ njSkip(3);
+ nj.qtused |= 1 << c->qtsel;
+ if (c->ssx > ssxmax) ssxmax = c->ssx;
+ if (c->ssy > ssymax) ssymax = c->ssy;
+ }
+ if (nj.ncomp == 1) {
+ c = nj.comp;
+ c->ssx = c->ssy = ssxmax = ssymax = 1;
+ }
+ nj.mbsizex = ssxmax << 3;
+ nj.mbsizey = ssymax << 3;
+ nj.mbwidth = (nj.width + nj.mbsizex - 1) / nj.mbsizex;
+ nj.mbheight = (nj.height + nj.mbsizey - 1) / nj.mbsizey;
+ for (i = 0, c = nj.comp; i < nj.ncomp; ++i, ++c) {
+ c->width = (nj.width * c->ssx + ssxmax - 1) / ssxmax;
+ c->height = (nj.height * c->ssy + ssymax - 1) / ssymax;
+ c->stride = nj.mbwidth * c->ssx << 3;
+ if (((c->width < 3) && (c->ssx != ssxmax)) || ((c->height < 3) && (c->ssy != ssymax))) njThrow(NJ_UNSUPPORTED);
+ if (!(c->pixels = njAllocMem(c->stride * nj.mbheight * c->ssy << 3))) njThrow(NJ_OUT_OF_MEM);
+ }
+ if (nj.ncomp == 3) {
+ nj.rgb = njAllocMem(nj.width * nj.height * nj.ncomp);
+ if (!nj.rgb) njThrow(NJ_OUT_OF_MEM);
+ }
+ njSkip(nj.length);
+}
+
+NJ_INLINE void njDecodeDHT(void) {
+ int codelen, currcnt, remain, spread, i, j;
+ nj_vlc_code_t *vlc;
+ static unsigned char counts[16];
+ njDecodeLength();
+ while (nj.length >= 17) {
+ i = nj.pos[0];
+ if (i & 0xEC) njThrow(NJ_SYNTAX_ERROR);
+ if (i & 0x02) njThrow(NJ_UNSUPPORTED);
+ i = (i | (i >> 3)) & 3; // combined DC/AC + tableid value
+ for (codelen = 1; codelen <= 16; ++codelen)
+ counts[codelen - 1] = nj.pos[codelen];
+ njSkip(17);
+ vlc = &nj.vlctab[i][0];
+ remain = spread = 65536;
+ for (codelen = 1; codelen <= 16; ++codelen) {
+ spread >>= 1;
+ currcnt = counts[codelen - 1];
+ if (!currcnt) continue;
+ if (nj.length < currcnt) njThrow(NJ_SYNTAX_ERROR);
+ remain -= currcnt << (16 - codelen);
+ if (remain < 0) njThrow(NJ_SYNTAX_ERROR);
+ for (i = 0; i < currcnt; ++i) {
+ register unsigned char code = nj.pos[i];
+ for (j = spread; j; --j) {
+ vlc->bits = (unsigned char) codelen;
+ vlc->code = code;
+ ++vlc;
+ }
+ }
+ njSkip(currcnt);
+ }
+ while (remain--) {
+ vlc->bits = 0;
+ ++vlc;
+ }
+ }
+ if (nj.length) njThrow(NJ_SYNTAX_ERROR);
+}
+
+NJ_INLINE void njDecodeDQT(void) {
+ int i;
+ unsigned char *t;
+ njDecodeLength();
+ while (nj.length >= 65) {
+ i = nj.pos[0];
+ if (i & 0xFC) njThrow(NJ_SYNTAX_ERROR);
+ nj.qtavail |= 1 << i;
+ t = &nj.qtab[i][0];
+ for (i = 0; i < 64; ++i)
+ t[i] = nj.pos[i + 1];
+ njSkip(65);
+ }
+ if (nj.length) njThrow(NJ_SYNTAX_ERROR);
+}
+
+NJ_INLINE void njDecodeDRI(void) {
+ njDecodeLength();
+ if (nj.length < 2) njThrow(NJ_SYNTAX_ERROR);
+ nj.rstinterval = njDecode16(nj.pos);
+ njSkip(nj.length);
+}
+
+static int njGetVLC(nj_vlc_code_t* vlc, unsigned char* code) {
+ int value = njShowBits(16);
+ int bits = vlc[value].bits;
+ if (!bits) { nj.error = NJ_SYNTAX_ERROR; return 0; }
+ njSkipBits(bits);
+ value = vlc[value].code;
+ if (code) *code = (unsigned char) value;
+ bits = value & 15;
+ if (!bits) return 0;
+ value = njGetBits(bits);
+ if (value < (1 << (bits - 1)))
+ value += ((-1) << bits) + 1;
+ return value;
+}
+
+NJ_INLINE void njDecodeBlock(nj_component_t* c, unsigned char* out) {
+ unsigned char code = 0;
+ int value, coef = 0;
+ njFillMem(nj.block, 0, sizeof(nj.block));
+ c->dcpred += njGetVLC(&nj.vlctab[c->dctabsel][0], NULL);
+ nj.block[0] = (c->dcpred) * nj.qtab[c->qtsel][0];
+ do {
+ value = njGetVLC(&nj.vlctab[c->actabsel][0], &code);
+ if (!code) break; // EOB
+ if (!(code & 0x0F) && (code != 0xF0)) njThrow(NJ_SYNTAX_ERROR);
+ coef += (code >> 4) + 1;
+ if (coef > 63) njThrow(NJ_SYNTAX_ERROR);
+ nj.block[(int) njZZ[coef]] = value * nj.qtab[c->qtsel][coef];
+ } while (coef < 63);
+ for (coef = 0; coef < 64; coef += 8)
+ njRowIDCT(&nj.block[coef]);
+ for (coef = 0; coef < 8; ++coef)
+ njColIDCT(&nj.block[coef], &out[coef], c->stride);
+}
+
+NJ_INLINE void njDecodeScan(void) {
+ int i, mbx, mby, sbx, sby;
+ int rstcount = nj.rstinterval, nextrst = 0;
+ nj_component_t* c;
+ njDecodeLength();
+ if (nj.length < (4 + 2 * nj.ncomp)) njThrow(NJ_SYNTAX_ERROR);
+ if (nj.pos[0] != nj.ncomp) njThrow(NJ_UNSUPPORTED);
+ njSkip(1);
+ for (i = 0, c = nj.comp; i < nj.ncomp; ++i, ++c) {
+ if (nj.pos[0] != c->cid) njThrow(NJ_SYNTAX_ERROR);
+ if (nj.pos[1] & 0xEE) njThrow(NJ_SYNTAX_ERROR);
+ c->dctabsel = nj.pos[1] >> 4;
+ c->actabsel = (nj.pos[1] & 1) | 2;
+ njSkip(2);
+ }
+ if (nj.pos[0] || (nj.pos[1] != 63) || nj.pos[2]) njThrow(NJ_UNSUPPORTED);
+ njSkip(nj.length);
+ for (mbx = mby = 0;;) {
+ for (i = 0, c = nj.comp; i < nj.ncomp; ++i, ++c)
+ for (sby = 0; sby < c->ssy; ++sby)
+ for (sbx = 0; sbx < c->ssx; ++sbx) {
+ njDecodeBlock(c, &c->pixels[((mby * c->ssy + sby) * c->stride + mbx * c->ssx + sbx) << 3]);
+ njCheckError();
+ }
+ if (++mbx >= nj.mbwidth) {
+ mbx = 0;
+ if (++mby >= nj.mbheight) break;
+ }
+ if (nj.rstinterval && !(--rstcount)) {
+ njByteAlign();
+ i = njGetBits(16);
+ if (((i & 0xFFF8) != 0xFFD0) || ((i & 7) != nextrst)) njThrow(NJ_SYNTAX_ERROR);
+ nextrst = (nextrst + 1) & 7;
+ rstcount = nj.rstinterval;
+ for (i = 0; i < 3; ++i)
+ nj.comp[i].dcpred = 0;
+ }
+ }
+ nj.error = __NJ_FINISHED;
+}
+
+#if NJ_CHROMA_FILTER
+
+#define CF4A (-9)
+#define CF4B (111)
+#define CF4C (29)
+#define CF4D (-3)
+#define CF3A (28)
+#define CF3B (109)
+#define CF3C (-9)
+#define CF3X (104)
+#define CF3Y (27)
+#define CF3Z (-3)
+#define CF2A (139)
+#define CF2B (-11)
+#define CF(x) njClip(((x) + 64) >> 7)
+
+NJ_INLINE void njUpsampleH(nj_component_t* c) {
+ const int xmax = c->width - 3;
+ unsigned char *out, *lin, *lout;
+ int x, y;
+ out = njAllocMem((c->width * c->height) << 1);
+ if (!out) njThrow(NJ_OUT_OF_MEM);
+ lin = c->pixels;
+ lout = out;
+ for (y = c->height; y; --y) {
+ lout[0] = CF(CF2A * lin[0] + CF2B * lin[1]);
+ lout[1] = CF(CF3X * lin[0] + CF3Y * lin[1] + CF3Z * lin[2]);
+ lout[2] = CF(CF3A * lin[0] + CF3B * lin[1] + CF3C * lin[2]);
+ for (x = 0; x < xmax; ++x) {
+ lout[(x << 1) + 3] = CF(CF4A * lin[x] + CF4B * lin[x + 1] + CF4C * lin[x + 2] + CF4D * lin[x + 3]);
+ lout[(x << 1) + 4] = CF(CF4D * lin[x] + CF4C * lin[x + 1] + CF4B * lin[x + 2] + CF4A * lin[x + 3]);
+ }
+ lin += c->stride;
+ lout += c->width << 1;
+ lout[-3] = CF(CF3A * lin[-1] + CF3B * lin[-2] + CF3C * lin[-3]);
+ lout[-2] = CF(CF3X * lin[-1] + CF3Y * lin[-2] + CF3Z * lin[-3]);
+ lout[-1] = CF(CF2A * lin[-1] + CF2B * lin[-2]);
+ }
+ c->width <<= 1;
+ c->stride = c->width;
+ njFreeMem(c->pixels);
+ c->pixels = out;
+}
+
+NJ_INLINE void njUpsampleV(nj_component_t* c) {
+ const int w = c->width, s1 = c->stride, s2 = s1 + s1;
+ unsigned char *out, *cin, *cout;
+ int x, y;
+ out = njAllocMem((c->width * c->height) << 1);
+ if (!out) njThrow(NJ_OUT_OF_MEM);
+ for (x = 0; x < w; ++x) {
+ cin = &c->pixels[x];
+ cout = &out[x];
+ *cout = CF(CF2A * cin[0] + CF2B * cin[s1]); cout += w;
+ *cout = CF(CF3X * cin[0] + CF3Y * cin[s1] + CF3Z * cin[s2]); cout += w;
+ *cout = CF(CF3A * cin[0] + CF3B * cin[s1] + CF3C * cin[s2]); cout += w;
+ cin += s1;
+ for (y = c->height - 3; y; --y) {
+ *cout = CF(CF4A * cin[-s1] + CF4B * cin[0] + CF4C * cin[s1] + CF4D * cin[s2]); cout += w;
+ *cout = CF(CF4D * cin[-s1] + CF4C * cin[0] + CF4B * cin[s1] + CF4A * cin[s2]); cout += w;
+ cin += s1;
+ }
+ cin += s1;
+ *cout = CF(CF3A * cin[0] + CF3B * cin[-s1] + CF3C * cin[-s2]); cout += w;
+ *cout = CF(CF3X * cin[0] + CF3Y * cin[-s1] + CF3Z * cin[-s2]); cout += w;
+ *cout = CF(CF2A * cin[0] + CF2B * cin[-s1]);
+ }
+ c->height <<= 1;
+ c->stride = c->width;
+ njFreeMem(c->pixels);
+ c->pixels = out;
+}
+
+#else
+
+NJ_INLINE void njUpsample(nj_component_t* c) {
+ int x, y, xshift = 0, yshift = 0;
+ unsigned char *out, *lin, *lout;
+ while (c->width < nj.width) { c->width <<= 1; ++xshift; }
+ while (c->height < nj.height) { c->height <<= 1; ++yshift; }
+ out = njAllocMem(c->width * c->height);
+ if (!out) njThrow(NJ_OUT_OF_MEM);
+ lin = c->pixels;
+ lout = out;
+ for (y = 0; y < c->height; ++y) {
+ lin = &c->pixels[(y >> yshift) * c->stride];
+ for (x = 0; x < c->width; ++x)
+ lout[x] = lin[x >> xshift];
+ lout += c->width;
+ }
+ c->stride = c->width;
+ njFreeMem(c->pixels);
+ c->pixels = out;
+}
+
+#endif
+
+NJ_INLINE void njConvert(void) {
+ int i;
+ nj_component_t* c;
+ for (i = 0, c = nj.comp; i < nj.ncomp; ++i, ++c) {
+ #if NJ_CHROMA_FILTER
+ while ((c->width < nj.width) || (c->height < nj.height)) {
+ if (c->width < nj.width) njUpsampleH(c);
+ njCheckError();
+ if (c->height < nj.height) njUpsampleV(c);
+ njCheckError();
+ }
+ #else
+ if ((c->width < nj.width) || (c->height < nj.height))
+ njUpsample(c);
+ #endif
+ if ((c->width < nj.width) || (c->height < nj.height)) njThrow(NJ_INTERNAL_ERR);
+ }
+ if (nj.ncomp == 3) {
+ // convert to RGB
+ int x, yy;
+ unsigned char *prgb = nj.rgb;
+ const unsigned char *py = nj.comp[0].pixels;
+ const unsigned char *pcb = nj.comp[1].pixels;
+ const unsigned char *pcr = nj.comp[2].pixels;
+ for (yy = nj.height; yy; --yy) {
+ for (x = 0; x < nj.width; ++x) {
+ register int y = py[x] << 8;
+ register int cb = pcb[x] - 128;
+ register int cr = pcr[x] - 128;
+ *prgb++ = njClip((y + 359 * cr + 128) >> 8);
+ *prgb++ = njClip((y - 88 * cb - 183 * cr + 128) >> 8);
+ *prgb++ = njClip((y + 454 * cb + 128) >> 8);
+ }
+ py += nj.comp[0].stride;
+ pcb += nj.comp[1].stride;
+ pcr += nj.comp[2].stride;
+ }
+ } else if (nj.comp[0].width != nj.comp[0].stride) {
+ // grayscale -> only remove stride
+ unsigned char *pin = &nj.comp[0].pixels[nj.comp[0].stride];
+ unsigned char *pout = &nj.comp[0].pixels[nj.comp[0].width];
+ int y;
+ for (y = nj.comp[0].height - 1; y; --y) {
+ njCopyMem(pout, pin, nj.comp[0].width);
+ pin += nj.comp[0].stride;
+ pout += nj.comp[0].width;
+ }
+ nj.comp[0].stride = nj.comp[0].width;
+ }
+}
+
+void njInit(void) {
+ njFillMem(&nj, 0, sizeof(nj_context_t));
+}
+
+void njDone(void) {
+ int i;
+ for (i = 0; i < 3; ++i)
+ if (nj.comp[i].pixels) njFreeMem((void*) nj.comp[i].pixels);
+ if (nj.rgb) njFreeMem((void*) nj.rgb);
+ njInit();
+}
+
+nj_result_t njDecode(const void* jpeg, const int size) {
+ njDone();
+ nj.pos = (const unsigned char*) jpeg;
+ nj.size = size & 0x7FFFFFFF;
+ if (nj.size < 2) return NJ_NO_JPEG;
+ if ((nj.pos[0] ^ 0xFF) | (nj.pos[1] ^ 0xD8)) return NJ_NO_JPEG;
+ njSkip(2);
+ while (!nj.error) {
+ if ((nj.size < 2) || (nj.pos[0] != 0xFF)) return NJ_SYNTAX_ERROR;
+ njSkip(2);
+ switch (nj.pos[-1]) {
+ case 0xC0: njDecodeSOF(); break;
+ case 0xC4: njDecodeDHT(); break;
+ case 0xDB: njDecodeDQT(); break;
+ case 0xDD: njDecodeDRI(); break;
+ case 0xDA: njDecodeScan(); break;
+ case 0xFE: njSkipMarker(); break;
+ default:
+ if ((nj.pos[-1] & 0xF0) == 0xE0)
+ njSkipMarker();
+ else
+ return NJ_UNSUPPORTED;
+ }
+ }
+ if (nj.error != __NJ_FINISHED) return nj.error;
+ nj.error = NJ_OK;
+ njConvert();
+ return nj.error;
+}
+
+int njGetWidth(void) { return nj.width; }
+int njGetHeight(void) { return nj.height; }
+int njIsColor(void) { return (nj.ncomp != 1); }
+unsigned char* njGetImage(void) { return (nj.ncomp == 1) ? nj.comp[0].pixels : nj.rgb; }
+int njGetImageSize(void) { return nj.width * nj.height * nj.ncomp; }
+
+#endif // _NJ_INCLUDE_HEADER_ONLY
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-align-loop-iterations-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-align-loop-iterations-0.c
new file mode 100644
index 0000000..071acd9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-align-loop-iterations-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=align-loop-iterations=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-align-threshold-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-align-threshold-1.c
new file mode 100644
index 0000000..7116e64
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-align-threshold-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=align-threshold=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-0.c
new file mode 100644
index 0000000..1218418
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=allow-store-data-races=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-1.c
new file mode 100644
index 0000000..a76c520
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-allow-store-data-races-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=allow-store-data-races=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-0.c
new file mode 100644
index 0000000..b0e946f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-globals=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-1.c
new file mode 100644
index 0000000..3b01bcb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-globals-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-globals=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-0.c
new file mode 100644
index 0000000..aedc194
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-instrument-reads=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-1.c
new file mode 100644
index 0000000..da0286a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-reads-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-instrument-reads=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-0.c
new file mode 100644
index 0000000..e6eb4b1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-instrument-writes=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-1.c
new file mode 100644
index 0000000..6251e51
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrument-writes-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-instrument-writes=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-0.c
new file mode 100644
index 0000000..56008fc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-instrumentation-with-call-threshold=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-2147483647.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-2147483647.c
new file mode 100644
index 0000000..6a8c6bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-instrumentation-with-call-threshold-2147483647.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-instrumentation-with-call-threshold=2147483647" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-0.c
new file mode 100644
index 0000000..979f7d9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-memintrin=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-1.c
new file mode 100644
index 0000000..7bb836c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-memintrin-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-memintrin=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-0.c
new file mode 100644
index 0000000..3bcb2c7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-stack=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-1.c
new file mode 100644
index 0000000..349941d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-stack-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-stack=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-0.c
new file mode 100644
index 0000000..e930bda
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-use-after-return=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-1.c
new file mode 100644
index 0000000..f994a66
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-asan-use-after-return-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=asan-use-after-return=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-0.c
new file mode 100644
index 0000000..3b322d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=builtin-expect-probability=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-100.c
new file mode 100644
index 0000000..9a0ebc1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-builtin-expect-probability-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=builtin-expect-probability=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-case-values-threshold-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-case-values-threshold-0.c
new file mode 100644
index 0000000..c00c545
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-case-values-threshold-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=case-values-threshold=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-chkp-max-ctor-size-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-chkp-max-ctor-size-100.c
new file mode 100644
index 0000000..21bd977
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-chkp-max-ctor-size-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=chkp-max-ctor-size=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-comdat-sharing-probability-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-comdat-sharing-probability-0.c
new file mode 100644
index 0000000..bf4d59c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-comdat-sharing-probability-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=comdat-sharing-probability=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-cxx-max-namespaces-for-diagnostic-help-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-cxx-max-namespaces-for-diagnostic-help-0.c
new file mode 100644
index 0000000..99030c4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-cxx-max-namespaces-for-diagnostic-help-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=cxx-max-namespaces-for-diagnostic-help=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-early-inlining-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-early-inlining-insns-0.c
new file mode 100644
index 0000000..55a1aac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-early-inlining-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=early-inlining-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-1.c
new file mode 100644
index 0000000..25859ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=fsm-maximum-phi-arguments=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-999999.c b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-999999.c
new file mode 100644
index 0000000..25be9c7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-maximum-phi-arguments-999999.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=fsm-maximum-phi-arguments=999999" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-1.c
new file mode 100644
index 0000000..df1295d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=fsm-scale-path-blocks=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-10.c b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-10.c
new file mode 100644
index 0000000..425d8bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-blocks-10.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=fsm-scale-path-blocks=10" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-1.c
new file mode 100644
index 0000000..d9fc970
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=fsm-scale-path-stmts=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-10.c b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-10.c
new file mode 100644
index 0000000..8216c5f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-fsm-scale-path-stmts-10.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=fsm-scale-path-stmts=10" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-critical-fraction-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-critical-fraction-0.c
new file mode 100644
index 0000000..f5bbcdd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-critical-fraction-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=gcse-after-reload-critical-fraction=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-partial-fraction-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-partial-fraction-0.c
new file mode 100644
index 0000000..69f16dc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-after-reload-partial-fraction-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=gcse-after-reload-partial-fraction=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-gcse-cost-distance-ratio-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-cost-distance-ratio-0.c
new file mode 100644
index 0000000..2766520
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-cost-distance-ratio-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=gcse-cost-distance-ratio=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-gcse-unrestricted-cost-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-unrestricted-cost-0.c
new file mode 100644
index 0000000..163c102
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-gcse-unrestricted-cost-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=gcse-unrestricted-cost=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-expand-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-expand-0.c
new file mode 100644
index 0000000..3329c8c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-expand-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ggc-min-expand=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-heapsize-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-heapsize-0.c
new file mode 100644
index 0000000..5fd6db7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ggc-min-heapsize-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ggc-min-heapsize=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-arrays-per-scop-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-arrays-per-scop-0.c
new file mode 100644
index 0000000..f762a12
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-arrays-per-scop-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=graphite-max-arrays-per-scop=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-bbs-per-function-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-bbs-per-function-0.c
new file mode 100644
index 0000000..c70ef1b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-bbs-per-function-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=graphite-max-bbs-per-function=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-nb-scop-params-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-nb-scop-params-0.c
new file mode 100644
index 0000000..c67b42b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-max-nb-scop-params-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=graphite-max-nb-scop-params=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-graphite-min-loops-per-function-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-min-loops-per-function-0.c
new file mode 100644
index 0000000..3904e89
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-graphite-min-loops-per-function-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=graphite-min-loops-per-function=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-0.c
new file mode 100644
index 0000000..0650019
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=hot-bb-count-ws-permille=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-1000.c b/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-1000.c
new file mode 100644
index 0000000..21e9019
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-count-ws-permille-1000.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=hot-bb-count-ws-permille=1000" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-frequency-fraction-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-frequency-fraction-0.c
new file mode 100644
index 0000000..945ca11
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-hot-bb-frequency-fraction-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=hot-bb-frequency-fraction=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-0.c
new file mode 100644
index 0000000..ee96a1b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=hsa-gen-debug-stores=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-1.c
new file mode 100644
index 0000000..c122403
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-hsa-gen-debug-stores-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=hsa-gen-debug-stores=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-0.c
new file mode 100644
index 0000000..bba51ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=indir-call-topn-profile=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-1.c
new file mode 100644
index 0000000..74cc0b0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-indir-call-topn-profile-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=indir-call-topn-profile=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-inline-min-speedup-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-inline-min-speedup-0.c
new file mode 100644
index 0000000..61bc2fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-inline-min-speedup-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=inline-min-speedup=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-inline-unit-growth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-inline-unit-growth-0.c
new file mode 100644
index 0000000..737fc85
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-inline-unit-growth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=inline-unit-growth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-integer-share-limit-2.c b/gcc/testsuite/gcc.dg/params/param-boundary-integer-share-limit-2.c
new file mode 100644
index 0000000..146efce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-integer-share-limit-2.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=integer-share-limit=2" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-array-index-hint-bonus-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-array-index-hint-bonus-0.c
new file mode 100644
index 0000000..6dc4a4e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-array-index-hint-bonus-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-array-index-hint-bonus=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-eval-threshold-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-eval-threshold-0.c
new file mode 100644
index 0000000..1678540
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-eval-threshold-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-eval-threshold=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-loop-hint-bonus-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-loop-hint-bonus-0.c
new file mode 100644
index 0000000..e5c855b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-loop-hint-bonus-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-loop-hint-bonus=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-0.c
new file mode 100644
index 0000000..c50b130
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-recursion-penalty=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-100.c
new file mode 100644
index 0000000..1ff8ea6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-recursion-penalty-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-recursion-penalty=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-0.c
new file mode 100644
index 0000000..0ad7003
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-single-call-penalty=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-100.c
new file mode 100644
index 0000000..ce83790
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-single-call-penalty-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-single-call-penalty=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-value-list-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-value-list-size-0.c
new file mode 100644
index 0000000..867b831
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-cp-value-list-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-cp-value-list-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-aa-steps-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-aa-steps-0.c
new file mode 100644
index 0000000..c3ef674
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-aa-steps-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-max-aa-steps=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-agg-items-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-agg-items-0.c
new file mode 100644
index 0000000..39cb6aa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-max-agg-items-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-max-agg-items=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipa-sra-ptr-growth-factor-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-sra-ptr-growth-factor-0.c
new file mode 100644
index 0000000..7d01236
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipa-sra-ptr-growth-factor-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipa-sra-ptr-growth-factor=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ipcp-unit-growth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ipcp-unit-growth-0.c
new file mode 100644
index 0000000..19f4396
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ipcp-unit-growth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ipcp-unit-growth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ira-loop-reserved-regs-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ira-loop-reserved-regs-0.c
new file mode 100644
index 0000000..a147406
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ira-loop-reserved-regs-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ira-loop-reserved-regs=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ira-max-conflict-table-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ira-max-conflict-table-size-0.c
new file mode 100644
index 0000000..ec6a4cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ira-max-conflict-table-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ira-max-conflict-table-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ira-max-loops-num-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-ira-max-loops-num-0.c
new file mode 100644
index 0000000..121e986
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ira-max-loops-num-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ira-max-loops-num=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-iv-always-prune-cand-set-bound-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-iv-always-prune-cand-set-bound-0.c
new file mode 100644
index 0000000..6cd9c3f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-iv-always-prune-cand-set-bound-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=iv-always-prune-cand-set-bound=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-iv-consider-all-candidates-bound-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-iv-consider-all-candidates-bound-0.c
new file mode 100644
index 0000000..b7758bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-iv-consider-all-candidates-bound-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=iv-consider-all-candidates-bound=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-iv-max-considered-uses-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-iv-max-considered-uses-0.c
new file mode 100644
index 0000000..6dbf816
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-iv-max-considered-uses-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=iv-max-considered-uses=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-line-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-line-size-0.c
new file mode 100644
index 0000000..2adf68a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-line-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=l1-cache-line-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-size-0.c
new file mode 100644
index 0000000..5848cef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-l1-cache-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=l1-cache-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-l2-cache-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-l2-cache-size-0.c
new file mode 100644
index 0000000..6c63110
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-l2-cache-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=l2-cache-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-large-function-growth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-large-function-growth-0.c
new file mode 100644
index 0000000..95c1fa8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-large-function-growth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=large-function-growth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-large-function-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-large-function-insns-0.c
new file mode 100644
index 0000000..140e986
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-large-function-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=large-function-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-0.c
new file mode 100644
index 0000000..503c25c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=large-stack-frame=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-growth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-growth-0.c
new file mode 100644
index 0000000..0e4e61f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-large-stack-frame-growth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=large-stack-frame-growth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-large-unit-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-large-unit-insns-0.c
new file mode 100644
index 0000000..5918a58
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-large-unit-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=large-unit-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lim-expensive-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-lim-expensive-0.c
new file mode 100644
index 0000000..b212fcd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lim-expensive-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lim-expensive=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-loop-block-tile-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-loop-block-tile-size-0.c
new file mode 100644
index 0000000..da1845a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-loop-block-tile-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=loop-block-tile-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-loop-invariant-max-bbs-in-loop-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-loop-invariant-max-bbs-in-loop-0.c
new file mode 100644
index 0000000..3649f23
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-loop-invariant-max-bbs-in-loop-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=loop-invariant-max-bbs-in-loop=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-loop-max-datarefs-for-datadeps-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-loop-max-datarefs-for-datadeps-0.c
new file mode 100644
index 0000000..bd79065
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-loop-max-datarefs-for-datadeps-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=loop-max-datarefs-for-datadeps=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-0.c
new file mode 100644
index 0000000..67dd2c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lra-inheritance-ebb-probability-cutoff=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-100.c
new file mode 100644
index 0000000..3d0baf3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lra-inheritance-ebb-probability-cutoff-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lra-inheritance-ebb-probability-cutoff=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lra-max-considered-reload-pseudos-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-lra-max-considered-reload-pseudos-0.c
new file mode 100644
index 0000000..8266ce0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lra-max-considered-reload-pseudos-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lra-max-considered-reload-pseudos=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-0.c
new file mode 100644
index 0000000..6389c61
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lto-max-partition=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-2147483647.c b/gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-2147483647.c
new file mode 100644
index 0000000..ce6ba90
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lto-max-partition-2147483647.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lto-max-partition=2147483647" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lto-min-partition-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-lto-min-partition-0.c
new file mode 100644
index 0000000..193f5ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lto-min-partition-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lto-min-partition=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-lto-partitions-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-lto-partitions-1.c
new file mode 100644
index 0000000..dba89d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-lto-partitions-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=lto-partitions=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-average-unrolled-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-average-unrolled-insns-0.c
new file mode 100644
index 0000000..2acc2cf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-average-unrolled-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-average-unrolled-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-2.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-2.c
new file mode 100644
index 0000000..3709af3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-2.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-combine-insns=2" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-4.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-4.c
new file mode 100644
index 0000000..75483ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-combine-insns-4.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-combine-insns=4" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-loop-nest-depth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-loop-nest-depth-0.c
new file mode 100644
index 0000000..33ba992
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-loop-nest-depth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-completely-peel-loop-nest-depth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-times-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-times-0.c
new file mode 100644
index 0000000..86f893c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peel-times-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-completely-peel-times=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peeled-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peeled-insns-0.c
new file mode 100644
index 0000000..2c416c7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-completely-peeled-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-completely-peeled-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-crossjump-edges-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-crossjump-edges-0.c
new file mode 100644
index 0000000..8dd82a4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-crossjump-edges-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-crossjump-edges=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-cse-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-cse-insns-0.c
new file mode 100644
index 0000000..200479d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-cse-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-cse-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-cse-path-length-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-cse-path-length-1.c
new file mode 100644
index 0000000..18a2136
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-cse-path-length-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-cse-path-length=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-cselib-memory-locations-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-cselib-memory-locations-0.c
new file mode 100644
index 0000000..6d1e6f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-cselib-memory-locations-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-cselib-memory-locations=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-insn-search-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-insn-search-0.c
new file mode 100644
index 0000000..df7be08
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-insn-search-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-delay-slot-insn-search=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-live-search-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-live-search-0.c
new file mode 100644
index 0000000..8363d60
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-delay-slot-live-search-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-delay-slot-live-search=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-dse-active-local-stores-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-dse-active-local-stores-0.c
new file mode 100644
index 0000000..ecd72f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-dse-active-local-stores-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-dse-active-local-stores=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-early-inliner-iterations-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-early-inliner-iterations-0.c
new file mode 100644
index 0000000..f48429b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-early-inliner-iterations-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-early-inliner-iterations=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-fields-for-field-sensitive-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-fields-for-field-sensitive-0.c
new file mode 100644
index 0000000..f4ba2e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-fields-for-field-sensitive-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-fields-for-field-sensitive=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-1.c
new file mode 100644
index 0000000..eda6e38
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-fsm-thread-length=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-999999.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-999999.c
new file mode 100644
index 0000000..80d6e1c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-length-999999.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-fsm-thread-length=999999" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-1.c
new file mode 100644
index 0000000..6cc1257
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-fsm-thread-path-insns=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-999999.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-999999.c
new file mode 100644
index 0000000..c40a7d9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-path-insns-999999.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-fsm-thread-path-insns=999999" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-1.c
new file mode 100644
index 0000000..6caf043
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-fsm-thread-paths=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-999999.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-999999.c
new file mode 100644
index 0000000..a1ab6a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-fsm-thread-paths-999999.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-fsm-thread-paths=999999" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-insertion-ratio-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-insertion-ratio-0.c
new file mode 100644
index 0000000..07a451a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-insertion-ratio-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-gcse-insertion-ratio=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-memory-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-memory-0.c
new file mode 100644
index 0000000..3c35951
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-gcse-memory-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-gcse-memory=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-goto-duplication-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-goto-duplication-insns-0.c
new file mode 100644
index 0000000..fc84b33
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-goto-duplication-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-goto-duplication-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-grow-copy-bb-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-grow-copy-bb-insns-0.c
new file mode 100644
index 0000000..589a5e6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-grow-copy-bb-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-grow-copy-bb-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-hoist-depth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-hoist-depth-0.c
new file mode 100644
index 0000000..54458a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-hoist-depth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-hoist-depth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-auto-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-auto-0.c
new file mode 100644
index 0000000..0aefd14
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-auto-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-inline-insns-auto=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-0.c
new file mode 100644
index 0000000..de30bb1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-inline-insns-recursive=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-auto-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-auto-0.c
new file mode 100644
index 0000000..311ebe9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-recursive-auto-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-inline-insns-recursive-auto=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-single-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-single-0.c
new file mode 100644
index 0000000..1e2f60d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-insns-single-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-inline-insns-single=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-0.c
new file mode 100644
index 0000000..debc15e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-inline-recursive-depth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-auto-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-auto-0.c
new file mode 100644
index 0000000..51fe86b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-inline-recursive-depth-auto-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-inline-recursive-depth-auto=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-isl-operations-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-isl-operations-0.c
new file mode 100644
index 0000000..249cacb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-isl-operations-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-isl-operations=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-computation-cost-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-computation-cost-0.c
new file mode 100644
index 0000000..928e72c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-computation-cost-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-iterations-computation-cost=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-to-track-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-to-track-0.c
new file mode 100644
index 0000000..43f30e3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-iterations-to-track-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-iterations-to-track=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-jump-thread-duplication-stmts-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-jump-thread-duplication-stmts-0.c
new file mode 100644
index 0000000..c7bb6e1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-jump-thread-duplication-stmts-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-jump-thread-duplication-stmts=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-last-value-rtl-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-last-value-rtl-0.c
new file mode 100644
index 0000000..9b4e784
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-last-value-rtl-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-last-value-rtl=0" }
+
+#include "nanojpeg.h"
--git a/gcc/testsuite/gcc.dg/params/param-boundary-max-loop-header-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-loop-header-insns-0.c
new file mode 100644
index 0000000..453c4cf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-loop-header-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-loop-header-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-modulo-backtrack-attempts-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-modulo-backtrack-attempts-0.c
new file mode 100644
index 0000000..5f3e5e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-modulo-backtrack-attempts-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-modulo-backtrack-attempts=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-once-peeled-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-once-peeled-insns-0.c
new file mode 100644
index 0000000..3d3b2c4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-once-peeled-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-once-peeled-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-partial-antic-length-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-partial-antic-length-0.c
new file mode 100644
index 0000000..a408d2e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-partial-antic-length-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-partial-antic-length=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-peel-branches-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-peel-branches-0.c
new file mode 100644
index 0000000..7a38eca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-peel-branches-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-peel-branches=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-peel-times-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-peel-times-0.c
new file mode 100644
index 0000000..da80b29
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-peel-times-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-peel-times=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-peeled-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-peeled-insns-0.c
new file mode 100644
index 0000000..bda968e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-peeled-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-peeled-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-pending-list-length-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-pending-list-length-0.c
new file mode 100644
index 0000000..cf73b1a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-pending-list-length-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-pending-list-length=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-blocks-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-blocks-0.c
new file mode 100644
index 0000000..1d8e676
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-blocks-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-pipeline-region-blocks=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-insns-0.c
new file mode 100644
index 0000000..62f99d9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-pipeline-region-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-pipeline-region-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-1.c
new file mode 100644
index 0000000..1ee4051
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-pow-sqrt-depth=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-32.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-32.c
new file mode 100644
index 0000000..0613abc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-pow-sqrt-depth-32.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-pow-sqrt-depth=32" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-predicted-iterations-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-predicted-iterations-0.c
new file mode 100644
index 0000000..55f52b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-predicted-iterations-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-predicted-iterations=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-reload-search-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-reload-search-insns-0.c
new file mode 100644
index 0000000..f1fb976
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-reload-search-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-reload-search-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-0.c
new file mode 100644
index 0000000..2e246a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-rtl-if-conversion-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-99.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-99.c
new file mode 100644
index 0000000..251902d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-rtl-if-conversion-insns-99.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-rtl-if-conversion-insns=99" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-extend-regions-iters-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-extend-regions-iters-0.c
new file mode 100644
index 0000000..3da8a77
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-extend-regions-iters-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-sched-extend-regions-iters=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-1.c
new file mode 100644
index 0000000..f1d508c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-sched-insn-conflict-delay=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-10.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-10.c
new file mode 100644
index 0000000..e01072a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-insn-conflict-delay-10.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-sched-insn-conflict-delay=10" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-ready-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-ready-insns-0.c
new file mode 100644
index 0000000..80bfbc5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-ready-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-sched-ready-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-blocks-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-blocks-0.c
new file mode 100644
index 0000000..e0547df
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-blocks-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-sched-region-blocks=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-insns-0.c
new file mode 100644
index 0000000..e19ecb3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-sched-region-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-sched-region-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-1.c
new file mode 100644
index 0000000..3997568
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-slsr-cand-scan=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-999999.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-999999.c
new file mode 100644
index 0000000..6dbbd07
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-slsr-cand-scan-999999.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-slsr-cand-scan=999999" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-speculative-devirt-maydefs-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-speculative-devirt-maydefs-0.c
new file mode 100644
index 0000000..e3b9e61
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-speculative-devirt-maydefs-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-speculative-devirt-maydefs=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-ssa-name-query-depth-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-ssa-name-query-depth-1.c
new file mode 100644
index 0000000..9757bff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-ssa-name-query-depth-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-ssa-name-query-depth=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-stores-to-sink-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-stores-to-sink-0.c
new file mode 100644
index 0000000..c40395b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-stores-to-sink-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-stores-to-sink=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-comparisons-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-comparisons-0.c
new file mode 100644
index 0000000..dc5a434
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-comparisons-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-tail-merge-comparisons=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-iterations-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-iterations-0.c
new file mode 100644
index 0000000..5b37712
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-tail-merge-iterations-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-tail-merge-iterations=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-tracked-strlens-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-tracked-strlens-0.c
new file mode 100644
index 0000000..605ee4d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-tracked-strlens-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-tracked-strlens=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-tree-if-conversion-phi-args-2.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-tree-if-conversion-phi-args-2.c
new file mode 100644
index 0000000..7a03d84
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-tree-if-conversion-phi-args-2.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-tree-if-conversion-phi-args=2" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-unroll-times-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-unroll-times-0.c
new file mode 100644
index 0000000..8852a3f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-unroll-times-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-unroll-times=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-unrolled-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-unrolled-insns-0.c
new file mode 100644
index 0000000..3cbf802
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-unrolled-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-unrolled-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-insns-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-insns-0.c
new file mode 100644
index 0000000..0553526
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-insns-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-unswitch-insns=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-level-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-level-0.c
new file mode 100644
index 0000000..c994a91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-unswitch-level-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-unswitch-level=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-variable-expansions-in-unroller-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-variable-expansions-in-unroller-0.c
new file mode 100644
index 0000000..d758e6a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-variable-expansions-in-unroller-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-variable-expansions-in-unroller=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-expr-depth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-expr-depth-0.c
new file mode 100644
index 0000000..e0600e8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-expr-depth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-vartrack-expr-depth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-reverse-op-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-reverse-op-size-0.c
new file mode 100644
index 0000000..e4a0a12
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-reverse-op-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-vartrack-reverse-op-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-size-0.c
new file mode 100644
index 0000000..7c0c5f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-max-vartrack-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=max-vartrack-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-min-crossjump-insns-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-min-crossjump-insns-1.c
new file mode 100644
index 0000000..fe696fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-min-crossjump-insns-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=min-crossjump-insns=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-min-inline-recursive-probability-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-min-inline-recursive-probability-0.c
new file mode 100644
index 0000000..6ac66c4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-min-inline-recursive-probability-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=min-inline-recursive-probability=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-min-insn-to-prefetch-ratio-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-min-insn-to-prefetch-ratio-0.c
new file mode 100644
index 0000000..9990c14
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-min-insn-to-prefetch-ratio-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=min-insn-to-prefetch-ratio=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-min-nondebug-insn-uid-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-min-nondebug-insn-uid-1.c
new file mode 100644
index 0000000..47df8d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-min-nondebug-insn-uid-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=min-nondebug-insn-uid=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-min-size-for-stack-sharing-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-min-size-for-stack-sharing-0.c
new file mode 100644
index 0000000..958a857
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-min-size-for-stack-sharing-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=min-size-for-stack-sharing=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-min-spec-prob-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-min-spec-prob-0.c
new file mode 100644
index 0000000..41a92fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-min-spec-prob-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=min-spec-prob=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-min-vect-loop-bound-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-min-vect-loop-bound-1.c
new file mode 100644
index 0000000..609e63c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-min-vect-loop-bound-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=min-vect-loop-bound=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-parloops-chunk-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-chunk-size-0.c
new file mode 100644
index 0000000..6d248db
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-chunk-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=parloops-chunk-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-auto.c b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-auto.c
new file mode 100644
index 0000000..d881035
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-auto.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=parloops-schedule=auto" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-dynamic.c b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-dynamic.c
new file mode 100644
index 0000000..33a7d45
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-dynamic.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=parloops-schedule=dynamic" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-guided.c b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-guided.c
new file mode 100644
index 0000000..724e0d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-guided.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=parloops-schedule=guided" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-runtime.c b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-runtime.c
new file mode 100644
index 0000000..fca8139
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-runtime.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=parloops-schedule=runtime" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-static.c b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-static.c
new file mode 100644
index 0000000..12085b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-parloops-schedule-static.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=parloops-schedule=static" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-partial-inlining-entry-probability-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-partial-inlining-entry-probability-0.c
new file mode 100644
index 0000000..2f8770d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-partial-inlining-entry-probability-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=partial-inlining-entry-probability=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-0.c
new file mode 100644
index 0000000..04ff951
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=predictable-branch-outcome=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-50.c b/gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-50.c
new file mode 100644
index 0000000..a916577
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-predictable-branch-outcome-50.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=predictable-branch-outcome=50" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-prefetch-latency-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-prefetch-latency-0.c
new file mode 100644
index 0000000..2e71980
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-prefetch-latency-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=prefetch-latency=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-prefetch-min-insn-to-mem-ratio-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-prefetch-min-insn-to-mem-ratio-0.c
new file mode 100644
index 0000000..a32e98e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-prefetch-min-insn-to-mem-ratio-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=prefetch-min-insn-to-mem-ratio=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-0.c
new file mode 100644
index 0000000..e858a38
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=profile-func-internal-id=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-1.c
new file mode 100644
index 0000000..7931e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-profile-func-internal-id-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=profile-func-internal-id=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-alias-queries-per-access-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-alias-queries-per-access-0.c
new file mode 100644
index 0000000..d28f6cb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-alias-queries-per-access-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sccvn-max-alias-queries-per-access=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-scc-size-10.c b/gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-scc-size-10.c
new file mode 100644
index 0000000..a99bf1f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sccvn-max-scc-size-10.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sccvn-max-scc-size=10" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-complexity-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-complexity-0.c
new file mode 100644
index 0000000..f482565
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-complexity-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=scev-max-expr-complexity=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-size-0.c
new file mode 100644
index 0000000..829f3ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-scev-max-expr-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=scev-max-expr-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-autopref-queue-depth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-autopref-queue-depth-0.c
new file mode 100644
index 0000000..f238c4e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-autopref-queue-depth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-autopref-queue-depth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-mem-true-dep-cost-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-mem-true-dep-cost-0.c
new file mode 100644
index 0000000..26529a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-mem-true-dep-cost-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-mem-true-dep-cost=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-1.c
new file mode 100644
index 0000000..baef335
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-pressure-algorithm=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-2.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-2.c
new file mode 100644
index 0000000..8208c7b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-pressure-algorithm-2.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-pressure-algorithm=2" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-0.c
new file mode 100644
index 0000000..e396c3d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-spec-prob-cutoff=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-100.c
new file mode 100644
index 0000000..6239e3e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-spec-prob-cutoff-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-spec-prob-cutoff=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-0.c
new file mode 100644
index 0000000..bee94bb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-state-edge-prob-cutoff=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-100.c
new file mode 100644
index 0000000..970b299
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sched-state-edge-prob-cutoff-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sched-state-edge-prob-cutoff=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-selsched-insns-to-rename-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-selsched-insns-to-rename-0.c
new file mode 100644
index 0000000..02f385c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-selsched-insns-to-rename-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=selsched-insns-to-rename=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-lookahead-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-lookahead-0.c
new file mode 100644
index 0000000..cb97ab6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-lookahead-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=selsched-max-lookahead=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-sched-times-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-sched-times-0.c
new file mode 100644
index 0000000..2008bc9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-selsched-max-sched-times-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=selsched-max-sched-times=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-simultaneous-prefetches-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-simultaneous-prefetches-0.c
new file mode 100644
index 0000000..1be9f96
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-simultaneous-prefetches-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=simultaneous-prefetches=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-0.c
new file mode 100644
index 0000000..52ae9a4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sink-frequency-threshold=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-100.c
new file mode 100644
index 0000000..739045b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sink-frequency-threshold-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sink-frequency-threshold=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-slp-max-insns-in-bb-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-slp-max-insns-in-bb-0.c
new file mode 100644
index 0000000..90d7746
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-slp-max-insns-in-bb-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=slp-max-insns-in-bb=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sms-dfa-history-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sms-dfa-history-0.c
new file mode 100644
index 0000000..8494bb6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sms-dfa-history-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sms-dfa-history=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sms-loop-average-count-threshold-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sms-loop-average-count-threshold-0.c
new file mode 100644
index 0000000..c60b422
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sms-loop-average-count-threshold-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sms-loop-average-count-threshold=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sms-max-ii-factor-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sms-max-ii-factor-0.c
new file mode 100644
index 0000000..fa66545
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sms-max-ii-factor-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sms-max-ii-factor=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sms-min-sc-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-sms-min-sc-1.c
new file mode 100644
index 0000000..66ea759
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sms-min-sc-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sms-min-sc=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Osize-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Osize-0.c
new file mode 100644
index 0000000..f87495a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Osize-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sra-max-scalarization-size-Osize=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Ospeed-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Ospeed-0.c
new file mode 100644
index 0000000..13c6059
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-sra-max-scalarization-size-Ospeed-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=sra-max-scalarization-size-Ospeed=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-ssp-buffer-size-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-ssp-buffer-size-1.c
new file mode 100644
index 0000000..e9e76cb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-ssp-buffer-size-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=ssp-buffer-size=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-switch-conversion-max-branch-ratio-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-switch-conversion-max-branch-ratio-1.c
new file mode 100644
index 0000000..4ef640c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-switch-conversion-max-branch-ratio-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=switch-conversion-max-branch-ratio=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tm-max-aggregate-size-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tm-max-aggregate-size-0.c
new file mode 100644
index 0000000..e09c2cf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tm-max-aggregate-size-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tm-max-aggregate-size=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-0.c
new file mode 100644
index 0000000..116faa9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-dynamic-coverage=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-100.c
new file mode 100644
index 0000000..0541435
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-dynamic-coverage=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-0.c
new file mode 100644
index 0000000..ef6b11c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-dynamic-coverage-feedback=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-100.c
new file mode 100644
index 0000000..79bb1ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-dynamic-coverage-feedback-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-dynamic-coverage-feedback=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-max-code-growth-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-max-code-growth-0.c
new file mode 100644
index 0000000..5295ad2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-max-code-growth-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-max-code-growth=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-0.c
new file mode 100644
index 0000000..b648578
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-min-branch-probability=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-100.c
new file mode 100644
index 0000000..44d5d8c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-min-branch-probability=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-0.c
new file mode 100644
index 0000000..ccd3879
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-min-branch-probability-feedback=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-100.c
new file mode 100644
index 0000000..0c41822
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-probability-feedback-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-min-branch-probability-feedback=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-0.c
new file mode 100644
index 0000000..e754508
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-min-branch-ratio=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-100.c b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-100.c
new file mode 100644
index 0000000..8a60607
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tracer-min-branch-ratio-100.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tracer-min-branch-ratio=100" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-tree-reassoc-width-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-tree-reassoc-width-0.c
new file mode 100644
index 0000000..d3a5086
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-tree-reassoc-width-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=tree-reassoc-width=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-uninit-control-dep-attempts-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-uninit-control-dep-attempts-1.c
new file mode 100644
index 0000000..e6039c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-uninit-control-dep-attempts-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=uninit-control-dep-attempts=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-1.c
new file mode 100644
index 0000000..f1bbb59
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=unlikely-bb-count-fraction=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-10000.c b/gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-10000.c
new file mode 100644
index 0000000..ec693fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-unlikely-bb-count-fraction-10000.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=unlikely-bb-count-fraction=10000" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-0.c
new file mode 100644
index 0000000..13e9c9f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=use-canonical-types=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-1.c b/gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-1.c
new file mode 100644
index 0000000..7ef4463
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-use-canonical-types-1.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=use-canonical-types=1" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-peeling-for-alignment-64.c b/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-peeling-for-alignment-64.c
new file mode 100644
index 0000000..6350d39
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-peeling-for-alignment-64.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=vect-max-peeling-for-alignment=64" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alias-checks-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alias-checks-0.c
new file mode 100644
index 0000000..4e28bd0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alias-checks-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=vect-max-version-for-alias-checks=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alignment-checks-0.c b/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alignment-checks-0.c
new file mode 100644
index 0000000..e964b04
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/param-boundary-vect-max-version-for-alignment-checks-0.c
@@ -0,0 +1,4 @@
+// { dg-do compile }
+// { dg-options "-O3 --param=vect-max-version-for-alignment-checks=0" }
+
+#include "nanojpeg.h"
diff --git a/gcc/testsuite/gcc.dg/params/params.exp b/gcc/testsuite/gcc.dg/params/params.exp
new file mode 100644
index 0000000..73a7f9f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/params.exp
@@ -0,0 +1,31 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" ""
+
+# All done.
+dg-finish
--
2.8.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-08 10:43 [RFC] Test coverage for --param boundary values Martin Liška
@ 2016-07-08 12:48 ` Martin Liška
2016-07-11 14:48 ` Jeff Law
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Martin Liška @ 2016-07-08 12:48 UTC (permalink / raw)
To: gcc-patches; +Cc: Jakub Jelinek
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
Hi.
This is my second attempt of the patch where I generate all tests on fly.
Firstly, params-options.h is used to generate a list of options in form of:
"predictable-branch-outcome"=2,0,50
"inline-min-speedup"=10,0,0
"max-inline-insns-single"=400,0,0
...
The list is then loaded in params.ext which triggers dg-runtest.
I've also swapped the tested source file to a part of bzip2 compression algorithm.
Now the testing runs 1m20s (w/ -O3) and 0m58s (w/ -O2).
Hope it's much better?
Martin
[-- Attachment #2: 0001-Add-tests-that-test-boundary-values-of-params-v2.patch --]
[-- Type: text/x-patch, Size: 25173 bytes --]
From f84ce7be4a998089541fb4512e19f54a4ec25cf6 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 8 Jul 2016 10:59:24 +0200
Subject: [PATCH] Add tests that test boundary values of params
gcc/ChangeLog:
2016-07-08 Martin Liska <mliska@suse.cz>
* Makefile.in: Append rule for params-options.h.
* params-options.h: New file.
gcc/testsuite/ChangeLog:
2016-07-08 Martin Liska <mliska@suse.cz>
* gcc.dg/params/blocksort-part.c: New test.
* gcc.dg/params/params.exp: New file.
---
gcc/Makefile.in | 9 +-
gcc/params-options.h | 27 +
gcc/testsuite/gcc.dg/params/blocksort-part.c | 706 +++++++++++++++++++++++++++
gcc/testsuite/gcc.dg/params/params.exp | 64 +++
4 files changed, 805 insertions(+), 1 deletion(-)
create mode 100644 gcc/params-options.h
create mode 100644 gcc/testsuite/gcc.dg/params/blocksort-part.c
create mode 100644 gcc/testsuite/gcc.dg/params/params.exp
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 5e7422d..f365d29a 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2496,7 +2496,7 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
$(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gcov-iov.h \
options.h target-hooks-def.h insn-opinit.h \
common/common-target-hooks-def.h pass-instances.def \
- c-family/c-target-hooks-def.h params.list case-cfn-macros.h \
+ c-family/c-target-hooks-def.h params.list params.options case-cfn-macros.h \
cfn-operators.pd
#\f
@@ -3328,6 +3328,13 @@ s-params.list: $(srcdir)/params-list.h $(srcdir)/params.def
$(SHELL) $(srcdir)/../move-if-change tmp-params.list params.list
$(STAMP) s-params.list
+params.options: s-params.options; @true
+s-params.options: $(srcdir)/params-options.h $(srcdir)/params.def
+ $(CPP) $(srcdir)/params-options.h | sed 's/^#.*//;/^$$/d' > tmp-params.options
+ $(SHELL) $(srcdir)/../move-if-change tmp-params.options params.options
+ $(STAMP) s-params.options
+
+
PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
toplev.h $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) $(HASH_TABLE_H) \
tree-ssa-alias.h $(INTERNAL_FN_H) gimple-fold.h tree-eh.h gimple-expr.h \
diff --git a/gcc/params-options.h b/gcc/params-options.h
new file mode 100644
index 0000000..44bb3c2
--- /dev/null
+++ b/gcc/params-options.h
@@ -0,0 +1,27 @@
+/* File used to generate params.list
+ Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#define DEFPARAM(enumerator, option, nocmsgid, default, min, max) \
+ option=default,min,max
+#define DEFPARAMENUM5(enumerator, option, nocmsgid, default, \
+ v0, v1, v2, v3, v4) \
+ option=v0,v1,v2,v3,v4
+#include "params.def"
+#undef DEFPARAM
+#undef DEFPARAMENUM5
diff --git a/gcc/testsuite/gcc.dg/params/blocksort-part.c b/gcc/testsuite/gcc.dg/params/blocksort-part.c
new file mode 100644
index 0000000..0eef2f3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/blocksort-part.c
@@ -0,0 +1,706 @@
+
+/*-------------------------------------------------------------*/
+/*--- Block sorting machinery ---*/
+/*--- blocksort.c ---*/
+/*-------------------------------------------------------------*/
+
+/* ------------------------------------------------------------------
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+
+ This program is released under the terms of the license contained
+ in the file LICENSE.
+ ------------------------------------------------------------------ */
+
+typedef char Char;
+typedef unsigned char Bool;
+typedef unsigned char UChar;
+typedef int Int32;
+typedef unsigned int UInt32;
+typedef short Int16;
+typedef unsigned short UInt16;
+
+#define True ((Bool)1)
+#define False ((Bool)0)
+
+#define BZ_M_IDLE 1
+#define BZ_M_RUNNING 2
+#define BZ_M_FLUSHING 3
+#define BZ_M_FINISHING 4
+
+#define BZ_S_OUTPUT 1
+#define BZ_S_INPUT 2
+
+#define BZ_N_RADIX 2
+#define BZ_N_QSORT 12
+#define BZ_N_SHELL 18
+#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)
+
+/*---------------------------------------------*/
+/*--- Fallback O(N log(N)^2) sorting ---*/
+/*--- algorithm, for repetitive blocks ---*/
+/*---------------------------------------------*/
+
+/*---------------------------------------------*/
+void fallbackSimpleSort ( UInt32* fmap,
+ UInt32* eclass,
+ Int32 lo,
+ Int32 hi )
+{
+ Int32 i, j, tmp;
+ UInt32 ec_tmp;
+
+ if (lo == hi) return;
+
+ if (hi - lo > 3) {
+ for ( i = hi-4; i >= lo; i-- ) {
+ tmp = fmap[i];
+ ec_tmp = eclass[tmp];
+ for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
+ fmap[j-4] = fmap[j];
+ fmap[j-4] = tmp;
+ }
+ }
+
+ for ( i = hi-1; i >= lo; i-- ) {
+ tmp = fmap[i];
+ ec_tmp = eclass[tmp];
+ for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
+ fmap[j-1] = fmap[j];
+ fmap[j-1] = tmp;
+ }
+}
+
+
+/*---------------------------------------------*/
+#define fswap(zz1, zz2) \
+ { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
+
+#define fvswap(zzp1, zzp2, zzn) \
+{ \
+ Int32 yyp1 = (zzp1); \
+ Int32 yyp2 = (zzp2); \
+ Int32 yyn = (zzn); \
+ while (yyn > 0) { \
+ fswap(fmap[yyp1], fmap[yyp2]); \
+ yyp1++; yyp2++; yyn--; \
+ } \
+}
+
+
+#define fmin(a,b) ((a) < (b)) ? (a) : (b)
+
+#define fpush(lz,hz) { stackLo[sp] = lz; \
+ stackHi[sp] = hz; \
+ sp++; }
+
+#define fpop(lz,hz) { sp--; \
+ lz = stackLo[sp]; \
+ hz = stackHi[sp]; }
+
+#define FALLBACK_QSORT_SMALL_THRESH 10
+#define FALLBACK_QSORT_STACK_SIZE 100
+
+
+void fallbackQSort3 ( UInt32* fmap,
+ UInt32* eclass,
+ Int32 loSt,
+ Int32 hiSt )
+{
+ Int32 unLo, unHi, ltLo, gtHi, n, m;
+ Int32 sp, lo, hi;
+ UInt32 med, r, r3;
+ Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];
+ Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];
+
+ r = 0;
+
+ sp = 0;
+ fpush ( loSt, hiSt );
+
+ while (sp > 0) {
+
+ fpop ( lo, hi );
+ if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
+ fallbackSimpleSort ( fmap, eclass, lo, hi );
+ continue;
+ }
+
+ /* Random partitioning. Median of 3 sometimes fails to
+ avoid bad cases. Median of 9 seems to help but
+ looks rather expensive. This too seems to work but
+ is cheaper. Guidance for the magic constants
+ 7621 and 32768 is taken from Sedgewick's algorithms
+ book, chapter 35.
+ */
+ r = ((r * 7621) + 1) % 32768;
+ r3 = r % 3;
+ if (r3 == 0) med = eclass[fmap[lo]]; else
+ if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else
+ med = eclass[fmap[hi]];
+
+ unLo = ltLo = lo;
+ unHi = gtHi = hi;
+
+ while (1) {
+ while (1) {
+ if (unLo > unHi) break;
+ n = (Int32)eclass[fmap[unLo]] - (Int32)med;
+ if (n == 0) {
+ fswap(fmap[unLo], fmap[ltLo]);
+ ltLo++; unLo++;
+ continue;
+ };
+ if (n > 0) break;
+ unLo++;
+ }
+ while (1) {
+ if (unLo > unHi) break;
+ n = (Int32)eclass[fmap[unHi]] - (Int32)med;
+ if (n == 0) {
+ fswap(fmap[unHi], fmap[gtHi]);
+ gtHi--; unHi--;
+ continue;
+ };
+ if (n < 0) break;
+ unHi--;
+ }
+ if (unLo > unHi) break;
+ fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;
+ }
+
+ if (gtHi < ltLo) continue;
+
+ n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);
+ m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);
+
+ n = lo + unLo - ltLo - 1;
+ m = hi - (gtHi - unHi) + 1;
+
+ if (n - lo > hi - m) {
+ fpush ( lo, n );
+ fpush ( m, hi );
+ } else {
+ fpush ( m, hi );
+ fpush ( lo, n );
+ }
+ }
+}
+
+#undef fmin
+#undef fpush
+#undef fpop
+#undef fswap
+#undef fvswap
+#undef FALLBACK_QSORT_SMALL_THRESH
+#undef FALLBACK_QSORT_STACK_SIZE
+
+
+/*---------------------------------------------*/
+/* Pre:
+ nblock > 0
+ eclass exists for [0 .. nblock-1]
+ ((UChar*)eclass) [0 .. nblock-1] holds block
+ ptr exists for [0 .. nblock-1]
+
+ Post:
+ ((UChar*)eclass) [0 .. nblock-1] holds block
+ All other areas of eclass destroyed
+ fmap [0 .. nblock-1] holds sorted order
+ bhtab [ 0 .. 2+(nblock/32) ] destroyed
+*/
+
+#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
+#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
+#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
+#define WORD_BH(zz) bhtab[(zz) >> 5]
+#define UNALIGNED_BH(zz) ((zz) & 0x01f)
+
+void fallbackSort ( UInt32* fmap,
+ UInt32* eclass,
+ UInt32* bhtab,
+ Int32 nblock,
+ Int32 verb )
+{
+ Int32 ftab[257];
+ Int32 ftabCopy[256];
+ Int32 H, i, j, k, l, r, cc, cc1;
+ Int32 nNotDone;
+ Int32 nBhtab;
+ UChar* eclass8 = (UChar*)eclass;
+
+ /*--
+ Initial 1-char radix sort to generate
+ initial fmap and initial BH bits.
+ --*/
+ for (i = 0; i < 257; i++) ftab[i] = 0;
+ for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
+ for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
+ for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
+
+ for (i = 0; i < nblock; i++) {
+ j = eclass8[i];
+ k = ftab[j] - 1;
+ ftab[j] = k;
+ fmap[k] = i;
+ }
+
+ nBhtab = 2 + (nblock / 32);
+ for (i = 0; i < nBhtab; i++) bhtab[i] = 0;
+ for (i = 0; i < 256; i++) SET_BH(ftab[i]);
+
+ /*--
+ Inductively refine the buckets. Kind-of an
+ "exponential radix sort" (!), inspired by the
+ Manber-Myers suffix array construction algorithm.
+ --*/
+
+ /*-- set sentinel bits for block-end detection --*/
+ for (i = 0; i < 32; i++) {
+ SET_BH(nblock + 2*i);
+ CLEAR_BH(nblock + 2*i + 1);
+ }
+
+ /*-- the log(N) loop --*/
+ H = 1;
+ while (1) {
+
+
+ j = 0;
+ for (i = 0; i < nblock; i++) {
+ if (ISSET_BH(i)) j = i;
+ k = fmap[i] - H; if (k < 0) k += nblock;
+ eclass[k] = j;
+ }
+
+ nNotDone = 0;
+ r = -1;
+ while (1) {
+
+ /*-- find the next non-singleton bucket --*/
+ k = r + 1;
+ while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
+ if (ISSET_BH(k)) {
+ while (WORD_BH(k) == 0xffffffff) k += 32;
+ while (ISSET_BH(k)) k++;
+ }
+ l = k - 1;
+ if (l >= nblock) break;
+ while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++;
+ if (!ISSET_BH(k)) {
+ while (WORD_BH(k) == 0x00000000) k += 32;
+ while (!ISSET_BH(k)) k++;
+ }
+ r = k - 1;
+ if (r >= nblock) break;
+
+ /*-- now [l, r] bracket current bucket --*/
+ if (r > l) {
+ nNotDone += (r - l + 1);
+ fallbackQSort3 ( fmap, eclass, l, r );
+
+ /*-- scan bucket and generate header bits-- */
+ cc = -1;
+ for (i = l; i <= r; i++) {
+ cc1 = eclass[fmap[i]];
+ if (cc != cc1) { SET_BH(i); cc = cc1; };
+ }
+ }
+ }
+
+ H *= 2;
+ if (H > nblock || nNotDone == 0) break;
+ }
+
+ /*--
+ Reconstruct the original block in
+ eclass8 [0 .. nblock-1], since the
+ previous phase destroyed it.
+ --*/
+ j = 0;
+ for (i = 0; i < nblock; i++) {
+ while (ftabCopy[j] == 0) j++;
+ ftabCopy[j]--;
+ eclass8[fmap[i]] = (UChar)j;
+ }
+}
+
+#undef SET_BH
+#undef CLEAR_BH
+#undef ISSET_BH
+#undef WORD_BH
+#undef UNALIGNED_BH
+
+
+/*---------------------------------------------*/
+/*--- The main, O(N^2 log(N)) sorting ---*/
+/*--- algorithm. Faster for "normal" ---*/
+/*--- non-repetitive blocks. ---*/
+/*---------------------------------------------*/
+
+/*---------------------------------------------*/
+Bool mainGtU ( UInt32 i1,
+ UInt32 i2,
+ UChar* block,
+ UInt16* quadrant,
+ UInt32 nblock,
+ Int32* budget )
+{
+ Int32 k;
+ UChar c1, c2;
+ UInt16 s1, s2;
+
+ /* 1 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 2 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 3 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 4 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 5 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 6 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 7 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 8 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 9 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 10 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 11 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 12 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+
+ k = nblock + 8;
+
+ do {
+ /* 1 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 2 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 3 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 4 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 5 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 6 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 7 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 8 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+
+ if (i1 >= nblock) i1 -= nblock;
+ if (i2 >= nblock) i2 -= nblock;
+
+ k -= 8;
+ (*budget)--;
+ }
+ while (k >= 0);
+
+ return False;
+}
+
+
+/*---------------------------------------------*/
+/*--
+ Knuth's increments seem to work better
+ than Incerpi-Sedgewick here. Possibly
+ because the number of elems to sort is
+ usually small, typically <= 20.
+--*/
+Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
+ 9841, 29524, 88573, 265720,
+ 797161, 2391484 };
+
+void mainSimpleSort ( UInt32* ptr,
+ UChar* block,
+ UInt16* quadrant,
+ Int32 nblock,
+ Int32 lo,
+ Int32 hi,
+ Int32 d,
+ Int32* budget )
+{
+ Int32 i, j, h, bigN, hp;
+ UInt32 v;
+
+ bigN = hi - lo + 1;
+ if (bigN < 2) return;
+
+ hp = 0;
+ while (incs[hp] < bigN) hp++;
+ hp--;
+
+ for (; hp >= 0; hp--) {
+ h = incs[hp];
+
+ i = lo + h;
+ while (True) {
+
+ /*-- copy 1 --*/
+ if (i > hi) break;
+ v = ptr[i];
+ j = i;
+ while ( mainGtU (
+ ptr[j-h]+d, v+d, block, quadrant, nblock, budget
+ ) ) {
+ ptr[j] = ptr[j-h];
+ j = j - h;
+ if (j <= (lo + h - 1)) break;
+ }
+ ptr[j] = v;
+ i++;
+
+ /*-- copy 2 --*/
+ if (i > hi) break;
+ v = ptr[i];
+ j = i;
+ while ( mainGtU (
+ ptr[j-h]+d, v+d, block, quadrant, nblock, budget
+ ) ) {
+ ptr[j] = ptr[j-h];
+ j = j - h;
+ if (j <= (lo + h - 1)) break;
+ }
+ ptr[j] = v;
+ i++;
+
+ /*-- copy 3 --*/
+ if (i > hi) break;
+ v = ptr[i];
+ j = i;
+ while ( mainGtU (
+ ptr[j-h]+d, v+d, block, quadrant, nblock, budget
+ ) ) {
+ ptr[j] = ptr[j-h];
+ j = j - h;
+ if (j <= (lo + h - 1)) break;
+ }
+ ptr[j] = v;
+ i++;
+
+ if (*budget < 0) return;
+ }
+ }
+}
+
+
+/*---------------------------------------------*/
+/*--
+ The following is an implementation of
+ an elegant 3-way quicksort for strings,
+ described in a paper "Fast Algorithms for
+ Sorting and Searching Strings", by Robert
+ Sedgewick and Jon L. Bentley.
+--*/
+
+#define mswap(zz1, zz2) \
+ { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
+
+#define mvswap(zzp1, zzp2, zzn) \
+{ \
+ Int32 yyp1 = (zzp1); \
+ Int32 yyp2 = (zzp2); \
+ Int32 yyn = (zzn); \
+ while (yyn > 0) { \
+ mswap(ptr[yyp1], ptr[yyp2]); \
+ yyp1++; yyp2++; yyn--; \
+ } \
+}
+
+UChar mmed3 ( UChar a, UChar b, UChar c )
+{
+ UChar t;
+ if (a > b) { t = a; a = b; b = t; };
+ if (b > c) {
+ b = c;
+ if (a > b) b = a;
+ }
+ return b;
+}
+
+#define mmin(a,b) ((a) < (b)) ? (a) : (b)
+
+#define mpush(lz,hz,dz) { stackLo[sp] = lz; \
+ stackHi[sp] = hz; \
+ stackD [sp] = dz; \
+ sp++; }
+
+#define mpop(lz,hz,dz) { sp--; \
+ lz = stackLo[sp]; \
+ hz = stackHi[sp]; \
+ dz = stackD [sp]; }
+
+
+#define mnextsize(az) (nextHi[az]-nextLo[az])
+
+#define mnextswap(az,bz) \
+ { Int32 tz; \
+ tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \
+ tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \
+ tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
+
+
+#define MAIN_QSORT_SMALL_THRESH 20
+#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)
+#define MAIN_QSORT_STACK_SIZE 100
+
+void mainQSort3 ( UInt32* ptr,
+ UChar* block,
+ UInt16* quadrant,
+ Int32 nblock,
+ Int32 loSt,
+ Int32 hiSt,
+ Int32 dSt,
+ Int32* budget )
+{
+ Int32 unLo, unHi, ltLo, gtHi, n, m, med;
+ Int32 sp, lo, hi, d;
+
+ Int32 stackLo[MAIN_QSORT_STACK_SIZE];
+ Int32 stackHi[MAIN_QSORT_STACK_SIZE];
+ Int32 stackD [MAIN_QSORT_STACK_SIZE];
+
+ Int32 nextLo[3];
+ Int32 nextHi[3];
+ Int32 nextD [3];
+
+ sp = 0;
+ mpush ( loSt, hiSt, dSt );
+
+ while (sp > 0) {
+
+ mpop ( lo, hi, d );
+ if (hi - lo < MAIN_QSORT_SMALL_THRESH ||
+ d > MAIN_QSORT_DEPTH_THRESH) {
+ mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );
+ if (*budget < 0) return;
+ continue;
+ }
+
+ med = (Int32)
+ mmed3 ( block[ptr[ lo ]+d],
+ block[ptr[ hi ]+d],
+ block[ptr[ (lo+hi)>>1 ]+d] );
+
+ unLo = ltLo = lo;
+ unHi = gtHi = hi;
+
+ while (True) {
+ while (True) {
+ if (unLo > unHi) break;
+ n = ((Int32)block[ptr[unLo]+d]) - med;
+ if (n == 0) {
+ mswap(ptr[unLo], ptr[ltLo]);
+ ltLo++; unLo++; continue;
+ };
+ if (n > 0) break;
+ unLo++;
+ }
+ while (True) {
+ if (unLo > unHi) break;
+ n = ((Int32)block[ptr[unHi]+d]) - med;
+ if (n == 0) {
+ mswap(ptr[unHi], ptr[gtHi]);
+ gtHi--; unHi--; continue;
+ };
+ if (n < 0) break;
+ unHi--;
+ }
+ if (unLo > unHi) break;
+ mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;
+ }
+
+ if (gtHi < ltLo) {
+ mpush(lo, hi, d+1 );
+ continue;
+ }
+
+ n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);
+ m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);
+
+ n = lo + unLo - ltLo - 1;
+ m = hi - (gtHi - unHi) + 1;
+
+ nextLo[0] = lo; nextHi[0] = n; nextD[0] = d;
+ nextLo[1] = m; nextHi[1] = hi; nextD[1] = d;
+ nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;
+
+ if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
+ if (mnextsize(1) < mnextsize(2)) mnextswap(1,2);
+ if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
+
+
+ mpush (nextLo[0], nextHi[0], nextD[0]);
+ mpush (nextLo[1], nextHi[1], nextD[1]);
+ mpush (nextLo[2], nextHi[2], nextD[2]);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/params/params.exp b/gcc/testsuite/gcc.dg/params/params.exp
new file mode 100644
index 0000000..f2f397e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/params.exp
@@ -0,0 +1,64 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# Initialize `dg'.
+dg-init
+
+proc param_run_test { param_name param_value } {
+ global srcdir
+ global subdir
+
+ dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
+}
+
+set fd [open "$objdir/../../params.options" r]
+set text [read $fd]
+close $fd
+
+# Main loop.
+foreach params [split $text "\n"] {
+ set parts [split $params "="]
+ set name [string trim [lindex $parts 0] '"']
+ set values [split [lindex $parts 1] ","]
+ if { [llength $values] == 3 } {
+ set default [lindex $values 0]
+ set min [lindex $values 1]
+ set max [lindex $values 2]
+ set int_max "INT_MAX"
+
+ if { $min != -1 } {
+ param_run_test $name $min
+ }
+ if { $max != $min && $max > 0 && $max != $int_max } {
+ param_run_test $name $max
+ }
+ }
+ if { [llength $values] == 5 } {
+ foreach v $values {
+ param_run_test $name $v
+ }
+ }
+}
+
+# All done.
+dg-finish
--
2.8.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-08 12:48 ` [RFC, v2] " Martin Liška
@ 2016-07-11 14:48 ` Jeff Law
2016-07-12 12:14 ` Martin Liška
2016-07-15 7:22 ` Thomas Schwinge
2016-07-15 10:01 ` Andreas Schwab
2 siblings, 1 reply; 12+ messages in thread
From: Jeff Law @ 2016-07-11 14:48 UTC (permalink / raw)
To: Martin Liška, gcc-patches; +Cc: Jakub Jelinek
On 07/08/2016 06:47 AM, Martin Liška wrote:
> Hi.
>
> This is my second attempt of the patch where I generate all tests on fly.
> Firstly, params-options.h is used to generate a list of options in form of:
>
> "predictable-branch-outcome"=2,0,50
> "inline-min-speedup"=10,0,0
> "max-inline-insns-single"=400,0,0
> ...
>
> The list is then loaded in params.ext which triggers dg-runtest.
> I've also swapped the tested source file to a part of bzip2 compression algorithm.
>
> Now the testing runs 1m20s (w/ -O3) and 0m58s (w/ -O2).
> Hope it's much better?
>
> Martin
>
>
> 0001-Add-tests-that-test-boundary-values-of-params-v2.patch
>
>
> From f84ce7be4a998089541fb4512e19f54a4ec25cf6 Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Fri, 8 Jul 2016 10:59:24 +0200
> Subject: [PATCH] Add tests that test boundary values of params
>
> gcc/ChangeLog:
>
> 2016-07-08 Martin Liska <mliska@suse.cz>
>
> * Makefile.in: Append rule for params-options.h.
> * params-options.h: New file.
>
> gcc/testsuite/ChangeLog:
>
> 2016-07-08 Martin Liska <mliska@suse.cz>
>
> * gcc.dg/params/blocksort-part.c: New test.
> * gcc.dg/params/params.exp: New file.
Seems reasonable to me -- OK for the trunk, but please be on the lookout
for these tests failing on other targets.
jeff
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-11 14:48 ` Jeff Law
@ 2016-07-12 12:14 ` Martin Liška
0 siblings, 0 replies; 12+ messages in thread
From: Martin Liška @ 2016-07-12 12:14 UTC (permalink / raw)
To: Jeff Law, gcc-patches; +Cc: Jakub Jelinek
On 07/11/2016 04:48 PM, Jeff Law wrote:
> Seems reasonable to me -- OK for the trunk, but please be on the lookout for these tests failing on other targets.
>
> jeff
Thanks, the patch also works on a ppc64le-linux-gnu system.
I'm going to install the patch after I'll install fix for:
https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00416.html
Otherwise, I would introduce new FAILs.
Martin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-08 12:48 ` [RFC, v2] " Martin Liška
2016-07-11 14:48 ` Jeff Law
@ 2016-07-15 7:22 ` Thomas Schwinge
2016-07-18 7:53 ` Martin Liška
2016-07-15 10:01 ` Andreas Schwab
2 siblings, 1 reply; 12+ messages in thread
From: Thomas Schwinge @ 2016-07-15 7:22 UTC (permalink / raw)
To: Martin Liška; +Cc: Jakub Jelinek, Jeff Law, gcc-patches, Joseph Myers
[-- Attachment #1: Type: text/plain, Size: 6224 bytes --]
Hi!
On Fri, 8 Jul 2016 14:47:46 +0200, Martin Liška <mliska@suse.cz> wrote:
> From f84ce7be4a998089541fb4512e19f54a4ec25cf6 Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Fri, 8 Jul 2016 10:59:24 +0200
> Subject: [PATCH] Add tests that test boundary values of params
This became r238249. Yay for pushing testing boundaries; next is some
fuzzy testing for GCC? ;-D
> gcc/ChangeLog:
>
> 2016-07-08 Martin Liska <mliska@suse.cz>
>
> * Makefile.in: Append rule for params-options.h.
> * params-options.h: New file.
>
> gcc/testsuite/ChangeLog:
>
> 2016-07-08 Martin Liska <mliska@suse.cz>
>
> * gcc.dg/params/blocksort-part.c: New test.
> * gcc.dg/params/params.exp: New file.
:-/ (GNU-style ChangeLogs are just so useful... not.)
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/params/blocksort-part.c
> @@ -0,0 +1,706 @@
> +
> +/*-------------------------------------------------------------*/
> +/*--- Block sorting machinery ---*/
> +/*--- blocksort.c ---*/
> +/*-------------------------------------------------------------*/
> +
> +/* ------------------------------------------------------------------
> + This file is part of bzip2/libbzip2, a program and library for
> + lossless, block-sorting data compression.
> +
> + bzip2/libbzip2 version 1.0.6 of 6 September 2010
> + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
> +
> + Please read the WARNING, DISCLAIMER and PATENTS sections in the
> + README file.
> +
> + This program is released under the terms of the license contained
> + in the file LICENSE.
> +[...]
Are there any issues with including that file without the
accompanying/referenced README and LICENSE files?
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/params/params.exp
> @@ -0,0 +1,64 @@
> +[...]
> +# GCC testsuite that uses the `dg.exp' driver.
> +
> +# Load support procs.
> +load_lib gcc-dg.exp
> +
> +# Initialize `dg'.
> +dg-init
> +
> +proc param_run_test { param_name param_value } {
> + global srcdir
> + global subdir
> +
> + dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
> +}
> +
> +set fd [open "$objdir/../../params.options" r]
(I do understand what you're doing there, but) is it kosher to refer to a
file from GCC's build tree inside the test suite? I thought the idea was
that you could run the testsuite without the build tree being available
-- as much that's possible. As far as I remember there are a few
exception to this rule already, so maybe adding one more is not much of a
problem. ;-) (I do know that for our internal testing we have a list of
files that need to be preserved from the GCC build directory for later
testing without the build directory being available; so I'll add this
file to the list; Joseph CCed in case he has some additional comments
after returning from his vacations.)
<http://news.gmane.org/find-root.php?message_id=%3C201607141327.u6EDRKGV028717%40toolchainslave5.caveonetworks.com%3E>
shows one instance of the problem, that I could quickly find:
[...]
ERROR: tcl error sourcing /home/jenkins/workspace/BuildToolchainThunder_elf_test_upstream/toolchain/src/gcc/testsuite/gcc.dg/params/params.exp.
ERROR: couldn't open "/home/jenkins/workspace/BuildToolchainThunder_elf_test_upstream/toolchain/testresults/aarch64-thunderx-elf/../../params.options": no such file or directory
[...]
> +set text [read $fd]
> +close $fd
> +
> +# Main loop.
> +foreach params [split $text "\n"] {
> + set parts [split $params "="]
> + set name [string trim [lindex $parts 0] '"']
> + set values [split [lindex $parts 1] ","]
> + if { [llength $values] == 3 } {
> + set default [lindex $values 0]
> + set min [lindex $values 1]
> + set max [lindex $values 2]
> + set int_max "INT_MAX"
> +
> + if { $min != -1 } {
> + param_run_test $name $min
> + }
> + if { $max != $min && $max > 0 && $max != $int_max } {
> + param_run_test $name $max
> + }
> + }
> + if { [llength $values] == 5 } {
> + foreach v $values {
> + param_run_test $name $v
> + }
> + }
> +}
This produces ambiguous test result lines:
Running /scratch/tschwing/nvidiak20-2/gcc/trunk-light/source-gcc/gcc/testsuite/gcc.dg/params/params.exp ...
PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
[many more]
OK to fix this as follows:
PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=0 (test for excess errors)
PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=50 (test for excess errors)
PASS: gcc.dg/params/blocksort-part.c -O3 --param inline-min-speedup=0 (test for excess errors)
PASS: gcc.dg/params/blocksort-part.c -O3 --param max-inline-insns-single=0 (test for excess errors)
[...]
commit ae350ce9af062d7d2c05225280596b1bc982728b
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri Jul 15 09:13:19 2016 +0200
Disambiguate gcc.dg/params/params.exp test results
gcc/testsuite/
* gcc.dg/params/params.exp (param_run_test): Swap flags and
default-extra-flags arguments when calling dg-runtest.
---
gcc/testsuite/gcc.dg/params/params.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git gcc/testsuite/gcc.dg/params/params.exp gcc/testsuite/gcc.dg/params/params.exp
index f2f397e..dd82a5d 100644
--- gcc/testsuite/gcc.dg/params/params.exp
+++ gcc/testsuite/gcc.dg/params/params.exp
@@ -28,7 +28,7 @@ proc param_run_test { param_name param_value } {
global srcdir
global subdir
- dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
+ dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
}
set fd [open "$objdir/../../params.options" r]
Grüße
Thomas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-08 12:48 ` [RFC, v2] " Martin Liška
2016-07-11 14:48 ` Jeff Law
2016-07-15 7:22 ` Thomas Schwinge
@ 2016-07-15 10:01 ` Andreas Schwab
2 siblings, 0 replies; 12+ messages in thread
From: Andreas Schwab @ 2016-07-15 10:01 UTC (permalink / raw)
To: Martin Liška; +Cc: gcc-patches, Jakub Jelinek
Martin Liška <mliska@suse.cz> writes:
> This is my second attempt of the patch where I generate all tests on fly.
> Firstly, params-options.h is used to generate a list of options in form of:
>
> "predictable-branch-outcome"=2,0,50
> "inline-min-speedup"=10,0,0
> "max-inline-insns-single"=400,0,0
> ...
>
> The list is then loaded in params.ext which triggers dg-runtest.
> I've also swapped the tested source file to a part of bzip2 compression algorithm.
>
> Now the testing runs 1m20s (w/ -O3) and 0m58s (w/ -O2).
> Hope it's much better?
That generates 231 identically named tests, which is bad. All tests
must have unique titles.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-15 7:22 ` Thomas Schwinge
@ 2016-07-18 7:53 ` Martin Liška
2016-07-21 18:53 ` Jeff Law
2016-07-28 21:27 ` Joseph Myers
0 siblings, 2 replies; 12+ messages in thread
From: Martin Liška @ 2016-07-18 7:53 UTC (permalink / raw)
To: Thomas Schwinge
Cc: Jakub Jelinek, Jeff Law, gcc-patches, Joseph Myers, Andreas Schwab
[-- Attachment #1: Type: text/plain, Size: 7147 bytes --]
On 07/15/2016 09:22 AM, Thomas Schwinge wrote:
> Hi!
>
> On Fri, 8 Jul 2016 14:47:46 +0200, Martin Liška <mliska@suse.cz> wrote:
>> From f84ce7be4a998089541fb4512e19f54a4ec25cf6 Mon Sep 17 00:00:00 2001
>> From: marxin <mliska@suse.cz>
>> Date: Fri, 8 Jul 2016 10:59:24 +0200
>> Subject: [PATCH] Add tests that test boundary values of params
>
> This became r238249. Yay for pushing testing boundaries; next is some
> fuzzy testing for GCC? ;-D
>
>> gcc/ChangeLog:
>>
>> 2016-07-08 Martin Liska <mliska@suse.cz>
>>
>> * Makefile.in: Append rule for params-options.h.
>> * params-options.h: New file.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2016-07-08 Martin Liska <mliska@suse.cz>
>>
>> * gcc.dg/params/blocksort-part.c: New test.
>> * gcc.dg/params/params.exp: New file.
>
> :-/ (GNU-style ChangeLogs are just so useful... not.)
>
>> --- /dev/null
>> +++ b/gcc/testsuite/gcc.dg/params/blocksort-part.c
>> @@ -0,0 +1,706 @@
>> +
>> +/*-------------------------------------------------------------*/
>> +/*--- Block sorting machinery ---*/
>> +/*--- blocksort.c ---*/
>> +/*-------------------------------------------------------------*/
>> +
>> +/* ------------------------------------------------------------------
>> + This file is part of bzip2/libbzip2, a program and library for
>> + lossless, block-sorting data compression.
>> +
>> + bzip2/libbzip2 version 1.0.6 of 6 September 2010
>> + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
>> +
>> + Please read the WARNING, DISCLAIMER and PATENTS sections in the
>> + README file.
>> +
>> + This program is released under the terms of the license contained
>> + in the file LICENSE.
>> +[...]
>
Hi Thomas.
> Are there any issues with including that file without the
> accompanying/referenced README and LICENSE files?
Sure, I'll include these files.
>
>> --- /dev/null
>> +++ b/gcc/testsuite/gcc.dg/params/params.exp
>> @@ -0,0 +1,64 @@
>> +[...]
>> +# GCC testsuite that uses the `dg.exp' driver.
>> +
>> +# Load support procs.
>> +load_lib gcc-dg.exp
>> +
>> +# Initialize `dg'.
>> +dg-init
>> +
>> +proc param_run_test { param_name param_value } {
>> + global srcdir
>> + global subdir
>> +
>> + dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
>> +}
>> +
>> +set fd [open "$objdir/../../params.options" r]
>
> (I do understand what you're doing there, but) is it kosher to refer to a
> file from GCC's build tree inside the test suite? I thought the idea was
> that you could run the testsuite without the build tree being available
> -- as much that's possible. As far as I remember there are a few
> exception to this rule already, so maybe adding one more is not much of a
> problem. ;-) (I do know that for our internal testing we have a list of
> files that need to be preserved from the GCC build directory for later
> testing without the build directory being available; so I'll add this
> file to the list; Joseph CCed in case he has some additional comments
> after returning from his vacations.)
>
> <http://news.gmane.org/find-root.php?message_id=%3C201607141327.u6EDRKGV028717%40toolchainslave5.caveonetworks.com%3E>
> shows one instance of the problem, that I could quickly find:
>
> [...]
> ERROR: tcl error sourcing /home/jenkins/workspace/BuildToolchainThunder_elf_test_upstream/toolchain/src/gcc/testsuite/gcc.dg/params/params.exp.
> ERROR: couldn't open "/home/jenkins/workspace/BuildToolchainThunder_elf_test_upstream/toolchain/testresults/aarch64-thunderx-elf/../../params.options": no such file or directory
> [...]
You are right, I was inspired by what we do for GCC plugins in:
gcc/testsuite/lib/plugin-support.exp
where we have following comment:
# Note that the plugin test support currently only works when the GCC
# build tree is available. (We make sure that is the case in plugin.exp.)
# Once we have figured out how/where to package/install GCC header files
# for general plugin support, we should modify the following include paths
# accordingly.
Well, I can imaging a guard which will test whether "$objdir/../../params.options" file exits,
and if so, then the tests are executed? Is it acceptable approach?
>
>> +set text [read $fd]
>> +close $fd
>> +
>> +# Main loop.
>> +foreach params [split $text "\n"] {
>> + set parts [split $params "="]
>> + set name [string trim [lindex $parts 0] '"']
>> + set values [split [lindex $parts 1] ","]
>> + if { [llength $values] == 3 } {
>> + set default [lindex $values 0]
>> + set min [lindex $values 1]
>> + set max [lindex $values 2]
>> + set int_max "INT_MAX"
>> +
>> + if { $min != -1 } {
>> + param_run_test $name $min
>> + }
>> + if { $max != $min && $max > 0 && $max != $int_max } {
>> + param_run_test $name $max
>> + }
>> + }
>> + if { [llength $values] == 5 } {
>> + foreach v $values {
>> + param_run_test $name $v
>> + }
>> + }
>> +}
>
> This produces ambiguous test result lines:
>
> Running /scratch/tschwing/nvidiak20-2/gcc/trunk-light/source-gcc/gcc/testsuite/gcc.dg/params/params.exp ...
> PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
> [many more]
>
> OK to fix this as follows:
>
> PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=0 (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=50 (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c -O3 --param inline-min-speedup=0 (test for excess errors)
> PASS: gcc.dg/params/blocksort-part.c -O3 --param max-inline-insns-single=0 (test for excess errors)
> [...]
>
> commit ae350ce9af062d7d2c05225280596b1bc982728b
> Author: Thomas Schwinge <thomas@codesourcery.com>
> Date: Fri Jul 15 09:13:19 2016 +0200
>
> Disambiguate gcc.dg/params/params.exp test results
>
> gcc/testsuite/
> * gcc.dg/params/params.exp (param_run_test): Swap flags and
> default-extra-flags arguments when calling dg-runtest.
> ---
> gcc/testsuite/gcc.dg/params/params.exp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git gcc/testsuite/gcc.dg/params/params.exp gcc/testsuite/gcc.dg/params/params.exp
> index f2f397e..dd82a5d 100644
> --- gcc/testsuite/gcc.dg/params/params.exp
> +++ gcc/testsuite/gcc.dg/params/params.exp
> @@ -28,7 +28,7 @@ proc param_run_test { param_name param_value } {
> global srcdir
> global subdir
>
> - dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
> + dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
> }
>
> set fd [open "$objdir/../../params.options" r]
>
>
> GrüÃe
> Thomas
>
Thanks for the patch, that's probably the same problem that Andreas spotted.
I'm sending candidate patch.
Martin
[-- Attachment #2: 0001-Fix-params.exp-test-cases.patch --]
[-- Type: text/x-patch, Size: 11605 bytes --]
From d5e3c5cb20306352af7f45cd827669b7ff51a709 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 18 Jul 2016 09:50:12 +0200
Subject: [PATCH] Fix params.exp test-cases
gcc/testsuite/ChangeLog:
2016-07-18 Thomas Schwinge <thomas@codesourcery.com>
Martin Liska <mliska@suse.cz>
* gcc.dg/params/LICENSE: Add missing LICENSE that is mentioned
in a source file.
* gcc.dg/params/README: Same for the README.
* gcc.dg/params/params.exp (param_run_test): Swap flags and
default-extra-flags arguments when calling dg-runtest.
---
gcc/testsuite/gcc.dg/params/LICENSE | 42 +++++++
gcc/testsuite/gcc.dg/params/README | 215 +++++++++++++++++++++++++++++++++
gcc/testsuite/gcc.dg/params/params.exp | 2 +-
3 files changed, 258 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.dg/params/LICENSE
create mode 100644 gcc/testsuite/gcc.dg/params/README
diff --git a/gcc/testsuite/gcc.dg/params/LICENSE b/gcc/testsuite/gcc.dg/params/LICENSE
new file mode 100644
index 0000000..cc61417
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/LICENSE
@@ -0,0 +1,42 @@
+
+--------------------------------------------------------------------------
+
+This program, "bzip2", the associated library "libbzip2", and all
+documentation, are copyright (C) 1996-2010 Julian R Seward. All
+rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. The origin of this software must not be misrepresented; you must
+ not claim that you wrote the original software. If you use this
+ software in a product, an acknowledgment in the product
+ documentation would be appreciated but is not required.
+
+3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Julian Seward, jseward@bzip.org
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
+
+--------------------------------------------------------------------------
diff --git a/gcc/testsuite/gcc.dg/params/README b/gcc/testsuite/gcc.dg/params/README
new file mode 100644
index 0000000..9fb0f63
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/README
@@ -0,0 +1,215 @@
+
+This is the README for bzip2/libzip2.
+This version is fully compatible with the previous public releases.
+
+------------------------------------------------------------------
+This file is part of bzip2/libbzip2, a program and library for
+lossless, block-sorting data compression.
+
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
+Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+
+Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
+
+This program is released under the terms of the license contained
+in the file LICENSE.
+------------------------------------------------------------------
+
+Complete documentation is available in Postscript form (manual.ps),
+PDF (manual.pdf) or html (manual.html). A plain-text version of the
+manual page is available as bzip2.txt.
+
+
+HOW TO BUILD -- UNIX
+
+Type 'make'. This builds the library libbz2.a and then the programs
+bzip2 and bzip2recover. Six self-tests are run. If the self-tests
+complete ok, carry on to installation:
+
+To install in /usr/local/bin, /usr/local/lib, /usr/local/man and
+/usr/local/include, type
+
+ make install
+
+To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type
+
+ make install PREFIX=/xxx/yyy
+
+If you are (justifiably) paranoid and want to see what 'make install'
+is going to do, you can first do
+
+ make -n install or
+ make -n install PREFIX=/xxx/yyy respectively.
+
+The -n instructs make to show the commands it would execute, but not
+actually execute them.
+
+
+HOW TO BUILD -- UNIX, shared library libbz2.so.
+
+Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for
+Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims
+that it works for any other platform, though I suspect it probably
+will work for most platforms employing both ELF and gcc.
+
+bzip2-shared, a client of the shared library, is also built, but not
+self-tested. So I suggest you also build using the normal Makefile,
+since that conducts a self-test. A second reason to prefer the
+version statically linked to the library is that, on x86 platforms,
+building shared objects makes a valuable register (%ebx) unavailable
+to gcc, resulting in a slowdown of 10%-20%, at least for bzip2.
+
+Important note for people upgrading .so's from 0.9.0/0.9.5 to version
+1.0.X. All the functions in the library have been renamed, from (eg)
+bzCompress to BZ2_bzCompress, to avoid namespace pollution.
+Unfortunately this means that the libbz2.so created by
+Makefile-libbz2_so will not work with any program which used an older
+version of the library. I do encourage library clients to make the
+effort to upgrade to use version 1.0, since it is both faster and more
+robust than previous versions.
+
+
+HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.
+
+It's difficult for me to support compilation on all these platforms.
+My approach is to collect binaries for these platforms, and put them
+on the master web site (http://www.bzip.org). Look there. However
+(FWIW), bzip2-1.0.X is very standard ANSI C and should compile
+unmodified with MS Visual C. If you have difficulties building, you
+might want to read README.COMPILATION.PROBLEMS.
+
+At least using MS Visual C++ 6, you can build from the unmodified
+sources by issuing, in a command shell:
+
+ nmake -f makefile.msc
+
+(you may need to first run the MSVC-provided script VCVARS32.BAT
+ so as to set up paths to the MSVC tools correctly).
+
+
+VALIDATION
+
+Correct operation, in the sense that a compressed file can always be
+decompressed to reproduce the original, is obviously of paramount
+importance. To validate bzip2, I used a modified version of Mark
+Nelson's churn program. Churn is an automated test driver which
+recursively traverses a directory structure, using bzip2 to compress
+and then decompress each file it encounters, and checking that the
+decompressed data is the same as the original.
+
+
+
+Please read and be aware of the following:
+
+WARNING:
+
+ This program and library (attempts to) compress data by
+ performing several non-trivial transformations on it.
+ Unless you are 100% familiar with *all* the algorithms
+ contained herein, and with the consequences of modifying them,
+ you should NOT meddle with the compression or decompression
+ machinery. Incorrect changes can and very likely *will*
+ lead to disastrous loss of data.
+
+
+DISCLAIMER:
+
+ I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE
+ USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED.
+
+ Every compression of a file implies an assumption that the
+ compressed file can be decompressed to reproduce the original.
+ Great efforts in design, coding and testing have been made to
+ ensure that this program works correctly. However, the complexity
+ of the algorithms, and, in particular, the presence of various
+ special cases in the code which occur with very low but non-zero
+ probability make it impossible to rule out the possibility of bugs
+ remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS
+ PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER
+ SMALL, THAT THE DATA WILL NOT BE RECOVERABLE.
+
+ That is not to say this program is inherently unreliable.
+ Indeed, I very much hope the opposite is true. bzip2/libbzip2
+ has been carefully constructed and extensively tested.
+
+
+PATENTS:
+
+ To the best of my knowledge, bzip2/libbzip2 does not use any
+ patented algorithms. However, I do not have the resources
+ to carry out a patent search. Therefore I cannot give any
+ guarantee of the above statement.
+
+
+
+WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ?
+
+ * Approx 10% faster compression, 30% faster decompression
+ * -t (test mode) is a lot quicker
+ * Can decompress concatenated compressed files
+ * Programming interface, so programs can directly read/write .bz2 files
+ * Less restrictive (BSD-style) licensing
+ * Flag handling more compatible with GNU gzip
+ * Much more documentation, i.e., a proper user manual
+ * Hopefully, improved portability (at least of the library)
+
+WHAT'S NEW IN 0.9.5 ?
+
+ * Compression speed is much less sensitive to the input
+ data than in previous versions. Specifically, the very
+ slow performance caused by repetitive data is fixed.
+ * Many small improvements in file and flag handling.
+ * A Y2K statement.
+
+WHAT'S NEW IN 1.0.0 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.2 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.3 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.4 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.5 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.6 ?
+
+ See the CHANGES file.
+
+
+I hope you find bzip2 useful. Feel free to contact me at
+ jseward@bzip.org
+if you have any suggestions or queries. Many people mailed me with
+comments, suggestions and patches after the releases of bzip-0.15,
+bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
+1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this
+feedback. I thank you for your comments.
+
+bzip2's "home" is http://www.bzip.org/
+
+Julian Seward
+jseward@bzip.org
+Cambridge, UK.
+
+18 July 1996 (version 0.15)
+25 August 1996 (version 0.21)
+ 7 August 1997 (bzip2, version 0.1)
+29 August 1997 (bzip2, version 0.1pl2)
+23 August 1998 (bzip2, version 0.9.0)
+ 8 June 1999 (bzip2, version 0.9.5)
+ 4 Sept 1999 (bzip2, version 0.9.5d)
+ 5 May 2000 (bzip2, version 1.0pre8)
+30 December 2001 (bzip2, version 1.0.2pre1)
+15 February 2005 (bzip2, version 1.0.3)
+20 December 2006 (bzip2, version 1.0.4)
+10 December 2007 (bzip2, version 1.0.5)
+ 6 Sept 2010 (bzip2, version 1.0.6)
diff --git a/gcc/testsuite/gcc.dg/params/params.exp b/gcc/testsuite/gcc.dg/params/params.exp
index f2f397e..dd82a5d 100644
--- a/gcc/testsuite/gcc.dg/params/params.exp
+++ b/gcc/testsuite/gcc.dg/params/params.exp
@@ -28,7 +28,7 @@ proc param_run_test { param_name param_value } {
global srcdir
global subdir
- dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
+ dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
}
set fd [open "$objdir/../../params.options" r]
--
2.8.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-18 7:53 ` Martin Liška
@ 2016-07-21 18:53 ` Jeff Law
2016-07-22 9:09 ` Martin Liška
2016-07-28 21:27 ` Joseph Myers
1 sibling, 1 reply; 12+ messages in thread
From: Jeff Law @ 2016-07-21 18:53 UTC (permalink / raw)
To: Martin Liška, Thomas Schwinge
Cc: Jakub Jelinek, gcc-patches, Joseph Myers, Andreas Schwab
On 07/18/2016 01:53 AM, Martin Liška wrote:
> You are right, I was inspired by what we do for GCC plugins in:
> gcc/testsuite/lib/plugin-support.exp
>
> where we have following comment:
> # Note that the plugin test support currently only works when the GCC
> # build tree is available. (We make sure that is the case in plugin.exp.)
> # Once we have figured out how/where to package/install GCC header files
> # for general plugin support, we should modify the following include paths
> # accordingly.
>
> Well, I can imaging a guard which will test whether "$objdir/../../params.options" file exits,
> and if so, then the tests are executed? Is it acceptable approach?
Yes. That's acceptable to me.
>
>> >
>>> >> +set text [read $fd]
>>> >> +close $fd
>>> >> +
>>> >> +# Main loop.
>>> >> +foreach params [split $text "\n"] {
>>> >> + set parts [split $params "="]
>>> >> + set name [string trim [lindex $parts 0] '"']
>>> >> + set values [split [lindex $parts 1] ","]
>>> >> + if { [llength $values] == 3 } {
>>> >> + set default [lindex $values 0]
>>> >> + set min [lindex $values 1]
>>> >> + set max [lindex $values 2]
>>> >> + set int_max "INT_MAX"
>>> >> +
>>> >> + if { $min != -1 } {
>>> >> + param_run_test $name $min
>>> >> + }
>>> >> + if { $max != $min && $max > 0 && $max != $int_max } {
>>> >> + param_run_test $name $max
>>> >> + }
>>> >> + }
>>> >> + if { [llength $values] == 5 } {
>>> >> + foreach v $values {
>>> >> + param_run_test $name $v
>>> >> + }
>>> >> + }
>>> >> +}
>> >
>> > This produces ambiguous test result lines:
>> >
>> > Running /scratch/tschwing/nvidiak20-2/gcc/trunk-light/source-gcc/gcc/testsuite/gcc.dg/params/params.exp ...
>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>> > [many more]
>> >
>> > OK to fix this as follows:
>> >
>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=0 (test for excess errors)
>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=50 (test for excess errors)
>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param inline-min-speedup=0 (test for excess errors)
>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param max-inline-insns-single=0 (test for excess errors)
>> > [...]
>> >
>> > commit ae350ce9af062d7d2c05225280596b1bc982728b
>> > Author: Thomas Schwinge <thomas@codesourcery.com>
>> > Date: Fri Jul 15 09:13:19 2016 +0200
>> >
>> > Disambiguate gcc.dg/params/params.exp test results
>> >
>> > gcc/testsuite/
>> > * gcc.dg/params/params.exp (param_run_test): Swap flags and
>> > default-extra-flags arguments when calling dg-runtest.
>> > ---
>> > gcc/testsuite/gcc.dg/params/params.exp | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git gcc/testsuite/gcc.dg/params/params.exp gcc/testsuite/gcc.dg/params/params.exp
>> > index f2f397e..dd82a5d 100644
>> > --- gcc/testsuite/gcc.dg/params/params.exp
>> > +++ gcc/testsuite/gcc.dg/params/params.exp
>> > @@ -28,7 +28,7 @@ proc param_run_test { param_name param_value } {
>> > global srcdir
>> > global subdir
>> >
>> > - dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
>> > + dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
>> > }
>> >
>> > set fd [open "$objdir/../../params.options" r]
>> >
>> >
>> > GrüÃe
>> > Thomas
>> >
> Thanks for the patch, that's probably the same problem that Andreas spotted.
> I'm sending candidate patch.
>
> Martin
>
>
> 0001-Fix-params.exp-test-cases.patch
>
>
> From d5e3c5cb20306352af7f45cd827669b7ff51a709 Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Mon, 18 Jul 2016 09:50:12 +0200
> Subject: [PATCH] Fix params.exp test-cases
>
> gcc/testsuite/ChangeLog:
>
> 2016-07-18 Thomas Schwinge <thomas@codesourcery.com>
> Martin Liska <mliska@suse.cz>
>
> * gcc.dg/params/LICENSE: Add missing LICENSE that is mentioned
> in a source file.
> * gcc.dg/params/README: Same for the README.
> * gcc.dg/params/params.exp (param_run_test): Swap flags and
> default-extra-flags arguments when calling dg-runtest.
OK.
jeff
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-21 18:53 ` Jeff Law
@ 2016-07-22 9:09 ` Martin Liška
0 siblings, 0 replies; 12+ messages in thread
From: Martin Liška @ 2016-07-22 9:09 UTC (permalink / raw)
To: Jeff Law, Thomas Schwinge
Cc: Jakub Jelinek, gcc-patches, Joseph Myers, Andreas Schwab
[-- Attachment #1: Type: text/plain, Size: 4754 bytes --]
On 07/21/2016 08:53 PM, Jeff Law wrote:
> On 07/18/2016 01:53 AM, Martin Liška wrote:
>> You are right, I was inspired by what we do for GCC plugins in:
>> gcc/testsuite/lib/plugin-support.exp
>>
>> where we have following comment:
>> # Note that the plugin test support currently only works when the GCC
>> # build tree is available. (We make sure that is the case in plugin.exp.)
>> # Once we have figured out how/where to package/install GCC header files
>> # for general plugin support, we should modify the following include paths
>> # accordingly.
>>
>> Well, I can imaging a guard which will test whether "$objdir/../../params.options" file exits,
>> and if so, then the tests are executed? Is it acceptable approach?
> Yes. That's acceptable to me.
>
>>
>>> >
>>>> >> +set text [read $fd]
>>>> >> +close $fd
>>>> >> +
>>>> >> +# Main loop.
>>>> >> +foreach params [split $text "\n"] {
>>>> >> + set parts [split $params "="]
>>>> >> + set name [string trim [lindex $parts 0] '"']
>>>> >> + set values [split [lindex $parts 1] ","]
>>>> >> + if { [llength $values] == 3 } {
>>>> >> + set default [lindex $values 0]
>>>> >> + set min [lindex $values 1]
>>>> >> + set max [lindex $values 2]
>>>> >> + set int_max "INT_MAX"
>>>> >> +
>>>> >> + if { $min != -1 } {
>>>> >> + param_run_test $name $min
>>>> >> + }
>>>> >> + if { $max != $min && $max > 0 && $max != $int_max } {
>>>> >> + param_run_test $name $max
>>>> >> + }
>>>> >> + }
>>>> >> + if { [llength $values] == 5 } {
>>>> >> + foreach v $values {
>>>> >> + param_run_test $name $v
>>>> >> + }
>>>> >> + }
>>>> >> +}
>>> >
>>> > This produces ambiguous test result lines:
>>> >
>>> > Running /scratch/tschwing/nvidiak20-2/gcc/trunk-light/source-gcc/gcc/testsuite/gcc.dg/params/params.exp ...
>>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>>> > PASS: gcc.dg/params/blocksort-part.c (test for excess errors)
>>> > [many more]
>>> >
>>> > OK to fix this as follows:
>>> >
>>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=0 (test for excess errors)
>>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param predictable-branch-outcome=50 (test for excess errors)
>>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param inline-min-speedup=0 (test for excess errors)
>>> > PASS: gcc.dg/params/blocksort-part.c -O3 --param max-inline-insns-single=0 (test for excess errors)
>>> > [...]
>>> >
>>> > commit ae350ce9af062d7d2c05225280596b1bc982728b
>>> > Author: Thomas Schwinge <thomas@codesourcery.com>
>>> > Date: Fri Jul 15 09:13:19 2016 +0200
>>> >
>>> > Disambiguate gcc.dg/params/params.exp test results
>>> >
>>> > gcc/testsuite/
>>> > * gcc.dg/params/params.exp (param_run_test): Swap flags and
>>> > default-extra-flags arguments when calling dg-runtest.
>>> > ---
>>> > gcc/testsuite/gcc.dg/params/params.exp | 2 +-
>>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>>> >
>>> > diff --git gcc/testsuite/gcc.dg/params/params.exp gcc/testsuite/gcc.dg/params/params.exp
>>> > index f2f397e..dd82a5d 100644
>>> > --- gcc/testsuite/gcc.dg/params/params.exp
>>> > +++ gcc/testsuite/gcc.dg/params/params.exp
>>> > @@ -28,7 +28,7 @@ proc param_run_test { param_name param_value } {
>>> > global srcdir
>>> > global subdir
>>> >
>>> > - dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
>>> > + dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
>>> > }
>>> >
>>> > set fd [open "$objdir/../../params.options" r]
>>> >
>>> >
>>> > GrüÃe
>>> > Thomas
>>> >
>> Thanks for the patch, that's probably the same problem that Andreas spotted.
>> I'm sending candidate patch.
>>
>> Martin
>>
>>
>> 0001-Fix-params.exp-test-cases.patch
>>
>>
>> From d5e3c5cb20306352af7f45cd827669b7ff51a709 Mon Sep 17 00:00:00 2001
>> From: marxin <mliska@suse.cz>
>> Date: Mon, 18 Jul 2016 09:50:12 +0200
>> Subject: [PATCH] Fix params.exp test-cases
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2016-07-18 Thomas Schwinge <thomas@codesourcery.com>
>> Martin Liska <mliska@suse.cz>
>>
>> * gcc.dg/params/LICENSE: Add missing LICENSE that is mentioned
>> in a source file.
>> * gcc.dg/params/README: Same for the README.
>> * gcc.dg/params/params.exp (param_run_test): Swap flags and
>> default-extra-flags arguments when calling dg-runtest.
> OK.
>
> jeff
>
Thanks.
I'm sending the version of patch I've just installed as r238633.
Martin
[-- Attachment #2: 0001-Fix-params.exp-test-cases-v2.patch --]
[-- Type: text/x-patch, Size: 11841 bytes --]
From 920fce946873a1ec6a5a1755adc4a78fe4409f8e Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 18 Jul 2016 09:50:12 +0200
Subject: [PATCH] Fix params.exp test-cases
2016-07-18 Thomas Schwinge <thomas@codesourcery.com>
Martin Liska <mliska@suse.cz>
* gcc.dg/params/LICENSE: Add missing LICENSE that is mentioned
in a source file.
* gcc.dg/params/README: Same for the README.
* gcc.dg/params/params.exp (param_run_test): Swap flags and
default-extra-flags arguments when calling dg-runtest.
* gcc.dg/params/params.exp: Run the test-cases only
when params.options file exists.
---
gcc/testsuite/gcc.dg/params/LICENSE | 42 +++++++
gcc/testsuite/gcc.dg/params/README | 215 +++++++++++++++++++++++++++++++++
gcc/testsuite/gcc.dg/params/params.exp | 9 +-
3 files changed, 264 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/params/LICENSE
create mode 100644 gcc/testsuite/gcc.dg/params/README
diff --git a/gcc/testsuite/gcc.dg/params/LICENSE b/gcc/testsuite/gcc.dg/params/LICENSE
new file mode 100644
index 0000000..cc61417
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/LICENSE
@@ -0,0 +1,42 @@
+
+--------------------------------------------------------------------------
+
+This program, "bzip2", the associated library "libbzip2", and all
+documentation, are copyright (C) 1996-2010 Julian R Seward. All
+rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. The origin of this software must not be misrepresented; you must
+ not claim that you wrote the original software. If you use this
+ software in a product, an acknowledgment in the product
+ documentation would be appreciated but is not required.
+
+3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Julian Seward, jseward@bzip.org
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
+
+--------------------------------------------------------------------------
diff --git a/gcc/testsuite/gcc.dg/params/README b/gcc/testsuite/gcc.dg/params/README
new file mode 100644
index 0000000..9fb0f63
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/params/README
@@ -0,0 +1,215 @@
+
+This is the README for bzip2/libzip2.
+This version is fully compatible with the previous public releases.
+
+------------------------------------------------------------------
+This file is part of bzip2/libbzip2, a program and library for
+lossless, block-sorting data compression.
+
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
+Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+
+Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
+
+This program is released under the terms of the license contained
+in the file LICENSE.
+------------------------------------------------------------------
+
+Complete documentation is available in Postscript form (manual.ps),
+PDF (manual.pdf) or html (manual.html). A plain-text version of the
+manual page is available as bzip2.txt.
+
+
+HOW TO BUILD -- UNIX
+
+Type 'make'. This builds the library libbz2.a and then the programs
+bzip2 and bzip2recover. Six self-tests are run. If the self-tests
+complete ok, carry on to installation:
+
+To install in /usr/local/bin, /usr/local/lib, /usr/local/man and
+/usr/local/include, type
+
+ make install
+
+To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type
+
+ make install PREFIX=/xxx/yyy
+
+If you are (justifiably) paranoid and want to see what 'make install'
+is going to do, you can first do
+
+ make -n install or
+ make -n install PREFIX=/xxx/yyy respectively.
+
+The -n instructs make to show the commands it would execute, but not
+actually execute them.
+
+
+HOW TO BUILD -- UNIX, shared library libbz2.so.
+
+Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for
+Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims
+that it works for any other platform, though I suspect it probably
+will work for most platforms employing both ELF and gcc.
+
+bzip2-shared, a client of the shared library, is also built, but not
+self-tested. So I suggest you also build using the normal Makefile,
+since that conducts a self-test. A second reason to prefer the
+version statically linked to the library is that, on x86 platforms,
+building shared objects makes a valuable register (%ebx) unavailable
+to gcc, resulting in a slowdown of 10%-20%, at least for bzip2.
+
+Important note for people upgrading .so's from 0.9.0/0.9.5 to version
+1.0.X. All the functions in the library have been renamed, from (eg)
+bzCompress to BZ2_bzCompress, to avoid namespace pollution.
+Unfortunately this means that the libbz2.so created by
+Makefile-libbz2_so will not work with any program which used an older
+version of the library. I do encourage library clients to make the
+effort to upgrade to use version 1.0, since it is both faster and more
+robust than previous versions.
+
+
+HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.
+
+It's difficult for me to support compilation on all these platforms.
+My approach is to collect binaries for these platforms, and put them
+on the master web site (http://www.bzip.org). Look there. However
+(FWIW), bzip2-1.0.X is very standard ANSI C and should compile
+unmodified with MS Visual C. If you have difficulties building, you
+might want to read README.COMPILATION.PROBLEMS.
+
+At least using MS Visual C++ 6, you can build from the unmodified
+sources by issuing, in a command shell:
+
+ nmake -f makefile.msc
+
+(you may need to first run the MSVC-provided script VCVARS32.BAT
+ so as to set up paths to the MSVC tools correctly).
+
+
+VALIDATION
+
+Correct operation, in the sense that a compressed file can always be
+decompressed to reproduce the original, is obviously of paramount
+importance. To validate bzip2, I used a modified version of Mark
+Nelson's churn program. Churn is an automated test driver which
+recursively traverses a directory structure, using bzip2 to compress
+and then decompress each file it encounters, and checking that the
+decompressed data is the same as the original.
+
+
+
+Please read and be aware of the following:
+
+WARNING:
+
+ This program and library (attempts to) compress data by
+ performing several non-trivial transformations on it.
+ Unless you are 100% familiar with *all* the algorithms
+ contained herein, and with the consequences of modifying them,
+ you should NOT meddle with the compression or decompression
+ machinery. Incorrect changes can and very likely *will*
+ lead to disastrous loss of data.
+
+
+DISCLAIMER:
+
+ I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE
+ USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED.
+
+ Every compression of a file implies an assumption that the
+ compressed file can be decompressed to reproduce the original.
+ Great efforts in design, coding and testing have been made to
+ ensure that this program works correctly. However, the complexity
+ of the algorithms, and, in particular, the presence of various
+ special cases in the code which occur with very low but non-zero
+ probability make it impossible to rule out the possibility of bugs
+ remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS
+ PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER
+ SMALL, THAT THE DATA WILL NOT BE RECOVERABLE.
+
+ That is not to say this program is inherently unreliable.
+ Indeed, I very much hope the opposite is true. bzip2/libbzip2
+ has been carefully constructed and extensively tested.
+
+
+PATENTS:
+
+ To the best of my knowledge, bzip2/libbzip2 does not use any
+ patented algorithms. However, I do not have the resources
+ to carry out a patent search. Therefore I cannot give any
+ guarantee of the above statement.
+
+
+
+WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ?
+
+ * Approx 10% faster compression, 30% faster decompression
+ * -t (test mode) is a lot quicker
+ * Can decompress concatenated compressed files
+ * Programming interface, so programs can directly read/write .bz2 files
+ * Less restrictive (BSD-style) licensing
+ * Flag handling more compatible with GNU gzip
+ * Much more documentation, i.e., a proper user manual
+ * Hopefully, improved portability (at least of the library)
+
+WHAT'S NEW IN 0.9.5 ?
+
+ * Compression speed is much less sensitive to the input
+ data than in previous versions. Specifically, the very
+ slow performance caused by repetitive data is fixed.
+ * Many small improvements in file and flag handling.
+ * A Y2K statement.
+
+WHAT'S NEW IN 1.0.0 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.2 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.3 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.4 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.5 ?
+
+ See the CHANGES file.
+
+WHAT'S NEW IN 1.0.6 ?
+
+ See the CHANGES file.
+
+
+I hope you find bzip2 useful. Feel free to contact me at
+ jseward@bzip.org
+if you have any suggestions or queries. Many people mailed me with
+comments, suggestions and patches after the releases of bzip-0.15,
+bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
+1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this
+feedback. I thank you for your comments.
+
+bzip2's "home" is http://www.bzip.org/
+
+Julian Seward
+jseward@bzip.org
+Cambridge, UK.
+
+18 July 1996 (version 0.15)
+25 August 1996 (version 0.21)
+ 7 August 1997 (bzip2, version 0.1)
+29 August 1997 (bzip2, version 0.1pl2)
+23 August 1998 (bzip2, version 0.9.0)
+ 8 June 1999 (bzip2, version 0.9.5)
+ 4 Sept 1999 (bzip2, version 0.9.5d)
+ 5 May 2000 (bzip2, version 1.0pre8)
+30 December 2001 (bzip2, version 1.0.2pre1)
+15 February 2005 (bzip2, version 1.0.3)
+20 December 2006 (bzip2, version 1.0.4)
+10 December 2007 (bzip2, version 1.0.5)
+ 6 Sept 2010 (bzip2, version 1.0.6)
diff --git a/gcc/testsuite/gcc.dg/params/params.exp b/gcc/testsuite/gcc.dg/params/params.exp
index f2f397e..47f5af5 100644
--- a/gcc/testsuite/gcc.dg/params/params.exp
+++ b/gcc/testsuite/gcc.dg/params/params.exp
@@ -28,10 +28,15 @@ proc param_run_test { param_name param_value } {
global srcdir
global subdir
- dg-runtest $srcdir/$subdir/blocksort-part.c "" "-O3 --param $param_name=$param_value"
+ dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
}
-set fd [open "$objdir/../../params.options" r]
+set options_file "$objdir/../../params.options"
+if { [file exists $options_file] == 0 } {
+ return
+}
+
+set fd [open $options_file r]
set text [read $fd]
close $fd
--
2.9.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-18 7:53 ` Martin Liška
2016-07-21 18:53 ` Jeff Law
@ 2016-07-28 21:27 ` Joseph Myers
2016-08-01 12:02 ` Martin Liška
1 sibling, 1 reply; 12+ messages in thread
From: Joseph Myers @ 2016-07-28 21:27 UTC (permalink / raw)
To: Martin Liška
Cc: Thomas Schwinge, Jakub Jelinek, Jeff Law, gcc-patches, Andreas Schwab
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
On Mon, 18 Jul 2016, Martin Liška wrote:
> Well, I can imaging a guard which will test whether
> "$objdir/../../params.options" file exits, and if so, then the tests are
> executed? Is it acceptable approach?
The correct way to test for build-tree testing is [info exists
TESTING_IN_BUILD_TREE]. When testing outside the build tree, you should
not assume anything about directories outside of the test and source
directories, meaning you should not test for existence of paths in
$objdir/../ in that case.
(The preferable approach is to factor out the code generating this file so
it can be run from the testsuite. Then you don't need to distinguish
build-tree and other testing at all.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-07-28 21:27 ` Joseph Myers
@ 2016-08-01 12:02 ` Martin Liška
2016-08-03 16:14 ` Jeff Law
0 siblings, 1 reply; 12+ messages in thread
From: Martin Liška @ 2016-08-01 12:02 UTC (permalink / raw)
To: Joseph Myers
Cc: Thomas Schwinge, Jakub Jelinek, Jeff Law, gcc-patches, Andreas Schwab
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
On 07/28/2016 11:26 PM, Joseph Myers wrote:
> On Mon, 18 Jul 2016, Martin Liška wrote:
>
>> Well, I can imaging a guard which will test whether
>> "$objdir/../../params.options" file exits, and if so, then the tests are
>> executed? Is it acceptable approach?
>
> The correct way to test for build-tree testing is [info exists
> TESTING_IN_BUILD_TREE]. When testing outside the build tree, you should
> not assume anything about directories outside of the test and source
> directories, meaning you should not test for existence of paths in
> $objdir/../ in that case.
Thank you for the hint, I'm attaching patch.
>
> (The preferable approach is to factor out the code generating this file so
> it can be run from the testsuite. Then you don't need to distinguish
> build-tree and other testing at all.)
>
That would be the best approach, but I've got quite limited experience with DejaGNU,
I would postpone it and write it on my TODO list.
May I install the suggested patch?
Martin
[-- Attachment #2: 0001-Use-TESTING_IN_BUILD_TREE-in-params.exp.patch --]
[-- Type: text/x-patch, Size: 897 bytes --]
From 71b4f52b348098314c2b2351bcd7dbd72e051ec4 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 1 Aug 2016 13:59:34 +0200
Subject: [PATCH] Use TESTING_IN_BUILD_TREE in params.exp
gcc/testsuite/ChangeLog:
2016-08-01 Martin Liska <mliska@suse.cz>
* gcc.dg/params/params.exp: Replace file exists with
TESTING_IN_BUILD_TREE.
---
gcc/testsuite/gcc.dg/params/params.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/params/params.exp b/gcc/testsuite/gcc.dg/params/params.exp
index 47f5af5..2eb797e 100644
--- a/gcc/testsuite/gcc.dg/params/params.exp
+++ b/gcc/testsuite/gcc.dg/params/params.exp
@@ -32,7 +32,7 @@ proc param_run_test { param_name param_value } {
}
set options_file "$objdir/../../params.options"
-if { [file exists $options_file] == 0 } {
+if { [info exists TESTING_IN_BUILD_TREE] == 0 } {
return
}
--
2.9.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC, v2] Test coverage for --param boundary values
2016-08-01 12:02 ` Martin Liška
@ 2016-08-03 16:14 ` Jeff Law
0 siblings, 0 replies; 12+ messages in thread
From: Jeff Law @ 2016-08-03 16:14 UTC (permalink / raw)
To: Martin Liška, Joseph Myers
Cc: Thomas Schwinge, Jakub Jelinek, gcc-patches, Andreas Schwab
On 08/01/2016 06:02 AM, Martin Liška wrote:
> On 07/28/2016 11:26 PM, Joseph Myers wrote:
>> On Mon, 18 Jul 2016, Martin Liška wrote:
>>
>>> Well, I can imaging a guard which will test whether
>>> "$objdir/../../params.options" file exits, and if so, then the tests are
>>> executed? Is it acceptable approach?
>>
>> The correct way to test for build-tree testing is [info exists
>> TESTING_IN_BUILD_TREE]. When testing outside the build tree, you should
>> not assume anything about directories outside of the test and source
>> directories, meaning you should not test for existence of paths in
>> $objdir/../ in that case.
>
> Thank you for the hint, I'm attaching patch.
>
>>
>> (The preferable approach is to factor out the code generating this file so
>> it can be run from the testsuite. Then you don't need to distinguish
>> build-tree and other testing at all.)
>>
>
> That would be the best approach, but I've got quite limited experience with DejaGNU,
> I would postpone it and write it on my TODO list.
>
> May I install the suggested patch?
Yes.
jeff
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-08-03 16:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08 10:43 [RFC] Test coverage for --param boundary values Martin Liška
2016-07-08 12:48 ` [RFC, v2] " Martin Liška
2016-07-11 14:48 ` Jeff Law
2016-07-12 12:14 ` Martin Liška
2016-07-15 7:22 ` Thomas Schwinge
2016-07-18 7:53 ` Martin Liška
2016-07-21 18:53 ` Jeff Law
2016-07-22 9:09 ` Martin Liška
2016-07-28 21:27 ` Joseph Myers
2016-08-01 12:02 ` Martin Liška
2016-08-03 16:14 ` Jeff Law
2016-07-15 10:01 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).