scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 847cb69f9d6f1b034d1656334cefecb51b454dc4
parent 7aa488d64698f63f750d0415c7887d47c8510614
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 13 Dec 2016 17:53:04 +0100

[cc1] Update tests after commits 7aa488d 62ecef1

Diffstat:
Mcc1/tests/test001.c | 12+++++++-----
Mcc1/tests/test002.c | 36+++++++++++++++++++-----------------
Mcc1/tests/test003.c | 10++++++----
Mcc1/tests/test004.c | 40+++++++++++++++++++++-------------------
Mcc1/tests/test005.c | 20+++++++++++---------
Mcc1/tests/test006.c | 36+++++++++++++++++++-----------------
Mcc1/tests/test007.c | 22++++++++++++----------
Mcc1/tests/test008.c | 26++++++++++++++------------
Mcc1/tests/test009.c | 24+++++++++++++-----------
Mcc1/tests/test010.c | 60+++++++++++++++++++++++++++++++-----------------------------
Mcc1/tests/test011.c | 16+++++++++-------
Mcc1/tests/test012.c | 78++++++++++++++++++++++++++++++++++++++++--------------------------------------
Mcc1/tests/test013.c | 246++++++++++++++++++++++++++++++++++++++++---------------------------------------
Mcc1/tests/test014.c | 30++++++++++++++++--------------
Mcc1/tests/test015.c | 34++++++++++++++++++----------------
Mcc1/tests/test016.c | 52+++++++++++++++++++++++++++-------------------------
Mcc1/tests/test017.c | 32+++++++++++++++++---------------
Mcc1/tests/test018.c | 42++++++++++++++++++++++--------------------
Mcc1/tests/test019.c | 44+++++++++++++++++++++++---------------------
Mcc1/tests/test020.c | 72+++++++++++++++++++++++++++++++++++++-----------------------------------
Mcc1/tests/test021.c | 28+++++++++++++++-------------
Mcc1/tests/test022.c | 40+++++++++++++++++++++-------------------
Mcc1/tests/test023.c | 40+++++++++++++++++++++-------------------
Mcc1/tests/test024.c | 36+++++++++++++++++++-----------------
Mcc1/tests/test025.c | 22++++++++++++----------
Mcc1/tests/test026.c | 24+++++++++++++-----------
Mcc1/tests/test027.c | 14++++++++------
Mcc1/tests/test028.c | 10++++++----
Mcc1/tests/test029.c | 16+++++++++-------
Mcc1/tests/test030.c | 38++++++++++++++++++++------------------
Mcc1/tests/test032.c | 15+++++++++------
Mcc1/tests/test033.c | 4+++-
Mcc1/tests/test034.c | 26+++++++++++++++-----------
Mcc1/tests/test035.c | 21++-------------------
Mcc1/tests/test036.c | 64+++++++++++++++++++++++++++++++++-------------------------------
Mcc1/tests/test037.c | 18++++++++++--------
Mcc1/tests/test038.c | 20+++++++++++---------
Mcc1/tests/test039.c | 42++++++++++++++++++++++--------------------
Mcc1/tests/test040.c | 16+++++++++-------
Mcc1/tests/test041.c | 48+++++++++++++++++++++++++-----------------------
Mcc1/tests/test042.c | 8+++++---
Mcc1/tests/test043.c | 14++++++++------
Mcc1/tests/test045.c | 10++++++----
Mcc1/tests/test046.c | 20+++++++++++---------
Mcc1/tests/test047.c | 26++++++++++++++------------
Mcc1/tests/test048.c | 22++++++++++++----------
Mcc1/tests/test049.c | 14++++++++------
Mcc1/tests/test051.c | 20+++++++++++---------
Mcc1/tests/test052.c | 30++++++++++++++++--------------
Mcc1/tests/test053.c | 20+++++++++++---------
Mcc1/tests/test056.c | 25+++++++++++++------------
Mcc1/tests/test057.c | 15+++++++--------
Mcc1/tests/test058.c | 13+++++++------
Mcc1/tests/test060.c | 4+++-
Mcc1/tests/test061.c | 4+++-
Mcc1/tests/test062.c | 4+++-
Mcc1/tests/test064.c | 14++++++++------
Mcc1/tests/test065.c | 50++++++++++++++++++++++++++------------------------
Mcc1/tests/test066.c | 10++++++----
59 files changed, 947 insertions(+), 850 deletions(-)

