2 pr20527-1.c from the execute part of the gcc torture tests.
11 /* PR rtl-optimization/20527
12 Mishandled postincrement. This test-case is derived from the
13 function BZ2_hbCreateDecodeTables in the file huffman.c from
14 bzip2-1.0.2, hence requiring the following disclaimer copied here: */
17 This file is a part of bzip2 and/or libbzip2, a program and
18 library for lossless, block-sorting data compression.
20 Copyright (C) 1996-2002 Julian R Seward. All rights reserved.
22 Redistribution and use in source and binary forms, with or without
23 modification, are permitted provided that the following conditions
26 1. Redistributions of source code must retain the above copyright
27 notice, this list of conditions and the following disclaimer.
29 2. The origin of this software must not be misrepresented; you must
30 not claim that you wrote the original software. If you use this
31 software in a product, an acknowledgment in the product
32 documentation would be appreciated but is not required.
34 3. Altered source versions must be plainly marked as such, and must
35 not be misrepresented as being the original software.
37 4. The name of the author may not be used to endorse or promote
38 products derived from this software without specific prior written
41 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
42 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
43 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
45 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
47 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
48 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
49 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
50 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
51 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53 Julian Seward, Cambridge, UK.
55 bzip2/libbzip2 version 1.0 of 21 March 2000
57 This program is based on (at least) the work of:
67 For more information on these sources, see the manual.
70 #if !defined(__SDCC_pdk14) // Lack of memory
71 void f (long *limit
, long *base
, long minLen
, long maxLen
);
72 void f (long *limit
, long *base
, long minLen
, long maxLen
)
77 for (i
= minLen
; i
<= maxLen
; i
++) {
78 vec
+= (base
[i
+1] - base
[i
]);
83 long b
[] = {1, 5, 11, 23};
87 testTortureExecute (void)
89 #if !defined(__SDCC_pdk14) // Lack of memory
92 if (l
[0] != 3 || l
[1] != 9 || l
[2] != 21)