aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Changelog51
-rw-r--r--LICENSE4
-rw-r--r--Makefile95
-rw-r--r--Makefile.extr29
-rw-r--r--MenhirLib/Alphabet.v3
-rw-r--r--MenhirLib/Grammar.v3
-rw-r--r--MenhirLib/Interpreter.v1
-rw-r--r--MenhirLib/Interpreter_complete.v3
-rw-r--r--MenhirLib/Interpreter_correct.v3
-rw-r--r--MenhirLib/Validator_complete.v1
-rw-r--r--MenhirLib/Validator_safe.v1
-rw-r--r--README.md8
-rw-r--r--VERSION3
-rw-r--r--aarch64/Archi.v6
-rw-r--r--aarch64/Asm.v14
-rw-r--r--aarch64/Asmexpand.ml16
-rw-r--r--aarch64/Asmgenproof.v11
-rw-r--r--aarch64/CBuiltins.ml11
-rw-r--r--aarch64/Machregsaux.ml19
-rw-r--r--aarch64/TargetPrinter.ml6
-rw-r--r--aarch64/extractionMachdep.v3
-rw-r--r--arm/Archi.v3
-rw-r--r--arm/Asm.v4
-rw-r--r--arm/Asmexpand.ml4
-rw-r--r--arm/Asmgenproof.v8
-rw-r--r--arm/CBuiltins.ml13
-rw-r--r--arm/Machregsaux.ml20
-rw-r--r--arm/Machregsaux.mli3
-rw-r--r--backend/Debugvar.v2
-rw-r--r--backend/Duplicateaux.ml91
-rw-r--r--backend/IRC.ml6
-rw-r--r--backend/IRC.mli4
-rw-r--r--backend/Machregsnames.ml24
-rw-r--r--backend/Machregsnames.mli16
-rw-r--r--backend/NeedDomain.v2
-rw-r--r--backend/PrintAsmaux.ml4
-rw-r--r--backend/PrintLTL.ml2
-rw-r--r--backend/PrintMach.ml3
-rw-r--r--backend/PrintXTL.ml2
-rw-r--r--backend/Selection.v23
-rw-r--r--backend/Selectionproof.v84
-rw-r--r--cfrontend/C2C.ml18
-rw-r--r--cfrontend/CPragmas.ml11
-rw-r--r--cfrontend/PrintCsyntax.ml3
-rw-r--r--cfrontend/SimplExpr.v9
-rw-r--r--cfrontend/SimplExprproof.v165
-rw-r--r--cfrontend/SimplExprspec.v170
-rw-r--r--common/AST.v2
-rw-r--r--common/Builtins0.v6
-rwxr-xr-xconfigure155
-rwxr-xr-xcoq6
-rw-r--r--cparser/Bitfields.ml13
-rw-r--r--cparser/Cabs.v2
-rw-r--r--cparser/Cabshelper.ml1
-rw-r--r--cparser/Diagnostics.ml10
-rw-r--r--cparser/Elab.ml91
-rw-r--r--cparser/Env.ml3
-rw-r--r--cparser/Env.mli1
-rw-r--r--cparser/ExtendedAsm.ml2
-rw-r--r--cparser/Lexer.mll2
-rw-r--r--cparser/Parse.ml9
-rw-r--r--cparser/Parser.vy19
-rw-r--r--cparser/StructPassing.ml12
-rw-r--r--cparser/Transform.ml28
-rw-r--r--cparser/Transform.mli12
-rw-r--r--cparser/deLexer.ml1
-rw-r--r--cparser/handcrafted.messages2224
-rw-r--r--cparser/pre_parser.mly8
-rw-r--r--debug/Dwarfgen.ml4
-rw-r--r--doc/index.html10
-rw-r--r--driver/Clflags.ml1
-rw-r--r--driver/CommonOptions.ml10
-rw-r--r--driver/Driver.ml17
-rw-r--r--driver/Frontend.ml1
-rw-r--r--driver/Interp.ml55
-rw-r--r--exportclight/Clightdefs.v211
-rw-r--r--exportclight/Clightgen.ml11
-rw-r--r--exportclight/Clightnorm.ml13
-rw-r--r--exportclight/ExportClight.ml189
-rw-r--r--kvx/Asm.v7
-rw-r--r--kvx/Asmblockgen.v8
-rw-r--r--kvx/Asmexpand.ml8
-rw-r--r--kvx/Asmvliw.v42
-rw-r--r--kvx/Builtins1.v5
-rw-r--r--kvx/CBuiltins.ml4
-rw-r--r--kvx/Machregsaux.ml8
-rw-r--r--kvx/Machregsaux.mli3
-rw-r--r--kvx/SelectOp.vp1
-rw-r--r--kvx/TargetPrinter.ml3
-rw-r--r--lib/Camlcoq.ml79
-rw-r--r--lib/Commandline.ml (renamed from driver/Commandline.ml)0
-rw-r--r--lib/Commandline.mli (renamed from driver/Commandline.mli)0
-rw-r--r--lib/Floats.v4
-rw-r--r--lib/IEEE754_extra.v4
-rw-r--r--lib/Readconfig.mll2
-rw-r--r--lib/Zbits.v4
-rw-r--r--powerpc/Archi.v3
-rw-r--r--powerpc/Asm.v11
-rw-r--r--powerpc/AsmToJSON.ml3
-rw-r--r--powerpc/Asmexpand.ml36
-rw-r--r--powerpc/Asmgen.v9
-rw-r--r--powerpc/Asmgenproof.v8
-rw-r--r--powerpc/Asmgenproof1.v12
-rw-r--r--powerpc/Builtins1.v48
-rw-r--r--powerpc/CBuiltins.ml12
-rw-r--r--powerpc/Machregs.v4
-rw-r--r--powerpc/Machregsaux.ml20
-rw-r--r--powerpc/Machregsaux.mli3
-rw-r--r--powerpc/NeedOp.v2
-rw-r--r--powerpc/Op.v18
-rw-r--r--powerpc/PrintOp.ml8
-rw-r--r--powerpc/SelectOp.vp8
-rw-r--r--powerpc/SelectOpproof.v24
-rw-r--r--powerpc/TargetPrinter.ml6
-rw-r--r--powerpc/ValueAOp.v3
-rw-r--r--riscV/Archi.v3
-rw-r--r--riscV/Asmexpand.ml113
-rw-r--r--riscV/Machregs.v25
-rw-r--r--riscV/Machregsaux.ml18
-rw-r--r--riscV/Machregsaux.mli3
-rw-r--r--runtime/x86_64/i64_dtou.S10
-rw-r--r--runtime/x86_64/i64_utod.S18
-rw-r--r--runtime/x86_64/i64_utof.S18
-rw-r--r--runtime/x86_64/sysdeps.h18
-rw-r--r--runtime/x86_64/vararg.S63
-rw-r--r--test/clightgen/Makefile18
-rw-r--r--test/clightgen/annotations.c8
-rw-r--r--test/regression/Makefile5
-rw-r--r--test/regression/Results/builtins-aarch647
-rw-r--r--test/regression/Results/builtins-arm6
-rw-r--r--test/regression/Results/builtins-common393
-rw-r--r--test/regression/Results/builtins-common-kvx391
-rw-r--r--test/regression/Results/builtins-powerpc9
-rw-r--r--test/regression/Results/builtins-riscV6
-rw-r--r--test/regression/Results/builtins-x8612
-rw-r--r--test/regression/builtins-aarch64.c20
-rw-r--r--test/regression/builtins-arm.c10
-rw-r--r--test/regression/builtins-common.c58
-rw-r--r--test/regression/builtins-powerpc.c13
-rw-r--r--test/regression/builtins-riscV.c11
-rw-r--r--test/regression/builtins-x86.c19
-rw-r--r--tools/compiler_expand.ml4
-rw-r--r--tools/modorder.ml2
-rw-r--r--x86/Asm.v2
-rw-r--r--x86/Asmexpand.ml97
-rw-r--r--x86/CBuiltins.ml21
-rw-r--r--x86/ConstpropOp.vp5
-rw-r--r--x86/ConstpropOpproof.v2
-rw-r--r--x86/Conventions1.v200
-rw-r--r--x86/Machregsaux.ml18
-rw-r--r--x86/Machregsaux.mli3
-rw-r--r--x86/Stacklayout.v22
-rw-r--r--x86/TargetPrinter.ml60
-rw-r--r--x86/extractionMachdep.v20
-rw-r--r--x86_32/Archi.v6
-rw-r--r--x86_64/Archi.v6
157 files changed, 4035 insertions, 2244 deletions
diff --git a/.gitignore b/.gitignore
index 1eb13a29..771654d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,10 +31,12 @@
/Makefile.config
/.merlin
/_CoqProject
+/compile.pl
# Generated files
/.depend
/.depend.extr
/compcert.ini
+/compcert.config
/x86/ConstpropOp.v
/x86/SelectOp.v
/x86/SelectLong.v
diff --git a/Changelog b/Changelog
index 8cf4e548..f86691a6 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,54 @@
+Release 3.8, 2020-11-16
+=======================
+
+New features:
+- Support `_Static_assert` from ISO C11.
+- Support `__builtin_constant_p` from GCC and Clang.
+- New port: x86 64 bits Windows with the Cygwin 64 environment.
+ (configure with target `x86_64-cygwin`).
+- The following built-in functions are now available for all ports:
+ `__builtin_sqrt`, `__builtin_fabsf`, and all variants of
+ `__builtin_clz` and `__builtin_ctz`.
+- Added `__builtin_fmin` and `__builtin_fmax` for AArch64.
+
+Removed features:
+- The x86 32 bits port is no longer supported under macOS.
+
+Compiler internals:
+- Simpler translation of CompCert C casts used for their effects but
+ not for their values.
+- Known builtins whose results are unused are eliminated earlier.
+- Improved error reporting for `++` and `--` applied to pointers to
+ incomplete types.
+- Improved error reporting for redefinitions and implicit definitions
+ of built-in functions.
+- Added formal semantics for some PowerPC built-ins.
+
+The clightgen tool:
+- New `-canonical-idents` mode, selected by default, to change the way
+ C identifiers are encoded as CompCert idents (positive numbers).
+ In `-canonical-idents` mode, a fixed one-to-one encoding is used
+ so that the same identifier occurring in different compilation units
+ encodes to the same number.
+- The `-short-idents` flag restores the previous encoding where
+ C identifiers are consecutively numbered in order of appearance,
+ causing the same identifier to have different numbers in different
+ compilation units.
+- Removed the automatic translation of annotation builtins to Coq
+ logical assertions, which was never used and possibly confusing.
+
+Coq and OCaml development:
+- Compatibility with Coq 8.12.1, 8.12.0, 8.11.2, 8.11.1.
+- Can use already-installed Flocq and MenhirLib libraries instead of their
+ local copies (options `-use-external-Flocq` and `-use-external-MenhirLib`
+ to the `configure` script).
+- Automatically build to OCaml bytecode on platforms where OCaml
+ native-code compilation is not available.
+- Install the `compcert.config` summary of configuration choices
+ in the same directory as the Coq development.
+- Updated the list of dual-licensed source files.
+
+
Release 3.7, 2020-03-31
=======================
diff --git a/LICENSE b/LICENSE
index 5a7ae79f..61b84219 100644
--- a/LICENSE
+++ b/LICENSE
@@ -46,8 +46,8 @@ option) any later version:
all files in the exportclight/ directory
- the Archi.v, CBuiltins.ml, and extractionMachdep.v files
- in directories arm, powerpc, riscV, x86, x86_32, x86_64
+ the Archi.v, Builtins1.v, CBuiltins.ml, and extractionMachdep.v files
+ in directories aarch64, arm, powerpc, riscV, x86, x86_32, x86_64
extraction/extraction.v
diff --git a/Makefile b/Makefile
index 3fd002cc..8b2fb534 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,12 @@
#######################################################################
include Makefile.config
+include VERSION
+
+BUILDVERSION ?= $(version)
+BUILDNR ?= $(buildnr)
+TAG ?= $(tag)
+BRANCH ?= $(branch)
ifeq ($(wildcard $(ARCH)_$(BITSIZE)),)
ARCHDIRS?=$(ARCH)
@@ -21,18 +27,29 @@ else
ARCHDIRS?=$(ARCH)_$(BITSIZE) $(ARCH)
endif
-BACKENDLIB?=Asmgenproof0.v Asmgenproof1.v
+BACKENDLIB?=Asmgenproof0.v
+
+DIRS := lib lib/Impure common $(ARCHDIRS) scheduling backend cfrontend driver \
+ exportclight cparser
-DIRS=lib lib/Impure common $(ARCHDIRS) scheduling backend cfrontend driver \
- flocq/Core flocq/Prop flocq/Calc flocq/IEEE754 \
- exportclight MenhirLib cparser
+RECDIRS:=lib common $(ARCHDIRS) scheduling backend cfrontend driver flocq exportclight \
+ cparser
-RECDIRS=lib common $(ARCHDIRS) scheduling backend cfrontend driver flocq exportclight \
- MenhirLib cparser
+COQINCLUDES := $(foreach d, $(DIRS), -R $(d) compcert.$(subst /,.,$d))
-COQINCLUDES=$(foreach d, $(RECDIRS), -R $(d) $(subst /,.,compcert.$(d)))
+ifeq ($(LIBRARY_FLOCQ),local)
+DIRS += flocq/Core flocq/Prop flocq/Calc flocq/IEEE754
+RECDIRS += flocq
+COQINCLUDES += -R flocq Flocq
+endif
-COQCOPTS ?= -w -undeclared-scope
+ifeq ($(LIBRARY_MENHIRLIB),local)
+DIRS += MenhirLib
+RECDIRS += MenhirLib
+COQINCLUDES += -R MenhirLib MenhirLib
+endif
+
+COQCOPTS ?= -w -undeclared-scope -w -omega-is-deprecated
COQC="$(COQBIN)coqc" -q $(COQINCLUDES) $(COQCOPTS)
COQDEP="$(COQBIN)coqdep" $(COQINCLUDES)
COQDOC="$(COQBIN)coqdoc"
@@ -46,6 +63,7 @@ GPATH=$(DIRS)
# Flocq
+ifeq ($(LIBRARY_FLOCQ),local)
FLOCQ=\
Raux.v Zaux.v Defs.v Digits.v Float_prop.v FIX.v FLT.v FLX.v FTZ.v \
Generic_fmt.v Round_pred.v Round_NE.v Ulp.v Core.v \
@@ -53,6 +71,9 @@ FLOCQ=\
Div_sqrt_error.v Mult_error.v Plus_error.v \
Relative.v Sterbenz.v Round_odd.v Double_rounding.v \
Binary.v Bits.v
+else
+FLOCQ=
+endif
# General-purpose libraries (in lib/)
@@ -114,6 +135,10 @@ BACKEND=\
Asm.v Asmgen.v Asmgenproof.v Asmaux.v \
$(BACKENDLIB)
+ifneq ($(ARCH),kvx)
+ BACKEND += Asmgenproof1.v
+endif
+
SCHEDULING= \
RTLpathLivegenproof.v RTLpathSE_simu_specs.v \
RTLpathLivegen.v RTLpathSE_impl.v \
@@ -136,9 +161,13 @@ PARSER=Cabs.v Parser.v
# MenhirLib
+ifeq ($(LIBRARY_MENHIRLIB),local)
MENHIRLIB=Alphabet.v Automaton.v Grammar.v Interpreter_complete.v \
Interpreter_correct.v Interpreter.v Main.v Validator_complete.v \
Validator_safe.v Validator_classes.v
+else
+MENHIRLIB=
+endif
# Putting everything together (in driver/)
@@ -168,6 +197,9 @@ endif
ifeq ($(CLIGHTGEN),true)
$(MAKE) clightgen
endif
+ifeq ($(INSTALL_COQDEV),true)
+ $(MAKE) compcert.config
+endif
proof: $(FILES:.v=.vo)
@@ -212,11 +244,25 @@ documentation: $(FILES)
$(filter-out doc/coq2html cparser/Parser.v, $^)
tools/ndfun: tools/ndfun.ml
+ifeq ($(OCAML_NATIVE_COMP),true)
ocamlopt -o tools/ndfun str.cmxa tools/ndfun.ml
-tools/modorder: tools/modorder.ml
- ocamlopt -o tools/modorder str.cmxa tools/modorder.ml
+else
+ ocamlc -o tools/ndfun str.cma tools/ndfun.ml
+endif
+
tools/compiler_expand: tools/compiler_expand.ml
+ifeq ($(OCAML_NATIVE_COMP),true)
ocamlopt -o $@ $+
+ ocamlc -o $@ $+
+else
+endif
+
+tools/modorder: tools/modorder.ml
+ifeq ($(OCAML_NATIVE_COMP),true)
+ ocamlopt -o tools/modorder str.cmxa tools/modorder.ml
+else
+ ocamlc -o tools/modorder str.cma tools/modorder.ml
+endif
latexdoc:
cd doc; $(COQDOC) --latex -o doc/doc.tex -g $(FILES)
@@ -254,14 +300,29 @@ compcert.ini: Makefile.config
echo "response_file_style=$(RESPONSEFILE)";) \
> compcert.ini
+compcert.config: Makefile.config
+ (echo "# CompCert configuration parameters"; \
+ echo "COMPCERT_ARCH=$(ARCH)"; \
+ echo "COMPCERT_MODEL=$(MODEL)"; \
+ echo "COMPCERT_ABI=$(ABI)"; \
+ echo "COMPCERT_ENDIANNESS=$(ENDIANNESS)"; \
+ echo "COMPCERT_BITSIZE=$(BITSIZE)"; \
+ echo "COMPCERT_SYSTEM=$(SYSTEM)"; \
+ echo "COMPCERT_VERSION=$(BUILDVERSION)"; \
+ echo "COMPCERT_BUILDNR=$(BUILDNR)"; \
+ echo "COMPCERT_TAG=$(TAG)"; \
+ echo "COMPCERT_BRANCH=$(BRANCH)" \
+ ) > compcert.config
+
driver/Version.ml: VERSION
- cat VERSION \
- | sed -e 's|\(.*\)=\(.*\)|let \1 = \"\2\"|g' \
- >driver/Version.ml
+ (echo 'let version = "$(BUILDVERSION)"'; \
+ echo 'let buildnr = "$(BUILDNR)"'; \
+ echo 'let tag = "$(TAG)"'; \
+ echo 'let branch = "$(BRANCH)"') > driver/Version.ml
cparser/Parser.v: cparser/Parser.vy
@rm -f $@
- $(MENHIR) --coq --coq-lib-path compcert.MenhirLib --coq-no-version-check cparser/Parser.vy
+ $(MENHIR) --coq --coq-no-version-check cparser/Parser.vy
@chmod a-w $@
depend: $(GENERATED) depend1
@@ -288,6 +349,7 @@ ifeq ($(INSTALL_COQDEV),true)
install -m 0644 $$d/*.vo $(DESTDIR)$(COQDEVDIR)/$$d/; \
done
install -m 0644 ./VERSION $(DESTDIR)$(COQDEVDIR)
+ install -m 0644 ./compcert.config $(DESTDIR)$(COQDEVDIR)
@(echo "To use, pass the following to coq_makefile or add the following to _CoqProject:"; echo "-R $(COQDEVDIR) compcert") > $(DESTDIR)$(COQDEVDIR)/README
endif
@@ -297,7 +359,7 @@ clean:
rm -f $(patsubst %, %/.*.aux, $(DIRS))
rm -rf doc/html doc/*.glob
rm -f driver/Version.ml
- rm -f compcert.ini
+ rm -f compcert.ini compcert.config
rm -f extraction/STAMP extraction/*.ml extraction/*.mli .depend.extr
rm -f tools/ndfun tools/modorder tools/*.cm? tools/*.o
rm -f $(GENERATED) .depend
@@ -319,6 +381,9 @@ check-proof: $(FILES)
print-includes:
@echo $(COQINCLUDES)
+CoqProject:
+ @echo $(COQINCLUDES) > _CoqProject
+
-include .depend
FORCE:
diff --git a/Makefile.extr b/Makefile.extr
index 75eb6dca..f4ab74b5 100644
--- a/Makefile.extr
+++ b/Makefile.extr
@@ -19,7 +19,8 @@ include Makefile.config
#
# Variables from Makefile.config:
-# -OCAML_OPT_COMP: can we use the native version
+# -OCAML_NATIVE_COMP: native-code compilation is supported
+# -OCAML_OPT_COMP: can we use the natively-compiled compilers
# -COMPFLAGS: compile options
# -LINK_OPT: additional linker flags for the native binary
#
@@ -50,13 +51,22 @@ INCLUDES=$(patsubst %,-I %, $(DIRS))
# Control of warnings:
-WARNINGS=-w +a-4-9-27-42 -strict-sequence -safe-string -warn-error +a #Deprication returns with ocaml 4.03
+# WARNINGS=-w +a-4-9-27-42 -strict-sequence -safe-string -warn-error +a #Deprication returns with ocaml 4.03
+WARNINGS=-w +a-4-9-27-42
+
extraction/%.cmx: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67
extraction/%.cmo: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67
cparser/pre_parser.cmx: WARNINGS += -w -41
cparser/pre_parser.cmo: WARNINGS += -w -41
-COMPFLAGS+=-g $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS)
+# Turn warnings into errors, but not for released tarballs
+ifeq ($(wildcard .git),.git)
+WARN_ERRORS=-warn-error +a
+else
+WARN_ERRORS=
+endif
+
+COMPFLAGS+=-g -strict-sequence -safe-string $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS) $(WARN_ERRORS)
# Using .opt compilers if available
@@ -72,6 +82,7 @@ OCAMLDEP=ocamldep$(DOTOPT) -slash $(INCLUDES)
OCAMLLEX=ocamllex -q
MODORDER=tools/modorder .depend.extr
+COPY=cp
PARSERS=cparser/pre_parser.mly
LEXERS=cparser/Lexer.mll lib/Tokenize.mll \
@@ -89,9 +100,15 @@ ifeq ($(wildcard .depend.extr),.depend.extr)
CCOMP_OBJS:=$(shell $(MODORDER) driver/Driver.cmx)
+ifeq ($(OCAML_NATIVE_COMP),true)
ccomp: $(CCOMP_OBJS)
@echo "Linking $@"
@$(OCAMLOPT) -o $@ $(LIBS) $(LINK_OPT) $+
+else
+ccomp: ccomp.byte
+ @echo "Copying to $@"
+ @$(COPY) $+ $@
+endif
# DM force compilation without checking dependencies
ccomp.force:
@@ -103,9 +120,15 @@ ccomp.byte: $(CCOMP_OBJS:.cmx=.cmo)
CLIGHTGEN_OBJS:=$(shell $(MODORDER) exportclight/Clightgen.cmx)
+ifeq ($(OCAML_NATIVE_COMP),true)
clightgen: $(CLIGHTGEN_OBJS)
@echo "Linking $@"
@$(OCAMLOPT) -o $@ $(LIBS) $(LINK_OPT) $+
+else
+clightgen: clightgen.byte
+ @echo "Copying to $@"
+ @$(COPY) $+ $@
+endif
clightgen.byte: $(CLIGHTGEN_OBJS:.cmx=.cmo)
@echo "Linking $@"
diff --git a/MenhirLib/Alphabet.v b/MenhirLib/Alphabet.v
index 29070e3d..530e3b4a 100644
--- a/MenhirLib/Alphabet.v
+++ b/MenhirLib/Alphabet.v
@@ -11,7 +11,8 @@
(* *)
(****************************************************************************)
-From Coq Require Import Omega List Syntax Relations RelationClasses.
+From Coq Require Import Omega List Relations RelationClasses.
+Import ListNotations.
Local Obligation Tactic := intros.
diff --git a/MenhirLib/Grammar.v b/MenhirLib/Grammar.v
index a371318b..9be374e8 100644
--- a/MenhirLib/Grammar.v
+++ b/MenhirLib/Grammar.v
@@ -11,7 +11,8 @@
(* *)
(****************************************************************************)
-From Coq Require Import List Syntax Orders.
+From Coq Require Import List Orders.
+Import ListNotations.
Require Import Alphabet.
(** The terminal non-terminal alphabets of the grammar. **)
diff --git a/MenhirLib/Interpreter.v b/MenhirLib/Interpreter.v
index 568597ba..07aeae5a 100644
--- a/MenhirLib/Interpreter.v
+++ b/MenhirLib/Interpreter.v
@@ -12,6 +12,7 @@
(****************************************************************************)
From Coq Require Import List Syntax.
+Import ListNotations.
From Coq.ssr Require Import ssreflect.
Require Automaton.
Require Import Alphabet Grammar Validator_safe.
diff --git a/MenhirLib/Interpreter_complete.v b/MenhirLib/Interpreter_complete.v
index ec69592b..51f2524b 100644
--- a/MenhirLib/Interpreter_complete.v
+++ b/MenhirLib/Interpreter_complete.v
@@ -11,7 +11,8 @@
(* *)
(****************************************************************************)
-From Coq Require Import List Syntax Arith.
+From Coq Require Import List Arith.
+Import ListNotations.
From Coq.ssr Require Import ssreflect.
Require Import Alphabet Grammar.
Require Automaton Interpreter Validator_complete.
diff --git a/MenhirLib/Interpreter_correct.v b/MenhirLib/Interpreter_correct.v
index 1325f610..083be5b7 100644
--- a/MenhirLib/Interpreter_correct.v
+++ b/MenhirLib/Interpreter_correct.v
@@ -11,7 +11,8 @@
(* *)
(****************************************************************************)
-From Coq Require Import List Syntax.
+From Coq Require Import List.
+Import ListNotations.
Require Import Alphabet.
Require Grammar Automaton Interpreter.
From Coq.ssr Require Import ssreflect.
diff --git a/MenhirLib/Validator_complete.v b/MenhirLib/Validator_complete.v
index ebb74500..9ba3e53c 100644
--- a/MenhirLib/Validator_complete.v
+++ b/MenhirLib/Validator_complete.v
@@ -13,6 +13,7 @@
From Coq Require Import List Syntax Derive.
From Coq.ssr Require Import ssreflect.
+Import ListNotations.
Require Automaton.
Require Import Alphabet Validator_classes.
diff --git a/MenhirLib/Validator_safe.v b/MenhirLib/Validator_safe.v
index 628d2009..e7a54b47 100644
--- a/MenhirLib/Validator_safe.v
+++ b/MenhirLib/Validator_safe.v
@@ -12,6 +12,7 @@
(****************************************************************************)
From Coq Require Import List Syntax Derive.
+Import ListNotations.
From Coq.ssr Require Import ssreflect.
Require Automaton.
Require Import Alphabet Validator_classes.
diff --git a/README.md b/README.md
index 58a7d052..3990048e 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# CompCert
-The verified C compiler.
+The formally-verified C compiler.
## Overview
The CompCert C verified compiler is a compiler for a large subset of the
@@ -13,8 +13,8 @@ source C code.
For more information on CompCert (supported platforms, supported C
features, installation instructions, using the compiler, etc), please
-refer to the [Web site](http://compcert.inria.fr/) and especially
-the [user's manual](http://compcert.inria.fr/man/).
+refer to the [Web site](https://compcert.org/) and especially
+the [user's manual](https://compcert.org/man/).
## Verimag-Kalray version
This is a special version with additions from Verimag and Kalray :
@@ -40,7 +40,7 @@ The people responsible for this version are
CompCert is not free software. This non-commercial release can only
be used for evaluation, research, educational and personal purposes.
A commercial version of CompCert, without this restriction and with
-professional support, can be purchased from
+professional support and extra features, can be purchased from
[AbsInt](https://www.absint.com). See the file `LICENSE` for more
information.
diff --git a/VERSION b/VERSION
index b60e8d9b..d5a86723 100644
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,4 @@
-version=3.7
+version=3.8
buildnr=
tag=
+branch=
diff --git a/aarch64/Archi.v b/aarch64/Archi.v
index 7d7b6887..7f39d1fa 100644
--- a/aarch64/Archi.v
+++ b/aarch64/Archi.v
@@ -6,15 +6,17 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU General Public License as published by *)
+(* the Free Software Foundation, either version 2 of the License, or *)
+(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
(** Architecture-dependent parameters for AArch64 *)
+From Flocq Require Import Binary Bits.
Require Import ZArith List.
-(*From Flocq*)
-Require Import Binary Bits.
Definition ptr64 := true.
diff --git a/aarch64/Asm.v b/aarch64/Asm.v
index 47cd3051..346cb649 100644
--- a/aarch64/Asm.v
+++ b/aarch64/Asm.v
@@ -237,6 +237,7 @@ Inductive instruction: Type :=
| Pclz (sz: isize) (rd r1: ireg) (**r count leading zero bits *)
| Prev (sz: isize) (rd r1: ireg) (**r reverse bytes *)
| Prev16 (sz: isize) (rd r1: ireg) (**r reverse bytes in each 16-bit word *)
+ | Prbit (sz: isize) (rd r1: ireg) (**r reverse bits *)
(** Conditional data processing *)
| Pcsel (rd: ireg) (r1 r2: ireg) (c: testcond) (**r int conditional move *)
| Pcset (rd: ireg) (c: testcond) (**r set to 1/0 if cond is true/false *)
@@ -282,6 +283,8 @@ Inductive instruction: Type :=
| Pfmsub (sz: fsize) (rd r1 r2 r3: freg) (**r [rd = r3 - r1 * r2] *)
| Pfnmadd (sz: fsize) (rd r1 r2 r3: freg) (**r [rd = - r3 - r1 * r2] *)
| Pfnmsub (sz: fsize) (rd r1 r2 r3: freg) (**r [rd = - r3 + r1 * r2] *)
+ | Pfmax (sz: fsize) (rd r1 r2: freg) (**r maximum *)
+ | Pfmin (sz: fsize) (rd r1 r2: freg) (**r minimum *)
(** Floating-point comparison *)
| Pfcmp (sz: fsize) (r1 r2: freg) (**r compare [r1] and [r2] *)
| Pfcmp0 (sz: fsize) (r1: freg) (**r compare [r1] and [+0.0] *)
@@ -967,9 +970,9 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
| Pfmov rd r1 =>
Next (nextinstr (rs#rd <- (rs#r1))) m
| Pfmovimms rd f =>
- Next (nextinstr (rs#rd <- (Vsingle f))) m
+ Next (nextinstr (rs#X16 <- Vundef #rd <- (Vsingle f))) m
| Pfmovimmd rd f =>
- Next (nextinstr (rs#rd <- (Vfloat f))) m
+ Next (nextinstr (rs#X16 <- Vundef #rd <- (Vfloat f))) m
| Pfmovi S rd r1 =>
Next (nextinstr (rs#rd <- (float32_of_bits rs##r1))) m
| Pfmovi D rd r1 =>
@@ -1094,7 +1097,7 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
| Vint n =>
match list_nth_z tbl (Int.unsigned n) with
| None => Stuck
- | Some lbl => goto_label f lbl (rs#X16 <- Vundef #X17 <- Vundef) m
+ | Some lbl => goto_label f lbl (rs#X16 <- Vundef) m
end
| _ => Stuck
end
@@ -1107,11 +1110,14 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
| Pclz _ _ _
| Prev _ _ _
| Prev16 _ _ _
+ | Prbit _ _ _
| Pfsqrt _ _ _
| Pfmadd _ _ _ _ _
| Pfmsub _ _ _ _ _
| Pfnmadd _ _ _ _ _
| Pfnmsub _ _ _ _ _
+ | Pfmax _ _ _ _
+ | Pfmin _ _ _ _
| Pnop
| Pcfi_adjust _
| Pcfi_rel_offset _ =>
@@ -1206,7 +1212,7 @@ Inductive step: state -> trace -> state -> Prop :=
external_call ef ge vargs m t vres m' ->
rs' = nextinstr
(set_res res vres
- (undef_regs (map preg_of (destroyed_by_builtin ef)) rs)) ->
+ (undef_regs (IR X16 :: IR X30 :: map preg_of (destroyed_by_builtin ef)) rs)) ->
step (State rs m) t (State rs' m')
| exec_step_external:
forall b ef args res rs m t rs' m',
diff --git a/aarch64/Asmexpand.ml b/aarch64/Asmexpand.ml
index b0787d0a..5b183c2d 100644
--- a/aarch64/Asmexpand.ml
+++ b/aarch64/Asmexpand.ml
@@ -337,7 +337,7 @@ let expand_builtin_inline name args res =
| "__builtin_bswap16", [BA(IR a1)], BR(IR res) ->
emit (Prev16(W, res, a1));
emit (Pandimm(W, res, RR0 res, Z.of_uint 0xFFFF))
- (* Count leading zeros and leading sign bits *)
+ (* Count leading zeros, leading sign bits, trailing zeros *)
| "__builtin_clz", [BA(IR a1)], BR(IR res) ->
emit (Pclz(W, res, a1))
| ("__builtin_clzl" | "__builtin_clzll"), [BA(IR a1)], BR(IR res) ->
@@ -346,10 +346,14 @@ let expand_builtin_inline name args res =
emit (Pcls(W, res, a1))
| ("__builtin_clsl" | "__builtin_clsll"), [BA(IR a1)], BR(IR res) ->
emit (Pcls(X, res, a1))
+ | "__builtin_ctz", [BA(IR a1)], BR(IR res) ->
+ emit (Prbit(W, res, a1));
+ emit (Pclz(W, res, res))
+ | ("__builtin_ctzl" | "__builtin_ctzll"), [BA(IR a1)], BR(IR res) ->
+ emit (Prbit(X, res, a1));
+ emit (Pclz(X, res, res))
(* Float arithmetic *)
- | "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
- emit (Pfabs(D, res, a1))
- | "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
+ | ("__builtin_fsqrt" | "__builtin_sqrt"), [BA(FR a1)], BR(FR res) ->
emit (Pfsqrt(D, res, a1))
| "__builtin_fmadd", [BA(FR a1); BA(FR a2); BA(FR a3)], BR(FR res) ->
emit (Pfmadd(D, res, a1, a2, a3))
@@ -359,6 +363,10 @@ let expand_builtin_inline name args res =
emit (Pfnmadd(D, res, a1, a2, a3))
| "__builtin_fnmsub", [BA(FR a1); BA(FR a2); BA(FR a3)], BR(FR res) ->
emit (Pfnmsub(D, res, a1, a2, a3))
+ | "__builtin_fmax", [BA (FR a1); BA (FR a2)], BR (FR res) ->
+ emit (Pfmax (D, res, a1, a2))
+ | "__builtin_fmin", [BA (FR a1); BA (FR a2)], BR (FR res) ->
+ emit (Pfmin (D, res, a1, a2))
(* Vararg *)
| "__builtin_va_start", [BA(IR a)], _ ->
expand_builtin_va_start a
diff --git a/aarch64/Asmgenproof.v b/aarch64/Asmgenproof.v
index 6831509f..df88043f 100644
--- a/aarch64/Asmgenproof.v
+++ b/aarch64/Asmgenproof.v
@@ -868,13 +868,16 @@ Local Transparent destroyed_by_op.
econstructor; eauto.
instantiate (2 := tf); instantiate (1 := x).
unfold nextinstr. rewrite Pregmap.gss.
- rewrite set_res_other. rewrite undef_regs_other_2.
+ rewrite set_res_other. rewrite undef_regs_other.
rewrite <- H1. simpl. econstructor; eauto.
eapply code_tail_next_int; eauto.
- rewrite preg_notin_charact. intros. auto with asmgen.
+ simpl; intros. destruct H4. congruence. destruct H4. congruence.
+ exploit list_in_map_inv; eauto. intros (mr & U & V). subst.
+ auto with asmgen.
auto with asmgen.
apply agree_nextinstr. eapply agree_set_res; auto.
- eapply agree_undef_regs; eauto. intros. rewrite undef_regs_other_2; auto.
+ eapply agree_undef_regs; eauto. intros.
+ simpl. rewrite undef_regs_other_2; auto. Simpl.
congruence.
Simpl.
@@ -936,7 +939,7 @@ Local Transparent destroyed_by_op.
exploit functions_transl; eauto. intro FN.
generalize (transf_function_no_overflow _ _ H5); intro NOOV.
exploit find_label_goto_label. eauto. eauto.
- instantiate (2 := rs0#X16 <- Vundef #X17 <- Vundef).
+ instantiate (2 := rs0#X16 <- Vundef).
Simpl. eauto.
eauto.
intros [tc' [rs' [A [B C]]]].
diff --git a/aarch64/CBuiltins.ml b/aarch64/CBuiltins.ml
index fdc1372d..e2a9c87a 100644
--- a/aarch64/CBuiltins.ml
+++ b/aarch64/CBuiltins.ml
@@ -6,6 +6,9 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU General Public License as published by *)
+(* the Free Software Foundation, either version 2 of the License, or *)
+(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
@@ -29,14 +32,6 @@ let builtins = {
"__builtin_fence",
(TVoid [], [], false);
(* Integer arithmetic *)
- "__builtin_bswap64",
- (TInt(IULongLong, []), [TInt(IULongLong, [])], false);
- "__builtin_clz",
- (TInt(IInt, []), [TInt(IUInt, [])], false);
- "__builtin_clzl",
- (TInt(IInt, []), [TInt(IULong, [])], false);
- "__builtin_clzll",
- (TInt(IInt, []), [TInt(IULongLong, [])], false);
"__builtin_cls",
(TInt(IInt, []), [TInt(IInt, [])], false);
"__builtin_clsl",
diff --git a/aarch64/Machregsaux.ml b/aarch64/Machregsaux.ml
index f13a9ff5..41db3bd4 100644
--- a/aarch64/Machregsaux.ml
+++ b/aarch64/Machregsaux.ml
@@ -12,28 +12,9 @@
(** Auxiliary functions on machine registers *)
-open Camlcoq
-open Machregs
-
-let register_names : (mreg, string) Hashtbl.t = Hashtbl.create 31
-
-let _ =
- List.iter
- (fun (s, r) -> Hashtbl.add register_names r (camlstring_of_coqstring s))
- Machregs.register_names
-
let is_scratch_register s =
s = "X16" || s = "x16" || s = "X30" || s = "x30"
-
-let name_of_register r =
- try Some (Hashtbl.find register_names r) with Not_found -> None
-
-let register_by_name s =
- Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s)
-
-let can_reserve_register r = Conventions1.is_callee_save r
-
let class_of_type = function
| AST.Tint | AST.Tlong -> 0
| AST.Tfloat | AST.Tsingle -> 1
diff --git a/aarch64/TargetPrinter.ml b/aarch64/TargetPrinter.ml
index 8d74daf4..6ba44cf0 100644
--- a/aarch64/TargetPrinter.ml
+++ b/aarch64/TargetPrinter.ml
@@ -399,6 +399,8 @@ module Target : TARGET =
fprintf oc " rev %a, %a\n" ireg (sz, rd) ireg (sz, r1)
| Prev16(sz, rd, r1) ->
fprintf oc " rev16 %a, %a\n" ireg (sz, rd) ireg (sz, r1)
+ | Prbit(sz, rd, r1) ->
+ fprintf oc " rbit %a, %a\n" ireg (sz, rd) ireg (sz, r1)
(* Conditional data processing *)
| Pcsel(rd, r1, r2, c) ->
fprintf oc " csel %a, %a, %a, %s\n" xreg rd xreg r1 xreg r2 (condition_name c)
@@ -489,6 +491,10 @@ module Target : TARGET =
fprintf oc " fnmadd %a, %a, %a, %a\n" freg (sz, rd) freg (sz, r1) freg (sz, r2) freg (sz, r3)
| Pfnmsub(sz, rd, r1, r2, r3) ->
fprintf oc " fnmsub %a, %a, %a, %a\n" freg (sz, rd) freg (sz, r1) freg (sz, r2) freg (sz, r3)
+ | Pfmax (sz, rd, r1, r2) ->
+ fprintf oc " fmax %a, %a, %a\n" freg (sz, rd) freg (sz, r1) freg (sz, r2)
+ | Pfmin (sz, rd, r1, r2) ->
+ fprintf oc " fmin %a, %a, %a\n" freg (sz, rd) freg (sz, r1) freg (sz, r2)
(* Floating-point comparison *)
| Pfcmp(sz, r1, r2) ->
fprintf oc " fcmp %a, %a\n" freg (sz, r1) freg (sz, r2)
diff --git a/aarch64/extractionMachdep.v b/aarch64/extractionMachdep.v
index e82056e2..5f26dc28 100644
--- a/aarch64/extractionMachdep.v
+++ b/aarch64/extractionMachdep.v
@@ -6,6 +6,9 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU General Public License as published by *)
+(* the Free Software Foundation, either version 2 of the License, or *)
+(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
diff --git a/arm/Archi.v b/arm/Archi.v
index 738341cc..c334c2a7 100644
--- a/arm/Archi.v
+++ b/arm/Archi.v
@@ -16,9 +16,8 @@
(** Architecture-dependent parameters for ARM *)
+From Flocq Require Import Binary Bits.
Require Import ZArith List.
-(*From Flocq*)
-Require Import Binary Bits.
Definition ptr64 := false.
diff --git a/arm/Asm.v b/arm/Asm.v
index 194074ac..293df274 100644
--- a/arm/Asm.v
+++ b/arm/Asm.v
@@ -696,7 +696,7 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
| Pfsubd r1 r2 r3 =>
Next (nextinstr (rs#r1 <- (Val.subf rs#r2 rs#r3))) m
| Pflid r1 f =>
- Next (nextinstr (rs#r1 <- (Vfloat f))) m
+ Next (nextinstr (rs#IR14 <- Vundef #r1 <- (Vfloat f))) m
| Pfcmpd r1 r2 =>
Next (nextinstr (compare_float rs rs#r1 rs#r2)) m
| Pfcmpzd r1 =>
@@ -923,7 +923,7 @@ Inductive step: state -> trace -> state -> Prop :=
external_call ef ge vargs m t vres m' ->
rs' = nextinstr
(set_res res vres
- (undef_regs (map preg_of (destroyed_by_builtin ef)) rs)) ->
+ (undef_regs (IR IR14 :: map preg_of (destroyed_by_builtin ef)) rs)) ->
step (State rs m) t (State rs' m')
| exec_step_external:
forall b ef args res rs m t rs' m',
diff --git a/arm/Asmexpand.ml b/arm/Asmexpand.ml
index 6996c9bb..104bfc94 100644
--- a/arm/Asmexpand.ml
+++ b/arm/Asmexpand.ml
@@ -349,9 +349,7 @@ let expand_builtin_inline name args res =
emit (Prsb(res, res, SOimm _32));
emit (Plabel lbl2)
(* Float arithmetic *)
- | "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
- emit (Pfabsd (res,a1))
- | "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
+ | ("__builtin_fsqrt" | "__builtin_sqrt"), [BA(FR a1)], BR(FR res) ->
emit (Pfsqrt (res,a1))
(* 64-bit integer arithmetic *)
| "__builtin_negl", [BA_splitlong(BA(IR ah), BA(IR al))],
diff --git a/arm/Asmgenproof.v b/arm/Asmgenproof.v
index 92ae524f..fd70c9ad 100644
--- a/arm/Asmgenproof.v
+++ b/arm/Asmgenproof.v
@@ -225,7 +225,7 @@ Proof.
TailNoLabel.
eapply tail_nolabel_trans; TailNoLabel.
Qed.
-Hint Resolve indexed_memory_access_label.
+Hint Resolve indexed_memory_access_label: labels.
Remark loadind_label:
forall base ofs ty dst k c, loadind base ofs ty dst k = OK c -> tail_nolabel k c.
@@ -761,13 +761,15 @@ Opaque loadind.
econstructor; eauto.
instantiate (2 := tf); instantiate (1 := x).
unfold nextinstr. rewrite Pregmap.gss.
- rewrite set_res_other. rewrite undef_regs_other_2.
+ rewrite set_res_other. simpl. rewrite undef_regs_other_2.
+ rewrite Pregmap.gso by auto with asmgen.
rewrite <- H1. simpl. econstructor; eauto.
eapply code_tail_next_int; eauto.
rewrite preg_notin_charact. intros. auto with asmgen.
auto with asmgen.
apply agree_nextinstr. eapply agree_set_res; auto.
- eapply agree_undef_regs; eauto. intros; apply undef_regs_other_2; auto.
+ eapply agree_undef_regs; eauto.
+ intros. simpl. rewrite undef_regs_other_2; auto. apply Pregmap.gso. auto with asmgen.
congruence.
- (* Mgoto *)
diff --git a/arm/CBuiltins.ml b/arm/CBuiltins.ml
index d6a1ea35..6462a8c5 100644
--- a/arm/CBuiltins.ml
+++ b/arm/CBuiltins.ml
@@ -22,19 +22,6 @@ let builtins = {
"__builtin_va_list", TPtr(TVoid [], [])
];
builtin_functions = [
- (* Integer arithmetic *)
- "__builtin_clz",
- (TInt(IInt, []), [TInt(IUInt, [])], false);
- "__builtin_clzl",
- (TInt(IInt, []), [TInt(IULong, [])], false);
- "__builtin_clzll",
- (TInt(IInt, []), [TInt(IULongLong, [])], false);
- "__builtin_ctz",
- (TInt(IInt, []), [TInt(IUInt, [])], false);
- "__builtin_ctzl",
- (TInt(IInt, []), [TInt(IULong, [])], false);
- "__builtin_ctzll",
- (TInt(IInt, []), [TInt(IULongLong, [])], false);
(* Memory accesses *)
"__builtin_read16_reversed",
(TInt(IUShort, []), [TPtr(TInt(IUShort, [AConst]), [])], false);
diff --git a/arm/Machregsaux.ml b/arm/Machregsaux.ml
index 14c75155..24a33e9e 100644
--- a/arm/Machregsaux.ml
+++ b/arm/Machregsaux.ml
@@ -12,27 +12,7 @@
(** Auxiliary functions on machine registers *)
-open Camlcoq
-open Machregs
-
-let register_names : (mreg, string) Hashtbl.t = Hashtbl.create 31
-
-let _ =
- List.iter
- (fun (s, r) -> Hashtbl.add register_names r (camlstring_of_coqstring s))
- Machregs.register_names
-
let is_scratch_register s = s = "R14" || s = "r14"
-
-let name_of_register r =
- try Some (Hashtbl.find register_names r) with Not_found -> None
-
-let register_by_name s =
- Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s)
-
-let can_reserve_register r =
- List.mem r Conventions1.int_callee_save_regs
- || List.mem r Conventions1.float_callee_save_regs
let class_of_type = function
| AST.Tint | AST.Tlong -> 0
diff --git a/arm/Machregsaux.mli b/arm/Machregsaux.mli
index d7117c21..01b0f9fd 100644
--- a/arm/Machregsaux.mli
+++ b/arm/Machregsaux.mli
@@ -12,9 +12,6 @@
(** Auxiliary functions on machine registers *)
-val name_of_register: Machregs.mreg -> string option
-val register_by_name: string -> Machregs.mreg option
val is_scratch_register: string -> bool
-val can_reserve_register: Machregs.mreg -> bool
val class_of_type: AST.typ -> int
diff --git a/backend/Debugvar.v b/backend/Debugvar.v
index 56908855..7806984a 100644
--- a/backend/Debugvar.v
+++ b/backend/Debugvar.v
@@ -92,7 +92,7 @@ Fixpoint remove_state (v: ident) (s: avail) : avail :=
end
end.
-Fixpoint set_debug_info (v: ident) (info: list (builtin_arg loc)) (s: avail) :=
+Definition set_debug_info (v: ident) (info: list (builtin_arg loc)) (s: avail) :=
match normalize_debug info with
| Some a => set_state v a s
| None => remove_state v s
diff --git a/backend/Duplicateaux.ml b/backend/Duplicateaux.ml
index 8436863a..c9985dc4 100644
--- a/backend/Duplicateaux.ml
+++ b/backend/Duplicateaux.ml
@@ -115,16 +115,18 @@ let ptree_printbool pt =
(* Looks ahead (until a branch) to see if a node further down verifies
* the given predicate *)
-let rec look_ahead code node is_loop_header predicate =
+let rec look_ahead_gen (successors: RTL.instruction -> P.t list) code node is_loop_header predicate =
if (predicate node) then true
- else match (rtl_successors @@ get_some @@ PTree.get node code) with
+ else match (successors @@ get_some @@ PTree.get node code) with
| [n] -> if (predicate n) then true
else (
if (get_some @@ PTree.get n is_loop_header) then false
- else look_ahead code n is_loop_header predicate
+ else look_ahead_gen successors code n is_loop_header predicate
)
| _ -> false
+let look_ahead = look_ahead_gen rtl_successors
+
(**
* Heuristics mostly based on the paper Branch Prediction for Free
*)
@@ -545,7 +547,7 @@ let is_a_nop code n =
* preds: mapping node -> predecessors
* ptree: the revmap
* trace: the trace to follow tail duplication on *)
-let tail_duplicate code preds ptree trace =
+let tail_duplicate code preds is_loop_header ptree trace =
debug "Tail_duplicate on that trace: %a\n" print_trace trace;
(* next_int: unused integer that can be used for the next duplication *)
let next_int = ref (next_free_pc code)
@@ -561,8 +563,12 @@ let tail_duplicate code preds ptree trace =
if is_first then (code, ptree) (* first node is never duplicated regardless of its inputs *)
else
let node_preds = ptree_get_some n preds
- in let node_preds_nolast = List.filter (fun e -> e <> get_some !last_node) node_preds
- in let node_preds_nolast = List.filter (fun e -> not @@ List.mem e t) node_preds_nolast
+ in let node_preds_nolast =
+ (* We traverse loop headers without initiating tail duplication
+ * (see case of two imbricated loops) *)
+ if (get_some @@ PTree.get n is_loop_header) then []
+ else List.filter (fun e -> e <> get_some !last_node) node_preds
+ (* in let node_preds_nolast = List.filter (fun e -> not @@ List.mem e t) node_preds_nolast *)
in let final_node_preds = match !last_duplicate with
| None -> node_preds_nolast
| Some n' -> n' :: node_preds_nolast
@@ -583,12 +589,12 @@ let tail_duplicate code preds ptree trace =
in let new_code, new_ptree = f code ptree true trace
in (new_code, new_ptree, !nb_duplicated)
-let superblockify_traces code preds traces ptree =
+let superblockify_traces code preds is_loop_header traces ptree =
let max_nb_duplicated = !Clflags.option_ftailduplicate (* FIXME - should be architecture dependent *)
in let rec f code ptree = function
| [] -> (code, ptree, 0)
| trace :: traces ->
- let new_code, new_ptree, nb_duplicated = tail_duplicate code preds ptree trace
+ let new_code, new_ptree, nb_duplicated = tail_duplicate code preds is_loop_header ptree trace
in if (nb_duplicated < max_nb_duplicated)
then (debug "End duplication\n"; f new_code new_ptree traces)
else (debug "Too many duplicated nodes, aborting tail duplication\n"; (code, ptree, 0))
@@ -617,15 +623,29 @@ type innerLoop = {
preds: P.t list;
body: P.t list;
head: P.t; (* head of the loop *)
- finals: P.t list (* the final instructions, which loops back to the head *)
+ finals: P.t list; (* the final instructions, which loops back to the head *)
(* There may be more than one ; for instance if there is an if inside the loop with both
- * branches leading to a goto backedge *)
+ * branches leading to a goto backedge
+ * Such cases usually happen after a tail-duplication *)
+ sb_final: P.t option; (* if the innerloop wraps a superblock, this is its final instruction *)
+ (* may be None if we predict that we do not loop *)
}
let print_pset = LICMaux.pp_pset
+let print_option_pint oc o =
+ if !debug_flag then
+ match o with
+ | None -> Printf.fprintf oc "None"
+ | Some n -> Printf.fprintf oc "Some %d" (P.to_int n)
+
let print_inner_loop iloop =
- debug "{preds: %a, body: %a}" print_intlist iloop.preds print_intlist iloop.body
+ debug "{preds: %a, body: %a, head: %d, finals: %a, sb_final: %a}\n"
+ print_intlist iloop.preds
+ print_intlist iloop.body
+ (P.to_int iloop.head)
+ print_intlist iloop.finals
+ print_option_pint iloop.sb_final
let rec print_inner_loops = function
| [] -> ()
@@ -694,6 +714,34 @@ let get_inner_loops f code is_loop_header =
!iloops
*)
+let rtl_successors_pref = function
+| Itailcall _ | Ireturn _ -> []
+| Icall(_,_,_,_,n) | Ibuiltin(_,_,_,n) | Inop n | Iop (_,_,_,n)
+| Iload (_,_,_,_,_,n) | Istore (_,_,_,_,n) -> [n]
+| Icond (_,_,n1,n2,p) -> (match p with
+ | Some true -> [n1]
+ | Some false -> [n2]
+ | None -> [n1; n2])
+| Ijumptable (_,ln) -> ln
+
+(* Find the last node of a trace (starting at "node"), until a loop is encountered.
+ * If a non-predicted branch is encountered, returns None *)
+let rec find_last_node_before_loop code node trace is_loop_header =
+ let rtl_succ = rtl_successors @@ get_some @@ PTree.get node code in
+ let headers = List.filter (fun n ->
+ get_some @@ PTree.get n is_loop_header && HashedSet.PSet.contains trace n) rtl_succ in
+ match headers with
+ | [] -> (
+ let next_nodes = List.filter (fun n -> HashedSet.PSet.contains trace n)
+ (rtl_successors_pref @@ get_some @@ PTree.get node code) in
+ match next_nodes with
+ | [n] -> find_last_node_before_loop code n trace is_loop_header
+ | _ -> None (* May happen when we predict that a loop is not taken *)
+ )
+ | [h] -> Some node
+ | _ -> failwith "Multiple branches leading to a loop"
+
+(* The computation of sb_final requires to already have branch prediction *)
let get_inner_loops f code is_loop_header =
let fake_f = { fn_sig = f.fn_sig; fn_params = f.fn_params;
fn_stacksize = f.fn_stacksize; fn_code = code; fn_entrypoint = f.fn_entrypoint } in
@@ -720,7 +768,10 @@ let get_inner_loops f code is_loop_header =
debug "HEADPREDS: %a\n" print_intlist head_preds;
filtered
end in
- { preds = preds; body = (HashedSet.PSet.elements body); head = head; finals = finals }
+ let sb_final = find_last_node_before_loop code head body is_loop_header in
+ let body = HashedSet.PSet.elements body in
+ { preds = preds; body = body; head = head; finals = finals;
+ sb_final = sb_final; }
)
(* LICMaux.inner_loops also returns non-inner loops, but with a body of 1 instruction
* We remove those to get just the inner loops *)
@@ -838,31 +889,36 @@ let unroll_inner_loops_single f code revmap =
(!code', !revmap')
end
+let is_some o = match o with Some _ -> true | None -> false
+
(* Unrolls the body of the inner loop once - duplicating the exit condition as well
* 1) Clones body into body'
- * 2) Links the last instruction of body into the first of body'
+ * 2) Links the last instruction of body (sb_final) into the first of body'
* 3) Links the last instruction of body' into the first of body
*)
let unroll_inner_loop_body code revmap iloop =
+ debug "iloop = "; print_inner_loop iloop;
let body = iloop.body in
let limit = !Clflags.option_funrollbody in
if count_ignore_nops code body > limit then begin
debug "Too many nodes in the loop body (%d > %d)" (List.length body) limit;
(code, revmap)
+ end else if not @@ is_some iloop.sb_final then begin
+ debug "The loop body does not form a superblock OR we have predicted that we do not loop";
+ (code, revmap)
end else
let (code2, revmap2, dupbody, fwmap) = clone code revmap body in
let code' = ref code2 in
let head' = apply_map fwmap (iloop.head) in
let finals' = apply_map_list fwmap (iloop.finals) in
begin
- code' := change_pointers !code' iloop.head head' iloop.finals;
+ code' := change_pointers !code' iloop.head head' [get_some @@ iloop.sb_final];
code' := change_pointers !code' head' iloop.head finals';
(!code', revmap2)
end
let unroll_inner_loops_body f code revmap =
let is_loop_header = get_loop_headers code (f.fn_entrypoint) in
- (* debug_flag := true; *)
let inner_loops = get_inner_loops f code is_loop_header in
debug "Number of loops found: %d\n" (List.length inner_loops);
let code' = ref code in
@@ -872,7 +928,7 @@ let unroll_inner_loops_body f code revmap =
List.iter (fun iloop ->
let (new_code, new_revmap) = unroll_inner_loop_body !code' !revmap' iloop in
code' := new_code; revmap' := new_revmap
- ) inner_loops; (* debug_flag := false; *)
+ ) inner_loops;
(!code', !revmap')
end
@@ -968,6 +1024,7 @@ let tail_duplicate f =
if !Clflags.option_ftailduplicate > 0 then
let traces = select_traces code entrypoint in
let preds = get_predecessors_rtl code in
- superblockify_traces code preds traces revmap
+ let is_loop_header = get_loop_headers code entrypoint in
+ superblockify_traces code preds is_loop_header traces revmap
else (code, revmap) in
((code, entrypoint), revmap)
diff --git a/backend/IRC.ml b/backend/IRC.ml
index 785b0a2d..29d224c8 100644
--- a/backend/IRC.ml
+++ b/backend/IRC.ml
@@ -102,7 +102,7 @@ after IRC elimination, when assigning a stack slot to a spilled variable. *)
let name_of_loc = function
| R r ->
- begin match Machregsaux.name_of_register r with
+ begin match Machregsnames.name_of_register r with
| None -> "fixed-reg"
| Some s -> s
end
@@ -247,12 +247,10 @@ let class_of_loc = function
let no_spill_class = 2
-let reserved_registers = ref ([]: mreg list)
-
let rec remove_reserved = function
| [] -> []
| hd :: tl ->
- if List.mem hd !reserved_registers
+ if List.mem hd !CPragmas.reserved_registers
then remove_reserved tl
else hd :: remove_reserved tl
diff --git a/backend/IRC.mli b/backend/IRC.mli
index f7bbf9c5..254f27ff 100644
--- a/backend/IRC.mli
+++ b/backend/IRC.mli
@@ -13,7 +13,6 @@
(* Iterated Register Coalescing: George and Appel's graph coloring algorithm *)
open Registers
-open Machregs
open Locations
open XTL
@@ -39,8 +38,5 @@ val add_pref: graph -> var -> var -> unit
(* Color the graph. Return an assignment of locations to variables. *)
val coloring: graph -> (var -> loc)
-(* Machine registers that are reserved and not available for allocation. *)
-val reserved_registers: mreg list ref
-
(* Auxiliaries to deal with register classes *)
val class_of_loc: loc -> int
diff --git a/backend/Machregsnames.ml b/backend/Machregsnames.ml
new file mode 100644
index 00000000..fdcbd0e5
--- /dev/null
+++ b/backend/Machregsnames.ml
@@ -0,0 +1,24 @@
+(* *********************************************************************)
+(* *)
+(* The Compcert verified compiler *)
+(* *)
+(* Xavier Leroy, INRIA Paris-Rocquencourt *)
+(* *)
+(* Copyright Institut National de Recherche en Informatique et en *)
+(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the INRIA Non-Commercial License Agreement. *)
+(* *)
+(* *********************************************************************)
+
+let register_names : (Machregs.mreg, string) Hashtbl.t = Hashtbl.create 31
+
+let _ =
+ List.iter
+ (fun (s, r) -> Hashtbl.add register_names r (Camlcoq.camlstring_of_coqstring s))
+ Machregs.register_names
+
+let name_of_register r =
+ Hashtbl.find_opt register_names r
+
+let register_by_name s =
+ Machregs.register_by_name (Camlcoq.coqstring_uppercase_ascii_of_camlstring s)
diff --git a/backend/Machregsnames.mli b/backend/Machregsnames.mli
new file mode 100644
index 00000000..1b600d35
--- /dev/null
+++ b/backend/Machregsnames.mli
@@ -0,0 +1,16 @@
+(* *********************************************************************)
+(* *)
+(* The Compcert verified compiler *)
+(* *)
+(* Xavier Leroy, INRIA Paris-Rocquencourt *)
+(* *)
+(* Copyright Institut National de Recherche en Informatique et en *)
+(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the INRIA Non-Commercial License Agreement. *)
+(* *)
+(* *********************************************************************)
+
+(** Auxiliary functions on machine registers *)
+
+val name_of_register: Machregs.mreg -> string option
+val register_by_name: string -> Machregs.mreg option
diff --git a/backend/NeedDomain.v b/backend/NeedDomain.v
index 3c2d8e20..d9e9e025 100644
--- a/backend/NeedDomain.v
+++ b/backend/NeedDomain.v
@@ -47,7 +47,7 @@ Definition iagree (p q mask: int) : Prop :=
forall i, 0 <= i < Int.zwordsize -> Int.testbit mask i = true ->
Int.testbit p i = Int.testbit q i.
-Fixpoint vagree (v w: val) (x: nval) {struct x}: Prop :=
+Definition vagree (v w: val) (x: nval) : Prop :=
match x with
| Nothing => True
| I m =>
diff --git a/backend/PrintAsmaux.ml b/backend/PrintAsmaux.ml
index 7fa10aee..5cb693af 100644
--- a/backend/PrintAsmaux.ml
+++ b/backend/PrintAsmaux.ml
@@ -297,8 +297,8 @@ let print_inline_asm print_preg oc txt sg args res =
let print_version_and_options oc comment =
let version_string =
- if Version.buildnr <> "" && Version.tag <> "" then
- sprintf "Release: %s, Build: %s, Tag: %s" Version.version Version.buildnr Version.tag
+ if Version.buildnr <> "" && Version.tag <> "" && Version.branch <> "" then
+ sprintf "Release: %s, Build: %s, Tag: %s, Branch: %s" Version.version Version.buildnr Version.tag Version.branch
else
Version.version in
fprintf oc "%s File generated by CompCert %s\n" comment version_string;
diff --git a/backend/PrintLTL.ml b/backend/PrintLTL.ml
index 8259297b..87e8a1fc 100644
--- a/backend/PrintLTL.ml
+++ b/backend/PrintLTL.ml
@@ -22,7 +22,7 @@ open PrintAST
open PrintOp
let mreg pp r =
- match Machregsaux.name_of_register r with
+ match Machregsnames.name_of_register r with
| Some s -> fprintf pp "%s" s
| None -> fprintf pp "<unknown machreg>"
diff --git a/backend/PrintMach.ml b/backend/PrintMach.ml
index 70e65832..3481421b 100644
--- a/backend/PrintMach.ml
+++ b/backend/PrintMach.ml
@@ -16,12 +16,11 @@ open Printf
open Camlcoq
open Datatypes
open AST
-open Machregsaux
open Mach
open PrintAST
let reg pp r =
- match name_of_register r with
+ match Machregsnames.name_of_register r with
| Some s -> fprintf pp "%s" s
| None -> fprintf pp "<unknown reg>"
diff --git a/backend/PrintXTL.ml b/backend/PrintXTL.ml
index d1b79623..6f2b1df9 100644
--- a/backend/PrintXTL.ml
+++ b/backend/PrintXTL.ml
@@ -22,7 +22,7 @@ open PrintOp
open XTL
let mreg pp r =
- match Machregsaux.name_of_register r with
+ match Machregsnames.name_of_register r with
| Some s -> fprintf pp "%s" s
| None -> fprintf pp "<unknown machreg>"
diff --git a/backend/Selection.v b/backend/Selection.v
index 342bd8ca..8667922f 100644
--- a/backend/Selection.v
+++ b/backend/Selection.v
@@ -251,10 +251,16 @@ Function sel_known_builtin (bf: builtin_function) (args: exprlist) :=
Some (sel_select ty a1 a2 a3)
| BI_standard BI_fabs, a1 ::: Enil =>
Some (SelectOp.absf a1)
+ | BI_standard BI_fabsf, a1 ::: Enil =>
+ Some (SelectOp.absfs a1)
| _, _ =>
None
end.
+(** A CminorSel statement that does nothing, like [Sskip], but reduces. *)
+
+Definition Sno_op := Sseq Sskip Sskip.
+
(** Builtin functions in general *)
Definition sel_builtin_default (optid: option ident) (ef: external_function)
@@ -264,17 +270,22 @@ Definition sel_builtin_default (optid: option ident) (ef: external_function)
Definition sel_builtin (optid: option ident) (ef: external_function)
(args: list Cminor.expr) :=
- match optid, ef with
- | Some id, EF_builtin name sg =>
+ match ef with
+ | EF_builtin name sg =>
match lookup_builtin_function name sg with
| Some bf =>
- match sel_known_builtin bf (sel_exprlist args) with
- | Some a => Sassign id a
- | None => sel_builtin_default optid ef args
+ match optid with
+ | Some id =>
+ match sel_known_builtin bf (sel_exprlist args) with
+ | Some a => Sassign id a
+ | None => sel_builtin_default optid ef args
+ end
+ | None =>
+ Sno_op (**r builtins with semantics are pure *)
end
| None => sel_builtin_default optid ef args
end
- | _, _ =>
+ | _ =>
sel_builtin_default optid ef args
end.
diff --git a/backend/Selectionproof.v b/backend/Selectionproof.v
index 955c45a4..4d075f4a 100644
--- a/backend/Selectionproof.v
+++ b/backend/Selectionproof.v
@@ -396,13 +396,10 @@ Proof.
inv ARGS; try discriminate. inv H0; try discriminate.
inv SEL.
simpl in SEM; inv SEM. apply eval_absf; auto.
- (* + (* expect *)
- inv ARGS; try discriminate.
- inv H0; try discriminate.
- inv H2; try discriminate.
- simpl in SEM. inv SEM. inv SEL.
- destruct v1; destruct v0.
- all: econstructor; split; eauto. *)
++ (* fabsf *)
+ inv ARGS; try discriminate. inv H0; try discriminate.
+ inv SEL.
+ simpl in SEM; inv SEM. apply eval_absfs; auto.
- eapply eval_platform_builtin; eauto.
Qed.
@@ -852,8 +849,8 @@ Lemma sel_builtin_default_correct:
external_call ef ge vl m1 t v m2 ->
env_lessdef e1 e1' -> Mem.extends m1 m1' ->
exists e2' m2',
- step tge (State f (sel_builtin_default optid ef al) k sp e1' m1')
- t (State f Sskip k sp e2' m2')
+ plus step tge (State f (sel_builtin_default optid ef al) k sp e1' m1')
+ t (State f Sskip k sp e2' m2')
/\ env_lessdef (set_optvar optid v e1) e2'
/\ Mem.extends m2 m2'.
Proof.
@@ -861,6 +858,7 @@ Proof.
exploit sel_builtin_args_correct; eauto. intros (vl' & A & B).
exploit external_call_mem_extends; eauto. intros (v' & m2' & D & E & F & _).
econstructor; exists m2'; split.
+ apply plus_one.
econstructor. eexact A. eapply external_call_symbols_preserved. eexact senv_preserved. eexact D.
split; auto. apply sel_builtin_res_correct; auto.
Qed.
@@ -871,8 +869,8 @@ Lemma sel_builtin_correct:
external_call ef ge vl m1 t v m2 ->
env_lessdef e1 e1' -> Mem.extends m1 m1' ->
exists e2' m2',
- step tge (State f (sel_builtin optid ef al) k sp e1' m1')
- t (State f Sskip k sp e2' m2')
+ plus step tge (State f (sel_builtin optid ef al) k sp e1' m1')
+ t (State f Sskip k sp e2' m2')
/\ env_lessdef (set_optvar optid v e1) e2'
/\ Mem.extends m2 m2'.
Proof.
@@ -880,15 +878,18 @@ Proof.
exploit sel_exprlist_correct; eauto. intros (vl' & A & B).
exploit external_call_mem_extends; eauto. intros (v' & m2' & D & E & F & _).
unfold sel_builtin.
- destruct optid as [id|]; eauto using sel_builtin_default_correct.
destruct ef; eauto using sel_builtin_default_correct.
destruct (lookup_builtin_function name sg) as [bf|] eqn:LKUP; eauto using sel_builtin_default_correct.
- destruct (sel_known_builtin bf (sel_exprlist al)) as [a|] eqn:SKB; eauto using sel_builtin_default_correct.
simpl in D. red in D. rewrite LKUP in D. inv D.
+ destruct optid as [id|]; eauto using sel_builtin_default_correct.
+- destruct (sel_known_builtin bf (sel_exprlist al)) as [a|] eqn:SKB; eauto using sel_builtin_default_correct.
exploit eval_sel_known_builtin; eauto. intros (v'' & U & V).
econstructor; exists m2'; split.
- econstructor. eexact U.
+ apply plus_one. econstructor. eexact U.
split; auto. apply set_var_lessdef; auto. apply Val.lessdef_trans with v'; auto.
+- exists e1', m2'; split.
+ eapply plus_two. constructor. constructor. auto.
+ simpl; auto.
Qed.
(** If-conversion *)
@@ -1179,8 +1180,8 @@ Remark sel_builtin_nolabel:
forall (hf: helper_functions) optid ef args, nolabel' (sel_builtin optid ef args).
Proof.
unfold sel_builtin; intros; red; intros.
- destruct optid; auto. destruct ef; auto. destruct lookup_builtin_function; auto.
- destruct sel_known_builtin; auto.
+ destruct ef; auto. destruct lookup_builtin_function; auto.
+ destruct optid; auto. destruct sel_known_builtin; auto.
Qed.
Remark find_label_commut:
@@ -1243,34 +1244,34 @@ Definition measure (s: Cminor.state) : nat :=
Lemma sel_step_correct:
forall S1 t S2, Cminor.step ge S1 t S2 ->
forall T1, match_states S1 T1 -> wt_state S1 ->
- (exists T2, step tge T1 t T2 /\ match_states S2 T2)
+ (exists T2, plus step tge T1 t T2 /\ match_states S2 T2)
\/ (measure S2 < measure S1 /\ t = E0 /\ match_states S2 T1)%nat
\/ (exists S3 T2, star Cminor.step ge S2 E0 S3 /\ step tge T1 t T2 /\ match_states S3 T2).
Proof.
induction 1; intros T1 ME WTS; inv ME; try (monadInv TS).
- (* skip seq *)
- inv MC. left; econstructor; split. econstructor. econstructor; eauto.
+ inv MC. left; econstructor; split. apply plus_one; econstructor. econstructor; eauto.
inv H.
- (* skip block *)
- inv MC. left; econstructor; split. econstructor. econstructor; eauto.
+ inv MC. left; econstructor; split. apply plus_one; econstructor. econstructor; eauto.
inv H.
- (* skip call *)
exploit Mem.free_parallel_extends; eauto. intros [m2' [A B]].
left; econstructor; split.
- econstructor. eapply match_is_call_cont; eauto.
+ apply plus_one; econstructor. eapply match_is_call_cont; eauto.
erewrite stackspace_function_translated; eauto.
econstructor; eauto. eapply match_is_call_cont; eauto.
- (* assign *)
exploit sel_expr_correct; eauto. intros [v' [A B]].
left; econstructor; split.
- econstructor; eauto.
+ apply plus_one; econstructor; eauto.
econstructor; eauto. apply set_var_lessdef; auto.
- (* store *)
exploit sel_expr_correct. try apply LINK. try apply HF. eexact H. eauto. eauto. intros [vaddr' [A B]].
exploit sel_expr_correct. try apply LINK. try apply HF. eexact H0. eauto. eauto. intros [v' [C D]].
exploit Mem.storev_extends; eauto. intros [m2' [P Q]].
left; econstructor; split.
- eapply eval_store; eauto.
+ apply plus_one; eapply eval_store; eauto.
econstructor; eauto.
- (* Scall *)
exploit classify_call_correct; eauto.
@@ -1280,7 +1281,7 @@ Proof.
exploit sel_exprlist_correct; eauto. intros [vargs' [C D]].
exploit functions_translated; eauto. intros (cunit' & fd' & U & V & W).
left; econstructor; split.
- econstructor; eauto. econstructor; eauto.
+ apply plus_one; econstructor; eauto. econstructor; eauto.
eapply sig_function_translated; eauto.
eapply match_callstate with (cunit := cunit'); eauto.
eapply match_cont_call with (cunit := cunit) (hf := hf); eauto.
@@ -1289,7 +1290,7 @@ Proof.
exploit sel_exprlist_correct; eauto. intros [vargs' [C D]].
exploit functions_translated; eauto. intros (cunit' & fd' & X & Y & Z).
left; econstructor; split.
- econstructor; eauto.
+ apply plus_one; econstructor; eauto.
subst vf. econstructor; eauto. rewrite symbols_preserved; eauto.
eapply sig_function_translated; eauto.
eapply match_callstate with (cunit := cunit'); eauto.
@@ -1304,6 +1305,7 @@ Proof.
exploit sel_exprlist_correct; eauto. intros [vargs' [C D]].
exploit functions_translated; eauto. intros (cunit' & fd' & E & F & G).
left; econstructor; split.
+ apply plus_one.
exploit classify_call_correct. eexact LINK. eauto. eauto.
destruct (classify_call (prog_defmap cunit)) as [ | id | ef]; intros.
econstructor; eauto. econstructor; eauto. eapply sig_function_translated; eauto.
@@ -1317,7 +1319,7 @@ Proof.
left; econstructor; split. eexact P. econstructor; eauto.
- (* Seq *)
left; econstructor; split.
- constructor.
+ apply plus_one; constructor.
econstructor; eauto. constructor; auto.
- (* Sifthenelse *)
simpl in TS. destruct (if_conversion (known_id f) env a s1 s2) as [s|] eqn:IFC; monadInv TS.
@@ -1329,21 +1331,21 @@ Proof.
+ exploit sel_expr_correct; eauto. intros [v' [A B]].
assert (Val.bool_of_val v' b). inv B. auto. inv H0.
left; exists (State f' (if b then x else x0) k' sp e' m'); split.
- econstructor; eauto. eapply eval_condexpr_of_expr; eauto.
+ apply plus_one; econstructor; eauto. eapply eval_condexpr_of_expr; eauto.
econstructor; eauto. destruct b; auto.
- (* Sloop *)
- left; econstructor; split. constructor. econstructor; eauto.
+ left; econstructor; split. apply plus_one; constructor. econstructor; eauto.
constructor; auto. simpl; rewrite EQ; auto.
- (* Sblock *)
- left; econstructor; split. constructor. econstructor; eauto. constructor; auto.
+ left; econstructor; split. apply plus_one; constructor. econstructor; eauto. constructor; auto.
- (* Sexit seq *)
- inv MC. left; econstructor; split. constructor. econstructor; eauto.
+ inv MC. left; econstructor; split. apply plus_one; constructor. econstructor; eauto.
inv H.
- (* Sexit0 block *)
- inv MC. left; econstructor; split. constructor. econstructor; eauto.
+ inv MC. left; econstructor; split. apply plus_one; constructor. econstructor; eauto.
inv H.
- (* SexitS block *)
- inv MC. left; econstructor; split. constructor. econstructor; eauto.
+ inv MC. left; econstructor; split. apply plus_one; constructor. econstructor; eauto.
inv H.
- (* Sswitch *)
inv H0; simpl in TS.
@@ -1351,29 +1353,29 @@ Proof.
destruct (validate_switch Int.modulus default cases ct) eqn:VALID; inv TS.
exploit sel_expr_correct; eauto. intros [v' [A B]]. inv B.
left; econstructor; split.
- econstructor. eapply sel_switch_int_correct; eauto.
+ apply plus_one; econstructor. eapply sel_switch_int_correct; eauto.
econstructor; eauto.
+ set (ct := compile_switch Int64.modulus default cases) in *.
destruct (validate_switch Int64.modulus default cases ct) eqn:VALID; inv TS.
exploit sel_expr_correct; eauto. intros [v' [A B]]. inv B.
left; econstructor; split.
- econstructor. eapply sel_switch_long_correct; eauto.
+ apply plus_one; econstructor. eapply sel_switch_long_correct; eauto.
econstructor; eauto.
- (* Sreturn None *)
exploit Mem.free_parallel_extends; eauto. intros [m2' [P Q]].
erewrite <- stackspace_function_translated in P by eauto.
left; econstructor; split.
- econstructor. simpl; eauto.
+ apply plus_one; econstructor. simpl; eauto.
econstructor; eauto. eapply call_cont_commut; eauto.
- (* Sreturn Some *)
exploit Mem.free_parallel_extends; eauto. intros [m2' [P Q]].
erewrite <- stackspace_function_translated in P by eauto.
exploit sel_expr_correct; eauto. intros [v' [A B]].
left; econstructor; split.
- econstructor; eauto.
+ apply plus_one; econstructor; eauto.
econstructor; eauto. eapply call_cont_commut; eauto.
- (* Slabel *)
- left; econstructor; split. constructor. econstructor; eauto.
+ left; econstructor; split. apply plus_one; constructor. econstructor; eauto.
- (* Sgoto *)
assert (sel_stmt (prog_defmap cunit) (known_id f) env (Cminor.fn_body f) = OK (fn_body f')).
{ monadInv TF; simpl. congruence. }
@@ -1384,7 +1386,7 @@ Proof.
as [[s'' k'']|] eqn:?; intros; try contradiction.
destruct H1.
left; econstructor; split.
- econstructor; eauto.
+ apply plus_one; econstructor; eauto.
econstructor; eauto.
- (* internal function *)
destruct TF as (hf & HF & TF).
@@ -1392,7 +1394,7 @@ Proof.
exploit Mem.alloc_extends. eauto. eauto. apply Z.le_refl. apply Z.le_refl.
intros [m2' [A B]].
left; econstructor; split.
- econstructor; simpl; eauto.
+ apply plus_one; econstructor; simpl; eauto.
econstructor; simpl; eauto.
apply match_cont_other; auto.
apply set_locals_lessdef. apply set_params_lessdef; auto.
@@ -1402,7 +1404,7 @@ Proof.
exploit external_call_mem_extends; eauto.
intros [vres' [m2 [A [B [C D]]]]].
left; econstructor; split.
- econstructor. eapply external_call_symbols_preserved; eauto. apply senv_preserved.
+ apply plus_one; econstructor. eapply external_call_symbols_preserved; eauto. apply senv_preserved.
econstructor; eauto.
- (* external call turned into a Sbuiltin *)
exploit sel_builtin_correct; eauto. intros (e2' & m2' & P & Q & R).
@@ -1410,7 +1412,7 @@ Proof.
- (* return *)
inv MC.
left; econstructor; split.
- econstructor.
+ apply plus_one; econstructor.
econstructor; eauto. destruct optid; simpl; auto. apply set_var_lessdef; auto.
- (* return of an external call turned into a Sbuiltin *)
right; left; split. simpl; omega. split. auto. econstructor; eauto.
@@ -1453,7 +1455,7 @@ Proof.
unfold MS.
exploit sel_step_correct; eauto.
intros [(T2 & D & E) | [(D & E & F) | (S3 & T2 & D & E & F)]].
-+ exists S2, T2. intuition auto using star_refl, plus_one.
++ exists S2, T2. intuition auto using star_refl.
+ subst t. exists S2, T1. intuition auto using star_refl.
+ assert (wt_state S3) by (eapply subject_reduction_star; eauto using wt_prog).
exists S3, T2. intuition auto using plus_one.
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index 75f5eb3e..d830ada6 100644
--- a/cfrontend/C2C.ml
+++ b/cfrontend/C2C.ml
@@ -194,12 +194,28 @@ let builtins_generic = {
(TInt(IUInt, []), [TInt(IUInt, [])], false);
"__builtin_bswap16",
(TInt(IUShort, []), [TInt(IUShort, [])], false);
+ "__builtin_clz",
+ (TInt(IInt, []), [TInt(IUInt, [])], false);
+ "__builtin_clzl",
+ (TInt(IInt, []), [TInt(IULong, [])], false);
+ "__builtin_clzll",
+ (TInt(IInt, []), [TInt(IULongLong, [])], false);
+ "__builtin_ctz",
+ (TInt(IInt, []), [TInt(IUInt, [])], false);
+ "__builtin_ctzl",
+ (TInt(IInt, []), [TInt(IULong, [])], false);
+ "__builtin_ctzll",
+ (TInt(IInt, []), [TInt(IULongLong, [])], false);
(* Floating-point absolute value *)
"__builtin_fabs",
(TFloat(FDouble, []), [TFloat(FDouble, [])], false);
+ "__builtin_fabsf",
+ (TFloat(FFloat, []), [TFloat(FFloat, [])], false);
(* Float arithmetic *)
"__builtin_fsqrt",
(TFloat(FDouble, []), [TFloat(FDouble, [])], false);
+ "__builtin_sqrt",
+ (TFloat(FDouble, []), [TFloat(FDouble, [])], false);
(* Block copy *)
"__builtin_memcpy_aligned",
(TVoid [],
@@ -1540,7 +1556,7 @@ let convertProgram p =
let p' =
{ prog_defs = gl2;
prog_public = public_globals gl2;
- prog_main = intern_string "main";
+ prog_main = intern_string !Clflags.main_function_name;
prog_types = typs;
prog_comp_env = ce } in
Diagnostics.check_errors ();
diff --git a/cfrontend/CPragmas.ml b/cfrontend/CPragmas.ml
index 44660718..22ab2b5a 100644
--- a/cfrontend/CPragmas.ml
+++ b/cfrontend/CPragmas.ml
@@ -49,13 +49,15 @@ let process_use_section_pragma classname id =
(* #pragma reserve_register *)
+let reserved_registers = ref ([]: Machregs.mreg list)
+
let process_reserve_register_pragma name =
- match Machregsaux.register_by_name name with
+ match Machregsnames.register_by_name name with
| None ->
C2C.error "unknown register in `reserve_register' pragma"
| Some r ->
- if Machregsaux.can_reserve_register r then
- IRC.reserved_registers := r :: !IRC.reserved_registers
+ if Conventions1.is_callee_save r then
+ reserved_registers := r :: !reserved_registers
else
C2C.error "cannot reserve this register (not a callee-save)"
@@ -84,5 +86,8 @@ let process_pragma name =
| _ ->
false
+let reset () =
+ reserved_registers := []
+
let initialize () =
C2C.process_pragma_hook := process_pragma
diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml
index beca056f..cfb2b584 100644
--- a/cfrontend/PrintCsyntax.ml
+++ b/cfrontend/PrintCsyntax.ml
@@ -270,6 +270,9 @@ let rec expr p (prec, e) =
| Ebuiltin(EF_debug(kind,txt,_),_,args,_) ->
fprintf p "__builtin_debug@[<hov 1>(%d,%S%a)@]"
(P.to_int kind) (extern_atom txt) exprlist (false,args)
+ | Ebuiltin(EF_builtin(name, _), _, args, _) ->
+ fprintf p "%s@[<hov 1>(%a)@]"
+ (camlstring_of_coqstring name) exprlist (true, args)
| Ebuiltin(_, _, args, _) ->
fprintf p "<unknown builtin>@[<hov 1>(%a)@]" exprlist (true, args)
| Eparen(a1, tycast, ty) ->
diff --git a/cfrontend/SimplExpr.v b/cfrontend/SimplExpr.v
index 7cdff468..c7e57a54 100644
--- a/cfrontend/SimplExpr.v
+++ b/cfrontend/SimplExpr.v
@@ -268,8 +268,13 @@ Fixpoint transl_expr (dst: destination) (a: Csyntax.expr) : mon (list statement
do (sl2, a2) <- transl_expr For_val r2;
ret (finish dst (sl1 ++ sl2) (Ebinop op a1 a2 ty))
| Csyntax.Ecast r1 ty =>
- do (sl1, a1) <- transl_expr For_val r1;
- ret (finish dst sl1 (Ecast a1 ty))
+ match dst with
+ | For_val | For_set _ =>
+ do (sl1, a1) <- transl_expr For_val r1;
+ ret (finish dst sl1 (Ecast a1 ty))
+ | For_effects =>
+ transl_expr For_effects r1
+ end
| Csyntax.Eseqand r1 r2 ty =>
do (sl1, a1) <- transl_expr For_val r1;
match dst with
diff --git a/cfrontend/SimplExprproof.v b/cfrontend/SimplExprproof.v
index ee1df409..9a3f32ec 100644
--- a/cfrontend/SimplExprproof.v
+++ b/cfrontend/SimplExprproof.v
@@ -145,18 +145,18 @@ Proof.
assert (A: forall dst a, dst = For_val \/ dst = For_effects -> final dst a = nil).
intros. destruct H; subst dst; auto.
apply tr_expr_exprlist; intros; simpl in *; try discriminate; auto.
- rewrite H0; auto. simpl; auto.
- rewrite H0; auto. simpl; auto.
- destruct H1; congruence.
- destruct (andb_prop _ _ H6). inv H1.
+- rewrite H0; auto. simpl; auto.
+- rewrite H0; auto. simpl; auto.
+- destruct H1; congruence.
+- destruct (andb_prop _ _ H6). inv H1.
rewrite H0; eauto. simpl; auto.
unfold chunk_for_volatile_type in H9.
destruct (type_is_volatile (Csyntax.typeof e1)); simpl in H8; congruence.
- rewrite H0; auto. simpl; auto.
- rewrite H0; auto. simpl; auto.
- destruct (andb_prop _ _ H7). rewrite H0; auto. rewrite H2; auto. simpl; auto.
- rewrite H0; auto. simpl; auto.
- destruct (andb_prop _ _ H6). rewrite H0; auto.
+- rewrite H0; auto. simpl; auto.
+- rewrite H0; auto. simpl; auto.
+- destruct (andb_prop _ _ H7). rewrite H0; auto. rewrite H2; auto. simpl; auto.
+- rewrite H0; auto. simpl; auto.
+- destruct (andb_prop _ _ H6). rewrite H0; auto.
Qed.
Lemma tr_simple_expr_nil:
@@ -234,11 +234,11 @@ Proof.
Opaque makeif.
intros e m.
apply (eval_simple_rvalue_lvalue_ind ge e m); intros until tmps; intros TR; inv TR.
-(* value *)
+- (* value *)
auto.
- auto.
- exists a0; auto.
-(* rvalof *)
+- auto.
+- exists a0; auto.
+- (* rvalof *)
inv H7; try congruence.
exploit H0; eauto. intros [A [B C]].
subst sl1; simpl.
@@ -248,53 +248,55 @@ Opaque makeif.
exploit deref_loc_translated; eauto. unfold chunk_for_volatile_type; rewrite H2. tauto.
destruct dst; auto.
econstructor. split. simpl; eauto. auto.
-(* addrof *)
+- (* addrof *)
exploit H0; eauto. intros [A [B C]].
subst sl1; simpl.
assert (eval_expr tge e le m (Eaddrof' a1 ty) (Vptr b ofs)) by (apply eval_Eaddrof'; auto).
assert (typeof (Eaddrof' a1 ty) = ty) by (apply typeof_Eaddrof').
destruct dst; auto. simpl; econstructor; eauto.
-(* unop *)
+- (* unop *)
exploit H0; eauto. intros [A [B C]].
subst sl1; simpl.
assert (eval_expr tge e le m (Eunop op a1 ty) v). econstructor; eauto. congruence.
destruct dst; auto. simpl; econstructor; eauto.
-(* binop *)
+- (* binop *)
exploit H0; eauto. intros [A [B C]].
exploit H2; eauto. intros [D [E F]].
subst sl1 sl2; simpl.
assert (eval_expr tge e le m (Ebinop op a1 a2 ty) v). econstructor; eauto. rewrite comp_env_preserved; congruence.
destruct dst; auto. simpl; econstructor; eauto.
-(* cast *)
+- (* cast effects *)
+ exploit H0; eauto.
+- (* cast val *)
exploit H0; eauto. intros [A [B C]].
subst sl1; simpl.
assert (eval_expr tge e le m (Ecast a1 ty) v). econstructor; eauto. congruence.
destruct dst; auto. simpl; econstructor; eauto.
-(* sizeof *)
+- (* sizeof *)
rewrite <- comp_env_preserved.
destruct dst.
split; auto. split; auto. constructor.
auto.
exists (Esizeof ty1 ty). split. auto. split. auto. constructor.
-(* alignof *)
+- (* alignof *)
rewrite <- comp_env_preserved.
destruct dst.
split; auto. split; auto. constructor.
auto.
exists (Ealignof ty1 ty). split. auto. split. auto. constructor.
-(* var local *)
+- (* var local *)
split; auto. split; auto. apply eval_Evar_local; auto.
-(* var global *)
+- (* var global *)
split; auto. split; auto. apply eval_Evar_global; auto.
rewrite symbols_preserved; auto.
-(* deref *)
+- (* deref *)
exploit H0; eauto. intros [A [B C]]. subst sl1.
split; auto. split. rewrite typeof_Ederef'; auto. apply eval_Ederef'; auto.
-(* field struct *)
+- (* field struct *)
rewrite <- comp_env_preserved in *.
exploit H0; eauto. intros [A [B C]]. subst sl1.
split; auto. split; auto. rewrite B in H1. eapply eval_Efield_struct; eauto.
-(* field union *)
+- (* field union *)
rewrite <- comp_env_preserved in *.
exploit H0; eauto. intros [A [B C]]. subst sl1.
split; auto. split; auto. rewrite B in H1. eapply eval_Efield_union; eauto.
@@ -408,43 +410,43 @@ Ltac UNCHANGED :=
(*generalize compat_dest_change; intro CDC.*)
apply leftcontext_leftcontextlist_ind; intros.
-(* base *)
+- (* base *)
TR. rewrite <- app_nil_end; auto. red; auto.
intros. rewrite <- app_nil_end; auto.
-(* deref *)
+- (* deref *)
inv H1.
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1; rewrite app_ass; eauto. auto.
intros. rewrite <- app_ass. econstructor; eauto.
-(* field *)
+- (* field *)
inv H1.
exploit H0. eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1; rewrite app_ass; eauto. auto.
intros. rewrite <- app_ass. econstructor; eauto.
-(* rvalof *)
+- (* rvalof *)
inv H1.
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1; rewrite app_ass; eauto. red; eauto.
intros. rewrite <- app_ass; econstructor; eauto.
exploit typeof_context; eauto. congruence.
-(* addrof *)
+- (* addrof *)
inv H1.
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1; rewrite app_ass; eauto. auto.
intros. rewrite <- app_ass. econstructor; eauto.
-(* unop *)
+- (* unop *)
inv H1.
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1; rewrite app_ass; eauto. auto.
intros. rewrite <- app_ass. econstructor; eauto.
-(* binop left *)
+- (* binop left *)
inv H1.
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1. rewrite app_ass. eauto.
red; auto.
intros. rewrite <- app_ass. econstructor; eauto.
eapply tr_expr_invariant; eauto. UNCHANGED.
-(* binop right *)
+- (* binop right *)
inv H2.
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
@@ -452,14 +454,19 @@ Ltac UNCHANGED :=
red; auto.
intros. rewrite <- app_ass. change (sl3 ++ sl2') with (nil ++ sl3 ++ sl2'). rewrite app_ass. econstructor; eauto.
eapply tr_expr_invariant; eauto. UNCHANGED.
-(* cast *)
+- (* cast *)
inv H1.
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
- TR. subst sl1; rewrite app_ass; eauto. auto.
+ TR. eauto. auto.
+ intros. econstructor; eauto.
++ (* generic *)
+ exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
+ TR. subst sl1. rewrite app_ass. eauto. auto.
intros. rewrite <- app_ass. econstructor; eauto.
-(* seqand *)
+- (* seqand *)
inv H1.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
@@ -467,15 +474,15 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto. auto.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
red; auto.
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
- auto. auto. auto. auto.
- (* for set *)
+ auto. auto. auto.
++ (* for set *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
@@ -483,9 +490,9 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto. auto.
-(* seqor *)
+- (* seqor *)
inv H1.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
@@ -493,15 +500,15 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto. auto.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
red; auto.
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
- auto. auto. auto. auto.
- (* for set *)
+ auto. auto. auto.
++ (* for set *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
@@ -509,9 +516,9 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto. auto.
-(* condition *)
+- (* condition *)
inv H1.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
@@ -520,7 +527,7 @@ Ltac UNCHANGED :=
eapply tr_expr_invariant; eauto. UNCHANGED.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto. auto. auto. auto.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
@@ -529,7 +536,7 @@ Ltac UNCHANGED :=
eapply tr_expr_invariant; eauto. UNCHANGED.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto. auto. auto.
- (* for set *)
++ (* for set *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR.
rewrite Q. rewrite app_ass. eauto.
@@ -538,16 +545,16 @@ Ltac UNCHANGED :=
eapply tr_expr_invariant; eauto. UNCHANGED.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto. auto. auto. auto.
-(* assign left *)
+- (* assign left *)
inv H1.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1. rewrite app_ass. eauto.
red; auto.
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1. rewrite app_ass. eauto.
red; auto.
@@ -556,9 +563,9 @@ Ltac UNCHANGED :=
auto. auto. auto. auto. auto. auto.
eapply typeof_context; eauto.
auto.
-(* assign right *)
+- (* assign right *)
inv H2.
- (* for effects *)
++ (* for effects *)
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl2. rewrite app_ass. eauto.
@@ -567,7 +574,7 @@ Ltac UNCHANGED :=
econstructor.
eapply tr_expr_invariant; eauto. UNCHANGED.
apply S; auto. auto. auto. auto.
- (* for val *)
++ (* for val *)
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl2. rewrite app_ass. eauto.
@@ -577,9 +584,9 @@ Ltac UNCHANGED :=
eapply tr_expr_invariant; eauto. UNCHANGED.
apply S; auto. auto. auto. auto. auto. auto. auto. auto.
eapply typeof_context; eauto.
-(* assignop left *)
+- (* assignop left *)
inv H1.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1. rewrite app_ass. eauto.
red; auto.
@@ -587,7 +594,7 @@ Ltac UNCHANGED :=
eapply tr_expr_invariant; eauto. UNCHANGED.
symmetry; eapply typeof_context; eauto. eauto.
auto. auto. auto. auto. auto. auto.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1. rewrite app_ass. eauto.
red; auto.
@@ -595,9 +602,9 @@ Ltac UNCHANGED :=
eapply tr_expr_invariant; eauto. UNCHANGED.
eauto. auto. auto. auto. auto. auto. auto. auto. auto. auto. auto.
eapply typeof_context; eauto.
-(* assignop right *)
+- (* assignop right *)
inv H2.
- (* for effects *)
++ (* for effects *)
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl2. rewrite app_ass. eauto.
@@ -605,7 +612,7 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. change (sl0 ++ sl2') with (nil ++ sl0 ++ sl2'). rewrite app_ass. econstructor.
eapply tr_expr_invariant; eauto. UNCHANGED.
apply S; auto. auto. eauto. auto. auto. auto. auto. auto. auto.
- (* for val *)
++ (* for val *)
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl2. rewrite app_ass. eauto.
@@ -613,35 +620,35 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. change (sl0 ++ sl2') with (nil ++ sl0 ++ sl2'). rewrite app_ass. econstructor.
eapply tr_expr_invariant; eauto. UNCHANGED.
apply S; auto. eauto. auto. auto. auto. auto. auto. auto. auto. auto. auto. auto. auto.
-(* postincr *)
+- (* postincr *)
inv H1.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto. red; auto.
intros. rewrite <- app_ass. econstructor; eauto.
symmetry; eapply typeof_context; eauto.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto. red; auto.
intros. rewrite <- app_ass. econstructor; eauto.
eapply typeof_context; eauto.
-(* call left *)
+- (* call left *)
inv H1.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto. red; auto.
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_exprlist_invariant; eauto. UNCHANGED.
auto. auto. auto.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto. red; auto.
intros. rewrite <- app_ass. econstructor. auto. apply S; auto.
eapply tr_exprlist_invariant; eauto. UNCHANGED.
auto. auto. auto. auto.
-(* call right *)
+- (* call right *)
inv H2.
- (* for effects *)
++ (* for effects *)
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto.
@@ -650,7 +657,7 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. change (sl3++sl2') with (nil ++ sl3 ++ sl2'). rewrite app_ass. econstructor.
eapply tr_expr_invariant; eauto. UNCHANGED.
apply S; auto. auto. auto. auto.
- (* for val *)
++ (* for val *)
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto.
@@ -660,42 +667,42 @@ Ltac UNCHANGED :=
auto. eapply tr_expr_invariant; eauto. UNCHANGED.
apply S; auto.
auto. auto. auto. auto.
-(* builtin *)
+- (* builtin *)
inv H1.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto.
red; auto.
intros. rewrite <- app_ass. change (sl3++sl2') with (nil ++ sl3 ++ sl2'). rewrite app_ass. econstructor.
apply S; auto. auto.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto.
red; auto.
intros. rewrite <- app_ass. change (sl3++sl2') with (nil ++ sl3 ++ sl2'). rewrite app_ass. econstructor.
auto. apply S; auto. auto. auto.
-(* comma *)
+- (* comma *)
inv H1.
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q; rewrite app_ass; eauto. red; auto.
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_expr_invariant; eauto. UNCHANGED.
auto. auto. auto.
-(* paren *)
+- (* paren *)
inv H1.
- (* for val *)
++ (* for val *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q. eauto. red; auto.
intros. econstructor; eauto.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q. eauto. auto.
intros. econstructor; eauto.
- (* for set *)
++ (* for set *)
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. rewrite Q. eauto. auto.
intros. econstructor; eauto.
-(* cons left *)
+- (* cons left *)
inv H1.
exploit H0; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
TR. subst sl1. rewrite app_ass. eauto.
@@ -703,7 +710,7 @@ Ltac UNCHANGED :=
intros. rewrite <- app_ass. econstructor. apply S; auto.
eapply tr_exprlist_invariant; eauto. UNCHANGED.
auto. auto. auto.
-(* cons right *)
+- (* cons right *)
inv H2.
assert (sl1 = nil) by (eapply tr_simple_expr_nil; eauto). subst sl1; simpl.
exploit H1; eauto. intros [dst' [sl1' [sl2' [a' [tmp' [P [Q [R S]]]]]]]].
diff --git a/cfrontend/SimplExprspec.v b/cfrontend/SimplExprspec.v
index 95e3957c..98425311 100644
--- a/cfrontend/SimplExprspec.v
+++ b/cfrontend/SimplExprspec.v
@@ -108,7 +108,12 @@ Inductive tr_expr: temp_env -> destination -> Csyntax.expr -> list statement ->
tr_expr le dst (Csyntax.Ebinop op e1 e2 ty)
(sl1 ++ sl2 ++ final dst (Ebinop op a1 a2 ty))
(Ebinop op a1 a2 ty) tmp
- | tr_cast: forall le dst e1 ty sl1 a1 tmp,
+ | tr_cast_effects: forall le e1 ty sl1 a1 any tmp,
+ tr_expr le For_effects e1 sl1 a1 tmp ->
+ tr_expr le For_effects (Csyntax.Ecast e1 ty)
+ sl1
+ any tmp
+ | tr_cast_val: forall le dst e1 ty sl1 a1 tmp,
tr_expr le For_val e1 sl1 a1 tmp ->
tr_expr le dst (Csyntax.Ecast e1 ty)
(sl1 ++ final dst (Ecast a1 ty))
@@ -767,58 +772,69 @@ Lemma transl_meets_spec:
exists tmps, (forall le, tr_exprlist le rl sl al tmps) /\ contained tmps g g').
Proof.
apply expr_exprlist_ind; simpl add_dest; intros.
-(* val *)
+- (* val *)
simpl in H. destruct v; monadInv H; exists (@nil ident); split; auto with gensym.
Opaque makeif.
-- intros. destruct dst; simpl in *; inv H2.
++ intros. destruct dst; simpl in *; inv H2.
constructor. auto. intros; constructor.
constructor.
constructor. auto. intros; constructor.
-- intros. destruct dst; simpl in *; inv H2.
++ intros. destruct dst; simpl in *; inv H2.
constructor. auto. intros; constructor.
constructor.
constructor. auto. intros; constructor.
-- intros. destruct dst; simpl in *; inv H2.
++ intros. destruct dst; simpl in *; inv H2.
constructor. auto. intros; constructor.
constructor.
constructor. auto. intros; constructor.
-- intros. destruct dst; simpl in *; inv H2.
++ intros. destruct dst; simpl in *; inv H2.
constructor. auto. intros; constructor.
constructor.
constructor. auto. intros; constructor.
-(* var *)
-- monadInv H; econstructor; split; auto with gensym. UseFinish. constructor.
-(* field *)
-- monadInv H0. exploit H; eauto. auto. intros [tmp [A B]]. UseFinish.
+- (* var *)
+ monadInv H; econstructor; split; auto with gensym. UseFinish. constructor.
+- (* field *)
+ monadInv H0. exploit H; eauto. auto. intros [tmp [A B]]. UseFinish.
econstructor; split; eauto. intros; apply tr_expr_add_dest. constructor; auto.
-(* valof *)
-- monadInv H0. exploit H; eauto. intros [tmp1 [A B]].
+- (* valof *)
+ monadInv H0. exploit H; eauto. intros [tmp1 [A B]].
exploit transl_valof_meets_spec; eauto. intros [tmp2 [Csyntax D]]. UseFinish.
exists (tmp1 ++ tmp2); split.
intros; apply tr_expr_add_dest. econstructor; eauto with gensym.
eauto with gensym.
-(* deref *)
-- monadInv H0. exploit H; eauto. intros [tmp [A B]]. UseFinish.
+- (* deref *)
+ monadInv H0. exploit H; eauto. intros [tmp [A B]]. UseFinish.
econstructor; split; eauto. intros; apply tr_expr_add_dest. constructor; auto.
-(* addrof *)
-- monadInv H0. exploit H; eauto. intros [tmp [A B]]. UseFinish.
+- (* addrof *)
+ monadInv H0. exploit H; eauto. intros [tmp [A B]]. UseFinish.
econstructor; split; eauto. intros; apply tr_expr_add_dest. econstructor; eauto.
-(* unop *)
-- monadInv H0. exploit H; eauto. intros [tmp [A B]]. UseFinish.
+- (* unop *)
+ monadInv H0. exploit H; eauto. intros [tmp [A B]]. UseFinish.
econstructor; split; eauto. intros; apply tr_expr_add_dest. constructor; auto.
-(* binop *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* binop *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
exploit H0; eauto. intros [tmp2 [Csyntax D]]. UseFinish.
exists (tmp1 ++ tmp2); split.
intros; apply tr_expr_add_dest. econstructor; eauto with gensym.
eauto with gensym.
-(* cast *)
-- monadInv H0. exploit H; eauto. intros [tmp [A B]]. UseFinish.
- econstructor; split; eauto. intros; apply tr_expr_add_dest. constructor; auto.
-(* seqand *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* cast *)
+ destruct dst.
++ (* for value *)
+ monadInv H0. exploit H; eauto. intros [tmp [A B]].
+ econstructor; split; eauto. intros; apply tr_expr_add_dest.
+ rewrite (app_nil_end sl).
+ apply tr_cast_val with (dst := For_val); auto.
++ (* for effects *)
+ exploit H; eauto. intros [tmp [A B]].
+ econstructor; split; eauto. intros; eapply tr_cast_effects; eauto.
++ (* for set *)
+ monadInv H0. exploit H; eauto. intros [tmp [A B]].
+ econstructor; split; eauto. intros; apply tr_expr_add_dest.
+ apply tr_cast_val with (dst := For_set sd); auto.
+- (* seqand *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
destruct dst; monadInv EQ0.
- (* for value *)
++ (* for value *)
exploit H0; eauto with gensym. intros [tmp2 [C D]].
simpl add_dest in *.
exists (x0 :: tmp1 ++ tmp2); split.
@@ -826,23 +842,23 @@ Opaque makeif.
apply list_disjoint_cons_r; eauto with gensym.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto with gensym. intros [tmp2 [Csyntax D]].
simpl add_dest in *.
exists (tmp1 ++ tmp2); split.
intros; eapply tr_seqand_effects; eauto with gensym.
apply contained_app; eauto with gensym.
- (* for set *)
++ (* for set *)
exploit H0; eauto with gensym. intros [tmp2 [C D]].
simpl add_dest in *.
exists (tmp1 ++ tmp2); split.
intros; eapply tr_seqand_set; eauto with gensym.
apply list_disjoint_cons_r; eauto with gensym.
apply contained_app; eauto with gensym.
-(* seqor *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* seqor *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
destruct dst; monadInv EQ0.
- (* for value *)
++ (* for value *)
exploit H0; eauto with gensym. intros [tmp2 [Csyntax D]].
simpl add_dest in *.
exists (x0 :: tmp1 ++ tmp2); split.
@@ -850,23 +866,23 @@ Opaque makeif.
apply list_disjoint_cons_r; eauto with gensym.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto with gensym. intros [tmp2 [C D]].
simpl add_dest in *.
exists (tmp1 ++ tmp2); split.
intros; eapply tr_seqor_effects; eauto with gensym.
apply contained_app; eauto with gensym.
- (* for set *)
++ (* for set *)
exploit H0; eauto with gensym. intros [tmp2 [C D]].
simpl add_dest in *.
exists (tmp1 ++ tmp2); split.
intros; eapply tr_seqor_set; eauto with gensym.
apply list_disjoint_cons_r; eauto with gensym.
apply contained_app; eauto with gensym.
-(* condition *)
-- monadInv H2. exploit H; eauto. intros [tmp1 [A B]].
+- (* condition *)
+ monadInv H2. exploit H; eauto. intros [tmp1 [A B]].
destruct dst; monadInv EQ0.
- (* for value *)
++ (* for value *)
exploit H0; eauto with gensym. intros [tmp2 [C D]].
exploit H1; eauto with gensym. intros [tmp3 [E F]].
simpl add_dest in *.
@@ -877,14 +893,14 @@ Opaque makeif.
apply contained_cons. eauto with gensym.
apply contained_app. eauto with gensym.
apply contained_app; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exploit H0; eauto. intros [tmp2 [Csyntax D]].
exploit H1; eauto. intros [tmp3 [E F]].
simpl add_dest in *.
exists (tmp1 ++ tmp2 ++ tmp3); split.
intros; eapply tr_condition_effects; eauto with gensym.
apply contained_app; eauto with gensym.
- (* for test *)
++ (* for test *)
exploit H0; eauto with gensym. intros [tmp2 [C D]].
exploit H1; eauto 10 with gensym. intros [tmp3 [E F]].
simpl add_dest in *.
@@ -895,70 +911,70 @@ Opaque makeif.
apply contained_cons; eauto with gensym.
apply contained_app; eauto with gensym.
apply contained_app; eauto with gensym.
-(* sizeof *)
-- monadInv H. UseFinish.
+- (* sizeof *)
+ monadInv H. UseFinish.
exists (@nil ident); split; auto with gensym. constructor.
-(* alignof *)
-- monadInv H. UseFinish.
+- (* alignof *)
+ monadInv H. UseFinish.
exists (@nil ident); split; auto with gensym. constructor.
-(* assign *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* assign *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
exploit H0; eauto. intros [tmp2 [Csyntax D]].
destruct dst; monadInv EQ2; simpl add_dest in *.
- (* for value *)
++ (* for value *)
exists (x1 :: tmp1 ++ tmp2); split.
intros. eapply tr_assign_val with (dst := For_val); eauto with gensym.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exists (tmp1 ++ tmp2); split.
econstructor; eauto with gensym.
apply contained_app; eauto with gensym.
- (* for set *)
++ (* for set *)
exists (x1 :: tmp1 ++ tmp2); split.
repeat rewrite app_ass. simpl.
intros. eapply tr_assign_val with (dst := For_set sd); eauto with gensym.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
-(* assignop *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* assignop *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
exploit H0; eauto. intros [tmp2 [Csyntax D]].
exploit transl_valof_meets_spec; eauto. intros [tmp3 [E F]].
destruct dst; monadInv EQ3; simpl add_dest in *.
- (* for value *)
++ (* for value *)
exists (x2 :: tmp1 ++ tmp2 ++ tmp3); split.
intros. eapply tr_assignop_val with (dst := For_val); eauto with gensym.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exists (tmp1 ++ tmp2 ++ tmp3); split.
econstructor; eauto with gensym.
apply contained_app; eauto with gensym.
- (* for set *)
++ (* for set *)
exists (x2 :: tmp1 ++ tmp2 ++ tmp3); split.
repeat rewrite app_ass. simpl.
intros. eapply tr_assignop_val with (dst := For_set sd); eauto with gensym.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
-(* postincr *)
-- monadInv H0. exploit H; eauto. intros [tmp1 [A B]].
+- (* postincr *)
+ monadInv H0. exploit H; eauto. intros [tmp1 [A B]].
destruct dst; monadInv EQ0; simpl add_dest in *.
- (* for value *)
++ (* for value *)
exists (x0 :: tmp1); split.
econstructor; eauto with gensym.
apply contained_cons; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exploit transl_valof_meets_spec; eauto. intros [tmp2 [Csyntax D]].
exists (tmp1 ++ tmp2); split.
econstructor; eauto with gensym.
eauto with gensym.
- (* for set *)
++ (* for set *)
repeat rewrite app_ass; simpl.
exists (x0 :: tmp1); split.
econstructor; eauto with gensym.
apply contained_cons; eauto with gensym.
-(* comma *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* comma *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
exploit H0; eauto with gensym. intros [tmp2 [Csyntax D]].
exists (tmp1 ++ tmp2); split.
econstructor; eauto with gensym.
@@ -967,47 +983,47 @@ Opaque makeif.
simpl. eapply incl_tran. 2: apply add_dest_incl. auto with gensym.
destruct dst; simpl; auto with gensym.
apply contained_app; eauto with gensym.
-(* call *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* call *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
exploit H0; eauto. intros [tmp2 [Csyntax D]].
destruct dst; monadInv EQ2; simpl add_dest in *.
- (* for value *)
++ (* for value *)
exists (x1 :: tmp1 ++ tmp2); split.
econstructor; eauto with gensym. congruence.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exists (tmp1 ++ tmp2); split.
econstructor; eauto with gensym.
apply contained_app; eauto with gensym.
- (* for set *)
++ (* for set *)
exists (x1 :: tmp1 ++ tmp2); split.
repeat rewrite app_ass. econstructor; eauto with gensym. congruence.
apply contained_cons. eauto with gensym.
apply contained_app; eauto with gensym.
-(* builtin *)
-- monadInv H0. exploit H; eauto. intros [tmp1 [A B]].
+- (* builtin *)
+ monadInv H0. exploit H; eauto. intros [tmp1 [A B]].
destruct dst; monadInv EQ0; simpl add_dest in *.
- (* for value *)
++ (* for value *)
exists (x0 :: tmp1); split.
econstructor; eauto with gensym. congruence.
apply contained_cons; eauto with gensym.
- (* for effects *)
++ (* for effects *)
exists tmp1; split.
econstructor; eauto with gensym.
auto.
- (* for set *)
++ (* for set *)
exists (x0 :: tmp1); split.
repeat rewrite app_ass. econstructor; eauto with gensym. congruence.
apply contained_cons; eauto with gensym.
-(* loc *)
-- monadInv H.
-(* paren *)
-- monadInv H0.
-(* nil *)
-- monadInv H; exists (@nil ident); split; auto with gensym. constructor.
-(* cons *)
-- monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
+- (* loc *)
+ monadInv H.
+- (* paren *)
+ monadInv H0.
+- (* nil *)
+ monadInv H; exists (@nil ident); split; auto with gensym. constructor.
+- (* cons *)
+ monadInv H1. exploit H; eauto. intros [tmp1 [A B]].
exploit H0; eauto. intros [tmp2 [Csyntax D]].
exists (tmp1 ++ tmp2); split.
econstructor; eauto with gensym.
diff --git a/common/AST.v b/common/AST.v
index 268e13d5..979db4b9 100644
--- a/common/AST.v
+++ b/common/AST.v
@@ -105,7 +105,7 @@ Lemma rettype_eq: forall (t1 t2: rettype), {t1=t2} + {t1<>t2}.
Proof. generalize typ_eq; decide equality. Defined.
Global Opaque rettype_eq.
-Fixpoint proj_rettype (r: rettype) : typ :=
+Definition proj_rettype (r: rettype) : typ :=
match r with
| Tret t => t
| Tint8signed | Tint8unsigned | Tint16signed | Tint16unsigned => Tint
diff --git a/common/Builtins0.v b/common/Builtins0.v
index 8da98314..d84c9112 100644
--- a/common/Builtins0.v
+++ b/common/Builtins0.v
@@ -332,6 +332,7 @@ End LOOKUP.
Inductive standard_builtin : Type :=
| BI_select (t: typ)
| BI_fabs
+ | BI_fabsf
| BI_fsqrt
| BI_negl
| BI_addl
@@ -364,7 +365,9 @@ Definition standard_builtin_table : list (string * standard_builtin) :=
:: ("__builtin_sel", BI_select Tfloat)
:: ("__builtin_sel", BI_select Tsingle)
:: ("__builtin_fabs", BI_fabs)
+ :: ("__builtin_fabsf", BI_fabsf)
:: ("__builtin_fsqrt", BI_fsqrt)
+ :: ("__builtin_sqrt", BI_fsqrt)
:: ("__builtin_negl", BI_negl)
:: ("__builtin_addl", BI_addl)
:: ("__builtin_subl", BI_subl)
@@ -396,6 +399,8 @@ Definition standard_builtin_sig (b: standard_builtin) : signature :=
mksignature (Tint :: t :: t :: nil) t cc_default
| BI_fabs | BI_fsqrt =>
mksignature (Tfloat :: nil) Tfloat cc_default
+ | BI_fabsf =>
+ mksignature (Tsingle :: nil) Tsingle cc_default
| BI_negl =>
mksignature (Tlong :: nil) Tlong cc_default
| BI_addl | BI_subl | BI_i64_umulh| BI_i64_smulh
@@ -428,6 +433,7 @@ Program Definition standard_builtin_sem (b: standard_builtin) : builtin_sem (sig
| _ => None
end) _ _
| BI_fabs => mkbuiltin_n1t Tfloat Tfloat Float.abs
+ | BI_fabsf => mkbuiltin_n1t Tsingle Tsingle Float32.abs
| BI_fsqrt => mkbuiltin_n1t Tfloat Tfloat Float.sqrt
| BI_negl => mkbuiltin_n1t Tlong Tlong Int64.neg
| BI_addl => mkbuiltin_v2t Tlong Val.addl _ _
diff --git a/configure b/configure
index 8ec92969..415dbb03 100755
--- a/configure
+++ b/configure
@@ -27,6 +27,8 @@ clightgen=false
install_coqdev=false
responsefile="gnu"
ignore_coq_version=false
+library_Flocq=local
+library_MenhirLib=local
usage='Usage: ./configure [options] target
For help on options and targets, do: ./configure -help
@@ -48,11 +50,11 @@ Supported targets:
armeb-hardfloat (ARM, EABI using hardware FP registers, big endian)
x86_32-linux (x86 32 bits, Linux)
x86_32-bsd (x86 32 bits, BSD)
- x86_32-macosx (x86 32 bits, MacOS X)
x86_32-cygwin (x86 32 bits, Cygwin environment under Windows)
x86_64-linux (x86 64 bits, Linux)
x86_64-bsd (x86 64 bits, BSD)
x86_64-macosx (x86 64 bits, MacOS X)
+ x86_64-cygwin (x86 64 bits, Cygwin environment under Windows)
rv32-linux (RISC-V 32 bits, Linux)
rv64-linux (RISC-V 64 bits, Linux)
kvx-mbr (Kalray KVX, bare runtime)
@@ -87,6 +89,8 @@ Options:
-libdir <dir> Install libraries in <dir>
-coqdevdir <dir> Install Coq development (.vo files) in <dir>
-toolprefix <pref> Prefix names of tools ("gcc", etc) with <pref>
+ -use-external-Flocq Use an already-installed Flocq library
+ -use-external-MenhirLib Use an already-installed MenhirLib library
-no-runtime-lib Do not compile nor install the runtime support library
-no-standard-headers Do not install nor use the standard .h headers
-clightgen Also compile and install the clightgen tool
@@ -127,6 +131,10 @@ while : ; do
ignore_coq_version=true;;
-install-coqdev|--install-coqdev|-install-coq-dev|--install-coq-dev)
install_coqdev=true;;
+ -use-external-Flocq|--use-external-Flocq)
+ library_Flocq=external;;
+ -use-external-MenhirLib|--use-external-MenhirLib)
+ library_MenhirLib=external;;
-help|--help)
echo "$help"; exit 0;;
-*)
@@ -332,29 +340,6 @@ if test "$arch" = "x86" -a "$bitsize" = "32"; then
libmath="-lm"
system="linux"
;;
- macosx)
- # kernel major versions count upwards from 4 for OSX 10.0 to 15 for OSX 10.11
- kernel_major=`uname -r | cut -d "." -f 1`
-
- abi="macosx"
- casm="${toolprefix}gcc"
- casm_options="-arch i386 -c"
- cc="${toolprefix}gcc -arch i386"
- clinker="${toolprefix}gcc"
- clinker_needs_no_pie=false
- cprepro="${toolprefix}gcc"
- cprepro_options="-std=c99 -arch i386 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' '-D_Nullable=' '-D_Nonnull=' -E"
- libmath=""
- system="macosx"
-
- if [[ $kernel_major -gt 11 ]]; then
- # OSX >= 10.8
- clinker_options="-arch i386 -Wl,-no_pie"
- else
- # OSX <= 10.7
- clinker_options="-arch i386"
- fi
- ;;
*)
echo "Error: invalid eabi/system '$target' for architecture IA32/X86_32." 1>&2
echo "$usage" 1>&2
@@ -407,6 +392,18 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
libmath=""
system="macosx"
;;
+ cygwin)
+ abi="standard"
+ casm="${toolprefix}gcc"
+ casm_options="-m64 -c"
+ cc="${toolprefix}gcc -m64"
+ clinker="${toolprefix}gcc"
+ clinker_options="-m64"
+ cprepro="${toolprefix}gcc"
+ cprepro_options="-std=c99 -m64 -U__GNUC__ '-D__attribute__(x)=' -E"
+ libmath="-lm"
+ system="cygwin"
+ ;;
*)
echo "Error: invalid eabi/system '$target' for architecture X86_64." 1>&2
echo "$usage" 1>&2
@@ -568,24 +565,24 @@ missingtools=false
echo "Testing Coq... " | tr -d '\n'
coq_ver=$(${COQBIN}coqc -v 2>/dev/null | sed -n -e 's/The Coq Proof Assistant, version \([^ ]*\).*$/\1/p')
case "$coq_ver" in
- 8.9.0|8.9.1|8.10.0|8.10.1|8.10.2|8.11.0|8.11.1|8.11.2)
+ 8.8.0|8.8.1|8.8.2|8.9.0|8.9.1|8.10.0|8.10.1|8.10.2|8.11.0|8.11.1|8.11.2|8.12.0|8.12.1)
echo "version $coq_ver -- good!";;
?*)
echo "version $coq_ver -- UNSUPPORTED"
if $ignore_coq_version; then
echo "Warning: this version of Coq is unsupported, proceed at your own risks."
else
- echo "Error: CompCert requires one of the following Coq versions: 8.11.1, 8.11.0, 8.10.2, 8.10.1, 8.10.0, 8.9.1, 8.9.0"
+ echo "Error: CompCert requires a version of Coq between 8.8.0 and 8.12.1"
missingtools=true
fi;;
"")
echo "NOT FOUND"
- echo "Error: make sure Coq version 8.9.1 is installed."
+ echo "Error: make sure Coq version 8.11.2 is installed."
missingtools=true;;
esac
echo "Testing OCaml... " | tr -d '\n'
-ocaml_ver=`ocamlopt -version 2>/dev/null`
+ocaml_ver=`ocamlc -version 2>/dev/null`
case "$ocaml_ver" in
4.00.*|4.01.*| 4.02.*|4.03.*|4.04.*)
echo "version $ocaml_ver -- UNSUPPORTED"
@@ -603,9 +600,19 @@ case "$ocaml_ver" in
missingtools=true;;
esac
+echo "Testing OCaml native-code compiler..." | tr -d '\n'
+ocamlopt_ver=`ocamlopt -version 2>/dev/null`
+if test "$ocamlopt_ver" = "$ocaml_ver"; then
+ echo "yes"
+ ocaml_native_comp=true
+else
+ echo "no, will build to bytecode only"
+ ocaml_native_comp=false
+fi
+
echo "Testing OCaml .opt compilers... " | tr -d '\n'
-ocaml_opt_ver=`ocamlopt.opt -version 2>/dev/null`
-if test "$ocaml_opt_ver" = "$ocaml_ver"; then
+ocamlopt_opt_ver=`ocamlopt.opt -version 2>/dev/null`
+if test "$ocamlopt_opt_ver" = "$ocaml_ver"; then
echo "yes"
ocaml_opt_comp=true
else
@@ -620,8 +627,11 @@ case "$menhir_ver" in
20[0-9][0-9][0-9][0-9][0-9][0-9])
if test "$menhir_ver" -ge $MENHIR_REQUIRED; then
echo "version $menhir_ver -- good!"
- menhir_dir=$(menhir --suggest-menhirLib | tr -d '\r' | tr '\\' '/')
- if test -z "$menhir_dir"; then
+ menhir_dir=$(ocamlfind query menhirLib 2>/dev/null) || \
+ menhir_dir=$(menhir --suggest-menhirLib) || \
+ menhir_dir=""
+ menhir_dir=$(echo "$menhir_dir" | tr -d '\r' | tr '\\' '/')
+ if test ! -d "$menhir_dir"; then
echo "Error: cannot determine the location of the Menhir API library."
echo "This can be due to an incorrect Menhir package."
echo "Consider using the OPAM package for Menhir."
@@ -660,49 +670,6 @@ if $missingtools; then
exit 2
fi
-cat > .merlin <<EOF
-S lib
-S common
-S $arch
-S backend
-S cfrontend
-S driver
-S debug
-S exportclight
-S cparser
-S extraction
-
-B lib
-B common
-B $arch
-B backend
-B cfrontend
-B driver
-B debug
-B exportclight
-B cparser
-B extraction
-
-EOF
-
-echo "-R lib compcert.lib \
--R common compcert.common \
--R ${arch} compcert.${arch} \
--R backend compcert.backend \
--R scheduling compcert.scheduling \
--R cfrontend compcert.cfrontend \
--R driver compcert.driver \
--R flocq compcert.flocq \
--R exportclight compcert.exportclight \
--R cparser compcert.cparser \
--R MenhirLib compcert.MenhirLib
--R Impure lib.Impure" > _CoqProject
-case $arch in
- x86)
- echo "-R x86_${bitsize} compcert.x86_${bitsize}" >> _CoqProject
- ;;
-esac
-
#
# Generate Makefile.config
#
@@ -716,6 +683,7 @@ LIBDIR=$libdir
MANDIR=$sharedir/man
SHAREDIR=$sharedir
COQDEVDIR=$coqdevdir
+OCAML_NATIVE_COMP=$ocaml_native_comp
OCAML_OPT_COMP=$ocaml_opt_comp
MENHIR_DIR=$menhir_dir
COMPFLAGS=-bin-annot
@@ -744,6 +712,8 @@ LIBMATH=$libmath
MODEL=$model
SYSTEM=$system
RESPONSEFILE=$responsefile
+LIBRARY_FLOCQ=$library_Flocq
+LIBRARY_MENHIRLIB=$library_MenhirLib
EOF
else
cat >> Makefile.config <<'EOF'
@@ -837,6 +807,9 @@ CLIGHTGEN=false
# Whether the other tools support responsefiles in gnu syntax
RESPONSEFILE="none"
+# Whether to use the local copies of Flocq and MenhirLib
+LIBRARY_FLOCQ=local # external
+LIBRARY_MENHIRLIB=local # external
EOF
fi
@@ -855,6 +828,35 @@ EOF
fi
#
+# Generate Merlin and CoqProject files to simplify development
+#
+cat > .merlin <<EOF
+S lib
+S common
+S $arch
+S backend
+S cfrontend
+S driver
+S debug
+S exportclight
+S cparser
+S extraction
+
+B lib
+B common
+B $arch
+B backend
+B cfrontend
+B driver
+B debug
+B exportclight
+B cparser
+B extraction
+EOF
+
+make CoqProject
+
+#
# Clean up target-dependent files to force their recompilation
#
rm -f .depend $arch/Archi.vo ${arch}_${bitsize}/Archi.vo runtime/*.o
@@ -891,6 +893,9 @@ CompCert configuration:
Linker needs '-no-pie'........ $clinker_needs_no_pie
Math library.................. $libmath
Build command to use.......... $make
+ Menhir API library............ $menhir_dir
+ The Flocq library............. $library_Flocq
+ The MenhirLib library......... $library_MenhirLib
Binaries installed in......... $bindirexp
Runtime library provided...... $has_runtime_lib
Library files installed in.... $libdirexp
diff --git a/coq b/coq
index fcf744fd..925bc4b9 100755
--- a/coq
+++ b/coq
@@ -1,10 +1,8 @@
#!/bin/sh
-# Start coqide with the right -I options
+# Start coqide with the right options
# Use the Makefile to rebuild dependencies if needed
# Recompile the modified file after coqide editing
-INCLUDES=`make print-includes`
-
make -q ${1}o || {
make -n ${1}o | grep -v "\\b${1}\\b" | \
(while read cmd; do
@@ -12,4 +10,4 @@ make -q ${1}o || {
done)
}
-"${COQBIN}coqide" -async-proofs off $INCLUDES $1 && make ${1}o
+"${COQBIN}coqide" -async-proofs off $1 && make ${1}o
diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml
index 696a9a8d..7a00f719 100644
--- a/cparser/Bitfields.ml
+++ b/cparser/Bitfields.ml
@@ -50,8 +50,7 @@ let bitfield_table =
(Hashtbl.create 57: (ident * string, bitfield_info) Hashtbl.t)
let is_bitfield structid fieldname =
- try Some (Hashtbl.find bitfield_table (structid, fieldname))
- with Not_found -> None
+ Hashtbl.find_opt bitfield_table (structid, fieldname)
(* Mapping struct/union identifier -> list of members after transformation,
including the carrier fields, but without the bit fields.
@@ -189,10 +188,12 @@ let rec transf_union_members env id count = function
{ fld_name = carrier; fld_typ = carrier_typ; fld_bitfield = None; fld_anonymous = false;}
:: transf_union_members env id (count + 1) ms)
-let transf_composite env su id attr ml =
+let transf_composite env loc su id attr ml =
if List.for_all (fun f -> f.fld_bitfield = None) ml then
(attr, ml)
else begin
+ if find_custom_attributes ["packed";"__packed__"] attr <> [] then
+ Diagnostics.error loc "bitfields in packed structs not allowed";
let ml' =
match su with
| Struct -> transf_struct_members env id 1 ml
@@ -550,7 +551,7 @@ and transf_init env i =
(* Declarations *)
-let transf_decl env (sto, id, ty, init_opt) =
+let transf_decl env loc (sto, id, ty, init_opt) =
(sto, id, ty,
match init_opt with None -> None | Some i -> Some(transf_init env i))
@@ -559,12 +560,12 @@ let transf_decl env (sto, id, ty, init_opt) =
let transf_stmt env s =
Transform.stmt
~expr:(fun loc env ctx e -> transf_exp env ctx e)
- ~decl:transf_decl
+ ~decl:(fun env (sto, id, ty, init_opt) -> transf_decl env s.sloc (sto, id, ty, init_opt))
env s
(* Functions *)
-let transf_fundef env f =
+let transf_fundef env loc f =
Transform.fundef transf_stmt env f
(* Programs *)
diff --git a/cparser/Cabs.v b/cparser/Cabs.v
index 2dae061a..174261ef 100644
--- a/cparser/Cabs.v
+++ b/cparser/Cabs.v
@@ -92,6 +92,7 @@ with parameter :=
(* The optional expression is the bitfield *)
with field_group :=
| Field_group : list spec_elem -> list (option name * option expression) -> loc -> field_group
+ | Field_group_static_assert : expression -> loc -> constant -> loc -> loc -> field_group
(* The decl_type is in the order in which they are printed. Only the name of
* the declared identifier is pulled out. *)
@@ -197,6 +198,7 @@ Inductive definition :=
| FUNDEF : list spec_elem -> name -> list definition -> statement -> loc -> definition
| DECDEF : init_name_group -> loc -> definition (* global variable(s), or function prototype *)
| PRAGMA : string -> loc -> definition
+ | STATIC_ASSERT : expression -> loc -> constant -> loc -> loc -> definition
(*
** statements
diff --git a/cparser/Cabshelper.ml b/cparser/Cabshelper.ml
index 22f3b3c7..7cffef08 100644
--- a/cparser/Cabshelper.ml
+++ b/cparser/Cabshelper.ml
@@ -44,6 +44,7 @@ let get_definitionloc (d : definition) : loc =
| FUNDEF(_, _, _, _, l) -> l
| DECDEF(_, l) -> l
| PRAGMA(_, l) -> l
+ | STATIC_ASSERT(_, _, _, _, l) -> l
let get_statementloc (s : statement) : loc =
begin
diff --git a/cparser/Diagnostics.ml b/cparser/Diagnostics.ml
index 7957375c..86a5e522 100644
--- a/cparser/Diagnostics.ml
+++ b/cparser/Diagnostics.ml
@@ -400,16 +400,16 @@ let raise_on_errors () =
raise Abort
let crash exn =
- if Version.buildnr <> "" && Version.tag <> "" then begin
+ if Version.buildnr <> "" && Version.tag <> "" && Version.branch <> "" then begin
let backtrace = Printexc.get_backtrace () in
- eprintf "%tThis is CompCert, Release %s, Build:%s, Tag:%s%t\n"
- bc Version.version Version.buildnr Version.tag rsc;
+ eprintf "%tThis is CompCert, Release %s, Build:%s, Tag:%s, Branch:%s%t\n"
+ bc Version.version Version.buildnr Version.tag Version.branch rsc;
eprintf "Backtrace (please include this in your support request):\n%s"
backtrace;
eprintf "%tUncaught exception: %s.\n\
\ Please report this problem to our support.\n\
-\ Error occurred in Build: %s, Tag: %s.\n%t"
- rc (Printexc.to_string exn) Version.buildnr Version.tag rsc;
+\ Error occurred in Build: %s, Tag: %s, Branch %s.\n%t"
+ rc (Printexc.to_string exn) Version.buildnr Version.tag Version.branch rsc;
exit 2
end else begin
let backtrace = Printexc.get_backtrace ()
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index 0504ad0b..e822dfcb 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -346,10 +346,7 @@ let integer_representable v ik =
v >= 0L && v < Int64.shift_left 1L (bitsize - 1)
let elab_int_constant loc s0 =
- let s = String.map (fun d -> match d with
- | '0'..'9' | 'A'..'F' | 'L' | 'U' | 'X' -> d
- | 'a'..'f' | 'l' | 'u' | 'x' -> Char.chr (Char.code d - 32)
- | _ -> error loc "bad digit '%c' in integer literal '%s'" d s0; d) s0 in
+ let s = String.uppercase_ascii s0 in
(* Determine possible types and chop type suffix *)
let (s, dec_kinds, hex_kinds) =
if has_suffix s "ULL" || has_suffix s "LLU" then
@@ -479,6 +476,23 @@ let elab_simple_string loc wide chars =
| CStr s -> s
| _ -> error loc "cannot use wide string literal in 'asm'"; ""
+(** Elaboration and checking of static assertions *)
+
+let elab_static_assert env exp loc_exp msg loc_msg loc =
+ let (exp, env) = !elab_expr_f loc_exp env exp in
+ match Ceval.integer_expr env exp with
+ | None ->
+ error loc_exp "expression in static assertion is not an integer constant"
+ | Some n ->
+ if n = 0L then begin
+ match elab_constant loc_msg msg with
+ | CStr s ->
+ error loc "static assertion failed: \"%s\"" s
+ | _ ->
+ (* This can happen with a wide string literal *)
+ error loc "static assertion failed (cannot display associated message)"
+ end
+
(** * Elaboration of type expressions, type specifiers, name declarations *)
@@ -987,7 +1001,9 @@ and elab_name_group loc env (spec, namelist) =
(* Elaboration of a field group *)
-and elab_field_group env (Field_group (spec, fieldlist, loc)) =
+and elab_field_group env = function
+
+| Field_group (spec, fieldlist, loc) ->
let fieldlist = List.map
(function (None, x) -> (Name ("", JUSTBASE, [], loc), x)
@@ -999,6 +1015,7 @@ and elab_field_group env (Field_group (spec, fieldlist, loc)) =
elab_name_group loc env (spec, List.map fst fieldlist) in
if sto <> Storage_default then
+ (* This should actually never be triggered, catched by pre-parser *)
error loc "non-default storage in struct or union";
if fieldlist = [] then
(* This should actually never be triggered, empty structs are captured earlier *)
@@ -1052,6 +1069,10 @@ and elab_field_group env (Field_group (spec, fieldlist, loc)) =
in
(mmap2 elab_bitfield env' fieldlist names)
+| Field_group_static_assert(exp, loc_exp, msg, loc_msg, loc) ->
+ elab_static_assert env exp loc_exp msg loc_msg loc;
+ ([], env)
+
(* Elaboration of a struct or union. C99 section 6.7.2.1 *)
and elab_struct_or_union_info kind loc env members attrs =
@@ -1719,11 +1740,12 @@ let elab_expr ctx loc env a =
let check_ptr_arith env ty s =
match unroll env ty with
| TVoid _ ->
- error "illegal arithmetic on a pointer to void in binary '%c'" s
+ error "illegal arithmetic on a pointer to void in %s" s
| TFun _ ->
- error "illegal arithmetic on a pointer to the function type %a in binary '%c'" (print_typ env) ty s
- | _ -> if incomplete_type env ty then
- error "arithmetic on a pointer to an incomplete type %a in binary '%c'" (print_typ env) ty s
+ error "illegal arithmetic on a pointer to the function type %a in %s" (print_typ env) ty s
+ | _ ->
+ if incomplete_type env ty then
+ error "arithmetic on a pointer to an incomplete type %a in %s" (print_typ env) ty s
in
let check_static_var env id sto ty =
@@ -1818,14 +1840,18 @@ let elab_expr ctx loc env a =
(preprocessing) --> __builtin_va_arg(ap, ty)
(elaboration) --> __builtin_va_arg(ap, sizeof(ty))
*)
- | CALL((VARIABLE "__builtin_va_start" as a1), [a2; a3]) ->
+ | CALL((VARIABLE "__builtin_va_start" as a1), args) ->
if not ctx.ctx_vararg then
error "'va_start' used in function with fixed args";
- let b1,env = elab env a1 in
- let b2,env = elab env a2 in
- let _b3,env = elab env a3 in
- { edesc = ECall(b1, [b2]);
- etyp = TVoid [] },env
+ let b1, env = elab env a1 in
+ begin match args with
+ | [a2; a3] ->
+ let b2,env = elab env a2 in
+ let _b3,env = elab env a3 in
+ { edesc = ECall(b1, [b2]);
+ etyp = TVoid [] },env
+ | _ -> fatal_error "'__builtin_va_start' expects 2 arguments"
+ end
| BUILTIN_VA_ARG (a2, a3) ->
let ident =
@@ -1842,6 +1868,16 @@ let elab_expr ctx loc env a =
(print_typ env) ty (print_typ env) ty' (print_typ env) ty' (print_typ env) ty;
{ edesc = ECall(ident, [b2; b3]); etyp = ty },env
+ | CALL(VARIABLE "__builtin_constant_p", al) ->
+ begin match al with
+ | [a1] ->
+ let b1,env = elab env a1 in
+ let v = if Ceval.is_constant_expr env b1 then 1L else 0L in
+ intconst v IInt, env
+ | _ ->
+ fatal_error "'__builtin_constant_p' expects one argument"
+ end
+
| CALL((VARIABLE "__builtin_sel" as a0), al) ->
begin match al with
| [a1; a2; a3] ->
@@ -2115,7 +2151,7 @@ let elab_expr ctx loc env a =
| _, _ -> fatal_error "invalid operands to binary '+' (%a and %a)"
(print_typ env) b1.etyp (print_typ env) b2.etyp
in
- check_ptr_arith env ty '+';
+ check_ptr_arith env ty "binary '+'";
TPtr(ty, [])
end in
{ edesc = EBinop(Oadd, b1, b2, tyres); etyp = tyres },env
@@ -2130,20 +2166,20 @@ let elab_expr ctx loc env a =
end else begin
match wrap unroll loc env b1.etyp, wrap unroll loc env b2.etyp with
| (TPtr(ty, a) | TArray(ty, _, a)), (TInt _ | TEnum _) ->
- if not (wrap pointer_arithmetic_ok loc env ty) then
- error "illegal pointer arithmetic in binary '-'";
+ check_ptr_arith env ty "binary '-'";
(TPtr(ty, []), TPtr(ty, []))
| (TPtr(ty1, a1) | TArray(ty1, _, a1)),
(TPtr(ty2, a2) | TArray(ty2, _, a2)) ->
if not (compatible_types AttrIgnoreAll env ty1 ty2) then
error "%a and %a are not pointers to compatible types"
(print_typ env) b1.etyp (print_typ env) b1.etyp;
- check_ptr_arith env ty1 '-';
- check_ptr_arith env ty2 '-';
+ check_ptr_arith env ty1 "binary '-'";
+ check_ptr_arith env ty2 "binary '-'";
if wrap sizeof loc env ty1 = Some 0 then
error "subtraction between two pointers to zero-sized objects";
(TPtr(ty1, []), TInt(ptrdiff_t_ikind(), []))
- | _, _ -> fatal_error "invalid operands to binary '-' (%a and %a)"
+ | _, _ ->
+ fatal_error "invalid operands to binary '-' (%a and %a)"
(print_typ env) b1.etyp (print_typ env) b2.etyp
end in
{ edesc = EBinop(Osub, b1, b2, tyop); etyp = tyres },env
@@ -2301,6 +2337,11 @@ let elab_expr ctx loc env a =
error "expression is not assignable";
if not (is_scalar_type env b1.etyp) then
error "cannot %s value of type %a" msg (print_typ env) b1.etyp;
+ begin match unroll env b1.etyp with
+ | TPtr (ty, _) | TArray (ty, _ , _) ->
+ check_ptr_arith env ty ("unary " ^ msg)
+ | _ -> ()
+ end;
{ edesc = EUnop(op, b1); etyp = b1.etyp },env
(* Elaboration of binary operators over integers *)
@@ -2657,6 +2698,8 @@ let elab_fundef genv spec name defs body loc =
and structs and unions defined in the parameter list. *)
let (fun_id, sto, inline, noret, ty, kr_params, genv, lenv) =
elab_fundef_name genv spec name in
+ if Env.is_builtin fun_id.C.name then
+ error loc "definition of builtin function '%s'" fun_id.C.name;
let s = fun_id.C.name in
if sto = Storage_auto || sto = Storage_register then
fatal_error loc "invalid storage class %s on function"
@@ -2847,6 +2890,7 @@ let elab_definition (for_loop: bool) (local: bool) (nonstatic_inline: bool)
(* "int f(int x) { ... }" *)
(* "int f(x, y) double y; { ... }" *)
| FUNDEF(spec, name, defs, body, loc) ->
+ (* This should actually never be triggered, catched by pre-parser *)
if local then error loc "function definition is not allowed here";
let env1 = elab_fundef env spec name defs body loc in
([], env1)
@@ -2860,6 +2904,11 @@ let elab_definition (for_loop: bool) (local: bool) (nonstatic_inline: bool)
emit_elab env loc (Gpragma s);
([], env)
+ (* static assertion *)
+ | STATIC_ASSERT(exp, loc_exp, msg, loc_msg, loc) ->
+ elab_static_assert env exp loc_exp msg loc_msg loc;
+ ([], env)
+
(* Extended asm *)
let elab_asm_operand ctx loc env (ASMOPERAND(label, wide, chars, e)) =
diff --git a/cparser/Env.ml b/cparser/Env.ml
index 4723a725..00806be1 100644
--- a/cparser/Env.ml
+++ b/cparser/Env.ml
@@ -316,6 +316,9 @@ let set_builtins blt =
List.iter Init.add_typedef blt.builtin_typedefs;
List.iter Init.add_function blt.builtin_functions
+let is_builtin name =
+ ident_is_bound !Init.env name
+
(* Error reporting *)
open Printf
diff --git a/cparser/Env.mli b/cparser/Env.mli
index 1baab68f..589a76c7 100644
--- a/cparser/Env.mli
+++ b/cparser/Env.mli
@@ -84,3 +84,4 @@ val initial: unit -> t
val initial_identifiers: unit -> C.ident list
val initial_declarations: unit -> C.globdecl list
val set_builtins: C.builtins -> unit
+val is_builtin : string -> bool
diff --git a/cparser/ExtendedAsm.ml b/cparser/ExtendedAsm.ml
index 257e9cf7..df2da2a2 100644
--- a/cparser/ExtendedAsm.ml
+++ b/cparser/ExtendedAsm.ml
@@ -156,7 +156,7 @@ let transf_outputs loc env = function
let check_clobbers loc clob =
List.iter
(fun c ->
- if Machregsaux.register_by_name c <> None
+ if Machregsnames.register_by_name c <> None
|| Machregsaux.is_scratch_register c
|| c = "memory" || c = "cc" (* GCC does not accept MEMORY or CC *)
then ()
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll
index b36b3e81..f5e8edb3 100644
--- a/cparser/Lexer.mll
+++ b/cparser/Lexer.mll
@@ -35,6 +35,7 @@ let () =
("_Bool", fun loc -> UNDERSCORE_BOOL loc);
("_Complex", fun loc -> reserved_keyword loc "_Complex");
("_Imaginary", fun loc -> reserved_keyword loc "_Imaginary");
+ ("_Static_assert", fun loc -> STATIC_ASSERT loc);
("__alignof", fun loc -> ALIGNOF loc);
("__alignof__", fun loc -> ALIGNOF loc);
("__asm", fun loc -> ASM loc);
@@ -579,6 +580,7 @@ and singleline_comment = parse
| Pre_parser.SLASH loc -> loop (Parser.SLASH loc)
| Pre_parser.STAR loc -> loop (Parser.STAR loc)
| Pre_parser.STATIC loc -> loop (Parser.STATIC loc)
+ | Pre_parser.STATIC_ASSERT loc -> loop (Parser.STATIC_ASSERT loc)
| Pre_parser.STRING_LITERAL (wide, str, loc) ->
(* Merge consecutive string literals *)
let rec doConcat wide str =
diff --git a/cparser/Parse.ml b/cparser/Parse.ml
index 29245083..d9f9aa1c 100644
--- a/cparser/Parse.ml
+++ b/cparser/Parse.ml
@@ -18,7 +18,14 @@
module CharSet = Set.Make(struct type t = char let compare = compare end)
let transform_program t p name =
- let run_pass pass flag p = if CharSet.mem flag t then pass p else p in
+ let run_pass pass flag p =
+ if CharSet.mem flag t then begin
+ let p = pass p in
+ Diagnostics.check_errors ();
+ p
+ end else
+ p
+ in
let p1 = (run_pass StructPassing.program 's'
(run_pass PackedStructs.program 'p'
(run_pass Unblock.program 'b'
diff --git a/cparser/Parser.vy b/cparser/Parser.vy
index 4f3b9789..ebed6e34 100644
--- a/cparser/Parser.vy
+++ b/cparser/Parser.vy
@@ -37,7 +37,7 @@ Require Cabs.
STRUCT UNION ENUM UNDERSCORE_BOOL PACKED ALIGNAS ATTRIBUTE ASM
%token<Cabs.loc> CASE DEFAULT IF_ ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK
- RETURN BUILTIN_VA_ARG BUILTIN_OFFSETOF
+ RETURN BUILTIN_VA_ARG BUILTIN_OFFSETOF STATIC_ASSERT
%token EOF
@@ -55,6 +55,8 @@ Require Cabs.
%type<list Cabs.spec_elem> declaration_specifiers_typespec_opt
%type<list Cabs.init_name (* Reverse order *)> init_declarator_list
%type<Cabs.init_name> init_declarator
+%type<(Cabs.expression * Cabs.loc) * (Cabs.constant * Cabs.loc) * Cabs.loc>
+ static_assert_declaration
%type<Cabs.storage * Cabs.loc> storage_class_specifier
%type<Cabs.typeSpecifier * Cabs.loc> type_specifier struct_or_union_specifier enum_specifier
%type<Cabs.structOrUnion * Cabs.loc> struct_or_union
@@ -343,6 +345,9 @@ declaration:
{ Cabs.DECDEF (fst decspec, rev' decls) (snd decspec) }
| decspec = declaration_specifiers SEMICOLON
{ Cabs.DECDEF (fst decspec, []) (snd decspec) }
+| asrt = static_assert_declaration
+ { let '((e, loc_e), (s, loc_s), loc) := asrt in
+ Cabs.STATIC_ASSERT e loc_e s loc_s loc }
declaration_specifiers_typespec_opt:
| storage = storage_class_specifier rest = declaration_specifiers_typespec_opt
@@ -461,6 +466,10 @@ struct_declaration:
(* Extension to C99 grammar needed to parse some GNU header files. *)
| decspec = specifier_qualifier_list SEMICOLON
{ Cabs.Field_group (fst decspec) [(None,None)] (snd decspec) }
+(* C11 static assertions *)
+| asrt = static_assert_declaration
+ { let '((e, loc_e), (s, loc_s), loc) := asrt in
+ Cabs.Field_group_static_assert e loc_e s loc_s loc }
specifier_qualifier_list:
| typ = type_specifier rest = specifier_qualifier_list
@@ -751,6 +760,14 @@ designator:
| DOT id = OTHER_NAME
{ Cabs.INFIELD_INIT (fst id) }
+(* C11 6.7.10 *)
+
+static_assert_declaration:
+| loc = STATIC_ASSERT LPAREN expr = constant_expression
+ COMMA str = STRING_LITERAL RPAREN SEMICOLON
+ { let '((wide, chars), locs) := str in
+ (expr, (Cabs.CONST_STRING wide chars, locs), loc) }
+
(* 6.8 *)
statement_dangerous:
| stmt = labeled_statement(statement_dangerous)
diff --git a/cparser/StructPassing.ml b/cparser/StructPassing.ml
index 3aff090e..6d63b8f9 100644
--- a/cparser/StructPassing.ml
+++ b/cparser/StructPassing.ml
@@ -433,7 +433,7 @@ and transf_init env = function
(* Declarations *)
-let transf_decl env (sto, id, ty, init) =
+let transf_decl env loc (sto, id, ty, init) =
(sto, id, transf_type env ty,
match init with None -> None | Some i -> Some (transf_init env i))
@@ -503,7 +503,7 @@ let rec transf_stmt s =
| Sblock sl ->
{s with sdesc = Sblock(List.map transf_stmt sl)}
| Sdecl d ->
- {s with sdesc = Sdecl(transf_decl env d)}
+ {s with sdesc = Sdecl(transf_decl env s.sloc d)}
| Sasm(attr, template, outputs, inputs, clob) ->
{s with sdesc = Sasm(attr, template,
List.map transf_asm_operand outputs,
@@ -549,13 +549,13 @@ let rec transf_funparams loc env params =
actions,
IdentMap.add x (ereinterpret tx' y) subst)
-let transf_fundef env f =
+let transf_fundef env loc f =
reset_temps();
let ret = transf_type env f.fd_ret in
let (params, actions, subst) =
transf_funparams f.fd_body.sloc env f.fd_params in
let locals =
- List.map (fun d -> transf_decl env (subst_decl subst d)) f.fd_locals in
+ List.map (fun d -> transf_decl env loc (subst_decl subst d)) f.fd_locals in
let (attr1, ret1, params1, body1) =
match classify_return env f.fd_ret with
| Ret_scalar ->
@@ -586,7 +586,7 @@ let transf_fundef env f =
(* Composites *)
-let transf_composite env su id attr fl =
+let transf_composite env loc su id attr fl =
(attr, List.map (fun f -> {f with fld_typ = transf_type env f.fld_typ}) fl)
(* Entry point *)
@@ -604,5 +604,5 @@ let program p =
~decl:transf_decl
~fundef:transf_fundef
~composite:transf_composite
- ~typedef:(fun env id ty -> transf_type env ty)
+ ~typedef:(fun env loc id ty -> transf_type env ty)
p
diff --git a/cparser/Transform.ml b/cparser/Transform.ml
index 349a3155..a57d94c4 100644
--- a/cparser/Transform.ml
+++ b/cparser/Transform.ml
@@ -161,8 +161,8 @@ let stmt ~expr ?(decl = fun env decl -> assert false) env s =
| Scontinue -> s
| Sswitch(e, s1) ->
{s with sdesc = Sswitch(expr s.sloc env Val e, stm s1)}
- | Slabeled(lbl, s) ->
- {s with sdesc = Slabeled(lbl, stm s)}
+ | Slabeled(lbl, s1) ->
+ {s with sdesc = Slabeled(lbl, stm s1)}
| Sgoto lbl -> s
| Sreturn None -> s
| Sreturn (Some e) ->
@@ -191,12 +191,12 @@ let fundef trstmt env f =
(* Generic transformation of a program *)
let program
- ?(decl = fun env d -> d)
- ?(fundef = fun env fd -> fd)
- ?(composite = fun env su id attr fl -> (attr, fl))
- ?(typedef = fun env id ty -> ty)
- ?(enum = fun env id attr members -> (attr, members))
- ?(pragma = fun env s -> s)
+ ?(decl = fun env loc d -> d)
+ ?(fundef = fun env loc fd -> fd)
+ ?(composite = fun env loc su id attr fl -> (attr, fl))
+ ?(typedef = fun env loc id ty -> ty)
+ ?(enum = fun env loc id attr members -> (attr, members))
+ ?(pragma = fun env loc s -> s)
p =
let rec transf_globdecls env accu = function
@@ -205,25 +205,25 @@ let program
let (desc', env') =
match g.gdesc with
| Gdecl((sto, id, ty, init) as d) ->
- (Gdecl(decl env d), Env.add_ident env id sto ty)
+ (Gdecl(decl env g.gloc d), Env.add_ident env id sto ty)
| Gfundef f ->
- (Gfundef(fundef env f),
+ (Gfundef(fundef env g.gloc f),
Env.add_ident env f.fd_name f.fd_storage (fundef_typ f))
| Gcompositedecl(su, id, attr) ->
(Gcompositedecl(su, id, attr),
Env.add_composite env id (composite_info_decl su attr))
| Gcompositedef(su, id, attr, fl) ->
- let (attr', fl') = composite env su id attr fl in
+ let (attr', fl') = composite env g.gloc su id attr fl in
(Gcompositedef(su, id, attr', fl'),
Env.add_composite env id (composite_info_def env su attr fl))
| Gtypedef(id, ty) ->
- (Gtypedef(id, typedef env id ty), Env.add_typedef env id ty)
+ (Gtypedef(id, typedef env g.gloc id ty), Env.add_typedef env id ty)
| Genumdef(id, attr, members) ->
- let (attr', members') = enum env id attr members in
+ let (attr', members') = enum env g.gloc id attr members in
(Genumdef(id, attr', members'),
Env.add_enum env id {ei_members = members; ei_attr = attr})
| Gpragma s ->
- (Gpragma(pragma env s), env)
+ (Gpragma(pragma env g.gloc s), env)
in
transf_globdecls env' ({g with gdesc = desc'} :: accu) gl
diff --git a/cparser/Transform.mli b/cparser/Transform.mli
index dbd8e575..220b7944 100644
--- a/cparser/Transform.mli
+++ b/cparser/Transform.mli
@@ -62,14 +62,14 @@ val fundef : (Env.t -> C.stmt -> C.stmt) -> Env.t -> C.fundef -> C.fundef
(** Generic transformation of a program *)
val program :
- ?decl:(Env.t -> C.decl -> C.decl) ->
- ?fundef:(Env.t -> C.fundef -> C.fundef) ->
- ?composite:(Env.t -> C.struct_or_union ->
+ ?decl:(Env.t -> C.location -> C.decl -> C.decl) ->
+ ?fundef:(Env.t -> C.location -> C.fundef -> C.fundef) ->
+ ?composite:(Env.t -> C.location -> C.struct_or_union ->
C.ident -> C.attributes -> C.field list ->
C.attributes * C.field list) ->
- ?typedef:(Env.t -> C.ident -> C.typ -> C.typ) ->
- ?enum:(Env.t -> C.ident -> C.attributes -> C.enumerator list ->
+ ?typedef:(Env.t -> C.location -> C.ident -> C.typ -> C.typ) ->
+ ?enum:(Env.t -> C.location -> C.ident -> C.attributes -> C.enumerator list ->
C.attributes * C.enumerator list) ->
- ?pragma:(Env.t -> string -> string) ->
+ ?pragma:(Env.t -> C.location -> string -> string) ->
C.program ->
C.program
diff --git a/cparser/deLexer.ml b/cparser/deLexer.ml
index 43c1a679..e2f4f77f 100644
--- a/cparser/deLexer.ml
+++ b/cparser/deLexer.ml
@@ -117,6 +117,7 @@ let delex (symbol : string) : string =
| "DOT" -> "."
| "PRAGMA" -> "#pragma \n"
| "BUILTIN_OFFSETOF" -> "__builtin_offsetof"
+ | "STATIC_ASSERT" -> "_Static_assert"
| "EOF" -> "" (* this should be ok *)
| _ -> raise Not_found (* this should not happen *)
diff --git a/cparser/handcrafted.messages b/cparser/handcrafted.messages
index 6d972439..23e90b3e 100644
--- a/cparser/handcrafted.messages
+++ b/cparser/handcrafted.messages
@@ -179,22 +179,22 @@
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN INT XOR_ASSIGN
+translation_unit_file: ALIGNAS LPAREN INT XOR_ASSIGN
##
-## Ends in an error in state: 314.
+## Ends in an error in state: 322.
##
## attribute_specifier -> ALIGNAS LPAREN type_name . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ALIGNAS LPAREN type_name
+## ALIGNAS LPAREN type_name
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 314, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
# Maybe the type name was not complete, but we have reduced anyway
@@ -212,40 +212,40 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN VOID XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 304.
+## Ends in an error in state: 312.
##
## unary_expression -> ALIGNOF LPAREN type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## ALIGNOF LPAREN type_name
+## ALIGNOF LPAREN type_name
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 314, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN VOID XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 388.
+## Ends in an error in state: 396.
##
## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## unary_expression -> SIZEOF LPAREN type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## SIZEOF LPAREN type_name
+## SIZEOF LPAREN type_name
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 314, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
Ill-formed use of $2.
@@ -256,22 +256,22 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA VOID XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA VOID XOR_ASSIGN
##
-## Ends in an error in state: 333.
+## Ends in an error in state: 341.
##
## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name
+## BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 314, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
Ill-formed use of __builtin_va_arg.
@@ -282,22 +282,22 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN VOID XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 363.
+## Ends in an error in state: 371.
##
## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN type_name
+## LPAREN type_name
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 314, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
# gcc simply says it expects a closing parenthesis,
@@ -311,23 +311,23 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN VOID XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 385.
+## Ends in an error in state: 393.
##
## cast_expression -> LPAREN type_name . RPAREN cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN type_name
+## LPAREN type_name
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 314, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
# gcc and clang say they expect a closing parenthesis.
@@ -339,35 +339,35 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: ALIGNAS LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 316.
+## Ends in an error in state: 324.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## attribute_specifier -> ALIGNAS LPAREN argument_expression_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ALIGNAS LPAREN argument_expression_list
+## ALIGNAS LPAREN argument_expression_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 155, spurious reduction of production argument_expression_list -> assignment_expression
##
# We are trying to recognize an alignas specifier.
@@ -389,27 +389,27 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN INT LBRACK RPAREN
+translation_unit_file: ALIGNAS LPAREN INT LBRACK RPAREN
##
-## Ends in an error in state: 151.
+## Ends in an error in state: 248.
##
## direct_abstract_declarator -> option(direct_abstract_declarator) LBRACK option(type_qualifier_list) . optional(assignment_expression,RBRACK) [ RPAREN LPAREN LBRACK COMMA ]
## type_qualifier_list -> option(type_qualifier_list) . type_qualifier_noattr [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ]
## type_qualifier_list -> option(type_qualifier_list) . attribute_specifier [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## option(direct_abstract_declarator) LBRACK option(type_qualifier_list)
+## option(direct_abstract_declarator) LBRACK option(type_qualifier_list)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LBRACK RPAREN
+translation_unit_file: INT PRE_NAME VAR_NAME LBRACK RPAREN
##
-## Ends in an error in state: 257.
+## Ends in an error in state: 265.
##
## direct_declarator -> direct_declarator LBRACK option(type_qualifier_list) . optional(assignment_expression,RBRACK) [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## type_qualifier_list -> option(type_qualifier_list) . type_qualifier_noattr [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ]
## type_qualifier_list -> option(type_qualifier_list) . attribute_specifier [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## direct_declarator LBRACK option(type_qualifier_list)
+## direct_declarator LBRACK option(type_qualifier_list)
##
# We are trying to recognize an array declarator.
@@ -434,32 +434,32 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN INT LPAREN INT COMMA ELLIPSIS XOR_ASSIGN
+translation_unit_file: ALIGNAS LPAREN INT LPAREN INT COMMA ELLIPSIS XOR_ASSIGN
##
-## Ends in an error in state: 268.
+## Ends in an error in state: 276.
##
## direct_abstract_declarator -> LPAREN option(context_parameter_type_list) . RPAREN [ RPAREN LPAREN LBRACK COMMA ]
##
## The known suffix of the stack is as follows:
-## LPAREN option(context_parameter_type_list)
+## LPAREN option(context_parameter_type_list)
##
-translation_unit_file: ALIGNAS LPAREN INT LBRACK RBRACK LPAREN INT COMMA ELLIPSIS XOR_ASSIGN
+translation_unit_file: ALIGNAS LPAREN INT LBRACK RBRACK LPAREN INT COMMA ELLIPSIS XOR_ASSIGN
##
-## Ends in an error in state: 251.
+## Ends in an error in state: 259.
##
## direct_abstract_declarator -> direct_abstract_declarator LPAREN option(context_parameter_type_list) . RPAREN [ RPAREN LPAREN LBRACK COMMA ]
##
## The known suffix of the stack is as follows:
-## direct_abstract_declarator LPAREN option(context_parameter_type_list)
+## direct_abstract_declarator LPAREN option(context_parameter_type_list)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA ELLIPSIS XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA ELLIPSIS XOR_ASSIGN
##
-## Ends in an error in state: 285.
+## Ends in an error in state: 293.
##
## direct_declarator -> direct_declarator LPAREN context_parameter_type_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## direct_declarator LPAREN context_parameter_type_list
+## direct_declarator LPAREN context_parameter_type_list
##
# Unlikely error, since only the ELLIPSIS allows us to tell that
@@ -469,20 +469,20 @@ At this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN INT LPAREN LPAREN RPAREN COMMA
+translation_unit_file: ALIGNAS LPAREN INT LPAREN LPAREN RPAREN COMMA
##
-## Ends in an error in state: 266.
+## Ends in an error in state: 274.
##
## direct_abstract_declarator -> LPAREN save_context abstract_declarator(type_name) . RPAREN [ RPAREN LPAREN LBRACK COMMA ]
##
## The known suffix of the stack is as follows:
-## LPAREN save_context abstract_declarator(type_name)
+## LPAREN save_context abstract_declarator(type_name)
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 259, spurious reduction of production abstract_declarator(type_name) -> direct_abstract_declarator
+## In state 267, spurious reduction of production abstract_declarator(type_name) -> direct_abstract_declarator
##
#
# The first LPAREN in this example must be the beginning of an abstract_declarator.
@@ -511,15 +511,15 @@ At this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN INT LPAREN XOR_ASSIGN
+translation_unit_file: ALIGNAS LPAREN INT LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 307.
+## Ends in an error in state: 315.
##
## direct_abstract_declarator -> LPAREN . save_context abstract_declarator(type_name) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
## direct_abstract_declarator -> LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
##
## The known suffix of the stack is as follows:
-## LPAREN
+## LPAREN
##
# gcc and clang both say they want a closing parenthesis.
@@ -534,16 +534,16 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 145.
+## Ends in an error in state: 242.
##
## direct_abstract_declarator -> LPAREN . save_context abstract_declarator(type_name) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
## direct_abstract_declarator -> LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
## direct_declarator -> LPAREN . save_context declarator RPAREN [ RPAREN PACKED LPAREN LBRACK COMMA ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## LPAREN
+## LPAREN
##
# Analogous to the above, but has a third item.
@@ -557,16 +557,16 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN VOLATILE ADD_ASSIGN
+translation_unit_file: ALIGNAS LPAREN VOLATILE ADD_ASSIGN
##
-## Ends in an error in state: 299.
+## Ends in an error in state: 307.
##
## option(type_qualifier_list) -> type_qualifier_list . [ VOLATILE RESTRICT PACKED CONST ATTRIBUTE ALIGNAS ]
## specifier_qualifier_list(type_name) -> type_qualifier_list . typedef_name option(type_qualifier_list) [ STAR RPAREN LPAREN LBRACK COMMA ]
## specifier_qualifier_list(type_name) -> type_qualifier_list . type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) [ STAR RPAREN LPAREN LBRACK COMMA ]
##
## The known suffix of the stack is as follows:
-## type_qualifier_list
+## type_qualifier_list
##
# We are trying to recognize a specifier-qualifier-list, and have not yet seen
@@ -582,7 +582,7 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN XOR_ASSIGN
+translation_unit_file: ALIGNAS LPAREN XOR_ASSIGN
##
## Ends in an error in state: 61.
##
@@ -590,7 +590,7 @@ translation_unit_file: ALIGNAS LPAREN XOR_ASSIGN
## attribute_specifier -> ALIGNAS LPAREN . type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ALIGNAS LPAREN
+## ALIGNAS LPAREN
##
# This one seems easy. We have recognized ALIGNAS LPAREN, and nothing that makes sense beyond that.
@@ -604,7 +604,7 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS XOR_ASSIGN
+translation_unit_file: ALIGNAS XOR_ASSIGN
##
## Ends in an error in state: 60.
##
@@ -612,7 +612,7 @@ translation_unit_file: ALIGNAS XOR_ASSIGN
## attribute_specifier -> ALIGNAS . LPAREN type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ALIGNAS
+## ALIGNAS
##
# Fingers in the nose.
@@ -622,14 +622,14 @@ At this point, an opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN COMMA XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN COMMA XOR_ASSIGN
##
-## Ends in an error in state: 345.
+## Ends in an error in state: 353.
##
## gcc_attribute_list -> gcc_attribute_list COMMA . gcc_attribute [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## gcc_attribute_list COMMA
+## gcc_attribute_list COMMA
##
# We are expecting a gcc_attribute. This symbol is nullable, so
@@ -644,14 +644,14 @@ At this point, a gcc attribute is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN RPAREN XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 343.
+## Ends in an error in state: 351.
##
## attribute_specifier -> ATTRIBUTE LPAREN LPAREN gcc_attribute_list RPAREN . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ATTRIBUTE LPAREN LPAREN gcc_attribute_list RPAREN
+## ATTRIBUTE LPAREN LPAREN gcc_attribute_list RPAREN
##
Ill-formed attribute specifier.
@@ -659,15 +659,15 @@ At this point, a second closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN RPAREN XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 342.
+## Ends in an error in state: 350.
##
## attribute_specifier -> ATTRIBUTE LPAREN LPAREN gcc_attribute_list . RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
## gcc_attribute_list -> gcc_attribute_list . COMMA gcc_attribute [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## ATTRIBUTE LPAREN LPAREN gcc_attribute_list
+## ATTRIBUTE LPAREN LPAREN gcc_attribute_list
##
# We have a seen a (non-empty) attribute list, so we expect either
@@ -682,35 +682,35 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 338.
+## Ends in an error in state: 346.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## gcc_attribute -> gcc_attribute_word LPAREN typedef_name COMMA argument_expression_list . RPAREN [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## gcc_attribute_word LPAREN typedef_name COMMA argument_expression_list
+## gcc_attribute_word LPAREN typedef_name COMMA argument_expression_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 155, spurious reduction of production argument_expression_list -> assignment_expression
##
# We know for sure that we are parsing a gcc attribute.
@@ -726,14 +726,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 337.
+## Ends in an error in state: 345.
##
## gcc_attribute -> gcc_attribute_word LPAREN typedef_name COMMA . argument_expression_list RPAREN [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## gcc_attribute_word LPAREN typedef_name COMMA
+## gcc_attribute_word LPAREN typedef_name COMMA
##
# gcc/clang agree.
@@ -743,14 +743,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 336.
+## Ends in an error in state: 344.
##
## gcc_attribute -> gcc_attribute_word LPAREN typedef_name . COMMA argument_expression_list RPAREN [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## gcc_attribute_word LPAREN typedef_name
+## gcc_attribute_word LPAREN typedef_name
##
# gcc and clang complain about the TYPEDEF_NAME, not sure why.
@@ -760,7 +760,7 @@ At this point, a comma ',' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
##
## Ends in an error in state: 47.
##
@@ -768,7 +768,7 @@ translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN XOR_ASSI
## gcc_attribute -> gcc_attribute_word LPAREN . typedef_name COMMA argument_expression_list RPAREN [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## gcc_attribute_word LPAREN
+## gcc_attribute_word LPAREN
##
# gcc and clang just say they expect an expression.
@@ -780,7 +780,7 @@ At this point, a list of expressions is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME XOR_ASSIGN
##
## Ends in an error in state: 46.
##
@@ -789,7 +789,7 @@ translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME XOR_ASSIGN
## gcc_attribute -> gcc_attribute_word . LPAREN typedef_name COMMA argument_expression_list RPAREN [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## gcc_attribute_word
+## gcc_attribute_word
##
# gcc and clang say they expect a closing parenthesis (as usual).
@@ -806,14 +806,14 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN LPAREN XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN LPAREN XOR_ASSIGN
##
## Ends in an error in state: 39.
##
## attribute_specifier -> ATTRIBUTE LPAREN LPAREN . gcc_attribute_list RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ATTRIBUTE LPAREN LPAREN
+## ATTRIBUTE LPAREN LPAREN
##
# A non-empty attribute list is expected.
@@ -828,14 +828,14 @@ At this point, a gcc attribute is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE LPAREN XOR_ASSIGN
+translation_unit_file: ATTRIBUTE LPAREN XOR_ASSIGN
##
## Ends in an error in state: 38.
##
## attribute_specifier -> ATTRIBUTE LPAREN . LPAREN gcc_attribute_list RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ATTRIBUTE LPAREN
+## ATTRIBUTE LPAREN
##
Ill-formed gcc attribute specifier.
@@ -843,14 +843,14 @@ At this point, a second opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ATTRIBUTE XOR_ASSIGN
+translation_unit_file: ATTRIBUTE XOR_ASSIGN
##
## Ends in an error in state: 37.
##
## attribute_specifier -> ATTRIBUTE . LPAREN LPAREN gcc_attribute_list RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ATTRIBUTE
+## ATTRIBUTE
##
Ill-formed gcc attribute specifier.
@@ -858,15 +858,15 @@ At this point, two opening parentheses '((' are expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 353.
+## Ends in an error in state: 361.
##
## enumerator_list -> enumerator_list COMMA . declare_varname(enumerator) [ RBRACE COMMA ]
## option(COMMA) -> COMMA . [ RBRACE ]
##
## The known suffix of the stack is as follows:
-## enumerator_list COMMA
+## enumerator_list COMMA
##
# We omit the possibility of a closing brace.
@@ -879,36 +879,36 @@ At this point, an enumerator is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ CONSTANT SEMICOLON
+translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ CONSTANT SEMICOLON
##
-## Ends in an error in state: 352.
+## Ends in an error in state: 360.
##
## enum_specifier -> ENUM attribute_specifier_list option(other_identifier) LBRACE enumerator_list . option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## enumerator_list -> enumerator_list . COMMA declare_varname(enumerator) [ RBRACE COMMA ]
##
## The known suffix of the stack is as follows:
-## ENUM attribute_specifier_list option(other_identifier) LBRACE enumerator_list
+## ENUM attribute_specifier_list option(other_identifier) LBRACE enumerator_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 154, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 357, spurious reduction of production enumerator -> enumeration_constant EQ conditional_expression
-## In state 354, spurious reduction of production declare_varname(enumerator) -> enumerator
-## In state 361, spurious reduction of production enumerator_list -> declare_varname(enumerator)
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 79, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 365, spurious reduction of production enumerator -> enumeration_constant EQ conditional_expression
+## In state 362, spurious reduction of production declare_varname(enumerator) -> enumerator
+## In state 369, spurious reduction of production enumerator_list -> declare_varname(enumerator)
##
#
# At first sight, it seems that the last enumerator that we have recognized
@@ -937,14 +937,14 @@ then at this point, a closing brace '}' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ XOR_ASSIGN
+translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ XOR_ASSIGN
##
-## Ends in an error in state: 356.
+## Ends in an error in state: 364.
##
## enumerator -> enumeration_constant EQ . conditional_expression [ RBRACE COMMA ]
##
## The known suffix of the stack is as follows:
-## enumeration_constant EQ
+## enumeration_constant EQ
##
Ill-formed enumeration specifier.
@@ -952,15 +952,15 @@ At this point, a constant expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME XOR_ASSIGN
+translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 355.
+## Ends in an error in state: 363.
##
## enumerator -> enumeration_constant . [ RBRACE COMMA ]
## enumerator -> enumeration_constant . EQ conditional_expression [ RBRACE COMMA ]
##
## The known suffix of the stack is as follows:
-## enumeration_constant
+## enumeration_constant
##
# Here, both clang and gcc give an incomplete diagnostic message.
@@ -973,14 +973,14 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: ENUM LBRACE XOR_ASSIGN
+translation_unit_file: ENUM LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 350.
+## Ends in an error in state: 358.
##
## enum_specifier -> ENUM attribute_specifier_list option(other_identifier) LBRACE . enumerator_list option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ENUM attribute_specifier_list option(other_identifier) LBRACE
+## ENUM attribute_specifier_list option(other_identifier) LBRACE
##
# gcc says it expects an identifier.
@@ -991,15 +991,15 @@ At this point, an enumerator is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ENUM XOR_ASSIGN
+translation_unit_file: ENUM XOR_ASSIGN
##
-## Ends in an error in state: 348.
+## Ends in an error in state: 356.
##
## enum_specifier -> ENUM attribute_specifier_list . option(other_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## enum_specifier -> ENUM attribute_specifier_list . general_identifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ENUM attribute_specifier_list
+## ENUM attribute_specifier_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
@@ -1018,16 +1018,16 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN XOR_ASSIGN
##
## Ends in an error in state: 65.
##
## unary_expression -> ALIGNOF LPAREN . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## ALIGNOF LPAREN
+## ALIGNOF LPAREN
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN XOR_ASSIGN
##
## Ends in an error in state: 28.
##
@@ -1036,7 +1036,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN XOR_ASSIGN
## unary_expression -> SIZEOF LPAREN . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## SIZEOF LPAREN
+## SIZEOF LPAREN
##
# Tricky because we could be looking at the beginning of a compound
@@ -1051,14 +1051,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF XOR_ASSIGN
##
## Ends in an error in state: 64.
##
## unary_expression -> ALIGNOF . LPAREN type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## ALIGNOF
+## ALIGNOF
##
Ill-formed use of $0.
@@ -1067,7 +1067,7 @@ followed with a type name.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN
##
## Ends in an error in state: 23.
##
@@ -1075,7 +1075,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN
## unary_expression -> SIZEOF . LPAREN type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## SIZEOF
+## SIZEOF
##
# Let's not reveal that sizeof can be used without parentheses.
@@ -1089,33 +1089,33 @@ followed with an expression or a type name.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 331.
+## Ends in an error in state: 339.
##
## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression . COMMA type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_VA_ARG LPAREN assignment_expression
+## BUILTIN_VA_ARG LPAREN assignment_expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
##
Ill-formed use of $2.
@@ -1126,14 +1126,14 @@ then at this point, a comma ',' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 332.
+## Ends in an error in state: 340.
##
## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression COMMA . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_VA_ARG LPAREN assignment_expression COMMA
+## BUILTIN_VA_ARG LPAREN assignment_expression COMMA
##
Ill-formed use of $3.
@@ -1141,14 +1141,14 @@ At this point, a type name is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN XOR_ASSIGN
##
## Ends in an error in state: 51.
##
## postfix_expression -> BUILTIN_VA_ARG LPAREN . assignment_expression COMMA type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_VA_ARG LPAREN
+## BUILTIN_VA_ARG LPAREN
##
Ill-formed use of $1.
@@ -1156,14 +1156,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG XOR_ASSIGN
##
## Ends in an error in state: 50.
##
## postfix_expression -> BUILTIN_VA_ARG . LPAREN assignment_expression COMMA type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_VA_ARG
+## BUILTIN_VA_ARG
##
Ill-formed use of $0.
@@ -1171,23 +1171,23 @@ At this point, an opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ DEC XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ DEC XOR_ASSIGN
##
## Ends in an error in state: 48.
##
## unary_expression -> DEC . unary_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## DEC
+## DEC
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ INC XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ INC XOR_ASSIGN
##
## Ends in an error in state: 33.
##
## unary_expression -> INC . unary_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## INC
+## INC
##
Ill-formed expression.
@@ -1195,14 +1195,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN INT RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN INT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 364.
+## Ends in an error in state: 372.
##
## postfix_expression -> LPAREN type_name RPAREN . LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN type_name RPAREN
+## LPAREN type_name RPAREN
##
# Here, we seem to be certain that this must be the beginning of a
@@ -1226,7 +1226,7 @@ If this is intended to be the beginning of a cast expression,
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN XOR_ASSIGN
##
## Ends in an error in state: 34.
##
@@ -1234,7 +1234,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN XOR_ASSIGN
## primary_expression -> LPAREN . expression RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN
+## LPAREN
##
# gcc and clang expect an expression.
@@ -1247,35 +1247,35 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 382.
+## Ends in an error in state: 390.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## primary_expression -> LPAREN expression . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN expression
+## LPAREN expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
# Since we are saying "if this expression is complete",
@@ -1291,36 +1291,36 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 379.
+## Ends in an error in state: 387.
##
## initializer_list -> initializer_list . COMMA option(designation) c_initializer [ RBRACE COMMA ]
## postfix_expression -> LPAREN type_name RPAREN LBRACE initializer_list . option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN type_name RPAREN LBRACE initializer_list
+## LPAREN type_name RPAREN LBRACE initializer_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 372, spurious reduction of production c_initializer -> assignment_expression
-## In state 378, spurious reduction of production initializer_list -> option(designation) c_initializer
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 380, spurious reduction of production c_initializer -> assignment_expression
+## In state 386, spurious reduction of production initializer_list -> option(designation) c_initializer
##
# Let's ignore the fact that a comma can precede a closing brace.
@@ -1333,14 +1333,14 @@ then at this point, a closing brace '}' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 365.
+## Ends in an error in state: 373.
##
## postfix_expression -> LPAREN type_name RPAREN LBRACE . initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN type_name RPAREN LBRACE
+## LPAREN type_name RPAREN LBRACE
##
# gcc and clang say an expression is expected, which is incomplete.
@@ -1350,15 +1350,15 @@ At this point, an initializer is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 386.
+## Ends in an error in state: 394.
##
## cast_expression -> LPAREN type_name RPAREN . cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> LPAREN type_name RPAREN . LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN type_name RPAREN
+## LPAREN type_name RPAREN
##
# clang and gcc expect an expression.
@@ -1372,7 +1372,7 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN XOR_ASSIGN
##
## Ends in an error in state: 30.
##
@@ -1381,7 +1381,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN XOR_ASSIGN
## primary_expression -> LPAREN . expression RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## LPAREN
+## LPAREN
##
# clang and gcc expect an expression.
@@ -1394,14 +1394,14 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ TILDE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ TILDE XOR_ASSIGN
##
-## Ends in an error in state: 153.
+## Ends in an error in state: 78.
##
## unary_expression -> unary_operator . cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## unary_operator
+## unary_operator
##
# clang and gcc expect an expression.
@@ -1411,95 +1411,95 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME AND XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME AND XOR_ASSIGN
##
-## Ends in an error in state: 213.
+## Ends in an error in state: 138.
##
## and_expression -> and_expression AND . equality_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION HAT COMMA COLON BARBAR BAR ANDAND AND ]
##
## The known suffix of the stack is as follows:
-## and_expression AND
+## and_expression AND
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME ANDAND XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME ANDAND XOR_ASSIGN
##
-## Ends in an error in state: 202.
+## Ends in an error in state: 127.
##
## logical_and_expression -> logical_and_expression ANDAND . inclusive_or_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR ANDAND ]
##
## The known suffix of the stack is as follows:
-## logical_and_expression ANDAND
+## logical_and_expression ANDAND
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BAR XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BAR XOR_ASSIGN
##
-## Ends in an error in state: 204.
+## Ends in an error in state: 129.
##
## inclusive_or_expression -> inclusive_or_expression BAR . exclusive_or_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR BAR ANDAND ]
##
## The known suffix of the stack is as follows:
-## inclusive_or_expression BAR
+## inclusive_or_expression BAR
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BARBAR XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BARBAR XOR_ASSIGN
##
-## Ends in an error in state: 225.
+## Ends in an error in state: 150.
##
## logical_or_expression -> logical_or_expression BARBAR . logical_and_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR ]
##
## The known suffix of the stack is as follows:
-## logical_or_expression BARBAR
+## logical_or_expression BARBAR
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME HAT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME HAT XOR_ASSIGN
##
-## Ends in an error in state: 206.
+## Ends in an error in state: 131.
##
## exclusive_or_expression -> exclusive_or_expression HAT . and_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION HAT COMMA COLON BARBAR BAR ANDAND ]
##
## The known suffix of the stack is as follows:
-## exclusive_or_expression HAT
+## exclusive_or_expression HAT
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LT XOR_ASSIGN
##
-## Ends in an error in state: 196.
+## Ends in an error in state: 121.
##
## relational_expression -> relational_expression relational_operator . shift_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION NEQ LT LEQ HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
## The known suffix of the stack is as follows:
-## relational_expression relational_operator
+## relational_expression relational_operator
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME NEQ XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME NEQ XOR_ASSIGN
##
-## Ends in an error in state: 210.
+## Ends in an error in state: 135.
##
## equality_expression -> equality_expression equality_operator . relational_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION NEQ HAT EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
## The known suffix of the stack is as follows:
-## equality_expression equality_operator
+## equality_expression equality_operator
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PLUS XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PLUS XOR_ASSIGN
##
-## Ends in an error in state: 189.
+## Ends in an error in state: 114.
##
## additive_expression -> additive_expression additive_operator . multiplicative_expression [ SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION PLUS NEQ MINUS LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
## The known suffix of the stack is as follows:
-## additive_expression additive_operator
+## additive_expression additive_operator
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME RIGHT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME RIGHT XOR_ASSIGN
##
-## Ends in an error in state: 178.
+## Ends in an error in state: 103.
##
## shift_expression -> shift_expression shift_operator . additive_expression [ SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION NEQ LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
## The known suffix of the stack is as follows:
-## shift_expression shift_operator
+## shift_expression shift_operator
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME STAR XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME STAR XOR_ASSIGN
##
-## Ends in an error in state: 183.
+## Ends in an error in state: 108.
##
## multiplicative_expression -> multiplicative_expression multiplicative_operator . cast_expression [ STAR SLASH SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT NEQ MINUS LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
## The known suffix of the stack is as follows:
-## multiplicative_expression multiplicative_operator
+## multiplicative_expression multiplicative_operator
##
# clang and gcc expect an expression.
@@ -1509,14 +1509,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME XOR_ASSIGN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME XOR_ASSIGN XOR_ASSIGN
##
-## Ends in an error in state: 174.
+## Ends in an error in state: 99.
##
## assignment_expression -> unary_expression assignment_operator . assignment_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## unary_expression assignment_operator
+## unary_expression assignment_operator
##
# clang and gcc expect an expression.
@@ -1526,14 +1526,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 232.
+## Ends in an error in state: 157.
##
## argument_expression_list -> argument_expression_list COMMA . assignment_expression [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## argument_expression_list COMMA
+## argument_expression_list COMMA
##
# Here, we could say more about the context if we parameterized
@@ -1547,23 +1547,23 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME DOT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME DOT XOR_ASSIGN
##
-## Ends in an error in state: 238.
+## Ends in an error in state: 163.
##
## postfix_expression -> postfix_expression DOT . general_identifier [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## postfix_expression DOT
+## postfix_expression DOT
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PTR XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PTR XOR_ASSIGN
##
-## Ends in an error in state: 159.
+## Ends in an error in state: 84.
##
## postfix_expression -> postfix_expression PTR . general_identifier [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## postfix_expression PTR
+## postfix_expression PTR
##
# clang and gcc expect an identifier.
@@ -1573,35 +1573,35 @@ At this point, the name of a struct or union member is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 235.
+## Ends in an error in state: 160.
##
## expression -> expression . COMMA assignment_expression [ RBRACK COMMA ]
## postfix_expression -> postfix_expression LBRACK expression . RBRACK [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## postfix_expression LBRACK expression
+## postfix_expression LBRACK expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
# We know for sure that an array subscript expression has begun, and
@@ -1618,14 +1618,14 @@ then at this point, a closing bracket ']' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK XOR_ASSIGN
##
-## Ends in an error in state: 234.
+## Ends in an error in state: 159.
##
## postfix_expression -> postfix_expression LBRACK . expression RBRACK [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## postfix_expression LBRACK
+## postfix_expression LBRACK
##
Ill-formed expression.
@@ -1633,35 +1633,35 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 231.
+## Ends in an error in state: 156.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## option(argument_expression_list) -> argument_expression_list . [ RPAREN ]
##
## The known suffix of the stack is as follows:
-## argument_expression_list
+## argument_expression_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 155, spurious reduction of production argument_expression_list -> assignment_expression
##
Up to this point, a list of expressions has been recognized:
@@ -1671,14 +1671,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 161.
+## Ends in an error in state: 86.
##
## postfix_expression -> postfix_expression LPAREN . option(argument_expression_list) RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## postfix_expression LPAREN
+## postfix_expression LPAREN
##
# gcc and clang expect an expression: this is incomplete.
@@ -1689,23 +1689,23 @@ followed with a closing parenthesis ')', is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME COLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME COLON XOR_ASSIGN
##
-## Ends in an error in state: 222.
+## Ends in an error in state: 147.
##
## conditional_expression -> logical_or_expression QUESTION expression COLON . conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## logical_or_expression QUESTION expression COLON
+## logical_or_expression QUESTION expression COLON
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION XOR_ASSIGN
##
-## Ends in an error in state: 200.
+## Ends in an error in state: 125.
##
## conditional_expression -> logical_or_expression QUESTION . expression COLON conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## logical_or_expression QUESTION
+## logical_or_expression QUESTION
##
Ill-formed conditional expression.
@@ -1713,35 +1713,35 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 218.
+## Ends in an error in state: 143.
##
## conditional_expression -> logical_or_expression QUESTION expression . COLON conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
## expression -> expression . COMMA assignment_expression [ COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## logical_or_expression QUESTION expression
+## logical_or_expression QUESTION expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
# gcc and clang simply expect a colon.
@@ -1756,35 +1756,35 @@ then at this point, a colon ':' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: PACKED LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 391.
+## Ends in an error in state: 399.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## attribute_specifier -> PACKED LPAREN argument_expression_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PACKED LPAREN argument_expression_list
+## PACKED LPAREN argument_expression_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 155, spurious reduction of production argument_expression_list -> assignment_expression
##
Ill-formed $2 attribute.
@@ -1795,14 +1795,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN XOR_ASSIGN
+translation_unit_file: PACKED LPAREN XOR_ASSIGN
##
## Ends in an error in state: 19.
##
## attribute_specifier -> PACKED LPAREN . argument_expression_list RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PACKED LPAREN
+## PACKED LPAREN
##
# clang expects a "parameter declarator" (?).
@@ -1814,14 +1814,14 @@ At this point, a list of expressions is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME TYPEDEF_NAME
+translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME TYPEDEF_NAME
##
## Ends in an error in state: 24.
##
## primary_expression -> PRE_NAME . VAR_NAME [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
Ill-formed expression.
@@ -1830,14 +1830,14 @@ The following identifier is used as a variable, but has been defined as a type:
# ------------------------------------------------------------------------------
-translation_unit_file: PACKED XOR_ASSIGN
+translation_unit_file: PACKED XOR_ASSIGN
##
## Ends in an error in state: 18.
##
## attribute_specifier -> PACKED . LPAREN argument_expression_list RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PACKED
+## PACKED
##
# This one seems important, since CompCert currently does not support __packed__
@@ -1850,15 +1850,15 @@ is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: XOR_ASSIGN
+translation_unit_file: XOR_ASSIGN
##
## Ends in an error in state: 2.
##
-## list(translation_item) -> list(translation_item) . translation_item [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PRAGMA PACKED NORETURN LONG INT INLINE FLOAT EXTERN EOF ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
+## list(translation_item) -> list(translation_item) . translation_item [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC_ASSERT STATIC SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PRAGMA PACKED NORETURN LONG INT INLINE FLOAT EXTERN EOF ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
## translation_unit_file -> list(translation_item) . EOF [ # ]
##
## The known suffix of the stack is as follows:
-## list(translation_item)
+## list(translation_item)
##
# We are at the toplevel.
@@ -1873,9 +1873,9 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 394.
+## Ends in an error in state: 402.
##
## declaration_specifiers_typedef -> TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1884,11 +1884,11 @@ translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
+## TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
+translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 403.
+## Ends in an error in state: 411.
##
## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1897,11 +1897,11 @@ translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type)
+## typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type)
##
-translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 413.
+## Ends in an error in state: 422.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1910,11 +1910,11 @@ translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
+translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 419.
+## Ends in an error in state: 428.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1923,47 +1923,47 @@ translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type)
##
-translation_unit_file: TYPEDEF INT XOR_ASSIGN
+translation_unit_file: TYPEDEF INT XOR_ASSIGN
##
-## Ends in an error in state: 396.
+## Ends in an error in state: 404.
##
## declaration_specifiers_typedef -> TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: INT TYPEDEF XOR_ASSIGN
+translation_unit_file: INT TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 407.
+## Ends in an error in state: 415.
##
## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name)
+## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: VOLATILE TYPEDEF INT XOR_ASSIGN
+translation_unit_file: VOLATILE TYPEDEF INT XOR_ASSIGN
##
-## Ends in an error in state: 415.
+## Ends in an error in state: 424.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: VOLATILE INT TYPEDEF XOR_ASSIGN
+translation_unit_file: VOLATILE INT TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 423.
+## Ends in an error in state: 432.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name)
+## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name)
##
# We have begun a type definition (a.k.a. declaration_specifiers_typedef).
@@ -1994,7 +1994,7 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: TYPEDEF XOR_ASSIGN
+translation_unit_file: TYPEDEF XOR_ASSIGN
##
## Ends in an error in state: 9.
##
@@ -2006,11 +2006,11 @@ translation_unit_file: TYPEDEF XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## TYPEDEF list(declaration_specifier_no_type)
+## TYPEDEF list(declaration_specifier_no_type)
##
-translation_unit_file: VOLATILE TYPEDEF XOR_ASSIGN
+translation_unit_file: VOLATILE TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 411.
+## Ends in an error in state: 420.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2020,7 +2020,7 @@ translation_unit_file: VOLATILE TYPEDEF XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type)
##
# We have seen the TYPEDEF keyword, and possibly some declaration_specifiers_no_type.
@@ -2042,21 +2042,21 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 133.
+## Ends in an error in state: 230.
##
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type)
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
# Analogous to the above, except we are in the context of a parameter declaration,
@@ -2078,9 +2078,9 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 401.
+## Ends in an error in state: 409.
##
## declaration_specifiers(declaration(external_declaration)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2090,11 +2090,11 @@ translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## typedef_name list(declaration_specifier_no_type)
+## typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 417.
+## Ends in an error in state: 426.
##
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2104,29 +2104,29 @@ translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: INT XOR_ASSIGN
+translation_unit_file: INT XOR_ASSIGN
##
-## Ends in an error in state: 405.
+## Ends in an error in state: 413.
##
## declaration_specifiers(declaration(external_declaration)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: VOLATILE INT XOR_ASSIGN
+translation_unit_file: VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 421.
+## Ends in an error in state: 430.
##
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
# We have seen a TYPEDEF_NAME or a primitive type specifier,
@@ -2178,9 +2178,9 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 112.
+## Ends in an error in state: 209.
##
## declaration_specifiers(parameter_declaration) -> typedef_name list(declaration_specifier_no_type) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
@@ -2189,11 +2189,11 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_AS
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## typedef_name list(declaration_specifier_no_type)
+## typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 135.
+## Ends in an error in state: 232.
##
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
@@ -2202,27 +2202,27 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NA
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT XOR_ASSIGN
##
-## Ends in an error in state: 118.
+## Ends in an error in state: 215.
##
## declaration_specifiers(parameter_declaration) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE INT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 137.
+## Ends in an error in state: 234.
##
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
# Analogous to the above situation, except this time, we are in the
@@ -2263,9 +2263,9 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: VOLATILE XOR_ASSIGN
+translation_unit_file: VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 409.
+## Ends in an error in state: 418.
##
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2275,13 +2275,13 @@ translation_unit_file: VOLATILE XOR_ASSIGN
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type)
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
# We have seen some specifiers or qualifiers. We have probably seen at least
@@ -2308,9 +2308,9 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 518.
+## Ends in an error in state: 528.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2320,13 +2320,13 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type)
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
# Identical to the previous one, except we are not at the top level,
# so we know this cannot be the beginning of a function definition.
@@ -2339,9 +2339,9 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME VOLATILE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 515.
+## Ends in an error in state: 524.
##
## declaration_specifiers(declaration(block_item)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2351,11 +2351,11 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## typedef_name list(declaration_specifier_no_type)
+## typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 520.
+## Ends in an error in state: 530.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2365,29 +2365,29 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE INT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE INT XOR_ASSIGN
##
-## Ends in an error in state: 517.
+## Ends in an error in state: 526.
##
## declaration_specifiers(declaration(block_item)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE INT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 522.
+## Ends in an error in state: 532.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
# This is analogous to the error sentence TYPEDEF_NAME VOLATILE XOR_ASSIGN,
@@ -2418,20 +2418,20 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: UNION LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: UNION LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 92.
+## Ends in an error in state: 189.
##
-## struct_declaration -> specifier_qualifier_list(struct_declaration) . option(struct_declarator_list) SEMICOLON [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ]
+## struct_declaration -> specifier_qualifier_list(struct_declaration) . option(struct_declarator_list) SEMICOLON [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC_ASSERT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## specifier_qualifier_list(struct_declaration)
+## specifier_qualifier_list(struct_declaration)
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 78, spurious reduction of production specifier_qualifier_list(struct_declaration) -> typedef_name option(type_qualifier_list)
+## In state 174, spurious reduction of production specifier_qualifier_list(struct_declaration) -> typedef_name option(type_qualifier_list)
##
# We have (spuriously) recognized a specifier_qualifier_list,
@@ -2463,35 +2463,35 @@ at this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: UNION LBRACE LONG COLON CONSTANT RPAREN
+translation_unit_file: UNION LBRACE LONG COLON CONSTANT RPAREN
##
-## Ends in an error in state: 287.
+## Ends in an error in state: 295.
##
## option(struct_declarator_list) -> struct_declarator_list . [ SEMICOLON ]
## struct_declarator_list -> struct_declarator_list . COMMA struct_declarator [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## struct_declarator_list
+## struct_declarator_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 154, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 292, spurious reduction of production struct_declarator -> option(declarator) COLON conditional_expression
-## In state 294, spurious reduction of production struct_declarator_list -> struct_declarator
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 79, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 300, spurious reduction of production struct_declarator -> option(declarator) COLON conditional_expression
+## In state 302, spurious reduction of production struct_declarator_list -> struct_declarator
##
# We have seen a non-empty struct_declarator_list.
@@ -2507,14 +2507,14 @@ then at this point, a semicolon ';' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: UNION LBRACE INT COLON XOR_ASSIGN
+translation_unit_file: UNION LBRACE INT COLON XOR_ASSIGN
##
-## Ends in an error in state: 291.
+## Ends in an error in state: 299.
##
## struct_declarator -> option(declarator) COLON . conditional_expression [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## option(declarator) COLON
+## option(declarator) COLON
##
Ill-formed struct declarator.
@@ -2522,14 +2522,14 @@ At this point, a constant expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 288.
+## Ends in an error in state: 296.
##
## struct_declarator_list -> struct_declarator_list COMMA . struct_declarator [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## struct_declarator_list COMMA
+## struct_declarator_list COMMA
##
Ill-formed struct declaration.
@@ -2537,23 +2537,23 @@ At this point, a struct declarator is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME RPAREN
+translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME RPAREN
##
-## Ends in an error in state: 293.
+## Ends in an error in state: 301.
##
## option(declarator) -> declarator . [ COLON ]
## struct_declarator -> declarator . [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## declarator
+## declarator
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator
-## In state 260, spurious reduction of production attribute_specifier_list ->
-## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
+## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator
+## In state 268, spurious reduction of production attribute_specifier_list ->
+## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
##
# Assuming the declarator so far is complete, we expect
@@ -2574,16 +2574,16 @@ then at this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: UNION LBRACE VOLATILE ADD_ASSIGN
+translation_unit_file: UNION LBRACE VOLATILE ADD_ASSIGN
##
-## Ends in an error in state: 86.
+## Ends in an error in state: 182.
##
## option(type_qualifier_list) -> type_qualifier_list . [ VOLATILE RESTRICT PACKED CONST ATTRIBUTE ALIGNAS ]
## specifier_qualifier_list(struct_declaration) -> type_qualifier_list . typedef_name option(type_qualifier_list) [ STAR SEMICOLON PRE_NAME LPAREN COLON ]
## specifier_qualifier_list(struct_declaration) -> type_qualifier_list . type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN COLON ]
##
## The known suffix of the stack is as follows:
-## type_qualifier_list
+## type_qualifier_list
##
# A list of qualifiers has been read.
@@ -2597,15 +2597,15 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: UNION LBRACE XOR_ASSIGN
+translation_unit_file: UNION LBRACE XOR_ASSIGN
##
## Ends in an error in state: 75.
##
-## struct_declaration_list -> struct_declaration_list . struct_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ]
+## struct_declaration_list -> struct_declaration_list . struct_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC_ASSERT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ]
## struct_or_union_specifier -> struct_or_union attribute_specifier_list option(other_identifier) LBRACE struct_declaration_list . RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## struct_or_union attribute_specifier_list option(other_identifier) LBRACE struct_declaration_list
+## struct_or_union attribute_specifier_list option(other_identifier) LBRACE struct_declaration_list
##
# gcc and clang do not seem prepared to accept a struct or union with
@@ -2617,7 +2617,7 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: UNION XOR_ASSIGN
+translation_unit_file: UNION XOR_ASSIGN
##
## Ends in an error in state: 72.
##
@@ -2625,7 +2625,7 @@ translation_unit_file: UNION XOR_ASSIGN
## struct_or_union_specifier -> struct_or_union attribute_specifier_list . general_identifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## struct_or_union attribute_specifier_list
+## struct_or_union attribute_specifier_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
@@ -2646,22 +2646,22 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 264.
+## Ends in an error in state: 272.
##
## direct_declarator -> LPAREN save_context declarator . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## LPAREN save_context declarator
+## LPAREN save_context declarator
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator
-## In state 260, spurious reduction of production attribute_specifier_list ->
-## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
+## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator
+## In state 268, spurious reduction of production attribute_specifier_list ->
+## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
##
Up to this point, a declarator has been recognized:
@@ -2671,14 +2671,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT LPAREN XOR_ASSIGN
+translation_unit_file: INT LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 98.
+## Ends in an error in state: 195.
##
## direct_declarator -> LPAREN save_context . declarator RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## LPAREN save_context
+## LPAREN save_context
##
# clang and gcc expect identifier or '(', as usual.
@@ -2688,15 +2688,15 @@ At this point, a declarator is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 281.
+## Ends in an error in state: 289.
##
## identifier_list -> identifier_list . COMMA PRE_NAME VAR_NAME [ RPAREN COMMA ]
## option(identifier_list) -> identifier_list . [ RPAREN ]
##
## The known suffix of the stack is as follows:
-## identifier_list
+## identifier_list
##
Ill-formed K&R function definition.
@@ -2707,15 +2707,15 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 104.
+## Ends in an error in state: 201.
##
## context_parameter_type_list -> save_context . parameter_type_list save_context [ RPAREN ]
## direct_declarator -> direct_declarator LPAREN save_context . option(identifier_list) RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## direct_declarator LPAREN save_context
+## direct_declarator LPAREN save_context
##
# Ignore K&R syntax, just request ANSI syntax.
@@ -2731,9 +2731,9 @@ followed with a closing parenthesis ')', is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT STAR RPAREN
+translation_unit_file: INT STAR RPAREN
##
-## Ends in an error in state: 101.
+## Ends in an error in state: 198.
##
## declarator_noattrend -> list(pointer1) STAR option(type_qualifier_list) . direct_declarator [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## list(pointer1) -> list(pointer1) STAR option(type_qualifier_list) . [ STAR ]
@@ -2741,7 +2741,7 @@ translation_unit_file: INT STAR RPAREN
## type_qualifier_list -> option(type_qualifier_list) . attribute_specifier [ VOLATILE STAR RESTRICT PRE_NAME PACKED LPAREN CONST ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## list(pointer1) STAR option(type_qualifier_list)
+## list(pointer1) STAR option(type_qualifier_list)
##
# If the pointer isn't finished, we expect
@@ -2764,26 +2764,26 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME XOR_ASSIGN
+translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 534.
+## Ends in an error in state: 544.
##
## option(typedef_declarator_list) -> typedef_declarator_list . [ SEMICOLON ]
## typedef_declarator_list -> typedef_declarator_list . COMMA typedef_declarator [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## typedef_declarator_list
+## typedef_declarator_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator
-## In state 260, spurious reduction of production attribute_specifier_list ->
-## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
-## In state 538, spurious reduction of production declare_typename(declarator) -> declarator
-## In state 537, spurious reduction of production typedef_declarator -> declare_typename(declarator)
-## In state 539, spurious reduction of production typedef_declarator_list -> typedef_declarator
+## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator
+## In state 268, spurious reduction of production attribute_specifier_list ->
+## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
+## In state 548, spurious reduction of production declare_typename(declarator) -> declarator
+## In state 547, spurious reduction of production typedef_declarator -> declare_typename(declarator)
+## In state 549, spurious reduction of production typedef_declarator_list -> typedef_declarator
##
# Because attribute_specifier_list, declarator and declarator_noattrend have been marked
@@ -2807,28 +2807,28 @@ then at this point, a semicolon ';' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 535.
+## Ends in an error in state: 545.
##
## typedef_declarator_list -> typedef_declarator_list COMMA . typedef_declarator [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## typedef_declarator_list COMMA
+## typedef_declarator_list COMMA
##
At this point, a declarator is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN INT LPAREN RPAREN LPAREN XOR_ASSIGN
+translation_unit_file: ALIGNAS LPAREN INT LPAREN RPAREN LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 249.
+## Ends in an error in state: 257.
##
## direct_abstract_declarator -> direct_abstract_declarator LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
##
## The known suffix of the stack is as follows:
-## direct_abstract_declarator LPAREN
+## direct_abstract_declarator LPAREN
##
At this point, a list of parameter declarations,
@@ -2836,32 +2836,32 @@ followed with a closing parenthesis ')', is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM CONST XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM CONST XOR_ASSIGN
##
-## Ends in an error in state: 450.
+## Ends in an error in state: 459.
##
## asm_attributes -> CONST . asm_attributes [ LPAREN ]
##
## The known suffix of the stack is as follows:
-## CONST
+## CONST
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM VOLATILE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 449.
+## Ends in an error in state: 458.
##
## asm_attributes -> VOLATILE . asm_attributes [ LPAREN ]
##
## The known suffix of the stack is as follows:
-## VOLATILE
+## VOLATILE
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM XOR_ASSIGN
##
-## Ends in an error in state: 448.
+## Ends in an error in state: 457.
##
-## asm_statement -> ASM . asm_attributes LPAREN string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## asm_statement -> ASM . asm_attributes LPAREN string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ASM
+## ASM
##
Ill-formed assembly statement.
@@ -2871,26 +2871,26 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL COMMA XOR_ASSIGN
##
-## Ends in an error in state: 474.
+## Ends in an error in state: 483.
##
## asm_flags -> asm_flags COMMA . string_literals_list [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## asm_flags COMMA
+## asm_flags COMMA
##
# We are in the clobber list.
# We have seen a comma, so we expect a string literal.
# first(asm_flags) = STRING_LITERAL
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON XOR_ASSIGN
##
-## Ends in an error in state: 471.
+## Ends in an error in state: 480.
##
## asm_arguments -> COLON asm_operands COLON asm_operands COLON . asm_flags [ RPAREN ]
##
## The known suffix of the stack is as follows:
-## COLON asm_operands COLON asm_operands COLON
+## COLON asm_operands COLON asm_operands COLON
##
# We are at the beginning of the clobber list.
# first(asm_flags) = STRING_LITERAL
@@ -2903,21 +2903,21 @@ Examples of clobbered resources:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL XOR_ASSIGN
##
-## Ends in an error in state: 473.
+## Ends in an error in state: 482.
##
## asm_arguments -> COLON asm_operands COLON asm_operands COLON asm_flags . [ RPAREN ]
## asm_flags -> asm_flags . COMMA string_literals_list [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## COLON asm_operands COLON asm_operands COLON asm_flags
+## COLON asm_operands COLON asm_operands COLON asm_flags
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 472, spurious reduction of production asm_flags -> string_literals_list
+## In state 481, spurious reduction of production asm_flags -> string_literals_list
##
# Let's ignore the possibility of concatenating string literals.
@@ -2932,22 +2932,22 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 468.
+## Ends in an error in state: 477.
##
## asm_arguments -> COLON asm_operands . [ RPAREN ]
## asm_arguments -> COLON asm_operands . COLON asm_operands [ RPAREN ]
## asm_arguments -> COLON asm_operands . COLON asm_operands COLON asm_flags [ RPAREN ]
##
## The known suffix of the stack is as follows:
-## COLON asm_operands
+## COLON asm_operands
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 460, spurious reduction of production asm_operands -> asm_operands_ne
+## In state 469, spurious reduction of production asm_operands -> asm_operands_ne
##
# We have seen one COLON, hence the outputs. (The list of outputs may be empty.)
@@ -2962,21 +2962,21 @@ then at this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON XOR_ASSIGN
##
-## Ends in an error in state: 470.
+## Ends in an error in state: 479.
##
## asm_arguments -> COLON asm_operands COLON asm_operands . [ RPAREN ]
## asm_arguments -> COLON asm_operands COLON asm_operands . COLON asm_flags [ RPAREN ]
##
## The known suffix of the stack is as follows:
-## COLON asm_operands COLON asm_operands
+## COLON asm_operands COLON asm_operands
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 469, spurious reduction of production asm_operands ->
+## In state 478, spurious reduction of production asm_operands ->
##
# We have seen two COLONs, hence the outputs and inputs. (The list of inputs may be empty.)
@@ -2994,14 +2994,14 @@ then at this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME RBRACK XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME RBRACK XOR_ASSIGN
##
-## Ends in an error in state: 463.
+## Ends in an error in state: 472.
##
## asm_operand -> asm_op_name . string_literals_list LPAREN expression RPAREN [ RPAREN COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## asm_op_name
+## asm_op_name
##
# Example of asm_operand: [oldval]"=r"(res)
@@ -3013,14 +3013,14 @@ At this point, a string literal, representing a constraint, is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 458.
+## Ends in an error in state: 467.
##
## asm_op_name -> LBRACK general_identifier . RBRACK [ STRING_LITERAL ]
##
## The known suffix of the stack is as follows:
-## LBRACK general_identifier
+## LBRACK general_identifier
##
Ill-formed assembly operand.
@@ -3028,14 +3028,14 @@ At this point, a closing bracket ']' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK XOR_ASSIGN
##
-## Ends in an error in state: 457.
+## Ends in an error in state: 466.
##
## asm_op_name -> LBRACK . general_identifier RBRACK [ STRING_LITERAL ]
##
## The known suffix of the stack is as follows:
-## LBRACK
+## LBRACK
##
Ill-formed assembly operand.
@@ -3043,14 +3043,14 @@ At this point, an identifier is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN COMMA XOR_ASSIGN
##
-## Ends in an error in state: 461.
+## Ends in an error in state: 470.
##
## asm_operands_ne -> asm_operands_ne COMMA . asm_operand [ RPAREN COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## asm_operands_ne COMMA
+## asm_operands_ne COMMA
##
# clang and gcc request a string literal (which is incomplete).
@@ -3060,35 +3060,35 @@ At this point, an assembly operand is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 466.
+## Ends in an error in state: 475.
##
## asm_operand -> asm_op_name string_literals_list LPAREN expression . RPAREN [ RPAREN COMMA COLON ]
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## asm_op_name string_literals_list LPAREN expression
+## asm_op_name string_literals_list LPAREN expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
Ill-formed assembly operand.
@@ -3099,14 +3099,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 465.
+## Ends in an error in state: 474.
##
## asm_operand -> asm_op_name string_literals_list LPAREN . expression RPAREN [ RPAREN COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## asm_op_name string_literals_list LPAREN
+## asm_op_name string_literals_list LPAREN
##
Ill-formed assembly operand.
@@ -3114,15 +3114,15 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL XOR_ASSIGN
##
-## Ends in an error in state: 464.
+## Ends in an error in state: 473.
##
## asm_operand -> asm_op_name string_literals_list . LPAREN expression RPAREN [ RPAREN COMMA COLON ]
## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL LPAREN ]
##
## The known suffix of the stack is as follows:
-## asm_op_name string_literals_list
+## asm_op_name string_literals_list
##
# If we disregard the concatenation of string literals, then
@@ -3134,15 +3134,15 @@ followed with an expression and a closing parenthesis ')', is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL XOR_ASSIGN
##
-## Ends in an error in state: 455.
+## Ends in an error in state: 464.
##
-## asm_statement -> ASM asm_attributes LPAREN string_literals_list . asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## asm_statement -> ASM asm_attributes LPAREN string_literals_list . asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL RPAREN COLON ]
##
## The known suffix of the stack is as follows:
-## ASM asm_attributes LPAREN string_literals_list
+## ASM asm_attributes LPAREN string_literals_list
##
# Expecting either one more string literal, or COLON, or RPAREN.
@@ -3156,14 +3156,14 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 454.
+## Ends in an error in state: 463.
##
-## asm_statement -> ASM asm_attributes LPAREN . string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## asm_statement -> ASM asm_attributes LPAREN . string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ASM asm_attributes LPAREN
+## ASM asm_attributes LPAREN
##
Ill-formed assembly statement.
@@ -3171,50 +3171,50 @@ At this point, a string literal, representing an instruction, is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE BREAK XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE BREAK XOR_ASSIGN
##
-## Ends in an error in state: 446.
+## Ends in an error in state: 455.
##
-## jump_statement -> BREAK . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## jump_statement -> BREAK . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## BREAK
+## BREAK
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CONTINUE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CONTINUE XOR_ASSIGN
##
-## Ends in an error in state: 441.
+## Ends in an error in state: 450.
##
-## jump_statement -> CONTINUE . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## jump_statement -> CONTINUE . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## CONTINUE
+## CONTINUE
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 565.
+## Ends in an error in state: 575.
##
-## iteration_statement -> save_context do_statement1 WHILE LPAREN expression RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context do_statement1 WHILE LPAREN expression RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context do_statement1 WHILE LPAREN expression RPAREN
+## save_context do_statement1 WHILE LPAREN expression RPAREN
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO PRE_NAME VAR_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 437.
+## Ends in an error in state: 446.
##
-## jump_statement -> GOTO general_identifier . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## jump_statement -> GOTO general_identifier . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## GOTO general_identifier
+## GOTO general_identifier
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 478.
+## Ends in an error in state: 487.
##
-## asm_statement -> ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## asm_statement -> ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN
+## ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN
##
Ill-formed statement.
@@ -3222,32 +3222,32 @@ At this point, a semicolon ';' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT COLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT COLON XOR_ASSIGN
##
-## Ends in an error in state: 445.
+## Ends in an error in state: 454.
##
-## labeled_statement -> CASE conditional_expression COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## labeled_statement -> CASE conditional_expression COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## CASE conditional_expression COLON
+## CASE conditional_expression COLON
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT COLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT COLON XOR_ASSIGN
##
-## Ends in an error in state: 440.
+## Ends in an error in state: 449.
##
-## labeled_statement -> DEFAULT COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## labeled_statement -> DEFAULT COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## DEFAULT COLON
+## DEFAULT COLON
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COLON XOR_ASSIGN
##
-## Ends in an error in state: 494.
+## Ends in an error in state: 503.
##
-## labeled_statement -> general_identifier COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## labeled_statement -> general_identifier COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## general_identifier COLON
+## general_identifier COLON
##
# gcc and clang request an expression, which seems misleading (incomplete).
@@ -3257,32 +3257,32 @@ At this point, a statement is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT SEMICOLON
##
-## Ends in an error in state: 444.
+## Ends in an error in state: 453.
##
-## labeled_statement -> CASE conditional_expression . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## labeled_statement -> CASE conditional_expression . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## CASE conditional_expression
+## CASE conditional_expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 154, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 79, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
##
Ill-formed labeled statement.
@@ -3293,14 +3293,14 @@ then at this point, a colon ':' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE XOR_ASSIGN
##
-## Ends in an error in state: 443.
+## Ends in an error in state: 452.
##
-## labeled_statement -> CASE . conditional_expression COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## labeled_statement -> CASE . conditional_expression COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## CASE
+## CASE
##
Ill-formed labeled statement.
@@ -3308,23 +3308,23 @@ At this point, a constant expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT XOR_ASSIGN
##
-## Ends in an error in state: 439.
+## Ends in an error in state: 448.
##
-## labeled_statement -> DEFAULT . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## labeled_statement -> DEFAULT . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## DEFAULT
+## DEFAULT
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 493.
+## Ends in an error in state: 502.
##
-## labeled_statement -> general_identifier . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## labeled_statement -> general_identifier . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## general_identifier
+## general_identifier
##
# gcc and clang apparently do not allow a TYPEDEF_NAME to be reclassified as a label.
@@ -3334,35 +3334,35 @@ At this point, a colon ':' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 564.
+## Ends in an error in state: 574.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
-## iteration_statement -> save_context do_statement1 WHILE LPAREN expression . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context do_statement1 WHILE LPAREN expression . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context do_statement1 WHILE LPAREN expression
+## save_context do_statement1 WHILE LPAREN expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'do' ... 'while' statement.
@@ -3373,14 +3373,14 @@ then at this point, a closing parenthesis ')' and a semicolon ';' are expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 563.
+## Ends in an error in state: 573.
##
-## iteration_statement -> save_context do_statement1 WHILE LPAREN . expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context do_statement1 WHILE LPAREN . expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context do_statement1 WHILE LPAREN
+## save_context do_statement1 WHILE LPAREN
##
Ill-formed 'do' ... 'while' statement.
@@ -3388,14 +3388,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE XOR_ASSIGN
##
-## Ends in an error in state: 562.
+## Ends in an error in state: 572.
##
-## iteration_statement -> save_context do_statement1 WHILE . LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context do_statement1 WHILE . LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context do_statement1 WHILE
+## save_context do_statement1 WHILE
##
Ill-formed 'do' ... 'while' statement.
@@ -3403,14 +3403,14 @@ At this point, an opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 561.
+## Ends in an error in state: 571.
##
-## iteration_statement -> save_context do_statement1 . WHILE LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context do_statement1 . WHILE LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context do_statement1
+## save_context do_statement1
##
# Quite nicely, in this case, there is no doubt that the statement is
@@ -3424,14 +3424,14 @@ At this point, a 'while' keyword is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO XOR_ASSIGN
##
-## Ends in an error in state: 557.
+## Ends in an error in state: 567.
##
## do_statement1 -> save_context DO . statement [ WHILE ]
##
## The known suffix of the stack is as follows:
-## save_context DO
+## save_context DO
##
# gcc and clang expect an expression.
@@ -3441,14 +3441,14 @@ At this point, a statement (the loop body) is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 527.
+## Ends in an error in state: 537.
##
-## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN)
+## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN)
##
Ill-formed 'for' statement.
@@ -3456,35 +3456,35 @@ At this point, a statement (the loop body) is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 529.
+## Ends in an error in state: 539.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## optional(expression,RPAREN) -> expression . RPAREN [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
##
## The known suffix of the stack is as follows:
-## expression
+## expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
# The use of optional(expression,RPAREN) tells us that we are in a FOR statement.
@@ -3498,14 +3498,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 525.
+## Ends in an error in state: 535.
##
-## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) . optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) . optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON)
+## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON)
##
# Expecting the third part of the loop header -- the expression
@@ -3518,14 +3518,14 @@ followed with a closing parenthesis ')', is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 524.
+## Ends in an error in state: 534.
##
-## iteration_statement -> save_context FOR LPAREN for_statement_header . optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context FOR LPAREN for_statement_header . optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context FOR LPAREN for_statement_header
+## save_context FOR LPAREN for_statement_header
##
# Expecting the second part of the loop header -- the controlling expression.
@@ -3537,35 +3537,35 @@ followed with a semicolon ';', is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN PRE_NAME VAR_NAME RPAREN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN PRE_NAME VAR_NAME RPAREN
##
-## Ends in an error in state: 531.
+## Ends in an error in state: 541.
##
## expression -> expression . COMMA assignment_expression [ SEMICOLON COMMA ]
## optional(expression,SEMICOLON) -> expression . SEMICOLON [ TILDE STRING_LITERAL STAR SIZEOF SEMICOLON RPAREN PRE_NAME PLUS MINUS LPAREN INC DEC CONSTANT BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AND ALIGNOF ]
##
## The known suffix of the stack is as follows:
-## expression
+## expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
# At the time of writing, optional(expression,SEMICOLON) is used only in FOR
@@ -3579,14 +3579,14 @@ then at this point, a semicolon ';' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 512.
+## Ends in an error in state: 521.
##
-## iteration_statement -> save_context FOR LPAREN . for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context FOR LPAREN . for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context FOR LPAREN
+## save_context FOR LPAREN
##
# gcc and clang say they expect an expression, which is incomplete.
@@ -3600,14 +3600,14 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR XOR_ASSIGN
##
-## Ends in an error in state: 511.
+## Ends in an error in state: 520.
##
-## iteration_statement -> save_context FOR . LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context FOR . LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context FOR
+## save_context FOR
##
Ill-formed 'for' statement.
@@ -3615,14 +3615,14 @@ At this point, an opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO XOR_ASSIGN
##
-## Ends in an error in state: 436.
+## Ends in an error in state: 445.
##
-## jump_statement -> GOTO . general_identifier SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## jump_statement -> GOTO . general_identifier SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## GOTO
+## GOTO
##
Ill-formed 'goto' statement.
@@ -3630,14 +3630,14 @@ At this point, an identifier (a 'goto' label) is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO IF LPAREN CONSTANT RPAREN SEMICOLON ELSE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO IF LPAREN CONSTANT RPAREN SEMICOLON ELSE XOR_ASSIGN
##
-## Ends in an error in state: 559.
+## Ends in an error in state: 569.
##
-## selection_statement -> save_context ifelse_statement1 . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context ifelse_statement1 . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context ifelse_statement1
+## save_context ifelse_statement1
##
Ill-formed 'if' ... 'else' statement.
@@ -3645,15 +3645,15 @@ At this point, a statement is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 508.
+## Ends in an error in state: 517.
##
## ifelse_statement1 -> IF LPAREN expression RPAREN save_context . statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
-## selection_statement -> save_context IF LPAREN expression RPAREN save_context . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context IF LPAREN expression RPAREN save_context . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context IF LPAREN expression RPAREN save_context
+## save_context IF LPAREN expression RPAREN save_context
##
Ill-formed 'if' statement.
@@ -3661,36 +3661,36 @@ At this point, a statement is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 506.
+## Ends in an error in state: 515.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## ifelse_statement1 -> IF LPAREN expression . RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
-## selection_statement -> save_context IF LPAREN expression . RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context IF LPAREN expression . RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context IF LPAREN expression
+## save_context IF LPAREN expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'if' statement.
@@ -3701,15 +3701,15 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 505.
+## Ends in an error in state: 514.
##
## ifelse_statement1 -> IF LPAREN . expression RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
-## selection_statement -> save_context IF LPAREN . expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context IF LPAREN . expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context IF LPAREN
+## save_context IF LPAREN
##
Ill-formed 'if' statement.
@@ -3717,15 +3717,15 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF XOR_ASSIGN
##
-## Ends in an error in state: 504.
+## Ends in an error in state: 513.
##
## ifelse_statement1 -> IF . LPAREN expression RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
-## selection_statement -> save_context IF . LPAREN expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context IF . LPAREN expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context IF
+## save_context IF
##
Ill-formed 'if' statement.
@@ -3733,14 +3733,14 @@ At this point, an opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 502.
+## Ends in an error in state: 511.
##
-## selection_statement -> save_context SWITCH LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context SWITCH LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context SWITCH LPAREN expression RPAREN
+## save_context SWITCH LPAREN expression RPAREN
##
@@ -3757,35 +3757,35 @@ enclosed within braces '{' and '}'.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 501.
+## Ends in an error in state: 510.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
-## selection_statement -> save_context SWITCH LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context SWITCH LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context SWITCH LPAREN expression
+## save_context SWITCH LPAREN expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'switch' statement.
@@ -3796,14 +3796,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 500.
+## Ends in an error in state: 509.
##
-## selection_statement -> save_context SWITCH LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context SWITCH LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context SWITCH LPAREN
+## save_context SWITCH LPAREN
##
Ill-formed 'switch' statement.
@@ -3811,14 +3811,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH XOR_ASSIGN
##
-## Ends in an error in state: 499.
+## Ends in an error in state: 508.
##
-## selection_statement -> save_context SWITCH . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## selection_statement -> save_context SWITCH . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context SWITCH
+## save_context SWITCH
##
Ill-formed 'switch' statement.
@@ -3826,14 +3826,14 @@ At this point, an opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 486.
+## Ends in an error in state: 495.
##
-## iteration_statement -> save_context WHILE LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context WHILE LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context WHILE LPAREN expression RPAREN
+## save_context WHILE LPAREN expression RPAREN
##
Ill-formed 'while' statement.
@@ -3841,35 +3841,35 @@ At this point, a statement (the loop body) is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 485.
+## Ends in an error in state: 494.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
-## iteration_statement -> save_context WHILE LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context WHILE LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context WHILE LPAREN expression
+## save_context WHILE LPAREN expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'while' statement.
@@ -3880,14 +3880,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 484.
+## Ends in an error in state: 493.
##
-## iteration_statement -> save_context WHILE LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context WHILE LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context WHILE LPAREN
+## save_context WHILE LPAREN
##
Ill-formed 'while' statement.
@@ -3895,14 +3895,14 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE XOR_ASSIGN
##
-## Ends in an error in state: 483.
+## Ends in an error in state: 492.
##
-## iteration_statement -> save_context WHILE . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## iteration_statement -> save_context WHILE . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context WHILE
+## save_context WHILE
##
Ill-formed 'while' statement.
@@ -3910,15 +3910,15 @@ At this point, an opening parenthesis '(' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 427.
+## Ends in an error in state: 436.
##
-## block_item_list -> option(block_item_list) . block_item [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
-## compound_statement -> save_context LBRACE option(block_item_list) . RBRACE [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## block_item_list -> option(block_item_list) . block_item [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## compound_statement -> save_context LBRACE option(block_item_list) . RBRACE [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## save_context LBRACE option(block_item_list)
+## save_context LBRACE option(block_item_list)
##
# We are possibly at the end of a block.
#
@@ -3938,14 +3938,14 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE RETURN XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE RETURN XOR_ASSIGN
##
-## Ends in an error in state: 428.
+## Ends in an error in state: 437.
##
-## jump_statement -> RETURN . option(expression) SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## jump_statement -> RETURN . option(expression) SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## RETURN
+## RETURN
##
# clang and gcc expect an expression.
@@ -3957,37 +3957,37 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE STRING_LITERAL RPAREN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE STRING_LITERAL RPAREN
##
-## Ends in an error in state: 431.
+## Ends in an error in state: 440.
##
## expression -> expression . COMMA assignment_expression [ SEMICOLON COMMA ]
## option(expression) -> expression . [ SEMICOLON ]
##
## The known suffix of the stack is as follows:
-## expression
+## expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 155, spurious reduction of production primary_expression -> string_literals_list
-## In state 157, spurious reduction of production postfix_expression -> primary_expression
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 224, spurious reduction of production expression -> assignment_expression
+## In state 80, spurious reduction of production primary_expression -> string_literals_list
+## In state 82, spurious reduction of production postfix_expression -> primary_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 149, spurious reduction of production expression -> assignment_expression
##
Up to this point, an expression has been recognized:
@@ -3997,16 +3997,16 @@ then at this point, a semicolon ';' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 568.
+## Ends in an error in state: 578.
##
## declaration_specifiers(declaration(block_item)) -> typedef_name . list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> typedef_name . list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## general_identifier -> typedef_name . [ COLON ]
##
## The known suffix of the stack is as follows:
-## typedef_name
+## typedef_name
##
# We see a type name "foo" at the beginning of a block_item, it seems.
@@ -4032,14 +4032,14 @@ at this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 219.
+## Ends in an error in state: 144.
##
## expression -> expression COMMA . assignment_expression [ SEMICOLON RPAREN RBRACK COMMA COLON ]
##
## The known suffix of the stack is as follows:
-## expression COMMA
+## expression COMMA
##
Ill-formed use of the sequencing operator ','.
@@ -4047,26 +4047,26 @@ At this point, an expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME COMMA PRE_NAME VAR_NAME RPAREN
+translation_unit_file: INT PRE_NAME VAR_NAME COMMA PRE_NAME VAR_NAME RPAREN
##
-## Ends in an error in state: 545.
+## Ends in an error in state: 555.
##
## init_declarator_list -> init_declarator_list . COMMA init_declarator [ SEMICOLON COMMA ]
## option(init_declarator_list) -> init_declarator_list . [ SEMICOLON ]
##
## The known suffix of the stack is as follows:
-## init_declarator_list
+## init_declarator_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator
-## In state 553, spurious reduction of production declare_varname(declarator_noattrend) -> declarator_noattrend
-## In state 548, spurious reduction of production save_context ->
-## In state 549, spurious reduction of production attribute_specifier_list ->
-## In state 550, spurious reduction of production init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list
-## In state 547, spurious reduction of production init_declarator_list -> init_declarator_list COMMA init_declarator
+## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator
+## In state 563, spurious reduction of production declare_varname(declarator_noattrend) -> declarator_noattrend
+## In state 558, spurious reduction of production save_context ->
+## In state 559, spurious reduction of production attribute_specifier_list ->
+## In state 560, spurious reduction of production init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list
+## In state 557, spurious reduction of production init_declarator_list -> init_declarator_list COMMA init_declarator
##
Up to this point, a list of declarators has been recognized:
@@ -4076,14 +4076,14 @@ then at this point, a semicolon ';' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 546.
+## Ends in an error in state: 556.
##
## init_declarator_list -> init_declarator_list COMMA . init_declarator [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## init_declarator_list COMMA
+## init_declarator_list COMMA
##
Ill-formed declaration.
@@ -4091,23 +4091,23 @@ At this point, an init declarator is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME EQ ALIGNAS
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME EQ ALIGNAS
##
-## Ends in an error in state: 366.
+## Ends in an error in state: 374.
##
## initializer_list -> option(designation) . c_initializer [ RBRACE COMMA ]
##
## The known suffix of the stack is as follows:
-## option(designation)
+## option(designation)
##
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA DOT PRE_NAME VAR_NAME EQ ALIGNAS
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA DOT PRE_NAME VAR_NAME EQ ALIGNAS
##
-## Ends in an error in state: 370.
+## Ends in an error in state: 378.
##
## initializer_list -> initializer_list COMMA option(designation) . c_initializer [ RBRACE COMMA ]
##
## The known suffix of the stack is as follows:
-## initializer_list COMMA option(designation)
+## initializer_list COMMA option(designation)
##
Ill-formed initializer list.
@@ -4115,15 +4115,15 @@ At this point, an initializer is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 373.
+## Ends in an error in state: 381.
##
## designation -> designator_list . EQ [ TILDE STRING_LITERAL STAR SIZEOF PRE_NAME PLUS MINUS LPAREN LBRACE INC DEC CONSTANT BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AND ALIGNOF ]
## option(designator_list) -> designator_list . [ LBRACK DOT ]
##
## The known suffix of the stack is as follows:
-## designator_list
+## designator_list
##
# We are expecting either one more designator,
@@ -4137,14 +4137,14 @@ then at this point, an equals sign '=' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT XOR_ASSIGN
##
-## Ends in an error in state: 326.
+## Ends in an error in state: 334.
##
## designator -> DOT . general_identifier [ RPAREN LBRACK EQ DOT ]
##
## The known suffix of the stack is as follows:
-## DOT
+## DOT
##
# clang gives examples of designators.
@@ -4154,32 +4154,32 @@ At this point, the name of a struct or union member is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 324.
+## Ends in an error in state: 332.
##
## designator -> LBRACK conditional_expression . RBRACK [ RPAREN LBRACK EQ DOT ]
##
## The known suffix of the stack is as follows:
-## LBRACK conditional_expression
+## LBRACK conditional_expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 154, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 79, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
##
Ill-formed designator.
@@ -4190,14 +4190,14 @@ then at this point, a closing bracket ']' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK XOR_ASSIGN
##
-## Ends in an error in state: 323.
+## Ends in an error in state: 331.
##
## designator -> LBRACK . conditional_expression RBRACK [ RPAREN LBRACK EQ DOT ]
##
## The known suffix of the stack is as follows:
-## LBRACK
+## LBRACK
##
Ill-formed designator.
@@ -4205,15 +4205,15 @@ At this point, a constant expression is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 369.
+## Ends in an error in state: 377.
##
## initializer_list -> initializer_list COMMA . option(designation) c_initializer [ RBRACE COMMA ]
## option(COMMA) -> COMMA . [ RBRACE ]
##
## The known suffix of the stack is as follows:
-## initializer_list COMMA
+## initializer_list COMMA
##
# This could be a trailing comma, in which case a closing brace is legal.
@@ -4226,36 +4226,36 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE CONSTANT SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE CONSTANT SEMICOLON
##
-## Ends in an error in state: 368.
+## Ends in an error in state: 376.
##
## c_initializer -> LBRACE initializer_list . option(COMMA) RBRACE [ SEMICOLON RBRACE COMMA ]
## initializer_list -> initializer_list . COMMA option(designation) c_initializer [ RBRACE COMMA ]
##
## The known suffix of the stack is as follows:
-## LBRACE initializer_list
+## LBRACE initializer_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
-## In state 372, spurious reduction of production c_initializer -> assignment_expression
-## In state 378, spurious reduction of production initializer_list -> option(designation) c_initializer
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
+## In state 380, spurious reduction of production c_initializer -> assignment_expression
+## In state 386, spurious reduction of production initializer_list -> option(designation) c_initializer
##
# Omitting the fact that the closing brace can be preceded with a comma.
@@ -4268,14 +4268,14 @@ then at this point, a closing brace '}' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 367.
+## Ends in an error in state: 375.
##
## c_initializer -> LBRACE . initializer_list option(COMMA) RBRACE [ SEMICOLON RBRACE COMMA ]
##
## The known suffix of the stack is as follows:
-## LBRACE
+## LBRACE
##
# An initializer list is expected.
@@ -4289,14 +4289,14 @@ followed with an initializer, is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME EQ XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME EQ XOR_ASSIGN
##
-## Ends in an error in state: 551.
+## Ends in an error in state: 561.
##
## init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list EQ . c_initializer [ SEMICOLON COMMA ]
##
## The known suffix of the stack is as follows:
-## declare_varname(declarator_noattrend) save_context attribute_specifier_list EQ
+## declare_varname(declarator_noattrend) save_context attribute_specifier_list EQ
##
# clang and gcc expect an expression (incomplete).
@@ -4306,33 +4306,33 @@ At this point, an initializer is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LBRACK CONSTANT SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LBRACK CONSTANT SEMICOLON
##
-## Ends in an error in state: 243.
+## Ends in an error in state: 251.
##
## optional(assignment_expression,RBRACK) -> assignment_expression . RBRACK [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## assignment_expression
+## assignment_expression
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 158, spurious reduction of production unary_expression -> postfix_expression
-## In state 162, spurious reduction of production cast_expression -> unary_expression
-## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 198, spurious reduction of production shift_expression -> additive_expression
-## In state 175, spurious reduction of production relational_expression -> shift_expression
-## In state 191, spurious reduction of production equality_expression -> relational_expression
-## In state 207, spurious reduction of production and_expression -> equality_expression
-## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 87, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 145, spurious reduction of production assignment_expression -> conditional_expression
##
# At the time of writing, optional(expression,RBRACK) is used only in direct
@@ -4348,14 +4348,14 @@ then at this point, a closing bracket ']' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 282.
+## Ends in an error in state: 290.
##
## identifier_list -> identifier_list COMMA . PRE_NAME VAR_NAME [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## identifier_list COMMA
+## identifier_list COMMA
##
# Strangely, gcc requests ')'.
@@ -4365,14 +4365,14 @@ At this point, an identifier is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA PRE_NAME TYPEDEF_NAME
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA PRE_NAME TYPEDEF_NAME
##
-## Ends in an error in state: 283.
+## Ends in an error in state: 291.
##
## identifier_list -> identifier_list COMMA PRE_NAME . VAR_NAME [ RPAREN COMMA ]
##
## The known suffix of the stack is as follows:
-## identifier_list COMMA PRE_NAME
+## identifier_list COMMA PRE_NAME
##
Ill-formed K&R function definition.
@@ -4381,29 +4381,29 @@ The following type name is used as a K&R parameter name:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT XOR_ASSIGN
##
-## Ends in an error in state: 586.
+## Ends in an error in state: 596.
##
## declaration_specifiers(declaration(block_item)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE INT XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 591.
+## Ends in an error in state: 601.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
+## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 584.
+## Ends in an error in state: 594.
##
## declaration_specifiers(declaration(block_item)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -4412,11 +4412,11 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## typedef_name list(declaration_specifier_no_type)
+## typedef_name list(declaration_specifier_no_type)
##
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 589.
+## Ends in an error in state: 599.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -4425,7 +4425,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOL
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type)
##
# We omit the case of the empty list of declarators
@@ -4439,21 +4439,21 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 587.
+## Ends in an error in state: 597.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
##
## The known suffix of the stack is as follows:
-## rlist(declaration_specifier_no_type)
+## rlist(declaration_specifier_no_type)
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
Ill-formed K&R parameter declaration.
@@ -4464,16 +4464,16 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: VOID PRE_NAME TYPEDEF_NAME PACKED LPAREN CONSTANT RPAREN XOR_ASSIGN
+translation_unit_file: VOID PRE_NAME TYPEDEF_NAME PACKED LPAREN CONSTANT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 600.
+## Ends in an error in state: 610.
##
## attribute_specifier_list -> attribute_specifier . attribute_specifier_list [ SEMICOLON LBRACE EQ COMMA ]
## rlist(declaration_specifier_no_type) -> attribute_specifier . [ VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT PRE_NAME LONG INT FLOAT ENUM DOUBLE CHAR ]
## rlist(declaration_specifier_no_type) -> attribute_specifier . rlist(declaration_specifier_no_type) [ VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT PRE_NAME LONG INT FLOAT ENUM DOUBLE CHAR ]
##
## The known suffix of the stack is as follows:
-## attribute_specifier
+## attribute_specifier
##
# We have just parsed a list of attribute specifiers, but we cannot
@@ -4497,15 +4497,15 @@ If this is the parameter declaration of a K&R function definition,
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA XOR_ASSIGN
##
-## Ends in an error in state: 141.
+## Ends in an error in state: 238.
##
## parameter_list -> parameter_list COMMA . parameter_declaration [ RPAREN COMMA ]
## parameter_type_list -> parameter_list COMMA . ELLIPSIS [ RPAREN ]
##
## The known suffix of the stack is as follows:
-## parameter_list COMMA
+## parameter_list COMMA
##
At this point, one of the following is expected:
@@ -4514,27 +4514,27 @@ At this point, one of the following is expected:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME SEMICOLON
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 140.
+## Ends in an error in state: 237.
##
## parameter_list -> parameter_list . COMMA parameter_declaration [ RPAREN COMMA ]
## parameter_type_list -> parameter_list . [ RPAREN ]
## parameter_type_list -> parameter_list . COMMA ELLIPSIS [ RPAREN ]
##
## The known suffix of the stack is as follows:
-## parameter_list
+## parameter_list
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator
-## In state 260, spurious reduction of production attribute_specifier_list ->
-## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
-## In state 277, spurious reduction of production declare_varname(declarator) -> declarator
-## In state 276, spurious reduction of production parameter_declaration -> declaration_specifiers(parameter_declaration) declare_varname(declarator)
-## In state 148, spurious reduction of production parameter_list -> parameter_declaration
+## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator
+## In state 268, spurious reduction of production attribute_specifier_list ->
+## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
+## In state 285, spurious reduction of production declare_varname(declarator) -> declarator
+## In state 284, spurious reduction of production parameter_declaration -> declaration_specifiers(parameter_declaration) declare_varname(declarator)
+## In state 245, spurious reduction of production parameter_list -> parameter_declaration
##
# We omit the possibility of an ellipsis.
@@ -4550,14 +4550,14 @@ then at this point, a closing parenthesis ')' is expected.
# ------------------------------------------------------------------------------
-translation_unit_file: PRE_NAME VAR_NAME
+translation_unit_file: PRE_NAME VAR_NAME
##
## Ends in an error in state: 16.
##
## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA COLON AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
# This can only happen in a declaration
@@ -4568,15 +4568,15 @@ The following identifier is used as a type, but has not been defined as such:
# ------------------------------------------------------------------------------
-translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT SEMICOLON XOR_ASSIGN
+translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 596.
+## Ends in an error in state: 606.
##
## declaration_list -> declaration_list . kr_param_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG LBRACE INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
## function_definition1 -> declaration_specifiers(declaration(external_declaration)) declare_varname(declarator_noattrend) save_context declaration_list . [ LBRACE ]
##
## The known suffix of the stack is as follows:
-## declaration_specifiers(declaration(external_declaration)) declare_varname(declarator_noattrend) save_context declaration_list
+## declaration_specifiers(declaration(external_declaration)) declare_varname(declarator_noattrend) save_context declaration_list
##
# clang requests the function body; gcc requests a declaration :-)
@@ -4587,7 +4587,7 @@ At this point, one of the following is expected:
#------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF XOR_ASSIGN
+translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF XOR_ASSIGN
##
## Ends in an error in state: 52.
##
@@ -4595,7 +4595,7 @@ translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF XOR_ASSIGN
## postfix_expression -> BUILTIN_OFFSETOF . LPAREN type_name COMMA general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_OFFSETOF
+## BUILTIN_OFFSETOF
##
Ill-formed __builtin_offsetof.
@@ -4603,7 +4603,7 @@ At this point, an opening parenthesis '(' is expected.
#------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN XOR_ASSIGN
+translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN XOR_ASSIGN
##
## Ends in an error in state: 53.
##
@@ -4611,7 +4611,7 @@ translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN XOR_ASSIGN
## postfix_expression -> BUILTIN_OFFSETOF LPAREN . type_name COMMA general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_OFFSETOF LPAREN
+## BUILTIN_OFFSETOF LPAREN
##
Ill-formed __builtin_offsetof.
@@ -4619,23 +4619,23 @@ At this point, a struct or union name is expected.
#------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID XOR_ASSIGN
+translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 318.
+## Ends in an error in state: 326.
##
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name . COMMA general_identifier RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name . COMMA general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_OFFSETOF LPAREN type_name
+## BUILTIN_OFFSETOF LPAREN type_name
##
## WARNING: This example involves spurious reductions.
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 314, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
Ill-formed __builtin_offsetof.
@@ -4643,15 +4643,15 @@ At this point, a colon ',' is expected
#------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA XOR_ASSIGN
+translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA XOR_ASSIGN
##
-## Ends in an error in state: 319.
+## Ends in an error in state: 327.
##
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA . general_identifier RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA . general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_OFFSETOF LPAREN type_name COMMA
+## BUILTIN_OFFSETOF LPAREN type_name COMMA
##
Ill-formed __builtin_offsetof.
@@ -4659,15 +4659,15 @@ At this point, a member-designator is expected.
#------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME XOR_ASSIGN
+translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 320.
+## Ends in an error in state: 328.
##
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier . designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier
+## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier
##
Ill-formed __builtin_offsetof.
@@ -4675,24 +4675,134 @@ At this point, a member-designator is expected.
#------------------------------------------------------------------------------
-translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME LBRACK STRING_LITERAL RBRACK XOR_ASSIGN
+translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME LBRACK STRING_LITERAL RBRACK XOR_ASSIGN
##
-## Ends in an error in state: 329.
+## Ends in an error in state: 337.
##
## option(designator_list) -> designator_list . [ LBRACK DOT ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier designator_list . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier designator_list
+## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier designator_list
##
Ill-formed __builtin_offsetof.
At this point, a member-designator is expected.
+# ------------------------------------------------------------------------------
+
+translation_unit_file: STATIC_ASSERT XOR_ASSIGN
+##
+## Ends in an error in state: 76.
+##
+## static_assert_declaration -> STATIC_ASSERT . LPAREN conditional_expression COMMA string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+##
+## The known suffix of the stack is as follows:
+## STATIC_ASSERT
+##
+
+Ill-formed _Static_assert.
+At this point, an opening parenthesis '(' is expected.
#------------------------------------------------------------------------------
-translation_unit_file: ALIGNAS LPAREN PRE_NAME XOR_ASSIGN
+translation_unit_file: STATIC_ASSERT LPAREN XOR_ASSIGN
+##
+## Ends in an error in state: 77.
+##
+## static_assert_declaration -> STATIC_ASSERT LPAREN . conditional_expression COMMA string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+##
+## The known suffix of the stack is as follows:
+## STATIC_ASSERT LPAREN
+##
+
+Ill-formed _Static_assert.
+At this point, a constant expression is expected.
+
+#------------------------------------------------------------------------------
+
+translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL XOR_ASSIGN
+##
+## Ends in an error in state: 167.
+##
+## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression . COMMA string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+##
+## The known suffix of the stack is as follows:
+## STATIC_ASSERT LPAREN conditional_expression
+##
+## WARNING: This example involves spurious reductions.
+## This implies that, although the LR(1) items shown above provide an
+## accurate view of the past (what has been recognized so far), they
+## may provide an INCOMPLETE view of the future (what was expected next).
+## In state 80, spurious reduction of production primary_expression -> string_literals_list
+## In state 82, spurious reduction of production postfix_expression -> primary_expression
+## In state 83, spurious reduction of production unary_expression -> postfix_expression
+## In state 79, spurious reduction of production cast_expression -> unary_expression
+## In state 110, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 104, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 123, spurious reduction of production shift_expression -> additive_expression
+## In state 100, spurious reduction of production relational_expression -> shift_expression
+## In state 116, spurious reduction of production equality_expression -> relational_expression
+## In state 132, spurious reduction of production and_expression -> equality_expression
+## In state 140, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 124, spurious reduction of production conditional_expression -> logical_or_expression
+##
+
+Ill-formed _Static_assert.
+At this point, a comma ',' is expected.
+
+#------------------------------------------------------------------------------
+
+translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA XOR_ASSIGN
+##
+## Ends in an error in state: 168.
+##
+## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA . string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+##
+## The known suffix of the stack is as follows:
+## STATIC_ASSERT LPAREN conditional_expression COMMA
+##
+
+Ill-formed _Static_assert.
+At this point, a string literal is expected.
+
+#------------------------------------------------------------------------------
+
+translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA STRING_LITERAL XOR_ASSIGN
+##
+## Ends in an error in state: 169.
+##
+## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL RPAREN ]
+##
+## The known suffix of the stack is as follows:
+## STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list
+##
+
+Ill-formed _Static_assert.
+At this point, a closing parenthesis ')' is expected.
+
+#------------------------------------------------------------------------------
+
+translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA STRING_LITERAL RPAREN XOR_ASSIGN
+##
+## Ends in an error in state: 170.
+##
+## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
+##
+## The known suffix of the stack is as follows:
+## STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list RPAREN
+##
+
+Ill-formed _Static_assert.
+At this point, a semicolon ';' is expected.
+
+#------------------------------------------------------------------------------
+
+translation_unit_file: ALIGNAS LPAREN PRE_NAME XOR_ASSIGN
##
## Ends in an error in state: 29.
##
@@ -4700,20 +4810,20 @@ translation_unit_file: ALIGNAS LPAREN PRE_NAME XOR_ASSIGN
## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
-translation_unit_file: ALIGNAS LPAREN VOID LPAREN VOID LPAREN PRE_NAME XOR_ASSIGN
+translation_unit_file: ALIGNAS LPAREN VOID LPAREN VOID LPAREN PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 147.
+## Ends in an error in state: 244.
##
## declarator_identifier -> PRE_NAME . low_prec TYPEDEF_NAME [ RPAREN PACKED LPAREN LBRACK ATTRIBUTE ALIGNAS ]
## declarator_identifier -> PRE_NAME . VAR_NAME [ RPAREN PACKED LPAREN LBRACK ATTRIBUTE ALIGNAS ]
## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
-translation_unit_file: UNION PRE_NAME XOR_ASSIGN
+translation_unit_file: UNION PRE_NAME XOR_ASSIGN
##
## Ends in an error in state: 40.
##
@@ -4721,38 +4831,38 @@ translation_unit_file: UNION PRE_NAME XOR_ASSIGN
## typedef_name -> PRE_NAME . TYPEDEF_NAME [ XOR_ASSIGN VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF SUB_ASSIGN STRUCT STATIC STAR SLASH SIGNED SHORT SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RESTRICT REGISTER RBRACK RBRACE QUESTION PTR PRE_NAME PLUS PERCENT PACKED OR_ASSIGN NORETURN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LONG LEQ LEFT_ASSIGN LEFT LBRACK LBRACE INT INLINE INC HAT GT GEQ FLOAT EXTERN EQEQ EQ ENUM DOUBLE DOT DIV_ASSIGN DEC CONST COMMA COLON CHAR BARBAR BAR AUTO ATTRIBUTE AND_ASSIGN ANDAND AND ALIGNAS ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
-translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LBRACE PRE_NAME XOR_ASSIGN
+translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LBRACE PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 433.
+## Ends in an error in state: 442.
##
## general_identifier -> PRE_NAME . VAR_NAME [ COLON ]
## primary_expression -> PRE_NAME . VAR_NAME [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RIGHT_ASSIGN RIGHT QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST COLON AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
-translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LPAREN PRE_NAME XOR_ASSIGN
+translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LPAREN PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 105.
+## Ends in an error in state: 202.
##
## identifier_list -> PRE_NAME . VAR_NAME [ RPAREN COMMA ]
## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
-translation_unit_file: VOID PRE_NAME XOR_ASSIGN
+translation_unit_file: VOID PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 93.
+## Ends in an error in state: 190.
##
## declarator_identifier -> PRE_NAME . low_prec TYPEDEF_NAME [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## declarator_identifier -> PRE_NAME . VAR_NAME [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
## The known suffix of the stack is as follows:
-## PRE_NAME
+## PRE_NAME
##
# This is not supposed to be possible, since the Lexer can only emit a
diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly
index e21a3519..822c7011 100644
--- a/cparser/pre_parser.mly
+++ b/cparser/pre_parser.mly
@@ -57,7 +57,7 @@
AUTO REGISTER INLINE THREAD_LOCAL NORETURN CHAR SHORT INT LONG SIGNED UNSIGNED FLOAT DOUBLE
UNDERSCORE_BOOL CONST VOLATILE VOID STRUCT UNION ENUM CASE DEFAULT IF ELSE
SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN BUILTIN_VA_ARG ALIGNOF
- ATTRIBUTE ALIGNAS PACKED ASM BUILTIN_OFFSETOF
+ ATTRIBUTE ALIGNAS PACKED ASM BUILTIN_OFFSETOF STATIC_ASSERT
%token EOF
@@ -404,6 +404,7 @@ expression:
declaration(phantom):
| declaration_specifiers(declaration(phantom)) init_declarator_list? SEMICOLON
| declaration_specifiers_typedef typedef_declarator_list? SEMICOLON
+| static_assert_declaration
{}
init_declarator_list:
@@ -519,6 +520,7 @@ struct_declaration_list:
struct_declaration:
| specifier_qualifier_list(struct_declaration) struct_declarator_list? SEMICOLON
+| static_assert_declaration
{}
(* As in the standard, except it also encodes the constraint described
@@ -608,6 +610,10 @@ gcc_attribute_word:
| PACKED
{}
+static_assert_declaration:
+| STATIC_ASSERT LPAREN constant_expression COMMA string_literals_list RPAREN SEMICOLON
+ {}
+
function_specifier:
| INLINE
| NORETURN
diff --git a/debug/Dwarfgen.ml b/debug/Dwarfgen.ml
index 6c1d0846..020ac60e 100644
--- a/debug/Dwarfgen.ml
+++ b/debug/Dwarfgen.ml
@@ -543,8 +543,8 @@ let diab_file_loc sec (f,l) =
let prod_name =
let version_string =
- if Version.buildnr <> "" && Version.tag <> "" then
- Printf.sprintf "Release: %s, Build: %s, Tag: %s" Version.version Version.buildnr Version.tag
+ if Version.buildnr <> "" && Version.tag <> "" && Version.branch <> "" then
+ Printf.sprintf "Release: %s, Build: %s, Tag: %s, Branch:%s" Version.version Version.buildnr Version.tag Version.branch
else
Version.version in
Printf.sprintf "AbsInt Angewandte Informatik GmbH:CompCert Version %s:(%s,%s,%s,%s)"
diff --git a/doc/index.html b/doc/index.html
index 631c5d99..ec8c4d91 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -24,7 +24,7 @@ a:active {color : Red; text-decoration : underline; }
<H1 align="center">The CompCert verified compiler</H1>
<H2 align="center">Commented Coq development</H2>
-<H3 align="center">Version 3.7, 2020-03-31</H3>
+<H3 align="center">Version 3.8, 2020-11-16</H3>
<H2>Introduction</H2>
@@ -56,12 +56,14 @@ substantially changed since the overview papers above were
written.</P>
<P>The complete sources for CompCert can be downloaded from
-<A HREF="http://compcert.inria.fr/">the CompCert Web site</A>.</P>
+<A HREF="https://github.com/AbsInt/CompCert/">the Git repository</A>
+or <A HREF="https://compcert.org/">the CompCert Web site</A>.
+</P>
<P>This document and the CompCert sources are copyright Institut
National de Recherche en Informatique et en Automatique (INRIA) and
AbsInt Angewandte Informatik GmbH, and are distributed under the terms of the
-following <A HREF="LICENSE">license</A>.
+following <A HREF="LICENSE.txt">license</A>.
</P>
<H2>Table of contents</H2>
@@ -348,7 +350,7 @@ reconstruction.
</UL>
<HR>
-<ADDRESS>Xavier.Leroy@inria.fr</ADDRESS>
+<ADDRESS>xavier.leroy@college-de-france.fr</ADDRESS>
<HR>
</BODY>
diff --git a/driver/Clflags.ml b/driver/Clflags.ml
index 8286f4f3..eebc170a 100644
--- a/driver/Clflags.ml
+++ b/driver/Clflags.ml
@@ -111,3 +111,4 @@ let option_inline_auto_threshold = ref 0
let option_profile_arcs = ref false
let option_fbranch_probabilities = ref true
let option_debug_compcert = ref 0
+let main_function_name = ref "main"
diff --git a/driver/CommonOptions.ml b/driver/CommonOptions.ml
index c151ecf2..e8a6941c 100644
--- a/driver/CommonOptions.ml
+++ b/driver/CommonOptions.ml
@@ -15,8 +15,9 @@ open Commandline
(* The version string for [tool_name] *)
let version_string tool_name =
- if Version.buildnr <> "" && Version.tag <> "" then
- Printf.sprintf "The CompCert %s, Release: %s, Build: %s, Tag: %s\n" tool_name Version.version Version.buildnr Version.tag
+ if Version.buildnr <> "" && Version.tag <> "" && Version.branch <> "" then
+ Printf.sprintf "The CompCert %s, Release: %s, Build: %s, Tag: %s, Branch: %s\n"
+ tool_name Version.version Version.buildnr Version.tag Version.branch
else
Printf.sprintf "The CompCert %s, version %s\n" tool_name Version.version
@@ -26,7 +27,7 @@ let print_version_and_exit tool_name () =
let version_options tool_name =
[ Exact "-version", Unit (print_version_and_exit tool_name);
- Exact "--version", Unit (print_version_and_exit tool_name);]
+ Exact "--version", Unit (print_version_and_exit tool_name) ]
(* Language support options *)
@@ -76,6 +77,7 @@ let general_help =
-v Print external commands before invoking them
-timings Show the time spent in various compiler passes
-version Print the version string and exit
+ -version-file <file> Print version inforation to <file> and exit
-target <value> Generate code for the given target
-conf <file> Read configuration from file
@<file> Read command line options from <file>
@@ -86,4 +88,4 @@ let general_options =
Exact "-target", Ignore;(* Ignore option since it is already handled *)
Exact "-v", Set option_v;
Exact "-stdlib", String(fun s -> stdlib_path := s);
- Exact "-timings", Set option_timings;]
+ Exact "-timings", Set option_timings ]
diff --git a/driver/Driver.ml b/driver/Driver.ml
index 8ceb3a25..089cd423 100644
--- a/driver/Driver.ml
+++ b/driver/Driver.ml
@@ -263,17 +263,12 @@ Code generation options: (use -fno-<opt> to turn off -f<opt>)
-trace Have the interpreter produce a detailed trace of reductions
-random Randomize execution order
-all Simulate all possible execution orders
+ -main <name> Start executing at function <name> instead of main()
|}
let print_usage_and_exit () =
printf "%s" usage_string; exit 0
-let enforce_buildnr nr =
- let build = int_of_string Version.buildnr in
- if nr != build then
- fatal_error no_loc "Mismatching builds: This is CompCert build %d, but QSK requires build %d.\n\
-Please use matching builds of QSK and CompCert." build nr
-
let dump_mnemonics destfile =
let oc = open_out_bin destfile in
let pp = Format.formatter_of_out_channel oc in
@@ -320,10 +315,7 @@ let cmdline_actions =
@ version_options tool_name @
(* Enforcing CompCert build numbers for QSKs and mnemonics dump *)
(if Version.buildnr <> "" then
- [ Exact "-qsk-enforce-build", Integer enforce_buildnr;
- Exact "--qsk-enforce-build", Integer enforce_buildnr;
- Exact "-dump-mnemonics", String dump_mnemonics;
- ]
+ [Exact "-dump-mnemonics", String dump_mnemonics;]
else []) @
(* Processing options *)
[ Exact "-c", Set option_c;
@@ -409,7 +401,8 @@ let cmdline_actions =
Exact "-quiet", Unit (fun () -> Interp.trace := 0);
Exact "-trace", Unit (fun () -> Interp.trace := 2);
Exact "-random", Unit (fun () -> Interp.mode := Interp.Random);
- Exact "-all", Unit (fun () -> Interp.mode := Interp.All)
+ Exact "-all", Unit (fun () -> Interp.mode := Interp.All);
+ Exact "-main", String (fun s -> main_function_name := s)
]
(* Optimization options *)
(* -f options: come in -f and -fno- variants *)
@@ -497,6 +490,8 @@ let _ =
fatal_error no_loc "ambiguous '-o' option (multiple source files)";
if !num_input_files = 0 then
fatal_error no_loc "no input file";
+ if not !option_interp && !main_function_name <> "main" then
+ fatal_error no_loc "option '-main' requires option '-interp'";
let linker_args = time "Total compilation time" perform_actions () in
if not (nolink ()) && linker_args <> [] then begin
linker (output_filename_default "a.out") linker_args
diff --git a/driver/Frontend.ml b/driver/Frontend.ml
index 5db0040f..c99da945 100644
--- a/driver/Frontend.ml
+++ b/driver/Frontend.ml
@@ -75,6 +75,7 @@ let preprocess ifile ofile =
let parse_c_file sourcename ifile =
Debug.init_compile_unit sourcename;
Sections.initialize();
+ CPragmas.reset();
(* Simplification options *)
let simplifs =
"b" (* blocks: mandatory *)
diff --git a/driver/Interp.ml b/driver/Interp.ml
index d4286779..6c83e819 100644
--- a/driver/Interp.ml
+++ b/driver/Interp.ml
@@ -587,41 +587,60 @@ let world_program prog =
(* Massaging the program to get a suitable "main" function *)
-let change_main_function p old_main old_main_ty =
- let old_main = Evalof(Evar(old_main, old_main_ty), old_main_ty) in
+let change_main_function p new_main_fn =
+ let new_main_id = intern_string "%main%" in
+ { p with
+ Ctypes.prog_main = new_main_id;
+ Ctypes.prog_defs =
+ (new_main_id, Gfun(Internal new_main_fn)) :: p.Ctypes.prog_defs }
+
+let call_main3_function main_id main_ty =
+ let main_var = Evalof(Evar(main_id, main_ty), main_ty) in
let arg1 = Eval(Vint(coqint_of_camlint 0l), type_int32s) in
let arg2 = arg1 in
let body =
- Sreturn(Some(Ecall(old_main, Econs(arg1, Econs(arg2, Enil)), type_int32s))) in
- let new_main_fn =
- { fn_return = type_int32s; fn_callconv = cc_default;
- fn_params = []; fn_vars = []; fn_body = body } in
- let new_main_id = intern_string "___main" in
- { prog_main = new_main_id;
- Ctypes.prog_defs = (new_main_id, Gfun(Ctypes.Internal new_main_fn)) :: p.Ctypes.prog_defs;
- Ctypes.prog_public = p.Ctypes.prog_public;
- prog_types = p.prog_types;
- prog_comp_env = p.prog_comp_env }
+ Sreturn(Some(Ecall(main_var, Econs(arg1, Econs(arg2, Enil)), type_int32s)))
+ in
+ { fn_return = type_int32s; fn_callconv = cc_default;
+ fn_params = []; fn_vars = []; fn_body = body }
+
+let call_other_main_function main_id main_ty main_ty_res =
+ let main_var = Evalof(Evar(main_id, main_ty), main_ty) in
+ let body =
+ Ssequence(Sdo(Ecall(main_var, Enil, main_ty_res)),
+ Sreturn(Some(Eval(Vint(coqint_of_camlint 0l), type_int32s)))) in
+ { fn_return = type_int32s; fn_callconv = cc_default;
+ fn_params = []; fn_vars = []; fn_body = body }
let rec find_main_function name = function
| [] -> None
- | (id, Gfun fd) :: gdl -> if id = name then Some fd else find_main_function name gdl
- | (id, Gvar v) :: gdl -> find_main_function name gdl
+ | (id, Gfun fd) :: gdl ->
+ if id = name then Some fd else find_main_function name gdl
+ | (id, Gvar v) :: gdl ->
+ find_main_function name gdl
let fixup_main p =
match find_main_function p.Ctypes.prog_main p.Ctypes.prog_defs with
| None ->
- fprintf err_formatter "ERROR: no main() function@.";
+ fprintf err_formatter "ERROR: no entry function %s()@."
+ (extern_atom p.Ctypes.prog_main);
None
| Some main_fd ->
match type_of_fundef main_fd with
| Tfunction(Tnil, Ctypes.Tint(I32, Signed, _), _) ->
Some p
- | Tfunction(Tcons(Ctypes.Tint _, Tcons(Tpointer(Tpointer(Ctypes.Tint(I8,_,_),_),_), Tnil)),
+ | Tfunction(Tcons(Ctypes.Tint _,
+ Tcons(Tpointer(Tpointer(Ctypes.Tint(I8,_,_),_),_), Tnil)),
Ctypes.Tint _, _) as ty ->
- Some (change_main_function p p.Ctypes.prog_main ty)
+ Some (change_main_function p
+ (call_main3_function p.Ctypes.prog_main ty))
+ | Tfunction(Tnil, ty_res, _) as ty ->
+ Some (change_main_function p
+ (call_other_main_function p.Ctypes.prog_main ty ty_res))
| _ ->
- fprintf err_formatter "ERROR: wrong type for main() function@.";
+ fprintf err_formatter
+ "ERROR: wrong type for entry function %s()@."
+ (extern_atom p.Ctypes.prog_main);
None
(* Execution of a whole program *)
diff --git a/exportclight/Clightdefs.v b/exportclight/Clightdefs.v
index 83d82d88..8af920df 100644
--- a/exportclight/Clightdefs.v
+++ b/exportclight/Clightdefs.v
@@ -15,7 +15,7 @@
(** All imports and definitions used by .v Clight files generated by clightgen *)
-From Coq Require Import String List ZArith.
+From Coq Require Import Ascii String List ZArith.
From compcert Require Import Integers Floats Maps Errors AST Ctypes Cop Clight.
Definition tvoid := Tvoid.
@@ -80,3 +80,212 @@ Definition mkprogram (types: list composite_definition)
prog_types := types;
prog_comp_env := ce;
prog_comp_env_eq := EQ |}.
+
+(** The following encoding of character strings as positive numbers
+ must be kept consistent with the OCaml function [Camlcoq.pos_of_string]. *)
+
+Definition append_bit_pos (b: bool) (p: positive) : positive :=
+ if b then xI p else xO p.
+
+Definition append_char_pos_default (c: ascii) (p: positive) : positive :=
+ let '(Ascii b7 b6 b5 b4 b3 b2 b1 b0) := c in
+ xI (xI (xI (xI (xI (xI
+ (append_bit_pos b0 (append_bit_pos b1
+ (append_bit_pos b2 (append_bit_pos b3
+ (append_bit_pos b4 (append_bit_pos b5
+ (append_bit_pos b6 (append_bit_pos b7 p))))))))))))).
+
+Definition append_char_pos (c: ascii) (p: positive) : positive :=
+ match c with
+ | "0"%char => xO (xO (xO (xO (xO (xO p)))))
+ | "1"%char => xI (xO (xO (xO (xO (xO p)))))
+ | "2"%char => xO (xI (xO (xO (xO (xO p)))))
+ | "3"%char => xI (xI (xO (xO (xO (xO p)))))
+ | "4"%char => xO (xO (xI (xO (xO (xO p)))))
+ | "5"%char => xI (xO (xI (xO (xO (xO p)))))
+ | "6"%char => xO (xI (xI (xO (xO (xO p)))))
+ | "7"%char => xI (xI (xI (xO (xO (xO p)))))
+ | "8"%char => xO (xO (xO (xI (xO (xO p)))))
+ | "9"%char => xI (xO (xO (xI (xO (xO p)))))
+ | "a"%char => xO (xI (xO (xI (xO (xO p)))))
+ | "b"%char => xI (xI (xO (xI (xO (xO p)))))
+ | "c"%char => xO (xO (xI (xI (xO (xO p)))))
+ | "d"%char => xI (xO (xI (xI (xO (xO p)))))
+ | "e"%char => xO (xI (xI (xI (xO (xO p)))))
+ | "f"%char => xI (xI (xI (xI (xO (xO p)))))
+ | "g"%char => xO (xO (xO (xO (xI (xO p)))))
+ | "h"%char => xI (xO (xO (xO (xI (xO p)))))
+ | "i"%char => xO (xI (xO (xO (xI (xO p)))))
+ | "j"%char => xI (xI (xO (xO (xI (xO p)))))
+ | "k"%char => xO (xO (xI (xO (xI (xO p)))))
+ | "l"%char => xI (xO (xI (xO (xI (xO p)))))
+ | "m"%char => xO (xI (xI (xO (xI (xO p)))))
+ | "n"%char => xI (xI (xI (xO (xI (xO p)))))
+ | "o"%char => xO (xO (xO (xI (xI (xO p)))))
+ | "p"%char => xI (xO (xO (xI (xI (xO p)))))
+ | "q"%char => xO (xI (xO (xI (xI (xO p)))))
+ | "r"%char => xI (xI (xO (xI (xI (xO p)))))
+ | "s"%char => xO (xO (xI (xI (xI (xO p)))))
+ | "t"%char => xI (xO (xI (xI (xI (xO p)))))
+ | "u"%char => xO (xI (xI (xI (xI (xO p)))))
+ | "v"%char => xI (xI (xI (xI (xI (xO p)))))
+ | "w"%char => xO (xO (xO (xO (xO (xI p)))))
+ | "x"%char => xI (xO (xO (xO (xO (xI p)))))
+ | "y"%char => xO (xI (xO (xO (xO (xI p)))))
+ | "z"%char => xI (xI (xO (xO (xO (xI p)))))
+ | "A"%char => xO (xO (xI (xO (xO (xI p)))))
+ | "B"%char => xI (xO (xI (xO (xO (xI p)))))
+ | "C"%char => xO (xI (xI (xO (xO (xI p)))))
+ | "D"%char => xI (xI (xI (xO (xO (xI p)))))
+ | "E"%char => xO (xO (xO (xI (xO (xI p)))))
+ | "F"%char => xI (xO (xO (xI (xO (xI p)))))
+ | "G"%char => xO (xI (xO (xI (xO (xI p)))))
+ | "H"%char => xI (xI (xO (xI (xO (xI p)))))
+ | "I"%char => xO (xO (xI (xI (xO (xI p)))))
+ | "J"%char => xI (xO (xI (xI (xO (xI p)))))
+ | "K"%char => xO (xI (xI (xI (xO (xI p)))))
+ | "L"%char => xI (xI (xI (xI (xO (xI p)))))
+ | "M"%char => xO (xO (xO (xO (xI (xI p)))))
+ | "N"%char => xI (xO (xO (xO (xI (xI p)))))
+ | "O"%char => xO (xI (xO (xO (xI (xI p)))))
+ | "P"%char => xI (xI (xO (xO (xI (xI p)))))
+ | "Q"%char => xO (xO (xI (xO (xI (xI p)))))
+ | "R"%char => xI (xO (xI (xO (xI (xI p)))))
+ | "S"%char => xO (xI (xI (xO (xI (xI p)))))
+ | "T"%char => xI (xI (xI (xO (xI (xI p)))))
+ | "U"%char => xO (xO (xO (xI (xI (xI p)))))
+ | "V"%char => xI (xO (xO (xI (xI (xI p)))))
+ | "W"%char => xO (xI (xO (xI (xI (xI p)))))
+ | "X"%char => xI (xI (xO (xI (xI (xI p)))))
+ | "Y"%char => xO (xO (xI (xI (xI (xI p)))))
+ | "Z"%char => xI (xO (xI (xI (xI (xI p)))))
+ | "_"%char => xO (xI (xI (xI (xI (xI p)))))
+ | _ => append_char_pos_default c p
+ end.
+
+Fixpoint ident_of_string (s: string) : ident :=
+ match s with
+ | EmptyString => xH
+ | String c s => append_char_pos c (ident_of_string s)
+ end.
+
+(** A convenient notation [$ "ident"] to force evaluation of
+ [ident_of_string "ident"] *)
+
+Ltac ident_of_string s :=
+ let x := constr:(ident_of_string s) in
+ let y := eval compute in x in
+ exact y.
+
+Notation "$ s" := (ltac:(ident_of_string s))
+ (at level 1, only parsing) : string_scope.
+
+(** The inverse conversion, from encoded strings to strings *)
+
+Section DECODE_BITS.
+
+Variable rec: positive -> string.
+
+Fixpoint decode_n_bits (n: nat) (l: list bool) (p: positive) : string :=
+ match n with
+ | O =>
+ match l with
+ | b7 :: b6 :: b5 :: b4 :: b3 :: b2 :: b1 :: b0 :: _ =>
+ String (Ascii b7 b6 b5 b4 b3 b2 b1 b0) (rec p)
+ | _ => EmptyString
+ end
+ | S n =>
+ match p with
+ | xO q => decode_n_bits n (false :: l) q
+ | xI q => decode_n_bits n (true :: l) q
+ | xH => EmptyString
+ end
+ end.
+
+Definition decode_8_bits := Eval compute in (decode_n_bits 8%nat nil).
+
+End DECODE_BITS.
+
+Fixpoint string_of_ident (p: positive) : string :=
+ match p with
+ | xO (xO (xO (xO (xO (xO p))))) => String "0"%char (string_of_ident p)
+ | xI (xO (xO (xO (xO (xO p))))) => String "1"%char (string_of_ident p)
+ | xO (xI (xO (xO (xO (xO p))))) => String "2"%char (string_of_ident p)
+ | xI (xI (xO (xO (xO (xO p))))) => String "3"%char (string_of_ident p)
+ | xO (xO (xI (xO (xO (xO p))))) => String "4"%char (string_of_ident p)
+ | xI (xO (xI (xO (xO (xO p))))) => String "5"%char (string_of_ident p)
+ | xO (xI (xI (xO (xO (xO p))))) => String "6"%char (string_of_ident p)
+ | xI (xI (xI (xO (xO (xO p))))) => String "7"%char (string_of_ident p)
+ | xO (xO (xO (xI (xO (xO p))))) => String "8"%char (string_of_ident p)
+ | xI (xO (xO (xI (xO (xO p))))) => String "9"%char (string_of_ident p)
+ | xO (xI (xO (xI (xO (xO p))))) => String "a"%char (string_of_ident p)
+ | xI (xI (xO (xI (xO (xO p))))) => String "b"%char (string_of_ident p)
+ | xO (xO (xI (xI (xO (xO p))))) => String "c"%char (string_of_ident p)
+ | xI (xO (xI (xI (xO (xO p))))) => String "d"%char (string_of_ident p)
+ | xO (xI (xI (xI (xO (xO p))))) => String "e"%char (string_of_ident p)
+ | xI (xI (xI (xI (xO (xO p))))) => String "f"%char (string_of_ident p)
+ | xO (xO (xO (xO (xI (xO p))))) => String "g"%char (string_of_ident p)
+ | xI (xO (xO (xO (xI (xO p))))) => String "h"%char (string_of_ident p)
+ | xO (xI (xO (xO (xI (xO p))))) => String "i"%char (string_of_ident p)
+ | xI (xI (xO (xO (xI (xO p))))) => String "j"%char (string_of_ident p)
+ | xO (xO (xI (xO (xI (xO p))))) => String "k"%char (string_of_ident p)
+ | xI (xO (xI (xO (xI (xO p))))) => String "l"%char (string_of_ident p)
+ | xO (xI (xI (xO (xI (xO p))))) => String "m"%char (string_of_ident p)
+ | xI (xI (xI (xO (xI (xO p))))) => String "n"%char (string_of_ident p)
+ | xO (xO (xO (xI (xI (xO p))))) => String "o"%char (string_of_ident p)
+ | xI (xO (xO (xI (xI (xO p))))) => String "p"%char (string_of_ident p)
+ | xO (xI (xO (xI (xI (xO p))))) => String "q"%char (string_of_ident p)
+ | xI (xI (xO (xI (xI (xO p))))) => String "r"%char (string_of_ident p)
+ | xO (xO (xI (xI (xI (xO p))))) => String "s"%char (string_of_ident p)
+ | xI (xO (xI (xI (xI (xO p))))) => String "t"%char (string_of_ident p)
+ | xO (xI (xI (xI (xI (xO p))))) => String "u"%char (string_of_ident p)
+ | xI (xI (xI (xI (xI (xO p))))) => String "v"%char (string_of_ident p)
+ | xO (xO (xO (xO (xO (xI p))))) => String "w"%char (string_of_ident p)
+ | xI (xO (xO (xO (xO (xI p))))) => String "x"%char (string_of_ident p)
+ | xO (xI (xO (xO (xO (xI p))))) => String "y"%char (string_of_ident p)
+ | xI (xI (xO (xO (xO (xI p))))) => String "z"%char (string_of_ident p)
+ | xO (xO (xI (xO (xO (xI p))))) => String "A"%char (string_of_ident p)
+ | xI (xO (xI (xO (xO (xI p))))) => String "B"%char (string_of_ident p)
+ | xO (xI (xI (xO (xO (xI p))))) => String "C"%char (string_of_ident p)
+ | xI (xI (xI (xO (xO (xI p))))) => String "D"%char (string_of_ident p)
+ | xO (xO (xO (xI (xO (xI p))))) => String "E"%char (string_of_ident p)
+ | xI (xO (xO (xI (xO (xI p))))) => String "F"%char (string_of_ident p)
+ | xO (xI (xO (xI (xO (xI p))))) => String "G"%char (string_of_ident p)
+ | xI (xI (xO (xI (xO (xI p))))) => String "H"%char (string_of_ident p)
+ | xO (xO (xI (xI (xO (xI p))))) => String "I"%char (string_of_ident p)
+ | xI (xO (xI (xI (xO (xI p))))) => String "J"%char (string_of_ident p)
+ | xO (xI (xI (xI (xO (xI p))))) => String "K"%char (string_of_ident p)
+ | xI (xI (xI (xI (xO (xI p))))) => String "L"%char (string_of_ident p)
+ | xO (xO (xO (xO (xI (xI p))))) => String "M"%char (string_of_ident p)
+ | xI (xO (xO (xO (xI (xI p))))) => String "N"%char (string_of_ident p)
+ | xO (xI (xO (xO (xI (xI p))))) => String "O"%char (string_of_ident p)
+ | xI (xI (xO (xO (xI (xI p))))) => String "P"%char (string_of_ident p)
+ | xO (xO (xI (xO (xI (xI p))))) => String "Q"%char (string_of_ident p)
+ | xI (xO (xI (xO (xI (xI p))))) => String "R"%char (string_of_ident p)
+ | xO (xI (xI (xO (xI (xI p))))) => String "S"%char (string_of_ident p)
+ | xI (xI (xI (xO (xI (xI p))))) => String "T"%char (string_of_ident p)
+ | xO (xO (xO (xI (xI (xI p))))) => String "U"%char (string_of_ident p)
+ | xI (xO (xO (xI (xI (xI p))))) => String "V"%char (string_of_ident p)
+ | xO (xI (xO (xI (xI (xI p))))) => String "W"%char (string_of_ident p)
+ | xI (xI (xO (xI (xI (xI p))))) => String "X"%char (string_of_ident p)
+ | xO (xO (xI (xI (xI (xI p))))) => String "Y"%char (string_of_ident p)
+ | xI (xO (xI (xI (xI (xI p))))) => String "Z"%char (string_of_ident p)
+ | xO (xI (xI (xI (xI (xI p))))) => String "_"%char (string_of_ident p)
+ | xI (xI (xI (xI (xI (xI p))))) => decode_8_bits string_of_ident p
+ | _ => EmptyString
+ end.
+
+Lemma string_of_ident_of_string:
+ forall s, string_of_ident (ident_of_string s) = s.
+Proof.
+ induction s as [ | c s]; simpl.
+- auto.
+- rewrite <- IHs at 2. destruct c as [[] [] [] [] [] [] [] []]; reflexivity.
+Qed.
+
+Corollary ident_of_string_injective:
+ forall s1 s2, ident_of_string s1 = ident_of_string s2 -> s1 = s2.
+Proof.
+ intros. rewrite <- (string_of_ident_of_string s1), <- (string_of_ident_of_string s2).
+ congruence.
+Qed.
diff --git a/exportclight/Clightgen.ml b/exportclight/Clightgen.ml
index f7279a5e..5e27370e 100644
--- a/exportclight/Clightgen.ml
+++ b/exportclight/Clightgen.ml
@@ -91,13 +91,15 @@ let process_i_file sourcename =
compile_c_file sourcename sourcename ofile
let usage_string =
- version_string tool_name^
+ version_string tool_name ^
{|Usage: clightgen [options] <source files>
Recognized source files:
.c C source file
.i or .p C source file that should not be preprocessed
Processing options:
-normalize Normalize the generated Clight code w.r.t. loads in expressions
+ -canonical-idents Use canonical numbers to represent identifiers (default)
+ -short-idents Use small, non-canonical numbers to represent identifiers
-E Preprocess only, send result to standard output
-o <file> Generate output in <file>
|} ^
@@ -142,6 +144,8 @@ let cmdline_actions =
(* Processing options *)
[ Exact "-E", Set option_E;
Exact "-normalize", Set option_normalize;
+ Exact "-canonical-idents", Set Camlcoq.use_canonical_atoms;
+ Exact "-short-idents", Unset Camlcoq.use_canonical_atoms;
Exact "-o", String(fun s -> option_o := Some s);
Prefix "-o", Self (fun s -> let s = String.sub s 2 ((String.length s) - 2) in
option_o := Some s);]
@@ -175,12 +179,13 @@ let cmdline_actions =
]
let _ =
- try
+try
Gc.set { (Gc.get()) with
Gc.minor_heap_size = 524288; (* 512k *)
Gc.major_heap_increment = 4194304 (* 4M *)
};
Printexc.record_backtrace true;
+ Camlcoq.use_canonical_atoms := true;
Frontend.init ();
parse_cmdline cmdline_actions;
if !option_o <> None && !num_input_files >= 2 then
@@ -188,7 +193,7 @@ let _ =
if !num_input_files = 0 then
fatal_error no_loc "no input file";
perform_actions ()
- with
+with
| Sys_error msg
| CmdError msg -> error no_loc "%s" msg; exit 2
| Abort -> exit 2
diff --git a/exportclight/Clightnorm.ml b/exportclight/Clightnorm.ml
index a0001250..a6158b60 100644
--- a/exportclight/Clightnorm.ml
+++ b/exportclight/Clightnorm.ml
@@ -143,7 +143,18 @@ and norm_lbl_stmt ls =
| LSnil -> LSnil
| LScons(n, s, ls) -> LScons(n, norm_stmt s, norm_lbl_stmt ls)
-let next_var curr (v, _) = if P.lt v curr then curr else P.succ v
+(* In "canonical atoms" mode, temporaries are between 2^7 and 2^12 - 1.
+ Below 2^7 are single-letter identifiers and above 2^12 are all
+ other identifiers. *)
+
+let first_temp = P.of_int 128
+let last_temp = P.of_int 4095
+
+let next_var curr (v, _) =
+ if P.lt v curr
+ || !use_canonical_atoms && (P.lt v first_temp || P.gt v last_temp)
+ then curr
+ else P.succ v
let next_var_list vars start = List.fold_left next_var start vars
diff --git a/exportclight/ExportClight.ml b/exportclight/ExportClight.ml
index c9d6fced..4ff901eb 100644
--- a/exportclight/ExportClight.ml
+++ b/exportclight/ExportClight.ml
@@ -43,6 +43,48 @@ let print_list fn p l =
in plist l;
fprintf p ")@]"
+(* Numbers *)
+
+let coqint p n =
+ let n = camlint_of_coqint n in
+ if n >= 0l
+ then fprintf p "(Int.repr %ld)" n
+ else fprintf p "(Int.repr (%ld))" n
+
+let coqptrofs p n =
+ let s = Z.to_string n in
+ if Z.ge n Z.zero
+ then fprintf p "(Ptrofs.repr %s)" s
+ else fprintf p "(Ptrofs.repr (%s))" s
+
+let coqint64 p n =
+ let n = camlint64_of_coqint n in
+ if n >= 0L
+ then fprintf p "(Int64.repr %Ld)" n
+ else fprintf p "(Int64.repr (%Ld))" n
+
+let coqfloat p n =
+ fprintf p "(Float.of_bits %a)" coqint64 (Floats.Float.to_bits n)
+
+let coqsingle p n =
+ fprintf p "(Float32.of_bits %a)" coqint (Floats.Float32.to_bits n)
+
+let positive p n =
+ fprintf p "%s%%positive" (Z.to_string (Z.Zpos n))
+
+let coqN p n =
+ fprintf p "%s%%N" (Z.to_string (Z.of_N n))
+
+let coqZ p n =
+ if Z.ge n Z.zero
+ then fprintf p "%s" (Z.to_string n)
+ else fprintf p "(%s)" (Z.to_string n)
+
+(* Coq strings *)
+
+let coqstring p s =
+ fprintf p "\"%s\"" (camlstring_of_coqstring s)
+
(* Identifiers *)
exception Not_an_identifier
@@ -69,7 +111,7 @@ let ident p id =
let s = Hashtbl.find temp_names id in
fprintf p "%s" s
with Not_found ->
- fprintf p "%ld%%positive" (P.to_int32 id)
+ positive p id
let iter_hashtbl_sorted (h: ('a, string) Hashtbl.t) (f: 'a * string -> unit) =
List.iter f
@@ -81,65 +123,33 @@ let define_idents p =
string_of_atom
(fun (id, name) ->
try
- fprintf p "Definition _%s : ident := %ld%%positive.@ "
- (sanitize name) (P.to_int32 id)
+ if !use_canonical_atoms && id = pos_of_string name then
+ fprintf p "Definition _%s : ident := $\"%s\".@ "
+ (sanitize name) name
+ else
+ fprintf p "Definition _%s : ident := %a.@ "
+ (sanitize name) positive id
with Not_an_identifier ->
());
iter_hashtbl_sorted
temp_names
(fun (id, name) ->
- fprintf p "Definition %s : ident := %ld%%positive.@ "
- name (P.to_int32 id));
+ fprintf p "Definition %s : ident := %a.@ "
+ name positive id);
fprintf p "@ "
let name_temporary t =
- let t1 = P.to_int t and t0 = P.to_int (first_unused_ident ()) in
- if t1 >= t0 && not (Hashtbl.mem temp_names t)
- then Hashtbl.add temp_names t (sprintf "_t'%d" (t1 - t0 + 1))
+ if not (Hashtbl.mem string_of_atom t) && not (Hashtbl.mem temp_names t)
+ then begin
+ let t0 = first_unused_ident () in
+ let d = Z.succ (Z.sub (Z.Zpos t) (Z.Zpos t0)) in
+ Hashtbl.add temp_names t ("_t'" ^ Z.to_string d)
+ end
let name_opt_temporary = function
| None -> ()
| Some id -> name_temporary id
-(* Numbers *)
-
-let coqint p n =
- let n = camlint_of_coqint n in
- if n >= 0l
- then fprintf p "(Int.repr %ld)" n
- else fprintf p "(Int.repr (%ld))" n
-
-let coqptrofs p n =
- let s = Z.to_string n in
- if Z.ge n Z.zero
- then fprintf p "(Ptrofs.repr %s)" s
- else fprintf p "(Ptrofs.repr (%s))" s
-
-let coqint64 p n =
- let n = camlint64_of_coqint n in
- if n >= 0L
- then fprintf p "(Int64.repr %Ld)" n
- else fprintf p "(Int64.repr (%Ld))" n
-
-let coqfloat p n =
- fprintf p "(Float.of_bits %a)" coqint64 (Floats.Float.to_bits n)
-
-let coqsingle p n =
- fprintf p "(Float32.of_bits %a)" coqint (Floats.Float32.to_bits n)
-
-let coqN p n =
- fprintf p "%ld%%N" (N.to_int32 n)
-
-let coqZ p n =
- if Z.ge n Z.zero
- then fprintf p "%s" (Z.to_string n)
- else fprintf p "(%s)" (Z.to_string n)
-
-(* Coq strings *)
-
-let coqstring p s =
- fprintf p "\"%s\"" (camlstring_of_coqstring s)
-
(* Raw attributes *)
let attribute p a =
@@ -247,8 +257,6 @@ let signatur p sg =
astrettype sg.sig_res
callconv sg.sig_cc
-let assertions = ref ([]: (string * typ list) list)
-
let external_function p = function
| EF_external(name, sg) ->
fprintf p "@[<hov 2>(EF_external %a@ %a)@]" coqstring name signatur sg
@@ -264,14 +272,15 @@ let external_function p = function
| EF_free -> fprintf p "EF_free"
| EF_memcpy(sz, al) ->
fprintf p "(EF_memcpy %ld %ld)" (Z.to_int32 sz) (Z.to_int32 al)
- | EF_annot(kind,text, targs) ->
- assertions := (camlstring_of_coqstring text, targs) :: !assertions;
- fprintf p "(EF_annot %a %a)" coqstring text (print_list asttype) targs
- | EF_annot_val(kind,text, targ) ->
- assertions := (camlstring_of_coqstring text, [targ]) :: !assertions;
- fprintf p "(EF_annot_val %a %a)" coqstring text asttype targ
+ | EF_annot(kind, text, targs) ->
+ fprintf p "(EF_annot %a %a %a)"
+ positive kind coqstring text (print_list asttype) targs
+ | EF_annot_val(kind, text, targ) ->
+ fprintf p "(EF_annot_val %a %a %a)"
+ positive kind coqstring text asttype targ
| EF_debug(kind, text, targs) ->
- fprintf p "(EF_debug %ld%%positive %ld%%positive %a)" (P.to_int32 kind) (P.to_int32 text) (print_list asttype) targs
+ fprintf p "(EF_debug %a %a %a)"
+ positive kind positive text (print_list asttype) targs
| EF_inline_asm(text, sg, clob) ->
fprintf p "@[<hov 2>(EF_inline_asm %a@ %a@ %a)@]"
coqstring text
@@ -441,61 +450,13 @@ let print_composite_definition p (Composite(id, su, m, a)) =
(print_list (print_pair ident typ)) m
attribute a
-(* Assertion processing *)
-
-let re_annot_param = Str.regexp "%%\\|%[1-9][0-9]*"
-
-type fragment = Text of string | Param of int
-
-(* For compatibility with OCaml < 4.00 *)
-let list_iteri f l =
- let rec iteri i = function
- | [] -> ()
- | a::l -> f i a; iteri (i + 1) l
- in iteri 0 l
-
-let print_assertion p (txt, targs) =
- let frags =
- List.map
- (function
- | Str.Text s -> Text s
- | Str.Delim "%%" -> Text "%"
- | Str.Delim s -> Param(int_of_string(String.sub s 1 (String.length s - 1))))
- (Str.full_split re_annot_param txt) in
- let max_param = ref 0 in
- List.iter
- (function
- | Text _ -> ()
- | Param n -> max_param := max n !max_param)
- frags;
- fprintf p " | \"%s\"%%string, " txt;
- list_iteri
- (fun i targ -> fprintf p "_x%d :: " (i + 1))
- targs;
- fprintf p "nil =>@ ";
- fprintf p " ";
- List.iter
- (function
- | Text s -> fprintf p "%s" s
- | Param n -> fprintf p "_x%d" n)
- frags;
- fprintf p "@ "
-
-let print_assertions p =
- if !assertions <> [] then begin
- fprintf p "Definition assertions (txt: string) args : Prop :=@ ";
- fprintf p " match txt, args with@ ";
- List.iter (print_assertion p) !assertions;
- fprintf p " | _, _ => False@ ";
- fprintf p " end.@ @ "
- end
-
(* The prologue *)
let prologue = "\
From Coq Require Import String List ZArith.\n\
From compcert Require Import Coqlib Integers Floats AST Ctypes Cop Clight Clightdefs.\n\
-Local Open Scope Z_scope.\n"
+Local Open Scope Z_scope.\n\
+Local Open Scope string_scope.\n"
(* Naming the compiler-generated temporaries occurring in the program *)
@@ -554,15 +515,16 @@ let name_program p =
let print_clightgen_info p sourcefile normalized =
fprintf p "@[<v 2>Module Info.";
- fprintf p "@ Definition version := %S%%string." Version.version;
- fprintf p "@ Definition build_number := %S%%string." Version.buildnr;
- fprintf p "@ Definition build_tag := %S%%string." Version.tag;
- fprintf p "@ Definition arch := %S%%string." Configuration.arch;
- fprintf p "@ Definition model := %S%%string." Configuration.model;
- fprintf p "@ Definition abi := %S%%string." Configuration.abi;
+ fprintf p "@ Definition version := %S." Version.version;
+ fprintf p "@ Definition build_number := %S." Version.buildnr;
+ fprintf p "@ Definition build_tag := %S." Version.tag;
+ fprintf p "@ Definition build_branch := %S." Version.branch;
+ fprintf p "@ Definition arch := %S." Configuration.arch;
+ fprintf p "@ Definition model := %S." Configuration.model;
+ fprintf p "@ Definition abi := %S." Configuration.abi;
fprintf p "@ Definition bitsize := %d." (if Archi.ptr64 then 64 else 32);
fprintf p "@ Definition big_endian := %B." Archi.big_endian;
- fprintf p "@ Definition source_file := %S%%string." sourcefile;
+ fprintf p "@ Definition source_file := %S." sourcefile;
fprintf p "@ Definition normalized := %B." normalized;
fprintf p "@]@ End Info.@ @ "
@@ -588,5 +550,4 @@ let print_program p prog sourcefile normalized =
fprintf p "Definition prog : Clight.program := @ ";
fprintf p " mkprogram composites global_definitions public_idents %a Logic.I.@ @ "
ident prog.Ctypes.prog_main;
- print_assertions p;
fprintf p "@]@."
diff --git a/kvx/Asm.v b/kvx/Asm.v
index 515e13e0..fd20316c 100644
--- a/kvx/Asm.v
+++ b/kvx/Asm.v
@@ -35,12 +35,14 @@ Require Import Smallstep.
Require Import Locations.
Require Stacklayout.
Require Import Conventions.
-Require Import Asmvliw.
+Require Export Asmvliw.
Require Import Linking.
Require Import Errors.
(** Definitions for OCaml code *)
Definition label := positive.
+
+(* Necessary definition for Asmexpandaux.mli *)
Definition preg := preg.
Inductive addressing : Type :=
@@ -102,6 +104,9 @@ Inductive instruction : Type :=
| Palclrd (dst: ireg) (addr: ireg)
| Palclrw (dst: ireg) (addr: ireg)
| Pclzll (rd rs: ireg)
+ | Pclzw (rd rs: ireg)
+ | Pctzll (rd rs: ireg)
+ | Pctzw (rd rs: ireg)
| Pstsud (rd rs1 rs2: ireg)
(** Loads *)
diff --git a/kvx/Asmblockgen.v b/kvx/Asmblockgen.v
index 7167cebe..e218f4ef 100644
--- a/kvx/Asmblockgen.v
+++ b/kvx/Asmblockgen.v
@@ -19,7 +19,7 @@
Require Archi.
Require Import Coqlib Errors.
Require Import AST Integers Floats Memdata.
-Require Import Op Locations Machblock Asmblock.
+Require Import Op Locations Machblock Asmvliw Asmblock.
Require ExtValues.
Require Import Chunks.
@@ -36,12 +36,6 @@ Import PArithCoercions.
(** Extracting integer or float registers. *)
-Definition ireg_of (r: mreg) : res ireg :=
- match preg_of r with IR mr => OK mr | _ => Error(msg "Asmgenblock.ireg_of") end.
-
-Definition freg_of (r: mreg) : res freg :=
- match preg_of r with IR mr => OK mr | _ => Error(msg "Asmgenblock.freg_of") end.
-
Inductive immed32 : Type :=
| Imm32_single (imm: int).
diff --git a/kvx/Asmexpand.ml b/kvx/Asmexpand.ml
index 5d4fd2f5..1e76a355 100644
--- a/kvx/Asmexpand.ml
+++ b/kvx/Asmexpand.ml
@@ -359,7 +359,7 @@ let expand_bswap32 d s = let open Asmvliw in
emit (Psrliw(GPR32, s, _8)); emit Psemi;
emit (Pandiw(GPR32, GPR32, coqint_of_camlint 0xFFl)); emit Psemi;
emit (Pslliw(GPR32, GPR32, _16)); emit Psemi;
- emit (Porw(GPR16, GPR16, GPR31)); emit Psemi;
+ emit (Porw(GPR16, GPR16, GPR32)); emit Psemi;
emit (Psrliw(GPR32, s, _16)); emit Psemi;
emit (Pandiw(GPR32, GPR32, coqint_of_camlint 0xFFl)); emit Psemi;
emit (Pslliw(GPR32, GPR32, _8)); emit Psemi;
@@ -399,8 +399,14 @@ let expand_builtin_inline name args res = let open Asmvliw in
(* Vararg stuff *)
| "__builtin_va_start", [BA(IR a)], _ ->
expand_builtin_va_start a
+ | "__builtin_kvx_clzw", [BA(IR a)], BR(IR res) ->
+ emit (Pclzw(res, a))
| "__builtin_clzll", [BA(IR a)], BR(IR res) ->
emit (Pclzll(res, a))
+ | "__builtin_kvx_ctzw", [BA(IR a)], BR(IR res) ->
+ emit (Pctzw(res, a))
+ | "__builtin_ctzll", [BA(IR a)], BR(IR res) ->
+ emit (Pctzll(res, a))
| "__builtin_kvx_stsud", [BA(IR a1); BA(IR a2)], BR(IR res) ->
emit (Pstsud(res, a1, a2))
| "__builtin_kvx_get", [BA_int(n)], BR(IR res) ->
diff --git a/kvx/Asmvliw.v b/kvx/Asmvliw.v
index 66b468d7..91d119bf 100644
--- a/kvx/Asmvliw.v
+++ b/kvx/Asmvliw.v
@@ -163,6 +163,30 @@ Module PregEq.
Definition eq := preg_eq.
End PregEq.
+(* FIXME - R16 and R32 are excluded *)
+Definition preg_of (r: mreg) : preg :=
+ match r with
+ | R0 => GPR0 | R1 => GPR1 | R2 => GPR2 | R3 => GPR3 | R4 => GPR4
+ | R5 => GPR5 | R6 => GPR6 | R7 => GPR7 | R8 => GPR8 | R9 => GPR9
+ | R10 => GPR10 | R11 => GPR11 (* | R12 => GPR12 | R13 => GPR13 | R14 => GPR14 *)
+ | R15 => GPR15 (* | R16 => GPR16 *) | R17 => GPR17 | R18 => GPR18 | R19 => GPR19
+ | R20 => GPR20 | R21 => GPR21 | R22 => GPR22 | R23 => GPR23 | R24 => GPR24
+ | R25 => GPR25 | R26 => GPR26 | R27 => GPR27 | R28 => GPR28 | R29 => GPR29
+ | R30 => GPR30 | R31 => GPR31 (* | R32 => GPR32 *) | R33 => GPR33 | R34 => GPR34
+ | R35 => GPR35 | R36 => GPR36 | R37 => GPR37 | R38 => GPR38 | R39 => GPR39
+ | R40 => GPR40 | R41 => GPR41 | R42 => GPR42 | R43 => GPR43 | R44 => GPR44
+ | R45 => GPR45 | R46 => GPR46 | R47 => GPR47 | R48 => GPR48 | R49 => GPR49
+ | R50 => GPR50 | R51 => GPR51 | R52 => GPR52 | R53 => GPR53 | R54 => GPR54
+ | R55 => GPR55 | R56 => GPR56 | R57 => GPR57 | R58 => GPR58 | R59 => GPR59
+ | R60 => GPR60 | R61 => GPR61 | R62 => GPR62 | R63 => GPR63
+ end.
+
+Definition ireg_of (r: mreg) : res ireg :=
+ match preg_of r with IR mr => OK mr | _ => Error(msg "Asmgenblock.ireg_of") end.
+
+Definition freg_of (r: mreg) : res freg :=
+ match preg_of r with IR mr => OK mr | _ => Error(msg "Asmgenblock.freg_of") end.
+
Module Pregmap := EMap(PregEq).
(** ** Conventional names for stack pointer ([SP]), return address ([RA]), frame pointer ([FP]) and other temporaries used *)
@@ -1548,24 +1572,6 @@ Definition det_parexec (f: function) (bundle: bblock) (rs: regset) (m: mem) rs'
code. *)
-(* FIXME - R16 and R32 are excluded *)
-Definition preg_of (r: mreg) : preg :=
- match r with
- | R0 => GPR0 | R1 => GPR1 | R2 => GPR2 | R3 => GPR3 | R4 => GPR4
- | R5 => GPR5 | R6 => GPR6 | R7 => GPR7 | R8 => GPR8 | R9 => GPR9
- | R10 => GPR10 | R11 => GPR11 (* | R12 => GPR12 | R13 => GPR13 | R14 => GPR14 *)
- | R15 => GPR15 (* | R16 => GPR16 *) | R17 => GPR17 | R18 => GPR18 | R19 => GPR19
- | R20 => GPR20 | R21 => GPR21 | R22 => GPR22 | R23 => GPR23 | R24 => GPR24
- | R25 => GPR25 | R26 => GPR26 | R27 => GPR27 | R28 => GPR28 | R29 => GPR29
- | R30 => GPR30 | R31 => GPR31 (* | R32 => GPR32 *) | R33 => GPR33 | R34 => GPR34
- | R35 => GPR35 | R36 => GPR36 | R37 => GPR37 | R38 => GPR38 | R39 => GPR39
- | R40 => GPR40 | R41 => GPR41 | R42 => GPR42 | R43 => GPR43 | R44 => GPR44
- | R45 => GPR45 | R46 => GPR46 | R47 => GPR47 | R48 => GPR48 | R49 => GPR49
- | R50 => GPR50 | R51 => GPR51 | R52 => GPR52 | R53 => GPR53 | R54 => GPR54
- | R55 => GPR55 | R56 => GPR56 | R57 => GPR57 | R58 => GPR58 | R59 => GPR59
- | R60 => GPR60 | R61 => GPR61 | R62 => GPR62 | R63 => GPR63
- end.
-
(** **** Undefine all registers except SP and callee-save registers *)
Definition undef_caller_save_regs (rs: regset) : regset :=
diff --git a/kvx/Builtins1.v b/kvx/Builtins1.v
index eeb578d0..441345bf 100644
--- a/kvx/Builtins1.v
+++ b/kvx/Builtins1.v
@@ -24,7 +24,6 @@ Inductive platform_builtin : Type :=
| BI_fmax
| BI_fminf
| BI_fmaxf
-| BI_fabsf
| BI_fma
| BI_fmaf.
@@ -35,7 +34,6 @@ Definition platform_builtin_table : list (string * platform_builtin) :=
:: ("__builtin_fmax", BI_fmax)
:: ("__builtin_fminf", BI_fminf)
:: ("__builtin_fmaxf", BI_fmaxf)
- :: ("__builtin_fabsf", BI_fabsf)
:: ("__builtin_fma", BI_fma)
:: ("__builtin_fmaf", BI_fmaf)
:: nil.
@@ -46,8 +44,6 @@ Definition platform_builtin_sig (b: platform_builtin) : signature :=
mksignature (Tfloat :: Tfloat :: nil) Tfloat cc_default
| BI_fminf | BI_fmaxf =>
mksignature (Tsingle :: Tsingle :: nil) Tsingle cc_default
- | BI_fabsf =>
- mksignature (Tsingle :: nil) Tsingle cc_default
| BI_fma =>
mksignature (Tfloat :: Tfloat :: Tfloat :: nil) Tfloat cc_default
| BI_fmaf =>
@@ -60,7 +56,6 @@ Definition platform_builtin_sem (b: platform_builtin) : builtin_sem (sig_res (pl
| BI_fmax => mkbuiltin_n2t Tfloat Tfloat Tfloat ExtFloat.max
| BI_fminf => mkbuiltin_n2t Tsingle Tsingle Tsingle ExtFloat32.min
| BI_fmaxf => mkbuiltin_n2t Tsingle Tsingle Tsingle ExtFloat32.max
- | BI_fabsf => mkbuiltin_n1t Tsingle Tsingle Float32.abs
| BI_fma => mkbuiltin_n3t Tfloat Tfloat Tfloat Tfloat Float.fma
| BI_fmaf => mkbuiltin_n3t Tsingle Tsingle Tsingle Tsingle Float32.fma
end.
diff --git a/kvx/CBuiltins.ml b/kvx/CBuiltins.ml
index fa2f4c60..7398e0f4 100644
--- a/kvx/CBuiltins.ml
+++ b/kvx/CBuiltins.ml
@@ -73,8 +73,10 @@ let builtins = {
(* "__builtin_kvx_cbs", (TInt(IInt, []), [TInt(IUInt, [])], false); *)
(* "__builtin_kvx_cbsdl", (TInt(ILongLong, []), [TInt(IULongLong, [])], false); *)
(* "__builtin_kvx_clz", (TInt(IInt, []), [TInt(IUInt, [])], false); *)
- "__builtin_clzw", (TInt(IInt, []), [TInt(IUInt, [])], false);
+ "__builtin_kvx_clzw", (TInt(IInt, []), [TInt(IUInt, [])], false);
"__builtin_clzll", (TInt(ILongLong, []), [TInt(IULongLong, [])], false);
+ "__builtin_kvx_ctzw", (TInt(IInt, []), [TInt(IUInt, [])], false);
+ "__builtin_ctzll", (TInt(ILongLong, []), [TInt(IULongLong, [])], false);
(* "__builtin_kvx_clzdl", (TInt(ILongLong, []), [TInt(IULongLong, [])], false); *)
(* "__builtin_kvx_cmove", (TInt(IInt, []), [TInt(IInt, []); TInt(IInt, []); TInt(IInt, [])], false); *)
(* "__builtin_kvx_ctz", (TInt(IInt, []), [TInt(IUInt, [])], false); *)
diff --git a/kvx/Machregsaux.ml b/kvx/Machregsaux.ml
index 76956959..e3b18181 100644
--- a/kvx/Machregsaux.ml
+++ b/kvx/Machregsaux.ml
@@ -27,14 +27,6 @@ let _ =
let is_scratch_register r = false
-let name_of_register r =
- try Some (Hashtbl.find register_names r) with Not_found -> None
-
-let register_by_name s =
- Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s)
-
-let can_reserve_register r = Conventions1.is_callee_save r
-
let class_of_type = function
| AST.Tint | AST.Tlong
| AST.Tfloat | AST.Tsingle -> 0
diff --git a/kvx/Machregsaux.mli b/kvx/Machregsaux.mli
index d7117c21..01b0f9fd 100644
--- a/kvx/Machregsaux.mli
+++ b/kvx/Machregsaux.mli
@@ -12,9 +12,6 @@
(** Auxiliary functions on machine registers *)
-val name_of_register: Machregs.mreg -> string option
-val register_by_name: string -> Machregs.mreg option
val is_scratch_register: string -> bool
-val can_reserve_register: Machregs.mreg -> bool
val class_of_type: AST.typ -> int
diff --git a/kvx/SelectOp.vp b/kvx/SelectOp.vp
index 65dba3ac..aa241c1e 100644
--- a/kvx/SelectOp.vp
+++ b/kvx/SelectOp.vp
@@ -704,7 +704,6 @@ Definition platform_builtin (b: platform_builtin) (args: exprlist) : option expr
| BI_fmax => Some (Eop Omaxf args)
| BI_fminf => Some (Eop Ominfs args)
| BI_fmaxf => Some (Eop Omaxfs args)
- | BI_fabsf => Some (Eop Oabsfs args)
| BI_fma => gen_fma args
| BI_fmaf => gen_fmaf args
end.
diff --git a/kvx/TargetPrinter.ml b/kvx/TargetPrinter.ml
index dfafc137..5b6230ca 100644
--- a/kvx/TargetPrinter.ml
+++ b/kvx/TargetPrinter.ml
@@ -414,6 +414,9 @@ module Target (*: TARGET*) =
| Psemi -> fprintf oc ";;\n"
| Pclzll (rd, rs) -> fprintf oc " clzd %a = %a\n" ireg rd ireg rs
+ | Pclzw (rd, rs) -> fprintf oc " clzw %a = %a\n" ireg rd ireg rs
+ | Pctzll (rd, rs) -> fprintf oc " ctzd %a = %a\n" ireg rd ireg rs
+ | Pctzw (rd, rs) -> fprintf oc " ctzw %a = %a\n" ireg rd ireg rs
| Pstsud (rd, rs1, rs2) -> fprintf oc " stsud %a = %a, %a\n" ireg rd ireg rs1 ireg rs2
diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml
index 66322efb..af65b28e 100644
--- a/lib/Camlcoq.ml
+++ b/lib/Camlcoq.ml
@@ -282,23 +282,96 @@ type atom = positive
let atom_of_string = (Hashtbl.create 17 : (string, atom) Hashtbl.t)
let string_of_atom = (Hashtbl.create 17 : (atom, string) Hashtbl.t)
let next_atom = ref Coq_xH
+let use_canonical_atoms = ref false
+
+(* If [use_canonical_atoms] is false, strings are numbered from 1 up
+ in the order in which they are encountered. This produces small
+ numbers, and is therefore efficient, but the number for a given
+ string may differ between the compilation of different units.
+
+ If [use_canonical_atoms] is true, strings are Huffman-encoded as bit
+ sequences, which are then encoded as positive numbers. The same
+ string is always represented by the same number in all compilation
+ units. However, the numbers are bigger than in the first
+ implementation. Also, this places a hard limit on the number of
+ fresh identifiers that can be generated starting with
+ [first_unused_ident]. *)
+
+let rec append_bits_pos nbits n p =
+ if nbits <= 0 then p else
+ if n land 1 = 0
+ then Coq_xO (append_bits_pos (nbits - 1) (n lsr 1) p)
+ else Coq_xI (append_bits_pos (nbits - 1) (n lsr 1) p)
+
+(* The encoding of strings as bit sequences is optimized for C identifiers:
+ - numbers are encoded as a 6-bit integer between 0 and 9
+ - lowercase letters are encoded as a 6-bit integer between 10 and 35
+ - uppercase letters are encoded as a 6-bit integer between 36 and 61
+ - the underscore character is encoded as the 6-bit integer 62
+ - all other characters are encoded as 6 "one" bits followed by
+ the 8-bit encoding of the character. *)
+
+let append_char_pos c p =
+ match c with
+ | '0'..'9' -> append_bits_pos 6 (Char.code c - Char.code '0') p
+ | 'a'..'z' -> append_bits_pos 6 (Char.code c - Char.code 'a' + 10) p
+ | 'A'..'Z' -> append_bits_pos 6 (Char.code c - Char.code 'A' + 36) p
+ | '_' -> append_bits_pos 6 62 p
+ | _ -> append_bits_pos 6 63 (append_bits_pos 8 (Char.code c) p)
+
+(* The empty string is represented as the positive "1", that is, [xH]. *)
+
+let pos_of_string s =
+ let rec encode i accu =
+ if i < 0 then accu else encode (i - 1) (append_char_pos s.[i] accu)
+ in encode (String.length s - 1) Coq_xH
+
+let fresh_atom () =
+ let a = !next_atom in
+ next_atom := Pos.succ !next_atom;
+ a
let intern_string s =
try
Hashtbl.find atom_of_string s
with Not_found ->
- let a = !next_atom in
- next_atom := Pos.succ !next_atom;
+ let a =
+ if !use_canonical_atoms then pos_of_string s else fresh_atom () in
Hashtbl.add atom_of_string s a;
Hashtbl.add string_of_atom a s;
a
+
let extern_atom a =
try
Hashtbl.find string_of_atom a
with Not_found ->
Printf.sprintf "$%d" (P.to_int a)
-let first_unused_ident () = !next_atom
+(* Ignoring the terminating "1" bit, canonical encodings of strings can
+ be viewed as lists of bits, formed by concatenation of 6-bit fragments
+ (for letters, numbers, and underscore) and 14-bit fragments (for other
+ characters). Hence, not all positive numbers are canonical encodings:
+ only those whose log2 is of the form [6n + 14m].
+
+ Here are the first intervals of positive numbers corresponding to strings:
+ - [1, 1] for the empty string
+ - [2^6, 2^7-1] for one "compact" character
+ - [2^12, 2^13-1] for two "compact" characters
+ - [2^14, 2^14-1] for one "escaped" character
+
+ Hence, between 2^7 and 2^12 - 1, we have 3968 consecutive positive
+ numbers that cannot be the encoding of a string. These are the positive
+ numbers we'll use as temporaries in the SimplExpr pass if canonical
+ atoms are in use.
+
+ If short atoms are used, we just number the temporaries consecutively
+ starting one above the last generated atom.
+*)
+
+let first_unused_ident () =
+ if !use_canonical_atoms
+ then P.of_int 128
+ else !next_atom
(* Strings *)
diff --git a/driver/Commandline.ml b/lib/Commandline.ml
index 672ed834..672ed834 100644
--- a/driver/Commandline.ml
+++ b/lib/Commandline.ml
diff --git a/driver/Commandline.mli b/lib/Commandline.mli
index 8bb6f18f..8bb6f18f 100644
--- a/driver/Commandline.mli
+++ b/lib/Commandline.mli
diff --git a/lib/Floats.v b/lib/Floats.v
index 272efa52..ac67b88c 100644
--- a/lib/Floats.v
+++ b/lib/Floats.v
@@ -17,11 +17,11 @@
(** Formalization of floating-point numbers, using the Flocq library. *)
Require Import Coqlib Zbits Integers Axioms.
-(*From Flocq*)
-Require Import Binary Bits Core.
+From Flocq Require Import Binary Bits Core.
Require Import IEEE754_extra.
Require Import Program.
Require Archi.
+Import ListNotations.
Close Scope R_scope.
Open Scope Z_scope.
diff --git a/lib/IEEE754_extra.v b/lib/IEEE754_extra.v
index c23149be..18313ec1 100644
--- a/lib/IEEE754_extra.v
+++ b/lib/IEEE754_extra.v
@@ -17,11 +17,11 @@
(** Additional operations and proofs about IEEE-754 binary
floating-point numbers, on top of the Flocq library. *)
+From Flocq Require Import Core Digits Operations Round Bracket Sterbenz
+ Binary Round_odd.
Require Import Psatz.
Require Import Bool.
Require Import Eqdep_dec.
-(*From Flocq *)
-Require Import Core Digits Operations Round Bracket Sterbenz Binary Round_odd.
Local Open Scope Z_scope.
diff --git a/lib/Readconfig.mll b/lib/Readconfig.mll
index 7b98255e..8abcc407 100644
--- a/lib/Readconfig.mll
+++ b/lib/Readconfig.mll
@@ -20,7 +20,7 @@
let key_val_tbl : (string, string list) Hashtbl.t = Hashtbl.create 17
let key_val key =
- try Some(Hashtbl.find key_val_tbl key) with Not_found -> None
+ Hashtbl.find_opt key_val_tbl key
(* Auxiliaries for parsing *)
diff --git a/lib/Zbits.v b/lib/Zbits.v
index 27586aff..6f3acaab 100644
--- a/lib/Zbits.v
+++ b/lib/Zbits.v
@@ -266,7 +266,7 @@ Qed.
Remark Ztestbit_shiftin_base:
forall b x, Z.testbit (Zshiftin b x) 0 = b.
Proof.
- intros. rewrite Ztestbit_shiftin. apply zeq_true. omega.
+ intros. rewrite Ztestbit_shiftin; reflexivity.
Qed.
Remark Ztestbit_shiftin_succ:
@@ -316,7 +316,7 @@ Qed.
Remark Ztestbit_base:
forall x, Z.testbit x 0 = Z.odd x.
Proof.
- intros. rewrite Ztestbit_eq. apply zeq_true. omega.
+ intros. rewrite Ztestbit_eq; reflexivity.
Qed.
Remark Ztestbit_succ:
diff --git a/powerpc/Archi.v b/powerpc/Archi.v
index 8f96dafc..5b9d67cc 100644
--- a/powerpc/Archi.v
+++ b/powerpc/Archi.v
@@ -16,9 +16,8 @@
(** Architecture-dependent parameters for PowerPC *)
+From Flocq Require Import Binary Bits.
Require Import ZArith List.
-(*From Flocq*)
-Require Import Binary Bits.
Definition ptr64 := false.
diff --git a/powerpc/Asm.v b/powerpc/Asm.v
index 4fb38ff8..d9901960 100644
--- a/powerpc/Asm.v
+++ b/powerpc/Asm.v
@@ -200,12 +200,9 @@ Inductive instruction : Type :=
| Pfadd: freg -> freg -> freg -> instruction (**r float addition *)
| Pfadds: freg -> freg -> freg -> instruction (**r float addition *)
| Pfcmpu: freg -> freg -> instruction (**r float comparison *)
- | Pfcfi: freg -> ireg -> instruction (**r signed-int-to-float conversion (pseudo, PPC64) *)
| Pfcfl: freg -> ireg -> instruction (**r signed-long-to-float conversion (pseudo, PPC64) *)
- | Pfcfiu: freg -> ireg -> instruction (**r unsigned-int-to-float conversion (pseudo, PPC64) *)
| Pfcfid: freg -> freg -> instruction (**r signed-long-to-float conversion (PPC64) *)
| Pfcti: ireg -> freg -> instruction (**r float-to-signed-int conversion, round towards 0 (pseudo) *)
- | Pfctiu: ireg -> freg -> instruction (**r float-to-unsigned-int conversion, round towards 0 (pseudo, PPC64) *)
| Pfctid: ireg -> freg -> instruction (**r float-to-signed-int conversion, round towards 0 (pseudo, PPC64) *)
| Pfctidz: freg -> freg -> instruction (**r float-to-signed-long conversion, round towards 0 (PPC64) *)
| Pfctiw: freg -> freg -> instruction (**r float-to-signed-int conversion, round by default *)
@@ -825,16 +822,10 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
Next (nextinstr (rs#rd <- (Val.addfs rs#r1 rs#r2))) m
| Pfcmpu r1 r2 =>
Next (nextinstr (compare_float rs rs#r1 rs#r2)) m
- | Pfcfi rd r1 =>
- Next (nextinstr (rs#rd <- (Val.maketotal (Val.floatofint rs#r1)))) m
| Pfcfl rd r1 =>
Next (nextinstr (rs#rd <- (Val.maketotal (Val.floatoflong rs#r1)))) m
- | Pfcfiu rd r1 =>
- Next (nextinstr (rs#rd <- (Val.maketotal (Val.floatofintu rs#r1)))) m
| Pfcti rd r1 =>
Next (nextinstr (rs#FPR13 <- Vundef #rd <- (Val.maketotal (Val.intoffloat rs#r1)))) m
- | Pfctiu rd r1 =>
- Next (nextinstr (rs#FPR13 <- Vundef #rd <- (Val.maketotal (Val.intuoffloat rs#r1)))) m
| Pfctid rd r1 =>
Next (nextinstr (rs#FPR13 <- Vundef #rd <- (Val.maketotal (Val.longoffloat rs#r1)))) m
| Pfdiv rd r1 r2 =>
@@ -1204,7 +1195,7 @@ Inductive step: state -> trace -> state -> Prop :=
external_call ef ge vargs m t vres m' ->
rs' = nextinstr
(set_res res vres
- (undef_regs (map preg_of (destroyed_by_builtin ef)) rs)) ->
+ (undef_regs (IR GPR0 :: map preg_of (destroyed_by_builtin ef)) rs)) ->
step (State rs m) t (State rs' m')
| exec_step_external:
forall b ef args res rs m t rs' m',
diff --git a/powerpc/AsmToJSON.ml b/powerpc/AsmToJSON.ml
index 38f4bc75..1f32dd62 100644
--- a/powerpc/AsmToJSON.ml
+++ b/powerpc/AsmToJSON.ml
@@ -198,12 +198,9 @@ let pp_instructions pp ic =
| Pfadd (fr1,fr2,fr3) -> instruction pp "Pfadd" [Freg fr1; Freg fr2; Freg fr3]
| Pfadds (fr1,fr2,fr3) -> instruction pp "Pfadds" [Freg fr1; Freg fr2; Freg fr3]
| Pfcmpu (fr1,fr2) -> instruction pp "Pfcmpu" [Freg fr1; Freg fr2]
- | Pfcfi (ir,fr)
| Pfcfl (ir,fr) -> assert false (* Should not occur *)
| Pfcfid (fr1,fr2) -> instruction pp "Pfcfid" [Freg fr1; Freg fr2]
- | Pfcfiu _ (* Should not occur *)
| Pfcti _ (* Should not occur *)
- | Pfctiu _ (* Should not occur *)
| Pfctid _ -> assert false (* Should not occur *)
| Pfctidz (fr1,fr2) -> instruction pp "Pfctidz" [Freg fr1; Freg fr2]
| Pfctiw (fr1,fr2) -> instruction pp "Pfctiw" [Freg fr1; Freg fr2]
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml
index ce88778c..cb6a659f 100644
--- a/powerpc/Asmexpand.ml
+++ b/powerpc/Asmexpand.ml
@@ -594,9 +594,7 @@ let expand_builtin_inline name args res =
emit (Pfnmadd(res, a1, a2, a3))
| "__builtin_fnmsub", [BA(FR a1); BA(FR a2); BA(FR a3)], BR(FR res) ->
emit (Pfnmsub(res, a1, a2, a3))
- | "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
- emit (Pfabs(res, a1))
- | "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
+ | ("__builtin_fsqrt" | "__builtin_sqrt"), [BA(FR a1)], BR(FR res) ->
emit (Pfsqrt(res, a1))
| "__builtin_frsqrte", [BA(FR a1)], BR(FR res) ->
emit (Pfrsqrte(res, a1))
@@ -767,6 +765,8 @@ let expand_builtin_inline name args res =
emit (Pori (GPR0, GPR0, Cint _0))
(* atomic operations *)
| "__builtin_atomic_exchange", [BA (IR a1); BA (IR a2); BA (IR a3)],_ ->
+ (* Register constraints imposed by Machregs.v *)
+ assert(a1 = GPR3 && a2 = GPR4 && a3 = GPR5);
emit (Plwz (GPR10,Cint _0,a2));
emit (Psync);
let lbl = new_label() in
@@ -786,6 +786,8 @@ let expand_builtin_inline name args res =
emit (Pisync);
emit (Pstw (GPR0,Cint _0, a2))
| "__builtin_sync_fetch_and_add", [BA (IR a1); BA(IR a2)], BR (IR res) ->
+ (* Register constraints imposed by Machregs.v *)
+ assert (a1 = GPR4 && a2 = GPR5 && res = GPR3);
let lbl = new_label() in
emit (Psync);
emit (Plabel lbl);
@@ -795,6 +797,8 @@ let expand_builtin_inline name args res =
emit (Pbf (CRbit_2, lbl));
emit (Pisync);
| "__builtin_atomic_compare_exchange", [BA (IR dst); BA(IR exp); BA (IR des)], BR (IR res) ->
+ (* Register constraints imposed by Machregs.v *)
+ assert (dst = GPR4 && exp = GPR5 && des = GPR6 && res = GPR3);
let lbls = new_label ()
and lblneq = new_label ()
and lblsucc = new_label () in
@@ -871,15 +875,6 @@ let expand_instruction instr =
emit (Paddi(GPR1, GPR1, Cint(coqint_of_camlint sz)))
else
emit (Plwz(GPR1, Cint ofs, GPR1))
- | Pfcfi(r1, r2) ->
- assert (Archi.ppc64);
- emit (Pextsw(GPR0, r2));
- emit (Pstdu(GPR0, Cint _m8, GPR1));
- emit (Pcfi_adjust _8);
- emit (Plfd(r1, Cint _0, GPR1));
- emit (Pfcfid(r1, r1));
- emit (Paddi(GPR1, GPR1, Cint _8));
- emit (Pcfi_adjust _m8)
| Pfcfl(r1, r2) ->
assert (Archi.ppc64);
emit (Pstdu(r2, Cint _m8, GPR1));
@@ -888,15 +883,6 @@ let expand_instruction instr =
emit (Pfcfid(r1, r1));
emit (Paddi(GPR1, GPR1, Cint _8));
emit (Pcfi_adjust _m8)
- | Pfcfiu(r1, r2) ->
- assert (Archi.ppc64);
- emit (Prldicl(GPR0, r2, _0, _32));
- emit (Pstdu(GPR0, Cint _m8, GPR1));
- emit (Pcfi_adjust _8);
- emit (Plfd(r1, Cint _0, GPR1));
- emit (Pfcfid(r1, r1));
- emit (Paddi(GPR1, GPR1, Cint _8));
- emit (Pcfi_adjust _m8)
| Pfcti(r1, r2) ->
emit (Pfctiwz(FPR13, r2));
emit (Pstfdu(FPR13, Cint _m8, GPR1));
@@ -904,14 +890,6 @@ let expand_instruction instr =
emit (Plwz(r1, Cint _4, GPR1));
emit (Paddi(GPR1, GPR1, Cint _8));
emit (Pcfi_adjust _m8)
- | Pfctiu(r1, r2) ->
- assert (Archi.ppc64);
- emit (Pfctidz(FPR13, r2));
- emit (Pstfdu(FPR13, Cint _m8, GPR1));
- emit (Pcfi_adjust _8);
- emit (Plwz(r1, Cint _4, GPR1));
- emit (Paddi(GPR1, GPR1, Cint _8));
- emit (Pcfi_adjust _m8)
| Pfctid(r1, r2) ->
assert (Archi.ppc64);
emit (Pfctidz(FPR13, r2));
diff --git a/powerpc/Asmgen.v b/powerpc/Asmgen.v
index 29e2c028..d0c44f08 100644
--- a/powerpc/Asmgen.v
+++ b/powerpc/Asmgen.v
@@ -611,15 +611,6 @@ Definition transl_op
| Ointoffloat, a1 :: nil =>
do r1 <- freg_of a1; do r <- ireg_of res;
OK (Pfcti r r1 :: k)
- | Ointuoffloat, a1 :: nil =>
- do r1 <- freg_of a1; do r <- ireg_of res;
- OK (Pfctiu r r1 :: k)
- | Ofloatofint, a1 :: nil =>
- do r1 <- ireg_of a1; do r <- freg_of res;
- OK (Pfcfi r r1 :: k)
- | Ofloatofintu, a1 :: nil =>
- do r1 <- ireg_of a1; do r <- freg_of res;
- OK (Pfcfiu r r1 :: k)
| Ofloatofwords, a1 :: a2 :: nil =>
do r1 <- ireg_of a1; do r2 <- ireg_of a2; do r <- freg_of res;
OK (Pfmake r r1 r2 :: k)
diff --git a/powerpc/Asmgenproof.v b/powerpc/Asmgenproof.v
index 21d5ce48..93589a31 100644
--- a/powerpc/Asmgenproof.v
+++ b/powerpc/Asmgenproof.v
@@ -789,16 +789,18 @@ Opaque loadind.
econstructor; eauto.
instantiate (2 := tf); instantiate (1 := x).
unfold nextinstr. rewrite Pregmap.gss.
- rewrite set_res_other. rewrite undef_regs_other_2.
+ rewrite set_res_other. simpl. rewrite undef_regs_other_2.
+ rewrite Pregmap.gso by auto with asmgen.
rewrite <- H1. simpl. econstructor; eauto.
eapply code_tail_next_int; eauto.
rewrite preg_notin_charact. intros. auto with asmgen.
auto with asmgen.
apply agree_nextinstr. eapply agree_set_res; auto.
- eapply agree_undef_regs; eauto. intros; apply undef_regs_other_2; auto.
+ eapply agree_undef_regs; eauto.
+ intros. simpl. rewrite undef_regs_other_2; auto. apply Pregmap.gso. auto with asmgen.
congruence.
intros. Simpl. rewrite set_res_other by auto.
- rewrite undef_regs_other_2; auto with asmgen.
+ simpl. rewrite undef_regs_other_2; auto with asmgen.
- (* Mgoto *)
assert (f0 = f) by congruence. subst f0.
diff --git a/powerpc/Asmgenproof1.v b/powerpc/Asmgenproof1.v
index 1b797999..850e95c7 100644
--- a/powerpc/Asmgenproof1.v
+++ b/powerpc/Asmgenproof1.v
@@ -1500,18 +1500,6 @@ Opaque Val.add.
- replace v with (Val.maketotal (Val.intoffloat (rs x))).
TranslOpSimpl.
rewrite H1; auto.
- (* Ointuoffloat *)
-- replace v with (Val.maketotal (Val.intuoffloat (rs x))).
- TranslOpSimpl.
- rewrite H1; auto.
- (* Ofloatofint *)
-- replace v with (Val.maketotal (Val.floatofint (rs x))).
- TranslOpSimpl.
- rewrite H1; auto.
- (* Ofloatofintu *)
-- replace v with (Val.maketotal (Val.floatofintu (rs x))).
- TranslOpSimpl.
- rewrite H1; auto.
(* Ocmp *)
- destruct (transl_cond_op_correct c0 args res k rs m c) as [rs' [A [B C]]]; auto.
exists rs'; auto with asmgen.
diff --git a/powerpc/Builtins1.v b/powerpc/Builtins1.v
index 53c83d7e..9d7aadd9 100644
--- a/powerpc/Builtins1.v
+++ b/powerpc/Builtins1.v
@@ -19,15 +19,55 @@ Require Import String Coqlib.
Require Import AST Integers Floats Values.
Require Import Builtins0.
-Inductive platform_builtin : Type := .
+Inductive platform_builtin : Type :=
+ | BI_isel
+ | BI_uisel
+ | BI_isel64
+ | BI_uisel64
+ | BI_bsel
+ | BI_mulhw
+ | BI_mulhwu
+ | BI_mulhd
+ | BI_mulhdu.
Local Open Scope string_scope.
Definition platform_builtin_table : list (string * platform_builtin) :=
- nil.
+ ("__builtin_isel", BI_isel)
+ :: ("__builtin_uisel", BI_uisel)
+ :: ("__builtin_isel64", BI_isel64)
+ :: ("__builtin_uisel64", BI_uisel64)
+ :: ("__builtin_bsel", BI_bsel)
+ :: ("__builtin_mulhw", BI_mulhw)
+ :: ("__builtin_mulhwu", BI_mulhwu)
+ :: ("__builtin_mulhd", BI_mulhd)
+ :: ("__builtin_mulhdu", BI_mulhdu)
+ :: nil.
Definition platform_builtin_sig (b: platform_builtin) : signature :=
- match b with end.
+ match b with
+ | BI_isel | BI_uisel | BI_bsel =>
+ mksignature (Tint :: Tint :: Tint :: nil) Tint cc_default
+ | BI_isel64 | BI_uisel64 =>
+ mksignature (Tint :: Tlong :: Tlong :: nil) Tlong cc_default
+ | BI_mulhw | BI_mulhwu =>
+ mksignature (Tint :: Tint :: nil) Tint cc_default
+ | BI_mulhd | BI_mulhdu =>
+ mksignature (Tlong :: Tlong :: nil) Tlong cc_default
+ end.
Definition platform_builtin_sem (b: platform_builtin) : builtin_sem (sig_res (platform_builtin_sig b)) :=
- match b with end.
+ match b with
+ | BI_isel | BI_uisel | BI_bsel =>
+ mkbuiltin_n3t Tint Tint Tint Tint (fun c n1 n2 => if Int.eq c Int.zero then n2 else n1)
+ | BI_isel64 | BI_uisel64 =>
+ mkbuiltin_n3t Tint Tlong Tlong Tlong (fun c n1 n2 => if Int.eq c Int.zero then n2 else n1)
+ | BI_mulhw =>
+ mkbuiltin_n2t Tint Tint Tint Int.mulhs
+ | BI_mulhwu =>
+ mkbuiltin_n2t Tint Tint Tint Int.mulhu
+ | BI_mulhd =>
+ mkbuiltin_n2t Tlong Tlong Tlong Int64.mulhs
+ | BI_mulhdu =>
+ mkbuiltin_n2t Tlong Tlong Tlong Int64.mulhu
+ end.
diff --git a/powerpc/CBuiltins.ml b/powerpc/CBuiltins.ml
index e29a41f1..e0826877 100644
--- a/powerpc/CBuiltins.ml
+++ b/powerpc/CBuiltins.ml
@@ -28,18 +28,6 @@ let builtins = {
(TInt(IInt, []), [TInt(IInt, []); TInt(IInt, [])], false);
"__builtin_mulhwu",
(TInt(IUInt, []), [TInt(IUInt, []); TInt(IUInt, [])], false);
- "__builtin_clz",
- (TInt(IInt, []), [TInt(IUInt, [])], false);
- "__builtin_clzl",
- (TInt(IInt, []), [TInt(IULong, [])], false);
- "__builtin_clzll",
- (TInt(IInt, []), [TInt(IULongLong, [])], false);
- "__builtin_ctz",
- (TInt(IInt, []), [TInt(IUInt, [])], false);
- "__builtin_ctzl",
- (TInt(IInt, []), [TInt(IULong, [])], false);
- "__builtin_ctzll",
- (TInt(IInt, []), [TInt(IULongLong, [])], false);
"__builtin_cmpb",
(TInt (IUInt, []), [TInt(IUInt, []);TInt(IUInt, [])], false);
(* Integer arithmetic in 32/64-bit hybrid mode *)
diff --git a/powerpc/Machregs.v b/powerpc/Machregs.v
index e7c8758b..9967bbae 100644
--- a/powerpc/Machregs.v
+++ b/powerpc/Machregs.v
@@ -166,7 +166,7 @@ Definition destroyed_by_op (op: operation): list mreg :=
| Ofloatconst _ => R12 :: nil
| Osingleconst _ => R12 :: nil
| Olongconst _ => R12 :: nil
- | Ointoffloat | Ointuoffloat => F13 :: nil
+ | Ointoffloat => F13 :: nil
| Olongoffloat => F13 :: nil
| Oaddlimm _ => R12 :: nil
| Oandlimm _ => R12 :: nil
@@ -232,7 +232,7 @@ Definition mregs_for_builtin (ef: external_function): list (option mreg) * list
| EF_builtin id sg =>
if string_dec id "__builtin_atomic_exchange" then ((Some R3)::(Some R4)::(Some R5)::nil,nil)
else if string_dec id "__builtin_sync_fetch_and_add" then ((Some R4)::(Some R5)::nil,(Some R3)::nil)
- else if string_dec id "___builtin_atomic_compare_exchange" then ((Some R4)::(Some R5)::(Some R6)::nil, (Some R3):: nil)
+ else if string_dec id "__builtin_atomic_compare_exchange" then ((Some R4)::(Some R5)::(Some R6)::nil, (Some R3):: nil)
else (nil, nil)
| _ => (nil, nil)
end.
diff --git a/powerpc/Machregsaux.ml b/powerpc/Machregsaux.ml
index 0b0d4548..d17382ad 100644
--- a/powerpc/Machregsaux.ml
+++ b/powerpc/Machregsaux.ml
@@ -12,27 +12,7 @@
(** Auxiliary functions on machine registers *)
-open Camlcoq
-open Machregs
-
-let register_names : (mreg, string) Hashtbl.t = Hashtbl.create 31
-
-let _ =
- List.iter
- (fun (s, r) -> Hashtbl.add register_names r (camlstring_of_coqstring s))
- Machregs.register_names
-
let is_scratch_register s = s = "R0" || s = "r0"
-
-let name_of_register r =
- try Some (Hashtbl.find register_names r) with Not_found -> None
-
-let register_by_name s =
- Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s)
-
-let can_reserve_register r =
- List.mem r Conventions1.int_callee_save_regs
- || List.mem r Conventions1.float_callee_save_regs
let class_of_type = function
| AST.Tint | AST.Tlong -> 0
diff --git a/powerpc/Machregsaux.mli b/powerpc/Machregsaux.mli
index d7117c21..01b0f9fd 100644
--- a/powerpc/Machregsaux.mli
+++ b/powerpc/Machregsaux.mli
@@ -12,9 +12,6 @@
(** Auxiliary functions on machine registers *)
-val name_of_register: Machregs.mreg -> string option
-val register_by_name: string -> Machregs.mreg option
val is_scratch_register: string -> bool
-val can_reserve_register: Machregs.mreg -> bool
val class_of_type: AST.typ -> int
diff --git a/powerpc/NeedOp.v b/powerpc/NeedOp.v
index 5ea09bd8..74ee6b85 100644
--- a/powerpc/NeedOp.v
+++ b/powerpc/NeedOp.v
@@ -61,7 +61,7 @@ Definition needs_of_operation (op: operation) (nv: nval): list nval :=
| Onegfs | Oabsfs => op1 (default nv)
| Oaddfs | Osubfs | Omulfs | Odivfs => op2 (default nv)
| Osingleoffloat | Ofloatofsingle => op1 (default nv)
- | Ointoffloat | Ointuoffloat | Ofloatofint | Ofloatofintu => op1 (default nv)
+ | Ointoffloat => op1 (default nv)
| Ofloatofwords | Omakelong => op2 (default nv)
| Olowlong | Ohighlong => op1 (default nv)
| Ocmp c => needs_of_condition c
diff --git a/powerpc/Op.v b/powerpc/Op.v
index 457b868a..7ddbcc34 100644
--- a/powerpc/Op.v
+++ b/powerpc/Op.v
@@ -105,7 +105,7 @@ Inductive operation : Type :=
| Osubl: operation (**r [rd = r1 - r2] *)
| Onegl: operation (**r [rd = - r1] *)
| Omull: operation (**r [rd = r1 * r2] *)
- | Omullhs: operation (**r [rd = high part of r1 * r2, signed] *)
+ | Omullhs: operation (**r [rd = high part of r1 * r2, signed] *)
| Omullhu: operation (**r [rd = high part of r1 * r2, unsigned] *)
| Odivl: operation (**r [rd = r1 / r2] (signed) *)
| Odivlu: operation (**r [rd = r1 / r2] (unsigned) *)
@@ -141,9 +141,6 @@ Inductive operation : Type :=
| Ofloatofsingle: operation (**r [rd] is [r1] extended to double-precision float *)
(*c Conversions between int and float: *)
| Ointoffloat: operation (**r [rd = signed_int_of_float(r1)] *)
- | Ointuoffloat: operation (**r [rd = unsigned_int_of_float(r1)] (PPC64 only) *)
- | Ofloatofint: operation (**r [rd = float_of_signed_int(r1)] (PPC64 only) *)
- | Ofloatofintu: operation (**r [rd = float_of_unsigned_int(r1)] (PPC64 only *)
| Ofloatofwords: operation (**r [rd = float_of_words(r1,r2)] *)
(*c Manipulating 64-bit integers: *)
| Omakelong: operation (**r [rd = r1 << 32 | r2] *)
@@ -299,9 +296,6 @@ Definition eval_operation
| Osingleoffloat, v1::nil => Some(Val.singleoffloat v1)
| Ofloatofsingle, v1::nil => Some(Val.floatofsingle v1)
| Ointoffloat, v1::nil => Val.intoffloat v1
- | Ointuoffloat, v1::nil => Val.intuoffloat v1
- | Ofloatofint, v1::nil => Val.floatofint v1
- | Ofloatofintu, v1::nil => Val.floatofintu v1
| Ofloatofwords, v1::v2::nil => Some(Val.floatofwords v1 v2)
| Omakelong, v1::v2::nil => Some(Val.longofwords v1 v2)
| Olowlong, v1::nil => Some(Val.loword v1)
@@ -449,9 +443,6 @@ Definition type_of_operation (op: operation) : list typ * typ :=
| Osingleoffloat => (Tfloat :: nil, Tsingle)
| Ofloatofsingle => (Tsingle :: nil, Tfloat)
| Ointoffloat => (Tfloat :: nil, Tint)
- | Ointuoffloat => (Tfloat :: nil, Tint)
- | Ofloatofint => (Tint :: nil, Tfloat)
- | Ofloatofintu => (Tint :: nil, Tfloat)
| Ofloatofwords => (Tint :: Tint :: nil, Tfloat)
| Omakelong => (Tint :: Tint :: nil, Tlong)
| Olowlong => (Tlong :: nil, Tint)
@@ -570,9 +561,6 @@ Proof with (try exact I; try reflexivity).
destruct v0...
destruct v0...
destruct v0; simpl in H0; inv H0. destruct (Float.to_int f); inv H2...
- destruct v0; simpl in H0; inv H0. destruct (Float.to_intu f); inv H2...
- destruct v0; simpl in H0; inv H0...
- destruct v0; simpl in H0; inv H0...
destruct v0; destruct v1...
destruct v0; destruct v1...
destruct v0...
@@ -1053,10 +1041,6 @@ Proof.
inv H4; simpl; auto.
inv H4; simpl in H1; inv H1. simpl. destruct (Float.to_int f0); simpl in H2; inv H2.
exists (Vint i); auto.
- inv H4; simpl in H1; inv H1. simpl. destruct (Float.to_intu f0); simpl in H2; inv H2.
- exists (Vint i); auto.
- inv H4; simpl in H1; inv H1; simpl. TrivialExists.
- inv H4; simpl in H1; inv H1; simpl. TrivialExists.
inv H4; inv H2; simpl; auto.
inv H4; inv H2; simpl; auto.
inv H4; simpl; auto.
diff --git a/powerpc/PrintOp.ml b/powerpc/PrintOp.ml
index 8d7f17ab..77791827 100644
--- a/powerpc/PrintOp.ml
+++ b/powerpc/PrintOp.ml
@@ -42,6 +42,14 @@ let print_condition reg pp = function
fprintf pp "%a & 0x%lx == 0" reg r1 (camlint_of_coqint n)
| (Cmasknotzero n, [r1]) ->
fprintf pp "%a & 0x%lx != 0" reg r1 (camlint_of_coqint n)
+ | (Ccompl c, [r1;r2]) ->
+ fprintf pp "%a %sls %a" reg r1 (comparison_name c) reg r2
+ | (Ccomplu c, [r1;r2]) ->
+ fprintf pp "%a %slu %a" reg r1 (comparison_name c) reg r2
+ | (Ccomplimm(c, n), [r1]) ->
+ fprintf pp "%a %sls %Ld" reg r1 (comparison_name c) (camlint64_of_coqint n)
+ | (Ccompluimm(c, n), [r1]) ->
+ fprintf pp "%a %slu %Ld" reg r1 (comparison_name c) (camlint64_of_coqint n)
| _ ->
fprintf pp "<bad condition>"
diff --git a/powerpc/SelectOp.vp b/powerpc/SelectOp.vp
index 52f4f855..fe8b5453 100644
--- a/powerpc/SelectOp.vp
+++ b/powerpc/SelectOp.vp
@@ -468,7 +468,7 @@ Definition intoffloat (e: expr) := Eop Ointoffloat (e ::: Enil).
Definition intuoffloat (e: expr) :=
if Archi.ppc64 then
- Eop Ointuoffloat (e ::: Enil)
+ Eop Olowlong (Eop Olongoffloat (e ::: Enil) ::: Enil)
else
Elet e
(Elet (Eop (Ofloatconst (Float.of_intu Float.ox8000_0000)) Enil)
@@ -482,7 +482,8 @@ Nondetfunction floatofintu (e: expr) :=
Eop (Ofloatconst (Float.of_intu n)) Enil
| _ =>
if Archi.ppc64 then
- Eop Ofloatofintu (e ::: Enil) else
+ Eop Ofloatoflong (Eop Ocast32unsigned (e ::: Enil) ::: Enil)
+ else
subf (Eop Ofloatofwords (Eop (Ointconst Float.ox4330_0000) Enil ::: e ::: Enil))
(Eop (Ofloatconst (Float.from_words Float.ox4330_0000 Int.zero)) Enil)
end.
@@ -493,7 +494,8 @@ Nondetfunction floatofint (e: expr) :=
Eop (Ofloatconst (Float.of_int n)) Enil
| _ =>
if Archi.ppc64 then
- Eop Ofloatofint (e ::: Enil) else
+ Eop Ofloatoflong (Eop Ocast32signed (e ::: Enil) ::: Enil)
+ else
subf (Eop Ofloatofwords (Eop (Ointconst Float.ox4330_0000) Enil
::: addimm Float.ox8000_0000 e ::: Enil))
(Eop (Ofloatconst (Float.from_words Float.ox4330_0000 Float.ox8000_0000)) Enil)
diff --git a/powerpc/SelectOpproof.v b/powerpc/SelectOpproof.v
index 8135bad6..ed81c83f 100644
--- a/powerpc/SelectOpproof.v
+++ b/powerpc/SelectOpproof.v
@@ -855,8 +855,13 @@ Proof.
destruct (Float.to_intu f) as [n|] eqn:?; simpl in H0; inv H0.
exists (Vint n); split; auto. unfold intuoffloat.
destruct Archi.ppc64.
- econstructor. constructor; eauto. constructor. simpl; rewrite Heqo; auto.
- set (im := Int.repr Int.half_modulus).
+- apply Float.to_intu_to_long in Heqo.
+ econstructor. constructor. econstructor. econstructor; eauto. constructor.
+ simpl; rewrite Heqo; simpl; eauto. constructor.
+ simpl. unfold Int64.loword. rewrite Int64.unsigned_repr, Int.repr_unsigned. auto.
+ assert (Int.modulus < Int64.max_unsigned) by (compute; auto).
+ generalize (Int.unsigned_range n). omega.
+- set (im := Int.repr Int.half_modulus).
set (fm := Float.of_intu im).
assert (eval_expr ge sp e m (Vfloat fm :: Vfloat f :: le) (Eletvar (S O)) (Vfloat f)).
constructor. auto.
@@ -893,11 +898,12 @@ Theorem eval_floatofint:
Proof.
intros until y. unfold floatofint. destruct (floatofint_match a); intros.
InvEval. TrivialExists.
- destruct Archi.ppc64.
- TrivialExists.
rename e0 into a. destruct x; simpl in H0; inv H0.
exists (Vfloat (Float.of_int i)); split; auto.
- set (t1 := addimm Float.ox8000_0000 a).
+ destruct Archi.ppc64.
+- rewrite Float.of_int_of_long.
+ EvalOp. constructor. EvalOp. simpl; eauto. constructor. auto.
+- set (t1 := addimm Float.ox8000_0000 a).
set (t2 := Eop Ofloatofwords (Eop (Ointconst Float.ox4330_0000) Enil ::: t1 ::: Enil)).
set (t3 := Eop (Ofloatconst (Float.from_words Float.ox4330_0000 Float.ox8000_0000)) Enil).
exploit (eval_addimm Float.ox8000_0000 le a). eauto. fold t1.
@@ -917,12 +923,12 @@ Theorem eval_floatofintu:
Proof.
intros until y. unfold floatofintu. destruct (floatofintu_match a); intros.
InvEval. TrivialExists.
- destruct Archi.ppc64.
- TrivialExists.
rename e0 into a. destruct x; simpl in H0; inv H0.
exists (Vfloat (Float.of_intu i)); split; auto.
- unfold floatofintu.
- set (t2 := Eop Ofloatofwords (Eop (Ointconst Float.ox4330_0000) Enil ::: a ::: Enil)).
+ destruct Archi.ppc64.
+- rewrite Float.of_intu_of_long.
+ EvalOp. constructor. EvalOp. simpl; eauto. constructor. auto.
+- set (t2 := Eop Ofloatofwords (Eop (Ointconst Float.ox4330_0000) Enil ::: a ::: Enil)).
set (t3 := Eop (Ofloatconst (Float.from_words Float.ox4330_0000 Int.zero)) Enil).
exploit (eval_subf le t2).
unfold t2. EvalOp. constructor. EvalOp. simpl; eauto. constructor. eauto. constructor.
diff --git a/powerpc/TargetPrinter.ml b/powerpc/TargetPrinter.ml
index 3ea03786..554bfe09 100644
--- a/powerpc/TargetPrinter.ml
+++ b/powerpc/TargetPrinter.ml
@@ -557,22 +557,16 @@ module Target (System : SYSTEM):TARGET =
fprintf oc " fadds %a, %a, %a\n" freg r1 freg r2 freg r3
| Pfcmpu(r1, r2) ->
fprintf oc " fcmpu %a, %a, %a\n" creg 0 freg r1 freg r2
- | Pfcfi(r1, r2) ->
- assert false
| Pfcfl(r1, r2) ->
assert false
| Pfcfid(r1, r2) ->
fprintf oc " fcfid %a, %a\n" freg r1 freg r2
- | Pfcfiu(r1, r2) ->
- assert false
| Pfcti(r1, r2) ->
assert false
| Pfctid(r1, r2) ->
assert false
| Pfctidz(r1, r2) ->
fprintf oc " fctidz %a, %a\n" freg r1 freg r2
- | Pfctiu(r1, r2) ->
- assert false
| Pfctiw(r1, r2) ->
fprintf oc " fctiw %a, %a\n" freg r1 freg r2
| Pfctiwz(r1, r2) ->
diff --git a/powerpc/ValueAOp.v b/powerpc/ValueAOp.v
index a270d857..c81f1a6c 100644
--- a/powerpc/ValueAOp.v
+++ b/powerpc/ValueAOp.v
@@ -133,9 +133,6 @@ Definition eval_static_operation (op: operation) (vl: list aval): aval :=
| Osingleoffloat, v1::nil => singleoffloat v1
| Ofloatofsingle, v1::nil => floatofsingle v1
| Ointoffloat, v1::nil => intoffloat v1
- | Ointuoffloat, v1::nil => intuoffloat v1
- | Ofloatofint, v1::nil => floatofint v1
- | Ofloatofintu, v1::nil => floatofintu v1
| Ofloatofwords, v1::v2::nil => floatofwords v1 v2
| Omakelong, v1::v2::nil => longofwords v1 v2
| Olowlong, v1::nil => loword v1
diff --git a/riscV/Archi.v b/riscV/Archi.v
index 9bdaad99..1bb80e89 100644
--- a/riscV/Archi.v
+++ b/riscV/Archi.v
@@ -16,9 +16,8 @@
(** Architecture-dependent parameters for RISC-V *)
+From Flocq Require Import Binary Bits.
Require Import ZArith List.
-(*From Flocq*)
-Require Import Binary Bits.
Parameter ptr64 : bool.
diff --git a/riscV/Asmexpand.ml b/riscV/Asmexpand.ml
index 7e36abf8..810514a3 100644
--- a/riscV/Asmexpand.ml
+++ b/riscV/Asmexpand.ml
@@ -394,6 +394,90 @@ let expand_bswap64 d s =
emit (Psrlil(X31, X s, coqint_of_camlint 56l));
emit (Porl(d, X X1, X X31))
+(* Count leading zeros. Algorithm 5-7 from Hacker's Delight,
+ re-rolled as a loop to produce more compact code. *)
+
+let expand_clz ~sixtyfour ~splitlong =
+ (* Input: X in X5 or (X5, X6) if splitlong
+ Result: N in X7
+ Temporaries: S in X8, Y in X9 *)
+ let lbl1 = new_label() in
+ let lbl2 = new_label() in
+ (* N := bitsize of X's type (32 or 64) *)
+ expand_loadimm32 X7 (coqint_of_camlint
+ (if sixtyfour || splitlong then 64l else 32l));
+ (* S := initial shift amount (16 or 32) *)
+ expand_loadimm32 X8 (coqint_of_camlint (if sixtyfour then 32l else 16l));
+ if splitlong then begin
+ (* if (Xhigh == 0) goto lbl1 *)
+ emit (Pbeqw(X X6, X0, lbl1));
+ (* N := 32 *)
+ expand_loadimm32 X7 (coqint_of_camlint 32l);
+ (* X := Xhigh *)
+ emit (Pmv(X5, X6))
+ end;
+ (* lbl1: *)
+ emit (Plabel lbl1);
+ (* Y := X >> S *)
+ emit (if sixtyfour then Psrll(X9, X X5, X X8) else Psrlw(X9, X X5, X X8));
+ (* if (Y == 0) goto lbl2 *)
+ emit (if sixtyfour then Pbeql(X X9, X0, lbl2) else Pbeqw(X X9, X0, lbl2));
+ (* N := N - S *)
+ emit (Psubw(X7, X X7, X X8));
+ (* X := Y *)
+ emit (Pmv(X5, X9));
+ (* lbl2: *)
+ emit (Plabel lbl2);
+ (* S := S / 2 *)
+ emit (Psrliw(X8, X X8, _1));
+ (* if (S != 0) goto lbl1; *)
+ emit (Pbnew(X X8, X0, lbl1));
+ (* N := N - X *)
+ emit (Psubw(X7, X X7, X X5))
+
+(* Count trailing zeros. Algorithm 5-14 from Hacker's Delight,
+ re-rolled as a loop to produce more compact code. *)
+
+let expand_ctz ~sixtyfour ~splitlong =
+ (* Input: X in X6 or (X5, X6) if splitlong
+ Result: N in X7
+ Temporaries: S in X8, Y in X9 *)
+ let lbl1 = new_label() in
+ let lbl2 = new_label() in
+ (* N := bitsize of X's type (32 or 64) *)
+ expand_loadimm32 X7 (coqint_of_camlint
+ (if sixtyfour || splitlong then 64l else 32l));
+ (* S := initial shift amount (16 or 32) *)
+ expand_loadimm32 X8 (coqint_of_camlint (if sixtyfour then 32l else 16l));
+ if splitlong then begin
+ (* if (Xlow == 0) goto lbl1 *)
+ emit (Pbeqw(X X5, X0, lbl1));
+ (* N := 32 *)
+ expand_loadimm32 X7 (coqint_of_camlint 32l);
+ (* X := Xlow *)
+ emit (Pmv(X6, X5))
+ end;
+ (* lbl1: *)
+ emit (Plabel lbl1);
+ (* Y := X >> S *)
+ emit (if sixtyfour then Pslll(X9, X X6, X X8) else Psllw(X9, X X6, X X8));
+ (* if (Y == 0) goto lbl2 *)
+ emit (if sixtyfour then Pbeql(X X9, X0, lbl2) else Pbeqw(X X9, X0, lbl2));
+ (* N := N - S *)
+ emit (Psubw(X7, X X7, X X8));
+ (* X := Y *)
+ emit (Pmv(X6, X9));
+ (* lbl2: *)
+ emit (Plabel lbl2);
+ (* S := S / 2 *)
+ emit (Psrliw(X8, X X8, _1));
+ (* if (S != 0) goto lbl1; *)
+ emit (Pbnew(X X8, X0, lbl1));
+ (* N := N - most significant bit of X *)
+ emit (if sixtyfour then Psrlil(X6, X X6, coqint_of_camlint 63l)
+ else Psrliw(X6, X X6, coqint_of_camlint 31l));
+ emit (Psubw(X7, X X7, X X6))
+
(* Handling of compiler-inlined builtins *)
let expand_builtin_inline name args res =
@@ -418,10 +502,33 @@ let expand_builtin_inline name args res =
assert (ah = X6 && al = X5 && rh = X5 && rl = X6);
expand_bswap32 X5 X5;
expand_bswap32 X6 X6
+ (* Count zeros *)
+ | "__builtin_clz", [BA(IR a)], BR(IR res) ->
+ assert (a = X5 && res = X7);
+ expand_clz ~sixtyfour:false ~splitlong:false
+ | "__builtin_clzl", [BA(IR a)], BR(IR res) ->
+ assert (a = X5 && res = X7);
+ expand_clz ~sixtyfour:Archi.ptr64 ~splitlong:false
+ | "__builtin_clzll", [BA(IR a)], BR(IR res) ->
+ assert (a = X5 && res = X7);
+ expand_clz ~sixtyfour:true ~splitlong:false
+ | "__builtin_clzll", [BA_splitlong(BA(IR ah), BA(IR al))], BR(IR res) ->
+ assert (al = X5 && ah = X6 && res = X7);
+ expand_clz ~sixtyfour:false ~splitlong:true
+ | "__builtin_ctz", [BA(IR a)], BR(IR res) ->
+ assert (a = X6 && res = X7);
+ expand_ctz ~sixtyfour:false ~splitlong:false
+ | "__builtin_ctzl", [BA(IR a)], BR(IR res) ->
+ assert (a = X6 && res = X7);
+ expand_ctz ~sixtyfour:Archi.ptr64 ~splitlong:false
+ | "__builtin_ctzll", [BA(IR a)], BR(IR res) ->
+ assert (a = X6 && res = X7);
+ expand_ctz ~sixtyfour:true ~splitlong:false
+ | "__builtin_ctzll", [BA_splitlong(BA(IR ah), BA(IR al))], BR(IR res) ->
+ assert (al = X5 && ah = X6 && res = X7);
+ expand_ctz ~sixtyfour:false ~splitlong:true
(* Float arithmetic *)
- | "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
- emit (Pfabsd(res, a1))
- | "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
+ | ("__builtin_fsqrt" | "__builtin_sqrt"), [BA(FR a1)], BR(FR res) ->
emit (Pfsqrtd(res, a1))
| "__builtin_fmadd", [BA(FR a1); BA(FR a2); BA(FR a3)], BR(FR res) ->
emit (Pfmaddd(res, a1, a2, a3))
diff --git a/riscV/Machregs.v b/riscV/Machregs.v
index d8bb4a4b..d469e594 100644
--- a/riscV/Machregs.v
+++ b/riscV/Machregs.v
@@ -194,6 +194,17 @@ Definition destroyed_by_builtin (ef: external_function): list mreg :=
match ef with
| EF_inline_asm txt sg clob => destroyed_by_clobber clob
| EF_memcpy sz al => R5 :: R6 :: R7 :: F0 :: nil
+ | EF_builtin name sg =>
+ if string_dec name "__builtin_clz"
+ || string_dec name "__builtin_clzl"
+ || string_dec name "__builtin_clzll" then
+ R5 :: R8 :: R9 :: nil
+ else if string_dec name "__builtin_ctz"
+ || string_dec name "__builtin_ctzl"
+ || string_dec name "__builtin_ctzll" then
+ R6 :: R8 :: R9 :: nil
+ else
+ nil
| _ => nil
end.
@@ -213,6 +224,20 @@ Definition mregs_for_builtin (ef: external_function): list (option mreg) * list(
| EF_builtin name sg =>
if (negb Archi.ptr64) && string_dec name "__builtin_bswap64" then
(Some R6 :: Some R5 :: nil, Some R5 :: Some R6 :: nil)
+ else if string_dec name "__builtin_clz"
+ || string_dec name "__builtin_clzl" then
+ (Some R5 :: nil, Some R7 :: nil)
+ else if string_dec name "__builtin_clzll" then
+ if Archi.ptr64
+ then (Some R5 :: nil, Some R7 :: nil)
+ else (Some R6 :: Some R5 :: nil, Some R7 :: nil)
+ else if string_dec name "__builtin_ctz"
+ || string_dec name "__builtin_ctzl" then
+ (Some R6 :: nil, Some R7 :: nil)
+ else if string_dec name "__builtin_ctzll" then
+ if Archi.ptr64
+ then (Some R6 :: nil, Some R7 :: nil)
+ else (Some R6 :: Some R5 :: nil, Some R7 :: nil)
else
(nil, nil)
| _ =>
diff --git a/riscV/Machregsaux.ml b/riscV/Machregsaux.ml
index 07097eaf..840943e7 100644
--- a/riscV/Machregsaux.ml
+++ b/riscV/Machregsaux.ml
@@ -12,25 +12,7 @@
(** Auxiliary functions on machine registers *)
-open Camlcoq
-open Machregs
-
-let register_names : (mreg, string) Hashtbl.t = Hashtbl.create 31
-
-let _ =
- List.iter
- (fun (s, r) -> Hashtbl.add register_names r (camlstring_of_coqstring s))
- Machregs.register_names
-
let is_scratch_register r = false
-
-let name_of_register r =
- try Some (Hashtbl.find register_names r) with Not_found -> None
-
-let register_by_name s =
- Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s)
-
-let can_reserve_register r = Conventions1.is_callee_save r
let class_of_type = function
| AST.Tint | AST.Tlong -> 0
diff --git a/riscV/Machregsaux.mli b/riscV/Machregsaux.mli
index d7117c21..01b0f9fd 100644
--- a/riscV/Machregsaux.mli
+++ b/riscV/Machregsaux.mli
@@ -12,9 +12,6 @@
(** Auxiliary functions on machine registers *)
-val name_of_register: Machregs.mreg -> string option
-val register_by_name: string -> Machregs.mreg option
val is_scratch_register: string -> bool
-val can_reserve_register: Machregs.mreg -> bool
val class_of_type: AST.typ -> int
diff --git a/runtime/x86_64/i64_dtou.S b/runtime/x86_64/i64_dtou.S
index cc822d67..7f12ae88 100644
--- a/runtime/x86_64/i64_dtou.S
+++ b/runtime/x86_64/i64_dtou.S
@@ -39,13 +39,13 @@
// Conversion float -> unsigned long
FUNCTION(__compcert_i64_dtou)
- ucomisd .LC1(%rip), %xmm0
+ ucomisd .LC1(%rip), FP_ARG_1
jnb 1f
- cvttsd2siq %xmm0, %rax
+ cvttsd2siq FP_ARG_1, INT_RES
ret
-1: subsd .LC1(%rip), %xmm0
- cvttsd2siq %xmm0, %rax
- addq .LC2(%rip), %rax
+1: subsd .LC1(%rip), FP_ARG_1
+ cvttsd2siq FP_ARG_1, INT_RES
+ addq .LC2(%rip), INT_RES
ret
.p2align 3
diff --git a/runtime/x86_64/i64_utod.S b/runtime/x86_64/i64_utod.S
index 62e6e484..4d4870fc 100644
--- a/runtime/x86_64/i64_utod.S
+++ b/runtime/x86_64/i64_utod.S
@@ -39,18 +39,18 @@
// Conversion unsigned long -> double-precision float
FUNCTION(__compcert_i64_utod)
- testq %rdi, %rdi
+ testq INT_ARG_1, INT_ARG_1
js 1f
- pxor %xmm0, %xmm0 // if < 2^63,
- cvtsi2sdq %rdi, %xmm0 // convert as if signed
+ pxor FP_RES, FP_RES // if < 2^63,
+ cvtsi2sdq INT_ARG_1, FP_RES // convert as if signed
ret
1: // if >= 2^63, use round-to-odd trick
- movq %rdi, %rax
+ movq INT_ARG_1, %rax
shrq %rax
- andq $1, %rdi
- orq %rdi, %rax // (arg >> 1) | (arg & 1)
- pxor %xmm0, %xmm0
- cvtsi2sdq %rax, %xmm0 // convert as if signed
- addsd %xmm0, %xmm0 // multiply result by 2.0
+ andq $1, INT_ARG_1
+ orq INT_ARG_1, %rax // (arg >> 1) | (arg & 1)
+ pxor FP_RES, FP_RES
+ cvtsi2sdq %rax, FP_RES // convert as if signed
+ addsd FP_RES, FP_RES // multiply result by 2.0
ret
ENDFUNCTION(__compcert_i64_utod)
diff --git a/runtime/x86_64/i64_utof.S b/runtime/x86_64/i64_utof.S
index 63a33920..0e878121 100644
--- a/runtime/x86_64/i64_utof.S
+++ b/runtime/x86_64/i64_utof.S
@@ -39,18 +39,18 @@
// Conversion unsigned long -> single-precision float
FUNCTION(__compcert_i64_utof)
- testq %rdi, %rdi
+ testq INT_ARG_1, INT_ARG_1
js 1f
- pxor %xmm0, %xmm0 // if < 2^63,
- cvtsi2ssq %rdi, %xmm0 // convert as if signed
+ pxor FP_RES, FP_RES // if < 2^63,
+ cvtsi2ssq INT_ARG_1, FP_RES // convert as if signed
ret
1: // if >= 2^63, use round-to-odd trick
- movq %rdi, %rax
+ movq INT_ARG_1, %rax
shrq %rax
- andq $1, %rdi
- orq %rdi, %rax // (arg >> 1) | (arg & 1)
- pxor %xmm0, %xmm0
- cvtsi2ssq %rax, %xmm0 // convert as if signed
- addss %xmm0, %xmm0 // multiply result by 2.0
+ andq $1, INT_ARG_1
+ orq INT_ARG_1, %rax // (arg >> 1) | (arg & 1)
+ pxor FP_RES, FP_RES
+ cvtsi2ssq %rax, FP_RES // convert as if signed
+ addss FP_RES, FP_RES // multiply result by 2.0
ret
ENDFUNCTION(__compcert_i64_utof)
diff --git a/runtime/x86_64/sysdeps.h b/runtime/x86_64/sysdeps.h
index e9d456af..aacef8f0 100644
--- a/runtime/x86_64/sysdeps.h
+++ b/runtime/x86_64/sysdeps.h
@@ -63,13 +63,25 @@ _##f:
#if defined(SYS_cygwin)
-#define GLOB(x) _##x
+#define GLOB(x) x
#define FUNCTION(f) \
.text; \
- .globl _##f; \
+ .globl f; \
.align 16; \
-_##f:
+f:
#define ENDFUNCTION(f)
#endif
+
+// Names for argument and result registers
+
+#if defined(SYS_cygwin)
+#define INT_ARG_1 %rcx
+#else
+#define INT_ARG_1 %rdi
+#endif
+#define FP_ARG_1 %xmm0
+#define INT_RES %rax
+#define FP_RES %xmm0
+
diff --git a/runtime/x86_64/vararg.S b/runtime/x86_64/vararg.S
index 9c0d787b..c5225b34 100644
--- a/runtime/x86_64/vararg.S
+++ b/runtime/x86_64/vararg.S
@@ -34,6 +34,12 @@
// Helper functions for variadic functions <stdarg.h>. x86_64 version.
+#include "sysdeps.h"
+
+// ELF ABI
+
+#if defined(SYS_linux) || defined(SYS_bsd) || defined(SYS_macosx)
+
// typedef struct {
// unsigned int gp_offset;
// unsigned int fp_offset;
@@ -60,8 +66,6 @@
// unsigned long long __compcert_va_int64(va_list ap);
// double __compcert_va_float64(va_list ap);
-#include "sysdeps.h"
-
FUNCTION(__compcert_va_int32)
movl 0(%rdi), %edx // edx = gp_offset
cmpl $48, %edx
@@ -146,3 +150,58 @@ FUNCTION(__compcert_va_saveregs)
movaps %xmm7, 160(%r10)
1: ret
ENDFUNCTION(__compcert_va_saveregs)
+
+#endif
+
+// Windows ABI
+
+#if defined(SYS_cygwin)
+
+// typedef void * va_list;
+// unsigned int __compcert_va_int32(va_list * ap);
+// unsigned long long __compcert_va_int64(va_list * ap);
+// double __compcert_va_float64(va_list * ap);
+
+FUNCTION(__compcert_va_int32) // %rcx = pointer to argument pointer
+ movq 0(%rcx), %rdx // %rdx = current argument pointer
+ movl 0(%rdx), %eax // load the int32 value there
+ addq $8, %rdx // increment argument pointer by 8
+ movq %rdx, 0(%rcx)
+ ret
+ENDFUNCTION(__compcert_va_int32)
+
+FUNCTION(__compcert_va_int64) // %rcx = pointer to argument pointer
+ movq 0(%rcx), %rdx // %rdx = current argument pointer
+ movq 0(%rdx), %rax // load the int64 value there
+ addq $8, %rdx // increment argument pointer by 8
+ movq %rdx, 0(%rcx)
+ ret
+ENDFUNCTION(__compcert_va_int64)
+
+FUNCTION(__compcert_va_float64) // %rcx = pointer to argument pointer
+ movq 0(%rcx), %rdx // %rdx = current argument pointer
+ movsd 0(%rdx), %xmm0 // load the float64 value there
+ addq $8, %rdx // increment argument pointer by 8
+ movq %rdx, 0(%rcx)
+ ret
+ENDFUNCTION(__compcert_va_float64)
+
+FUNCTION(__compcert_va_composite)
+ jmp GLOB(__compcert_va_int64) // by-ref convention, FIXME
+ENDFUNCTION(__compcert_va_composite)
+
+// Save arguments passed in register in the stack at beginning of vararg
+// function. The caller of the vararg function reserved 32 bytes of stack
+// just for this purpose.
+// FP arguments are passed both in FP registers and integer registers,
+// so it's enough to save the integer registers used for parameter passing.
+
+FUNCTION(__compcert_va_saveregs)
+ movq %rcx, 16(%rsp)
+ movq %rdx, 24(%rsp)
+ movq %r8, 32(%rsp)
+ movq %r9, 40(%rsp)
+ ret
+ENDFUNCTION(__compcert_va_saveregs)
+
+#endif
diff --git a/test/clightgen/Makefile b/test/clightgen/Makefile
index 0607e2fa..f0e9d961 100644
--- a/test/clightgen/Makefile
+++ b/test/clightgen/Makefile
@@ -5,8 +5,12 @@ ARCHDIRS=$(ARCH)
else
ARCHDIRS=$(ARCH)_$(BITSIZE) $(ARCH)
endif
-RECDIRS=lib common $(ARCHDIRS) cfrontend flocq exportclight
-COQINCLUDES=$(foreach d, $(RECDIRS), -R ../../$(d) compcert.$(d))
+RECDIRS := lib common $(ARCHDIRS) cfrontend exportclight
+COQINCLUDES := $(foreach d, $(RECDIRS), -R ../../$(d) compcert.$(d))
+ifeq ($(LIBRARY_FLOCQ),local)
+COQINCLUDES += -R ../../flocq Flocq
+endif
+
CLIGHTGEN=../../clightgen
COQC=coqc
@@ -22,6 +26,14 @@ SRC+=aes.c almabench.c binarytrees.c bisect.c chomp.c fannkuch.c fft.c \
SRC+=arrays.c eval.c gmllexer.c gmlparser.c intersect.c light.c main.c \
matrix.c memory.c object.c render.c simplify.c surface.c vector.c
+CFLAGS=-DSYSTEM_$(SYSTEM)
+
+aes.vo almabench.vo binarytrees.vo bisect.vo chomp.vo: CFLAGS += -short-idents
+
+fft.vo fftsp.vo fftw.vo fib.vo integr.vo knucleotide.vo: CFLAGS += -short-idents -normalize
+
+qsort.vo sha1.vo sha3.vo siphash24.vo spectral.vo vmach.vo: CFLAGS += -normalize
+
all: $(SRC:.c=.vo)
test:
@@ -41,4 +53,4 @@ test:
.SECONDARY: $(SRC:.c=.v)
clean:
- rm -f *.v *.vo .*.aux
+ rm -f *.v *.vo* .*.aux
diff --git a/test/clightgen/annotations.c b/test/clightgen/annotations.c
new file mode 100644
index 00000000..e91c7fbc
--- /dev/null
+++ b/test/clightgen/annotations.c
@@ -0,0 +1,8 @@
+int f(int x, long y)
+{
+#if !defined(SYSTEM_macosx) && !defined(SYSTEM_cygwin)
+ __builtin_ais_annot("x is %e1, y is %e2", x, y);
+#endif
+ __builtin_annot("x is %1, y is %2", x, y);
+ return __builtin_annot_intval("x was here: %1", x);
+}
diff --git a/test/regression/Makefile b/test/regression/Makefile
index 8b2f4021..56d90469 100644
--- a/test/regression/Makefile
+++ b/test/regression/Makefile
@@ -24,9 +24,8 @@ TESTS?=int32 int64 floats floats-basics floats-lit \
TESTS_COMP?=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \
bitfields5 bitfields6 bitfields7 bitfields8 \
- builtins-$(ARCH) alignas \
- varargs1 varargs2 varargs3 sections alias aligned\
- packedstruct1 packedstruct2
+ builtins-common builtins-$(ARCH) packedstruct1 packedstruct2 alignas \
+ varargs1 varargs2 varargs3 sections alias aligned
ifeq ($(ARCH),kvx)
TESTS_COMP:=$(filter-out packedstruct1,$(TESTS_COMP))
diff --git a/test/regression/Results/builtins-aarch64 b/test/regression/Results/builtins-aarch64
index c70432d8..7e3575e5 100644
--- a/test/regression/Results/builtins-aarch64
+++ b/test/regression/Results/builtins-aarch64
@@ -1,14 +1,7 @@
-bswap(12345678) = 78563412
-bswap16(1234) = 3412
-bswap64(123456789abcdef0) = f0debc9a78563412
-clz(12345678) = 3
-clzll(12345678) = 35
-clzll(1234567812345678) = 3
cls(1234567) = 10
cls(-9999) = 17
clsll(1234567) = 42
clsll(-9999) = 49
-fsqrt(3.141590) = 1.772453
fmadd(3.141590, 2.718000, 1.414000) = 9.952842
fmsub(3.141590, 2.718000, 1.414000) = -7.124842
fnmadd(3.141590, 2.718000, 1.414000) = -9.952842
diff --git a/test/regression/Results/builtins-arm b/test/regression/Results/builtins-arm
index f637fb16..bfdad28d 100644
--- a/test/regression/Results/builtins-arm
+++ b/test/regression/Results/builtins-arm
@@ -1,9 +1,3 @@
-bswap(12345678) = 78563412
-bswap16(1234) = 3412
-clz(12345678) = 3
-clzll(12345678) = 35
-clzll(1234567812345678) = 3
-clzll(78563412) = 33
fsqrt(3.141590) = 1.772453
read_16_rev = 3412
read_32_rev = efbeadde
diff --git a/test/regression/Results/builtins-common b/test/regression/Results/builtins-common
new file mode 100644
index 00000000..8adf7bfb
--- /dev/null
+++ b/test/regression/Results/builtins-common
@@ -0,0 +1,393 @@
+bswap(12345678) = 78563412
+bswap16(1234) = 3412
+bswap64(123456789abcdef0) = f0debc9a78563412
+clz(ffffffff) = 0
+clz(80000000) = 0
+clz(7fffffff) = 1
+clz(40000000) = 1
+clz(3fffffff) = 2
+clz(20000000) = 2
+clz(1fffffff) = 3
+clz(10000000) = 3
+clz(0fffffff) = 4
+clz(08000000) = 4
+clz(07ffffff) = 5
+clz(04000000) = 5
+clz(03ffffff) = 6
+clz(02000000) = 6
+clz(01ffffff) = 7
+clz(01000000) = 7
+clz(00ffffff) = 8
+clz(00800000) = 8
+clz(007fffff) = 9
+clz(00400000) = 9
+clz(003fffff) = 10
+clz(00200000) = 10
+clz(001fffff) = 11
+clz(00100000) = 11
+clz(000fffff) = 12
+clz(00080000) = 12
+clz(0007ffff) = 13
+clz(00040000) = 13
+clz(0003ffff) = 14
+clz(00020000) = 14
+clz(0001ffff) = 15
+clz(00010000) = 15
+clz(0000ffff) = 16
+clz(00008000) = 16
+clz(00007fff) = 17
+clz(00004000) = 17
+clz(00003fff) = 18
+clz(00002000) = 18
+clz(00001fff) = 19
+clz(00001000) = 19
+clz(00000fff) = 20
+clz(00000800) = 20
+clz(000007ff) = 21
+clz(00000400) = 21
+clz(000003ff) = 22
+clz(00000200) = 22
+clz(000001ff) = 23
+clz(00000100) = 23
+clz(000000ff) = 24
+clz(00000080) = 24
+clz(0000007f) = 25
+clz(00000040) = 25
+clz(0000003f) = 26
+clz(00000020) = 26
+clz(0000001f) = 27
+clz(00000010) = 27
+clz(0000000f) = 28
+clz(00000008) = 28
+clz(00000007) = 29
+clz(00000004) = 29
+clz(00000003) = 30
+clz(00000002) = 30
+clz(00000001) = 31
+clz(00000001) = 31
+clzll(ffffffffffffffff) = 0
+clzll(8000000000000000) = 0
+clzll(7fffffffffffffff) = 1
+clzll(4000000000000000) = 1
+clzll(3fffffffffffffff) = 2
+clzll(2000000000000000) = 2
+clzll(1fffffffffffffff) = 3
+clzll(1000000000000000) = 3
+clzll(0fffffffffffffff) = 4
+clzll(0800000000000000) = 4
+clzll(07ffffffffffffff) = 5
+clzll(0400000000000000) = 5
+clzll(03ffffffffffffff) = 6
+clzll(0200000000000000) = 6
+clzll(01ffffffffffffff) = 7
+clzll(0100000000000000) = 7
+clzll(00ffffffffffffff) = 8
+clzll(0080000000000000) = 8
+clzll(007fffffffffffff) = 9
+clzll(0040000000000000) = 9
+clzll(003fffffffffffff) = 10
+clzll(0020000000000000) = 10
+clzll(001fffffffffffff) = 11
+clzll(0010000000000000) = 11
+clzll(000fffffffffffff) = 12
+clzll(0008000000000000) = 12
+clzll(0007ffffffffffff) = 13
+clzll(0004000000000000) = 13
+clzll(0003ffffffffffff) = 14
+clzll(0002000000000000) = 14
+clzll(0001ffffffffffff) = 15
+clzll(0001000000000000) = 15
+clzll(0000ffffffffffff) = 16
+clzll(0000800000000000) = 16
+clzll(00007fffffffffff) = 17
+clzll(0000400000000000) = 17
+clzll(00003fffffffffff) = 18
+clzll(0000200000000000) = 18
+clzll(00001fffffffffff) = 19
+clzll(0000100000000000) = 19
+clzll(00000fffffffffff) = 20
+clzll(0000080000000000) = 20
+clzll(000007ffffffffff) = 21
+clzll(0000040000000000) = 21
+clzll(000003ffffffffff) = 22
+clzll(0000020000000000) = 22
+clzll(000001ffffffffff) = 23
+clzll(0000010000000000) = 23
+clzll(000000ffffffffff) = 24
+clzll(0000008000000000) = 24
+clzll(0000007fffffffff) = 25
+clzll(0000004000000000) = 25
+clzll(0000003fffffffff) = 26
+clzll(0000002000000000) = 26
+clzll(0000001fffffffff) = 27
+clzll(0000001000000000) = 27
+clzll(0000000fffffffff) = 28
+clzll(0000000800000000) = 28
+clzll(00000007ffffffff) = 29
+clzll(0000000400000000) = 29
+clzll(00000003ffffffff) = 30
+clzll(0000000200000000) = 30
+clzll(00000001ffffffff) = 31
+clzll(0000000100000000) = 31
+clzll(00000000ffffffff) = 32
+clzll(0000000080000000) = 32
+clzll(000000007fffffff) = 33
+clzll(0000000040000000) = 33
+clzll(000000003fffffff) = 34
+clzll(0000000020000000) = 34
+clzll(000000001fffffff) = 35
+clzll(0000000010000000) = 35
+clzll(000000000fffffff) = 36
+clzll(0000000008000000) = 36
+clzll(0000000007ffffff) = 37
+clzll(0000000004000000) = 37
+clzll(0000000003ffffff) = 38
+clzll(0000000002000000) = 38
+clzll(0000000001ffffff) = 39
+clzll(0000000001000000) = 39
+clzll(0000000000ffffff) = 40
+clzll(0000000000800000) = 40
+clzll(00000000007fffff) = 41
+clzll(0000000000400000) = 41
+clzll(00000000003fffff) = 42
+clzll(0000000000200000) = 42
+clzll(00000000001fffff) = 43
+clzll(0000000000100000) = 43
+clzll(00000000000fffff) = 44
+clzll(0000000000080000) = 44
+clzll(000000000007ffff) = 45
+clzll(0000000000040000) = 45
+clzll(000000000003ffff) = 46
+clzll(0000000000020000) = 46
+clzll(000000000001ffff) = 47
+clzll(0000000000010000) = 47
+clzll(000000000000ffff) = 48
+clzll(0000000000008000) = 48
+clzll(0000000000007fff) = 49
+clzll(0000000000004000) = 49
+clzll(0000000000003fff) = 50
+clzll(0000000000002000) = 50
+clzll(0000000000001fff) = 51
+clzll(0000000000001000) = 51
+clzll(0000000000000fff) = 52
+clzll(0000000000000800) = 52
+clzll(00000000000007ff) = 53
+clzll(0000000000000400) = 53
+clzll(00000000000003ff) = 54
+clzll(0000000000000200) = 54
+clzll(00000000000001ff) = 55
+clzll(0000000000000100) = 55
+clzll(00000000000000ff) = 56
+clzll(0000000000000080) = 56
+clzll(000000000000007f) = 57
+clzll(0000000000000040) = 57
+clzll(000000000000003f) = 58
+clzll(0000000000000020) = 58
+clzll(000000000000001f) = 59
+clzll(0000000000000010) = 59
+clzll(000000000000000f) = 60
+clzll(0000000000000008) = 60
+clzll(0000000000000007) = 61
+clzll(0000000000000004) = 61
+clzll(0000000000000003) = 62
+clzll(0000000000000002) = 62
+clzll(0000000000000001) = 63
+clzll(0000000000000001) = 63
+ctz(00000001) = 0
+ctz(ffffffff) = 0
+ctz(00000002) = 1
+ctz(fffffffe) = 1
+ctz(00000004) = 2
+ctz(fffffffc) = 2
+ctz(00000008) = 3
+ctz(fffffff8) = 3
+ctz(00000010) = 4
+ctz(fffffff0) = 4
+ctz(00000020) = 5
+ctz(ffffffe0) = 5
+ctz(00000040) = 6
+ctz(ffffffc0) = 6
+ctz(00000080) = 7
+ctz(ffffff80) = 7
+ctz(00000100) = 8
+ctz(ffffff00) = 8
+ctz(00000200) = 9
+ctz(fffffe00) = 9
+ctz(00000400) = 10
+ctz(fffffc00) = 10
+ctz(00000800) = 11
+ctz(fffff800) = 11
+ctz(00001000) = 12
+ctz(fffff000) = 12
+ctz(00002000) = 13
+ctz(ffffe000) = 13
+ctz(00004000) = 14
+ctz(ffffc000) = 14
+ctz(00008000) = 15
+ctz(ffff8000) = 15
+ctz(00010000) = 16
+ctz(ffff0000) = 16
+ctz(00020000) = 17
+ctz(fffe0000) = 17
+ctz(00040000) = 18
+ctz(fffc0000) = 18
+ctz(00080000) = 19
+ctz(fff80000) = 19
+ctz(00100000) = 20
+ctz(fff00000) = 20
+ctz(00200000) = 21
+ctz(ffe00000) = 21
+ctz(00400000) = 22
+ctz(ffc00000) = 22
+ctz(00800000) = 23
+ctz(ff800000) = 23
+ctz(01000000) = 24
+ctz(ff000000) = 24
+ctz(02000000) = 25
+ctz(fe000000) = 25
+ctz(04000000) = 26
+ctz(fc000000) = 26
+ctz(08000000) = 27
+ctz(f8000000) = 27
+ctz(10000000) = 28
+ctz(f0000000) = 28
+ctz(20000000) = 29
+ctz(e0000000) = 29
+ctz(40000000) = 30
+ctz(c0000000) = 30
+ctz(80000000) = 31
+ctz(80000000) = 31
+ctzll(0000000000000001) = 0
+ctzll(ffffffffffffffff) = 0
+ctzll(0000000000000002) = 1
+ctzll(fffffffffffffffe) = 1
+ctzll(0000000000000004) = 2
+ctzll(fffffffffffffffc) = 2
+ctzll(0000000000000008) = 3
+ctzll(fffffffffffffff8) = 3
+ctzll(0000000000000010) = 4
+ctzll(fffffffffffffff0) = 4
+ctzll(0000000000000020) = 5
+ctzll(ffffffffffffffe0) = 5
+ctzll(0000000000000040) = 6
+ctzll(ffffffffffffffc0) = 6
+ctzll(0000000000000080) = 7
+ctzll(ffffffffffffff80) = 7
+ctzll(0000000000000100) = 8
+ctzll(ffffffffffffff00) = 8
+ctzll(0000000000000200) = 9
+ctzll(fffffffffffffe00) = 9
+ctzll(0000000000000400) = 10
+ctzll(fffffffffffffc00) = 10
+ctzll(0000000000000800) = 11
+ctzll(fffffffffffff800) = 11
+ctzll(0000000000001000) = 12
+ctzll(fffffffffffff000) = 12
+ctzll(0000000000002000) = 13
+ctzll(ffffffffffffe000) = 13
+ctzll(0000000000004000) = 14
+ctzll(ffffffffffffc000) = 14
+ctzll(0000000000008000) = 15
+ctzll(ffffffffffff8000) = 15
+ctzll(0000000000010000) = 16
+ctzll(ffffffffffff0000) = 16
+ctzll(0000000000020000) = 17
+ctzll(fffffffffffe0000) = 17
+ctzll(0000000000040000) = 18
+ctzll(fffffffffffc0000) = 18
+ctzll(0000000000080000) = 19
+ctzll(fffffffffff80000) = 19
+ctzll(0000000000100000) = 20
+ctzll(fffffffffff00000) = 20
+ctzll(0000000000200000) = 21
+ctzll(ffffffffffe00000) = 21
+ctzll(0000000000400000) = 22
+ctzll(ffffffffffc00000) = 22
+ctzll(0000000000800000) = 23
+ctzll(ffffffffff800000) = 23
+ctzll(0000000001000000) = 24
+ctzll(ffffffffff000000) = 24
+ctzll(0000000002000000) = 25
+ctzll(fffffffffe000000) = 25
+ctzll(0000000004000000) = 26
+ctzll(fffffffffc000000) = 26
+ctzll(0000000008000000) = 27
+ctzll(fffffffff8000000) = 27
+ctzll(0000000010000000) = 28
+ctzll(fffffffff0000000) = 28
+ctzll(0000000020000000) = 29
+ctzll(ffffffffe0000000) = 29
+ctzll(0000000040000000) = 30
+ctzll(ffffffffc0000000) = 30
+ctzll(0000000080000000) = 31
+ctzll(ffffffff80000000) = 31
+ctzll(0000000100000000) = 32
+ctzll(ffffffff00000000) = 32
+ctzll(0000000200000000) = 33
+ctzll(fffffffe00000000) = 33
+ctzll(0000000400000000) = 34
+ctzll(fffffffc00000000) = 34
+ctzll(0000000800000000) = 35
+ctzll(fffffff800000000) = 35
+ctzll(0000001000000000) = 36
+ctzll(fffffff000000000) = 36
+ctzll(0000002000000000) = 37
+ctzll(ffffffe000000000) = 37
+ctzll(0000004000000000) = 38
+ctzll(ffffffc000000000) = 38
+ctzll(0000008000000000) = 39
+ctzll(ffffff8000000000) = 39
+ctzll(0000010000000000) = 40
+ctzll(ffffff0000000000) = 40
+ctzll(0000020000000000) = 41
+ctzll(fffffe0000000000) = 41
+ctzll(0000040000000000) = 42
+ctzll(fffffc0000000000) = 42
+ctzll(0000080000000000) = 43
+ctzll(fffff80000000000) = 43
+ctzll(0000100000000000) = 44
+ctzll(fffff00000000000) = 44
+ctzll(0000200000000000) = 45
+ctzll(ffffe00000000000) = 45
+ctzll(0000400000000000) = 46
+ctzll(ffffc00000000000) = 46
+ctzll(0000800000000000) = 47
+ctzll(ffff800000000000) = 47
+ctzll(0001000000000000) = 48
+ctzll(ffff000000000000) = 48
+ctzll(0002000000000000) = 49
+ctzll(fffe000000000000) = 49
+ctzll(0004000000000000) = 50
+ctzll(fffc000000000000) = 50
+ctzll(0008000000000000) = 51
+ctzll(fff8000000000000) = 51
+ctzll(0010000000000000) = 52
+ctzll(fff0000000000000) = 52
+ctzll(0020000000000000) = 53
+ctzll(ffe0000000000000) = 53
+ctzll(0040000000000000) = 54
+ctzll(ffc0000000000000) = 54
+ctzll(0080000000000000) = 55
+ctzll(ff80000000000000) = 55
+ctzll(0100000000000000) = 56
+ctzll(ff00000000000000) = 56
+ctzll(0200000000000000) = 57
+ctzll(fe00000000000000) = 57
+ctzll(0400000000000000) = 58
+ctzll(fc00000000000000) = 58
+ctzll(0800000000000000) = 59
+ctzll(f800000000000000) = 59
+ctzll(1000000000000000) = 60
+ctzll(f000000000000000) = 60
+ctzll(2000000000000000) = 61
+ctzll(e000000000000000) = 61
+ctzll(4000000000000000) = 62
+ctzll(c000000000000000) = 62
+ctzll(8000000000000000) = 63
+ctzll(8000000000000000) = 63
+fabs(3.141590) = 3.141590
+fabs(-3.141590) = 3.141590
+fabsf(7.250000) = 7.250000
+fabsf(-7.250000) = 7.250000
+fsqrt(3.141590) = 1.772453
+sqrt(3.141590) = 1.772453
diff --git a/test/regression/Results/builtins-common-kvx b/test/regression/Results/builtins-common-kvx
new file mode 100644
index 00000000..fad75e7c
--- /dev/null
+++ b/test/regression/Results/builtins-common-kvx
@@ -0,0 +1,391 @@
+bswap(12345678) = 78563412
+bswap16(1234) = 3412
+bswap64(123456789abcdef0) = f0debc9a78563412
+clz(ffffffff) = 0
+clz(80000000) = 0
+clz(7fffffff) = 1
+clz(40000000) = 1
+clz(3fffffff) = 2
+clz(20000000) = 2
+clz(1fffffff) = 3
+clz(10000000) = 3
+clz(0fffffff) = 4
+clz(08000000) = 4
+clz(07ffffff) = 5
+clz(04000000) = 5
+clz(03ffffff) = 6
+clz(02000000) = 6
+clz(01ffffff) = 7
+clz(01000000) = 7
+clz(00ffffff) = 8
+clz(00800000) = 8
+clz(007fffff) = 9
+clz(00400000) = 9
+clz(003fffff) = 10
+clz(00200000) = 10
+clz(001fffff) = 11
+clz(00100000) = 11
+clz(000fffff) = 12
+clz(00080000) = 12
+clz(0007ffff) = 13
+clz(00040000) = 13
+clz(0003ffff) = 14
+clz(00020000) = 14
+clz(0001ffff) = 15
+clz(00010000) = 15
+clz(0000ffff) = 16
+clz(00008000) = 16
+clz(00007fff) = 17
+clz(00004000) = 17
+clz(00003fff) = 18
+clz(00002000) = 18
+clz(00001fff) = 19
+clz(00001000) = 19
+clz(00000fff) = 20
+clz(00000800) = 20
+clz(000007ff) = 21
+clz(00000400) = 21
+clz(000003ff) = 22
+clz(00000200) = 22
+clz(000001ff) = 23
+clz(00000100) = 23
+clz(000000ff) = 24
+clz(00000080) = 24
+clz(0000007f) = 25
+clz(00000040) = 25
+clz(0000003f) = 26
+clz(00000020) = 26
+clz(0000001f) = 27
+clz(00000010) = 27
+clz(0000000f) = 28
+clz(00000008) = 28
+clz(00000007) = 29
+clz(00000004) = 29
+clz(00000003) = 30
+clz(00000002) = 30
+clz(00000001) = 31
+clz(00000001) = 31
+clzll(ffffffffffffffff) = 0
+clzll(8000000000000000) = 0
+clzll(7fffffffffffffff) = 1
+clzll(4000000000000000) = 1
+clzll(3fffffffffffffff) = 2
+clzll(2000000000000000) = 2
+clzll(1fffffffffffffff) = 3
+clzll(1000000000000000) = 3
+clzll(0fffffffffffffff) = 4
+clzll(0800000000000000) = 4
+clzll(07ffffffffffffff) = 5
+clzll(0400000000000000) = 5
+clzll(03ffffffffffffff) = 6
+clzll(0200000000000000) = 6
+clzll(01ffffffffffffff) = 7
+clzll(0100000000000000) = 7
+clzll(00ffffffffffffff) = 8
+clzll(0080000000000000) = 8
+clzll(007fffffffffffff) = 9
+clzll(0040000000000000) = 9
+clzll(003fffffffffffff) = 10
+clzll(0020000000000000) = 10
+clzll(001fffffffffffff) = 11
+clzll(0010000000000000) = 11
+clzll(000fffffffffffff) = 12
+clzll(0008000000000000) = 12
+clzll(0007ffffffffffff) = 13
+clzll(0004000000000000) = 13
+clzll(0003ffffffffffff) = 14
+clzll(0002000000000000) = 14
+clzll(0001ffffffffffff) = 15
+clzll(0001000000000000) = 15
+clzll(0000ffffffffffff) = 16
+clzll(0000800000000000) = 16
+clzll(00007fffffffffff) = 17
+clzll(0000400000000000) = 17
+clzll(00003fffffffffff) = 18
+clzll(0000200000000000) = 18
+clzll(00001fffffffffff) = 19
+clzll(0000100000000000) = 19
+clzll(00000fffffffffff) = 20
+clzll(0000080000000000) = 20
+clzll(000007ffffffffff) = 21
+clzll(0000040000000000) = 21
+clzll(000003ffffffffff) = 22
+clzll(0000020000000000) = 22
+clzll(000001ffffffffff) = 23
+clzll(0000010000000000) = 23
+clzll(000000ffffffffff) = 24
+clzll(0000008000000000) = 24
+clzll(0000007fffffffff) = 25
+clzll(0000004000000000) = 25
+clzll(0000003fffffffff) = 26
+clzll(0000002000000000) = 26
+clzll(0000001fffffffff) = 27
+clzll(0000001000000000) = 27
+clzll(0000000fffffffff) = 28
+clzll(0000000800000000) = 28
+clzll(00000007ffffffff) = 29
+clzll(0000000400000000) = 29
+clzll(00000003ffffffff) = 30
+clzll(0000000200000000) = 30
+clzll(00000001ffffffff) = 31
+clzll(0000000100000000) = 31
+clzll(00000000ffffffff) = 32
+clzll(0000000080000000) = 32
+clzll(000000007fffffff) = 33
+clzll(0000000040000000) = 33
+clzll(000000003fffffff) = 34
+clzll(0000000020000000) = 34
+clzll(000000001fffffff) = 35
+clzll(0000000010000000) = 35
+clzll(000000000fffffff) = 36
+clzll(0000000008000000) = 36
+clzll(0000000007ffffff) = 37
+clzll(0000000004000000) = 37
+clzll(0000000003ffffff) = 38
+clzll(0000000002000000) = 38
+clzll(0000000001ffffff) = 39
+clzll(0000000001000000) = 39
+clzll(0000000000ffffff) = 40
+clzll(0000000000800000) = 40
+clzll(00000000007fffff) = 41
+clzll(0000000000400000) = 41
+clzll(00000000003fffff) = 42
+clzll(0000000000200000) = 42
+clzll(00000000001fffff) = 43
+clzll(0000000000100000) = 43
+clzll(00000000000fffff) = 44
+clzll(0000000000080000) = 44
+clzll(000000000007ffff) = 45
+clzll(0000000000040000) = 45
+clzll(000000000003ffff) = 46
+clzll(0000000000020000) = 46
+clzll(000000000001ffff) = 47
+clzll(0000000000010000) = 47
+clzll(000000000000ffff) = 48
+clzll(0000000000008000) = 48
+clzll(0000000000007fff) = 49
+clzll(0000000000004000) = 49
+clzll(0000000000003fff) = 50
+clzll(0000000000002000) = 50
+clzll(0000000000001fff) = 51
+clzll(0000000000001000) = 51
+clzll(0000000000000fff) = 52
+clzll(0000000000000800) = 52
+clzll(00000000000007ff) = 53
+clzll(0000000000000400) = 53
+clzll(00000000000003ff) = 54
+clzll(0000000000000200) = 54
+clzll(00000000000001ff) = 55
+clzll(0000000000000100) = 55
+clzll(00000000000000ff) = 56
+clzll(0000000000000080) = 56
+clzll(000000000000007f) = 57
+clzll(0000000000000040) = 57
+clzll(000000000000003f) = 58
+clzll(0000000000000020) = 58
+clzll(000000000000001f) = 59
+clzll(0000000000000010) = 59
+clzll(000000000000000f) = 60
+clzll(0000000000000008) = 60
+clzll(0000000000000007) = 61
+clzll(0000000000000004) = 61
+clzll(0000000000000003) = 62
+clzll(0000000000000002) = 62
+clzll(0000000000000001) = 63
+clzll(0000000000000001) = 63
+ctz(00000001) = 0
+ctz(ffffffff) = 0
+ctz(00000002) = 1
+ctz(fffffffe) = 1
+ctz(00000004) = 2
+ctz(fffffffc) = 2
+ctz(00000008) = 3
+ctz(fffffff8) = 3
+ctz(00000010) = 4
+ctz(fffffff0) = 4
+ctz(00000020) = 5
+ctz(ffffffe0) = 5
+ctz(00000040) = 6
+ctz(ffffffc0) = 6
+ctz(00000080) = 7
+ctz(ffffff80) = 7
+ctz(00000100) = 8
+ctz(ffffff00) = 8
+ctz(00000200) = 9
+ctz(fffffe00) = 9
+ctz(00000400) = 10
+ctz(fffffc00) = 10
+ctz(00000800) = 11
+ctz(fffff800) = 11
+ctz(00001000) = 12
+ctz(fffff000) = 12
+ctz(00002000) = 13
+ctz(ffffe000) = 13
+ctz(00004000) = 14
+ctz(ffffc000) = 14
+ctz(00008000) = 15
+ctz(ffff8000) = 15
+ctz(00010000) = 16
+ctz(ffff0000) = 16
+ctz(00020000) = 17
+ctz(fffe0000) = 17
+ctz(00040000) = 18
+ctz(fffc0000) = 18
+ctz(00080000) = 19
+ctz(fff80000) = 19
+ctz(00100000) = 20
+ctz(fff00000) = 20
+ctz(00200000) = 21
+ctz(ffe00000) = 21
+ctz(00400000) = 22
+ctz(ffc00000) = 22
+ctz(00800000) = 23
+ctz(ff800000) = 23
+ctz(01000000) = 24
+ctz(ff000000) = 24
+ctz(02000000) = 25
+ctz(fe000000) = 25
+ctz(04000000) = 26
+ctz(fc000000) = 26
+ctz(08000000) = 27
+ctz(f8000000) = 27
+ctz(10000000) = 28
+ctz(f0000000) = 28
+ctz(20000000) = 29
+ctz(e0000000) = 29
+ctz(40000000) = 30
+ctz(c0000000) = 30
+ctz(80000000) = 31
+ctz(80000000) = 31
+ctzll(0000000000000001) = 0
+ctzll(ffffffffffffffff) = 0
+ctzll(0000000000000002) = 1
+ctzll(fffffffffffffffe) = 1
+ctzll(0000000000000004) = 2
+ctzll(fffffffffffffffc) = 2
+ctzll(0000000000000008) = 3
+ctzll(fffffffffffffff8) = 3
+ctzll(0000000000000010) = 4
+ctzll(fffffffffffffff0) = 4
+ctzll(0000000000000020) = 5
+ctzll(ffffffffffffffe0) = 5
+ctzll(0000000000000040) = 6
+ctzll(ffffffffffffffc0) = 6
+ctzll(0000000000000080) = 7
+ctzll(ffffffffffffff80) = 7
+ctzll(0000000000000100) = 8
+ctzll(ffffffffffffff00) = 8
+ctzll(0000000000000200) = 9
+ctzll(fffffffffffffe00) = 9
+ctzll(0000000000000400) = 10
+ctzll(fffffffffffffc00) = 10
+ctzll(0000000000000800) = 11
+ctzll(fffffffffffff800) = 11
+ctzll(0000000000001000) = 12
+ctzll(fffffffffffff000) = 12
+ctzll(0000000000002000) = 13
+ctzll(ffffffffffffe000) = 13
+ctzll(0000000000004000) = 14
+ctzll(ffffffffffffc000) = 14
+ctzll(0000000000008000) = 15
+ctzll(ffffffffffff8000) = 15
+ctzll(0000000000010000) = 16
+ctzll(ffffffffffff0000) = 16
+ctzll(0000000000020000) = 17
+ctzll(fffffffffffe0000) = 17
+ctzll(0000000000040000) = 18
+ctzll(fffffffffffc0000) = 18
+ctzll(0000000000080000) = 19
+ctzll(fffffffffff80000) = 19
+ctzll(0000000000100000) = 20
+ctzll(fffffffffff00000) = 20
+ctzll(0000000000200000) = 21
+ctzll(ffffffffffe00000) = 21
+ctzll(0000000000400000) = 22
+ctzll(ffffffffffc00000) = 22
+ctzll(0000000000800000) = 23
+ctzll(ffffffffff800000) = 23
+ctzll(0000000001000000) = 24
+ctzll(ffffffffff000000) = 24
+ctzll(0000000002000000) = 25
+ctzll(fffffffffe000000) = 25
+ctzll(0000000004000000) = 26
+ctzll(fffffffffc000000) = 26
+ctzll(0000000008000000) = 27
+ctzll(fffffffff8000000) = 27
+ctzll(0000000010000000) = 28
+ctzll(fffffffff0000000) = 28
+ctzll(0000000020000000) = 29
+ctzll(ffffffffe0000000) = 29
+ctzll(0000000040000000) = 30
+ctzll(ffffffffc0000000) = 30
+ctzll(0000000080000000) = 31
+ctzll(ffffffff80000000) = 31
+ctzll(0000000100000000) = 32
+ctzll(ffffffff00000000) = 32
+ctzll(0000000200000000) = 33
+ctzll(fffffffe00000000) = 33
+ctzll(0000000400000000) = 34
+ctzll(fffffffc00000000) = 34
+ctzll(0000000800000000) = 35
+ctzll(fffffff800000000) = 35
+ctzll(0000001000000000) = 36
+ctzll(fffffff000000000) = 36
+ctzll(0000002000000000) = 37
+ctzll(ffffffe000000000) = 37
+ctzll(0000004000000000) = 38
+ctzll(ffffffc000000000) = 38
+ctzll(0000008000000000) = 39
+ctzll(ffffff8000000000) = 39
+ctzll(0000010000000000) = 40
+ctzll(ffffff0000000000) = 40
+ctzll(0000020000000000) = 41
+ctzll(fffffe0000000000) = 41
+ctzll(0000040000000000) = 42
+ctzll(fffffc0000000000) = 42
+ctzll(0000080000000000) = 43
+ctzll(fffff80000000000) = 43
+ctzll(0000100000000000) = 44
+ctzll(fffff00000000000) = 44
+ctzll(0000200000000000) = 45
+ctzll(ffffe00000000000) = 45
+ctzll(0000400000000000) = 46
+ctzll(ffffc00000000000) = 46
+ctzll(0000800000000000) = 47
+ctzll(ffff800000000000) = 47
+ctzll(0001000000000000) = 48
+ctzll(ffff000000000000) = 48
+ctzll(0002000000000000) = 49
+ctzll(fffe000000000000) = 49
+ctzll(0004000000000000) = 50
+ctzll(fffc000000000000) = 50
+ctzll(0008000000000000) = 51
+ctzll(fff8000000000000) = 51
+ctzll(0010000000000000) = 52
+ctzll(fff0000000000000) = 52
+ctzll(0020000000000000) = 53
+ctzll(ffe0000000000000) = 53
+ctzll(0040000000000000) = 54
+ctzll(ffc0000000000000) = 54
+ctzll(0080000000000000) = 55
+ctzll(ff80000000000000) = 55
+ctzll(0100000000000000) = 56
+ctzll(ff00000000000000) = 56
+ctzll(0200000000000000) = 57
+ctzll(fe00000000000000) = 57
+ctzll(0400000000000000) = 58
+ctzll(fc00000000000000) = 58
+ctzll(0800000000000000) = 59
+ctzll(f800000000000000) = 59
+ctzll(1000000000000000) = 60
+ctzll(f000000000000000) = 60
+ctzll(2000000000000000) = 61
+ctzll(e000000000000000) = 61
+ctzll(4000000000000000) = 62
+ctzll(c000000000000000) = 62
+ctzll(8000000000000000) = 63
+ctzll(8000000000000000) = 63
+fabs(3.141590) = 3.141590
+fabs(-3.141590) = 3.141590
+fabsf(7.250000) = 7.250000
+fabsf(-7.250000) = 7.250000
diff --git a/test/regression/Results/builtins-powerpc b/test/regression/Results/builtins-powerpc
index a3c63ad6..a37bfc63 100644
--- a/test/regression/Results/builtins-powerpc
+++ b/test/regression/Results/builtins-powerpc
@@ -1,16 +1,7 @@
mulhw(12345678, deadbeef) = fda16776
mulhwu(12345678, deadbeef) = fd5bdee
-clz(12345678) = 3
-clzll(12345678) = 35
-clzll(1234567812345678) = 3
-clzll(78563412) = 33
-bswap(12345678) = 78563412
-bswap16(1234) = 3412
fmadd(3.141590, 2.718000, 1.414000) = 9.952842
fmsub(3.141590, 2.718000, 1.414000) = 7.124842
-fabs(3.141590) = 3.141590
-fabs(-3.141590) = 3.141590
-fsqrt(3.141590) = 1.772453
frsqrte(3.141590) = OK
fres(3.141590) = OK
fsel(3.141590, 2.718000, 1.414000) = 2.718000
diff --git a/test/regression/Results/builtins-riscV b/test/regression/Results/builtins-riscV
index 1576b252..a14b7677 100644
--- a/test/regression/Results/builtins-riscV
+++ b/test/regression/Results/builtins-riscV
@@ -1,12 +1,6 @@
-bswap16(1234) = 3412
-bswap32(12345678) = 78563412
-bswap64(123456789abcdef0) = f0debc9a78563412
fmadd(3.141590, 2.718000, 1.414000) = 9.952842
fmsub(3.141590, 2.718000, 1.414000) = 7.124842
fnmadd(3.141590, 2.718000, 1.414000) = -9.952842
fnmsub(3.141590, 2.718000, 1.414000) = -7.124842
-fabs(3.141590) = 3.141590
-fabs(-3.141590) = 3.141590
-fsqrt(3.141590) = 1.772453
fmax(3.141590, 2.718000) = 3.141590
fmin(3.141590, 2.718000) = 2.718000
diff --git a/test/regression/Results/builtins-x86 b/test/regression/Results/builtins-x86
index 393ac1fd..7cd8838b 100644
--- a/test/regression/Results/builtins-x86
+++ b/test/regression/Results/builtins-x86
@@ -1,15 +1,3 @@
-bswap(12345678) = 78563412
-bswap16(1234) = 3412
-bswap64(123456789abcdef0) = f0debc9a78563412
-clz(12345678) = 3
-clzll(12345678) = 35
-clzll(1234567812345678) = 3
-clzll(78563412) = 33
-ctz(1234) = 2
-ctzll(1234567812345678) = 3
-ctzll(1234567800000000) = 35
-ctzll(78563412) = 1
-fsqrt(3.141590) = 1.772453
fmin(3.141590, 2.718000) = 2.718000
fmax(3.141590, 2.718000) = 3.141590
read_16_rev = 3412
diff --git a/test/regression/builtins-aarch64.c b/test/regression/builtins-aarch64.c
index 2cfa2d09..671f65e3 100644
--- a/test/regression/builtins-aarch64.c
+++ b/test/regression/builtins-aarch64.c
@@ -1,43 +1,25 @@
-/* Fun with builtin functions */
+/* AArch64-specific builtin functions */
#include <stdio.h>
int main(int argc, char ** argv)
{
- unsigned int x = 0x12345678;
- unsigned int y = 0xDEADBEEF;
- unsigned long long xx = 0x1234567812345678ULL;
- unsigned long long yy = 0x1234567800000000ULL;
- unsigned long long zz = 0x123456789ABCDEF0ULL;
- unsigned z;
double a = 3.14159;
double b = 2.718;
double c = 1.414;
- unsigned short s = 0x1234;
signed int u = 1234567;
signed int v = -9999;
- printf("bswap(%x) = %x\n", x, __builtin_bswap(x));
- printf("bswap16(%x) = %x\n", s, __builtin_bswap16(s));
- printf("bswap64(%llx) = %llx\n", zz, __builtin_bswap64(zz));
- printf("clz(%x) = %d\n", x, __builtin_clz(x));
- printf("clzll(%llx) = %d\n", (unsigned long long) x, __builtin_clzll(x));
- printf("clzll(%llx) = %d\n", xx, __builtin_clzll(xx));
printf("cls(%d) = %d\n", u, __builtin_cls(u));
printf("cls(%d) = %d\n", v, __builtin_cls(v));
printf("clsll(%lld) = %d\n", (signed long long) u, __builtin_clsll(u));
printf("clsll(%lld) = %d\n", (signed long long) v, __builtin_clsll(v));
- printf("fsqrt(%f) = %f\n", a, __builtin_fsqrt(a));
printf("fmadd(%f, %f, %f) = %f\n", a, b, c, __builtin_fmadd(a, b, c));
printf("fmsub(%f, %f, %f) = %f\n", a, b, c, __builtin_fmsub(a, b, c));
printf("fnmadd(%f, %f, %f) = %f\n", a, b, c, __builtin_fnmadd(a, b, c));
printf("fnmsub(%f, %f, %f) = %f\n", a, b, c, __builtin_fnmsub(a, b, c));
- /* Make sure that ignoring the result of a builtin
- doesn't cause an internal error */
- (void) __builtin_bswap(x);
- (void) __builtin_fsqrt(a);
return 0;
}
diff --git a/test/regression/builtins-arm.c b/test/regression/builtins-arm.c
index d06e8e5e..85b611e8 100644
--- a/test/regression/builtins-arm.c
+++ b/test/regression/builtins-arm.c
@@ -1,10 +1,9 @@
-/* Fun with builtins */
+/* ARM-specific builtins */
#include <stdio.h>
unsigned int x = 0x12345678;
unsigned int y = 0xDEADBEEF;
-unsigned long long xx = 0x1234567812345678ULL;
double a = 3.14159;
unsigned short s = 0x1234;
@@ -12,13 +11,6 @@ int main(int argc, char ** argv)
{
unsigned z;
- printf("bswap(%x) = %x\n", x, __builtin_bswap(x));
- printf("bswap16(%x) = %x\n", s, __builtin_bswap16(s));
- printf("clz(%x) = %d\n", x, __builtin_clz(x));
- printf("clzll(%llx) = %d\n", (unsigned long long) x, __builtin_clzll(x));
- printf("clzll(%llx) = %d\n", xx, __builtin_clzll(xx));
- z = __builtin_bswap(x);
- printf("clzll(%lx) = %d\n", z, __builtin_clzll(z));
printf("fsqrt(%f) = %f\n", a, __builtin_fsqrt(a));
printf ("read_16_rev = %x\n", __builtin_read16_reversed(&s));
diff --git a/test/regression/builtins-common.c b/test/regression/builtins-common.c
new file mode 100644
index 00000000..72839a61
--- /dev/null
+++ b/test/regression/builtins-common.c
@@ -0,0 +1,58 @@
+/* Builtin functions that are implemented on all target processors */
+
+#include <stdio.h>
+
+unsigned int x = 0x12345678;
+unsigned int y = 0xDEADBEEF;
+unsigned long long xx = 0x123456789ABCDEF0ULL;
+double a = 3.14159;
+double b = 2.718;
+double c = 1.414;
+float f = 7.25;
+unsigned short s = 0x1234;
+
+int main(int argc, char ** argv)
+{
+ printf("bswap(%x) = %x\n", x, __builtin_bswap(x));
+ printf("bswap16(%x) = %x\n", s, __builtin_bswap16(s));
+ printf("bswap64(%llx) = %llx\n", xx, __builtin_bswap64(xx));
+ for (int i = 0; i < 32; i++) {
+ unsigned z = 0xFFFFFFFFU >> i;
+ printf("clz(%08x) = %d\n", z, __builtin_clz(z));
+ z = 0x80000000U >> i;
+ printf("clz(%08x) = %d\n", z, __builtin_clz(z));
+ }
+ for (int i = 0; i < 64; i++) {
+ unsigned long long z = 0xFFFFFFFFFFFFFFFFULL >> i;
+ printf("clzll(%016llx) = %d\n", z, __builtin_clzll(z));
+ z = 0x8000000000000000ULL >> i;
+ printf("clzll(%016llx) = %d\n", z, __builtin_clzll(z));
+ }
+ for (int i = 0; i < 32; i++) {
+ unsigned z = 1U << i;
+ printf("ctz(%08x) = %d\n", z, __builtin_ctz(z));
+ z = 0xFFFFFFFFU << i;
+ printf("ctz(%08x) = %d\n", z, __builtin_ctz(z));
+ }
+ for (int i = 0; i < 64; i++) {
+ unsigned long long z = 1ULL << i;
+ printf("ctzll(%016llx) = %d\n", z, __builtin_ctzll(z));
+ z = 0xFFFFFFFFFFFFFFFFULL << i;
+ printf("ctzll(%016llx) = %d\n", z, __builtin_ctzll(z));
+ }
+ printf("fabs(%f) = %f\n", a, __builtin_fabs(a));
+ printf("fabs(%f) = %f\n", -a, __builtin_fabs(-a));
+ printf("fabsf(%f) = %f\n", f, __builtin_fabsf(f));
+ printf("fabsf(%f) = %f\n", -f, __builtin_fabsf(-f));
+#ifndef __KVX__ // no builtin FSQRT or SQRT on KVX
+ printf("fsqrt(%f) = %f\n", a, __builtin_fsqrt(a));
+ printf("sqrt(%f) = %f\n", a, __builtin_sqrt(a));
+#endif
+
+ /* Make sure that ignoring the result of a builtin
+ doesn't cause an internal error */
+ (void) __builtin_bswap(x);
+ (void) __builtin_fsqrt(a);
+ (void) __builtin_sel(a > 0.0, x, y);
+ return 0;
+}
diff --git a/test/regression/builtins-powerpc.c b/test/regression/builtins-powerpc.c
index 8fd5818b..55809106 100644
--- a/test/regression/builtins-powerpc.c
+++ b/test/regression/builtins-powerpc.c
@@ -1,4 +1,4 @@
-/* Fun with builtins */
+/* PowerPC-specific builtins */
#include <stdio.h>
#include <math.h>
@@ -11,7 +11,6 @@ char * check_relative_error(double exact, double actual, double precision)
unsigned int x = 0x12345678;
unsigned int y = 0xDEADBEEF;
-unsigned long long xx = 0x1234567812345678ULL;
double a = 3.14159;
double b = 2.718;
double c = 1.414;
@@ -23,19 +22,9 @@ int main(int argc, char ** argv)
printf("mulhw(%x, %x) = %x\n", x, y, __builtin_mulhw(x, y));
printf("mulhwu(%x, %x) = %x\n", x, y, __builtin_mulhwu(x, y));
- printf("clz(%x) = %d\n", x, __builtin_clz(x));
- printf("clzll(%llx) = %d\n", (unsigned long long) x, __builtin_clzll(x));
- printf("clzll(%llx) = %d\n", xx, __builtin_clzll(xx));
- z = __builtin_bswap(x);
- printf("clzll(%lx) = %d\n", z, __builtin_clzll(z));
- printf("bswap(%x) = %x\n", x, __builtin_bswap(x));
- printf("bswap16(%x) = %x\n", s, __builtin_bswap16(s));
printf("fmadd(%f, %f, %f) = %f\n", a, b, c, __builtin_fmadd(a, b, c));
printf("fmsub(%f, %f, %f) = %f\n", a, b, c, __builtin_fmsub(a, b, c));
- printf("fabs(%f) = %f\n", a, __builtin_fabs(a));
- printf("fabs(%f) = %f\n", -a, __builtin_fabs(-a));
- printf("fsqrt(%f) = %f\n", a, __builtin_fsqrt(a));
printf("frsqrte(%f) = %s\n",
a, check_relative_error(1.0 / sqrt(a), __builtin_frsqrte(a), 1./32.));
printf("fres(%f) = %s\n",
diff --git a/test/regression/builtins-riscV.c b/test/regression/builtins-riscV.c
index c34fdf2c..acd98e49 100644
--- a/test/regression/builtins-riscV.c
+++ b/test/regression/builtins-riscV.c
@@ -1,4 +1,4 @@
-/* Fun with builtins */
+/* RISC-V specific builtin functions */
#include <stdio.h>
@@ -11,20 +11,11 @@ double c = 1.414;
int main(int argc, char ** argv)
{
- printf("bswap16(%x) = %x\n", s, __builtin_bswap16(s));
- printf("bswap32(%x) = %x\n", x, __builtin_bswap32(x));
- printf("bswap64(%llx) = %llx\n", zz, __builtin_bswap64(zz));
printf("fmadd(%f, %f, %f) = %f\n", a, b, c, __builtin_fmadd(a, b, c));
printf("fmsub(%f, %f, %f) = %f\n", a, b, c, __builtin_fmsub(a, b, c));
printf("fnmadd(%f, %f, %f) = %f\n", a, b, c, __builtin_fnmadd(a, b, c));
printf("fnmsub(%f, %f, %f) = %f\n", a, b, c, __builtin_fnmsub(a, b, c));
- printf("fabs(%f) = %f\n", a, __builtin_fabs(a));
- printf("fabs(%f) = %f\n", -a, __builtin_fabs(-a));
- printf("fsqrt(%f) = %f\n", a, __builtin_fsqrt(a));
printf("fmax(%f, %f) = %f\n", a, b, __builtin_fmax(a, b));
printf("fmin(%f, %f) = %f\n", a, b, __builtin_fmin(a, b));
- /* Make sure that ignoring the result of a builtin
- doesn't cause an internal error */
- (void) __builtin_fsqrt(a);
return 0;
}
diff --git a/test/regression/builtins-x86.c b/test/regression/builtins-x86.c
index 6233f9fd..05d3ab93 100644
--- a/test/regression/builtins-x86.c
+++ b/test/regression/builtins-x86.c
@@ -4,9 +4,6 @@
unsigned int x = 0x12345678;
unsigned int y = 0xDEADBEEF;
-unsigned long long xx = 0x1234567812345678ULL;
-unsigned long long yy = 0x1234567800000000ULL;
-unsigned long long zz = 0x123456789ABCDEF0ULL;
double a = 3.14159;
double b = 2.718;
double c = 1.414;
@@ -14,22 +11,6 @@ unsigned short s = 0x1234;
int main(int argc, char ** argv)
{
- unsigned z;
-
- printf("bswap(%x) = %x\n", x, __builtin_bswap(x));
- printf("bswap16(%x) = %x\n", s, __builtin_bswap16(s));
- printf("bswap64(%llx) = %llx\n", zz, __builtin_bswap64(zz));
- printf("clz(%x) = %d\n", x, __builtin_clz(x));
- printf("clzll(%llx) = %d\n", (unsigned long long) x, __builtin_clzll(x));
- printf("clzll(%llx) = %d\n", xx, __builtin_clzll(xx));
- z = __builtin_bswap(x);
- printf("clzll(%lx) = %d\n", z, __builtin_clzll(z));
- printf("ctz(%x) = %d\n", s, __builtin_ctz(s));
- printf("ctzll(%llx) = %d\n", xx, __builtin_ctzll(xx));
- printf("ctzll(%llx) = %d\n", yy, __builtin_ctzll(yy));
- printf("ctzll(%lx) = %d\n", z, __builtin_ctzll(z));
-
- printf("fsqrt(%f) = %f\n", a, __builtin_fsqrt(a));
printf("fmin(%f, %f) = %f\n", a, b, __builtin_fmin(a, b));
printf("fmax(%f, %f) = %f\n", a, b, __builtin_fmax(a, b));
diff --git a/tools/compiler_expand.ml b/tools/compiler_expand.ml
index 04d29214..8d4f4f0b 100644
--- a/tools/compiler_expand.ml
+++ b/tools/compiler_expand.ml
@@ -25,10 +25,10 @@ TOTAL, Always, Require, (Some "Renumbering"), "Renumber";
PARTIAL, (Option "optim_CSE"), Require, (Some "CSE"), "CSE";
PARTIAL, Always, NoRequire, (Some "Static Prediction + inverting conditions"), "Staticpredict";
PARTIAL, Always, NoRequire, (Some "Unrolling one iteration out of innermost loops"), "Unrollsingle";
-TOTAL, Always, NoRequire, (Some "Renumbering pre unrolling"), "Renumber";
-PARTIAL, Always, NoRequire, (Some "Unrolling the body of innermost loops"), "Unrollbody";
TOTAL, Always, NoRequire, (Some "Renumbering pre tail duplication"), "Renumber";
PARTIAL, Always, NoRequire, (Some "Performing tail duplication"), "Tailduplicate";
+TOTAL, Always, NoRequire, (Some "Renumbering pre unrolling"), "Renumber";
+PARTIAL, Always, NoRequire, (Some "Unrolling the body of innermost loops"), "Unrollbody";
TOTAL, Always, NoRequire, (Some "Renumbering pre constprop"), "Renumber";
TOTAL, (Option "optim_constprop"), Require, (Some "Constant propagation"), "Constprop";
TOTAL, Always, NoRequire, (Some "Renumbering pre CSE"), "Renumber";
diff --git a/tools/modorder.ml b/tools/modorder.ml
index d1203568..7ca6a9e9 100644
--- a/tools/modorder.ml
+++ b/tools/modorder.ml
@@ -84,7 +84,7 @@ let filename_suffix s =
let emit_dependencies deps targets =
let rec dsort target suff =
- match (try Some(Hashtbl.find deps target) with Not_found -> None) with
+ match Hashtbl.find_opt deps target with
| None -> ()
| Some node ->
match node.status with
diff --git a/x86/Asm.v b/x86/Asm.v
index 58e28c40..33f1f2ad 100644
--- a/x86/Asm.v
+++ b/x86/Asm.v
@@ -279,6 +279,7 @@ Inductive instruction: Type :=
| Pmaxsd (rd: freg) (r2: freg)
| Pminsd (rd: freg) (r2: freg)
| Pmovb_rm (rd: ireg) (a: addrmode)
+ | Pmovq_rf (rd: ireg) (r1: freg)
| Pmovsq_mr (a: addrmode) (rs: freg)
| Pmovsq_rm (rd: freg) (a: addrmode)
| Pmovsb
@@ -998,6 +999,7 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
| Pmaxsd _ _
| Pminsd _ _
| Pmovb_rm _ _
+ | Pmovq_rf _ _
| Pmovsq_rm _ _
| Pmovsq_mr _ _
| Pmovsb
diff --git a/x86/Asmexpand.ml b/x86/Asmexpand.ml
index ad667e3d..20f5d170 100644
--- a/x86/Asmexpand.ml
+++ b/x86/Asmexpand.ml
@@ -44,7 +44,7 @@ let stack_alignment () = 16
let _Plea (r, addr) =
if Archi.ptr64 then Pleaq (r, addr) else Pleal (r, addr)
-(* SP adjustment to allocate or free a stack frame *)
+(* SP adjustment to allocate or free a stack frame. *)
let align n a =
if n >= 0 then (n + a - 1) land (-a) else n land (-a)
@@ -56,7 +56,7 @@ let sp_adjustment_32 sz =
(* The top 4 bytes have already been allocated by the "call" instruction. *)
sz - 4
-let sp_adjustment_64 sz =
+let sp_adjustment_elf64 sz =
let sz = Z.to_int sz in
if is_current_function_variadic() then begin
(* If variadic, add room for register save area, which must be 16-aligned *)
@@ -73,6 +73,13 @@ let sp_adjustment_64 sz =
(sz - 8, -1)
end
+let sp_adjustment_win64 sz =
+ let sz = Z.to_int sz in
+ (* Preserve proper alignment of the stack *)
+ let sz = align sz 16 in
+ (* The top 8 bytes have already been allocated by the "call" instruction. *)
+ sz - 8
+
(* Built-ins. They come in two flavors:
- annotation statements: take their arguments in registers or stack
locations; generate no code;
@@ -256,7 +263,7 @@ let expand_builtin_va_start_32 r =
emit (Pleal (RAX, linear_addr RSP (Z.of_uint32 ofs)));
emit (Pmovl_mr (linear_addr r _0z, RAX))
-let expand_builtin_va_start_64 r =
+let expand_builtin_va_start_elf64 r =
if not (is_current_function_variadic ()) then
invalid_arg "Fatal error: va_start used in non-vararg function";
let (ir, fr, ofs) =
@@ -287,6 +294,17 @@ let expand_builtin_va_start_64 r =
emit (Pleaq (RAX, linear_addr RSP (Z.of_uint64 reg_save_area)));
emit (Pmovq_mr (linear_addr r _16z, RAX))
+let expand_builtin_va_start_win64 r =
+ if not (is_current_function_variadic ()) then
+ invalid_arg "Fatal error: va_start used in non-vararg function";
+ let num_args =
+ List.length (get_current_function_args()) in
+ let ofs =
+ Int64.(add !current_function_stacksize
+ (mul 8L (of_int num_args))) in
+ emit (Pleaq (RAX, linear_addr RSP (Z.of_uint64 ofs)));
+ emit (Pmovq_mr (linear_addr r _0z, RAX))
+
(* FMA operations *)
(* vfmadd<i><j><k> r1, r2, r3 performs r1 := ri * rj + rk
@@ -378,11 +396,7 @@ let expand_builtin_inline name args res =
emit (Paddl_ri(res, coqint_of_camlint 32l));
emit (Plabel lbl2)
(* Float arithmetic *)
- | "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
- if a1 <> res then
- emit (Pmovsd_ff (res,a1));
- emit (Pabsd res) (* This ensures that need_masks is set to true *)
- | "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
+ | ("__builtin_fsqrt" | "__builtin_sqrt"), [BA(FR a1)], BR(FR res) ->
emit (Psqrtsd (res,a1))
| "__builtin_fmax", [BA(FR a1); BA(FR a2)], BR(FR res) ->
if res = a1 then
@@ -467,8 +481,8 @@ let expand_builtin_inline name args res =
(* Vararg stuff *)
| "__builtin_va_start", [BA(IR a)], _ ->
assert (a = RDX);
- if Archi.ptr64
- then expand_builtin_va_start_64 a
+ if Archi.win64 then expand_builtin_va_start_win64 a
+ else if Archi.ptr64 then expand_builtin_va_start_elf64 a
else expand_builtin_va_start_32 a
(* Synchronization *)
| "__builtin_membar", [], _ ->
@@ -480,24 +494,66 @@ let expand_builtin_inline name args res =
| _ ->
raise (Error ("unrecognized builtin " ^ name))
-(* Calls to variadic functions for x86-64: register AL must contain
+(* Calls to variadic functions for x86-64 ELF: register AL must contain
the number of XMM registers used for parameter passing. To be on
- the safe side. do the same if the called function is
+ the safe side, do the same if the called function is
unprototyped. *)
-let set_al sg =
- if Archi.ptr64 && (sg.sig_cc.cc_vararg || sg.sig_cc.cc_unproto) then begin
+let fixup_funcall_elf64 sg =
+ if sg.sig_cc.cc_vararg || sg.sig_cc.cc_unproto then begin
let (ir, fr, ofs) = next_arg_locations 0 0 0 sg.sig_args in
emit (Pmovl_ri (RAX, coqint_of_camlint (Int32.of_int fr)))
end
+(* Calls to variadic functions for x86-64 Windows:
+ FP arguments passed in FP registers must also be passed in integer
+ registers.
+*)
+
+let rec copy_fregs_to_iregs args fr ir =
+ match (ir, fr, args) with
+ | (i1 :: ir, f1 :: fr, (Tfloat | Tsingle) :: args) ->
+ emit (Pmovq_rf (i1, f1));
+ copy_fregs_to_iregs args fr ir
+ | (i1 :: ir, f1 :: fr, _ :: args) ->
+ copy_fregs_to_iregs args fr ir
+ | _ ->
+ ()
+
+let fixup_funcall_win64 sg =
+ if sg.sig_cc.cc_vararg then
+ copy_fregs_to_iregs sg.sig_args [XMM0; XMM1; XMM2; XMM3] [RCX; RDX; R8; R9]
+
+let fixup_funcall sg =
+ if Archi.ptr64
+ then if Archi.win64
+ then fixup_funcall_win64 sg
+ else fixup_funcall_elf64 sg
+ else ()
+
(* Expansion of instructions *)
let expand_instruction instr =
match instr with
| Pallocframe (sz, ofs_ra, ofs_link) ->
- if Archi.ptr64 then begin
- let (sz, save_regs) = sp_adjustment_64 sz in
+ if Archi.win64 then begin
+ let sz = sp_adjustment_win64 sz in
+ if is_current_function_variadic() then
+ (* Save parameters passed in registers in reserved stack area *)
+ emit (Pcall_s (intern_string "__compcert_va_saveregs",
+ {sig_args = []; sig_res = Tvoid; sig_cc = cc_default}));
+ (* Allocate frame *)
+ let sz' = Z.of_uint sz in
+ emit (Psubl_ri (RSP, sz'));
+ emit (Pcfi_adjust sz');
+ (* Stack chaining *)
+ let addr1 = linear_addr RSP (Z.of_uint (sz + 8)) in
+ let addr2 = linear_addr RSP ofs_link in
+ emit (Pleaq (RAX,addr1));
+ emit (Pmovq_mr (addr2, RAX));
+ current_function_stacksize := Int64.of_int (sz + 8)
+ end else if Archi.ptr64 then begin
+ let (sz, save_regs) = sp_adjustment_elf64 sz in
(* Allocate frame *)
let sz' = Z.of_uint sz in
emit (Psubq_ri (RSP, sz'));
@@ -529,15 +585,18 @@ let expand_instruction instr =
PrintAsmaux.current_function_stacksize := Int32.of_int sz
end
| Pfreeframe(sz, ofs_ra, ofs_link) ->
- if Archi.ptr64 then begin
- let (sz, _) = sp_adjustment_64 sz in
+ if Archi.win64 then begin
+ let sz = sp_adjustment_win64 sz in
+ emit (Paddq_ri (RSP, Z.of_uint sz))
+ end else if Archi.ptr64 then begin
+ let (sz, _) = sp_adjustment_elf64 sz in
emit (Paddq_ri (RSP, Z.of_uint sz))
end else begin
let sz = sp_adjustment_32 sz in
emit (Paddl_ri (RSP, Z.of_uint sz))
end
| Pjmp_s(_, sg) | Pjmp_r(_, sg) | Pcall_s(_, sg) | Pcall_r(_, sg) ->
- set_al sg;
+ fixup_funcall sg;
emit instr
| Pbuiltin (ef,args, res) ->
begin
diff --git a/x86/CBuiltins.ml b/x86/CBuiltins.ml
index e7f714c7..a16f3ef7 100644
--- a/x86/CBuiltins.ml
+++ b/x86/CBuiltins.ml
@@ -19,8 +19,12 @@ open C
let (va_list_type, va_list_scalar, size_va_list) =
if Archi.ptr64 then
- (* Actually a struct passed by reference; equivalent to 3 64-bit words *)
- (TArray(TInt(IULong, []), Some 3L, []), false, 3*8)
+ if Archi.win64 then
+ (* Just a pointer *)
+ (TPtr(TVoid [], []), true, 8)
+ else
+ (* Actually a struct passed by reference; equivalent to 3 64-bit words *)
+ (TArray(TInt(IULong, []), Some 3L, []), false, 3*8)
else
(* Just a pointer *)
(TPtr(TVoid [], []), true, 4)
@@ -30,19 +34,6 @@ let builtins = {
"__builtin_va_list", va_list_type;
];
builtin_functions = [
- (* Integer arithmetic *)
- "__builtin_clz",
- (TInt(IInt, []), [TInt(IUInt, [])], false);
- "__builtin_clzl",
- (TInt(IInt, []), [TInt(IULong, [])], false);
- "__builtin_clzll",
- (TInt(IInt, []), [TInt(IULongLong, [])], false);
- "__builtin_ctz",
- (TInt(IInt, []), [TInt(IUInt, [])], false);
- "__builtin_ctzl",
- (TInt(IInt, []), [TInt(IULong, [])], false);
- "__builtin_ctzll",
- (TInt(IInt, []), [TInt(IULongLong, [])], false);
(* Float arithmetic *)
"__builtin_fmax",
(TFloat(FDouble, []), [TFloat(FDouble, []); TFloat(FDouble, [])], false);
diff --git a/x86/ConstpropOp.vp b/x86/ConstpropOp.vp
index ada8d54a..dd4b839a 100644
--- a/x86/ConstpropOp.vp
+++ b/x86/ConstpropOp.vp
@@ -17,11 +17,10 @@ Require Import Coqlib Compopts.
Require Import AST Integers Floats.
Require Import Op Registers.
Require Import ValueDomain ValueAOp.
+Require SelectOp.
(** * Converting known values to constants *)
-Parameter symbol_is_external: ident -> bool. (**r See [SelectOp] *)
-
Definition Olea_ptr (a: addressing) := if Archi.ptr64 then Oleal a else Olea a.
Definition const_for_result (a: aval) : option operation :=
@@ -31,7 +30,7 @@ Definition const_for_result (a: aval) : option operation :=
| F n => if Compopts.generate_float_constants tt then Some(Ofloatconst n) else None
| FS n => if Compopts.generate_float_constants tt then Some(Osingleconst n) else None
| Ptr(Gl id ofs) =>
- if symbol_is_external id then
+ if SelectOp.symbol_is_external id then
if Ptrofs.eq ofs Ptrofs.zero then Some (Oindirectsymbol id) else None
else
Some (Olea_ptr (Aglobal id ofs))
diff --git a/x86/ConstpropOpproof.v b/x86/ConstpropOpproof.v
index 6d2df9c1..82179fa4 100644
--- a/x86/ConstpropOpproof.v
+++ b/x86/ConstpropOpproof.v
@@ -107,7 +107,7 @@ Proof.
- (* pointer *)
destruct p; try discriminate; SimplVM.
+ (* global *)
- destruct (symbol_is_external id).
+ destruct (SelectOp.symbol_is_external id).
* revert H2; predSpec Ptrofs.eq Ptrofs.eq_spec ofs Ptrofs.zero; intros EQ; inv EQ.
exists (Genv.symbol_address ge id Ptrofs.zero); auto.
* inv H2. exists (Genv.symbol_address ge id ofs); split.
diff --git a/x86/Conventions1.v b/x86/Conventions1.v
index d9f5b8fa..b4cb233e 100644
--- a/x86/Conventions1.v
+++ b/x86/Conventions1.v
@@ -32,40 +32,44 @@ Definition is_callee_save (r: mreg) : bool :=
match r with
| AX | CX | DX => false
| BX | BP => true
- | SI | DI => negb Archi.ptr64 (**r callee-save in 32 bits but not in 64 bits *)
+ | SI | DI => negb Archi.ptr64 || Archi.win64 (**r callee-save in ELF 64 bits *)
| R8 | R9 | R10 | R11 => false
| R12 | R13 | R14 | R15 => true
| X0 | X1 | X2 | X3 | X4 | X5 | X6 | X7 => false
- | X8 | X9 | X10 | X11 | X12 | X13 | X14 | X15 => false
+ | X8 | X9 | X10 | X11 | X12 | X13 | X14 | X15 => Archi.win64
| FP0 => false
end.
Definition int_caller_save_regs :=
if Archi.ptr64
- then AX :: CX :: DX :: SI :: DI :: R8 :: R9 :: R10 :: R11 :: nil
+ then if Archi.win64
+ then AX :: CX :: DX :: R8 :: R9 :: R10 :: R11 :: nil
+ else AX :: CX :: DX :: SI :: DI :: R8 :: R9 :: R10 :: R11 :: nil
else AX :: CX :: DX :: nil.
Definition float_caller_save_regs :=
if Archi.ptr64
- then X0 :: X1 :: X2 :: X3 :: X4 :: X5 :: X6 :: X7 ::
- X8 :: X9 :: X10 :: X11 :: X12 :: X13 :: X14 :: X15 :: nil
+ then if Archi.win64
+ then X0 :: X1 :: X2 :: X3 :: X4 :: X5 :: nil
+ else X0 :: X1 :: X2 :: X3 :: X4 :: X5 :: X6 :: X7 ::
+ X8 :: X9 :: X10 :: X11 :: X12 :: X13 :: X14 :: X15 :: nil
else X0 :: X1 :: X2 :: X3 :: X4 :: X5 :: X6 :: X7 :: nil.
Definition int_callee_save_regs :=
if Archi.ptr64
- then BX :: BP :: R12 :: R13 :: R14 :: R15 :: nil
+ then if Archi.win64
+ then BX :: SI :: DI :: BP :: R12 :: R13 :: R14 :: R15 :: nil
+ else BX :: BP :: R12 :: R13 :: R14 :: R15 :: nil
else BX :: SI :: DI :: BP :: nil.
-Definition float_callee_save_regs : list mreg := nil.
+Definition float_callee_save_regs :=
+ if Archi.ptr64 && Archi.win64
+ then X6 :: X7 :: X8 :: X9 :: X10 :: X11 :: X12 :: X13 :: X14 :: X15 :: nil
+ else nil.
Definition destroyed_at_call :=
List.filter (fun r => negb (is_callee_save r)) all_mregs.
-Definition dummy_int_reg := AX. (**r Used in [Regalloc]. *)
-Definition dummy_float_reg := X0. (**r Used in [Regalloc]. *)
-
-Definition callee_save_type := mreg_type.
-
Definition is_float_reg (r: mreg) :=
match r with
| AX | BX | CX | DX | SI | DI | BP
@@ -74,6 +78,11 @@ Definition is_float_reg (r: mreg) :=
| X8 | X9 | X10 | X11 | X12 | X13 | X14 | X15 | FP0 => true
end.
+Definition dummy_int_reg := AX. (**r Used in [Regalloc]. *)
+Definition dummy_float_reg := X0. (**r Used in [Regalloc]. *)
+
+Definition callee_save_type := mreg_type.
+
(** * Function calling conventions *)
(** The functions in this section determine the locations (machine registers
@@ -182,7 +191,7 @@ Fixpoint loc_arguments_32
:: loc_arguments_32 tys (ofs + typesize ty)
end.
-(** In the x86-64 ABI:
+(** In the x86-64 ELF ABI:
- The first 6 integer arguments are passed in registers [DI], [SI], [DX], [CX], [R8], [R9].
- The first 8 floating-point arguments are passed in registers [X0] to [X7].
- Extra arguments are passed on the stack, in [Outgoing] slots.
@@ -190,26 +199,62 @@ Fixpoint loc_arguments_32
of data is used in a slot.
*)
-Definition int_param_regs := DI :: SI :: DX :: CX :: R8 :: R9 :: nil.
-Definition float_param_regs := X0 :: X1 :: X2 :: X3 :: X4 :: X5 :: X6 :: X7 :: nil.
+Definition int_param_regs_elf64 := DI :: SI :: DX :: CX :: R8 :: R9 :: nil.
+Definition float_param_regs_elf64 := X0 :: X1 :: X2 :: X3 :: X4 :: X5 :: X6 :: X7 :: nil.
-Fixpoint loc_arguments_64
+Fixpoint loc_arguments_elf64
(tyl: list typ) (ir fr ofs: Z) {struct tyl} : list (rpair loc) :=
match tyl with
| nil => nil
| (Tint | Tlong | Tany32 | Tany64) as ty :: tys =>
- match list_nth_z int_param_regs ir with
+ match list_nth_z int_param_regs_elf64 ir with
| None =>
- One (S Outgoing ofs ty) :: loc_arguments_64 tys ir fr (ofs + 2)
+ One (S Outgoing ofs ty) :: loc_arguments_elf64 tys ir fr (ofs + 2)
| Some ireg =>
- One (R ireg) :: loc_arguments_64 tys (ir + 1) fr ofs
+ One (R ireg) :: loc_arguments_elf64 tys (ir + 1) fr ofs
end
| (Tfloat | Tsingle) as ty :: tys =>
- match list_nth_z float_param_regs fr with
+ match list_nth_z float_param_regs_elf64 fr with
| None =>
- One (S Outgoing ofs ty) :: loc_arguments_64 tys ir fr (ofs + 2)
+ One (S Outgoing ofs ty) :: loc_arguments_elf64 tys ir fr (ofs + 2)
| Some freg =>
- One (R freg) :: loc_arguments_64 tys ir (fr + 1) ofs
+ One (R freg) :: loc_arguments_elf64 tys ir (fr + 1) ofs
+ end
+ end.
+
+(** In the x86-64 Win64 ABI:
+- The first 4 arguments are passed in registers [RCX], [RDX], [R8], and [R9]
+ (for integer arguments) and [X0] to [X3] (for floating-point arguments).
+ Each argument "burns" both an integer register and a FP integer.
+- The first 8 floating-point arguments are passed in registers [X0] to [X7].
+- Extra arguments are passed on the stack, in [Outgoing] slots.
+ Consecutive stack slots are separated by 8 bytes, even if only 4 bytes
+ of data is used in a slot.
+- Four 8-byte words are always reserved at the bottom of the outgoing area
+ so that the callee can use them to save the registers containing the
+ first four arguments. This is handled in the Stacking phase.
+*)
+
+Definition int_param_regs_win64 := CX :: DX :: R8 :: R9 :: nil.
+Definition float_param_regs_win64 := X0 :: X1 :: X2 :: X3 :: nil.
+
+Fixpoint loc_arguments_win64
+ (tyl: list typ) (r ofs: Z) {struct tyl} : list (rpair loc) :=
+ match tyl with
+ | nil => nil
+ | (Tint | Tlong | Tany32 | Tany64) as ty :: tys =>
+ match list_nth_z int_param_regs_win64 r with
+ | None =>
+ One (S Outgoing ofs ty) :: loc_arguments_win64 tys r (ofs + 2)
+ | Some ireg =>
+ One (R ireg) :: loc_arguments_win64 tys (r + 1) ofs
+ end
+ | (Tfloat | Tsingle) as ty :: tys =>
+ match list_nth_z float_param_regs_win64 r with
+ | None =>
+ One (S Outgoing ofs ty) :: loc_arguments_win64 tys r (ofs + 2)
+ | Some freg =>
+ One (R freg) :: loc_arguments_win64 tys (r + 1) ofs
end
end.
@@ -218,7 +263,9 @@ Fixpoint loc_arguments_64
Definition loc_arguments (s: signature) : list (rpair loc) :=
if Archi.ptr64
- then loc_arguments_64 s.(sig_args) 0 0 0
+ then if Archi.win64
+ then loc_arguments_win64 s.(sig_args) 0 0
+ else loc_arguments_elf64 s.(sig_args) 0 0 0
else loc_arguments_32 s.(sig_args) 0.
(** Argument locations are either caller-save registers or [Outgoing]
@@ -237,9 +284,16 @@ Definition loc_argument_32_charact (ofs: Z) (l: loc) : Prop :=
| _ => False
end.
-Definition loc_argument_64_charact (ofs: Z) (l: loc) : Prop :=
+Definition loc_argument_elf64_charact (ofs: Z) (l: loc) : Prop :=
+ match l with
+ | R r => In r int_param_regs_elf64 \/ In r float_param_regs_elf64
+ | S Outgoing ofs' ty => ofs' >= ofs /\ (2 | ofs')
+ | _ => False
+ end.
+
+Definition loc_argument_win64_charact (ofs: Z) (l: loc) : Prop :=
match l with
- | R r => In r int_param_regs \/ In r float_param_regs
+ | R r => In r int_param_regs_win64 \/ In r float_param_regs_win64
| S Outgoing ofs' ty => ofs' >= ofs /\ (2 | ofs')
| _ => False
end.
@@ -259,37 +313,75 @@ Proof.
* destruct H; split; eapply X; eauto; omega.
Qed.
-Remark loc_arguments_64_charact:
+Remark loc_arguments_elf64_charact:
forall tyl ir fr ofs p,
- In p (loc_arguments_64 tyl ir fr ofs) -> (2 | ofs) -> forall_rpair (loc_argument_64_charact ofs) p.
+ In p (loc_arguments_elf64 tyl ir fr ofs) -> (2 | ofs) -> forall_rpair (loc_argument_elf64_charact ofs) p.
Proof.
- assert (X: forall ofs1 ofs2 l, loc_argument_64_charact ofs2 l -> ofs1 <= ofs2 -> loc_argument_64_charact ofs1 l).
+ assert (X: forall ofs1 ofs2 l, loc_argument_elf64_charact ofs2 l -> ofs1 <= ofs2 -> loc_argument_elf64_charact ofs1 l).
{ destruct l; simpl; intros; auto. destruct sl; auto. intuition omega. }
- assert (Y: forall ofs1 ofs2 p, forall_rpair (loc_argument_64_charact ofs2) p -> ofs1 <= ofs2 -> forall_rpair (loc_argument_64_charact ofs1) p).
+ assert (Y: forall ofs1 ofs2 p, forall_rpair (loc_argument_elf64_charact ofs2) p -> ofs1 <= ofs2 -> forall_rpair (loc_argument_elf64_charact ofs1) p).
{ destruct p; simpl; intuition eauto. }
assert (Z: forall ofs, (2 | ofs) -> (2 | ofs + 2)).
{ intros. apply Z.divide_add_r; auto. apply Z.divide_refl. }
Opaque list_nth_z.
- induction tyl; simpl loc_arguments_64; intros.
+ induction tyl; simpl loc_arguments_elf64; intros.
elim H.
assert (A: forall ty, In p
- match list_nth_z int_param_regs ir with
- | Some ireg => One (R ireg) :: loc_arguments_64 tyl (ir + 1) fr ofs
- | None => One (S Outgoing ofs ty) :: loc_arguments_64 tyl ir fr (ofs + 2)
+ match list_nth_z int_param_regs_elf64 ir with
+ | Some ireg => One (R ireg) :: loc_arguments_elf64 tyl (ir + 1) fr ofs
+ | None => One (S Outgoing ofs ty) :: loc_arguments_elf64 tyl ir fr (ofs + 2)
end ->
- forall_rpair (loc_argument_64_charact ofs) p).
- { intros. destruct (list_nth_z int_param_regs ir) as [r|] eqn:E; destruct H1.
+ forall_rpair (loc_argument_elf64_charact ofs) p).
+ { intros. destruct (list_nth_z int_param_regs_elf64 ir) as [r|] eqn:E; destruct H1.
subst. left. eapply list_nth_z_in; eauto.
eapply IHtyl; eauto.
subst. split. omega. assumption.
eapply Y; eauto. omega. }
assert (B: forall ty, In p
- match list_nth_z float_param_regs fr with
- | Some ireg => One (R ireg) :: loc_arguments_64 tyl ir (fr + 1) ofs
- | None => One (S Outgoing ofs ty) :: loc_arguments_64 tyl ir fr (ofs + 2)
+ match list_nth_z float_param_regs_elf64 fr with
+ | Some ireg => One (R ireg) :: loc_arguments_elf64 tyl ir (fr + 1) ofs
+ | None => One (S Outgoing ofs ty) :: loc_arguments_elf64 tyl ir fr (ofs + 2)
end ->
- forall_rpair (loc_argument_64_charact ofs) p).
- { intros. destruct (list_nth_z float_param_regs fr) as [r|] eqn:E; destruct H1.
+ forall_rpair (loc_argument_elf64_charact ofs) p).
+ { intros. destruct (list_nth_z float_param_regs_elf64 fr) as [r|] eqn:E; destruct H1.
+ subst. right. eapply list_nth_z_in; eauto.
+ eapply IHtyl; eauto.
+ subst. split. omega. assumption.
+ eapply Y; eauto. omega. }
+ destruct a; eauto.
+Qed.
+
+Remark loc_arguments_win64_charact:
+ forall tyl r ofs p,
+ In p (loc_arguments_win64 tyl r ofs) -> (2 | ofs) -> forall_rpair (loc_argument_win64_charact ofs) p.
+Proof.
+ assert (X: forall ofs1 ofs2 l, loc_argument_win64_charact ofs2 l -> ofs1 <= ofs2 -> loc_argument_win64_charact ofs1 l).
+ { destruct l; simpl; intros; auto. destruct sl; auto. intuition omega. }
+ assert (Y: forall ofs1 ofs2 p, forall_rpair (loc_argument_win64_charact ofs2) p -> ofs1 <= ofs2 -> forall_rpair (loc_argument_win64_charact ofs1) p).
+ { destruct p; simpl; intuition eauto. }
+ assert (Z: forall ofs, (2 | ofs) -> (2 | ofs + 2)).
+ { intros. apply Z.divide_add_r; auto. apply Z.divide_refl. }
+Opaque list_nth_z.
+ induction tyl; simpl loc_arguments_win64; intros.
+ elim H.
+ assert (A: forall ty, In p
+ match list_nth_z int_param_regs_win64 r with
+ | Some ireg => One (R ireg) :: loc_arguments_win64 tyl (r + 1) ofs
+ | None => One (S Outgoing ofs ty) :: loc_arguments_win64 tyl r (ofs + 2)
+ end ->
+ forall_rpair (loc_argument_win64_charact ofs) p).
+ { intros. destruct (list_nth_z int_param_regs_win64 r) as [r'|] eqn:E; destruct H1.
+ subst. left. eapply list_nth_z_in; eauto.
+ eapply IHtyl; eauto.
+ subst. split. omega. assumption.
+ eapply Y; eauto. omega. }
+ assert (B: forall ty, In p
+ match list_nth_z float_param_regs_win64 r with
+ | Some ireg => One (R ireg) :: loc_arguments_win64 tyl (r + 1) ofs
+ | None => One (S Outgoing ofs ty) :: loc_arguments_win64 tyl r (ofs + 2)
+ end ->
+ forall_rpair (loc_argument_win64_charact ofs) p).
+ { intros. destruct (list_nth_z float_param_regs_win64 r) as [r'|] eqn:E; destruct H1.
subst. right. eapply list_nth_z_in; eauto.
eapply IHtyl; eauto.
subst. split. omega. assumption.
@@ -301,18 +393,30 @@ Lemma loc_arguments_acceptable:
forall (s: signature) (p: rpair loc),
In p (loc_arguments s) -> forall_rpair loc_argument_acceptable p.
Proof.
- unfold loc_arguments; intros. destruct Archi.ptr64 eqn:SF.
-- (* 64 bits *)
- assert (A: forall r, In r int_param_regs -> is_callee_save r = false) by (unfold is_callee_save; rewrite SF; decide_goal).
- assert (B: forall r, In r float_param_regs -> is_callee_save r = false) by decide_goal.
- assert (X: forall l, loc_argument_64_charact 0 l -> loc_argument_acceptable l).
- { unfold loc_argument_64_charact, loc_argument_acceptable.
+ unfold loc_arguments; intros. destruct Archi.ptr64 eqn:SF; [destruct Archi.win64 eqn:W64|].
+- (* WIN 64 bits *)
+ assert (A: forall r, In r int_param_regs_win64 -> is_callee_save r = false) by (unfold is_callee_save; rewrite SF; decide_goal).
+ assert (B: forall r, In r float_param_regs_win64 -> is_callee_save r = false) by (unfold is_callee_save; decide_goal).
+ assert (X: forall l, loc_argument_win64_charact 0 l -> loc_argument_acceptable l).
+ { unfold loc_argument_win64_charact, loc_argument_acceptable.
destruct l as [r | [] ofs ty]; auto. intros [C|C]; auto.
intros [C D]. split; auto. apply Z.divide_trans with 2; auto.
exists (2 / typealign ty); destruct ty; reflexivity.
}
- exploit loc_arguments_64_charact; eauto using Z.divide_0_r.
+ exploit loc_arguments_win64_charact; eauto using Z.divide_0_r.
unfold forall_rpair; destruct p; intuition auto.
+- (* ELF 64 bits *)
+ assert (A: forall r, In r int_param_regs_elf64 -> is_callee_save r = false) by (unfold is_callee_save; rewrite SF, W64; decide_goal).
+ assert (B: forall r, In r float_param_regs_elf64 -> is_callee_save r = false) by (unfold is_callee_save; rewrite W64; decide_goal).
+ assert (X: forall l, loc_argument_elf64_charact 0 l -> loc_argument_acceptable l).
+ { unfold loc_argument_elf64_charact, loc_argument_acceptable.
+ destruct l as [r | [] ofs ty]; auto. intros [C|C]; auto.
+ intros [C D]. split; auto. apply Z.divide_trans with 2; auto.
+ exists (2 / typealign ty); destruct ty; reflexivity.
+ }
+ exploit loc_arguments_elf64_charact; eauto using Z.divide_0_r.
+ unfold forall_rpair; destruct p; intuition auto.
+
- (* 32 bits *)
assert (X: forall l, loc_argument_32_charact 0 l -> loc_argument_acceptable l).
{ destruct l as [r | [] ofs ty]; simpl; intuition auto. rewrite H2; apply Z.divide_1_l. }
@@ -325,7 +429,7 @@ Hint Resolve loc_arguments_acceptable: locs.
Lemma loc_arguments_main:
loc_arguments signature_main = nil.
Proof.
- unfold loc_arguments; destruct Archi.ptr64; reflexivity.
+ unfold loc_arguments; destruct Archi.ptr64; auto; destruct Archi.win64; auto.
Qed.
(** ** Normalization of function results *)
diff --git a/x86/Machregsaux.ml b/x86/Machregsaux.ml
index 80066b00..840943e7 100644
--- a/x86/Machregsaux.ml
+++ b/x86/Machregsaux.ml
@@ -12,25 +12,7 @@
(** Auxiliary functions on machine registers *)
-open Camlcoq
-open Machregs
-
-let register_names : (mreg, string) Hashtbl.t = Hashtbl.create 31
-
-let _ =
- List.iter
- (fun (s, r) -> Hashtbl.add register_names r (camlstring_of_coqstring s))
- Machregs.register_names
-
let is_scratch_register r = false
-
-let name_of_register r =
- try Some (Hashtbl.find register_names r) with Not_found -> None
-
-let register_by_name s =
- Machregs.register_by_name (coqstring_uppercase_ascii_of_camlstring s)
-
-let can_reserve_register r = Conventions1.is_callee_save r
let class_of_type = function
| AST.Tint | AST.Tlong -> 0
diff --git a/x86/Machregsaux.mli b/x86/Machregsaux.mli
index d7117c21..01b0f9fd 100644
--- a/x86/Machregsaux.mli
+++ b/x86/Machregsaux.mli
@@ -12,9 +12,6 @@
(** Auxiliary functions on machine registers *)
-val name_of_register: Machregs.mreg -> string option
-val register_by_name: string -> Machregs.mreg option
val is_scratch_register: string -> bool
-val can_reserve_register: Machregs.mreg -> bool
val class_of_type: AST.typ -> int
diff --git a/x86/Stacklayout.v b/x86/Stacklayout.v
index d375febf..4f68cf26 100644
--- a/x86/Stacklayout.v
+++ b/x86/Stacklayout.v
@@ -15,11 +15,13 @@
Require Import Coqlib.
Require Import AST Memory Separation.
Require Import Bounds.
+Require Archi.
Local Open Scope sep_scope.
(** The general shape of activation records is as follows,
from bottom (lowest offsets) to top:
+- For the Win64 ABI: 32 reserved bytes
- Space for outgoing arguments to function calls.
- Back link to parent frame
- Saved values of integer callee-save registers used by the function.
@@ -29,11 +31,11 @@ Local Open Scope sep_scope.
- Return address.
*)
-Definition fe_ofs_arg := 0.
+Definition fe_ofs_arg := if Archi.win64 then 32 else 0.
Definition make_env (b: bounds) : frame_env :=
let w := if Archi.ptr64 then 8 else 4 in
- let olink := align (4 * b.(bound_outgoing)) w in (* back link *)
+ let olink := align (fe_ofs_arg + 4 * b.(bound_outgoing)) w in (* back link *)
let ocs := olink + w in (* callee-saves *)
let ol := align (size_callee_save_area b ocs) 8 in (* locals *)
let ostkdata := align (ol + 4 * b.(bound_local)) 8 in (* stack data *)
@@ -61,7 +63,7 @@ Proof.
Local Opaque Z.add Z.mul sepconj range.
intros; simpl.
set (w := if Archi.ptr64 then 8 else 4).
- set (olink := align (4 * b.(bound_outgoing)) w).
+ set (olink := align (fe_ofs_arg + 4 * b.(bound_outgoing)) w).
set (ocs := olink + w).
set (ol := align (size_callee_save_area b ocs) 8).
set (ostkdata := align (ol + 4 * b.(bound_local)) 8).
@@ -69,8 +71,9 @@ Local Opaque Z.add Z.mul sepconj range.
replace (size_chunk Mptr) with w by (rewrite size_chunk_Mptr; auto).
assert (0 < w) by (unfold w; destruct Archi.ptr64; omega).
generalize b.(bound_local_pos) b.(bound_outgoing_pos) b.(bound_stack_data_pos); intros.
+ assert (0 <= fe_ofs_arg) by (unfold fe_ofs_arg; destruct Archi.win64; omega).
assert (0 <= 4 * b.(bound_outgoing)) by omega.
- assert (4 * b.(bound_outgoing) <= olink) by (apply align_le; omega).
+ assert (fe_ofs_arg + 4 * b.(bound_outgoing) <= olink) by (apply align_le; omega).
assert (olink + w <= ocs) by (unfold ocs; omega).
assert (ocs <= size_callee_save_area b ocs) by (apply size_callee_save_area_incr).
assert (size_callee_save_area b ocs <= ol) by (apply align_le; omega).
@@ -87,7 +90,7 @@ Local Opaque Z.add Z.mul sepconj range.
rewrite sep_swap45.
rewrite sep_swap34.
(* Apply range_split and range_split2 repeatedly *)
- unfold fe_ofs_arg.
+ apply range_drop_left with 0. omega.
apply range_split_2. fold olink. omega. omega.
apply range_split. omega.
apply range_split_2. fold ol. omega. omega.
@@ -105,15 +108,16 @@ Lemma frame_env_range:
Proof.
intros; simpl.
set (w := if Archi.ptr64 then 8 else 4).
- set (olink := align (4 * b.(bound_outgoing)) w).
+ set (olink := align (fe_ofs_arg + 4 * b.(bound_outgoing)) w).
set (ocs := olink + w).
set (ol := align (size_callee_save_area b ocs) 8).
set (ostkdata := align (ol + 4 * b.(bound_local)) 8).
set (oretaddr := align (ostkdata + b.(bound_stack_data)) w).
assert (0 < w) by (unfold w; destruct Archi.ptr64; omega).
generalize b.(bound_local_pos) b.(bound_outgoing_pos) b.(bound_stack_data_pos); intros.
+ assert (0 <= fe_ofs_arg) by (unfold fe_ofs_arg; destruct Archi.win64; omega).
assert (0 <= 4 * b.(bound_outgoing)) by omega.
- assert (4 * b.(bound_outgoing) <= olink) by (apply align_le; omega).
+ assert (fe_ofs_arg + 4 * b.(bound_outgoing) <= olink) by (apply align_le; omega).
assert (olink + w <= ocs) by (unfold ocs; omega).
assert (ocs <= size_callee_save_area b ocs) by (apply size_callee_save_area_incr).
assert (size_callee_save_area b ocs <= ol) by (apply align_le; omega).
@@ -133,14 +137,14 @@ Lemma frame_env_aligned:
Proof.
intros; simpl.
set (w := if Archi.ptr64 then 8 else 4).
- set (olink := align (4 * b.(bound_outgoing)) w).
+ set (olink := align (fe_ofs_arg + 4 * b.(bound_outgoing)) w).
set (ocs := olink + w).
set (ol := align (size_callee_save_area b ocs) 8).
set (ostkdata := align (ol + 4 * b.(bound_local)) 8).
set (oretaddr := align (ostkdata + b.(bound_stack_data)) w).
assert (0 < w) by (unfold w; destruct Archi.ptr64; omega).
replace (align_chunk Mptr) with w by (rewrite align_chunk_Mptr; auto).
- split. apply Z.divide_0_r.
+ split. exists (fe_ofs_arg / 8). unfold fe_ofs_arg; destruct Archi.win64; reflexivity.
split. apply align_divides; omega.
split. apply align_divides; omega.
split. apply align_divides; omega.
diff --git a/x86/TargetPrinter.ml b/x86/TargetPrinter.ml
index 38eff731..52955dcb 100644
--- a/x86/TargetPrinter.ml
+++ b/x86/TargetPrinter.ml
@@ -238,7 +238,7 @@ module MacOS_System : SYSTEM =
if i || (not !Clflags.option_fcommon) then ".const" else "COMM"
| Section_string -> ".const"
| Section_literal -> ".literal8"
- | Section_jumptable -> ".text" (* needed in 64 bits, not a problem in 32 bits *)
+ | Section_jumptable -> ".text"
| Section_user(s, wr, ex) ->
sprintf ".section \"%s\", %s, %s"
(if wr then "__DATA" else "__TEXT") s
@@ -257,32 +257,14 @@ module MacOS_System : SYSTEM =
let print_align oc n =
fprintf oc " .align %d\n" (log2 n)
- let indirect_symbols : StringSet.t ref = ref StringSet.empty
-
let print_mov_rs oc rd id =
- if Archi.ptr64 then begin
- fprintf oc " movq %a@GOTPCREL(%%rip), %a\n" symbol id ireg64 rd
- end else begin
- let id = extern_atom id in
- indirect_symbols := StringSet.add id !indirect_symbols;
- fprintf oc " movl L%a$non_lazy_ptr, %a\n" raw_symbol id ireg rd
- end
+ fprintf oc " movq %a@GOTPCREL(%%rip), %a\n" symbol id ireg64 rd
let print_fun_info _ _ = ()
let print_var_info _ _ = ()
- let print_epilogue oc =
- if not Archi.ptr64 then begin
- fprintf oc " .section __IMPORT,__pointers,non_lazy_symbol_pointers\n";
- StringSet.iter
- (fun s ->
- fprintf oc "L%a$non_lazy_ptr:\n" raw_symbol s;
- fprintf oc " .indirect_symbol %a\n" raw_symbol s;
- fprintf oc " .long 0\n")
- !indirect_symbols;
- indirect_symbols := StringSet.empty
- end
+ let print_epilogue oc = ()
let print_comm_decl oc name sz al =
fprintf oc " .comm %a, %s, %d\n"
@@ -298,8 +280,11 @@ module MacOS_System : SYSTEM =
module Cygwin_System : SYSTEM =
struct
+ let symbol_prefix =
+ if Archi.ptr64 then "" else "_"
+
let raw_symbol oc s =
- fprintf oc "_%s" s
+ fprintf oc "%s%s" symbol_prefix s
let symbol oc symb =
raw_symbol oc (extern_atom symb)
@@ -329,19 +314,39 @@ module Cygwin_System : SYSTEM =
| Section_debug_str-> assert false (* Should not be used *)
| Section_ais_annotation -> assert false (* Not supported for coff binaries *)
- let stack_alignment = 8 (* minimum is 4, 8 is better for perfs *)
+ let stack_alignment = 8
+ (* minimum is 4 for 32 bits, 8 for 64 bits; 8 is better for perfs *)
let print_align oc n =
fprintf oc " .balign %d\n" n
+ let indirect_symbols : StringSet.t ref = ref StringSet.empty
+
let print_mov_rs oc rd id =
- fprintf oc " movl $%a, %a\n" symbol id ireg rd
+ if Archi.ptr64 then begin
+ let s = extern_atom id in
+ indirect_symbols := StringSet.add s !indirect_symbols;
+ fprintf oc " movq .refptr.%s(%%rip), %a\n" s ireg rd
+ end else begin
+ fprintf oc " movl $%a, %a\n" symbol id ireg rd
+ end
let print_fun_info _ _ = ()
let print_var_info _ _ = ()
- let print_epilogue _ = ()
+ let declare_indirect_symbol oc s =
+ fprintf oc " .section .rdata$.refptr.%s, \"dr\"\n" s;
+ fprintf oc " .globl .refptr.%s\n" s;
+ fprintf oc " .linkonce discard\n";
+ fprintf oc ".refptr.%s:\n" s;
+ fprintf oc " .quad %s\n" s
+
+ let print_epilogue oc =
+ if Archi.ptr64 then begin
+ StringSet.iter (declare_indirect_symbol oc) !indirect_symbols;
+ indirect_symbols := StringSet.empty
+ end
let print_comm_decl oc name sz al =
fprintf oc " .comm %a, %s, %d\n"
@@ -349,7 +354,8 @@ module Cygwin_System : SYSTEM =
let print_lcomm_decl oc name sz al =
fprintf oc " .lcomm %a, %s, %d\n"
- symbol name (Z.to_string sz) (log2 al)
+ symbol name (Z.to_string sz)
+ (if Archi.ptr64 then al else log2 al)
end
@@ -850,6 +856,8 @@ module Target(System: SYSTEM):TARGET =
fprintf oc " minsd %a, %a\n" freg a1 freg res
| Pmovb_rm (rd,a) ->
fprintf oc " movb %a, %a\n" addressing a ireg8 rd
+ | Pmovq_rf (rd, r1) ->
+ fprintf oc " movq %a, %a\n" freg r1 ireg64 rd
| Pmovsq_mr(a, rs) ->
fprintf oc " movq %a, %a\n" freg rs addressing a
| Pmovsq_rm(rd, a) ->
diff --git a/x86/extractionMachdep.v b/x86/extractionMachdep.v
index a29553e8..20c6a521 100644
--- a/x86/extractionMachdep.v
+++ b/x86/extractionMachdep.v
@@ -15,15 +15,19 @@
(* Additional extraction directives specific to the x86-64 port *)
-Require SelectOp ConstpropOp.
+Require Archi SelectOp.
-(* SelectOp *)
-
-Extract Constant SelectOp.symbol_is_external =>
- "fun id -> Configuration.system = ""macosx"" && C2C.atom_is_extern id".
+(* Archi *)
-(* ConstpropOp *)
+Extract Constant Archi.win64 =>
+ "match Configuration.system with
+ | ""cygwin"" when ptr64 -> true
+ | _ -> false".
-Extract Constant ConstpropOp.symbol_is_external =>
- "fun id -> Configuration.system = ""macosx"" && C2C.atom_is_extern id".
+(* SelectOp *)
+Extract Constant SelectOp.symbol_is_external =>
+ "match Configuration.system with
+ | ""macosx"" -> C2C.atom_is_extern
+ | ""cygwin"" when Archi.ptr64 -> C2C.atom_is_extern
+ | _ -> (fun _ -> false)".
diff --git a/x86_32/Archi.v b/x86_32/Archi.v
index 4681784d..facb5879 100644
--- a/x86_32/Archi.v
+++ b/x86_32/Archi.v
@@ -16,9 +16,8 @@
(** Architecture-dependent parameters for x86 in 32-bit mode *)
+From Flocq Require Import Binary Bits.
Require Import ZArith List.
-(*From Flocq*)
-Require Import Binary Bits.
Definition ptr64 := false.
@@ -59,6 +58,9 @@ Definition fma_invalid_mul_is_nan := false.
Definition float_of_single_preserves_sNaN := false.
+(** Which ABI to use. *)
+Parameter win64: bool. (* Always false in 32 bits *)
+
Global Opaque ptr64 big_endian splitlong
default_nan_64 choose_nan_64
default_nan_32 choose_nan_32
diff --git a/x86_64/Archi.v b/x86_64/Archi.v
index 0e3c55f8..87f727bd 100644
--- a/x86_64/Archi.v
+++ b/x86_64/Archi.v
@@ -16,9 +16,8 @@
(** Architecture-dependent parameters for x86 in 64-bit mode *)
+From Flocq Require Import Binary Bits.
Require Import ZArith List.
-(*From Flocq*)
-Require Import Binary Bits.
Definition ptr64 := true.
@@ -59,6 +58,9 @@ Definition fma_invalid_mul_is_nan := false.
Definition float_of_single_preserves_sNaN := false.
+(** Which ABI to use. *)
+Parameter win64: bool.
+
Global Opaque ptr64 big_endian splitlong
default_nan_64 choose_nan_64
default_nan_32 choose_nan_32