diff --git a/cc1/tests/test001.c b/cc1/tests/test001.c @@ -5,17 +5,19 @@ name: TEST001 description: Basic hello world test error: output: -X4 I F "printf -G6 I F "main +V2 K #NC +V4 K #N9 +X8 I F "printf +G10 I F "main { \ -V9 K #ND -Y8 V9 " ( +V13 K #ND +Y12 V13 " ( #"hello world #K0A #K00 ) - X4 Y8 'P pP cI + X8 Y12 'P pP cI h #I0 } */ diff --git a/cc1/tests/test002.c b/cc1/tests/test002.c @@ -5,27 +5,29 @@ name: TEST002 description: Test forward references before definition of types error: output: -G4 P "x -G8 I F "main +V2 K #NC +V4 K #N9 +G8 P "x +S6 "S #N8 #N2 +M9 I "i #N0 +M10 P "next #N2 +G12 I F "main { \ -S2 "S #N8 #N2 -M5 I "i #N0 -M6 P "next #N2 -A9 S2 "y -A10 P "p -A11 N "n - A9 M5 .I #I0 :I - G4 @S2 A9 :S2 - A11 #N0 :N A10 A9 'P :P ,P - j L14 +A13 S6 "y +A14 P "p +A15 N "n + A13 M9 .I #I0 :I + G8 @S6 A13 :S6 + A15 #N0 :N A14 A13 'P :P ,P + j L18 e -L12 - A11 #N1 :+N A10 A10 @S2 M6 .P :P ,P -L14 - y L12 A10 #P0 !I +L16 + A15 #N1 :+N A14 A14 @S6 M10 .P :P ,P +L18 + y L16 A14 #P0 !I b -L13 +L17 } */ diff --git a/cc1/tests/test003.c b/cc1/tests/test003.c @@ -5,20 +5,22 @@ name: TEST003 description: Select function to call inside ternary operator error: output: -G2 I F "foo +V2 K #NC +V4 K #N9 +G6 I F "foo { \ h #I2A } -G4 I F "bar +G7 I F "bar { \ h #I18 } -G5 I F "main +G8 I F "main { \ - h G2 cI + h G6 cI } */ diff --git a/cc1/tests/test004.c b/cc1/tests/test004.c @@ -5,28 +5,30 @@ name: TEST004 description: Test integer operations error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "x - A3 #I0 :I - A3 A3 #I2 +I :I - A3 A3 #I1 -I :I - A3 A3 #I6 *I :I - A3 A3 #I2 /I :I - A3 A3 #I2 %I :I - A3 A3 #I2 lI :I - A3 A3 #I1 rI :I - A3 A3 #IFF |I :I - A3 A3 #I3 &I :I - A3 A3 #I1 ^I :I - A3 A3 A3 #I1 >I +I :I - A3 A3 A3 #I3 <I +I :I - A3 A3 A3 #I1 >I +I :I - A3 A3 A3 #I4 <I +I :I - y L4 A3 #I4 =I +A7 I "x + A7 #I0 :I + A7 A7 #I2 +I :I + A7 A7 #I1 -I :I + A7 A7 #I6 *I :I + A7 A7 #I2 /I :I + A7 A7 #I2 %I :I + A7 A7 #I2 lI :I + A7 A7 #I1 rI :I + A7 A7 #IFF |I :I + A7 A7 #I3 &I :I + A7 A7 #I1 ^I :I + A7 A7 A7 #I1 >I +I :I + A7 A7 A7 #I3 <I +I :I + A7 A7 A7 #I1 >I +I :I + A7 A7 A7 #I4 <I +I :I + y L8 A7 #I4 =I h #I1 -L4 +L8 h #I0 } */ diff --git a/cc1/tests/test005.c b/cc1/tests/test005.c @@ -5,18 +5,20 @@ name: TEST005 description: Test unary integer operations error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "x - A3 #I3 :I - A3 A3 #I0 =I :I - A3 A3 #I0 =I :I - A3 A3 ~I :I - A3 A3 _I :I - y L4 A3 #I2 =I +A7 I "x + A7 #I3 :I + A7 A7 #I0 =I :I + A7 A7 #I0 =I :I + A7 A7 ~I :I + A7 A7 _I :I + y L8 A7 #I2 =I h #I1 -L4 +L8 h #I0 } */ diff --git a/cc1/tests/test006.c b/cc1/tests/test006.c @@ -8,30 +8,32 @@ test006.c:5: warning: conditional expression is constant test006.c:7: warning: conditional expression is constant test006.c:10: warning: conditional expression is constant output: -G1 K "c -G3 I F "main +V2 K #NC +V4 K #N9 +G5 K "c +G7 I F "main { \ - y L4 #I1 + y L8 #I1 h #I1 - j L5 -L4 - y L6 #I1 - j L7 -L6 - y L8 #I0 - y L9 G1 gI #I0 =I + j L9 +L8 + y L10 #I1 + j L11 +L10 + y L12 #I0 + y L13 G5 gI #I0 =I h #I1 - j L10 -L9 + j L14 +L13 h #I0 -L10 - j L11 -L8 +L14 + j L15 +L12 h #I1 +L15 L11 -L7 -L5 +L9 h #I1 } */ diff --git a/cc1/tests/test007.c b/cc1/tests/test007.c @@ -5,20 +5,22 @@ name: TEST007 description: basic while test error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "x - A3 #IA :I - j L6 +A7 I "x + A7 #IA :I + j L10 e -L4 - A3 A3 #I1 -I :I -L6 - y L4 A3 #I0 !I +L8 + A7 A7 #I1 -I :I +L10 + y L8 A7 #I0 !I b -L5 - h A3 +L9 + h A7 } */ diff --git a/cc1/tests/test008.c b/cc1/tests/test008.c @@ -5,24 +5,26 @@ name: TEST008 description: Basic do while loop error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "x - A3 #I0 :I +A7 I "x + A7 #I0 :I e -L4 - A3 A3 #I1 +I :I - y L4 A3 #IA <I +L8 + A7 A7 #I1 +I :I + y L8 A7 #IA <I b -L5 +L9 e -L6 - A3 A3 #I1 +I :I - y L6 A3 #I14 <I +L10 + A7 A7 #I1 +I :I + y L10 A7 #I14 <I b -L7 - h A3 #I14 -I +L11 + h A7 #I14 -I } */ diff --git a/cc1/tests/test009.c b/cc1/tests/test009.c @@ -5,22 +5,24 @@ name: TEST009 description: Basic test for loops error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "x - A3 #I0 :I - j L6 +A7 I "x + A7 #I0 :I + j L10 e -L4 - A3 A3 #I1 +I :I -L6 - y L4 A3 #IA <I +L8 + A7 A7 #I1 +I :I +L10 + y L8 A7 #IA <I b -L5 - y L7 A3 #IA =I +L9 + y L11 A7 #IA =I h #I1 -L7 +L11 h #I0 } */ diff --git a/cc1/tests/test010.c b/cc1/tests/test010.c @@ -8,57 +8,59 @@ test010.c:8: warning: conditional expression is constant test010.c:10: warning: conditional expression is constant test010.c:30: warning: conditional expression is constant output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "x - A3 #I0 :I - j L6 +A7 I "x + A7 #I0 :I + j L10 e -L4 - j L5 -L6 - y L4 #I1 - b -L5 +L8 j L9 - e -L7 - y L10 A3 #I5 !I - j L8 L10 - A3 A3 #I1 +I :I - j L7 -L9 - y L7 #I1 + y L8 #I1 b -L8 - +L9 j L13 e L11 - y L14 A3 #IA !I + y L14 A7 #I5 !I j L12 L14 - A3 A3 #I1 +I :I + A7 A7 #I1 +I :I j L11 - L13 - j L11 - + y L11 #I1 b L12 + + j L17 e L15 - y L17 A3 #IF !I + y L18 A7 #IA !I j L16 +L18 + A7 A7 #I1 +I :I + j L15 + L17 - A3 A3 #I1 +I :I j L15 - y L15 #I1 + b L16 - h A3 #IF -I + e +L19 + y L21 A7 #IF !I + j L20 +L21 + A7 A7 #I1 +I :I + j L19 + y L19 #I1 + b +L20 + h A7 #IF -I } */ diff --git a/cc1/tests/test011.c b/cc1/tests/test011.c @@ -7,17 +7,19 @@ error: test011.c:13: warning: 'foo' defined but not used test011.c:13: warning: 'start' defined but not used output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -L3 - j L4 +L7 + j L8 h #I1 -L5 +L9 h #I0 -L4 -L6 - j L5 +L8 +L10 + j L9 h #I1 } */ diff --git a/cc1/tests/test012.c b/cc1/tests/test012.c @@ -6,58 +6,60 @@ description: Basic switch test error: test012.c:38: warning: 'foo' defined but not used output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "x - A3 #I0 :I - s A3 - v L5 #I0 -L5 - t L4 -L4 - s A3 - v L7 #I0 -L7 - s A3 +A7 I "x + A7 #I0 :I + s A7 v L9 #I0 L9 - j L10 - f L11 -L11 - h #I1 t L8 L8 - t L6 -L6 - h #I2 -L10 - s A3 - v L13 #I1 + s A7 + v L11 #I0 +L11 + s A7 + v L13 #I0 L13 - h #I3 + j L14 + f L15 +L15 + h #I1 t L12 L12 - s A3 - A3 #I2 :I -L15 - v L16 #I1 + t L10 +L10 + h #I2 +L14 + s A7 + v L17 #I1 +L17 + h #I3 + t L16 L16 + s A7 + A7 #I2 :I +L19 + v L20 #I1 +L20 h #I4 - t L14 -L14 - s A3 - v L18 #I0 + t L18 L18 - h A3 - v L19 #I1 -L19 + s A7 + v L22 #I0 +L22 + h A7 + v L23 #I1 +L23 h #I1 - f L20 -L20 + f L24 +L24 h #I1 - t L17 -L17 + t L21 +L21 } */ diff --git a/cc1/tests/test013.c b/cc1/tests/test013.c @@ -8,130 +8,132 @@ comments: This test depends of the configuration in the type system. short is equal to int, and unsigned short is equal to unsigned. error: output: -G1 I "a -G2 N "b -G3 K "c -G4 C "d -G5 K "e -G6 W "f -G7 Z "g -G8 Q "h -G9 O "i -G10 I "j -G11 N "k -G13 I F "main +V2 K #NC +V4 K #N9 +G5 I "a +G6 N "b +G7 K "c +G8 C "d +G9 K "e +G10 W "f +G11 Z "g +G12 Q "h +G13 O "i +G14 I "j +G15 N "k +G17 I F "main { \ - G1 G2 gI :I - G1 G3 gI :I - G1 G4 gI :I - G1 G5 gI :I - G1 G6 gI :I - G1 G7 gI :I - G1 G8 gI :I - G1 G9 gI :I - G1 G10 :I - G1 G11 gI :I - G2 G1 gN :N - G2 G3 gN :N - G2 G4 gN :N - G2 G5 gN :N - G2 G6 gN :N - G2 G7 gN :N - G2 G8 gN :N - G2 G9 gN :N - G2 G10 gN :N - G2 G11 :N - G3 G1 gK :K - G3 G2 gK :K - G3 G4 gK :K - G3 G5 :K - G3 G6 gK :K - G3 G7 gK :K - G3 G8 gK :K - G3 G9 gK :K - G3 G10 gK :K - G3 G11 gK :K - G4 G1 gC :C - G4 G2 gC :C - G4 G3 gC :C - G4 G5 gC :C - G4 G6 gC :C - G4 G7 gC :C - G4 G8 gC :C - G4 G9 gC :C - G4 G10 gC :C - G4 G11 gC :C - G5 G1 gK :K - G5 G2 gK :K - G5 G3 :K - G5 G4 gK :K - G5 G6 gK :K - G5 G7 gK :K - G5 G8 gK :K - G5 G9 gK :K - G5 G10 gK :K - G5 G11 gK :K - G6 G1 gW :W - G6 G2 gW :W - G6 G3 gW :W - G6 G4 gW :W - G6 G5 gW :W - G6 G7 gW :W - G6 G8 gW :W - G6 G9 gW :W - G6 G10 gW :W - G6 G11 gW :W - G7 G1 gZ :Z - G7 G2 gZ :Z - G7 G3 gZ :Z - G7 G4 gZ :Z - G7 G5 gZ :Z - G7 G6 gZ :Z - G7 G8 gZ :Z - G7 G9 gZ :Z - G7 G10 gZ :Z - G7 G11 gZ :Z - G8 G1 gQ :Q - G8 G2 gQ :Q - G8 G3 gQ :Q - G8 G4 gQ :Q - G8 G5 gQ :Q - G8 G6 gQ :Q - G8 G7 gQ :Q - G8 G9 gQ :Q - G8 G10 gQ :Q - G8 G11 gQ :Q - G9 G1 gO :O - G9 G2 gO :O - G9 G3 gO :O - G9 G4 gO :O - G9 G5 gO :O - G9 G6 gO :O - G9 G7 gO :O - G9 G8 gO :O - G9 G10 gO :O - G9 G11 gO :O - G10 G1 :I - G10 G2 gI :I - G10 G3 gI :I - G10 G4 gI :I - G10 G5 gI :I - G10 G6 gI :I - G10 G7 gI :I - G10 G8 gI :I - G10 G9 gI :I - G10 G11 gI :I - G11 G1 gN :N - G11 G2 :N - G11 G3 gN :N - G11 G4 gN :N - G11 G5 gN :N - G11 G6 gN :N - G11 G7 gN :N - G11 G8 gN :N - G11 G10 gN :N - G11 G9 gN :N + G5 G6 gI :I + G5 G7 gI :I + G5 G8 gI :I + G5 G9 gI :I + G5 G10 gI :I + G5 G11 gI :I + G5 G12 gI :I + G5 G13 gI :I + G5 G14 :I + G5 G15 gI :I + G6 G5 gN :N + G6 G7 gN :N + G6 G8 gN :N + G6 G9 gN :N + G6 G10 gN :N + G6 G11 gN :N + G6 G12 gN :N + G6 G13 gN :N + G6 G14 gN :N + G6 G15 :N + G7 G5 gK :K + G7 G6 gK :K + G7 G8 gK :K + G7 G9 :K + G7 G10 gK :K + G7 G11 gK :K + G7 G12 gK :K + G7 G13 gK :K + G7 G14 gK :K + G7 G15 gK :K + G8 G5 gC :C + G8 G6 gC :C + G8 G7 gC :C + G8 G9 gC :C + G8 G10 gC :C + G8 G11 gC :C + G8 G12 gC :C + G8 G13 gC :C + G8 G14 gC :C + G8 G15 gC :C + G9 G5 gK :K + G9 G6 gK :K + G9 G7 :K + G9 G8 gK :K + G9 G10 gK :K + G9 G11 gK :K + G9 G12 gK :K + G9 G13 gK :K + G9 G14 gK :K + G9 G15 gK :K + G10 G5 gW :W + G10 G6 gW :W + G10 G7 gW :W + G10 G8 gW :W + G10 G9 gW :W + G10 G11 gW :W + G10 G12 gW :W + G10 G13 gW :W + G10 G14 gW :W + G10 G15 gW :W + G11 G5 gZ :Z + G11 G6 gZ :Z + G11 G7 gZ :Z + G11 G8 gZ :Z + G11 G9 gZ :Z + G11 G10 gZ :Z + G11 G12 gZ :Z + G11 G13 gZ :Z + G11 G14 gZ :Z + G11 G15 gZ :Z + G12 G5 gQ :Q + G12 G6 gQ :Q + G12 G7 gQ :Q + G12 G8 gQ :Q + G12 G9 gQ :Q + G12 G10 gQ :Q + G12 G11 gQ :Q + G12 G13 gQ :Q + G12 G14 gQ :Q + G12 G15 gQ :Q + G13 G5 gO :O + G13 G6 gO :O + G13 G7 gO :O + G13 G8 gO :O + G13 G9 gO :O + G13 G10 gO :O + G13 G11 gO :O + G13 G12 gO :O + G13 G14 gO :O + G13 G15 gO :O + G14 G5 :I + G14 G6 gI :I + G14 G7 gI :I + G14 G8 gI :I + G14 G9 gI :I + G14 G10 gI :I + G14 G11 gI :I + G14 G12 gI :I + G14 G13 gI :I + G14 G15 gI :I + G15 G5 gN :N + G15 G6 :N + G15 G7 gN :N + G15 G8 gN :N + G15 G9 gN :N + G15 G10 gN :N + G15 G11 gN :N + G15 G12 gN :N + G15 G14 gN :N + G15 G13 gN :N } */ diff --git a/cc1/tests/test014.c b/cc1/tests/test014.c @@ -20,28 +20,30 @@ test014.c:34: warning: 'f' defined but not used test014.c:34: warning: 'par' defined but not used test014.c:37: error: conflicting types for 'd' output: -G1 I "a -Y2 K "b -X3 I "c -G6 I F "func1 +V2 K #NC +V4 K #N9 +G5 I "a +Y6 K "b +X7 I "c +G10 I F "func1 { \ -A7 I "h -T8 K "i -R9 W "j -X10 I "k -T11 Z "a +A11 I "h +T12 K "i +R13 W "j +X14 I "k +T15 Z "a h #I0 } -G14 0 F "func2 +G18 0 F "func2 { -R12 I "par +R16 I "par \ -A15 I "par +A19 I "par } -T18 0 F "func3 +T21 0 F "func3 { -R16 I "par +R20 I "par \ } */ diff --git a/cc1/tests/test015.c b/cc1/tests/test015.c @@ -4,25 +4,27 @@ name: TEST015 description: Stress namespace mechanism error: -test015.c:54: error: label 's' already defined +test015.c:56: error: label 's' already defined output: -S8 "s2 #N2 #N1 -M9 I "s #N0 -S5 "s1 #N4 #N1 -M6 I "s #N0 -M10 S8 "s1 #N2 -S2 "s #N4 #N1 -M11 S5 "s #N0 -G12 S2 "s2 -G14 I F "main +V2 K #NC +V4 K #N9 +S12 "s2 #N2 #N1 +M13 I "s #N0 +S9 "s1 #N4 #N1 +M10 I "s #N0 +M14 S12 "s1 #N2 +S6 "s #N4 #N1 +M15 S9 "s #N0 +G16 S6 "s2 +G18 I F "main { \ - j L15 -A16 S2 "s -A17 I "s - h A17 - h A16 M11 .S5 M6 .I A16 M11 .S5 M10 .S8 M9 .I +I -L15 + j L19 +A20 S6 "s +A21 I "s + h A21 + h A20 M15 .S9 M10 .I A20 M15 .S9 M14 .S12 M13 .I +I +L19 */ typedef struct s s; diff --git a/cc1/tests/test016.c b/cc1/tests/test016.c @@ -7,40 +7,42 @@ error: test016.c:42: error: redefinition of 'func2' test016.c:46: error: incompatible types when assigning output: -G1 I "g -G3 I F "func1 +V2 K #NC +V4 K #N9 +G5 I "g +G7 I F "func1 { \ -A4 I "x -A6 P "p - G1 #I1 :I - A4 #I1 :I - A6 A4 'P :P - A6 @I #I0 :I - y L8 A4 #I0 =I +A8 I "x +A10 P "p + G5 #I1 :I + A8 #I1 :I + A10 A8 'P :P + A10 @I #I0 :I + y L11 A8 #I0 =I h #I1 -L8 - A6 G1 'P :P - A6 @I #I0 :I - y L9 A6 #P0 !I +L11 + A10 G5 'P :P + A10 @I #I0 :I + y L12 A10 #P0 !I h #I1 -L9 +L12 h #I0 } -G11 I F "func2 +G13 I F "func2 { \ -A12 I "x -A14 P "p -A17 P "pp - A12 #I1 :I - A14 A12 'P :P - A17 A14 'P :P - y L19 A14 #P0 =I - A17 @P @I #I0 :I +A14 I "x +A16 P "p +A18 P "pp + A14 #I1 :I + A16 A14 'P :P + A18 A16 'P :P + y L19 A16 #P0 =I + A18 @P @I #I0 :I L19 - A14 #P0 :P - h A12 + A16 #P0 :P + h A14 } */ diff --git a/cc1/tests/test017.c b/cc1/tests/test017.c @@ -5,25 +5,27 @@ name: TEST017 description: Basic test about pointers and structs error: output: -G10 I F "main +V2 K #NC +V4 K #N9 +S6 "s1 #N4 #N1 +M7 I "y #N0 +M8 I "z #N2 +S10 "s2 #N4 #N2 +M12 P "p #N0 +G14 I F "main { \ -S2 "s1 #N4 #N1 -M3 I "y #N0 -M4 I "z #N2 -A11 S2 "nested -S6 "s2 #N4 #N2 -M8 P "p #N0 -A12 S6 "v - A12 M8 .P A11 'P :P - A12 M8 .P @S2 M3 .I #I1 :I - A12 M8 .P @S2 M4 .I #I2 :I - y L13 A11 M3 .I #I1 =I +A15 S6 "nested +A16 S10 "v + A16 M12 .P A15 'P :P + A16 M12 .P @S6 M7 .I #I1 :I + A16 M12 .P @S6 M8 .I #I2 :I + y L17 A15 M7 .I #I1 =I h #I1 -L13 - y L14 A11 M4 .I #I2 =I +L17 + y L18 A15 M8 .I #I2 =I h #I2 -L14 +L18 h #I0 } */ diff --git a/cc1/tests/test018.c b/cc1/tests/test018.c @@ -5,32 +5,34 @@ name: TEST018 description: Basic test for arrays error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -V3 K #N4 -V4 V3 #N2 -A5 V4 "arr -A7 P "p -A9 P "q -V10 I #N4 -A11 V10 "v - A7 A5 'P :P - A9 A5 'P #P4 +P #P3 +P :P - A5 'P #P4 +P #P3 +P @K #K2 :K - A11 #I2 :I - y L15 A5 'P #P4 +P #P3 +P @K gI #I2 =I - h #I1 -L15 - y L16 A7 #P4 +P #P3 +P @K gI #I2 =I - h #I1 -L16 - y L17 A9 @K gI #I2 =I +V7 K #N4 +V8 V7 #N2 +A9 V8 "arr +A11 P "p +A13 P "q +V14 I #N4 +A15 V14 "v + A11 A9 'P :P + A13 A9 'P #P4 +P #P3 +P :P + A9 'P #P4 +P #P3 +P @K #K2 :K + A15 #I2 :I + y L17 A9 'P #P4 +P #P3 +P @K gI #I2 =I h #I1 L17 - y L18 A11 #I2 =I + y L18 A11 #P4 +P #P3 +P @K gI #I2 =I h #I1 L18 + y L19 A13 @K gI #I2 =I + h #I1 +L19 + y L20 A15 #I2 =I + h #I1 +L20 h #I0 } */ diff --git a/cc1/tests/test019.c b/cc1/tests/test019.c @@ -7,29 +7,31 @@ error: test019.c:12: warning: division by 0 test019.c:13: warning: division by 0 output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "i - A3 #I3 :I - A3 #I1 :I - A3 #I12 :I - A3 #I2 :I - A3 #I0 :I - A3 A3 #I0 %I :I - A3 A3 #I0 %I :I - A3 #I8 :I - A3 #I2 :I - A3 #I4 :I - A3 #IC :I - A3 #I8 :I - A3 #IFFFD :I - A3 #IFFF3 :I - A3 #I1 :I - A3 #I0 :I - A3 #I0 :I - A3 #I1 :I - A3 #I0 :I +A7 I "i + A7 #I3 :I + A7 #I1 :I + A7 #I12 :I + A7 #I2 :I + A7 #I0 :I + A7 A7 #I0 %I :I + A7 A7 #I0 %I :I + A7 #I8 :I + A7 #I2 :I + A7 #I4 :I + A7 #IC :I + A7 #I8 :I + A7 #IFFFD :I + A7 #IFFF3 :I + A7 #I1 :I + A7 #I0 :I + A7 #I0 :I + A7 #I1 :I + A7 #I0 :I } */ diff --git a/cc1/tests/test020.c b/cc1/tests/test020.c @@ -4,44 +4,46 @@ name: TEST020 description: Basic test for integer algebraic identities error: -test020.c:82: warning: division by 0 -test020.c:83: warning: division by 0 +test020.c:84: warning: division by 0 +test020.c:85: warning: division by 0 output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "i - A3 A3 #I0 !I :I - A3 A3 #I0 !I #I1 ,I :I - A3 #I1 :I - A3 A3 #I0 !I :I - A3 A3 #I0 !I #I0 ,I :I - A3 A3 #I0 !I :I - A3 A3 #I0 !I :I - A3 #I0 :I - A3 A3 :I - A3 #I0 :I - A3 A3 :I - A3 #I0 :I - A3 A3 :I - A3 A3 :I - A3 A3 :I - A3 #I0 A3 -I :I - A3 A3 :I - A3 A3 :I - A3 A3 :I - A3 A3 :I - A3 A3 #I0 ,I :I - A3 A3 #I0 ,I :I - A3 A3 :I - A3 A3 :I - A3 A3 :I - A3 #I1 A3 /I :I - A3 A3 :I - A3 A3 :I - A3 A3 #I1 ,I :I - A3 A3 #I0 /I :I - A3 A3 #I0 %I :I +A7 I "i + A7 A7 #I0 !I :I + A7 A7 #I0 !I #I1 ,I :I + A7 #I1 :I + A7 A7 #I0 !I :I + A7 A7 #I0 !I #I0 ,I :I + A7 A7 #I0 !I :I + A7 A7 #I0 !I :I + A7 #I0 :I + A7 A7 :I + A7 #I0 :I + A7 A7 :I + A7 #I0 :I + A7 A7 :I + A7 A7 :I + A7 A7 :I + A7 #I0 A7 -I :I + A7 A7 :I + A7 A7 :I + A7 A7 :I + A7 A7 :I + A7 A7 #I0 ,I :I + A7 A7 #I0 ,I :I + A7 A7 :I + A7 A7 :I + A7 A7 :I + A7 #I1 A7 /I :I + A7 A7 :I + A7 A7 :I + A7 A7 #I1 ,I :I + A7 A7 #I0 /I :I + A7 A7 #I0 %I :I } */ diff --git a/cc1/tests/test021.c b/cc1/tests/test021.c @@ -6,21 +6,23 @@ description: Basic test for char constants comments: This test is done for z80 implementation error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 K "uc -A4 C "sc - A3 #KFF :K - A3 #K23 :K - A3 #K1 :K - A3 #K1 :K - A3 #K41 :K - A4 #CFF :C - A4 #C23 :C - A4 #C1 :C - A4 #C1 :C - A4 #C41 :C +A7 K "uc +A8 C "sc + A7 #KFF :K + A7 #K23 :K + A7 #K1 :K + A7 #K1 :K + A7 #K41 :K + A8 #CFF :C + A8 #C23 :C + A8 #C1 :C + A8 #C1 :C + A8 #C41 :C } */ diff --git a/cc1/tests/test022.c b/cc1/tests/test022.c @@ -6,27 +6,29 @@ description: Basic test for int constants comments: This test is done for z80 data types error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "i -A4 N "u - A3 #I1 :I - A3 #IFFFF :I - A3 #IFFFF :I - A3 #IFFFF :I - A3 #IFFFF :I - A3 #I3 :I - A3 #I1 :I - A3 #I0 :I - A4 #N1 :N - A4 #NFFFF :N - A4 #NFFFF :N - A4 #NFFFF :N - A4 #NFFFF :N - A4 #N0 :N - A4 #N3 :N - A4 #N0 :N +A7 I "i +A8 N "u + A7 #I1 :I + A7 #IFFFF :I + A7 #IFFFF :I + A7 #IFFFF :I + A7 #IFFFF :I + A7 #I3 :I + A7 #I1 :I + A7 #I0 :I + A8 #N1 :N + A8 #NFFFF :N + A8 #NFFFF :N + A8 #NFFFF :N + A8 #NFFFF :N + A8 #N0 :N + A8 #N3 :N + A8 #N0 :N h #I0 } */ diff --git a/cc1/tests/test023.c b/cc1/tests/test023.c @@ -6,27 +6,29 @@ description: Basic test for long constants comments: This test is done for z80 data types error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 W "i -A4 Z "u - A3 #W1 :W - A3 #WFFFFFFFF :W - A3 #WFFFFFFFF :W - A3 #WFFFF :W - A3 #WFFFFFFFF :W - A3 #W3 :W - A3 #W1 :W - A3 #W0 :W - A4 #Z1 :Z - A4 #ZFFFFFFFF :Z - A4 #ZFFFFFFFF :Z - A4 #ZFFFF :Z - A4 #ZFFFFFFFF :Z - A4 #Z3 :Z - A4 #Z1 :Z - A4 #Z0 :Z +A7 W "i +A8 Z "u + A7 #W1 :W + A7 #WFFFFFFFF :W + A7 #WFFFFFFFF :W + A7 #WFFFF :W + A7 #WFFFFFFFF :W + A7 #W3 :W + A7 #W1 :W + A7 #W0 :W + A8 #Z1 :Z + A8 #ZFFFFFFFF :Z + A8 #ZFFFFFFFF :Z + A8 #ZFFFF :Z + A8 #ZFFFFFFFF :Z + A8 #Z3 :Z + A8 #Z1 :Z + A8 #Z0 :Z h #I0 } */ diff --git a/cc1/tests/test024.c b/cc1/tests/test024.c @@ -6,25 +6,27 @@ description: Basic test for long long constants comments: This test is done for z80 data types error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 Q "i -A4 O "u - A3 #Q1 :Q - A3 #QFFFFFFFFFFFFFFFF :Q - A3 #QFFFFFFFFFFFFFFFF :Q - A3 #QFFFF :Q - A3 #QFFFFFFFFFFFFFFFF :Q - A3 #Q3 :Q - A3 #Q1 :Q - A4 #O1 :O - A4 #OFFFFFFFFFFFFFFFF :O - A4 #OFFFFFFFFFFFFFFFF :O - A4 #OFFFF :O - A4 #OFFFFFFFFFFFFFFFF :O - A4 #O3 :O - A4 #O0 :O +A7 Q "i +A8 O "u + A7 #Q1 :Q + A7 #QFFFFFFFFFFFFFFFF :Q + A7 #QFFFFFFFFFFFFFFFF :Q + A7 #QFFFF :Q + A7 #QFFFFFFFFFFFFFFFF :Q + A7 #Q3 :Q + A7 #Q1 :Q + A8 #O1 :O + A8 #OFFFFFFFFFFFFFFFF :O + A8 #OFFFFFFFFFFFFFFFF :O + A8 #OFFFF :O + A8 #OFFFFFFFFFFFFFFFF :O + A8 #O3 :O + A8 #O0 :O h #I0 } */ diff --git a/cc1/tests/test025.c b/cc1/tests/test025.c @@ -5,16 +5,18 @@ name: TEST025 descritpion: Test of ifdef and ifndef error: output: -G1 I "a -G2 I "b -G3 I "c -G4 I "d -G5 I "_1 -G6 I "_2 -G7 I "e_ -G8 I "f_ -G9 I "h -G10 I "i +V2 K #NC +V4 K #N9 +G5 I "a +G6 I "b +G7 I "c +G8 I "d +G9 I "_1 +G10 I "_2 +G11 I "e_ +G12 I "f_ +G13 I "h +G14 I "i */ #define FOO diff --git a/cc1/tests/test026.c b/cc1/tests/test026.c @@ -5,22 +5,24 @@ name: TEST026 descritpion: Test of predefined cpp macros error: output: -G3 I F "main +V2 K #NC +V4 K #N9 +G7 I F "main { \ -A4 I "y -A6 P "p -V8 K #NA -Y7 V8 " ( +A8 I "y +A10 P "p +V12 K #NA +Y11 V12 " ( #"test026.c #K00 ) - A6 Y7 'P :P - A4 #I24 :I - A4 #I1 :I - A4 #I1 :I - A4 #I1 :I - A4 #I1 :I + A10 Y11 'P :P + A8 #I26 :I + A8 #I1 :I + A8 #I1 :I + A8 #I1 :I + A8 #I1 :I } */ diff --git a/cc1/tests/test027.c b/cc1/tests/test027.c @@ -5,17 +5,19 @@ name: TEST027 description: Test of cpp stringizer error: output: -G3 I F "main +V2 K #NC +V4 K #N9 +G7 I F "main { \ -A5 P "p -V7 K #N19 -Y6 V7 " ( +A9 P "p +V11 K #N19 +Y10 V11 " ( #"hello is better than bye #K00 ) - A5 Y6 'P :P - h A5 @K gI + A9 Y10 'P :P + h A9 @K gI } */ diff --git a/cc1/tests/test028.c b/cc1/tests/test028.c @@ -5,15 +5,17 @@ name: TEST028 description: Test of reinterpretation in define error: output: -G6 P F "foo +V2 K #NC +V4 K #N9 +G10 P F "foo { \ -V8 K #N3 -Y10 V8 " ( +V12 K #N3 +Y14 V12 " ( #"hi #K00 ) - h Y10 'P + h Y14 'P } */ diff --git a/cc1/tests/test029.c b/cc1/tests/test029.c @@ -7,16 +7,18 @@ comments: f(2) will expand to 2*g, which will expand to 2*f, and in this moment f will not be expanded because the macro definition is a function alike macro, and in this case there is no arguments. error: -test029.c:32: warning: expression without side effects -test029.c:37: error: redefinition of 'f1' -test029.c:38: error: 'f' undeclared -test029.c:38: warning: expression without side effects +test029.c:34: warning: expression without side effects +test029.c:39: error: redefinition of 'f1' +test029.c:40: error: 'f' undeclared +test029.c:40: warning: expression without side effects output: -G3 I F "f1 +V2 K #NC +V4 K #N9 +G7 I F "f1 { \ -A4 I "f - A4 #I2 *I +A8 I "f + A8 #I2 *I } */ diff --git a/cc1/tests/test030.c b/cc1/tests/test030.c @@ -5,30 +5,32 @@ name: TEST030 description: Basic test for vararg functions error: output: -G14 I F "f1 +V2 K #NC +V4 K #N9 +S6 "foo #N18 #N2 +M7 I "i #N0 +M8 I "j #N2 +M9 I "k #N4 +M11 P "p #N6 +M12 J "v #N8 +G18 I F "f1 { -S2 "foo #N18 #N2 -M3 I "i #N0 -M4 I "j #N2 -M5 I "k #N4 -M7 P "p #N6 -M8 J "v #N8 -A9 S2 "f -A11 P "p -A12 I "n +A13 S6 "f +A15 P "p +A16 I "n \ - y L15 A9 M3 .I A11 @S2 M3 .I =I + y L19 A13 M7 .I A15 @S6 M7 .I =I h #I0 -L15 - h A11 @S2 M4 .I A12 +I +L19 + h A15 @S6 M8 .I A16 +I } -G17 I F "main +G21 I F "main { \ -A18 S2 "f - A18 M3 .I A18 M4 .I #I1 :I :I - G14 A18 pS2 A18 'P pP #I2 pI cI - G14 A18 pS2 A18 'P pP #I2 pI #I1 pI A18 pS2 A18 'P pP cI +A22 S6 "f + A22 M7 .I A22 M8 .I #I1 :I :I + G18 A22 pS6 A22 'P pP #I2 pI cI + G18 A22 pS6 A22 'P pP #I2 pI #I1 pI A22 pS6 A22 'P pP cI h #I0 } */ diff --git a/cc1/tests/test032.c b/cc1/tests/test032.c @@ -5,17 +5,20 @@ name: TEST032 description: test special characters @ and $ in macro definitions error: output: -G5 I F "main +V2 K #NC +V4 K #N9 +V7 K #N1E +G9 I F "main { \ -V9 K #N2C -Y8 V9 " ( +V13 K #N2C +Y12 V13 " ( #"This is a string $ or # or ##and it is ok ! #K00 ) -A7 P "p - A7 Y8 'P :P - h A7 #P0 !I +A11 P "p + A11 Y12 'P :P + h A11 #P0 !I } */ diff --git a/cc1/tests/test033.c b/cc1/tests/test033.c @@ -5,7 +5,9 @@ name: TEST033 description: test for #if defined() error: output: -G1 I "c +V2 K #NC +V4 K #N9 +G5 I "c */ #if defined(FOO) diff --git a/cc1/tests/test034.c b/cc1/tests/test034.c @@ -4,24 +4,28 @@ name: TEST034 description: Basic test for incomplete structures error: -test034.c:46: error: declared variable 'bar' of incomplete type -test034.c:46: error: redeclaration of 'bar' +test034.c:50: error: declared variable 'bar' of incomplete type +test034.c:50: error: redeclaration of 'bar' output: -X3 S2 "x -X5 I F "foo -G7 I F "main +V2 K #NC +V4 K #N9 +X7 S6 "x +X9 I F "foo +G10 I F "main { \ -X8 S2 "x - h X8 'P #P0 !I +X11 S6 "x + h X11 'P #P0 !I } -G5 I F "foo +S6 "X #N2 #N1 +M13 I "v #N0 +G9 I F "foo { \ - X3 M10 .I #I0 :I - h X3 M10 .I + X7 M13 .I #I0 :I + h X7 M13 .I } -X14 S12 "bar2 +X17 S15 "bar2 */ extern struct X x; diff --git a/cc1/tests/test035.c b/cc1/tests/test035.c @@ -5,25 +5,8 @@ name: TEST035 description: Basic test for enumerations error: output: -G7 I F "main -{ -\ -A8 I "e - A8 #I3 :I - y L9 A8 #I1 =I - h #I0 -L9 - y L10 A8 #I0 =I - h #I1 -L10 - y L11 A8 #I2 =I - h #I2 -L11 - y L12 A8 #I3 =I - h #I3 -L12 - h #I0 -} +V2 K #NC +V4 K #N9 */ enum E { diff --git a/cc1/tests/test036.c b/cc1/tests/test036.c @@ -4,48 +4,50 @@ name: TEST036 description: Duff's device error: -test036.c:59: warning: type defaults to 'int' in declaration +test036.c:61: warning: type defaults to 'int' in declaration output: -G5 I F "send +V2 K #NC +V4 K #N9 +G9 I F "send { -R1 P "to -R2 P "from -R3 I "count +R5 P "to +R6 P "from +R7 I "count \ -R8 I "n - R8 R3 #I7 +I #I8 /I :I - s R3 #I8 %I - v L10 #I0 -L10 - e -L11 - R1 @I R2 #P2 :iP @I :I - v L13 #I7 +R11 I "n + R11 R7 #I7 +I #I8 /I :I + s R7 #I8 %I + v L13 #I0 L13 - R1 @I R2 #P2 :iP @I :I - v L14 #I6 + e L14 - R1 @I R2 #P2 :iP @I :I - v L15 #I5 -L15 - R1 @I R2 #P2 :iP @I :I - v L16 #I4 + R5 @I R6 #P2 :iP @I :I + v L16 #I7 L16 - R1 @I R2 #P2 :iP @I :I - v L17 #I3 + R5 @I R6 #P2 :iP @I :I + v L17 #I6 L17 - R1 @I R2 #P2 :iP @I :I - v L18 #I2 + R5 @I R6 #P2 :iP @I :I + v L18 #I5 L18 - R1 @I R2 #P2 :iP @I :I - v L19 #I1 + R5 @I R6 #P2 :iP @I :I + v L19 #I4 L19 - R1 @I R2 #P2 :iP @I :I - y L11 R8 #I1 :-I #I0 >I + R5 @I R6 #P2 :iP @I :I + v L20 #I3 +L20 + R5 @I R6 #P2 :iP @I :I + v L21 #I2 +L21 + R5 @I R6 #P2 :iP @I :I + v L22 #I1 +L22 + R5 @I R6 #P2 :iP @I :I + y L14 R11 #I1 :-I #I0 >I b +L15 + t L12 L12 - t L9 -L9 } */ diff --git a/cc1/tests/test037.c b/cc1/tests/test037.c @@ -5,22 +5,24 @@ name: TEST037 description: Basic sizeof test comments: This test is based in z80 sizes error: -test037.c:30: warning: conditional expression is constant test037.c:32: warning: conditional expression is constant test037.c:34: warning: conditional expression is constant +test037.c:36: warning: conditional expression is constant output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ - y L3 #I1 + y L7 #I1 h #I1 -L3 - y L4 #I1 +L7 + y L8 #I1 h #I2 -L4 - y L5 #I1 +L8 + y L9 #I1 h #I3 -L5 +L9 h #I0 } */ diff --git a/cc1/tests/test038.c b/cc1/tests/test038.c @@ -4,23 +4,25 @@ name: TEST038 description: Basic test for tentative definitions error: -test038.c:45: error: redeclaration of 'x' +test038.c:47: error: redeclaration of 'x' output: -G1 I "x -G1 I "x ( +V2 K #NC +V4 K #N9 +G5 I "x +G5 I "x ( #I0 ) -X3 I F "main -G5 P F "foo +X7 I F "main +G9 P F "foo { \ - h X3 'P + h X7 'P } -G3 I F "main +G7 I F "main { \ - G1 #I0 :I - h G1 + G5 #I0 :I + h G5 } */ diff --git a/cc1/tests/test039.c b/cc1/tests/test039.c @@ -6,28 +6,30 @@ description: Test of integer constants comments: This test is done for z80 sizes error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "i -A4 N "u -A5 W "l -A6 Z "ul -A7 Q "ll -A8 O "ull - A3 #I1 :I - A3 #I1 :I - A4 #N1 :N - A4 #N1 :N - A5 #W1 :W - A5 #W0 :W - A4 #N0 :N - A6 #Z1 :Z - A5 #W1 :W - A7 #Q0 :Q - A6 #Z0 :Z - A8 #O1 :O - A8 #O1 :O +A7 I "i +A8 N "u +A9 W "l +A10 Z "ul +A11 Q "ll +A12 O "ull + A7 #I1 :I + A7 #I1 :I + A8 #N1 :N + A8 #N1 :N + A9 #W1 :W + A9 #W0 :W + A8 #N0 :N + A10 #Z1 :Z + A9 #W1 :W + A11 #Q0 :Q + A10 #Z0 :Z + A12 #O1 :O + A12 #O1 :O h #I0 } */ diff --git a/cc1/tests/test040.c b/cc1/tests/test040.c @@ -5,15 +5,17 @@ name: TEST040 description: Test for bug parsing typenames in struct definition error: output: -G10 I F "main +V2 K #NC +V4 K #N9 +S6 "List #NC #N2 +M8 I "len #N0 +M10 P "head #N2 +M11 P "back #N4 +G13 I F "main { \ -S2 "List #NC #N2 -M4 I "len #N0 -M6 P "head #N2 -M8 P "back #N4 -A11 S2 "List - h A11 M4 .I +A14 S6 "List + h A14 M8 .I } */ diff --git a/cc1/tests/test041.c b/cc1/tests/test041.c @@ -4,32 +4,34 @@ name: TEST041 description: Test for bug parsing ternary operators error: -test041.c:51: error: type mismatch in conditional expression -test041.c:51: error: incompatible types when assigning -test041.c:52: error: used struct/union type value where scalar is required -test041.c:52: warning: expression without side effects -test041.c:53: warning: 'i' defined but not used -test041.c:53: warning: 'foo' defined but not used -test041.c:53: warning: 's' defined but not used +test041.c:53: error: type mismatch in conditional expression +test041.c:53: error: incompatible types when assigning +test041.c:54: error: used struct/union type value where scalar is required +test041.c:54: warning: expression without side effects +test041.c:55: warning: 'i' defined but not used +test041.c:55: warning: 'foo' defined but not used +test041.c:55: warning: 's' defined but not used output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -A3 I "i -A5 P "q -A7 P "s -A8 P "p -S10 "foo #N2 #N1 -M11 I "i #N0 -A12 S10 "foo - A3 A3 #I0 !I #W0 #W0 ?W gI :I - A8 A3 #I0 !I #P0 #P0 ?P :P - A8 A3 #I0 !I #P0 #P0 ?P :P - A8 A3 #I0 !I #P0 #P0 ?P :P - A5 A3 #I0 !I #P0 A8 ?P :P - A5 A3 #I0 !I A8 #P0 ?P :P - A5 A3 #I0 !I A5 #P0 ?P :P - A5 A3 #I0 !I #P0 A5 ?P :P +A7 I "i +A9 P "q +A11 P "s +A12 P "p +S14 "foo #N2 #N1 +M15 I "i #N0 +A16 S14 "foo + A7 A7 #I0 !I #W0 #W0 ?W gI :I + A12 A7 #I0 !I #P0 #P0 ?P :P + A12 A7 #I0 !I #P0 #P0 ?P :P + A12 A7 #I0 !I #P0 #P0 ?P :P + A9 A7 #I0 !I #P0 A12 ?P :P + A9 A7 #I0 !I A12 #P0 ?P :P + A9 A7 #I0 !I A9 #P0 ?P :P + A9 A7 #I0 !I #P0 A9 ?P :P */ int diff --git a/cc1/tests/test042.c b/cc1/tests/test042.c @@ -4,12 +4,14 @@ name: TEST042 description: Test for bug parsing ternary operators error: -test042.c:20: error: bad type conversion requested +test042.c:22: error: bad type conversion requested output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ -X4 0 F "f +X8 0 F "f */ int diff --git a/cc1/tests/test043.c b/cc1/tests/test043.c @@ -5,14 +5,16 @@ name: TEST043 description: Test for double typedef (taken from plan9 kernel) error: output: -S2 "Clock0link #N8 #N2 -M6 P "clock #N0 -M8 P "link #N2 -G9 S2 "cl0 -G11 I F "main +V2 K #NC +V4 K #N9 +S6 "Clock0link #N8 #N2 +M10 P "clock #N0 +M12 P "link #N2 +G13 S6 "cl0 +G15 I F "main { \ - G9 M6 .P @F c0 + G13 M10 .P @F c0 h #I0 } */ diff --git a/cc1/tests/test045.c b/cc1/tests/test045.c @@ -5,15 +5,17 @@ name: TEST045 description: Basic test of initializers error: output: -G1 I "x ( +V2 K #NC +V4 K #N9 +G5 I "x ( #I5 ) -G3 I F "main +G7 I F "main { \ - y L4 G1 #I5 =I + y L8 G5 #I5 =I h #I1 -L4 +L8 h #I0 } */ diff --git a/cc1/tests/test046.c b/cc1/tests/test046.c @@ -5,24 +5,26 @@ name: TEST046 description: Basic test for initializators error: output: -V1 I #N3 -G2 V1 "x ( +V2 K #NC +V4 K #N9 +V5 I #N3 +G6 V5 "x ( #I1 #I2 #I3 ) -G4 I F "main +G8 I F "main { \ - y L5 G2 #I1 =I + y L9 G6 #I1 =I h #I1 -L5 - y L7 G2 'P #P2 +P @I #I2 =I +L9 + y L11 G6 'P #P2 +P @I #I2 =I h #I2 -L7 - y L9 G2 'P #P4 +P @I #I3 =I +L11 + y L12 G6 'P #P4 +P @I #I3 =I h #I3 -L9 +L12 h #I0 } */ diff --git a/cc1/tests/test047.c b/cc1/tests/test047.c @@ -5,27 +5,29 @@ name: TEST047 description: Basic test for initializer error: output: -S2 "S #N6 #N1 -M3 I "a #N0 -M4 I "b #N2 -M5 I "c #N4 -G6 S2 "x ( +V2 K #NC +V4 K #N9 +S6 "S #N6 #N1 +M7 I "a #N0 +M8 I "b #N2 +M9 I "c #N4 +G10 S6 "x ( #I1 #I2 #I3 ) -G8 I F "main +G12 I F "main { \ - y L9 G6 M3 .I #I1 =I + y L13 G10 M7 .I #I1 =I h #I1 -L9 - y L10 G6 M4 .I #I2 =I +L13 + y L14 G10 M8 .I #I2 =I h #I2 -L10 - y L11 G6 M5 .I #I3 =I +L14 + y L15 G10 M9 .I #I3 =I h #I3 -L11 +L15 h #I0 } */ diff --git a/cc1/tests/test048.c b/cc1/tests/test048.c @@ -5,23 +5,25 @@ name: TEST048 description: Basic test for initializer error: output: -S2 "S #N4 #N1 -M3 I "a #N0 -M4 I "b #N2 -V5 S2 #N1 -G6 V5 "x ( +V2 K #NC +V4 K #N9 +S6 "S #N4 #N1 +M7 I "a #N0 +M8 I "b #N2 +V9 S6 #N1 +G10 V9 "x ( #I1 #I2 ) -G8 I F "main +G12 I F "main { \ - y L9 G6 M3 .I #I1 =I + y L13 G10 M7 .I #I1 =I h #I1 -L9 - y L11 G6 M4 .I #I2 =I +L13 + y L15 G10 M8 .I #I2 =I h #I2 -L11 +L15 h #I0 } */ diff --git a/cc1/tests/test049.c b/cc1/tests/test049.c @@ -5,18 +5,20 @@ name: TEST049 description: Basic test for initializer error: output: -G1 I "x ( +V2 K #NC +V4 K #N9 +G5 I "x ( #I5 ) -G3 P "p ( - G1 'P +G7 P "p ( + G5 'P ) -G6 I F "main +G9 I F "main { \ - y L7 G3 @I #I5 =I + y L10 G7 @I #I5 =I h #I1 -L7 +L10 h #I0 } */ diff --git a/cc1/tests/test051.c b/cc1/tests/test051.c @@ -5,24 +5,26 @@ name: TEST051 description: Basic test for initializer error: output: -V1 I #N3 -G2 V1 "arr ( +V2 K #NC +V4 K #N9 +V5 I #N3 +G6 V5 "arr ( #I0 #I1 #I2 ) -G4 I F "main +G8 I F "main { \ - y L5 G2 #I0 =I + y L9 G6 #I0 =I h #I1 -L5 - y L7 G2 'P #P2 +P @I #I1 =I +L9 + y L11 G6 'P #P2 +P @I #I1 =I h #I2 -L7 - y L9 G2 'P #P4 +P @I #I2 =I +L11 + y L12 G6 'P #P4 +P @I #I2 =I h #I3 -L9 +L12 h #I0 } */ diff --git a/cc1/tests/test052.c b/cc1/tests/test052.c @@ -5,31 +5,33 @@ name: TEST052 description: Basic test for initializer error: output: -S2 "S #N4 #N1 -M3 I "a #N0 -M4 I "b #N2 -V5 S2 #N2 -G6 V5 "arr ( +V2 K #NC +V4 K #N9 +S6 "S #N4 #N1 +M7 I "a #N0 +M8 I "b #N2 +V9 S6 #N2 +G10 V9 "arr ( #I1 #I2 #I3 #I4 ) -G8 I F "main +G12 I F "main { \ - y L9 G6 M3 .I #I1 =I + y L13 G10 M7 .I #I1 =I h #I1 -L9 - y L11 G6 M4 .I #I2 =I +L13 + y L15 G10 M8 .I #I2 =I h #I2 -L11 - y L12 G6 'P #P4 +P @S2 M3 .I #I3 =I +L15 + y L16 G10 'P #P4 +P @S6 M7 .I #I3 =I h #I3 -L12 - y L13 G6 'P #P4 +P @S2 M4 .I #I4 =I +L16 + y L17 G10 'P #P4 +P @S6 M8 .I #I4 =I h #I4 -L13 +L17 h #I0 } */ diff --git a/cc1/tests/test053.c b/cc1/tests/test053.c @@ -5,22 +5,24 @@ name: TEST053 description: Basic test for initializer error: output: -S2 "S #N4 #N1 -M3 I "a #N0 -M4 I "b #N2 -G5 S2 "s ( +V2 K #NC +V4 K #N9 +S6 "S #N4 #N1 +M7 I "a #N0 +M8 I "b #N2 +G9 S6 "s ( #I1 #I2 ) -G7 I F "main +G11 I F "main { \ - y L8 G5 M3 .I #I1 =I + y L12 G9 M7 .I #I1 =I h #I1 -L8 - y L9 G5 M4 .I #I2 =I +L12 + y L13 G9 M8 .I #I2 =I h #I2 -L9 +L13 h #I0 } */ diff --git a/cc1/tests/test056.c b/cc1/tests/test056.c @@ -5,14 +5,16 @@ name: TEST056 desciption: Test of overlaying designators error: output: -V6 K #N3 -S2 "S #NB #N1 -M3 I "a #N0 -M4 I "b #N2 -M5 I "c #N4 -M7 V6 "d #N6 -M8 I "e #N9 -G9 S2 "s ( +V2 K #NC +V4 K #N9 +V10 K #N3 +S6 "S #NB #N1 +M7 I "a #N0 +M8 I "b #N2 +M9 I "c #N4 +M11 V10 "d #N6 +M12 I "e #N9 +G13 S6 "s ( #I1 #I2 #I0 @@ -21,13 +23,12 @@ G9 S2 "s ( #K0 #I0 ) -V10 K #N0 -G11 V10 "m ( +G15 V14 "m ( ) -G13 I F "main +G17 I F "main { \ - h G9 M7 .V6 'P #P2 +P @K gI gN #N0 =I + h G13 M11 .V10 'P #P2 +P @K gI gN #N0 =I } */ diff --git a/cc1/tests/test057.c b/cc1/tests/test057.c @@ -5,9 +5,10 @@ name: TEST057 description: test of initialization of incomplete arrays error: output: -V1 I #N3 -V2 V1 #N2 -G3 V2 "arr1 ( +V2 K #NC +V4 K #N9 +V5 I #N3 +G7 V6 "arr1 ( #I2 #I7 #I5 @@ -15,9 +16,7 @@ G3 V2 "arr1 ( #I1 #I2 ) -V4 I #N3 -V5 V4 #N2 -G6 V5 "arr2 ( +G8 V6 "arr2 ( #I2 #I7 #I5 @@ -25,10 +24,10 @@ G6 V5 "arr2 ( #I1 #I2 ) -G8 I F "main +G10 I F "main { \ - h G3 'P #P6 +P #P4 +P @I G6 'P #P6 +P #P6 +P @I !I + h G7 'P #P6 +P #P4 +P @I G8 'P #P6 +P #P6 +P @I !I } */ diff --git a/cc1/tests/test058.c b/cc1/tests/test058.c @@ -5,10 +5,11 @@ name: TEST058 description: Test of initialization mixing designators and sequence error: output: -V1 I #N5 -V2 V1 #N3 -V3 V2 #N2 -G4 V3 "arr ( +V2 K #NC +V4 K #N9 +V5 I #N5 +V6 V5 #N3 +G8 V7 "arr ( #I0 #I0 #I3 @@ -40,10 +41,10 @@ G4 V3 "arr ( #I0 #I0 ) -G6 I F "main +G10 I F "main { \ - h G4 'P #PA +P #P8 +P @I G4 'P #P1E +P #PA +P #P8 +P @I !I + h G8 'P #PA +P #P8 +P @I G8 'P #P1E +P #PA +P #P8 +P @I !I } */ diff --git a/cc1/tests/test060.c b/cc1/tests/test060.c @@ -5,7 +5,9 @@ name: TEST060 description: Test for correctness of #line error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ h #I0 diff --git a/cc1/tests/test061.c b/cc1/tests/test061.c @@ -5,7 +5,9 @@ name: TEST061 description: Test for macros without arguments but with parenthesis error: output: -G3 I F "main +V2 K #NC +V4 K #N9 +G7 I F "main { \ h #I1 diff --git a/cc1/tests/test062.c b/cc1/tests/test062.c @@ -5,7 +5,9 @@ name: TEST062 description: Test for hexadecimal numbers in upper and lower case error: output: -G2 I F "main +V2 K #NC +V4 K #N9 +G6 I F "main { \ h #I1 diff --git a/cc1/tests/test064.c b/cc1/tests/test064.c @@ -5,14 +5,16 @@ name: TEST064 description: Test function alike macro without parenthesis error: output: -G5 I F "main +V2 K #NC +V4 K #N9 +S5 " #N2 #N1 +M6 I "f #N0 +G9 I F "main { \ -S1 " #N2 #N1 -M2 I "f #N0 -A6 S1 "s - A6 M2 .I #I0 :I - h A6 M2 .I +A10 S5 "s + A10 M6 .I #I0 :I + h A10 M6 .I } */ diff --git a/cc1/tests/test065.c b/cc1/tests/test065.c @@ -4,39 +4,41 @@ name: TEST065 description: Test decay mixed with * operators error: -test065.c:65: error: increment of pointer to an incomplete type -test065.c:65: error: invalid use of undefined type -test065.c:66: warning: 'argv' defined but not used +test065.c:67: error: increment of pointer to an incomplete type +test065.c:67: error: invalid use of undefined type +test065.c:68: warning: 'argv' defined but not used output: -G7 I F "main +V2 K #NC +V4 K #N9 +G11 I F "main { -A1 I "argc -A5 P "argv +A5 I "argc +A9 P "argv \ -V8 I #N1 -A9 V8 "v -A12 P "p +V12 I #N1 +A13 V12 "v +A16 P "p A18 P "f1 -A21 P "f2 - A9 #I0 :I - A12 A9 'P :P - A18 G7 'P :P - A21 G7 'P :P - y L26 A1 #I0 !I +A19 P "f2 + A13 #I0 :I + A16 A13 'P :P + A18 G11 'P :P + A19 G11 'P :P + y L22 A5 #I0 !I h #I1 -L26 - y L27 G7 #I0 pI #P0 pP cI #I0 =I +L22 + y L23 G11 #I0 pI #P0 pP cI #I0 =I h #I2 -L27 - y L28 A18 @F #I0 pI #P0 pP cI #I0 =I +L23 + y L24 A18 @F #I0 pI #P0 pP cI #I0 =I h #I3 -L28 - y L29 A21 @F #I0 pI #P0 pP cI #I0 =I +L24 + y L25 A19 @F #I0 pI #P0 pP cI #I0 =I h #I4 -L29 - y L30 A12 @I #I0 !I +L25 + y L26 A16 @I #I0 !I h #I0 -L30 +L26 */ int diff --git a/cc1/tests/test066.c b/cc1/tests/test066.c @@ -4,13 +4,15 @@ name: TEST066 description: Test cpp defined operator error: -test066.c:53: error: operator 'defined' requires an identifier -test066.c:53: error: expected ')' before '<EOF>' +test066.c:55: error: operator 'defined' requires an identifier +test066.c:55: error: expected ')' before '<EOF>' output: -G1 I "x ( +V2 K #NC +V4 K #N9 +G5 I "x ( #I0 ) -G3 I F "main +G7 I F "main { \ h #I0