aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2005-04-27 13:23:52 +0000
committerno-author <no-author@gcc.gnu.org>2005-04-27 13:23:52 +0000
commita460bbfe8dc883d77f9b8c20cab31bf11ec38caf (patch)
tree4d721e9d2e4794f61c47b6aa906c464580c7b312
parent683f7943ebbc2657dec2d5fd3a6440e495697eeb (diff)
This commit was manufactured by cvs2svn to create branch
'tree-profiling-branch'. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-profiling-branch@98826 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/config/alpha/sync.md312
-rw-r--r--gcc/config/cris/aout.opt32
-rw-r--r--gcc/config/cris/cris.opt191
-rw-r--r--gcc/config/cris/elf.opt23
-rw-r--r--gcc/config/cris/linux.opt34
-rw-r--r--gcc/config/cris/predicates.md170
-rw-r--r--gcc/config/darwin.opt28
-rw-r--r--gcc/config/i386/cygming.opt48
-rw-r--r--gcc/config/i386/djgpp.opt26
-rw-r--r--gcc/config/i386/i386.opt217
-rw-r--r--gcc/config/i386/sco5.opt25
-rw-r--r--gcc/config/i386/sync.md155
-rw-r--r--gcc/config/ia64/sync.md113
-rw-r--r--gcc/config/lynx.opt32
-rw-r--r--gcc/config/pa/pa-hpux.opt32
-rw-r--r--gcc/config/pa/pa-hpux1010.opt24
-rw-r--r--gcc/config/pa/pa-hpux1111.opt24
-rw-r--r--gcc/config/pa/pa.opt119
-rw-r--r--gcc/config/pa/pa64-hpux.opt28
-rw-r--r--gcc/config/sparc/predicates.md456
-rw-r--r--gcc/objcp/ChangeLog9
-rw-r--r--gcc/objcp/Make-lang.in138
-rw-r--r--gcc/objcp/config-lang.in43
-rw-r--r--gcc/objcp/lang-specs.h60
-rw-r--r--gcc/objcp/objcp-decl.c134
-rw-r--r--gcc/objcp/objcp-decl.h95
-rw-r--r--gcc/objcp/objcp-lang.c143
-rw-r--r--gcc/testsuite/g++.dg/eh/fp-regs.C94
-rw-r--r--gcc/testsuite/g++.dg/ext/sync-1.C40
-rw-r--r--gcc/testsuite/g++.dg/ext/sync-2.C58
-rw-r--r--gcc/testsuite/g++.dg/lookup/builtin2.C19
-rw-r--r--gcc/testsuite/g++.dg/opt/pr20991.C34
-rw-r--r--gcc/testsuite/g++.dg/opt/pr20995-1.C8
-rw-r--r--gcc/testsuite/g++.dg/opt/rtti2.C17
-rw-r--r--gcc/testsuite/g++.dg/template/sizeof9.C6
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr20963.C23
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr21082.C13
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr21173.c21
-rw-r--r--gcc/testsuite/gcc.dg/Wint-to-pointer-cast-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/Wint-to-pointer-cast-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/Wint-to-pointer-cast-3.c20
-rw-r--r--gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/Wpointer-to-int-cast-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/Wpointer-to-int-cast-3.c21
-rw-r--r--gcc/testsuite/gcc.dg/arm-vfp1.c126
-rw-r--r--gcc/testsuite/gcc.dg/c99-vla-jump-1.c305
-rw-r--r--gcc/testsuite/gcc.dg/c99-vla-jump-2.c305
-rw-r--r--gcc/testsuite/gcc.dg/c99-vla-jump-3.c305
-rw-r--r--gcc/testsuite/gcc.dg/c99-vla-jump-4.c305
-rw-r--r--gcc/testsuite/gcc.dg/c99-vla-jump-5.c30
-rw-r--r--gcc/testsuite/gcc.dg/cpp/very-long-comment.c14
-rw-r--r--gcc/testsuite/gcc.dg/fold-xor-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/fold-xor-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/format/asm_fprintf-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/format/asm_fprintf-3.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/asm_fprintf-4.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/asm_fprintf-5.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-3.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-4.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-5.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-6.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-7.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-8.c10
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-9.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr20922-1.c38
-rw-r--r--gcc/testsuite/gcc.dg/pr20922-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr20922-3.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr20922-4.c38
-rw-r--r--gcc/testsuite/gcc.dg/pr20922-5.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr20922-6.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr21085.c9
-rw-r--r--gcc/testsuite/gcc.dg/stabs-attrib-vect-darwin.c11
-rw-r--r--gcc/testsuite/gcc.dg/transparent-union-3.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c38
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c33
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c39
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c37
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c34
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c35
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c33
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ifc-3.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21001.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21031.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-1.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-2.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-3.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-4.c19
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c33
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-6.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-7.c23
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-11a.c52
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-99.c19
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-13.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr21101.c32
-rw-r--r--gcc/testsuite/gcc.target/mips/args-1.c35
-rw-r--r--gcc/testsuite/gcc.target/mips/args-2.c18
-rw-r--r--gcc/testsuite/gcc.target/mips/args-3.c38
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-1.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/movcc-1.c18
-rw-r--r--gcc/testsuite/gcc.target/mips/movcc-2.c18
-rw-r--r--gcc/testsuite/gcc.target/mips/movcc-3.c63
-rw-r--r--gcc/testsuite/gcc.target/mips/nmadd-1.c30
-rw-r--r--gcc/testsuite/gcc.target/mips/nmadd-2.c30
-rw-r--r--gcc/testsuite/gcc.target/mips/rsqrt-1.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/rsqrt-2.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/rsqrt-3.c27
-rw-r--r--gcc/testsuite/gcc.target/mips/vr-mult-1.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/vr-mult-2.c7
-rw-r--r--gcc/testsuite/gfortran.dg/common_5.f10
-rw-r--r--gcc/testsuite/gfortran.dg/ichar_1.f9050
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_11.f55
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_12.f56
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_13.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_14.f9094
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_15.f9058
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_16.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_17.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_18.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_19.f90135
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_2.f907
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_20.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_3.f907
-rw-r--r--gcc/testsuite/gfortran.dg/nested_reshape.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/pr12884.f25
-rw-r--r--gcc/testsuite/gfortran.dg/pr16861.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/pr17285.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/pr17472.f12
-rw-r--r--gcc/testsuite/gfortran.dg/pr18122.f9045
-rw-r--r--gcc/testsuite/gfortran.dg/pr18210.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/pr18392.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/pr19216.f18
-rw-r--r--gcc/testsuite/gfortran.dg/pr19467.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/pr19657.f21
-rw-r--r--gcc/testsuite/gfortran.dg/pr20950.f7
-rw-r--r--gcc/testsuite/gfortran.dg/reshape-alloc.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/reshape.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_rank7.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/wtruncate.f10
-rw-r--r--gcc/testsuite/gfortran.dg/wtruncate.f9010
-rw-r--r--gcc/testsuite/objc.dg/fix-and-continue-1.m90
-rw-r--r--gcc/tree-ssa-uncprop.c613
-rw-r--r--libffi/src/cris/ffi.c381
-rw-r--r--libffi/src/cris/ffitarget.h50
-rw-r--r--libffi/src/cris/sysv.S215
-rw-r--r--libjava/gnu/classpath/SystemProperties.java154
-rw-r--r--libjava/gnu/classpath/natSystemProperties.cc390
-rw-r--r--libjava/gnu/javax/swing/text/html/package.html50
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/HTML_401F.java3729
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/gnuDTD.java422
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/htmlAttributeSet.java133
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/htmlValidator.java610
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java62
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java77
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/models/list.java382
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/models/noTagModel.java75
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/models/node.java337
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/models/package.html53
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/models/transformer.java201
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/package.html51
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/Parser.java1443
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java112
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/support/low/Buffer.java238
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/low/Constants.java422
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/support/low/Location.java83
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/support/low/ParseException.java51
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/low/Queue.java142
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java374
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/support/low/Token.java169
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/support/low/node.java78
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/support/low/package.html47
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/low/pattern.java105
-rw-r--r--libjava/gnu/javax/swing/text/html/parser/support/package.html47
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java106
-rwxr-xr-xlibjava/gnu/javax/swing/text/html/parser/support/textPreProcessor.java193
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLAnchorElement.java189
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLAppletElement.java169
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLAreaElement.java139
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLBRElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLBaseElement.java79
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLBaseFontElement.java89
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLBodyElement.java119
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLButtonElement.java121
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLCollection.java218
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLDListElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLDirectoryElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLDivElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLDocument.java425
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLElement.java269
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLFieldSetElement.java65
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLFontElement.java89
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLFormElement.java150
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLFrameElement.java146
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLFrameSetElement.java79
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLHRElement.java99
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLHeadElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLHeadingElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLHtmlElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLIFrameElement.java166
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLImageElement.java179
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLImpl.java67
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLInputElement.java266
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLIsIndexElement.java75
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLLIElement.java79
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLLabelElement.java85
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLLegendElement.java85
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLLinkElement.java149
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLMapElement.java79
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLMenuElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLMetaElement.java99
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLModElement.java79
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLOListElement.java89
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLObjectElement.java242
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLOptGroupElement.java79
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLOptionElement.java131
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLParagraphElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLParamElement.java99
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLParser.java266
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLPreElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLQuoteElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLScriptElement.java129
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLSelectElement.java211
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLStyleElement.java89
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java70
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTableCellElement.java205
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTableColElement.java120
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTableElement.java383
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTableRowElement.java225
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTableSectionElement.java158
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTextAreaElement.java182
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLTitleElement.java69
-rw-r--r--libjava/gnu/xml/dom/html2/DomHTMLUListElement.java79
-rw-r--r--libjava/include/jni_md.h151
-rw-r--r--libjava/javax/swing/plaf/metal/MetalBorders.java443
-rw-r--r--libjava/javax/swing/plaf/metal/MetalButtonUI.java101
-rw-r--r--libjava/javax/swing/plaf/metal/MetalCheckBoxUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalComboBoxUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalDesktopIconUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalInternalFrameUI.java88
-rw-r--r--libjava/javax/swing/plaf/metal/MetalLabelUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java73
-rw-r--r--libjava/javax/swing/plaf/metal/MetalProgressBarUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalRadioButtonUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalRootPaneUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalScrollBarUI.java87
-rw-r--r--libjava/javax/swing/plaf/metal/MetalScrollPaneUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalSeparatorUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalSliderUI.java87
-rw-r--r--libjava/javax/swing/plaf/metal/MetalSplitPaneUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalTabbedPaneUI.java86
-rw-r--r--libjava/javax/swing/plaf/metal/MetalTextFieldUI.java86
-rw-r--r--libjava/javax/swing/plaf/metal/MetalToggleButtonUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalToolBarUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalToolTipUI.java74
-rw-r--r--libjava/javax/swing/plaf/metal/MetalTreeUI.java74
-rw-r--r--libjava/javax/swing/text/ChangedCharSetException.java100
-rw-r--r--libjava/javax/swing/text/html/HTMLDocument.java53
-rwxr-xr-xlibjava/javax/swing/text/html/HTMLEditorKit.java173
-rw-r--r--libjava/javax/swing/text/html/HTMLFrameHyperlinkEvent.java132
-rwxr-xr-xlibjava/javax/swing/text/html/parser/AttributeList.java294
-rwxr-xr-xlibjava/javax/swing/text/html/parser/ContentModel.java218
-rwxr-xr-xlibjava/javax/swing/text/html/parser/DTD.java607
-rwxr-xr-xlibjava/javax/swing/text/html/parser/DTDConstants.java290
-rw-r--r--libjava/javax/swing/text/html/parser/DocumentParser.java261
-rwxr-xr-xlibjava/javax/swing/text/html/parser/Element.java317
-rw-r--r--libjava/javax/swing/text/html/parser/Entity.java185
-rwxr-xr-xlibjava/javax/swing/text/html/parser/Parser.java436
-rwxr-xr-xlibjava/javax/swing/text/html/parser/TagElement.java142
-rw-r--r--libjava/javax/swing/text/rtf/ControlWordToken.java86
-rw-r--r--libjava/javax/swing/text/rtf/RTFEditorKit.java114
-rw-r--r--libjava/javax/swing/text/rtf/RTFParseException.java65
-rw-r--r--libjava/javax/swing/text/rtf/RTFParser.java195
-rw-r--r--libjava/javax/swing/text/rtf/RTFScanner.java268
-rw-r--r--libjava/javax/swing/text/rtf/TextToken.java65
-rw-r--r--libjava/javax/swing/text/rtf/Token.java91
-rw-r--r--libjava/testsuite/libjava.special/pr21115.java34
-rw-r--r--libjava/testsuite/libjava.special/pr21115.out0
-rw-r--r--libjava/testsuite/libjava.special/pr21115I.java20
-rw-r--r--libjava/testsuite/libjava.special/special.exp30
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/16.cc202
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/16.cc202
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc79
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc79
284 files changed, 32949 insertions, 0 deletions
diff --git a/gcc/config/alpha/sync.md b/gcc/config/alpha/sync.md
new file mode 100644
index 00000000000..8f67a4e255d
--- /dev/null
+++ b/gcc/config/alpha/sync.md
@@ -0,0 +1,312 @@
+;; GCC machine description for Alpha synchronization instructions.
+;; Copyright (C) 2005
+;; Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+(define_mode_macro I48MODE [SI DI])
+(define_mode_attr modesuffix [(SI "l") (DI "q")])
+
+(define_code_macro FETCHOP [plus minus ior xor and])
+(define_code_attr fetchop_name
+ [(plus "add") (minus "sub") (ior "ior") (xor "xor") (and "and")])
+(define_code_attr fetchop_pred
+ [(plus "add_operand") (minus "reg_or_8bit_operand")
+ (ior "or_operand") (xor "or_operand") (and "and_operand")])
+(define_code_attr fetchop_constr
+ [(plus "rKL") (minus "rI") (ior "rIN") (xor "rIN") (and "riNHM")])
+
+
+(define_expand "memory_barrier"
+ [(set (mem:BLK (match_dup 0))
+ (unspec_volatile:BLK [(mem:BLK (match_dup 0))] UNSPECV_MB))]
+ ""
+{
+ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (DImode));
+ MEM_VOLATILE_P (operands[0]) = 1;
+})
+
+(define_insn "*mb_internal"
+ [(set (match_operand:BLK 0 "" "")
+ (unspec_volatile:BLK [(match_operand:BLK 1 "" "")] UNSPECV_MB))]
+ ""
+ "mb"
+ [(set_attr "type" "mb")])
+
+(define_insn "load_locked_<mode>"
+ [(set (match_operand:I48MODE 0 "register_operand" "=r")
+ (unspec_volatile:I48MODE
+ [(match_operand:I48MODE 1 "memory_operand" "m")]
+ UNSPECV_LL))]
+ ""
+ "ld<modesuffix>_l %0,%1"
+ [(set_attr "type" "ld_l")])
+
+(define_insn "store_conditional_<mode>"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (unspec_volatile:DI [(const_int 0)] UNSPECV_SC))
+ (set (match_operand:I48MODE 1 "memory_operand" "=m")
+ (match_operand:I48MODE 2 "reg_or_0_operand" "0"))]
+ ""
+ "st<modesuffix>_c %0,%1"
+ [(set_attr "type" "st_c")])
+
+;; The Alpha Architecture Handbook says that it is UNPREDICTABLE whether
+;; the lock is cleared by a TAKEN branch. If we were to honor that, it
+;; would mean that we could not expand a ll/sc sequence until after the
+;; final basic-block reordering pass. Fortunately, it appears that no
+;; Alpha implementation ever built actually clears the lock on branches,
+;; taken or not.
+
+(define_insn_and_split "sync_<fetchop_name><mode>"
+ [(set (match_operand:I48MODE 0 "memory_operand" "+m")
+ (unspec_volatile:I48MODE
+ [(FETCHOP:I48MODE (match_dup 0)
+ (match_operand:I48MODE 1 "<fetchop_pred>" "<fetchop_constr>"))]
+ UNSPECV_ATOMIC))
+ (clobber (match_scratch:I48MODE 2 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ alpha_split_atomic_op (<CODE>, operands[0], operands[1],
+ NULL, NULL, operands[2]);
+ DONE;
+}
+ [(set_attr "type" "multi")])
+
+(define_insn_and_split "sync_nand<mode>"
+ [(set (match_operand:I48MODE 0 "memory_operand" "+m")
+ (unspec_volatile:I48MODE
+ [(and:I48MODE (not:I48MODE (match_dup 0))
+ (match_operand:I48MODE 1 "register_operand" "r"))]
+ UNSPECV_ATOMIC))
+ (clobber (match_scratch:I48MODE 2 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ alpha_split_atomic_op (NOT, operands[0], operands[1],
+ NULL, NULL, operands[2]);
+ DONE;
+}
+ [(set_attr "type" "multi")])
+
+(define_insn_and_split "sync_old_<fetchop_name><mode>"
+ [(set (match_operand:I48MODE 0 "register_operand" "=&r")
+ (match_operand:I48MODE 1 "memory_operand" "+m"))
+ (set (match_dup 1)
+ (unspec_volatile:I48MODE
+ [(FETCHOP:I48MODE (match_dup 1)
+ (match_operand:I48MODE 2 "<fetchop_pred>" "<fetchop_constr>"))]
+ UNSPECV_ATOMIC))
+ (clobber (match_scratch:I48MODE 3 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ alpha_split_atomic_op (<CODE>, operands[1], operands[2],
+ operands[0], NULL, operands[3]);
+ DONE;
+}
+ [(set_attr "type" "multi")])
+
+(define_insn_and_split "sync_old_nand<mode>"
+ [(set (match_operand:I48MODE 0 "register_operand" "=&r")
+ (match_operand:I48MODE 1 "memory_operand" "+m"))
+ (set (match_dup 1)
+ (unspec_volatile:I48MODE
+ [(and:I48MODE (not:I48MODE (match_dup 1))
+ (match_operand:I48MODE 2 "register_operand" "r"))]
+ UNSPECV_ATOMIC))
+ (clobber (match_scratch:I48MODE 3 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ alpha_split_atomic_op (NOT, operands[1], operands[2],
+ operands[0], NULL, operands[3]);
+ DONE;
+}
+ [(set_attr "type" "multi")])
+
+(define_insn_and_split "sync_new_<fetchop_name><mode>"
+ [(set (match_operand:I48MODE 0 "register_operand" "=&r")
+ (FETCHOP:I48MODE
+ (match_operand:I48MODE 1 "memory_operand" "+m")
+ (match_operand:I48MODE 2 "<fetchop_pred>" "<fetchop_constr>")))
+ (set (match_dup 1)
+ (unspec_volatile:I48MODE
+ [(FETCHOP:I48MODE (match_dup 1) (match_dup 2))]
+ UNSPECV_ATOMIC))
+ (clobber (match_scratch:I48MODE 3 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ alpha_split_atomic_op (<CODE>, operands[1], operands[2],
+ NULL, operands[0], operands[3]);
+ DONE;
+}
+ [(set_attr "type" "multi")])
+
+(define_insn_and_split "sync_new_nand<mode>"
+ [(set (match_operand:I48MODE 0 "register_operand" "=&r")
+ (and:I48MODE
+ (not:I48MODE (match_operand:I48MODE 1 "memory_operand" "+m"))
+ (match_operand:I48MODE 2 "register_operand" "r")))
+ (set (match_dup 1)
+ (unspec_volatile:I48MODE
+ [(and:I48MODE (not:I48MODE (match_dup 1)) (match_dup 2))]
+ UNSPECV_ATOMIC))
+ (clobber (match_scratch:I48MODE 3 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ alpha_split_atomic_op (NOT, operands[1], operands[2],
+ NULL, operands[0], operands[3]);
+ DONE;
+}
+ [(set_attr "type" "multi")])
+
+(define_expand "sync_compare_and_swap<mode>"
+ [(parallel
+ [(set (match_operand:I48MODE 0 "register_operand" "")
+ (match_operand:I48MODE 1 "memory_operand" ""))
+ (set (match_dup 1)
+ (unspec_volatile:I48MODE
+ [(match_operand:I48MODE 2 "reg_or_8bit_operand" "")
+ (match_operand:I48MODE 3 "add_operand" "rKL")]
+ UNSPECV_CMPXCHG))
+ (clobber (match_scratch:I48MODE 4 "=&r"))])]
+ ""
+{
+ if (<MODE>mode == SImode)
+ operands[2] = convert_modes (DImode, SImode, operands[2], 0);
+})
+
+(define_insn_and_split "*sync_compare_and_swap<mode>"
+ [(set (match_operand:I48MODE 0 "register_operand" "=&r")
+ (match_operand:I48MODE 1 "memory_operand" "+m"))
+ (set (match_dup 1)
+ (unspec_volatile:I48MODE
+ [(match_operand:DI 2 "reg_or_8bit_operand" "rI")
+ (match_operand:I48MODE 3 "add_operand" "rKL")]
+ UNSPECV_CMPXCHG))
+ (clobber (match_scratch:I48MODE 4 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ rtx retval, mem, oldval, newval, scratch;
+ rtx cond, label1, label2, x;
+ rtx very_unlikely = GEN_INT (REG_BR_PROB_BASE / 100 - 1);
+
+ retval = operands[0];
+ mem = operands[1];
+ oldval = operands[2];
+ newval = operands[3];
+ scratch = operands[4];
+ cond = gen_lowpart (DImode, scratch);
+
+ emit_insn (gen_memory_barrier ());
+
+ label1 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
+ label2 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
+ emit_label (XEXP (label1, 0));
+
+ emit_insn (gen_load_locked_<mode> (retval, mem));
+
+ x = gen_lowpart (DImode, retval);
+ if (oldval == const0_rtx)
+ x = gen_rtx_NE (DImode, x, const0_rtx);
+ else
+ {
+ x = gen_rtx_EQ (DImode, x, oldval);
+ emit_insn (gen_rtx_SET (VOIDmode, cond, x));
+ x = gen_rtx_EQ (DImode, cond, const0_rtx);
+ }
+ x = gen_rtx_IF_THEN_ELSE (VOIDmode, x, label2, pc_rtx);
+ x = emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, x));
+ REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_BR_PROB, very_unlikely, NULL_RTX);
+
+ emit_move_insn (scratch, newval);
+
+ emit_insn (gen_store_conditional_<mode> (cond, mem, scratch));
+
+ x = gen_rtx_EQ (DImode, cond, const0_rtx);
+ x = gen_rtx_IF_THEN_ELSE (VOIDmode, x, label1, pc_rtx);
+ x = emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, x));
+ REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_BR_PROB, very_unlikely, NULL_RTX);
+
+ emit_insn (gen_memory_barrier ());
+ emit_label (XEXP (label2, 0));
+ DONE;
+}
+ [(set_attr "type" "multi")])
+
+(define_insn_and_split "sync_lock_test_and_set<mode>"
+ [(set (match_operand:I48MODE 0 "register_operand" "=&r")
+ (match_operand:I48MODE 1 "memory_operand" "+m"))
+ (set (match_dup 1)
+ (unspec_volatile:I48MODE
+ [(match_operand:I48MODE 2 "add_operand" "rKL")]
+ UNSPECV_XCHG))
+ (clobber (match_scratch:I48MODE 3 "=&r"))]
+ ""
+ "#"
+ "reload_completed"
+ [(const_int 0)]
+{
+ rtx retval, mem, val, scratch;
+ rtx cond, label1, x;
+ rtx very_unlikely = GEN_INT (REG_BR_PROB_BASE / 100 - 1);
+
+ retval = operands[0];
+ mem = operands[1];
+ val = operands[2];
+ scratch = operands[3];
+ cond = gen_lowpart (DImode, scratch);
+
+ emit_insn (gen_memory_barrier ());
+
+ label1 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
+ emit_label (XEXP (label1, 0));
+
+ emit_insn (gen_load_locked_<mode> (retval, mem));
+
+ emit_move_insn (scratch, val);
+
+ emit_insn (gen_store_conditional_<mode> (cond, mem, scratch));
+
+ x = gen_rtx_EQ (DImode, cond, const0_rtx);
+ x = gen_rtx_IF_THEN_ELSE (VOIDmode, x, label1, pc_rtx);
+ x = emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, x));
+ REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_BR_PROB, very_unlikely, NULL_RTX);
+
+ DONE;
+}
+ [(set_attr "type" "multi")])
diff --git a/gcc/config/cris/aout.opt b/gcc/config/cris/aout.opt
new file mode 100644
index 00000000000..f51dc2e68fc
--- /dev/null
+++ b/gcc/config/cris/aout.opt
@@ -0,0 +1,32 @@
+; a.out-specific options for the CRIS port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+; Legacy option.
+maout
+Target Report RejectNegative Undocumented
+
+melinux
+Target Report RejectNegative
+Compile for the MMU-less Etrax 100-based elinux system
+
+melinux-stacksize=
+Target Report RejectNegative Joined
+-melinux-stacksize=SIZE For elinux, request a specified stack-size for this program
diff --git a/gcc/config/cris/cris.opt b/gcc/config/cris/cris.opt
new file mode 100644
index 00000000000..0aad8e7d14c
--- /dev/null
+++ b/gcc/config/cris/cris.opt
@@ -0,0 +1,191 @@
+; Options for the CRIS port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+; TARGET_MUL_BUG: Whether or not to work around multiplication
+; instruction hardware bug when generating code for models where
+; it may be present. From the trouble report for Etrax 100 LX:
+; "A multiply operation may cause incorrect cache behaviour
+; under some specific circumstances. The problem can occur if
+; the instruction following the multiply instruction causes a
+; cache miss, and multiply operand 1 (source operand) bits
+; [31:27] matches the logical mapping of the mode register
+; address (0xb0....), and bits [9:2] of operand 1 matches the
+; TLB register address (0x258-0x25f). There is such a mapping
+; in kernel mode or when the MMU is off. Normally there is no
+; such mapping in user mode, and the problem will therefore
+; probably not occur in Linux user mode programs."
+;
+; We have no sure-fire way to know from within GCC that we're
+; compiling a user program. For example, -fpic/PIC is used in
+; libgcc which is linked into the kernel. However, the
+; workaround option -mno-mul-bug can be safely used per-package
+; when compiling programs. The same goes for general user-only
+; libraries such as glibc, since there's no user-space
+; driver-like program that gets a mapping of I/O registers (all
+; on the same page, including the TLB registers).
+mmul-bug-workaround
+Target Report Mask(MUL_BUG)
+Work around bug in multiplication instruction
+
+; TARGET_ETRAX4_ADD: Instruction-set additions from Etrax 4 and up.
+; (Just "lz", which we don't really generate from GCC -- yet).
+metrax4
+Target Report Mask(ETRAX4_ADD)
+Compile for ETRAX 4 (CRIS v3)
+
+; See cris_handle_option.
+metrax100
+Target Report RejectNegative
+Compile for ETRAX 100 (CRIS v8)
+
+; See cris_handle_option.
+mno-etrax100
+Target Report RejectNegative Undocumented
+
+mpdebug
+Target Report Mask(PDEBUG)
+Emit verbose debug information in assembly code
+
+; TARGET_CCINIT: Whether to use condition-codes generated by
+; insns other than the immediately preceding compare/test insn.
+; Used to check for errors in notice_update_cc.
+mcc-init
+Target Report Mask(CCINIT)
+Do not use condition codes from normal instructions
+
+; TARGET_SIDE_EFFECT_PREFIXES: Whether to use side-effect
+; patterns. Used to debug the [rx=ry+i] type patterns.
+mside-effects
+Target Report RejectNegative Mask(SIDE_EFFECT_PREFIXES) Undocumented
+
+mno-side-effects
+Target Report RejectNegative InverseMask(SIDE_EFFECT_PREFIXES)
+Do not emit addressing modes with side-effect assignment
+
+; TARGET_STACK_ALIGN: Whether to *keep* (not force) alignment of
+; stack at 16 (or 32, depending on TARGET_ALIGN_BY_32) bits.
+mstack-align
+Target Report RejectNegative Mask(STACK_ALIGN) Undocumented
+
+mno-stack-align
+Target Report RejectNegative InverseMask(STACK_ALIGN)
+Do not tune stack alignment
+
+; TARGET_DATA_ALIGN: Whether to do alignment on individual
+; modifiable objects.
+mdata-align
+Target Report RejectNegative Mask(DATA_ALIGN) Undocumented
+
+mno-data-align
+Target Report RejectNegative InverseMask(DATA_ALIGN)
+Do not tune writable data alignment
+
+; TARGET_CONST_ALIGN: Whether to do alignment on individual
+; non-modifiable objects.
+mconst-align
+Target Report RejectNegative Mask(CONST_ALIGN) Undocumented
+
+mno-const-align
+Target Report RejectNegative InverseMask(CONST_ALIGN)
+Do not tune code and read-only data alignment
+
+; See cris_handle_option.
+m32-bit
+Target Report RejectNegative Undocumented
+
+; See cris_handle_option.
+m32bit
+Target Report RejectNegative
+Align code and data to 32 bits
+
+; See cris_handle_option.
+m16-bit
+Target Report RejectNegative Undocumented
+
+; See cris_handle_option.
+m16bit
+Target Report RejectNegative Undocumented
+
+; See cris_handle_option.
+m8-bit
+Target Report RejectNegative Undocumented
+
+; See cris_handle_option.
+m8bit
+Target Report RejectNegative
+Don't align items in code or data
+
+; TARGET_PROLOGUE_EPILOGUE: Whether or not to omit function
+; prologue and epilogue.
+mprologue-epilogue
+Target Report RejectNegative Mask(PROLOGUE_EPILOGUE) Undocumented
+
+mno-prologue-epilogue
+Target Report RejectNegative InverseMask(PROLOGUE_EPILOGUE)
+Do not emit function prologue or epilogue
+
+; We have to handle this m-option here since we can't wash it
+; off in both CC1_SPEC and CC1PLUS_SPEC.
+
+mbest-lib-options
+Target Report RejectNegative
+Use the most feature-enabling options allowed by other options
+
+; FIXME: The following comment relates to gcc before cris.opt.
+; Check it it's still valid:
+; We must call it "override-" since calling it "no-" will cause
+; gcc.c to forget it, if there's a "later" -mbest-lib-options.
+; Kludgy, but needed for some multilibbed files.
+moverride-best-lib-options
+Target Report RejectNegative
+Override -mbest-lib-options
+
+mcpu=
+Target Report RejectNegative Joined Undocumented
+
+march=
+Target Report RejectNegative Joined
+-march=ARCH Generate code for the specified chip or CPU version
+
+mtune=
+Target Report RejectNegative Joined
+-mtune=ARCH Tune alignment for the specified chip or CPU version
+
+mmax-stackframe=
+Target Report RejectNegative Joined
+-mmax-stackframe=SIZE Warn when a stackframe is larger than the specified size
+
+max-stackframe=
+Target Report RejectNegative Joined Undocumented
+
+; TARGET_SVINTO: Currently this just affects alignment. FIXME:
+; Redundant with TARGET_ALIGN_BY_32, or put machine stuff here?
+; This and the others below could just as well be variables and
+; TARGET_* defines in cris.h.
+Mask(SVINTO)
+
+; TARGET_ALIGN_BY_32: Say that all alignment specifications say
+; to prefer 32 rather than 16 bits.
+Mask(ALIGN_BY_32)
+
+; TARGET_AVOID_GOTPLT is referred to in the .c and the .md so we
+; need to allocate the flag and macros here.
+Mask(AVOID_GOTPLT)
diff --git a/gcc/config/cris/elf.opt b/gcc/config/cris/elf.opt
new file mode 100644
index 00000000000..f861843634c
--- /dev/null
+++ b/gcc/config/cris/elf.opt
@@ -0,0 +1,23 @@
+; ELF-specific options for the CRIS port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+melf
+Target Report RejectNegative Undocumented
diff --git a/gcc/config/cris/linux.opt b/gcc/config/cris/linux.opt
new file mode 100644
index 00000000000..559fc6a61f7
--- /dev/null
+++ b/gcc/config/cris/linux.opt
@@ -0,0 +1,34 @@
+; GNU/Linux-specific options for the CRIS port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+; Provide a legacy -mlinux option.
+mlinux
+Target Report RejectNegative Undocumented
+
+mno-gotplt
+Target Report RejectNegative Mask(AVOID_GOTPLT) MaskExists
+Together with -fpic and -fPIC, do not use GOTPLT references
+
+; There's a small added setup cost with using GOTPLT references
+; for the first (resolving) call, but should in total be a win
+; both in code-size and execution-time.
+mgotplt
+Target Report RejectNegative InverseMask(AVOID_GOTPLT) Undocumented
diff --git a/gcc/config/cris/predicates.md b/gcc/config/cris/predicates.md
new file mode 100644
index 00000000000..2d5ef19f02e
--- /dev/null
+++ b/gcc/config/cris/predicates.md
@@ -0,0 +1,170 @@
+;; Operand and operator predicates for the GCC CRIS port.
+;; Copyright (C) 2005 Free Software Foundation, Inc.
+
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;; Operator predicates.
+
+(define_predicate "cris_orthogonal_operator"
+ (match_code "plus, minus, ior, and, umin"))
+
+(define_predicate "cris_commutative_orth_op"
+ (match_code "plus, ior, and, umin"))
+
+;; By the name, you might think we should include MULT. We don't because
+;; it doesn't accept the same addressing modes as the others (only
+;; registers) and there's also the problem of handling TARGET_MUL_BUG.
+
+(define_predicate "cris_operand_extend_operator"
+ (match_code "plus, minus, umin"))
+
+(define_predicate "cris_additive_operand_extend_operator"
+ (match_code "plus, minus"))
+
+(define_predicate "cris_extend_operator"
+ (match_code "zero_extend, sign_extend"))
+
+(define_predicate "cris_plus_or_bound_operator"
+ (match_code "plus, umin"))
+
+;; Used as an operator to get a handle on a already-known-valid MEM rtx:es
+;; (no need to validate the address), where some address expression parts
+;; have their own match_operand.
+
+(define_predicate "cris_mem_op"
+ (match_code "mem"))
+
+(define_predicate "cris_load_multiple_op"
+ (and (match_code "parallel")
+ (match_test "cris_movem_load_rest_p (op, 0)")))
+
+(define_predicate "cris_store_multiple_op"
+ (and (match_code "parallel")
+ (match_test "cris_store_multiple_op_p (op)")))
+
+
+;; Operand helper predicates.
+
+(define_predicate "cris_bdap_const_operand"
+ (and (match_code "label_ref, symbol_ref, const_int, const_double, const")
+ (not (and (match_test "flag_pic")
+ (match_test "cris_symbol (op)")))))
+
+(define_predicate "cris_simple_address_operand"
+ (ior (match_operand:SI 0 "register_operand")
+ (and (match_code "post_inc")
+ (match_test "register_operand (XEXP (op, 0), Pmode)"))))
+
+(define_predicate "cris_simple_operand"
+ (ior (match_operand 0 "register_operand")
+ (and (match_code "mem")
+ (match_test "cris_simple_address_operand (XEXP (op, 0),
+ Pmode)"))))
+
+;; The caller needs to use :SI.
+(define_predicate "cris_bdap_sign_extend_operand"
+ (and (match_code "sign_extend")
+ (and (match_test "MEM_P (XEXP (op, 0))")
+ (match_test "cris_simple_address_operand (XEXP (XEXP (op, 0), 0),
+ Pmode)"))))
+
+;; FIXME: Should not have to test for 1.
+(define_predicate "cris_scale_int_operand"
+ (and (match_code "const_int")
+ (ior (ior (match_test "op == GEN_INT (4)")
+ (match_test "op == const2_rtx"))
+ (match_test "op == const1_rtx"))))
+
+;; FIXME: Should be able to assume (reg int).
+(define_predicate "cris_biap_mult_operand"
+ (and (match_code "mult")
+ (ior (and (match_test "register_operand (XEXP (op, 0), Pmode)")
+ (match_test "cris_scale_int_operand (XEXP (op, 1), Pmode)"))
+ (and (match_test "cris_scale_int_operand (XEXP (op, 0), Pmode)")
+ (match_test "register_operand (XEXP (op, 1), Pmode)")))))
+
+
+;; Operand predicates.
+
+;; This checks a part of an address, the one that is not a plain register
+;; for an addressing mode using BDAP.
+;; Allowed operands are either:
+;; a) a register
+;; b) a CONST operand (but not a symbol when generating PIC)
+;; c) a [r] or [r+] in SImode, or sign-extend from HI or QI.
+
+(define_predicate "cris_bdap_operand"
+ (ior (match_operand 0 "cris_bdap_const_operand")
+ (ior (match_operand:SI 0 "cris_simple_operand")
+ (match_operand:SI 0 "cris_bdap_sign_extend_operand"))))
+
+;; This is similar to cris_bdap_operand:
+;; It checks a part of an address, the one that is not a plain register
+;; for an addressing mode using BDAP or BIAP.
+;; Allowed operands are either:
+;; a) a register
+;; b) a CONST operand (but not a symbol when generating PIC)
+;; c) a mult of (1, 2 or 4) and a register
+;; d) a [r] or [r+] in SImode, or sign-extend from HI or QI. */
+
+(define_predicate "cris_bdap_biap_operand"
+ (ior (match_operand 0 "cris_bdap_operand")
+ (match_operand 0 "cris_biap_mult_operand")))
+
+;; Since a PIC symbol without a GOT entry is not a general_operand, we
+;; have to have a predicate that matches it. We use this in the expanded
+;; "movsi" anonymous pattern.
+;; FIXME: Can s/special_// when PR 20413 is fixed.
+
+(define_special_predicate "cris_general_operand_or_gotless_symbol"
+ (ior (match_operand 0 "general_operand")
+ (and (match_code "const, symbol_ref, label_ref, unspec")
+ (match_test "cris_gotless_symbol (op)"))))
+
+;; Since with -fPIC, not all symbols are valid PIC symbols or indeed
+;; general_operands, we have to have a predicate that matches it for the
+;; "movsi" expander.
+;; FIXME: Can s/special_// when PR 20413 is fixed.
+
+(define_special_predicate "cris_general_operand_or_symbol"
+ (ior (match_operand 0 "general_operand")
+ (and (match_code "const, symbol_ref, label_ref")
+ (match_test "cris_symbol (op)"))))
+
+;; Since a PLT symbol is not a general_operand, we have to have a
+;; predicate that matches it when we need it. We use this in the expanded
+;; "call" and "call_value" anonymous patterns.
+
+(define_predicate "cris_general_operand_or_plt_symbol"
+ (ior (match_operand 0 "general_operand")
+ (and (match_code "const")
+ (and (match_test "GET_CODE (XEXP (op, 0)) == UNSPEC")
+ (not (match_test "TARGET_AVOID_GOTPLT"))))))
+
+;; This matches a (MEM (general_operand)) or
+;; (MEM (cris_general_operand_or_symbol)). The second one isn't a valid
+;; memory_operand, so we need this predicate to recognize call
+;; destinations before we change them to a PLT operand (by wrapping in
+;; UNSPEC CRIS_UNSPEC_PLT).
+
+(define_predicate "cris_mem_call_operand"
+ (and (match_code "mem")
+ (ior (match_operand 0 "memory_operand")
+ (match_test "cris_general_operand_or_symbol (XEXP (op, 0),
+ Pmode)"))))
diff --git a/gcc/config/darwin.opt b/gcc/config/darwin.opt
new file mode 100644
index 00000000000..8e4aeecc56a
--- /dev/null
+++ b/gcc/config/darwin.opt
@@ -0,0 +1,28 @@
+; Processor-independent options for Darwin.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+mone-byte-bool
+Target RejectNegative Report Var(darwin_one_byte_bool)
+Set sizeof(bool) to 1
+
+mfix-and-continue
+Target Report Var(darwin_fix_and_continue)
+Generate code suitable for fast turn around debugging
diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt
new file mode 100644
index 00000000000..d61df2bb3eb
--- /dev/null
+++ b/gcc/config/i386/cygming.opt
@@ -0,0 +1,48 @@
+; Cygwin- and MinGW-specific options.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+mconsole
+Target RejectNegative
+Create console application
+
+mcygwin
+Target
+Use the Cygwin interface
+
+mdll
+Target RejectNegative
+Generate code for a DLL
+
+mnop-fun-dllimport
+Target Report Var(TARGET_NOP_FUN_DLLIMPORT)
+Ignore dllimport for functions
+
+mthreads
+Target RejectNegative
+Use Mingw-specific thread support
+
+mwin32
+Target
+Set Windows defines
+
+mwindows
+Target
+Create GUI application
diff --git a/gcc/config/i386/djgpp.opt b/gcc/config/i386/djgpp.opt
new file mode 100644
index 00000000000..31c26882e3e
--- /dev/null
+++ b/gcc/config/i386/djgpp.opt
@@ -0,0 +1,26 @@
+; DJGPP-specific options.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+;; -mbnu210 is now ignored and obsolete. It was used to enable support for
+;; weak symbols, and .gnu.linkonce support.
+mbnu210
+Target Var(TARGET_BNU210)
+Ignored (obsolete)
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
new file mode 100644
index 00000000000..5571deebe4e
--- /dev/null
+++ b/gcc/config/i386/i386.opt
@@ -0,0 +1,217 @@
+; Options for the IA-32 and AMD64 ports of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+m128bit-long-double
+Target RejectNegative Report Mask(128BIT_LONG_DOUBLE)
+sizeof(long double) is 16
+
+m32
+Target RejectNegative Report InverseMask(64BIT)
+Generate 32bit i386 code
+
+m386
+Target RejectNegative Undocumented
+;; Deprecated
+
+m3dnow
+Target Report Mask(3DNOW)
+Support 3DNow! built-in functions
+
+m486
+Target RejectNegative Undocumented
+;; Deprecated
+
+m64
+Target RejectNegative Report Mask(64BIT)
+Generate 64bit x86-64 code
+
+m80387
+Target Report Mask(80387)
+Use hardware fp
+
+m96bit-long-double
+Target RejectNegative Report InverseMask(128BIT_LONG_DOUBLE)
+sizeof(long double) is 12
+
+maccumulate-outgoing-args
+Target Report Mask(ACCUMULATE_OUTGOING_ARGS)
+Reserve space for outgoing arguments in the function prologue
+
+malign-double
+Target Report Mask(ALIGN_DOUBLE)
+Align some doubles on dword boundary
+
+malign-functions=
+Target RejectNegative Joined
+Function starts are aligned to this power of 2
+
+malign-jumps=
+Target RejectNegative Joined
+Jump targets are aligned to this power of 2
+
+malign-loops=
+Target RejectNegative Joined
+Loop code aligned to this power of 2
+
+malign-stringops
+Target RejectNegative Report InverseMask(NO_ALIGN_STRINGOPS, ALIGN_STRINGOPS)
+Align destination of the string operations
+
+march=
+Target RejectNegative Joined
+Generate code for given CPU
+
+masm=
+Target RejectNegative Joined
+Use given assembler dialect
+
+mbranch-cost=
+Target RejectNegative Joined
+Branches are this expensive (1-5, arbitrary units)
+
+mcmodel=
+Target RejectNegative Joined
+Use given x86-64 code model
+
+mdebug-addr
+Target RejectNegative Var(TARGET_DEBUG_ADDR) Undocumented
+
+mdebug-arg
+Target RejectNegative Var(TARGET_DEBUG_ARG) Undocumented
+
+mfancy-math-387
+Target RejectNegative Report InverseMask(NO_FANCY_MATH_387, USE_FANCY_MATH_387)
+Generate sin, cos, sqrt for FPU
+
+mfp-ret-in-387
+Target Report Mask(FLOAT_RETURNS)
+Return values of functions in FPU registers
+
+mfpmath=
+Target RejectNegative Joined
+Generate floating point mathematics using given instruction set
+
+mhard-float
+Target RejectNegative Mask(80387) MaskExists
+Use hardware fp
+
+mieee-fp
+Target Report Mask(IEEE_FP)
+Use IEEE math for fp comparisons
+
+minline-all-stringops
+Target Report Mask(INLINE_ALL_STRINGOPS)
+Inline all known string operations
+
+mintel-syntax
+Target Undocumented
+;; Deprecated
+
+mmmx
+Target Report Mask(MMX)
+Support MMX built-in functions
+
+mms-bitfields
+Target Report Mask(MS_BITFIELD_LAYOUT)
+Use native (MS) bitfield layout
+
+mno-align-stringops
+Target RejectNegative Report Mask(NO_ALIGN_STRINGOPS) Undocumented
+
+mno-fancy-math-387
+Target RejectNegative Report Mask(NO_FANCY_MATH_387) Undocumented
+
+mno-push-args
+Target RejectNegative Report Mask(NO_PUSH_ARGS) Undocumented
+
+mno-red-zone
+Target RejectNegative Report Mask(NO_RED_ZONE) Undocumented
+
+momit-leaf-frame-pointer
+Target Report Mask(OMIT_LEAF_FRAME_POINTER)
+Omit the frame pointer in leaf functions
+
+mpentium
+Target RejectNegative Undocumented
+;; Deprecated
+
+mpentiumpro
+Target RejectNegative Undocumented
+;; Deprecated
+
+mpreferred-stack-boundary=
+Target RejectNegative Joined
+Attempt to keep stack aligned to this power of 2
+
+mpush-args
+Target Report InverseMask(NO_PUSH_ARGS, PUSH_ARGS)
+Use push instructions to save outgoing arguments
+
+mred-zone
+Target RejectNegative Report InverseMask(NO_RED_ZONE, RED_ZONE)
+Use red-zone in the x86-64 code
+
+mregparm=
+Target RejectNegative Joined
+Number of registers used to pass integer arguments
+
+mrtd
+Target Report Mask(RTD)
+Alternate calling convention
+
+msoft-float
+Target InverseMask(80387)
+Do not use hardware fp
+
+msse
+Target Report Mask(SSE)
+Support MMX and SSE built-in functions and code generation
+
+msse2
+Target Report Mask(SSE2)
+Support MMX, SSE and SSE2 built-in functions and code generation
+
+msse3
+Target Report Mask(SSE3)
+Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation
+
+msvr3-shlib
+Target Report Mask(SVR3_SHLIB)
+Uninitialized locals in .bss
+
+mstack-arg-probe
+Target Report Mask(STACK_PROBE)
+Enable stack probing
+
+mtls-dialect=
+Target RejectNegative Joined
+Use given thread-local storage dialect
+
+mtls-direct-seg-refs
+Target Report Mask(TLS_DIRECT_SEG_REFS)
+Use direct references against %gs when accessing tls data
+
+mtune=
+Target RejectNegative Joined
+Schedule code for given CPU
+
+;; Support Athlon 3Dnow builtins
+Mask(3DNOW_A)
diff --git a/gcc/config/i386/sco5.opt b/gcc/config/i386/sco5.opt
new file mode 100644
index 00000000000..9bafcf56978
--- /dev/null
+++ b/gcc/config/i386/sco5.opt
@@ -0,0 +1,25 @@
+; SCO Unix-specific options.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+;; Legacy option
+melf
+Target RejectNegative
+Generate ELF output
diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md
new file mode 100644
index 00000000000..99d100fd726
--- /dev/null
+++ b/gcc/config/i386/sync.md
@@ -0,0 +1,155 @@
+;; GCC machine description for i386 synchronization instructions.
+;; Copyright (C) 2005
+;; Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+(define_mode_macro IMODE [QI HI SI (DI "TARGET_64BIT")])
+(define_mode_attr modesuffix [(QI "b") (HI "w") (SI "l") (DI "q")])
+(define_mode_attr modeconstraint [(QI "q") (HI "r") (SI "r") (DI "r")])
+(define_mode_attr immconstraint [(QI "i") (HI "i") (SI "i") (DI "e")])
+
+;; ??? It would be possible to use cmpxchg8b on pentium for DImode
+;; changes. It's complicated because the insn uses ecx:ebx as the
+;; new value; note that the registers are reversed from the order
+;; that they'd be in with (reg:DI 2 ecx). Similarly for TImode
+;; data in 64-bit mode.
+
+(define_insn "sync_compare_and_swap<mode>"
+ [(set (match_operand:IMODE 0 "register_operand" "=a")
+ (match_operand:IMODE 1 "memory_operand" "+m"))
+ (set (match_dup 1)
+ (unspec_volatile:IMODE
+ [(match_dup 1)
+ (match_operand:IMODE 2 "register_operand" "a")
+ (match_operand:IMODE 3 "register_operand" "<modeconstraint>")]
+ UNSPECV_CMPXCHG_1))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_CMPXCHG"
+ "lock\;cmpxchg{<modesuffix>}\t{%3, %1|%1, %3}")
+
+(define_expand "sync_compare_and_swap_cc<mode>"
+ [(parallel
+ [(set (match_operand:IMODE 0 "register_operand" "")
+ (match_operand:IMODE 1 "memory_operand" ""))
+ (set (match_dup 1)
+ (unspec_volatile:IMODE
+ [(match_dup 1)
+ (match_operand:IMODE 2 "register_operand" "")
+ (match_operand:IMODE 3 "register_operand" "")]
+ UNSPECV_CMPXCHG_1))
+ (set (match_dup 4)
+ (compare:CCZ
+ (unspec_volatile:IMODE
+ [(match_dup 1) (match_dup 2) (match_dup 3)] UNSPECV_CMPXCHG_2)
+ (match_dup 2)))])]
+ "TARGET_CMPXCHG"
+{
+ operands[4] = gen_rtx_REG (CCZmode, FLAGS_REG);
+ ix86_compare_op0 = operands[3];
+ ix86_compare_op1 = NULL;
+ ix86_compare_emitted = operands[4];
+})
+
+(define_insn "*sync_compare_and_swap_cc<mode>"
+ [(set (match_operand:IMODE 0 "register_operand" "=a")
+ (match_operand:IMODE 1 "memory_operand" "+m"))
+ (set (match_dup 1)
+ (unspec_volatile:IMODE
+ [(match_dup 1)
+ (match_operand:IMODE 2 "register_operand" "a")
+ (match_operand:IMODE 3 "register_operand" "<modeconstraint>")]
+ UNSPECV_CMPXCHG_1))
+ (set (reg:CCZ FLAGS_REG)
+ (compare:CCZ
+ (unspec_volatile:IMODE
+ [(match_dup 1) (match_dup 2) (match_dup 3)] UNSPECV_CMPXCHG_2)
+ (match_dup 2)))]
+ "TARGET_CMPXCHG"
+ "lock\;cmpxchg{<modesuffix>}\t{%3, %1|%1, %3}")
+
+(define_insn "sync_old_add<mode>"
+ [(set (match_operand:IMODE 0 "register_operand" "=<modeconstraint>")
+ (unspec_volatile:IMODE
+ [(match_operand:IMODE 1 "memory_operand" "+m")] UNSPECV_XCHG))
+ (set (match_dup 1)
+ (plus:IMODE (match_dup 1)
+ (match_operand:IMODE 2 "register_operand" "0")))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_XADD"
+ "lock\;xadd{<modesuffix>}\t{%0, %1|%1, %0}")
+
+;; Recall that xchg implicitly sets LOCK#, so adding it again wastes space.
+(define_insn "sync_lock_test_and_set<mode>"
+ [(set (match_operand:IMODE 0 "register_operand" "=<modeconstraint>")
+ (unspec_volatile:IMODE
+ [(match_operand:IMODE 1 "memory_operand" "+m")] UNSPECV_XCHG))
+ (set (match_dup 1)
+ (match_operand:IMODE 2 "register_operand" "0"))]
+ ""
+ "xchg{<modesuffix>}\t{%1, %0|%0, %1}")
+
+(define_insn "sync_add<mode>"
+ [(set (match_operand:IMODE 0 "memory_operand" "=m")
+ (unspec_volatile:IMODE
+ [(plus:IMODE (match_dup 0)
+ (match_operand:IMODE 1 "nonmemory_operand" "r<immconstraint>"))]
+ UNSPECV_LOCK))
+ (clobber (reg:CC FLAGS_REG))]
+ ""
+ "lock\;add{<modesuffix>}\t{%1, %0|%0, %1}")
+
+(define_insn "sync_sub<mode>"
+ [(set (match_operand:IMODE 0 "memory_operand" "=m")
+ (unspec_volatile:IMODE
+ [(minus:IMODE (match_dup 0)
+ (match_operand:IMODE 1 "nonmemory_operand" "r<immconstraint>"))]
+ UNSPECV_LOCK))
+ (clobber (reg:CC FLAGS_REG))]
+ ""
+ "lock\;sub{<modesuffix>}\t{%1, %0|%0, %1}")
+
+(define_insn "sync_ior<mode>"
+ [(set (match_operand:IMODE 0 "memory_operand" "=m")
+ (unspec_volatile:IMODE
+ [(ior:IMODE (match_dup 0)
+ (match_operand:IMODE 1 "nonmemory_operand" "r<immconstraint>"))]
+ UNSPECV_LOCK))
+ (clobber (reg:CC FLAGS_REG))]
+ ""
+ "lock\;or{<modesuffix>}\t{%1, %0|%0, %1}")
+
+(define_insn "sync_and<mode>"
+ [(set (match_operand:IMODE 0 "memory_operand" "=m")
+ (unspec_volatile:IMODE
+ [(and:IMODE (match_dup 0)
+ (match_operand:IMODE 1 "nonmemory_operand" "r<immconstraint>"))]
+ UNSPECV_LOCK))
+ (clobber (reg:CC FLAGS_REG))]
+ ""
+ "lock\;and{<modesuffix>}\t{%1, %0|%0, %1}")
+
+(define_insn "sync_xor<mode>"
+ [(set (match_operand:IMODE 0 "memory_operand" "=m")
+ (unspec_volatile:IMODE
+ [(xor:IMODE (match_dup 0)
+ (match_operand:IMODE 1 "nonmemory_operand" "r<immconstraint>"))]
+ UNSPECV_LOCK))
+ (clobber (reg:CC FLAGS_REG))]
+ ""
+ "lock\;xor{<modesuffix>}\t{%1, %0|%0, %1}")
diff --git a/gcc/config/ia64/sync.md b/gcc/config/ia64/sync.md
new file mode 100644
index 00000000000..0ea8e96ebaa
--- /dev/null
+++ b/gcc/config/ia64/sync.md
@@ -0,0 +1,113 @@
+;; GCC machine description for IA-64 synchronization instructions.
+;; Copyright (C) 2005
+;; Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+(define_mode_macro IMODE [QI HI SI DI])
+(define_mode_macro I48MODE [SI DI])
+(define_mode_attr modesuffix [(QI "1") (HI "2") (SI "4") (DI "8")])
+
+
+(define_insn "memory_barrier"
+ [(set (mem:BLK (match_scratch:DI 0 "X"))
+ (unspec:BLK [(mem:BLK (match_scratch:DI 1 "X"))] UNSPEC_MF))]
+ ""
+ "mf"
+ [(set_attr "itanium_class" "syst_m")])
+
+(define_expand "sync_add<mode>"
+ [(match_operand:I48MODE 0 "gr_register_operand" "")
+ (match_operand:I48MODE 1 "memory_operand" "")
+ (match_operand:I48MODE 2 "general_operand" "")]
+ ""
+{
+ if (!fetchadd_operand (operands[2], <MODE>mode))
+ FAIL;
+ emit_insn (gen_memory_barrier ());
+ emit_insn (gen_fetchadd_acq_<mode> (operands[0], operands[1], operands[2]));
+ DONE;
+})
+
+(define_expand "sync_old_add<mode>"
+ [(match_operand:I48MODE 0 "gr_register_operand" "")
+ (match_operand:I48MODE 1 "memory_operand" "")
+ (match_operand:I48MODE 2 "general_operand" "")]
+ ""
+{
+ if (!fetchadd_operand (operands[2], <MODE>mode))
+ FAIL;
+ emit_insn (gen_memory_barrier ());
+ emit_insn (gen_fetchadd_acq_<mode> (operands[0], operands[1], operands[2]));
+ DONE;
+})
+
+(define_insn "fetchadd_acq_<mode>"
+ [(set (match_operand:I48MODE 0 "gr_register_operand" "=r")
+ (match_operand:I48MODE 1 "not_postinc_memory_operand" "+S"))
+ (set (match_dup 1)
+ (unspec:I48MODE [(match_dup 1)
+ (match_operand:I48MODE 2 "fetchadd_operand" "n")]
+ UNSPEC_FETCHADD_ACQ))]
+ ""
+ "fetchadd<modesuffix>.acq %0 = %1, %2"
+ [(set_attr "itanium_class" "sem")])
+
+(define_expand "sync_compare_and_swap<mode>"
+ [(match_operand:IMODE 0 "gr_register_operand" "")
+ (match_operand:IMODE 1 "memory_operand" "")
+ (match_operand:IMODE 2 "gr_register_operand" "")
+ (match_operand:IMODE 3 "gr_register_operand" "")]
+ ""
+{
+ rtx ccv = gen_rtx_REG (DImode, AR_CCV_REGNUM);
+ convert_move (ccv, operands[2], 1);
+ emit_insn (gen_memory_barrier ());
+ emit_insn (gen_cmpxchg_acq_<mode> (operands[0], operands[1],
+ ccv, operands[3]));
+ DONE;
+})
+
+(define_insn "cmpxchg_acq_<mode>"
+ [(set (match_operand:IMODE 0 "gr_register_operand" "=r")
+ (match_operand:IMODE 1 "not_postinc_memory_operand" "+S"))
+ (set (match_dup 1)
+ (unspec:IMODE [(match_dup 1)
+ (match_operand:DI 2 "ar_ccv_reg_operand" "")
+ (match_operand:IMODE 3 "gr_register_operand" "r")]
+ UNSPEC_CMPXCHG_ACQ))]
+ ""
+ "cmpxchg<modesuffix>.acq %0 = %1, %3, %2"
+ [(set_attr "itanium_class" "sem")])
+
+(define_insn "sync_lock_test_and_set<mode>"
+ [(set (match_operand:IMODE 0 "gr_register_operand" "=r")
+ (match_operand:IMODE 1 "not_postinc_memory_operand" "+S"))
+ (set (match_dup 1)
+ (match_operand:IMODE 2 "gr_register_operand" "r"))]
+ ""
+ "xchg<modesuffix> %0 = %1, %2"
+ [(set_attr "itanium_class" "sem")])
+
+(define_expand "sync_lock_release<mode>"
+ [(set (match_operand:IMODE 0 "memory_operand" "")
+ (match_operand:IMODE 1 "gr_reg_or_0_operand" ""))]
+ ""
+{
+ gcc_assert (MEM_VOLATILE_P (operands[0]));
+})
diff --git a/gcc/config/lynx.opt b/gcc/config/lynx.opt
new file mode 100644
index 00000000000..059a3d20b74
--- /dev/null
+++ b/gcc/config/lynx.opt
@@ -0,0 +1,32 @@
+; Processor-independent options for LynxOS.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+mlegacy-threads
+Target RejectNegative
+Support legacy multi-threading
+
+mshared
+Target RejectNegative
+Use shared libraries
+
+mthreads
+Target RejectNegative
+Support multi-threading
diff --git a/gcc/config/pa/pa-hpux.opt b/gcc/config/pa/pa-hpux.opt
new file mode 100644
index 00000000000..7485db2ba1f
--- /dev/null
+++ b/gcc/config/pa/pa-hpux.opt
@@ -0,0 +1,32 @@
+; Options for the HP PA-RISC port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+msio
+Target RejectNegative Mask(SIO) MaskExists
+Generate cpp defines for server IO
+
+munix=93
+Target RejectNegative
+Specify UNIX standard for predefines and linking
+
+mwsio
+Target RejectNegative InverseMask(SIO)
+Generate cpp defines for workstation IO
diff --git a/gcc/config/pa/pa-hpux1010.opt b/gcc/config/pa/pa-hpux1010.opt
new file mode 100644
index 00000000000..4dd6b5f64b4
--- /dev/null
+++ b/gcc/config/pa/pa-hpux1010.opt
@@ -0,0 +1,24 @@
+; Options for the HP PA-RISC port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+munix=95
+Target RejectNegative
+Specify UNIX standard for predefines and linking
diff --git a/gcc/config/pa/pa-hpux1111.opt b/gcc/config/pa/pa-hpux1111.opt
new file mode 100644
index 00000000000..76464a0c267
--- /dev/null
+++ b/gcc/config/pa/pa-hpux1111.opt
@@ -0,0 +1,24 @@
+; Options for the HP PA-RISC port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+munix=98
+Target RejectNegative
+Specify UNIX standard for predefines and linking
diff --git a/gcc/config/pa/pa.opt b/gcc/config/pa/pa.opt
new file mode 100644
index 00000000000..54a9dfbf505
--- /dev/null
+++ b/gcc/config/pa/pa.opt
@@ -0,0 +1,119 @@
+; Options for the HP PA-RISC port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+march=1.0
+Target RejectNegative
+Generate PA1.0 code
+
+march=1.1
+Target RejectNegative
+Generate PA1.1 code
+
+march=2.0
+Target RejectNegative
+Generate PA2.0 code (requires binutils 2.10 or later)
+
+mbig-switch
+Target Report Mask(BIG_SWITCH)
+Generate code for huge switch statements
+
+mdisable-fpregs
+Target Report Mask(DISABLE_FPREGS)
+Disable FP regs
+
+mdisable-indexing
+Target Report Mask(DISABLE_INDEXING)
+Disable indexed addressing
+
+mfast-indirect-calls
+Target Report Mask(FAST_INDIRECT_CALLS)
+Generate fast indirect calls
+
+mfixed-range=
+Target RejectNegative Joined
+Specify range of registers to make fixed.
+
+mgas
+Target Report Mask(GAS)
+Assume code will be assembled by GAS
+
+mjump-in-delay
+Target Report Mask(JUMP_IN_DELAY)
+Put jumps in call delay slots
+
+;; Not used by gcc
+mlinker-opt
+Target RejectNegative
+Enable linker optimizations
+
+mlong-calls
+Target Report Mask(LONG_CALLS)
+Always generate long calls
+
+mlong-load-store
+Target Report Mask(LONG_LOAD_STORE)
+Emit long load/store sequences
+
+mnosnake
+Target RejectNegative
+Generate PA1.0 code
+
+mno-space-regs
+Target RejectNegative Report Mask(NO_SPACE_REGS)
+Disable space regs
+
+mpa-risc-1-0
+Target RejectNegative
+Generate PA1.0 code
+
+mpa-risc-1-1
+Target RejectNegative Mask(PA_11)
+Generate PA1.1 code
+
+mpa-risc-2-0
+Target RejectNegative Mask(PA_20)
+Generate PA2.0 code (requires binutils 2.10 or later)
+
+mportable-runtime
+Target Report Mask(PORTABLE_RUNTIME)
+Use portable calling conventions
+
+mschedule=
+Target RejectNegative Joined
+Specify CPU for scheduling purposes. Valid arguments are 700, 7100, 7100LC, 7200, 7300, and 8000.
+
+msoft-float
+Target Report Mask(SOFT_FLOAT)
+Use software floating point
+
+msnake
+Target RejectNegative
+Generate PA1.1 code
+
+mspace-regs
+Target RejectNegative Report InverseMask(NO_SPACE_REGS)
+Do not disable space regs
+
+Mask(SIO)
+;; Generate cpp defines for server I/O.
+
+Mask(GNU_LD)
+;; Assume GNU linker by default
diff --git a/gcc/config/pa/pa64-hpux.opt b/gcc/config/pa/pa64-hpux.opt
new file mode 100644
index 00000000000..97bf73b759f
--- /dev/null
+++ b/gcc/config/pa/pa64-hpux.opt
@@ -0,0 +1,28 @@
+; Options for the HP PA-RISC port of the compiler.
+
+; Copyright (C) 2005 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 2, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING. If not, write to the Free
+; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+mgnu-ld
+Target RejectNegative Mask(GNU_LD) MaskExists
+Assume code will be linked by GNU ld
+
+mhp-ld
+Target RejectNegative InverseMask(GNU_LD)
+Assume code will be linked by HP ld
diff --git a/gcc/config/sparc/predicates.md b/gcc/config/sparc/predicates.md
new file mode 100644
index 00000000000..8aba0e3cfb6
--- /dev/null
+++ b/gcc/config/sparc/predicates.md
@@ -0,0 +1,456 @@
+;; Predicate definitions for SPARC.
+;; Copyright (C) 2005 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;; Predicates for numerical constants.
+
+;; Return true if OP is the zero constant for MODE.
+(define_predicate "const_zero_operand"
+ (and (match_code "const_int,const_double,const_vector")
+ (match_test "op == CONST0_RTX (mode)")))
+
+;; Return true if OP is the one constant for MODE.
+(define_predicate "const_one_operand"
+ (and (match_code "const_int,const_double,const_vector")
+ (match_test "op == CONST1_RTX (mode)")))
+
+;; Return true if OP is the integer constant 4096.
+(define_predicate "const_4096_operand"
+ (and (match_code "const_int")
+ (match_test "INTVAL (op) == 4096")))
+
+;; Return true if OP is a constant that is representable by a 13-bit
+;; signed field. This is an acceptable immediate operand for most
+;; 3-address instructions.
+(define_predicate "small_int_operand"
+ (and (match_code "const_int")
+ (match_test "SPARC_SIMM13_P (INTVAL (op))")))
+
+;; Return true if OP is a constant operand for the umul instruction. That
+;; instruction sign-extends immediate values just like all other SPARC
+;; instructions, but interprets the extended result as an unsigned number.
+(define_predicate "uns_small_int_operand"
+ (match_code "const_int,const_double")
+{
+#if HOST_BITS_PER_WIDE_INT == 32
+ return ((GET_CODE (op) == CONST_INT && (unsigned) INTVAL (op) < 0x1000)
+ || (GET_CODE (op) == CONST_DOUBLE
+ && CONST_DOUBLE_HIGH (op) == 0
+ && (unsigned) CONST_DOUBLE_LOW (op) - 0xFFFFF000 < 0x1000));
+#else
+ return (GET_CODE (op) == CONST_INT
+ && ((INTVAL (op) >= 0 && INTVAL (op) < 0x1000)
+ || (INTVAL (op) >= 0xFFFFF000
+ && INTVAL (op) <= 0xFFFFFFFF)));
+#endif
+})
+
+;; Return true if OP is a constant that can be loaded by the sethi instruction.
+;; The first test avoids emitting sethi to load zero for example.
+(define_predicate "const_high_operand"
+ (and (match_code "const_int")
+ (and (match_test "INTVAL (op) & ~(HOST_WIDE_INT)0x3ff")
+ (match_test "SPARC_SETHI_P (INTVAL (op) & GET_MODE_MASK (mode))"))))
+
+
+;; Predicates for symbolic constants.
+
+;; Return true if OP is either a symbol reference or a sum of a symbol
+;; reference and a constant.
+(define_predicate "symbolic_operand"
+ (match_code "symbol_ref,label_ref,const")
+{
+ enum machine_mode omode = GET_MODE (op);
+
+ if (omode != mode && omode != VOIDmode && mode != VOIDmode)
+ return false;
+
+ switch (GET_CODE (op))
+ {
+ case SYMBOL_REF:
+ return !SYMBOL_REF_TLS_MODEL (op);
+
+ case LABEL_REF:
+ return true;
+
+ case CONST:
+ op = XEXP (op, 0);
+ return (((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+ && !SYMBOL_REF_TLS_MODEL (XEXP (op, 0)))
+ || GET_CODE (XEXP (op, 0)) == LABEL_REF)
+ && GET_CODE (XEXP (op, 1)) == CONST_INT);
+
+ default:
+ gcc_unreachable ();
+ }
+})
+
+;; Return true if OP is a symbolic operand for the TLS Global Dynamic model.
+(define_predicate "tgd_symbolic_operand"
+ (and (match_code "symbol_ref")
+ (match_test "tls_symbolic_operand (op) == TLS_MODEL_GLOBAL_DYNAMIC")))
+
+;; Return true if OP is a symbolic operand for the TLS Local Dynamic model.
+(define_predicate "tld_symbolic_operand"
+ (and (match_code "symbol_ref")
+ (match_test "tls_symbolic_operand (op) == TLS_MODEL_LOCAL_DYNAMIC")))
+
+;; Return true if OP is a symbolic operand for the TLS Initial Exec model.
+(define_predicate "tie_symbolic_operand"
+ (and (match_code "symbol_ref")
+ (match_test "tls_symbolic_operand (op) == TLS_MODEL_INITIAL_EXEC")))
+
+;; Return true if OP is a symbolic operand for the TLS Local Exec model.
+(define_predicate "tle_symbolic_operand"
+ (and (match_code "symbol_ref")
+ (match_test "tls_symbolic_operand (op) == TLS_MODEL_LOCAL_EXEC")))
+
+;; Return true if the operand is an argument used in generating PIC references
+;; in either the medium/low or embedded medium/anywhere code models on V9.
+;; Check for (const (minus (symbol_ref:GOT)
+;; (const (minus (label) (pc)))))
+(define_predicate "medium_pic_operand"
+ (match_code "const")
+{
+ /* Check for (const (minus (symbol_ref:GOT)
+ (const (minus (label) (pc))))). */
+ op = XEXP (op, 0);
+ return GET_CODE (op) == MINUS
+ && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+ && GET_CODE (XEXP (op, 1)) == CONST
+ && GET_CODE (XEXP (XEXP (op, 1), 0)) == MINUS;
+})
+
+;; Return true if OP is a LABEL_REF of mode MODE.
+(define_predicate "label_ref_operand"
+ (and (match_code "label_ref")
+ (match_test "GET_MODE (op) == mode")))
+
+;; Return true if OP is a data segment reference. This includes the readonly
+;; data segment or, in other words, anything but the text segment.
+;; This is needed in the embedded medium/anywhere code model on V9. These
+;; values are accessed with EMBMEDANY_BASE_REG. */
+(define_predicate "data_segment_operand"
+ (match_code "symbol_ref,plus,const")
+{
+ switch (GET_CODE (op))
+ {
+ case SYMBOL_REF :
+ return ! SYMBOL_REF_FUNCTION_P (op);
+ case PLUS :
+ /* Assume canonical format of symbol + constant.
+ Fall through. */
+ case CONST :
+ return data_segment_operand (XEXP (op, 0), VOIDmode);
+ default :
+ gcc_unreachable ();
+ }
+})
+
+;; Return true if OP is a text segment reference.
+;; This is needed in the embedded medium/anywhere code model on V9.
+(define_predicate "text_segment_operand"
+ (match_code "label_ref,symbol_ref,plus,const")
+{
+ switch (GET_CODE (op))
+ {
+ case LABEL_REF :
+ return true;
+ case SYMBOL_REF :
+ return SYMBOL_REF_FUNCTION_P (op);
+ case PLUS :
+ /* Assume canonical format of symbol + constant.
+ Fall through. */
+ case CONST :
+ return text_segment_operand (XEXP (op, 0), VOIDmode);
+ default :
+ gcc_unreachable ();
+ }
+})
+
+
+;; Predicates for registers.
+
+;; Return true if OP is either the zero constant or a register.
+(define_predicate "register_or_zero_operand"
+ (ior (match_operand 0 "register_operand")
+ (match_operand 0 "const_zero_operand")))
+
+;; Return true if OP is a register operand in a floating point register.
+(define_predicate "fp_register_operand"
+ (match_operand 0 "register_operand")
+{
+ if (GET_CODE (op) == SUBREG)
+ op = SUBREG_REG (op); /* Possibly a MEM */
+ return REG_P (op) && SPARC_FP_REG_P (REGNO (op));
+})
+
+;; Return true if OP is an integer register.
+(define_special_predicate "int_register_operand"
+ (ior (match_test "register_operand (op, SImode)")
+ (match_test "TARGET_ARCH64 && register_operand (op, DImode)")))
+
+;; Return true if OP is a floating point condition code register.
+(define_predicate "fcc_register_operand"
+ (match_code "reg")
+{
+ if (mode != VOIDmode && mode != GET_MODE (op))
+ return false;
+ if (mode == VOIDmode
+ && (GET_MODE (op) != CCFPmode && GET_MODE (op) != CCFPEmode))
+ return false;
+
+#if 0 /* ??? 1 when %fcc0-3 are pseudos first. See gen_compare_reg(). */
+ if (reg_renumber == 0)
+ return REGNO (op) >= FIRST_PSEUDO_REGISTER;
+ return REGNO_OK_FOR_CCFP_P (REGNO (op));
+#else
+ return ((unsigned) REGNO (op) - SPARC_FIRST_V9_FCC_REG) < 4;
+#endif
+})
+
+;; Return true if OP is the floating point condition code register fcc0.
+(define_predicate "fcc0_register_operand"
+ (match_code "reg")
+{
+ if (mode != VOIDmode && mode != GET_MODE (op))
+ return false;
+ if (mode == VOIDmode
+ && (GET_MODE (op) != CCFPmode && GET_MODE (op) != CCFPEmode))
+ return false;
+
+ return REGNO (op) == SPARC_FCC_REG;
+})
+
+;; Return true if OP is an integer or floating point condition code register.
+(define_predicate "icc_or_fcc_register_operand"
+ (match_code "reg")
+{
+ if (REGNO (op) == SPARC_ICC_REG)
+ {
+ if (mode != VOIDmode && mode != GET_MODE (op))
+ return false;
+ if (mode == VOIDmode
+ && GET_MODE (op) != CCmode && GET_MODE (op) != CCXmode)
+ return false;
+
+ return true;
+ }
+
+ return fcc_register_operand (op, mode);
+})
+
+
+;; Predicates for arithmetic instructions.
+
+;; Return true if OP is a register, or is a constant that is representable
+;; by a 13-bit signed field. This is an acceptable operand for most
+;; 3-address instructions.
+(define_predicate "arith_operand"
+ (ior (match_operand 0 "register_operand")
+ (match_operand 0 "small_int_operand")))
+
+;; 64-bit: Same as above.
+;; 32-bit: Return true if OP is a register, or is a constant that is
+;; representable by a couple of 13-bit signed fields. This is an
+;; acceptable operand for most 3-address splitters.
+(define_predicate "arith_double_operand"
+ (match_code "const_int,const_double,reg,subreg")
+{
+ bool arith_simple_operand = arith_operand (op, mode);
+ HOST_WIDE_INT m1, m2;
+
+ if (TARGET_ARCH64 || arith_simple_operand)
+ return arith_simple_operand;
+
+#if HOST_BITS_PER_WIDE_INT == 32
+ if (GET_CODE (op) != CONST_DOUBLE)
+ return false;
+ m1 = CONST_DOUBLE_LOW (op);
+ m2 = CONST_DOUBLE_HIGH (op);
+#else
+ if (GET_CODE (op) != CONST_INT)
+ return false;
+ m1 = trunc_int_for_mode (INTVAL (op), SImode);
+ m2 = trunc_int_for_mode (INTVAL (op) >> 32, SImode);
+#endif
+
+ return SPARC_SIMM13_P (m1) && SPARC_SIMM13_P (m2);
+})
+
+;; Return true if OP is suitable as second operand for add/sub.
+(define_predicate "arith_add_operand"
+ (ior (match_operand 0 "arith_operand")
+ (match_operand 0 "const_4096_operand")))
+
+;; Return true if OP is suitable as second double operand for add/sub.
+(define_predicate "arith_double_add_operand"
+ (match_code "const_int,const_double,reg,subreg")
+{
+ bool _arith_double_operand = arith_double_operand (op, mode);
+
+ if (_arith_double_operand)
+ return true;
+
+ return TARGET_ARCH64 && const_4096_operand (op, mode);
+})
+
+;; Return true if OP is a register, or is a CONST_INT that can fit in a
+;; signed 10-bit immediate field. This is an acceptable SImode operand for
+;; the movrcc instructions.
+(define_predicate "arith10_operand"
+ (ior (match_operand 0 "register_operand")
+ (and (match_code "const_int")
+ (match_test "SPARC_SIMM10_P (INTVAL (op))"))))
+
+;; Return true if OP is a register, or is a CONST_INT that can fit in a
+;; signed 11-bit immediate field. This is an acceptable SImode operand for
+;; the movcc instructions.
+(define_predicate "arith11_operand"
+ (ior (match_operand 0 "register_operand")
+ (and (match_code "const_int")
+ (match_test "SPARC_SIMM11_P (INTVAL (op))"))))
+
+;; Return true if OP is a register or a constant for the umul instruction.
+(define_predicate "uns_arith_operand"
+ (ior (match_operand 0 "register_operand")
+ (match_operand 0 "uns_small_int_operand")))
+
+
+;; Predicates for miscellaneous instructions.
+
+;; Return true if OP is valid for the lhs of a comparison insn.
+(define_predicate "compare_operand"
+ (match_code "reg,subreg,zero_extract")
+{
+ if (GET_CODE (op) == ZERO_EXTRACT)
+ return (register_operand (XEXP (op, 0), mode)
+ && small_int_operand (XEXP (op, 1), mode)
+ && small_int_operand (XEXP (op, 2), mode)
+ /* This matches cmp_zero_extract. */
+ && ((mode == SImode
+ && INTVAL (XEXP (op, 2)) > 19)
+ /* This matches cmp_zero_extract_sp64. */
+ || (TARGET_ARCH64
+ && mode == DImode
+ && INTVAL (XEXP (op, 2)) > 51)));
+ else
+ return register_operand (op, mode);
+})
+
+;; Return true if OP is a valid operand for the source of a move insn.
+(define_predicate "input_operand"
+ (match_code "const_int,const_double,const_vector,reg,subreg,mem")
+{
+ enum mode_class mclass;
+
+ /* If both modes are non-void they must be the same. */
+ if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op))
+ return false;
+
+ /* Allow any 1-instruction integer constant. */
+ if (GET_MODE_CLASS (mode) == MODE_INT
+ && (small_int_operand (op, mode) || const_high_operand (op, mode)))
+ return true;
+
+ /* If 32-bit mode and this is a DImode constant, allow it
+ so that the splits can be generated. */
+ if (TARGET_ARCH32
+ && mode == DImode
+ && (GET_CODE (op) == CONST_DOUBLE || GET_CODE (op) == CONST_INT))
+ return true;
+
+ if (register_operand (op, mode))
+ return true;
+
+ mclass = GET_MODE_CLASS (mode);
+ if ((mclass == MODE_FLOAT && GET_CODE (op) == CONST_DOUBLE)
+ || (mclass == MODE_VECTOR_INT && GET_CODE (op) == CONST_VECTOR))
+ return true;
+
+ /* If this is a SUBREG, look inside so that we handle
+ paradoxical ones. */
+ if (GET_CODE (op) == SUBREG)
+ op = SUBREG_REG (op);
+
+ /* Check for valid MEM forms. */
+ if (GET_CODE (op) == MEM)
+ return memory_address_p (mode, XEXP (op, 0));
+
+ return false;
+})
+
+;; Return true if OP is an address suitable for a call insn.
+;; Call insn on SPARC can take a PC-relative constant address
+;; or any regular memory address.
+(define_predicate "call_address_operand"
+ (ior (match_operand 0 "symbolic_operand")
+ (match_test "memory_address_p (Pmode, op)")))
+
+;; Return true if OP is an operand suitable for a call insn.
+(define_predicate "call_operand"
+ (and (match_code "mem")
+ (match_test "call_address_operand (XEXP (op, 0), mode)")))
+
+
+;; Predicates for operators.
+
+;; Return true if OP is a comparison operator. This allows the use of
+;; MATCH_OPERATOR to recognize all the branch insns.
+(define_predicate "noov_compare_operator"
+ (match_code "ne,eq,ge,gt,le,lt,geu,gtu,leu,ltu")
+{
+ enum rtx_code code = GET_CODE (op);
+ if (GET_MODE (XEXP (op, 0)) == CC_NOOVmode
+ || GET_MODE (XEXP (op, 0)) == CCX_NOOVmode)
+ /* These are the only branches which work with CC_NOOVmode. */
+ return (code == EQ || code == NE || code == GE || code == LT);
+ return true;
+})
+
+;; Return true if OP is a 64-bit comparison operator. This allows the use of
+;; MATCH_OPERATOR to recognize all the branch insns.
+(define_predicate "noov_compare64_operator"
+ (and (match_code "ne,eq,ge,gt,le,lt,geu,gtu,leu,ltu")
+ (match_test "TARGET_V9"))
+{
+ enum rtx_code code = GET_CODE (op);
+ if (GET_MODE (XEXP (op, 0)) == CCX_NOOVmode)
+ /* These are the only branches which work with CCX_NOOVmode. */
+ return (code == EQ || code == NE || code == GE || code == LT);
+ return (GET_MODE (XEXP (op, 0)) == CCXmode);
+})
+
+;; Return true if OP is a comparison operator suitable for use in V9
+;; conditional move or branch on register contents instructions.
+(define_predicate "v9_register_compare_operator"
+ (match_code "eq,ne,ge,lt,le,gt"))
+
+;; Return true if OP is an operator which can set the condition codes
+;; explicitly. We do not include PLUS and MINUS because these
+;; require CC_NOOVmode, which we handle explicitly.
+(define_predicate "cc_arith_operator"
+ (match_code "and,ior,xor"))
+
+;; Return true if OP is an operator which can bitwise complement its
+;; second operand and set the condition codes explicitly.
+;; XOR is not here because combine canonicalizes (xor (not ...) ...)
+;; and (xor ... (not ...)) to (not (xor ...)). */
+(define_predicate "cc_arith_not_operator"
+ (match_code "and,ior"))
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
new file mode 100644
index 00000000000..85bf984d3f3
--- /dev/null
+++ b/gcc/objcp/ChangeLog
@@ -0,0 +1,9 @@
+2005-04-21 Mike Stump <mrs@apple.com>
+
+ * ChangeLog: New.
+ * Make-lang.in: Likewise.
+ * config-lang.in: Likewise.
+ * lang-specs.h: Likewise.
+ * objcp-decl.c: Likewise.
+ * objcp-decl.h: Likewise.
+ * objcp-lang.c: Likewise.
diff --git a/gcc/objcp/Make-lang.in b/gcc/objcp/Make-lang.in
new file mode 100644
index 00000000000..51875e44d51
--- /dev/null
+++ b/gcc/objcp/Make-lang.in
@@ -0,0 +1,138 @@
+# Top level -*- makefile -*- fragment for GNU Objective-C++
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Contributed by Ziemowit Laski <zlaski@apple.com>
+
+#This file is part of GCC.
+
+#GCC is free software; you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation; either version 2, or (at your option)
+#any later version.
+
+#GCC is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#GNU General Public License for more details.
+
+#You should have received a copy of the GNU General Public License
+#along with GCC; see the file COPYING. If not, write to
+#the Free Software Foundation, 59 Temple Place - Suite 330,
+#Boston, MA 02111-1307, USA.
+
+# This file provides the language dependent support in the main Makefile.
+# Each language makefile fragment must provide the following targets:
+#
+# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
+# foo.install-normal, foo.install-common, foo.install-man,
+# foo.uninstall,
+# foo.mostlyclean, foo.clean, foo.distclean,
+# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
+#
+# where `foo' is the name of the language.
+#
+# It should also provide rules for:
+#
+# - making any compiler driver (eg: g++)
+# - the compiler proper (eg: cc1plus)
+# - define the names for selecting the language in LANGUAGES.
+
+#
+# Define the names for selecting Objective-C++ in LANGUAGES.
+OBJ-C++ obj-c++: cc1objplus$(exeext)
+
+# Tell GNU make to ignore these if they exist.
+.PHONY: Obj-c++ obj-C++
+
+# Use maximal warnings for this front end. Also, make ObjC and C++
+# headers accessible.
+objcp-warn = $(STRICT_WARN) -DOBJCPLUS -I$(srcdir)/objc -I$(srcdir)/cp
+
+# Language-specific object files for Objective C++.
+OBJCXX_OBJS = objcp/objcp-act.o objcp/objcp-lang.o objcp/objcp-decl.o \
+ $(CXX_AND_OBJCXX_OBJS)
+
+cc1objplus$(exeext): $(OBJCXX_OBJS) $(BACKEND) $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(OBJCXX_OBJS) $(BACKEND) $(LIBS)
+
+# Objective C++ language specific files.
+
+objcp/objcp-lang.o : objcp/objcp-lang.c \
+ $(CXX_TREE_H) $(TM_H) toplev.h debug.h langhooks.h objc/objc-act.h \
+ $(LANGHOOKS_DEF_H) c-common.h gtype-objcp.h $(CXX_PRETTY_PRINT_H) \
+ $(DIAGNOSTIC_H) cp/cp-objcp-common.h
+
+objcp/objcp-decl.o : objcp/objcp-decl.c \
+ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
+ toplev.h $(GGC_H) c-pragma.h input.h flags.h output.h objc/objc-act.h \
+ objcp/objcp-decl.h
+
+# The following must be an explicit rule; please keep in sync with the implicit
+# one in Makefile.in.
+objcp/objcp-act.o : objc/objc-act.c \
+ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
+ $(EXPR_H) $(TARGET_H) $(CXX_TREE_H) diagnostic.h toplev.h flags.h \
+ objc/objc-act.h input.h function.h output.h debug.h langhooks.h \
+ objcp/objcp-decl.h $(LANGHOOKS_DEF_H) $(HASHTAB_H) gt-objc-objc-act.h
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+
+po-generated:
+
+gtype-objcp.h : s-gtype ; @true
+
+#
+# Build hooks:
+
+obj-c++.all.build:
+obj-c++.all.cross:
+obj-c++.start.encap:
+obj-c++.rest.encap:
+obj-c++.info:
+obj-c++.srcinfo:
+obj-c++.srcextra:
+obj-c++.man:
+
+obj-c++.tags: force
+ cd $(srcdir)/objcp; etags -o TAGS.sub *.y *.c *.h; \
+ etags --include TAGS.sub --include ../TAGS.sub
+
+lang_checks += check-obj-c++
+
+#
+# Install hooks:
+# cc1objplus is installed elsewhere as part of $(COMPILERS).
+
+obj-c++.install-normal:
+
+obj-c++.install-common:
+
+obj-c++.install-man:
+
+obj-c++.uninstall:
+#
+# Clean hooks:
+# A lot of the ancillary files are deleted by the main makefile.
+# We just have to delete files specific to us.
+obj-c++.mostlyclean:
+ -rm -f objcp/*$(objext)
+ -rm -f objcp/*$(coverageexts)
+obj-c++.clean: obj-c++.mostlyclean
+obj-c++.distclean:
+ -rm -f objcp/config.status objcp/Makefile
+obj-c++.maintainer-clean:
+
+#
+# Stage hooks:
+
+obj-c++.stage1: stage1-start
+ -mv objcp/*$(objext) stage1/objcp
+obj-c++.stage2: stage2-start
+ -mv objcp/*$(objext) stage2/objcp
+obj-c++.stage3: stage3-start
+ -mv objcp/*$(objext) stage3/objcp
+obj-c++.stage4: stage4-start
+ -mv objcp/*$(objext) stage4/objcp
+obj-c++.stageprofile: stageprofile-start
+ -mv objcp/*$(objext) stageprofile/objcp
+obj-c++.stagefeedback: stagefeedback-start
+ -mv objcp/*$(objext) stagefeedback/objcp
diff --git a/gcc/objcp/config-lang.in b/gcc/objcp/config-lang.in
new file mode 100644
index 00000000000..b5374ddc5c3
--- /dev/null
+++ b/gcc/objcp/config-lang.in
@@ -0,0 +1,43 @@
+# Top level configure fragment for GNU Objective-C++.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Contributed by Ziemowit Laski <zlaski@apple.com>
+
+#This file is part of GCC.
+
+#GCC is free software; you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation; either version 2, or (at your option)
+#any later version.
+
+#GCC is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#GNU General Public License for more details.
+
+#You should have received a copy of the GNU General Public License
+#along with GCC; see the file COPYING. If not, write to
+#the Free Software Foundation, 59 Temple Place - Suite 330,
+#Boston, MA 02111-1307, USA.
+
+# Configure looks for the existence of this file to auto-config each language.
+# We define several parameters used by configure:
+#
+# language - name of language as it would appear in $(LANGUAGES)
+# compilers - value to add to $(COMPILERS)
+# stagestuff - files to add to $(STAGESTUFF)
+
+language="obj-c++"
+
+compilers="cc1objplus\$(exeext)"
+
+stagestuff=""
+
+# Per GCC Steering Committee.
+build_by_default="no"
+
+# By building the Objective-C and C++ front-ends, we will get
+# the object files we need, along with the libraries (libstdc++,
+# libobjc).
+lang_requires="objc c++"
+
+gtfiles="\$(srcdir)/objcp/objcp-decl.c \$(srcdir)/objc/objc-act.c \$(srcdir)/objc/objc-act.h \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-lex.c \$(srcdir)/c-pragma.c"
diff --git a/gcc/objcp/lang-specs.h b/gcc/objcp/lang-specs.h
new file mode 100644
index 00000000000..be25eb1edcc
--- /dev/null
+++ b/gcc/objcp/lang-specs.h
@@ -0,0 +1,60 @@
+/* Definitions for specs for Objective-C++.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ Contributed by Ziemowit Laski <zlaski@apple.com>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* This is the contribution to the `default_compilers' array in gcc.c for
+ obj-c++. It is based on -- and should be kept in sync with -- the g++
+ spec (found in cp/lang-specs.h). */
+
+#ifndef CPLUSPLUS_CPP_SPEC
+#define CPLUSPLUS_CPP_SPEC 0
+#endif
+
+ {".mm", "@objective-c++", 0, 0, 0},
+ {".M", "@objective-c++", 0, 0, 0},
+ {"@objective-c++-header",
+ "%{E|M|MM:cc1objplus -E %(cpp_options) %2 %(cpp_debug_options)}\
+ %{!E:%{!M:%{!MM:\
+ %{save-temps|no-integrated-cpp:cc1objplus -E\
+ %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
+ cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
+ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+ %(cc1_options) %2 %{+e1*}\
+ -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {"@objective-c++",
+ "%{E|M|MM:cc1objplus -E %(cpp_options) %2 %(cpp_debug_options)}\
+ %{!E:%{!M:%{!MM:\
+ %{save-temps|no-integrated-cpp:cc1objplus -E\
+ %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
+ cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
+ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+ %(cc1_options) %2 %{+e1*}\
+ %{!fsyntax-only:%(invoke_as)}}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {".mii", "@objective-c++-cpp-output", 0, 0, 0},
+ {"@objective-c++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+ cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {"@objc++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+ cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
diff --git a/gcc/objcp/objcp-decl.c b/gcc/objcp/objcp-decl.c
new file mode 100644
index 00000000000..7493a23f609
--- /dev/null
+++ b/gcc/objcp/objcp-decl.c
@@ -0,0 +1,134 @@
+/* Process the ObjC-specific declarations and variables for
+ the Objective-C++ compiler.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ Contributed by Ziemowit Laski <zlaski@apple.com>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "rtl.h"
+#include "expr.h"
+#include "cp-tree.h"
+#include "c-common.h"
+#include "flags.h"
+#include "input.h"
+#include "except.h"
+#include "output.h"
+#include "toplev.h"
+#include "cpplib.h"
+#include "debug.h"
+#include "target.h"
+#include "varray.h"
+
+#include "objc-act.h"
+#include "objcp-decl.h"
+
+/* Hacks to simulate start_struct() and finish_struct(). */
+
+tree
+objcp_start_struct (enum tree_code code ATTRIBUTE_UNUSED, tree name)
+{
+ tree s;
+ /* The idea here is to mimic the actions that the C++ parser takes when
+ constructing 'extern "C" struct NAME {'. */
+ push_lang_context (lang_name_c);
+ if (!name)
+ name = make_anon_name ();
+ s = xref_tag (record_type, name, ts_current, 0);
+ CLASSTYPE_DECLARED_CLASS (s) = 0; /* this is a 'struct', not a 'class'. */
+ xref_basetypes (s, NULL_TREE); /* no base classes here! */
+
+ return begin_class_definition (s);
+}
+
+tree
+objcp_finish_struct (tree t, tree fieldlist, tree attributes)
+{
+ tree field, next_field;
+
+ for (field = fieldlist; field; field = next_field)
+ {
+ next_field = TREE_CHAIN (field); /* insert one field at a time; */
+ TREE_CHAIN (field) = NULL_TREE; /* otherwise, grokfield croaks. */
+ finish_member_declaration (field);
+ }
+ t = finish_struct (t, attributes);
+ pop_lang_context ();
+
+ return t;
+}
+
+void
+objcp_finish_function (void)
+{
+ /* The C++ flavor of 'finish_function' does not generate RTL -- one has
+ to call 'expand_or_defer_fn' to do that. */
+ expand_or_defer_fn (finish_function (0));
+}
+
+tree
+objcp_lookup_name (tree name)
+{
+ return lookup_name (name, -1);
+}
+
+tree
+objcp_xref_tag (enum tree_code code ATTRIBUTE_UNUSED, tree name)
+{
+ return xref_tag (record_type, name, true, false);
+}
+
+tree
+objcp_build_component_ref (tree datum, tree component)
+{
+ /* The 'build_component_ref' routine has been removed from the C++
+ front-end, but 'finish_class_member_access_expr' seems to be
+ a worthy substitute. */
+ return finish_class_member_access_expr (datum, component);
+}
+
+int
+objcp_comptypes (tree type1, tree type2)
+{
+ return comptypes (type1, type2, COMPARE_STRICT);
+}
+
+tree
+objcp_begin_compound_stmt (int flags ATTRIBUTE_UNUSED)
+{
+ return begin_compound_stmt (0);
+}
+
+tree
+objcp_end_compound_stmt (tree stmt, int flags ATTRIBUTE_UNUSED)
+{
+ /* The following has been snarfed from
+ cp/semantics.c:finish_compound_stmt(). */
+ if (TREE_CODE (stmt) == BIND_EXPR)
+ BIND_EXPR_BODY (stmt) = do_poplevel (BIND_EXPR_BODY (stmt));
+ else if (STATEMENT_LIST_NO_SCOPE (stmt))
+ stmt = pop_stmt_list (stmt);
+ else
+ stmt = do_poplevel (stmt);
+
+ return stmt;
+}
diff --git a/gcc/objcp/objcp-decl.h b/gcc/objcp/objcp-decl.h
new file mode 100644
index 00000000000..39cad46d2e9
--- /dev/null
+++ b/gcc/objcp/objcp-decl.h
@@ -0,0 +1,95 @@
+/* Process the ObjC-specific declarations and variables for
+ the Objective-C++ compiler.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ Contributed by Ziemowit Laski <zlaski@apple.com>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
+
+#ifndef GCC_OBJCP_DECL_H
+#define GCC_OBJCP_DECL_H
+
+extern tree objcp_start_struct (enum tree_code, tree);
+extern tree objcp_finish_struct (tree, tree, tree);
+extern void objcp_finish_function (void);
+extern tree objcp_lookup_name (tree);
+extern tree objcp_build_function_call (tree, tree);
+extern tree objcp_xref_tag (enum tree_code, tree);
+extern tree objcp_build_component_ref (tree, tree);
+extern int objcp_comptypes (tree, tree);
+extern tree objcp_builtin_function (const char *, tree, int,
+ enum built_in_class, const char *, tree);
+extern tree objcp_begin_compound_stmt (int);
+extern tree objcp_end_compound_stmt (tree, int);
+
+/* Now "cover up" the corresponding C++ functions if required (NB: the
+ OBJCP_ORIGINAL_FUNCTION macro, shown below, can still be used to
+ invoke the original C++ functions if needed). */
+#ifdef OBJCP_REMAP_FUNCTIONS
+
+#define start_struct(code, name) \
+ objcp_start_struct (code, name)
+#define finish_struct(t, fieldlist, attributes) \
+ objcp_finish_struct (t, fieldlist, attributes)
+#define finish_function() \
+ objcp_finish_function ()
+#define lookup_name(name) \
+ objcp_lookup_name (name)
+#define xref_tag(code, name) \
+ objcp_xref_tag (code, name)
+#define build_component_ref(datum, component) \
+ objcp_build_component_ref (datum, component)
+#define comptypes(type1, type2) \
+ objcp_comptypes (type1, type2)
+#define c_begin_compound_stmt(flags) \
+ objcp_begin_compound_stmt (flags)
+#define c_end_compound_stmt(stmt, flags) \
+ objcp_end_compound_stmt (stmt, flags)
+
+#undef OBJC_TYPE_NAME
+#define OBJC_TYPE_NAME(type) \
+ (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL \
+ ? DECL_NAME (TYPE_NAME (type)) \
+ : TYPE_NAME (type))
+#undef OBJC_SET_TYPE_NAME
+#define OBJC_SET_TYPE_NAME(type, name) \
+ if(TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL) \
+ DECL_NAME (TYPE_NAME (type)) = name; \
+ else \
+ TYPE_NAME (type) = name;
+
+#undef TYPE_OBJC_INFO
+#define TYPE_OBJC_INFO(TYPE) LANG_TYPE_CLASS_CHECK (TYPE)->objc_info
+#undef SIZEOF_OBJC_TYPE_LANG_SPECIFIC
+#define SIZEOF_OBJC_TYPE_LANG_SPECIFIC sizeof (struct lang_type_class)
+#undef ALLOC_OBJC_TYPE_LANG_SPECIFIC
+#define ALLOC_OBJC_TYPE_LANG_SPECIFIC(NODE) \
+ do { \
+ TYPE_LANG_SPECIFIC (NODE) = GGC_CNEWVAR \
+ (struct lang_type, sizeof (struct lang_type_class)); \
+ TYPE_LANG_SPECIFIC (NODE)->u.c.h.is_lang_type_class = 1; \
+ } while (0)
+
+#define OBJCP_ORIGINAL_FUNCTION(name, args) (name)args
+
+/* C++ marks ellipsis-free function parameters differently from C. */
+#undef OBJC_VOID_AT_END
+#define OBJC_VOID_AT_END void_list_node
+
+#endif /* OBJCP_REMAP_FUNCTIONS */
+
+#endif /* ! GCC_OBJCP_DECL_H */
diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c
new file mode 100644
index 00000000000..8f70419f8e9
--- /dev/null
+++ b/gcc/objcp/objcp-lang.c
@@ -0,0 +1,143 @@
+/* Language-dependent hooks for Objective-C++.
+ Copyright 2005 Free Software Foundation, Inc.
+ Contributed by Ziemowit Laski <zlaski@apple.com>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "cp-tree.h"
+#include "c-common.h"
+#include "toplev.h"
+#include "objc-act.h"
+#include "langhooks.h"
+#include "langhooks-def.h"
+#include "diagnostic.h"
+#include "cxx-pretty-print.h"
+#include "debug.h"
+#include "cp-objcp-common.h"
+
+enum c_language_kind c_language = clk_objcxx;
+
+/* Lang hooks common to C++ and ObjC++ are declared in cp/cp-objcp-common.h;
+ consequently, there should be very few hooks below. */
+
+#undef LANG_HOOKS_NAME
+#define LANG_HOOKS_NAME "GNU Objective-C++"
+#undef LANG_HOOKS_INIT
+#define LANG_HOOKS_INIT objc_init
+#undef LANG_HOOKS_DECL_PRINTABLE_NAME
+#define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name
+#undef LANG_HOOKS_TYPES_COMPATIBLE_P
+#define LANG_HOOKS_TYPES_COMPATIBLE_P objc_types_compatible_p
+#undef LANG_HOOKS_GET_CALLEE_FNDECL
+#define LANG_HOOKS_GET_CALLEE_FNDECL objc_get_callee_fndecl
+/* Each front end provides its own lang hook initializer. */
+const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
+
+/* Tree code classes. */
+
+#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
+
+const enum tree_code_class tree_code_type[] = {
+#include "tree.def"
+ tcc_exceptional,
+#include "c-common.def"
+ tcc_exceptional,
+#include "cp-tree.def"
+ tcc_exceptional,
+#include "objc-tree.def"
+};
+#undef DEFTREECODE
+
+/* Table indexed by tree code giving number of expression
+ operands beyond the fixed part of the node structure.
+ Not used for types or decls. */
+
+#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
+
+const unsigned char tree_code_length[] = {
+#include "tree.def"
+ 0,
+#include "c-common.def"
+ 0,
+#include "cp-tree.def"
+ 0,
+#include "objc-tree.def"
+};
+#undef DEFTREECODE
+
+/* Names of tree components.
+ Used for printing out the tree and error messages. */
+#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
+
+const char *const tree_code_name[] = {
+#include "tree.def"
+ "@@dummy",
+#include "c-common.def"
+ "@@dummy",
+#include "cp-tree.def"
+ "@@dummy",
+#include "objc-tree.def"
+};
+#undef DEFTREECODE
+
+/* Lang hook routines common to C++ and ObjC++ appear in cp/cp-objcp-common.c;
+ there should be very few (if any) routines below. */
+
+tree
+objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain,
+ tree in_decl, bool function_p ATTRIBUTE_UNUSED)
+{
+#define RECURSE(NODE) \
+ tsubst_copy_and_build (NODE, args, complain, in_decl, /*function_p=*/false)
+
+ /* The following two can only occur in Objective-C++. */
+
+ switch ((int) TREE_CODE (t))
+ {
+ case MESSAGE_SEND_EXPR:
+ return objc_finish_message_expr
+ (RECURSE (TREE_OPERAND (t, 0)),
+ TREE_OPERAND (t, 1), /* No need to expand the selector. */
+ RECURSE (TREE_OPERAND (t, 2)));
+
+ case CLASS_REFERENCE_EXPR:
+ return objc_get_class_reference
+ (RECURSE (TREE_OPERAND (t, 0)));
+
+ default:
+ break;
+ }
+
+ /* Fall back to C++ processing. */
+ return NULL_TREE;
+
+#undef RECURSE
+}
+
+void
+finish_file (void)
+{
+ objc_finish_file ();
+}
+
+#include "gtype-objcp.h"
diff --git a/gcc/testsuite/g++.dg/eh/fp-regs.C b/gcc/testsuite/g++.dg/eh/fp-regs.C
new file mode 100644
index 00000000000..b91c0f9a567
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/fp-regs.C
@@ -0,0 +1,94 @@
+// PR 20670: f29 corrupted when unwind stack. This tries to test that FP
+// registers are properly saved and restored by defining 20 different FP
+// local variables.
+// { dg-do run }
+// { dg-options "-O" }
+#include <stdlib.h>
+
+double zero = 0.0;
+double another_zero = 0.0;
+
+int
+sub (void)
+{
+ throw (0);
+}
+
+int
+main (void)
+{
+ double a, b, c, d, e, f, g, h, i, j;
+ double a1, b1, c1, d1, e1, f1, g1, h1, i1, j1;
+
+ a = zero;
+ b = a + 1;
+ c = b + 1;
+ d = c + 1;
+ e = d + 1;
+ f = e + 1;
+ g = f + 1;
+ h = g + 1;
+ i = h + 1;
+ j = i + 1;
+
+ a1 = another_zero;
+ b1 = a1 + 1;
+ c1 = b1 + 1;
+ d1 = c1 + 1;
+ e1 = d1 + 1;
+ f1 = e1 + 1;
+ g1 = f1 + 1;
+ h1 = g1 + 1;
+ i1 = h1 + 1;
+ j1 = i1 + 1;
+
+ try
+ {
+ sub ();
+ }
+ catch (...)
+ {
+ if (a != 0.0)
+ abort ();
+ if (b != 1.0)
+ abort ();
+ if (c != 2.0)
+ abort ();
+ if (d != 3.0)
+ abort ();
+ if (e != 4.0)
+ abort ();
+ if (f != 5.0)
+ abort ();
+ if (g != 6.0)
+ abort ();
+ if (h != 7.0)
+ abort ();
+ if (i != 8.0)
+ abort ();
+ if (j != 9.0)
+ abort ();
+
+ if (a1 != 0.0)
+ abort ();
+ if (b1 != 1.0)
+ abort ();
+ if (c1 != 2.0)
+ abort ();
+ if (d1 != 3.0)
+ abort ();
+ if (e1 != 4.0)
+ abort ();
+ if (f1 != 5.0)
+ abort ();
+ if (g1 != 6.0)
+ abort ();
+ if (h1 != 7.0)
+ abort ();
+ if (i1 != 8.0)
+ abort ();
+ if (j1 != 9.0)
+ abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/sync-1.C b/gcc/testsuite/g++.dg/ext/sync-1.C
new file mode 100644
index 00000000000..e4d6dff6145
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/sync-1.C
@@ -0,0 +1,40 @@
+// Validate that the __sync builtins are overloaded properly.
+// { dg-do compile }
+// { dg-options "-Werror" }
+
+#define TEST1(TYPE, BUILTIN) \
+void t_##TYPE##BUILTIN(TYPE *p) \
+{ \
+ __typeof(BUILTIN(p, 1)) *pp; \
+ pp = p; \
+}
+
+#define TEST2(BUILTIN) \
+ TEST1(int, BUILTIN) \
+ TEST1(long, BUILTIN)
+
+TEST2(__sync_fetch_and_add)
+TEST2(__sync_fetch_and_sub)
+TEST2(__sync_fetch_and_or)
+TEST2(__sync_fetch_and_and)
+TEST2(__sync_fetch_and_xor)
+TEST2(__sync_fetch_and_nand)
+
+TEST2(__sync_add_and_fetch)
+TEST2(__sync_sub_and_fetch)
+TEST2(__sync_or_and_fetch)
+TEST2(__sync_and_and_fetch)
+TEST2(__sync_xor_and_fetch)
+TEST2(__sync_nand_and_fetch)
+
+TEST2(__sync_lock_test_and_set)
+
+#define TEST3(TYPE) \
+void t_##TYPE##__sync_val_compare_and_swap(TYPE *p) \
+{ \
+ __typeof(__sync_val_compare_and_swap(p, 1, 2)) *pp; \
+ pp = p; \
+}
+
+TEST3(int)
+TEST3(long)
diff --git a/gcc/testsuite/g++.dg/ext/sync-2.C b/gcc/testsuite/g++.dg/ext/sync-2.C
new file mode 100644
index 00000000000..5695684c3e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/sync-2.C
@@ -0,0 +1,58 @@
+// Validate that the __sync builtins are overloaded properly in templates.
+// { dg-do compile }
+// { dg-options "-Werror" }
+
+
+#define TEST1(BUILTIN) \
+template<typename T> \
+void f##BUILTIN(T *p) \
+{ \
+ __typeof(BUILTIN(p, 1)) *pp; \
+ pp = p; \
+}
+
+TEST1(__sync_fetch_and_add)
+TEST1(__sync_fetch_and_sub)
+TEST1(__sync_fetch_and_or)
+TEST1(__sync_fetch_and_and)
+TEST1(__sync_fetch_and_xor)
+TEST1(__sync_fetch_and_nand)
+
+TEST1(__sync_add_and_fetch)
+TEST1(__sync_sub_and_fetch)
+TEST1(__sync_or_and_fetch)
+TEST1(__sync_and_and_fetch)
+TEST1(__sync_xor_and_fetch)
+TEST1(__sync_nand_and_fetch)
+
+TEST1(__sync_lock_test_and_set)
+
+template<typename T>
+void f__sync_val_compare_and_swap(T *p)
+{
+ __typeof(__sync_val_compare_and_swap(p, 1, 2)) *pp;
+ pp = p;
+}
+
+#define TEST2(TYPE) \
+void h_##TYPE () \
+{ \
+ TYPE x; \
+ f__sync_fetch_and_add (&x); \
+ f__sync_fetch_and_sub (&x); \
+ f__sync_fetch_and_or (&x); \
+ f__sync_fetch_and_and (&x); \
+ f__sync_fetch_and_xor (&x); \
+ f__sync_fetch_and_nand (&x); \
+ f__sync_add_and_fetch (&x); \
+ f__sync_sub_and_fetch (&x); \
+ f__sync_or_and_fetch (&x); \
+ f__sync_and_and_fetch (&x); \
+ f__sync_xor_and_fetch (&x); \
+ f__sync_nand_and_fetch (&x); \
+ f__sync_lock_test_and_set (&x); \
+ f__sync_val_compare_and_swap (&x); \
+}
+
+TEST2(int)
+TEST2(long)
diff --git a/gcc/testsuite/g++.dg/lookup/builtin2.C b/gcc/testsuite/g++.dg/lookup/builtin2.C
new file mode 100644
index 00000000000..be0a6f65d6c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/builtin2.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+/* PR c++/21087 */
+
+/* We used to overload the template function with the built-in
+ declaration, instead of replacing it as we should, and then barf at
+ the using decl because of a test that none of the overload set
+ members were anticipated built-ins. */
+
+extern "C" signed int toupper(signed int __c) throw();
+namespace std
+{
+ template< typename a > a toupper(a,int){}
+ using ::toupper;
+}
+
+int f () {
+ std::toupper((signed int)'a');
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr20991.C b/gcc/testsuite/g++.dg/opt/pr20991.C
new file mode 100644
index 00000000000..32b3d05c351
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr20991.C
@@ -0,0 +1,34 @@
+// PR middle-end/20991
+// { dg-options "-O2" }
+// { dg-do compile }
+
+struct S
+{
+ virtual inline int foo () const;
+ virtual inline bool bar () const;
+ virtual int baz (int) const;
+};
+
+inline int S::foo () const
+{
+ return 1;
+}
+
+inline bool S::bar () const
+{
+ return foo () == 0;
+}
+
+void A ()
+{
+ S s;
+ if (s.bar ())
+ s.foo ();
+}
+
+void B ()
+{
+ S s;
+ if (s.bar ())
+ s.foo ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr20995-1.C b/gcc/testsuite/g++.dg/opt/pr20995-1.C
new file mode 100644
index 00000000000..aa968963923
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr20995-1.C
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+template<int N> void foo()
+{
+ double d = (N ? 0.0 : 0) + 1;
+}
+
diff --git a/gcc/testsuite/g++.dg/opt/rtti2.C b/gcc/testsuite/g++.dg/opt/rtti2.C
new file mode 100644
index 00000000000..ebbe3cdfda8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/rtti2.C
@@ -0,0 +1,17 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+// We used to ICE in compare_values as the types for a comparison
+// were not the same kind of types.
+
+struct class1
+{
+ virtual ~class1 ();
+};
+struct class2 : class1 { };
+
+void f(class1 * oo)
+{
+ class2 * oj = dynamic_cast <class2 *>(oo) ;
+ if (oj)
+ delete oo;
+}
diff --git a/gcc/testsuite/g++.dg/template/sizeof9.C b/gcc/testsuite/g++.dg/template/sizeof9.C
new file mode 100644
index 00000000000..8d9ec95ae1f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/sizeof9.C
@@ -0,0 +1,6 @@
+// PR c++/21025
+
+template<int N> struct X { char x[N]; };
+template<typename T> X<1 + sizeof(T) - sizeof(T)> F(T const &);
+template<int N> struct S { int d() { F(1); } };
+
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr20963.C b/gcc/testsuite/g++.dg/tree-ssa/pr20963.C
new file mode 100644
index 00000000000..d8f91e1be31
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr20963.C
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* This was causing PRE to insert the value of the ADDR variable, to
+ remove the invariant cast but in doing so, it was creating a
+ non-invariant expression out of the invariant one, causing a later
+ failure in PRE. */
+struct sMCB {
+ unsigned char type;
+};
+
+extern void foo (void);
+unsigned char mem_readb(char *pt) __attribute__((nothrow));
+
+void DOS_FreeProcessMemory(unsigned short pspseg) {
+ while (1) {
+ if (pspseg)
+ foo ();
+ char *addr = (char*)(&((sMCB*)0)->type);
+ if (mem_readb(addr)==0x5a) break;
+ }
+};
+
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr21082.C b/gcc/testsuite/g++.dg/tree-ssa/pr21082.C
new file mode 100644
index 00000000000..dab630fa503
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr21082.C
@@ -0,0 +1,13 @@
+/* { dg-do link } */
+
+void link_error();
+
+int a[4];
+long b, c;
+
+int main()
+{
+ if (&a[b] - &a[c] != b - c)
+ link_error();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr21173.c b/gcc/testsuite/gcc.c-torture/execute/pr21173.c
new file mode 100644
index 00000000000..61459bca7e5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr21173.c
@@ -0,0 +1,21 @@
+void abort (void);
+
+char q;
+void *a[2];
+
+void foo (char *p)
+{
+ int i;
+ for (i = 0; i < 2; i++)
+ a[i] += p - &q;
+}
+
+int main (void)
+{
+ int i;
+ foo (&q);
+ for (i = 0; i < 2; i ++)
+ if (a[i])
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-1.c b/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-1.c
new file mode 100644
index 00000000000..ddb10577d08
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-1.c
@@ -0,0 +1,12 @@
+/* Test -Wint-to-pointer-cast - on by default. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+char c;
+
+void *
+f (void)
+{
+ return (void *) c; /* { dg-warning "warning: cast to pointer from integer of different size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-2.c b/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-2.c
new file mode 100644
index 00000000000..e4c980dd42c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-2.c
@@ -0,0 +1,12 @@
+/* Test -Wint-to-pointer-cast. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wint-to-pointer-cast" } */
+
+char c;
+
+void *
+f (void)
+{
+ return (void *) c; /* { dg-warning "warning: cast to pointer from integer of different size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-3.c b/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-3.c
new file mode 100644
index 00000000000..457a53afedd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-3.c
@@ -0,0 +1,20 @@
+/* Test -Wno-int-to-pointer-cast. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wno-int-to-pointer-cast" } */
+
+char c;
+
+void *
+f (void)
+{
+ return (void *) c;
+}
+
+void *p;
+
+char
+g (void)
+{
+ return (char) p; /* { dg-warning "warning: cast from pointer to integer of different size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c
new file mode 100644
index 00000000000..d9362a2d119
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c
@@ -0,0 +1,12 @@
+/* Test -Wpointer-to-int-cast - on by default. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void *p;
+
+char
+f (void)
+{
+ return (char) p; /* { dg-warning "warning: cast from pointer to integer of different size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-2.c b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-2.c
new file mode 100644
index 00000000000..a8d97ea6d2a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-2.c
@@ -0,0 +1,12 @@
+/* Test -Wpointer-to-int-cast. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wpointer-to-int-cast" } */
+
+void *p;
+
+char
+f (void)
+{
+ return (char) p; /* { dg-warning "warning: cast from pointer to integer of different size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-3.c b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-3.c
new file mode 100644
index 00000000000..12bfd4284d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-3.c
@@ -0,0 +1,21 @@
+/* Test -Wno-pointer-to-int-cast. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wno-pointer-to-int-cast" } */
+
+void *p;
+
+char
+f (void)
+{
+ return (char) p;
+}
+
+
+char c;
+
+void *
+g (void)
+{
+ return (void *) c; /* { dg-warning "warning: cast to pointer from integer of different size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/arm-vfp1.c b/gcc/testsuite/gcc.dg/arm-vfp1.c
new file mode 100644
index 00000000000..e1b221e0e4f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/arm-vfp1.c
@@ -0,0 +1,126 @@
+/* { dg-do compile { target arm*-*-* } } */
+/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
+
+extern float fabsf (float);
+extern float sqrtf (float);
+extern double fabs (double);
+extern double sqrt (double);
+
+volatile float f1, f2, f3;
+
+void test_sf() {
+ /* abssf2_vfp */
+ /* { dg-final { scan-assembler "fabss" } } */
+ f1 = fabsf (f1);
+ /* negsf2_vfp */
+ /* { dg-final { scan-assembler "fnegs" } } */
+ f1 = -f1;
+ /* addsf3_vfp */
+ /* { dg-final { scan-assembler "fadds" } } */
+ f1 = f2 + f3;
+ /* subsf3_vfp */
+ /* { dg-final { scan-assembler "fsubs" } } */
+ f1 = f2 - f3;
+ /* divsf3_vfp */
+ /* { dg-final { scan-assembler "fdivs" } } */
+ f1 = f2 / f3;
+ /* mulsf3_vfp */
+ /* { dg-final { scan-assembler "fmuls" } } */
+ f1 = f2 * f3;
+ /* mulsf3negsf_vfp */
+ /* { dg-final { scan-assembler "fnmuls" } } */
+ f1 = -f2 * f3;
+ /* mulsf3addsf_vfp */
+ /* { dg-final { scan-assembler "fmacs" } } */
+ f1 = f2 * f3 + f1;
+ /* mulsf3subsf_vfp */
+ /* { dg-final { scan-assembler "fmscs" } } */
+ f1 = f2 * f3 - f1;
+ /* mulsf3negsfaddsf_vfp */
+ /* { dg-final { scan-assembler "fnmacs" } } */
+ f1 = f2 - f3 * f1;
+ /* mulsf3negsfsubsf_vfp */
+ /* { dg-final { scan-assembler "fnmscs" } } */
+ f1 = -f2 * f3 - f1;
+ /* sqrtsf2_vfp */
+ /* { dg-final { scan-assembler "fsqrts" } } */
+ f1 = sqrtf (f1);
+}
+
+volatile double d1, d2, d3;
+
+void test_df() {
+ /* absdf2_vfp */
+ /* { dg-final { scan-assembler "fabsd" } } */
+ d1 = fabs (d1);
+ /* negdf2_vfp */
+ /* { dg-final { scan-assembler "fnegd" } } */
+ d1 = -d1;
+ /* adddf3_vfp */
+ /* { dg-final { scan-assembler "faddd" } } */
+ d1 = d2 + d3;
+ /* subdf3_vfp */
+ /* { dg-final { scan-assembler "fsubd" } } */
+ d1 = d2 - d3;
+ /* divdf3_vfp */
+ /* { dg-final { scan-assembler "fdivd" } } */
+ d1 = d2 / d3;
+ /* muldf3_vfp */
+ /* { dg-final { scan-assembler "fmuld" } } */
+ d1 = d2 * d3;
+ /* muldf3negdf_vfp */
+ /* { dg-final { scan-assembler "fnmuld" } } */
+ d1 = -d2 * d3;
+ /* muldf3adddf_vfp */
+ /* { dg-final { scan-assembler "fmacd" } } */
+ d1 = d2 * d3 + d1;
+ /* muldf3subdf_vfp */
+ /* { dg-final { scan-assembler "fmscd" } } */
+ d1 = d2 * d3 - d1;
+ /* muldf3negdfadddf_vfp */
+ /* { dg-final { scan-assembler "fnmacd" } } */
+ d1 = d2 - d3 * d1;
+ /* muldf3negdfsubdf_vfp */
+ /* { dg-final { scan-assembler "fnmscd" } } */
+ d1 = -d2 * d3 - d1;
+ /* sqrtdf2_vfp */
+ /* { dg-final { scan-assembler "fsqrtd" } } */
+ d1 = sqrt (d1);
+}
+
+volatile int i1;
+volatile unsigned int u1;
+
+void test_convert () {
+ /* extendsfdf2_vfp */
+ /* { dg-final { scan-assembler "fcvtds" } } */
+ d1 = f1;
+ /* truncdfsf2_vfp */
+ /* { dg-final { scan-assembler "fcvtsd" } } */
+ f1 = d1;
+ /* truncsisf2_vfp */
+ /* { dg-final { scan-assembler "ftosizs" } } */
+ i1 = f1;
+ /* truncsidf2_vfp */
+ /* { dg-final { scan-assembler "ftosizd" } } */
+ i1 = d1;
+ /* fixuns_truncsfsi2 */
+ /* { dg-final { scan-assembler "ftouizs" } } */
+ u1 = f1;
+ /* fixuns_truncdfsi2 */
+ /* { dg-final { scan-assembler "ftouizd" } } */
+ u1 = d1;
+ /* floatsisf2_vfp */
+ /* { dg-final { scan-assembler "fsitos" } } */
+ f1 = i1;
+ /* floatsidf2_vfp */
+ /* { dg-final { scan-assembler "fsitod" } } */
+ d1 = i1;
+ /* floatunssisf2 */
+ /* { dg-final { scan-assembler "fuitos" } } */
+ f1 = u1;
+ /* floatunssidf2 */
+ /* { dg-final { scan-assembler "fuitod" } } */
+ d1 = u1;
+}
+
diff --git a/gcc/testsuite/gcc.dg/c99-vla-jump-1.c b/gcc/testsuite/gcc.dg/c99-vla-jump-1.c
new file mode 100644
index 00000000000..488338bfef9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-vla-jump-1.c
@@ -0,0 +1,305 @@
+/* Test for labels and VM declarations: bug 12913.
+ goto statements must not jump into the scope of VM declarations.
+
+ This tests all combinations of label and goto locations in a given
+ function.
+
+ c99-vla-jump-1.c tests with just that label and goto, VLAs.
+ c99-vla-jump-2.c tests with many other labels and gotos, VLAs.
+ c99-vla-jump-3.c tests with just that label and goto, VM.
+ c99-vla-jump-4.c tests with many other labels and gotos, VM.
+ c99-vla-jump-5.c tests with switch statements. */
+
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+void fa0 (int n) { goto a; a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa1 (int n) { goto a; { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa2 (int n) { goto a; { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa3 (int n) { goto a; { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa4 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa5 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa6 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa7 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa8 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa9 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa10 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa11 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa12 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa13 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa14 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa15 (int n) { goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa16 (int n) { a: goto a; { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa17 (int n) { a:{ int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa18 (int n) { { int b[n]; goto a; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa19 (int n) { { int b[n]; goto a; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa20 (int n) { { int b[n]; goto a; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa21 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa22 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa23 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa24 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa25 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa26 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa27 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa28 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa29 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa30 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa31 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa32 (int n) { { int b[n]; goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa33 (int n) { { int b[n]; a: goto a; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa34 (int n) { a:{ int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa35 (int n) { { int b[n]; a:{ int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa36 (int n) { { int b[n]; { int c[n]; goto a; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa37 (int n) { { int b[n]; { int c[n]; goto a; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa38 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa39 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa40 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa41 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa42 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa43 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa44 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa45 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa46 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa47 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa48 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa49 (int n) { { int b[n]; { int c[n]; goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa50 (int n) { { int b[n]; { int c[n]; a: goto a; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa51 (int n) { a:{ int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa52 (int n) { { int b[n]; a:{ int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa53 (int n) { { int b[n]; { int c[n]; a:0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa54 (int n) { { int b[n]; { int c[n]; 0;} goto a; a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa55 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa56 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa57 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa58 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa59 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa60 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa61 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa62 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa63 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa64 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa65 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa66 (int n) { { int b[n]; { int c[n]; 0;} goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa67 (int n) { { int b[n]; { int c[n]; 0;} a: goto a; { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa68 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa69 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa70 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa71 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa72 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa73 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa74 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa75 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa76 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa77 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa78 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa79 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa80 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa81 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa82 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa83 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa84 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a: goto a; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa85 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa86 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa87 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa88 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa89 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa90 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa91 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa92 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa93 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa94 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa95 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa96 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa97 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa98 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa99 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa100 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa101 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a: goto a; ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa102 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa103 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa104 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa105 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa106 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa107 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa108 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa109 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa110 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa111 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa112 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa113 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa114 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa115 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa116 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa117 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa118 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a: goto a; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa119 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa120 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa121 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa122 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa123 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa124 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa125 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa126 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa127 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa128 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa129 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa130 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa131 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa132 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa133 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa134 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa135 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a: goto a; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa136 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa137 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa138 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa139 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa140 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa141 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa142 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa143 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa144 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa145 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa146 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa147 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa148 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; }
+void fa149 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa150 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa151 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa152 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a: goto a; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa153 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa154 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa155 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa156 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa157 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa158 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa159 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa160 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa161 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa162 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa163 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa164 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa165 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; }
+void fa166 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa167 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa168 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa169 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a: goto a; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa170 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa171 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa172 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa173 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa174 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa175 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa176 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa177 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa178 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa179 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa180 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa181 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa182 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; }
+void fa183 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa184 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa185 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa186 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a: goto a; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa187 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa188 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa189 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa190 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa191 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa192 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa193 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa194 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa195 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa196 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa197 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa198 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa199 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; }
+void fa200 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa201 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa202 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa203 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a: goto a; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa204 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa205 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa206 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa207 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa208 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa209 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa210 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa211 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa212 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa213 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa214 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa215 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; goto a; ; int i[n]; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa216 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; a:; int i[n]; 0;}; ; int j[n]; 0; }
+void fa217 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; a:0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa218 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; a:; int j[n]; 0; }
+void fa219 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; goto a; ; int i[n]; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa220 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a: goto a; ; int i[n]; 0;}; ; int j[n]; 0; }
+void fa221 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; }
+void fa222 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa223 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa224 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa225 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa226 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa227 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa228 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; }
+void fa229 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; }
+void fa230 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa231 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; }
+void fa232 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; goto a; 0;}; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa233 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; goto a; 0;}; ; int j[n]; 0; }
+void fa234 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; a:0;}; ; int j[n]; 0; }
+void fa235 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; a:; int j[n]; 0; }
+void fa236 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; goto a; 0;}; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa237 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a: goto a; 0;}; ; int j[n]; 0; }
+void fa238 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; }
+void fa239 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa240 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa241 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa242 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa243 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa244 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa245 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; }
+void fa246 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa247 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa248 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa249 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa250 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa251 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; goto a; ; int j[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa252 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; a:; int j[n]; 0; }
+void fa253 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; goto a; ; int j[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa254 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a: goto a; ; int j[n]; 0; }
+void fa255 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; }
+void fa256 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa257 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa258 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa259 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa260 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa261 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa262 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; }
+void fa263 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa264 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa265 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa266 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa267 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa268 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa269 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; goto a; 0; }
+void fa270 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; goto a; a:0; }
+void fa271 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a: goto a; 0; }
+void fa272 (int n) { a:{ int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; }
+void fa273 (int n) { { int b[n]; a:{ int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa274 (int n) { { int b[n]; { int c[n]; a:0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa275 (int n) { { int b[n]; { int c[n]; 0;} a:{ int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa276 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; a:0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa277 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} a:; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa278 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; a:0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa279 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; a:{ int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; }
+void fa280 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; a:{ int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa281 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; a:0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa282 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; a:{ int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa283 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; a:0;}; ; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa284 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; a:; int i[n]; 0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa285 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; a:0;}; ; int j[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fa286 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; a:; int j[n]; 0; goto a; }
+void fa287 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; a:0; goto a; }
+void fa288 (int n) { { int b[n]; { int c[n]; 0;} { int d[n]; 0;} ; int e[n]; 0;}; { int f[n]; { int g[n]; 0;}; { int h[n]; 0;}; ; int i[n]; 0;}; ; int j[n]; 0;a: goto a; }
diff --git a/gcc/testsuite/gcc.dg/c99-vla-jump-2.c b/gcc/testsuite/gcc.dg/c99-vla-jump-2.c
new file mode 100644
index 00000000000..dc17c791e22
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-vla-jump-2.c
@@ -0,0 +1,305 @@
+/* Test for labels and VM declarations: bug 12913.
+ goto statements must not jump into the scope of VM declarations.
+
+ This tests all combinations of label and goto locations in a given
+ function.
+
+ c99-vla-jump-1.c tests with just that label and goto, VLAs.
+ c99-vla-jump-2.c tests with many other labels and gotos, VLAs.
+ c99-vla-jump-3.c tests with just that label and goto, VM.
+ c99-vla-jump-4.c tests with many other labels and gotos, VM.
+ c99-vla-jump-5.c tests with switch statements. */
+
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+void fb0 (int n) { p0A:goto p0A; goto a; a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb1 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb2 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb3 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb4 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb5 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb6 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb7 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb8 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb9 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb10 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb11 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb12 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb13 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb14 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb15 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb16 (int n) { a: goto a; P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb17 (int n) { a:{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb18 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb19 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb20 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb21 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb22 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb23 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb24 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb25 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb26 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb27 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb28 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb29 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb30 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb31 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb32 (int n) { P0A:goto P0A;{ int b[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb33 (int n) { P0A:goto P0A;{ int b[n]; a: goto a; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb34 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb35 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb36 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb37 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb38 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb39 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb40 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb41 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb42 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb43 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb44 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb45 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb46 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb47 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb48 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb49 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb50 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a: goto a; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb51 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb52 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb53 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb54 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb55 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb56 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb57 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb58 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb59 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb60 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb61 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb62 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb63 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb64 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb65 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb66 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb67 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a: goto a; P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb68 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb69 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb70 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb71 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb72 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb73 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb74 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb75 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb76 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb77 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb78 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb79 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb80 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb81 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb82 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb83 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb84 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a: goto a; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb85 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb86 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb87 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb88 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb89 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb90 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb91 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb92 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb93 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb94 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb95 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb96 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb97 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb98 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb99 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb100 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb101 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a: goto a; P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb102 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb103 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb104 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb105 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb106 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb107 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb108 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb109 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb110 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb111 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb112 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb113 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb114 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb115 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb116 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb117 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb118 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a: goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb119 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb120 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb121 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb122 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb123 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb124 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb125 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb126 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb127 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb128 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb129 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb130 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb131 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb132 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb133 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb134 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb135 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a: goto a; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb136 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb137 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb138 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb139 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb140 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb141 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb142 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb143 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb144 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb145 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb146 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb147 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb148 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb149 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb150 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb151 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb152 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a: goto a; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb153 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb154 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb155 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb156 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb157 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb158 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb159 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb160 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb161 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb162 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb163 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb164 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb165 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb166 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb167 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb168 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb169 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a: goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb170 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb171 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb172 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb173 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb174 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb175 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb176 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb177 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb178 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb179 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb180 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb181 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb182 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb183 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb184 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb185 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb186 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a: goto a; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb187 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb188 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb189 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb190 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb191 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb192 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb193 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb194 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb195 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb196 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb197 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb198 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb199 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb200 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb201 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb202 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb203 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a: goto a; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb204 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb205 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb206 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb207 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb208 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb209 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb210 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb211 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb212 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb213 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb214 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb215 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb216 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb217 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb218 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb219 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb220 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a: goto a; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb221 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb222 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb223 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb224 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb225 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb226 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb227 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb228 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb229 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb230 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb231 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb232 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb233 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb234 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb235 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb236 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb237 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a: goto a; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb238 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb239 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb240 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb241 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb242 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb243 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb244 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb245 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb246 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb247 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb248 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb249 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb250 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb251 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb252 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; a:; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb253 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; int j[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb254 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a: goto a; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fb255 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fb256 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb257 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb258 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb259 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb260 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb261 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb262 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fb263 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb264 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb265 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb266 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb267 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb268 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb269 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fb270 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; p03A:goto p03A; goto a; a:0;P03B:goto P03B; }
+void fb271 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a: goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fb272 (int n) { a:{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fb273 (int n) { P0A:goto P0A;{ int b[n]; a:{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb274 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; a:0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb275 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} a:{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb276 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; a:0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb277 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} a:; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb278 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; a:0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb279 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; a:{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fb280 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; a:{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb281 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; a:0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb282 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; a:{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb283 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; a:0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb284 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; a:; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb285 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; a:0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fb286 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; a:; int j[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fb287 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; a:0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fb288 (int n) { P0A:goto P0A;{ int b[n]; P01A:goto P01A;{ int c[n]; P012A:goto P012A;0;} P01B:goto P01B;{ int d[n]; P013A:goto P013A;0;} P01C:goto P01C;; int e[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ int f[n]; P02A:goto P02A;{ int g[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ int h[n]; P025A:goto P025A;0;}; P02C:goto P02C;; int i[n]; P026A:goto P026A;0;}; P0C:goto P0C;; int j[n]; P03A:goto P03A;0;a: goto a; P03B:goto P03B; }
diff --git a/gcc/testsuite/gcc.dg/c99-vla-jump-3.c b/gcc/testsuite/gcc.dg/c99-vla-jump-3.c
new file mode 100644
index 00000000000..997c2e116d6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-vla-jump-3.c
@@ -0,0 +1,305 @@
+/* Test for labels and VM declarations: bug 12913.
+ goto statements must not jump into the scope of VM declarations.
+
+ This tests all combinations of label and goto locations in a given
+ function.
+
+ c99-vla-jump-1.c tests with just that label and goto, VLAs.
+ c99-vla-jump-2.c tests with many other labels and gotos, VLAs.
+ c99-vla-jump-3.c tests with just that label and goto, VM.
+ c99-vla-jump-4.c tests with many other labels and gotos, VM.
+ c99-vla-jump-5.c tests with switch statements. */
+
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+void fc0 (int n) { goto a; a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc1 (int n) { goto a; { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc2 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc3 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc4 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc5 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc6 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc7 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc8 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc9 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc10 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc11 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc12 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc13 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc14 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc15 (int n) { goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc16 (int n) { a: goto a; { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc17 (int n) { a:{ typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc18 (int n) { { typedef int (*b)[n]; goto a; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc19 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc20 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc21 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc22 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc23 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc24 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc25 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc26 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc27 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc28 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc29 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc30 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc31 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc32 (int n) { { typedef int (*b)[n]; goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc33 (int n) { { typedef int (*b)[n]; a: goto a; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc34 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc35 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc36 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc37 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc38 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc39 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc40 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc41 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc42 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc43 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc44 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc45 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc46 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc47 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc48 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc49 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc50 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a: goto a; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc51 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc52 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc53 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc54 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc55 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc56 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc57 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc58 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc59 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc60 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc61 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc62 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc63 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc64 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc65 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc66 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc67 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a: goto a; { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc68 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc69 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc70 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc71 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc72 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc73 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc74 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc75 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc76 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc77 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc78 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc79 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc80 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc81 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc82 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc83 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc84 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a: goto a; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc85 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc86 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc87 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc88 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc89 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc90 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc91 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc92 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc93 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc94 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc95 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc96 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc97 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc98 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc99 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc100 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc101 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a: goto a; ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc102 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc103 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc104 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc105 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc106 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc107 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc108 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc109 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc110 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc111 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc112 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc113 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc114 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc115 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc116 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc117 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc118 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a: goto a; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc119 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc120 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc121 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc122 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc123 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc124 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc125 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc126 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc127 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc128 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc129 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc130 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc131 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc132 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc133 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc134 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc135 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a: goto a; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc136 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc137 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc138 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc139 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc140 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc141 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc142 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc143 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc144 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc145 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc146 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc147 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc148 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc149 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc150 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc151 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc152 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a: goto a; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc153 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc154 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc155 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc156 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc157 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc158 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc159 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc160 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc161 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc162 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc163 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc164 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc165 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc166 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc167 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc168 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc169 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a: goto a; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc170 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc171 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc172 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc173 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc174 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc175 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc176 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc177 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc178 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc179 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc180 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc181 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc182 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc183 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc184 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc185 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc186 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a: goto a; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc187 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc188 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc189 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc190 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc191 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc192 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc193 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc194 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc195 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc196 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc197 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc198 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc199 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc200 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc201 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc202 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc203 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a: goto a; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc204 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc205 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc206 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc207 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc208 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc209 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc210 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc211 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc212 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc213 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc214 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc215 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc216 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc217 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc218 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc219 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc220 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a: goto a; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; }
+void fc221 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; }
+void fc222 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc223 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc224 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc225 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc226 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc227 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc228 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; }
+void fc229 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; }
+void fc230 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc231 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; }
+void fc232 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc233 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; 0; }
+void fc234 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; a:0;}; ; typedef int (*j)[n]; 0; }
+void fc235 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; a:; typedef int (*j)[n]; 0; }
+void fc236 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; goto a; 0;}; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc237 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a: goto a; 0;}; ; typedef int (*j)[n]; 0; }
+void fc238 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; }
+void fc239 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc240 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc241 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc242 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc243 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc244 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc245 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; }
+void fc246 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc247 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc248 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc249 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc250 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc251 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; goto a; ; typedef int (*j)[n]; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc252 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; a:; typedef int (*j)[n]; 0; }
+void fc253 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; goto a; ; typedef int (*j)[n]; a:0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc254 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a: goto a; ; typedef int (*j)[n]; 0; }
+void fc255 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; }
+void fc256 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc257 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc258 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc259 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc260 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc261 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc262 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; }
+void fc263 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc264 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc265 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc266 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc267 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc268 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; goto a; 0; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc269 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; goto a; 0; }
+void fc270 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; goto a; a:0; }
+void fc271 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a: goto a; 0; }
+void fc272 (int n) { a:{ typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; }
+void fc273 (int n) { { typedef int (*b)[n]; a:{ typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc274 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; a:0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc275 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} a:{ typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc276 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; a:0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc277 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} a:; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc278 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; a:0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc279 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; a:{ typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; }
+void fc280 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; a:{ typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc281 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; a:0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc282 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; a:{ typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc283 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; a:0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc284 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; a:; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc285 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; a:0;}; ; typedef int (*j)[n]; 0; goto a; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fc286 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; a:; typedef int (*j)[n]; 0; goto a; }
+void fc287 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; a:0; goto a; }
+void fc288 (int n) { { typedef int (*b)[n]; { typedef int (*c)[n]; 0;} { typedef int (*d)[n]; 0;} ; typedef int (*e)[n]; 0;}; { typedef int (*f)[n]; { typedef int (*g)[n]; 0;}; { typedef int (*h)[n]; 0;}; ; typedef int (*i)[n]; 0;}; ; typedef int (*j)[n]; 0;a: goto a; }
diff --git a/gcc/testsuite/gcc.dg/c99-vla-jump-4.c b/gcc/testsuite/gcc.dg/c99-vla-jump-4.c
new file mode 100644
index 00000000000..0fe86809ce1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-vla-jump-4.c
@@ -0,0 +1,305 @@
+/* Test for labels and VM declarations: bug 12913.
+ goto statements must not jump into the scope of VM declarations.
+
+ This tests all combinations of label and goto locations in a given
+ function.
+
+ c99-vla-jump-1.c tests with just that label and goto, VLAs.
+ c99-vla-jump-2.c tests with many other labels and gotos, VLAs.
+ c99-vla-jump-3.c tests with just that label and goto, VM.
+ c99-vla-jump-4.c tests with many other labels and gotos, VM.
+ c99-vla-jump-5.c tests with switch statements. */
+
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+void fd0 (int n) { p0A:goto p0A; goto a; a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd1 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd2 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd3 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd4 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd5 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd6 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd7 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd8 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd9 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd10 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd11 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd12 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd13 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd14 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd15 (int n) { p0A:goto p0A; goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd16 (int n) { a: goto a; P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd17 (int n) { a:{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd18 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd19 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd20 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd21 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd22 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd23 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd24 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd25 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd26 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd27 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd28 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd29 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd30 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd31 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd32 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; p01A:goto p01A; goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd33 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a: goto a; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd34 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd35 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd36 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd37 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd38 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd39 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd40 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd41 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd42 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd43 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd44 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd45 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd46 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd47 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd48 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd49 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; p012A:goto p012A; goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd50 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a: goto a; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd51 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd52 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd53 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd54 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd55 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd56 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd57 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd58 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd59 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd60 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd61 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd62 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd63 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd64 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd65 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd66 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} p01B:goto p01B; goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd67 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a: goto a; P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd68 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd69 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd70 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd71 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd72 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd73 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd74 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd75 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd76 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd77 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd78 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd79 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd80 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd81 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd82 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd83 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; p013A:goto p013A; goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd84 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a: goto a; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd85 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd86 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd87 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd88 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd89 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd90 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd91 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd92 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd93 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd94 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd95 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd96 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd97 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd98 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd99 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd100 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} p01C:goto p01C; goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd101 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a: goto a; P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd102 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd103 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd104 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd105 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd106 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd107 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd108 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd109 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd110 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd111 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd112 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd113 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd114 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd115 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd116 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd117 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; p014A:goto p014A; goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd118 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a: goto a; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd119 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd120 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd121 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd122 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd123 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd124 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd125 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd126 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd127 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd128 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd129 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd130 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd131 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd132 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd133 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd134 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; p0B:goto p0B; goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd135 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a: goto a; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd136 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd137 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd138 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd139 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd140 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd141 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd142 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd143 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd144 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd145 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd146 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd147 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd148 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd149 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd150 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd151 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; p02A:goto p02A; goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd152 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a: goto a; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd153 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd154 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd155 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd156 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd157 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd158 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd159 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd160 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd161 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd162 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd163 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd164 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd165 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd166 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd167 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd168 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; p024A:goto p024A; goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd169 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a: goto a; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd170 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd171 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd172 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd173 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd174 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd175 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd176 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd177 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd178 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd179 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd180 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd181 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd182 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd183 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd184 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd185 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; p02B:goto p02B; goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd186 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a: goto a; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd187 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd188 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd189 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd190 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd191 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd192 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd193 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd194 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd195 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd196 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd197 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd198 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd199 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd200 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd201 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd202 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; p025A:goto p025A; goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd203 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a: goto a; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd204 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd205 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd206 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd207 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd208 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd209 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd210 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd211 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd212 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd213 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd214 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd215 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd216 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd217 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd218 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd219 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; p02C:goto p02C; goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd220 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a: goto a; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd221 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd222 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd223 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd224 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd225 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd226 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd227 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd228 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd229 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd230 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd231 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd232 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd233 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd234 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd235 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd236 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; p026A:goto p026A; goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd237 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a: goto a; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd238 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd239 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd240 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd241 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd242 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd243 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd244 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd245 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd246 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd247 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd248 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd249 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd250 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd251 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd252 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; a:; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd253 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; p0C:goto p0C; goto a; P0C:goto P0C;; typedef int (*j)[n]; a:0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd254 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a: goto a; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;P03B:goto P03B; }
+void fd255 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fd256 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd257 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd258 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd259 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd260 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd261 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd262 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fd263 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd264 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd265 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd266 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd267 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd268 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd269 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; p03A:goto p03A; goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fd270 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; p03A:goto p03A; goto a; a:0;P03B:goto P03B; }
+void fd271 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a: goto a; P03A:goto P03A;0;P03B:goto P03B; }
+void fd272 (int n) { a:{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fd273 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; a:{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd274 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; a:0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd275 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} a:{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd276 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; a:0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd277 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} a:; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd278 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; a:0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd279 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; a:{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fd280 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; a:{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd281 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; a:0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd282 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; a:{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd283 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; a:0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd284 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; a:; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd285 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; a:0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; } /* { dg-error "error: jump into scope of identifier with variably modified type" } */
+void fd286 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; a:; typedef int (*j)[n]; P03A:goto P03A;0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fd287 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; a:0;p03B:goto p03B; goto a; P03B:goto P03B; }
+void fd288 (int n) { P0A:goto P0A;{ typedef int (*b)[n]; P01A:goto P01A;{ typedef int (*c)[n]; P012A:goto P012A;0;} P01B:goto P01B;{ typedef int (*d)[n]; P013A:goto P013A;0;} P01C:goto P01C;; typedef int (*e)[n]; P014A:goto P014A;0;}; P0B:goto P0B;{ typedef int (*f)[n]; P02A:goto P02A;{ typedef int (*g)[n]; P024A:goto P024A;0;}; P02B:goto P02B;{ typedef int (*h)[n]; P025A:goto P025A;0;}; P02C:goto P02C;; typedef int (*i)[n]; P026A:goto P026A;0;}; P0C:goto P0C;; typedef int (*j)[n]; P03A:goto P03A;0;a: goto a; P03B:goto P03B; }
diff --git a/gcc/testsuite/gcc.dg/c99-vla-jump-5.c b/gcc/testsuite/gcc.dg/c99-vla-jump-5.c
new file mode 100644
index 00000000000..442aac8071d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-vla-jump-5.c
@@ -0,0 +1,30 @@
+/* Test for labels and VM declarations: bug 12913.
+ switch statements must not jump into the scope of VM declarations.
+
+ c99-vla-jump-1.c tests with just that label and goto, VLAs.
+ c99-vla-jump-2.c tests with many other labels and gotos, VLAs.
+ c99-vla-jump-3.c tests with just that label and goto, VM.
+ c99-vla-jump-4.c tests with many other labels and gotos, VM.
+ c99-vla-jump-5.c tests with switch statements. */
+
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+void
+f (int a, int b)
+{
+ switch (a) {
+ int v[b];
+ case 2: /* { dg-error "error: case label in scope of identifier with variably modified type not containing enclosing switch statement" } */
+ default: /* { dg-error "error: 'default' label in scope of identifier with variably modified type not containing enclosing switch statement" } */
+ switch (a)
+ {
+ case 4:
+ { int z[b]; }
+ default:
+ ;
+ int w[b];
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/very-long-comment.c b/gcc/testsuite/gcc.dg/cpp/very-long-comment.c
new file mode 100644
index 00000000000..88d8eb936d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/very-long-comment.c
@@ -0,0 +1,14 @@
+/*
+This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment.
+ */
+/* This testcase for PR 20907 is a bit finicky about the placement of
+ comment so avoid editing the text above here. */
+/* { dg-options "-Wall" } */
+/* { dg-do compile } */
+#warning test warning /* { dg-warning "test warning" } */
+#include <stdio.h>
+int main()
+{
+ printf("This is line %d\n", __LINE__);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fold-xor-1.c b/gcc/testsuite/gcc.dg/fold-xor-1.c
new file mode 100644
index 00000000000..c8334e1875a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-xor-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-generic" } */
+
+int f (int a, int b) {
+ return ~a ^ ~b;
+}
+
+unsigned int g (unsigned int a, unsigned int b) {
+ return ~a ^ ~b;
+}
+/* { dg-final { scan-tree-dump-times "a \\^ b" 2 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-xor-2.c b/gcc/testsuite/gcc.dg/fold-xor-2.c
new file mode 100644
index 00000000000..40c2c5d46c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-xor-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-generic" } */
+int f (int a, int b) {
+ return ~(a ^ -(b + 1));
+}
+
+int g (int a, int b) {
+ return b ^ a;
+}
+
+unsigned int h (unsigned int a, unsigned int b) {
+ return ~(-(b + 1) ^ a);
+}
+
+/* { dg-final { scan-tree-dump-times "b \\^ a" 3 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-2.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-2.c
new file mode 100644
index 00000000000..847eeee282f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/asm_fprintf-2.c
@@ -0,0 +1,9 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "__gcc_host_wide_int__", not used at all, asm_fprintf format. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-3.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-3.c
new file mode 100644
index 00000000000..f5fd5c022fc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/asm_fprintf-3.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "__gcc_host_wide_int__", not defined, asm_fprintf format. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int __gcc_host_wide_int__);
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-4.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-4.c
new file mode 100644
index 00000000000..9de05134af3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/asm_fprintf-4.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "__gcc_host_wide_int__", not a type, asm_fprintf. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-5.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-5.c
new file mode 100644
index 00000000000..14ffb60d32e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/asm_fprintf-5.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "__gcc_host_wide_int__", bad type, asm_fprintf format. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+typedef int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as 'long' or 'long long'" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-2.c b/gcc/testsuite/gcc.dg/format/gcc_diag-2.c
new file mode 100644
index 00000000000..60c6835da9e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-2.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test "tree", not
+ defined. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int tree);
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2)));
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-3.c b/gcc/testsuite/gcc.dg/format/gcc_diag-3.c
new file mode 100644
index 00000000000..1a7848ed9f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-3.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test "tree", not
+ a type. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int tree;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: 'tree' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-4.c b/gcc/testsuite/gcc.dg/format/gcc_diag-4.c
new file mode 100644
index 00000000000..20661c41f71
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-4.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test "tree", not
+ a pointer type. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+typedef int tree;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: 'tree' is not defined as a pointer type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-5.c b/gcc/testsuite/gcc.dg/format/gcc_diag-5.c
new file mode 100644
index 00000000000..f8f12d68cdd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-5.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "location_t", not defined. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int location_t);
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2)));
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-6.c b/gcc/testsuite/gcc.dg/format/gcc_diag-6.c
new file mode 100644
index 00000000000..fdb493d4973
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-6.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "location_t", not a type. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int location_t;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: 'location_t' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-7.c b/gcc/testsuite/gcc.dg/format/gcc_diag-7.c
new file mode 100644
index 00000000000..fccf5d24041
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-7.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "__gcc_host_wide_int__", not defined. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int __gcc_host_wide_int__);
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2)));
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-8.c b/gcc/testsuite/gcc.dg/format/gcc_diag-8.c
new file mode 100644
index 00000000000..835ec3f98d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-8.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "__gcc_host_wide_int__", not a type. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-9.c b/gcc/testsuite/gcc.dg/format/gcc_diag-9.c
new file mode 100644
index 00000000000..6481c26caf7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-9.c
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740. The code did
+ not check that, if the required typedef names had been used as
+ identifiers, they were defined to suitable types. Test
+ "__gcc_host_wide_int__", bad type. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+typedef int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as 'long' or 'long long'" } */
diff --git a/gcc/testsuite/gcc.dg/pr20922-1.c b/gcc/testsuite/gcc.dg/pr20922-1.c
new file mode 100644
index 00000000000..c016356c8ab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20922-1.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-wrapv -fdump-tree-generic" } */
+int f(int i)
+{
+ return (i - 2) > i;
+}
+
+int g(int i)
+{
+ return (i + 2) < i;
+}
+
+int h(int i)
+{
+ return (i + (-2)) > i;
+}
+
+int j(int i)
+{
+ return (i - (-2)) < i;
+}
+
+int x(double i)
+{
+ return (i - 2.0) > i;
+}
+
+int y(double i)
+{
+ return (i + 2.0) < i;
+}
+
+int z(double i)
+{
+ return (i + (-2.0)) > i;
+}
+/* { dg-final { scan-tree-dump-times " = 0" 7 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/pr20922-2.c b/gcc/testsuite/gcc.dg/pr20922-2.c
new file mode 100644
index 00000000000..3c4380f8d00
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20922-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-fwrapv -fdump-tree-generic" } */
+int f (int i)
+{
+ return (i - 2) > i;
+}
+
+int g (int i)
+{
+ return (i + 2) < i;
+}
+
+int h (double i)
+{
+ return (i + 2.0) <= i;
+}
+/* { dg-final { scan-tree-dump-times " = 0" 0 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/pr20922-3.c b/gcc/testsuite/gcc.dg/pr20922-3.c
new file mode 100644
index 00000000000..476eb540e2a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20922-3.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-ffast-math -fno-wrapv -fdump-tree-generic" } */
+int f(int i)
+{
+ return (i - 2) <= i;
+}
+
+int g(int i)
+{
+ return (i + 2) >= i;
+}
+
+int h(int i)
+{
+ return (i + (-2)) <= i;
+}
+
+int x(double i)
+{
+ return (i - 2.0) <= i;
+}
+
+int y(double i)
+{
+ return (i + 2.0) >= i;
+}
+
+int z(double i)
+{
+ return (i + (-2.0)) <= i;
+}
+/* { dg-final { scan-tree-dump-times " = 1" 6 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/pr20922-4.c b/gcc/testsuite/gcc.dg/pr20922-4.c
new file mode 100644
index 00000000000..664a62f4e4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20922-4.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-wrapv -fdump-tree-generic" } */
+int f(int i)
+{
+ return i < (i - 2);
+}
+
+int g(int i)
+{
+ return i > (i + 2);
+}
+
+int h(int i)
+{
+ return i < (i + (-2));
+}
+
+int j(int i)
+{
+ return i > (i - (-2));
+}
+
+int x(double i)
+{
+ return i < (i - 2.0);
+}
+
+int y(double i)
+{
+ return i > (i + 2.0);
+}
+
+int z(double i)
+{
+ return i < (i + (-2.0));
+}
+/* { dg-final { scan-tree-dump-times " = 0" 7 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/pr20922-5.c b/gcc/testsuite/gcc.dg/pr20922-5.c
new file mode 100644
index 00000000000..7377badd135
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20922-5.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-fsignaling-nans -fwrapv -fdump-tree-generic" } */
+int f(int i)
+{
+ return i < (i - 2);
+}
+
+int g(int i)
+{
+ return i > (i + 2);
+}
+
+int h (double i)
+{
+ return i >= i + 2.0;
+}
+
+int j (double i)
+{
+ return i > i + 2.0;
+}
+/* { dg-final { scan-tree-dump-times " = 0" 0 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/pr20922-6.c b/gcc/testsuite/gcc.dg/pr20922-6.c
new file mode 100644
index 00000000000..ff1d519e2a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20922-6.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-ffast-math -fno-wrapv -fdump-tree-generic" } */
+int f(int i)
+{
+ return i >= (i - 2);
+}
+
+int g(int i)
+{
+ return i <= (i + 2);
+}
+
+int h(int i)
+{
+ return i >= (i + (-2));
+}
+
+int x(double i)
+{
+ return i >= (i - 2.0);
+}
+
+int y(double i)
+{
+ return i <= (i + 2.0);
+}
+
+int z(double i)
+{
+ return i >= (i + (-2.0));
+}
+/* { dg-final { scan-tree-dump-times " = 1" 6 "generic" } } */
+/* { dg-final { cleanup-tree-dump "generic" } } */
diff --git a/gcc/testsuite/gcc.dg/pr21085.c b/gcc/testsuite/gcc.dg/pr21085.c
new file mode 100644
index 00000000000..6a51adb9055
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr21085.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* This used to cause excessive use, or a stack overflow, depending on which
+ came first. */
+void foo (void)
+{
+ int maxstringlen = 1;
+ int limit = 0, maxblock = 0, maxblockrem = 0;
+ maxblockrem = (maxstringlen) % (2147483647 + 1); /* { dg-warning "overflow" } */
+}
diff --git a/gcc/testsuite/gcc.dg/stabs-attrib-vect-darwin.c b/gcc/testsuite/gcc.dg/stabs-attrib-vect-darwin.c
new file mode 100644
index 00000000000..d380f8e8d00
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/stabs-attrib-vect-darwin.c
@@ -0,0 +1,11 @@
+/* Test Attribute Vector associated with vector type stabs. */
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-gstabs -fno-eliminate-unused-debug-types -faltivec" } */
+
+int main ()
+{
+ vector int vi = { 6,7,8,9 };
+ return 0;
+}
+
+/* { dg-final { scan-assembler ".stabs.*vi\:\\(0,16\\)=\@V" } } */
diff --git a/gcc/testsuite/gcc.dg/transparent-union-3.c b/gcc/testsuite/gcc.dg/transparent-union-3.c
new file mode 100644
index 00000000000..cebd5f85771
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/transparent-union-3.c
@@ -0,0 +1,22 @@
+/* Test for ICEs on invalid transparent unions (empty or no named
+ members). Bug 21213. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+enum e { A };
+
+union __attribute__((__transparent_union__)) ue1 { enum e; }; /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 9 } */
+union ue2 { enum e; } __attribute__((__transparent_union__)); /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 11 } */
+
+union __attribute__((__transparent_union__)) ui1 { int; }; /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 14 } */
+union ui2 { int; } __attribute__((__transparent_union__)); /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 16 } */
+
+union __attribute__((__transparent_union__)) u1 { };
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 19 } */
+union u2 { } __attribute__((__transparent_union__));
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 21 } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c
new file mode 100644
index 00000000000..bc6c2869d75
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+int main ()
+{
+ int i;
+ char ia[N];
+ char ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+ char ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+ for (i = 0; i < N; i++)
+ {
+ ia[i] = ib[i] + ic[i];
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ia[i] != ib[i] + ic[i])
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
new file mode 100644
index 00000000000..75ec7ce8863
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+#if __LONG_MAX__ == 2147483647
+typedef short half_word;
+#else
+typedef int half_word;
+#endif
+
+int main ()
+{
+ int i;
+ half_word ia[N];
+ half_word ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+ half_word ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+ for (i = 0; i < N; i++)
+ {
+ ia[i] = ib[i] & ic[i];
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ia[i] != ib[i] & ic[i])
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
new file mode 100644
index 00000000000..20833533468
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+int main ()
+{
+ int i;
+ char ia[N];
+ char ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+ char ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+ /* Not vectorizable, multiplication */
+ for (i = 0; i < N; i++)
+ {
+ ia[i] = ib[i] * ic[i];
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ia[i] != (char) (ib[i] * ic[i]))
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
new file mode 100644
index 00000000000..8632ae42b3a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+#if LONG_MAX == 2147483647
+typedef short half_word;
+#else
+typedef int half_word;
+#endif
+
+int main ()
+{
+ int i;
+ half_word ia[N];
+ half_word ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+ half_word ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+ /* Not worthwhile, only 2 parts per int */
+ for (i = 0; i < N; i++)
+ {
+ ia[i] = ib[i] + ic[i];
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ia[i] != ib[i] + ic[i])
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
new file mode 100644
index 00000000000..be89c268258
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+#if __LONG_MAX__ == 2147483647
+typedef short half_word;
+#else
+typedef int half_word;
+#endif
+
+int main ()
+{
+ half_word cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+ half_word ca[N];
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ ca[i] = cb[i];
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ca[i] != cb[i])
+ abort ();
+ }
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c
new file mode 100644
index 00000000000..b90413aa4bf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 128
+
+/* unaligned store. */
+
+int main ()
+{
+ int i;
+ char ia[N+1];
+
+ for (i = 1; i <= N; i++)
+ {
+ ia[i] = 5;
+ }
+
+ /* check results: */
+ for (i = 1; i <= N; i++)
+ {
+ if (ia[i] != 5)
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c
new file mode 100644
index 00000000000..0d017529357
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 128
+#define OFF 3
+
+/* unaligned store. */
+
+int main (int off)
+{
+ int i;
+ char ia[N+OFF];
+
+ for (i = 0; i < N; i++)
+ {
+ ia[i+off] = 5;
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ia[i+off] != 5)
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c
new file mode 100644
index 00000000000..681c7071685
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+int main ()
+{
+ struct {
+ char ca[N];
+ } s;
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ s.ca[i] = 5;
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (s.ca[i] != 5)
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ifc-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ifc-3.c
new file mode 100644
index 00000000000..e853ec4df9b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ifc-3.c
@@ -0,0 +1,12 @@
+/* PR 20994 */
+/* { dg-do compile } */
+int foo(double* p, double* q)
+{
+ int i=0;
+
+ for (; q!=p; ++q)
+ if (*q)
+ ++i;
+
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
new file mode 100644
index 00000000000..c274cd3385e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/21001
+ VRP did not insert ASSERT_EXPRs when the variable tested in a
+ COND_EXPR is a single-use variable. By propagating the definition
+ of the single-use variable into the COND_EXPR, we can get useful
+ range infomation out of the conditional. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
+
+int
+foo (int a)
+{
+ int b = a != 0;
+ if (b)
+ if (a != 0)
+ return 1;
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21031.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21031.c
new file mode 100644
index 00000000000..df200d564d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21031.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/21031
+
+ Make sure that a != 0 is propagated into the "if" statement. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-forwprop1-details" } */
+
+int
+foo (int a)
+{
+ int b = a != 0;
+ unsigned char c = b;
+ if (c)
+ return 1;
+ else
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Replaced" 2 "forwprop1"} } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-1.c
new file mode 100644
index 00000000000..d0263e3a287
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-1.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1" } */
+
+int
+foo (int a, int b, int c)
+{
+ int *p;
+ if (c)
+ p = &a;
+ else
+ p = &b;
+
+ *p = 3;
+ *p = 4;
+ return *p;
+}
+
+
+/* We should eliminate both assignments to *p. */
+/* { dg-final { scan-tree-dump-times " = 3" 0 "dse1"} } */
+/* { dg-final { scan-tree-dump-times " = 4" 0 "dse1"} } */
+
+/* The return *p should be turned into return 4. */
+/* { dg-final { scan-tree-dump-times " return 4" 1 "dse1"} } */
+
+/* { dg-final { cleanup-tree-dump "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-2.c
new file mode 100644
index 00000000000..104ef26df40
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-2.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1" } */
+
+int a, b, c;
+int
+foo ()
+{
+ int *p;
+ if (c)
+ p = &a;
+ else
+ p = &b;
+
+ *p = 3;
+ *p = 4;
+ return *p;
+}
+
+
+/* We should eliminate the first assignment to *p, but not the second. */
+/* { dg-final { scan-tree-dump-times " = 3" 0 "dse1"} } */
+/* { dg-final { scan-tree-dump-times " = 4" 1 "dse1"} } */
+
+/* { dg-final { cleanup-tree-dump "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-3.c
new file mode 100644
index 00000000000..4292f2384a5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1" } */
+
+char Bool_Glob;
+void f(void)
+{
+ Bool_Glob = 0;
+ Bool_Glob = 1;
+}
+
+/* We should eliminate the first assignment to *p, but not the second. */
+/* { dg-final { scan-tree-dump-times "Bool_Glob = 0" 0 "dse1"} } */
+/* { dg-final { scan-tree-dump-times "Bool_Glob = 1" 1 "dse1"} } */
+
+/* { dg-final { cleanup-tree-dump "dse1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-4.c
new file mode 100644
index 00000000000..39fc85e6926
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-4.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1" } */
+
+foo( int *a)
+{
+ *a = 5;
+ *a = 3;
+}
+
+
+
+
+/* We should eliminate the first assignment to *p, but not the second. */
+/* { dg-final { scan-tree-dump-times "= 5" 0 "dse1"} } */
+/* { dg-final { scan-tree-dump-times "= 3" 1 "dse1"} } */
+
+/* { dg-final { cleanup-tree-dump "dse1" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c
new file mode 100644
index 00000000000..537a5e57b84
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int x;
+
+int
+f1 (int i, int j, int k)
+{
+ int *p = k ? &i : &j;
+ i = 3;
+ *p = 5;
+ x = j;
+}
+
+/* The assignment "i = 3" is partialy dead. Our DSE pass doesn't handle
+ detection of partially dead assignments.
+
+ There's two outputs which would indicate that the optimization was
+ performed.
+
+ If we used block copying to detect and eliminate the partially dead
+ store, then we should see an assignment "i = 5" somewhere in the
+ dump file.
+
+ Another approach would be to redirect the path from the true arm
+ of the first conditional so that it reaches the statement *p = 5
+ rather than i = 3. */
+
+/* { dg-final { scan-tree-dump-times "i = 5" 1 "optimized" { xfail *-*-* }} } */
+/* { dg-final { scan-tree-dump-times "<L.*>:;\[\n\t \]*\\*p = 5" 1 "optimized" { xfail *-*-*}} } */
+
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-6.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-6.c
new file mode 100644
index 00000000000..3d020067ca7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-6.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1" } */
+
+int foo11 (int c)
+{
+ static int local1, local2;
+ local1 = 0;
+ local2 += c;
+ local1 = 2;
+ local2++;
+ return local1 + local2;
+}
+
+/* There should only be one assignment to local1 and local2. */
+/* { dg-final { scan-tree-dump-times "local1 = " 1 "dse1"} } */
+/* { dg-final { scan-tree-dump-times "local2 = " 1 "dse1"} } */
+
+/* { dg-final { cleanup-tree-dump "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-7.c
new file mode 100644
index 00000000000..77e4a6246f3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-7.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1" } */
+
+int glob1, glob2;
+
+int foo1 (void)
+{
+ glob1 = 0;
+ glob2 = 1;
+ glob1 = 2;
+ glob2 = 3;
+ return glob1 + glob2;
+}
+
+
+
+/* There should only be one assignment to glob1 and glob2, the final
+ return statement should just return a constant. */
+/* { dg-final { scan-tree-dump-times "glob1 = " 1 "dse1"} } */
+/* { dg-final { scan-tree-dump-times "glob2 = " 1 "dse1"} } */
+/* { dg-final { scan-tree-dump-times "return 5" 1 "dse1"} } */
+
+/* { dg-final { cleanup-tree-dump "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-11a.c b/gcc/testsuite/gcc.dg/vect/vect-11a.c
new file mode 100644
index 00000000000..c77d6c92f89
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-11a.c
@@ -0,0 +1,52 @@
+/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_int_mult } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+extern void abort (void);
+void u ()
+{
+ unsigned int A[4] = {0x08000000,0xffffffff,0xff0000ff,0xf0000001};
+ unsigned int B[4] = {0x08000000,0x08000001,0xff0000ff,0xf0000001};
+ unsigned int Answer[4] = {0,0xf7ffffff,0x0200fe01,0xe0000001};
+ unsigned int C[4];
+ int i, j;
+
+ for (i=0; i<4; i++)
+ C[i] = A[i] * B[i];
+ for (i=0; i<4; i++)
+ if (C[i] != Answer[i])
+ abort ();
+}
+void s()
+{
+ signed int A[4] = {0x08000000,0xffffffff,0xff0000ff,0xf0000001};
+ signed int B[4] = {0x08000000,0x08000001,0xff0000ff,0xf0000001};
+ signed int Answer[4] = {0,0xf7ffffff,0x0200fe01, 0xe0000001};
+ signed int C[4];
+ int i, j;
+
+ for (i=0; i<4; i++)
+ C[i] = A[i] * B[i];
+ for (i=0; i<4; i++)
+ if (C[i] != Answer[i])
+ abort ();
+}
+
+int main1 ()
+{
+ u();
+ s();
+ return 0;
+}
+
+int main (void)
+{
+ check_vect ();
+
+ return main1 ();
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-99.c b/gcc/testsuite/gcc.dg/vect/vect-99.c
new file mode 100644
index 00000000000..288f2ae8daf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-99.c
@@ -0,0 +1,19 @@
+/* { dg-require-effective-target vect_int } */
+
+int ca[100];
+
+void foo (int n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++)
+ ca[i] = 2;
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/weak/weak-13.c b/gcc/testsuite/gcc.dg/weak/weak-13.c
new file mode 100644
index 00000000000..15106a5346b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/weak/weak-13.c
@@ -0,0 +1,13 @@
+/* Test for weak aliases with multiple declarations. Sun assembler
+ rejects multiple weak alias definitions in the output. */
+/* { dg-do assemble } */
+/* { dg-require-weak "" } */
+/* { dg-require-alias "" } */
+/* { dg-options "" } */
+
+#pragma weak foo = _foo
+
+extern int foo;
+extern int foo;
+
+int _foo = 4;
diff --git a/gcc/testsuite/gcc.target/i386/pr21101.c b/gcc/testsuite/gcc.target/i386/pr21101.c
new file mode 100644
index 00000000000..104b08cd2a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr21101.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -funroll-loops -march=nocona" } */
+
+#include <mmintrin.h>
+
+int W;
+void f()
+{
+ int j;
+ int B, C;
+ unsigned char* S;
+ __m64 *T = (__m64 *) &W;
+
+ for (j = 0; j < 16; j++, T++)
+ {
+ T[0] = T[1] = _mm_set1_pi8(*S);
+ S += W;
+ }
+
+ C = 3 * B;
+
+ __m64 E = _mm_set_pi16(3 * B, 3 * B, 3 * B, 5 * B);
+ __m64 G = _mm_set1_pi16(3 * B);
+
+ for (j = 0; j < 16; j++)
+ {
+ __m64 R = _mm_set1_pi16(B + j * C);
+ R = _m_paddw(R, E);
+ R = _m_paddw(R, G);
+ T[0] = _mm_srai_pi16(R, 3);
+ }
+}
diff --git a/gcc/testsuite/gcc.target/mips/args-1.c b/gcc/testsuite/gcc.target/mips/args-1.c
new file mode 100644
index 00000000000..56def9488a3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/args-1.c
@@ -0,0 +1,35 @@
+/* Check that certain preprocessor macros are defined, and do some
+ consistency checks. */
+/* { dg-do compile } */
+
+const char *compiled_for = _MIPS_ARCH;
+const char *optimized_for = _MIPS_TUNE;
+
+#if __mips_fpr != 32 && __mips_fpr != 64
+#error Bad __mips_fpr
+#endif
+
+/* Test complementary macro pairs: exactly one of each pair
+ must be defined. */
+
+#if defined (_R3000) == defined (_R4000) && !defined (__sgi__)
+#error _R3000 / _R4000 mismatch
+#endif
+
+#if defined (__mips_hard_float) == defined (__mips_soft_float)
+#error __mips_hard_float / __mips_soft_float mismatch
+#endif
+
+#if defined (_MIPSEL) == defined (_MIPSEB)
+#error _MIPSEL / _MIPSEB mismatch
+#endif
+
+/* Check for __mips64 consistency. */
+
+#if defined (__mips64) != defined (_R4000) && !defined (__sgi__)
+#error __mips64 / _R4000 mismatch
+#endif
+
+#if defined (__mips64) && __mips != 3 && __mips != 4 && __mips != 64
+#error __mips64 / __mips mismatch
+#endif
diff --git a/gcc/testsuite/gcc.target/mips/args-2.c b/gcc/testsuite/gcc.target/mips/args-2.c
new file mode 100644
index 00000000000..192756525f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/args-2.c
@@ -0,0 +1,18 @@
+/* Check the _MIPSEB and _MIPSEL macros are accurate. */
+/* { dg-do run } */
+extern void abort (void);
+extern void exit (int);
+
+short foo = 1;
+int main ()
+{
+ char *p = (char *) &foo;
+
+#ifdef _MIPSEB
+ if (p[0] != 0 || p[1] != 1)
+#else
+ if (p[0] != 1 || p[1] != 0)
+#endif
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/mips/args-3.c b/gcc/testsuite/gcc.target/mips/args-3.c
new file mode 100644
index 00000000000..e91816f0806
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/args-3.c
@@ -0,0 +1,38 @@
+/* __mips, and related defines, guarantee that certain assembly
+ instructions can be used. Check a few examples. */
+/* { dg-do run } */
+extern void abort (void);
+extern void exit (int);
+
+typedef int int32 __attribute__ ((mode (SI)));
+typedef int int64 __attribute__ ((mode (DI)));
+int foo (float inf, int64 in64, int32 in32)
+{
+ int64 res64;
+ int32 res32;
+
+#if __mips != 1 && defined (__mips_hard_float)
+ __asm__ ("trunc.w.s %0, %1" : "=f" (res32) : "f" (inf));
+ if (res32 != 11)
+ abort ();
+#endif
+
+#if defined (__mips64)
+ __asm__ ("daddu %0, %1, %1" : "=r" (res64) : "r" (in64));
+ if (res64 != 50)
+ abort ();
+#endif
+
+#if (__mips == 4 || __mips == 32 || __mips == 64) && !defined (__mips16)
+ __asm__ ("move %0,%.\n\tmovn %0,%1,%2"
+ : "=&r" (res32) : "r" (in32), "r" (in64 != 0));
+ if (res32 != 60)
+ abort ();
+#endif
+}
+
+int main ()
+{
+ foo (11.4f, 25, 60);
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/mips/branch-1.c b/gcc/testsuite/gcc.target/mips/branch-1.c
new file mode 100644
index 00000000000..6b86dc04c2c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/branch-1.c
@@ -0,0 +1,11 @@
+/* We should implement these "if" statements using an "andi" instruction
+ followed by a branch on zero. */
+/* { dg-mips-options "-O2 -mno-mips16" } */
+void bar (void);
+void f1 (int x) { if (x & 4) bar (); }
+void f2 (int x) { if ((x >> 2) & 1) bar (); }
+void f3 (unsigned int x) { if (x & 0x10) bar (); }
+void f4 (unsigned int x) { if ((x >> 4) & 1) bar (); }
+/* { dg-final { scan-assembler "\tandi\t.*\tandi\t.*\tandi\t.*\tandi\t" } } */
+/* { dg-final { scan-assembler-not "\tsrl\t" } } */
+/* { dg-final { scan-assembler-not "\tsra\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/movcc-1.c b/gcc/testsuite/gcc.target/mips/movcc-1.c
new file mode 100644
index 00000000000..30a0aa7830c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/movcc-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -mips4" } */
+/* { dg-final { scan-assembler "movz" } } */
+/* { dg-final { scan-assembler "movn" } } */
+
+void ext_int (int);
+
+int
+sub1 (int i, int j, int k)
+{
+ ext_int (k ? i : j);
+}
+
+int
+sub2 (int i, int j, long l)
+{
+ ext_int (!l ? i : j);
+}
diff --git a/gcc/testsuite/gcc.target/mips/movcc-2.c b/gcc/testsuite/gcc.target/mips/movcc-2.c
new file mode 100644
index 00000000000..57c2c507ce7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/movcc-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -mips4" } */
+/* { dg-final { scan-assembler "movz" } } */
+/* { dg-final { scan-assembler "movn" } } */
+
+void ext_long (long);
+
+long
+sub4 (long i, long j, long k)
+{
+ ext_long (k ? i : j);
+}
+
+long
+sub5 (long i, long j, int k)
+{
+ ext_long (!k ? i : j);
+}
diff --git a/gcc/testsuite/gcc.target/mips/movcc-3.c b/gcc/testsuite/gcc.target/mips/movcc-3.c
new file mode 100644
index 00000000000..ad439f92293
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/movcc-3.c
@@ -0,0 +1,63 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -mips4 -mhard-float" } */
+/* { dg-final { scan-assembler "movt" } } */
+/* { dg-final { scan-assembler "movf" } } */
+/* { dg-final { scan-assembler "movz.s" } } */
+/* { dg-final { scan-assembler "movn.s" } } */
+/* { dg-final { scan-assembler "movt.s" } } */
+/* { dg-final { scan-assembler "movz.d" } } */
+/* { dg-final { scan-assembler "movn.d" } } */
+/* { dg-final { scan-assembler "movf.d" } } */
+
+void ext_int (int);
+void ext_long (long);
+void ext_float (float);
+void ext_double (double);
+
+int
+sub3 (int i, int j, float f)
+{
+ ext_int (f ? i : j);
+}
+
+long
+sub6 (long i, long j, float f)
+{
+ ext_long (!f ? i : j);
+}
+
+float
+sub7 (float f, float g, int i)
+{
+ ext_float (i ? f : g);
+}
+
+float
+sub8 (float f, float g, long l)
+{
+ ext_float (!l ? f : g);
+}
+
+float
+sub9 (float f, float g, float h)
+{
+ ext_float (h ? f : g);
+}
+
+double
+suba (double f, double g, int i)
+{
+ ext_double (i ? f : g);
+}
+
+double
+subb (double f, double g, long l)
+{
+ ext_double (!l ? f : g);
+}
+
+double
+subc (double f, double g, double h)
+{
+ ext_double (!h ? f : g);
+}
diff --git a/gcc/testsuite/gcc.target/mips/nmadd-1.c b/gcc/testsuite/gcc.target/mips/nmadd-1.c
new file mode 100644
index 00000000000..e027b07d6d7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nmadd-1.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -ffast-math -mips4 -mhard-float" } */
+/* { dg-final { scan-assembler "nmadd.s" } } */
+/* { dg-final { scan-assembler "nmadd.d" } } */
+/* { dg-final { scan-assembler "nmsub.s" } } */
+/* { dg-final { scan-assembler "nmsub.d" } } */
+
+float
+sub1 (float f, float g, float h)
+{
+ return -((f * g) + h);
+}
+
+double
+sub2 (double f, double g, double h)
+{
+ return -((f * g) + h);
+}
+
+float
+sub3 (float f, float g, float h)
+{
+ return -((f * g) - h);
+}
+
+double
+sub4 (double f, double g, double h)
+{
+ return -((f * g) - h);
+}
diff --git a/gcc/testsuite/gcc.target/mips/nmadd-2.c b/gcc/testsuite/gcc.target/mips/nmadd-2.c
new file mode 100644
index 00000000000..522407a5119
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nmadd-2.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -fno-fast-math -mips4 -mhard-float" } */
+/* { dg-final { scan-assembler "nmadd.s" } } */
+/* { dg-final { scan-assembler "nmadd.d" } } */
+/* { dg-final { scan-assembler "nmsub.s" } } */
+/* { dg-final { scan-assembler "nmsub.d" } } */
+
+float
+sub1 (float f, float g, float h)
+{
+ return -((f * g) + h);
+}
+
+double
+sub2 (double f, double g, double h)
+{
+ return -((f * g) + h);
+}
+
+float
+sub3 (float f, float g, float h)
+{
+ return -((f * g) - h);
+}
+
+double
+sub4 (double f, double g, double h)
+{
+ return -((f * g) - h);
+}
diff --git a/gcc/testsuite/gcc.target/mips/rsqrt-1.c b/gcc/testsuite/gcc.target/mips/rsqrt-1.c
new file mode 100644
index 00000000000..34e712422f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/rsqrt-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -ffast-math -mips4 -mhard-float" } */
+/* { dg-final { scan-assembler "rsqrt.d" } } */
+/* { dg-final { scan-assembler "rsqrt.s" } } */
+
+extern double sqrt(double);
+extern float sqrtf(float);
+
+double foo(double x)
+{
+ return 1.0/sqrt(x);
+}
+
+float bar(float x)
+{
+ return 1.0f/sqrtf(x);
+}
diff --git a/gcc/testsuite/gcc.target/mips/rsqrt-2.c b/gcc/testsuite/gcc.target/mips/rsqrt-2.c
new file mode 100644
index 00000000000..4bc3e7f134b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/rsqrt-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -ffast-math -mips4 -mhard-float" } */
+/* { dg-final { scan-assembler "rsqrt.d" } } */
+/* { dg-final { scan-assembler "rsqrt.s" } } */
+
+extern double sqrt(double);
+extern float sqrtf(float);
+
+double foo(double x)
+{
+ return sqrt(1.0/x);
+}
+
+float bar(float x)
+{
+ return sqrtf(1.0f/x);
+}
diff --git a/gcc/testsuite/gcc.target/mips/rsqrt-3.c b/gcc/testsuite/gcc.target/mips/rsqrt-3.c
new file mode 100644
index 00000000000..76cee835eb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/rsqrt-3.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -mips4 -mhard-float" } */
+/* { dg-final { scan-assembler-not "rsqrt.d" } } */
+/* { dg-final { scan-assembler-not "rsqrt.s" } } */
+
+extern double sqrt(double);
+extern float sqrtf(float);
+
+double foo(double x)
+{
+ return 1.0/sqrt(x);
+}
+
+double bar(double x)
+{
+ return sqrt(1.0/x);
+}
+
+float foof(float x)
+{
+ return 1.0f/sqrtf(x);
+}
+
+float barf(float x)
+{
+ return sqrtf(1.0f/x);
+}
diff --git a/gcc/testsuite/gcc.target/mips/vr-mult-1.c b/gcc/testsuite/gcc.target/mips/vr-mult-1.c
new file mode 100644
index 00000000000..47d639131b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/vr-mult-1.c
@@ -0,0 +1,7 @@
+/* Make sure that mul/addu is preferred over mtlo/macc and that mul/subu
+ is preferred over mtlo/msac. */
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -march=vr5400" } */
+int f1 (int a, int b, int c) { return a + b * c; }
+int f2 (int a, int b, int c) { return a - b * c; }
+/* { dg-final { scan-assembler "\tmul\t.*\tmul\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/vr-mult-2.c b/gcc/testsuite/gcc.target/mips/vr-mult-2.c
new file mode 100644
index 00000000000..9112ed08c82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/vr-mult-2.c
@@ -0,0 +1,7 @@
+/* Make sure that mul/addu is preferred over mtlo/macc and that mul/subu
+ is preferred over mtlo/msac. */
+/* { dg-do compile } */
+/* { dg-mips-options "-O2 -march=vr5500" } */
+int f1 (int a, int b, int c) { return a + b * c; }
+int f2 (int a, int b, int c) { return a - b * c; }
+/* { dg-final { scan-assembler "\tmul\t.*\tmul\t" } } */
diff --git a/gcc/testsuite/gfortran.dg/common_5.f b/gcc/testsuite/gfortran.dg/common_5.f
new file mode 100644
index 00000000000..d4b9614d6fb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/common_5.f
@@ -0,0 +1,10 @@
+C { dg-do compile }
+C PR 20059
+C Check that the warning for padding works correctly.
+ SUBROUTINE PLOTZ
+ IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+ COMMON /CCPOOL/ RMIN,RMAX,ZMIN,ZMAX,IMIN,JMIN,IMAX,JMAX,NFLOP, ! { dg-warning "Padding" }
+ $ HTP
+C
+ RETURN
+ END
diff --git a/gcc/testsuite/gfortran.dg/ichar_1.f90 b/gcc/testsuite/gfortran.dg/ichar_1.f90
new file mode 100644
index 00000000000..e63b57a8cf8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ichar_1.f90
@@ -0,0 +1,50 @@
+! { dg-do compile }
+! PR20879
+! Check that we reject expressions longer than one character for the
+! ICHAR and IACHAR intrinsics.
+
+! Assumed length variables are special because the frontend doesn't have
+! an expression for their length
+subroutine test (c)
+ character(len=*) :: c
+ integer i
+ i = ichar(c)
+ i = ichar(c(2:))
+ i = ichar(c(:1))
+end subroutine
+
+program ichar_1
+ integer i
+ integer, parameter :: j = 2
+ character(len=8) :: c = 'abcd'
+ character(len=1) :: g1(2)
+ character(len=1) :: g2(2,2)
+ character*1, parameter :: s1 = 'e'
+ character*2, parameter :: s2 = 'ef'
+
+ if (ichar(c(3:3)) /= 97) call abort
+ if (ichar(c(:1)) /= 97) call abort
+ if (ichar(c(j:j)) /= 98) call abort
+ if (ichar(s1) /= 101) call abort
+ if (ichar('f') /= 102) call abort
+ g1(1) = 'a'
+ if (ichar(g1(1)) /= 97) call abort
+ if (ichar(g1(1)(:)) /= 97) call abort
+ g2(1,1) = 'a'
+ if (ichar(g2(1,1)) /= 97) call abort
+
+ i = ichar(c) ! { dg-error "must be of length one" "" }
+ i = ichar(c(:)) ! { dg-error "must be of length one" "" }
+ i = ichar(s2) ! { dg-error "must be of length one" "" }
+ i = ichar(c(1:2)) ! { dg-error "must be of length one" "" }
+ i = ichar(c(1:)) ! { dg-error "must be of length one" "" }
+ i = ichar('abc') ! { dg-error "must be of length one" "" }
+
+ ! ichar and iachar use the same checking routines. DO a couple of tests to
+ ! make sure it's not totally broken.
+
+ if (ichar(c(3:3)) /= 97) call abort
+ i = ichar(c) ! { dg-error "must be of length one" "" }
+
+ call test(g1(1))
+end program ichar_1
diff --git a/gcc/testsuite/gfortran.dg/namelist_11.f b/gcc/testsuite/gfortran.dg/namelist_11.f
new file mode 100644
index 00000000000..4145a906a2b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_11.f
@@ -0,0 +1,55 @@
+c { dg-do run }
+c This program tests: namelist comment, a blank line before the nameilist name, the namelist name,
+c a scalar qualifier, various combinations of space, comma and lf delimiters, f-formats, e-formats
+c a blank line within the data read, nulls, a range qualifier, a new object name before end of data
+c and an integer read. It also tests that namelist output can be re-read by namelist input.
+c provided by Paul Thomas - pault@gcc.gnu.org
+
+ program namelist_1
+
+ REAL*4 x(10)
+ REAL*8 xx
+ integer ier
+ namelist /mynml/ x, xx
+
+ do i = 1 , 10
+ x(i) = -1
+ end do
+ x(6) = 6.0
+ x(10) = 10.0
+ xx = 0d0
+
+ open (10,status="scratch")
+ write (10, *) "!mynml"
+ write (10, *) ""
+ write (10, *) "&gf /"
+ write (10, *) "&mynml x(7) =+99.0e0 x=1.0, 2.0 ,"
+ write (10, *) " 2*3.0, ,, 7.0e0,+0.08e+02 !comment"
+ write (10, *) ""
+ write (10, *) " 9000e-3 x(4:5)=4 ,5 "
+ write (10, *) " x=,,3.0, xx=10d0 /"
+ rewind (10)
+
+ read (10, nml=mynml, IOSTAT=ier)
+ if (ier.ne.0) call abort
+ rewind (10)
+
+ do i = 1 , 10
+ if ( abs( x(i) - real(i) ) .gt. 1e-8 ) call abort
+ end do
+ if ( abs( xx - 10d0 ) .gt. 1e-8 ) call abort
+
+ write (10, nml=mynml, iostat=ier)
+ if (ier.ne.0) call abort
+ rewind (10)
+
+ read (10, NML=mynml, IOSTAT=ier)
+ if (ier.ne.0) call abort
+ close (10)
+
+ do i = 1 , 10
+ if ( abs( x(i) - real(i) ) .gt. 1e-8 ) call abort
+ end do
+ if ( abs( xx - 10d0 ) .gt. 1e-8 ) call abort
+
+ end program
diff --git a/gcc/testsuite/gfortran.dg/namelist_12.f b/gcc/testsuite/gfortran.dg/namelist_12.f
new file mode 100644
index 00000000000..e6d122463f1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_12.f
@@ -0,0 +1,56 @@
+c{ dg-do run }
+c This program repeats many of the same tests as test_nml_1 but for integer instead of real.
+c It also tests repeat nulls, comma delimited character read, a triplet qualifier, a range with
+c and assumed start, a quote delimited string, a qualifier with an assumed end and a fully
+c explicit range. It also tests that integers and characters are successfully read back by
+c namelist.
+c Provided by Paul Thomas - pault@gcc.gnu.org
+
+ program namelist_12
+
+ integer*4 x(10)
+ integer*8 xx
+ integer ier
+ character*10 ch , check
+ namelist /mynml/ x, xx, ch
+
+c set debug = 0 or 1 in the namelist! (line 33)
+
+ do i = 1 , 10
+ x(i) = -1
+ end do
+ x(6) = 6
+ x(10) = 10
+ xx = 0
+ ch ="zzzzzzzzzz"
+ check="abcdefghij"
+
+ open (10,status="scratch")
+ write (10, *) "!mynml"
+ write (10, *) " "
+ write (10, *) "&mynml x(7) =+99 x=1, 2 ,"
+ write (10, *) " 2*3, ,, 2* !comment"
+ write (10, *) " 9 ch=qqqdefghqq , x(8:7:-1) = 8 , 7"
+ write (10, *) " ch(:3) =""abc"","
+ write (10, *) " ch(9:)='ij' x(4:5)=4 ,5 xx = 42/"
+ rewind (10)
+
+ read (10, nml=mynml, IOSTAT=ier)
+ if (ier.ne.0) call abort
+ rewind (10)
+
+ write (10, nml=mynml, iostat=ier)
+ if (ier.ne.0) call abort
+ rewind (10)
+
+ read (10, NML=mynml, IOSTAT=ier)
+ if (ier.ne.0) call abort
+ close (10)
+
+ do i = 1 , 10
+ if ( abs( x(i) - i ) .ne. 0 ) call abort ()
+ if ( ch(i:i).ne.check(I:I) ) call abort
+ end do
+ if (xx.ne.42) call abort ()
+
+ end program
diff --git a/gcc/testsuite/gfortran.dg/namelist_13.f90 b/gcc/testsuite/gfortran.dg/namelist_13.f90
new file mode 100644
index 00000000000..5b7122ca302
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_13.f90
@@ -0,0 +1,38 @@
+!{ dg-do run }
+! Tests simple derived types.
+! Provided by Paul Thomas - pault@gcc.gnu.org
+
+program namelist_13
+
+ type :: yourtype
+ integer, dimension(2) :: yi = (/8,9/)
+ real, dimension(2) :: yx = (/80.,90./)
+ character(len=2) :: ych = "xx"
+ end type yourtype
+
+ type :: mytype
+ integer, dimension(2) :: myi = (/800,900/)
+ real, dimension(2) :: myx = (/8000.,9000./)
+ character(len=2) :: mych = "zz"
+ type(yourtype) :: my_yourtype
+ end type mytype
+
+ type(mytype) :: z
+ integer :: ier
+ integer :: zeros(10)
+ namelist /mynml/ zeros, z
+
+ zeros = 0
+ zeros(5) = 1
+
+ open(10,status="scratch")
+ write (10, nml=mynml, iostat=ier)
+ if (ier.ne.0) call abort
+
+ rewind (10)
+ read (10, NML=mynml, IOSTAT=ier)
+ if (ier.ne.0) call abort
+ close (10)
+
+end program namelist_13
+
diff --git a/gcc/testsuite/gfortran.dg/namelist_14.f90 b/gcc/testsuite/gfortran.dg/namelist_14.f90
new file mode 100644
index 00000000000..d22040f8a2a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_14.f90
@@ -0,0 +1,94 @@
+!{ dg-do run }
+! Tests various combinations of intrinsic types, derived types, arrays,
+! dummy arguments and common to check nml_get_addr_expr in trans-io.c.
+! See comments below for selection.
+! provided by Paul Thomas - pault@gcc.gnu.org
+
+module global
+ type :: mt
+ integer :: ii(4)
+ end type mt
+end module global
+
+program namelist_14
+ use global
+ common /myc/ cdt
+ integer :: i(2) = (/101,201/)
+ type(mt) :: dt(2)
+ type(mt) :: cdt
+ real*8 :: pi = 3.14159_8
+ character*10 :: chs="singleton"
+ character*10 :: cha(2)=(/"first ","second "/)
+
+ dt = mt ((/99,999,9999,99999/))
+ cdt = mt ((/-99,-999,-9999,-99999/))
+ call foo (i,dt,pi,chs,cha)
+
+contains
+
+ logical function dttest (dt1, dt2)
+ use global
+ type(mt) :: dt1
+ type(mt) :: dt2
+ dttest = any(dt1%ii == dt2%ii)
+ end function dttest
+
+
+ subroutine foo (i, dt, pi, chs, cha)
+ use global
+ common /myc/ cdt
+ real *8 :: pi !local real scalar
+ integer :: i(2) !dummy arg. array
+ integer :: j(2) = (/21, 21/) !equivalenced array
+ integer :: jj ! -||- scalar
+ integer :: ier
+ type(mt) :: dt(2) !dummy arg., derived array
+ type(mt) :: dtl(2) !in-scope derived type array
+ type(mt) :: dts !in-scope derived type
+ type(mt) :: cdt !derived type in common block
+ character*10 :: chs !dummy arg. character var.
+ character*10 :: cha(:) !dummy arg. character array
+ character*10 :: chl="abcdefg" !in-scope character var.
+ equivalence (j,jj)
+ namelist /z/ dt, dtl, dts, cdt, j, jj, i, pi, chs, chl, cha
+
+ dts = mt ((/1, 2, 3, 4/))
+ dtl = mt ((/41, 42, 43, 44/))
+
+ open (10, status = "scratch")
+ write (10, nml = z, iostat = ier)
+ if (ier /= 0 ) call abort()
+ rewind (10)
+
+ i = 0
+ j = 0
+ jj = 0
+ pi = 0
+ dt = mt ((/0, 0, 0, 0/))
+ dtl = mt ((/0, 0, 0, 0/))
+ dts = mt ((/0, 0, 0, 0/))
+ cdt = mt ((/0, 0, 0, 0/))
+ chs = ""
+ cha = ""
+ chl = ""
+
+ read (10, nml = z, iostat = ier)
+ if (ier /= 0 ) call abort()
+ close (10)
+
+ if (.not.(dttest (dt(1), mt ((/99,999,9999,99999/))) .and. &
+ dttest (dt(2), mt ((/99,999,9999,99999/))) .and. &
+ dttest (dtl(1), mt ((/41, 42, 43, 44/))) .and. &
+ dttest (dtl(2), mt ((/41, 42, 43, 44/))) .and. &
+ dttest (dts, mt ((/1, 2, 3, 4/))) .and. &
+ dttest (cdt, mt ((/-99,-999,-9999,-99999/))) .and. &
+ all (j ==(/21, 21/)) .and. &
+ all (i ==(/101, 201/)) .and. &
+ (pi == 3.14159_8) .and. &
+ (chs == "singleton") .and. &
+ (chl == "abcdefg") .and. &
+ (cha(1)(1:10) == "first ") .and. &
+ (cha(2)(1:10) == "second "))) call abort ()
+
+ end subroutine foo
+end program namelist_14
diff --git a/gcc/testsuite/gfortran.dg/namelist_15.f90 b/gcc/testsuite/gfortran.dg/namelist_15.f90
new file mode 100644
index 00000000000..8c64ab0ea22
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_15.f90
@@ -0,0 +1,58 @@
+!{ dg-do run }
+! Tests arrays of derived types containing derived type arrays whose
+! components are character arrays - exercises object name parser in
+! list_read.c. Checks that namelist output can be reread.
+! provided by Paul Thomas - pault@gcc.gnu.org
+
+module global
+ type :: mt
+ character(len=2) :: ch(2) = (/"aa","bb"/)
+ end type mt
+ type :: bt
+ integer :: i(2) = (/1,2/)
+ type(mt) :: m(2)
+ end type bt
+end module global
+
+program namelist_15
+ use global
+ type(bt) :: x(2)
+
+ namelist /mynml/ x
+
+ open (10, status = "scratch")
+ write (10, '(A)') "&MYNML"
+ write (10, '(A)') " x = 3, 4, 'dd', 'ee', 'ff', 'gg',"
+ write (10, '(A)') " 4, 5, 'hh', 'ii', 'jj', 'kk',"
+ write (10, '(A)') " x%i = , ,-3, -4"
+ write (10, '(A)') " x(2)%m(1)%ch(2) =q,"
+ write (10, '(A)') " x(2)%m(2)%ch(1)(1) =w,"
+ write (10, '(A)') " x%m%ch(:)(2) =z z z z z z z z,"
+ write (10, '(A)') "&end"
+
+ rewind (10)
+ read (10, nml = mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ close (10)
+
+ open (10, status = "scratch")
+ write (10, nml = mynml)
+ rewind (10)
+ read (10, nml = mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ close(10)
+
+ if (.not. ((x(1)%i(1) == 3) .and. &
+ (x(1)%i(2) == 4) .and. &
+ (x(1)%m(1)%ch(1) == "dz") .and. &
+ (x(1)%m(1)%ch(2) == "ez") .and. &
+ (x(1)%m(2)%ch(1) == "fz") .and. &
+ (x(1)%m(2)%ch(2) == "gz") .and. &
+ (x(2)%i(1) == -3) .and. &
+ (x(2)%i(2) == -4) .and. &
+ (x(2)%m(1)%ch(1) == "hz") .and. &
+ (x(2)%m(1)%ch(2) == "qz") .and. &
+ (x(2)%m(2)%ch(1) == "wz") .and. &
+ (x(2)%m(2)%ch(2) == "kz"))) call abort ()
+
+end program namelist_15
diff --git a/gcc/testsuite/gfortran.dg/namelist_16.f90 b/gcc/testsuite/gfortran.dg/namelist_16.f90
new file mode 100644
index 00000000000..c6eb8f75595
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_16.f90
@@ -0,0 +1,29 @@
+!{ dg-do run }
+! Tests namelist on complex variables
+! provided by Paul Thomas - pault@gcc.gnu.org
+program namelist_16
+ complex(kind=8), dimension(2) :: z
+ namelist /mynml/ z
+ z = (/(1.0,2.0), (3.0,4.0)/)
+
+ open (10, status = "scratch")
+ write (10, '(A)') "&mynml z(1)=(5.,6.) z(2)=(7.,8.) /"
+ rewind (10)
+
+ read (10, mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ close (10)
+
+ open (10, status = "scratch")
+ write (10, mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ rewind (10)
+
+ z = (/(1.0,2.0), (3.0,4.0)/)
+ read (10, mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ close (10)
+
+ if ((z(1) .ne. (5.0,6.0)) .or. (z(2) .ne. (7.0,8.0))) call abort ()
+
+end program namelist_16
diff --git a/gcc/testsuite/gfortran.dg/namelist_17.f90 b/gcc/testsuite/gfortran.dg/namelist_17.f90
new file mode 100644
index 00000000000..e3eac5210bf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_17.f90
@@ -0,0 +1,30 @@
+!{ dg-do run }
+! Tests namelist on logical variables
+! provided by Paul Thomas - pault@gcc.gnu.org
+
+program namelist_17
+ logical, dimension(2) :: l
+ namelist /mynml/ l
+ l = (/.true., .false./)
+
+ open (10, status = "scratch")
+ write (10, '(A)') "&mynml l = F T /"
+ rewind (10)
+
+ read (10, mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ close (10)
+
+ open (10, status = "scratch")
+ write (10, mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ rewind (10)
+
+ l = (/.true., .false./)
+ read (10, mynml, iostat = ier)
+ if (ier .ne. 0) call abort ()
+ close (10)
+
+ if (l(1) .or. (.not.l(2))) call abort ()
+
+end program namelist_17
diff --git a/gcc/testsuite/gfortran.dg/namelist_18.f90 b/gcc/testsuite/gfortran.dg/namelist_18.f90
new file mode 100644
index 00000000000..eba8b6bc573
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_18.f90
@@ -0,0 +1,37 @@
+!{ dg-do run }
+! Tests character delimiters for namelist write
+! provided by Paul Thomas - pault@gcc.gnu.org
+
+program namelist_18
+ character*3 :: ch = "foo"
+ character*80 :: buffer
+ namelist /mynml/ ch
+
+ open (10, status = "scratch")
+ write (10, mynml)
+ rewind (10)
+ read (10, '(a)', iostat = ier) buffer
+ read (10, '(a)', iostat = ier) buffer
+ if (ier .ne. 0) call abort ()
+ close (10)
+ If ((buffer(5:5) /= "f") .or. (buffer(9:9) /= " ")) call abort ()
+
+ open (10, status = "scratch", delim ="quote")
+ write (10, mynml)
+ rewind (10)
+ read (10, '(a)', iostat = ier) buffer
+ read (10, '(a)', iostat = ier) buffer
+ if (ier .ne. 0) call abort ()
+ close (10)
+ If ((buffer(5:5) /= """") .or. (buffer(9:9) /= """")) call abort ()
+
+ open (10, status = "scratch", delim ="apostrophe")
+ write (10, mynml)
+ rewind (10)
+ read (10, '(a)', iostat = ier) buffer
+ read (10, '(a)', iostat = ier) buffer
+ if (ier .ne. 0) call abort ()
+ close (10)
+ If ((buffer(5:5) /= "'") .or. (buffer(9:9) /= "'")) call abort ()
+
+end program namelist_18
diff --git a/gcc/testsuite/gfortran.dg/namelist_19.f90 b/gcc/testsuite/gfortran.dg/namelist_19.f90
new file mode 100644
index 00000000000..c06abf5295b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_19.f90
@@ -0,0 +1,135 @@
+!{ dg-do run }
+! Test namelist error trapping.
+! provided by Paul Thomas - pault@gcc.gnu.org
+
+program namelist_19
+ character*80 wrong, right
+
+! "=" before any object name
+ wrong = "&z = i = 1,2 /"
+ right = "&z i = 1,2 /"
+ call test_err(wrong, right)
+
+! &* instead of &end for termination
+ wrong = "&z i = 1,2 &xxx"
+ right = "&z i = 1,2 &end"
+ call test_err(wrong, right)
+
+! bad data
+ wrong = "&z i = 1,q /"
+ right = "&z i = 1,2 /"
+ call test_err(wrong, right)
+
+! object name not matched
+ wrong = "&z j = 1,2 /"
+ right = "&z i = 1,2 /"
+ call test_err(wrong, right)
+
+! derived type component for intrinsic type
+ wrong = "&z i%j = 1,2 /"
+ right = "&z i = 1,2 /"
+ call test_err(wrong, right)
+
+! step other than 1 for substring qualifier
+ wrong = "&z ch(1:2:2) = 'a'/"
+ right = "&z ch(1:2) = 'ab' /"
+ call test_err(wrong, right)
+
+! qualifier for scalar
+ wrong = "&z k(2) = 1 /"
+ right = "&z k = 1 /"
+ call test_err(wrong, right)
+
+! no '=' after object name
+ wrong = "&z i 1,2 /"
+ right = "&z i = 1,2 /"
+ call test_err(wrong, right)
+
+! repeat count too large
+ wrong = "&z i = 3*2 /"
+ right = "&z i = 2*2 /"
+ call test_err(wrong, right)
+
+! too much data
+ wrong = "&z i = 1 2 3 /"
+ right = "&z i = 1 2 /"
+ call test_err(wrong, right)
+
+! no '=' after object name
+ wrong = "&z i 1,2 /"
+ right = "&z i = 1,2 /"
+ call test_err(wrong, right)
+
+! bad number of index fields
+ wrong = "&z i(1,2) = 1 /"
+ right = "&z i(1) = 1 /"
+ call test_err(wrong, right)
+
+! bad character in index field
+ wrong = "&z i(x) = 1 /"
+ right = "&z i(1) = 1 /"
+ call test_err(wrong, right)
+
+! null index field
+ wrong = "&z i( ) = 1 /"
+ right = "&z i(1) = 1 /"
+ call test_err(wrong, right)
+
+! null index field
+ wrong = "&z i(1::) = 1 2/"
+ right = "&z i(1:2:1) = 1 2 /"
+ call test_err(wrong, right)
+
+! null index field
+ wrong = "&z i(1:2:) = 1 2/"
+ right = "&z i(1:2:1) = 1 2 /"
+ call test_err(wrong, right)
+
+! index out of range
+ wrong = "&z i(10) = 1 /"
+ right = "&z i(1) = 1 /"
+ call test_err(wrong, right)
+
+! index out of range
+ wrong = "&z i(0:1) = 1 /"
+ right = "&z i(1:1) = 1 /"
+ call test_err(wrong, right)
+
+! bad range
+ wrong = "&z i(1:2:-1) = 1 2 /"
+ right = "&z i(1:2: 1) = 1 2 /"
+ call test_err(wrong, right)
+
+! bad range
+ wrong = "&z i(2:1: 1) = 1 2 /"
+ right = "&z i(2:1:-1) = 1 2 /"
+ call test_err(wrong, right)
+
+contains
+ subroutine test_err(wrong, right)
+ character*80 wrong, right
+ integer :: i(2) = (/0, 0/)
+ integer :: k =0
+ character*2 :: ch = " "
+ namelist /z/ i, k, ch
+
+! Check that wrong namelist input gives an error
+
+ open (10, status = "scratch")
+ write (10, '(A)') wrong
+ rewind (10)
+ read (10, z, iostat = ier)
+ close(10)
+ if (ier == 0) call abort ()
+
+! Check that right namelist input gives no error
+
+ open (10, status = "scratch")
+ write (10, '(A)') right
+ rewind (10)
+ read (10, z, iostat = ier)
+ close(10)
+ if (ier /= 0) call abort ()
+ end subroutine test_err
+
+end program namelist_19
diff --git a/gcc/testsuite/gfortran.dg/namelist_2.f90 b/gcc/testsuite/gfortran.dg/namelist_2.f90
new file mode 100644
index 00000000000..b92e459415c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_2.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! Check that variable with intent(in) cannot be a member of a namelist
+subroutine namelist_2(x)
+ integer,intent(in) :: x
+ namelist /n/ x
+ read(*,n) ! { dg-error "is INTENT" "" }
+end subroutine namelist_2
diff --git a/gcc/testsuite/gfortran.dg/namelist_20.f90 b/gcc/testsuite/gfortran.dg/namelist_20.f90
new file mode 100644
index 00000000000..155cf6f8ed2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_20.f90
@@ -0,0 +1,35 @@
+!{ dg-do run }
+! Tests namelist io for an explicit shape array with negative bounds
+! provided by Paul Thomas - pault@gcc.gnu.org
+
+program namelist_20
+ integer, dimension (-4:-2) :: x
+ integer :: i, ier
+ namelist /a/ x
+
+ open (10, status = "scratch")
+ write (10, '(A)') "&a x(-5)=0 /" !-ve index below lbound
+ write (10, '(A)') "&a x(-1)=0 /" !-ve index above ubound
+ write (10, '(A)') "&a x(1:2)=0 /" !+ve indices
+ write (10, '(A)') "&a x(-4:-2)= -4,-3,-2 /" !correct
+ write (10, '(A)') " "
+ rewind (10)
+
+ ier=0
+ read(10, a, iostat=ier)
+ if (ier == 0) call abort ()
+ ier=0
+ read(10, a, iostat=ier)
+ if (ier == 0) call abort ()
+ ier=0
+ read(10, a, iostat=ier)
+ if (ier == 0) call abort ()
+
+ ier=0
+ read(10, a, iostat=ier)
+ if (ier /= 0) call abort ()
+ do i = -4,-2
+ if (x(i) /= i) call abort ()
+ end do
+
+end program namelist_20
diff --git a/gcc/testsuite/gfortran.dg/namelist_3.f90 b/gcc/testsuite/gfortran.dg/namelist_3.f90
new file mode 100644
index 00000000000..68cc7d558ff
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_3.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! Check that a pointer cannot be a member of a namelist
+program namelist_3
+ integer,pointer :: x
+ allocate (x)
+ namelist /n/ x ! { dg-error "NAMELIST attribute conflicts with POINTER attribute" "" }
+end program namelist_3
diff --git a/gcc/testsuite/gfortran.dg/nested_reshape.f90 b/gcc/testsuite/gfortran.dg/nested_reshape.f90
new file mode 100644
index 00000000000..d71e4ecc150
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/nested_reshape.f90
@@ -0,0 +1,12 @@
+! { dg-do run }
+! PR 20436: This used to give a runtime error.
+program nested_reshape
+ implicit none
+ real :: k(8,2)
+ real :: o(8,2)
+
+ k = reshape((/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0, &
+ 9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0/), (/8,2/))
+
+ o = reshape(reshape(k, (/2,8/), order=(/2,1/)), (/8,2/))
+end program
diff --git a/gcc/testsuite/gfortran.dg/pr12884.f b/gcc/testsuite/gfortran.dg/pr12884.f
new file mode 100644
index 00000000000..425604c02c5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr12884.f
@@ -0,0 +1,25 @@
+c { dg-do run }
+c pr 12884
+c test namelist with input file containg / before namelist. Also checks
+c non-standard use of $ instead of &
+c Based on example provided by jean-pierre.flament@univ-lille1.fr
+
+ program pr12884
+ integer ispher,nosym,runflg,noprop
+ namelist /cntrl/ ispher,nosym,runflg,noprop
+ ispher = 0
+ nosym = 0
+ runflg = 0
+ noprop = 0
+ open (10, status = "scratch")
+ write (10, '(A)') " $FILE"
+ write (10, '(A)') " pseu dir/file"
+ write (10, '(A)') " $END"
+ write (10, '(A)') " $cntrl ispher=1,nosym=2,"
+ write (10, '(A)') " runflg=3,noprop=4,$END"
+ write (10, '(A)')"/"
+ rewind (10)
+ read (10, cntrl)
+ if ((ispher.ne.1).or.(nosym.ne.2).or.(runflg.ne.3).or.
+ & (noprop.ne.4)) call abort ()
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr16861.f90 b/gcc/testsuite/gfortran.dg/pr16861.f90
new file mode 100644
index 00000000000..4a73edaf4f0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr16861.f90
@@ -0,0 +1,32 @@
+! PR fortran/16861
+! { dg-do run }
+module foo
+ integer :: i
+end module foo
+
+module bar
+contains
+ subroutine baz(j)
+ use foo
+ integer, dimension(i) :: j
+ integer :: n
+
+ do n = 1, i
+ if (j(n) /= n**2) call abort
+ end do
+ end subroutine baz
+end module bar
+
+subroutine quus()
+ use foo
+ use bar
+
+ i = 2
+ call baz ((/1,4/))
+ i = 7
+ call baz ((/1,4,9,16,25,36,49/))
+end subroutine quus
+
+program test
+ call quus
+end program test
diff --git a/gcc/testsuite/gfortran.dg/pr17285.f90 b/gcc/testsuite/gfortran.dg/pr17285.f90
new file mode 100644
index 00000000000..58aee327aef
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr17285.f90
@@ -0,0 +1,25 @@
+! { dg-do run }
+! pr 17285
+! Test that namelist can read its own output.
+! At the same time, check arrays and different terminations
+! Based on example provided by paulthomas2@wanadoo.fr
+
+program pr17285
+ implicit none
+ integer, dimension(10) :: number = 42
+ integer :: ctr, ierr
+ namelist /mynml/ number
+ open (10, status = "scratch")
+ write (10,'(A)') &
+ "&mynml number(:)=42,42,42,42,42,42,42,42,42,42,/ "
+ write (10,mynml)
+ write (10,'(A)') "&mynml number(1:10)=10*42 &end"
+ rewind (10)
+ do ctr = 1,3
+ number = 0
+ read (10, nml = mynml, iostat = ierr)
+ if ((ierr /= 0) .or. (any (number /= 42))) &
+ call abort ()
+ end do
+ close(10)
+end program pr17285
diff --git a/gcc/testsuite/gfortran.dg/pr17472.f b/gcc/testsuite/gfortran.dg/pr17472.f
new file mode 100644
index 00000000000..4a1ecd937be
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr17472.f
@@ -0,0 +1,12 @@
+c { dg-do run }
+c pr 17472
+c test namelist handles arrays
+c Based on example provided by thomas.koenig@online.de
+
+ integer a(10), ctr
+ data a / 1,2,3,4,5,6,7,8,9,10 /
+ namelist /ints/ a
+ do ctr = 1,10
+ if (a(ctr).ne.ctr) call abort ()
+ end do
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr18122.f90 b/gcc/testsuite/gfortran.dg/pr18122.f90
new file mode 100644
index 00000000000..3907f0ae158
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr18122.f90
@@ -0,0 +1,45 @@
+! { dg-do run }
+! test namelist with scalars and arrays.
+! Based on example provided by thomas.koenig@online.de
+
+program sechs_w
+ implicit none
+
+ integer, parameter :: dr=selected_real_kind(15)
+
+ integer, parameter :: nkmax=6
+ real (kind=dr) :: rb(nkmax)
+ integer :: z
+
+ real (kind=dr) :: dg
+ real (kind=dr) :: a
+ real (kind=dr) :: da
+ real (kind=dr) :: delta
+ real (kind=dr) :: s,t
+ integer :: nk
+ real (kind=dr) alpha0
+
+ real (kind=dr) :: phi, phi0, rad, rex, zk, z0, drdphi, dzdphi
+
+ namelist /schnecke/ z, dg, a, t, delta, s, nk, rb, alpha0
+
+ open (10,status="scratch")
+ write (10, *) "&SCHNECKE"
+ write (10, *) " z=1,"
+ write (10, *) " dg=58.4,"
+ write (10, *) " a=48.,"
+ write (10, *) " delta=0.4,"
+ write (10, *) " s=0.4,"
+ write (10, *) " nk=6,"
+ write (10, *) " rb=60, 0, 40,"
+ write (10, *) " alpha0=20.,"
+ write (10, *) "/"
+
+ rewind (10)
+ read (10,schnecke)
+ close (10)
+ if ((z /= 1) .or. (dg /= 58.4_dr) .or. (a /= 48.0_dr) .or. &
+ (delta /= 0.4_dr).or. (s /= 0.4_dr) .or. (nk /= 6) .or. &
+ (rb(1) /= 60._dr).or. (rb(2) /= 0.0_dr).or. (rb(3) /=40.0_dr).or. &
+ (alpha0 /= 20.0_dr)) call abort ()
+end program sechs_w
diff --git a/gcc/testsuite/gfortran.dg/pr18210.f90 b/gcc/testsuite/gfortran.dg/pr18210.f90
new file mode 100644
index 00000000000..60959841378
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr18210.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+! Names in upper case and object names starting column 2
+! Based on example provided by thomas.koenig@online.de
+
+program pr18210
+
+ real :: a
+ character*80 :: buffer
+ namelist /foo/ a
+
+ a = 1.4
+ open (10, status = "scratch")
+ write (10,foo)
+ rewind (10)
+ read (10, '(a)') buffer
+ if (buffer(2:4) /= "FOO") call abort ()
+ read (10, '(a)') buffer
+ if (buffer(1:2) /= " A") call abort ()
+ close (10)
+
+end program pr18210
diff --git a/gcc/testsuite/gfortran.dg/pr18392.f90 b/gcc/testsuite/gfortran.dg/pr18392.f90
new file mode 100644
index 00000000000..de156f5a5fd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr18392.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+! pr 18392
+! test namelist with derived types
+! Based on example provided by thomas.koenig@online.de
+
+program pr18392
+ implicit none
+ type foo
+ integer a
+ real b
+ end type foo
+ type(foo) :: a
+ namelist /nl/ a
+ open (10, status="scratch")
+ write (10,*) " &NL"
+ write (10,*) " A%A = 10,"
+ write (10,*) "/"
+ rewind (10)
+ read (10,nl)
+ close (10)
+ IF (a%a /= 10.0) call abort ()
+end program pr18392
diff --git a/gcc/testsuite/gfortran.dg/pr19216.f b/gcc/testsuite/gfortran.dg/pr19216.f
new file mode 100644
index 00000000000..966d893606a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr19216.f
@@ -0,0 +1,18 @@
+! PR libfortran/19216
+! {dg-do run}
+ integer dat(3), i, j
+ data dat / 3,2,1 /
+
+ open (20, status='scratch')
+ write (20,'(A)') '/ 10 20 30'
+ write (20,'(A)') '1 2 3 4'
+ write (20,'(A)') '5 6 7 8'
+ rewind (20)
+ read (20,*) (dat(i), i=1,3)
+ if (dat(1).ne.3 .or. dat(2).ne.2 .or. dat(3).ne.1) call abort
+ read (20,*) I,J
+ if (i .ne. 1 .or. j .ne. 2) call abort
+ read (20,*) I,J
+ if (i .ne. 5 .or. j .ne. 6) call abort
+ close(20)
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr19467.f90 b/gcc/testsuite/gfortran.dg/pr19467.f90
new file mode 100644
index 00000000000..ab4fa99c40b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr19467.f90
@@ -0,0 +1,18 @@
+! { dg-do run }
+! pr 19467
+! test namelist with character arrays
+! Based on example provided by paulthomas2@wanadoo.fr
+
+program pr19467
+ implicit none
+ integer :: ier
+ character(len=2) :: ch(2)
+ character(len=2) :: dh(2)=(/"aa","bb"/)
+ namelist /a/ ch
+ open (10, status = "scratch")
+ write (10, *) "&A ch = 'aa' , 'bb' /"
+ rewind (10)
+ READ (10,nml=a, iostat = ier)
+ close (10)
+ if ((ier /= 0) .or. (any (ch /= dh))) call abort ()
+end program pr19467
diff --git a/gcc/testsuite/gfortran.dg/pr19657.f b/gcc/testsuite/gfortran.dg/pr19657.f
new file mode 100644
index 00000000000..1fe32ac7497
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr19657.f
@@ -0,0 +1,21 @@
+c { dg-do run }
+c pr 19657
+c test namelist not skipped if ending with logical.
+c Based on example provided by fuyuki@ccsr.u-tokyo.ac.jp
+
+ program pr19657
+ implicit none
+ logical l
+ integer i, ctr
+ namelist /nm/ i, l
+ open (10, status = "scratch")
+ write (10,*) "&nm i=1,l=t &end"
+ write (10,*) "&nm i=2 &end"
+ write (10,*) "&nm i=3 &end"
+ rewind (10)
+ do ctr = 1,3
+ read (10,nm,end=190)
+ if (i.ne.ctr) call abort ()
+ enddo
+ 190 continue
+ end
diff --git a/gcc/testsuite/gfortran.dg/pr20950.f b/gcc/testsuite/gfortran.dg/pr20950.f
new file mode 100644
index 00000000000..c132548c829
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr20950.f
@@ -0,0 +1,7 @@
+! PR libfortran/20950
+! Original bug-report by Walt Brainerd, The Fortran Company
+! { dg-do run }
+ character*20 c
+ inquire (33, sequential = c)
+ if (c .ne. "UNKNOWN") call abort
+ end
diff --git a/gcc/testsuite/gfortran.dg/reshape-alloc.f90 b/gcc/testsuite/gfortran.dg/reshape-alloc.f90
new file mode 100644
index 00000000000..c4c7a0e2a8c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reshape-alloc.f90
@@ -0,0 +1,32 @@
+! { dg-do run }
+! PR 20074: This used to segfault at runtime.
+! Test case contributed by "Alfredo Buttari" <pitagoras@tin.it>
+
+program tryreshape
+
+ integer,allocatable :: vect1(:),resh1(:,:)
+ integer,pointer :: vect(:),resh(:,:)
+ integer :: vect2(2*4), resh2(2,4)
+ integer :: r, s(2)
+
+ r=2; nb=4
+
+ s(:)=(/r,nb/)
+
+ allocate(vect(nb*r),vect1(nb*r))
+ allocate(resh(r,nb),resh1(r,nb))
+
+ vect =1
+ vect1=1
+ vect2=1
+
+ resh2 = reshape(vect2,s)
+ if (resh2(1,1) /= 1.0) call abort
+
+ resh1 = reshape(vect1,s)
+ if (resh1(1,1) /= 1.0) call abort
+
+ resh = reshape(vect,s)
+ if (resh(1,1) /= 1.0) call abort
+
+end program tryreshape
diff --git a/gcc/testsuite/gfortran.dg/reshape.f90 b/gcc/testsuite/gfortran.dg/reshape.f90
new file mode 100644
index 00000000000..3dba09892b6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reshape.f90
@@ -0,0 +1,33 @@
+! { dg-do run }
+! This tests a few reshape PRs.
+program resh
+ implicit none
+ real, dimension (2,3) :: a,c
+ real, dimension (12) :: b
+ type foo
+ real :: r
+ end type foo
+ type(foo), dimension (2,3) :: ar
+ type(foo), dimension (12) :: br
+
+ character (len=80) line1, line2, line3
+ integer :: i
+
+ ! PR 21108: This used to give undefined results.
+ b = (/(i,i=1,12)/)
+ a = reshape(b(1:12:2),shape(a),order=(/2,1/))
+ c = reshape(b(1:12:2),shape(a),order=(/2,1/))
+ if (any (a /= c)) call abort
+
+ ! Test generic reshape
+ br%r = b
+ ar = reshape(br(1:12:2),shape(a),order=(/2,1/))
+ if (any (ar%r /= a)) call abort
+
+ ! Test callee-allocated memory with a write statement
+ write (line1,'(6F8.3)') reshape(b(1:12:2),shape(a),order=(/2,1/))
+ write (line2,'(6F8.3)') a
+ if (line1 /= line2 ) call abort
+ write (line3,'(6F8.3)') reshape(br(1:12:2),shape(ar),order=(/2,1/))
+ if (line1 /= line3 ) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/reshape_rank7.f90 b/gcc/testsuite/gfortran.dg/reshape_rank7.f90
new file mode 100644
index 00000000000..d8f84f7b5e8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reshape_rank7.f90
@@ -0,0 +1,27 @@
+! { dg-do run}
+! PR 21075: Reshape with rank 7 used to segfault.
+program main
+ integer :: a(256), b(2,2,2,2,2,2,2)
+ do i=1,256
+ a(i) = i
+ end do
+ b = reshape(a(1:256:2), shape(b))
+ do i1=1,2
+ do i2=1,2
+ do i3=1,2
+ do i4=1,2
+ do i5=1,2
+ do i6=1,2
+ do i7=1,2
+ if (b(i1,i2,i3,i4,i5,i6,i7) /= &
+ 2*((i1-1)+(i2-1)*2+(i3-1)*4+(i4-1)*8+&
+ (i5-1)*16+(i6-1)*32+(i7-1)*64)+1) &
+ call abort
+ end do
+ end do
+ end do
+ end do
+ end do
+ end do
+ end do
+end program main
diff --git a/gcc/testsuite/gfortran.dg/wtruncate.f b/gcc/testsuite/gfortran.dg/wtruncate.f
new file mode 100644
index 00000000000..b7cac5d3c76
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/wtruncate.f
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+
+! This long comment line should not trigger a line-truncation warning with -Wall
+
+ PROGRAM foo
+ WRITE (*,*) "Test" ! Neither this comment which exceeds the 72 character limit, too
+ WRITE (*,*) "This exactly 72 character long soruce line not, too."
+ END
+
diff --git a/gcc/testsuite/gfortran.dg/wtruncate.f90 b/gcc/testsuite/gfortran.dg/wtruncate.f90
new file mode 100644
index 00000000000..49b07d2b68e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/wtruncate.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+
+! This long comment line should not trigger a line-truncation warning with -Wall even for free-form 132 character line limit (blah blah)
+
+ PROGRAM foo
+ WRITE (*,*) "Test" ! Neither this comment which exceeds the 132 character limit with some random words, too (blah blah)
+ WRITE (*,*) "This exactly 132 character long soruce line not, too. How can people fill 132 characters without sensless stuff"
+ END
+
diff --git a/gcc/testsuite/objc.dg/fix-and-continue-1.m b/gcc/testsuite/objc.dg/fix-and-continue-1.m
new file mode 100644
index 00000000000..49250c2d84f
--- /dev/null
+++ b/gcc/testsuite/objc.dg/fix-and-continue-1.m
@@ -0,0 +1,90 @@
+/* Fix and continue should not interfere with computation of
+ local (static) function addresses. */
+/* Author: Ziemowit Laski <zlaski@apple.com> */
+
+/* { dg-do run { target *-*-darwin* } } */
+/* { dg-options "-mfix-and-continue" } */
+
+#include <objc/Object.h>
+#include <stdlib.h>
+
+@class MyTarget, MySet;
+
+int global_value = 0;
+
+@interface MyTargetBuildContext : Object
+{
+ MyTarget * _target;
+ unsigned _cacheInvalDisableCount;
+ BOOL _cacheInvalidationNeeded;
+ unsigned short _isCreatingDependencies:1;
+ unsigned short _isCreatingHeadermap:1;
+ unsigned short _haveAddedIdleTimeInvoc:1;
+ BOOL _hasSetUpBuildSettings;
+}
+- (id)initWithTarget:(MyTarget *)target;
+- (MyTarget *)target;
+@end
+
+@interface MyTargetBuildContext (PrivateMethods)
++ (MySet *)_headerFileExtensions;
+@end
+
+@interface MyCountedSet: Object {
+@public
+ int cardinality;
+}
+- (id)init;
+- (id)sortedArrayUsingFunction:(int (*)(id, id, void *))comparator with:(int)value;
+@end
+
+@implementation MyCountedSet
+- (id)init {
+ cardinality = 5;
+ global_value = 17;
+ return self;
+}
+- (id)sortedArrayUsingFunction:(int (*)(id, id, void *))comparator with:(int)value {
+ if(value == comparator(self, self, self))
+ return self;
+ return nil;
+}
+@end
+
+@implementation MyTargetBuildContext : Object
+- (id)initWithTarget:(MyTarget *)target
+{
+ self = [super init];
+ return self;
+}
+- (MyTarget *)target
+{
+ return _target;
+}
+
+static int _MyCompareObjectsByDecreasingSetCount (id object1, id object2, MyCountedSet * countedSet)
+{
+ global_value = 5;
+ return countedSet->cardinality;
+}
++ (MySet *)_headerFileExtensions
+{
+ MySet * _headerFileExtensions = 0;
+ return _headerFileExtensions;
+}
+- (void)_recomputeHeadermap
+{
+ MyCountedSet *set = [MyCountedSet new];
+ int (*functionPointer)(id, id, void *) = (int (*)(id, id, void *))_MyCompareObjectsByDecreasingSetCount;
+ id result = [set sortedArrayUsingFunction:functionPointer with:5];
+}
+@end
+
+int main(void) {
+ MyTargetBuildContext *ctx = [MyTargetBuildContext new];
+ [ctx _recomputeHeadermap];
+ if (global_value != 5)
+ abort();
+
+ return 0;
+}
diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c
new file mode 100644
index 00000000000..9f06e38f3c7
--- /dev/null
+++ b/gcc/tree-ssa-uncprop.c
@@ -0,0 +1,613 @@
+/* Routines for discovering and unpropagating edge equivalences.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "flags.h"
+#include "rtl.h"
+#include "tm_p.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "output.h"
+#include "errors.h"
+#include "expr.h"
+#include "function.h"
+#include "diagnostic.h"
+#include "timevar.h"
+#include "tree-dump.h"
+#include "tree-flow.h"
+#include "domwalk.h"
+#include "real.h"
+#include "tree-pass.h"
+#include "tree-ssa-propagate.h"
+#include "langhooks.h"
+
+/* The basic structure describing an equivalency created by traversing
+ an edge. Traversing the edge effectively means that we can assume
+ that we've seen an assignment LHS = RHS. */
+struct edge_equivalency
+{
+ tree rhs;
+ tree lhs;
+};
+
+/* This routine finds and records edge equivalences for every edge
+ in the CFG.
+
+ When complete, each edge that creates an equivalency will have an
+ EDGE_EQUIVALENCY structure hanging off the edge's AUX field.
+ The caller is responsible for freeing the AUX fields. */
+
+static void
+associate_equivalences_with_edges (void)
+{
+ basic_block bb;
+
+ /* Walk over each block. If the block ends with a control statement,
+ then it might create a useful equivalence. */
+ FOR_EACH_BB (bb)
+ {
+ block_stmt_iterator bsi = bsi_last (bb);
+ tree stmt;
+
+ /* If the block does not end with a COND_EXPR or SWITCH_EXPR
+ then there is nothing to do. */
+ if (bsi_end_p (bsi))
+ continue;
+
+ stmt = bsi_stmt (bsi);
+
+ if (!stmt)
+ continue;
+
+ /* A COND_EXPR may create an equivalency in a variety of different
+ ways. */
+ if (TREE_CODE (stmt) == COND_EXPR)
+ {
+ tree cond = COND_EXPR_COND (stmt);
+ edge true_edge;
+ edge false_edge;
+ struct edge_equivalency *equivalency;
+
+ extract_true_false_edges_from_block (bb, &true_edge, &false_edge);
+
+ /* If the conditional is a single variable 'X', record 'X = 1'
+ for the true edge and 'X = 0' on the false edge. */
+ if (TREE_CODE (cond) == SSA_NAME)
+ {
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->rhs = constant_boolean_node (1, TREE_TYPE (cond));
+ equivalency->lhs = cond;
+ true_edge->aux = equivalency;
+
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->rhs = constant_boolean_node (0, TREE_TYPE (cond));
+ equivalency->lhs = cond;
+ false_edge->aux = equivalency;
+ }
+ /* Equality tests may create one or two equivalences. */
+ else if (TREE_CODE (cond) == EQ_EXPR || TREE_CODE (cond) == NE_EXPR)
+ {
+ tree op0 = TREE_OPERAND (cond, 0);
+ tree op1 = TREE_OPERAND (cond, 1);
+
+ /* Special case comparing booleans against a constant as we
+ know the value of OP0 on both arms of the branch. i.e., we
+ can record an equivalence for OP0 rather than COND. */
+ if (TREE_CODE (op0) == SSA_NAME
+ && TREE_CODE (TREE_TYPE (op0)) == BOOLEAN_TYPE
+ && is_gimple_min_invariant (op1))
+ {
+ if (TREE_CODE (cond) == EQ_EXPR)
+ {
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->lhs = op0;
+ equivalency->rhs = (integer_zerop (op1)
+ ? boolean_false_node
+ : boolean_true_node);
+ true_edge->aux = equivalency;
+
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->lhs = op0;
+ equivalency->rhs = (integer_zerop (op1)
+ ? boolean_true_node
+ : boolean_false_node);
+ false_edge->aux = equivalency;
+ }
+ else
+ {
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->lhs = op0;
+ equivalency->rhs = (integer_zerop (op1)
+ ? boolean_true_node
+ : boolean_false_node);
+ true_edge->aux = equivalency;
+
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->lhs = op0;
+ equivalency->rhs = (integer_zerop (op1)
+ ? boolean_false_node
+ : boolean_true_node);
+ false_edge->aux = equivalency;
+ }
+ }
+
+ if (TREE_CODE (op0) == SSA_NAME
+ && (is_gimple_min_invariant (op1)
+ || TREE_CODE (op1) == SSA_NAME))
+ {
+ /* For IEEE, -0.0 == 0.0, so we don't necessarily know
+ the sign of a variable compared against zero. If
+ we're honoring signed zeros, then we cannot record
+ this value unless we know that the value is nonzero. */
+ if (HONOR_SIGNED_ZEROS (TYPE_MODE (TREE_TYPE (op0)))
+ && (TREE_CODE (op1) != REAL_CST
+ || REAL_VALUES_EQUAL (dconst0, TREE_REAL_CST (op1))))
+ continue;
+
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->lhs = op0;
+ equivalency->rhs = op1;
+ if (TREE_CODE (cond) == EQ_EXPR)
+ true_edge->aux = equivalency;
+ else
+ false_edge->aux = equivalency;
+
+ }
+ }
+
+ /* ??? TRUTH_NOT_EXPR can create an equivalence too. */
+ }
+
+ /* For a SWITCH_EXPR, a case label which represents a single
+ value and which is the only case label which reaches the
+ target block creates an equivalence. */
+ if (TREE_CODE (stmt) == SWITCH_EXPR)
+ {
+ tree cond = SWITCH_COND (stmt);
+
+ if (TREE_CODE (cond) == SSA_NAME)
+ {
+ tree labels = SWITCH_LABELS (stmt);
+ int i, n_labels = TREE_VEC_LENGTH (labels);
+ tree *info = xcalloc (n_basic_blocks, sizeof (tree));
+
+ /* Walk over the case label vector. Record blocks
+ which are reached by a single case label which represents
+ a single value. */
+ for (i = 0; i < n_labels; i++)
+ {
+ tree label = TREE_VEC_ELT (labels, i);
+ basic_block bb = label_to_block (CASE_LABEL (label));
+
+
+ if (CASE_HIGH (label)
+ || !CASE_LOW (label)
+ || info[bb->index])
+ info[bb->index] = error_mark_node;
+ else
+ info[bb->index] = label;
+ }
+
+ /* Now walk over the blocks to determine which ones were
+ marked as being reached by a useful case label. */
+ for (i = 0; i < n_basic_blocks; i++)
+ {
+ tree node = info[i];
+
+ if (node != NULL
+ && node != error_mark_node)
+ {
+ tree x = fold_convert (TREE_TYPE (cond), CASE_LOW (node));
+ struct edge_equivalency *equivalency;
+
+ /* Record an equivalency on the edge from BB to basic
+ block I. */
+ equivalency = xmalloc (sizeof (struct edge_equivalency));
+ equivalency->rhs = x;
+ equivalency->lhs = cond;
+ find_edge (bb, BASIC_BLOCK (i))->aux = equivalency;
+ }
+ }
+ free (info);
+ }
+ }
+
+ }
+}
+
+
+/* Translating out of SSA sometimes requires inserting copies and
+ constant initializations on edges to eliminate PHI nodes.
+
+ In some cases those copies and constant initializations are
+ redundant because the target already has the value on the
+ RHS of the assignment.
+
+ We previously tried to catch these cases after translating
+ out of SSA form. However, that code often missed cases. Worse
+ yet, the cases it missed were also often missed by the RTL
+ optimizers. Thus the resulting code had redundant instructions.
+
+ This pass attempts to detect these situations before translating
+ out of SSA form.
+
+ The key concept that this pass is built upon is that these
+ redundant copies and constant initializations often occur
+ due to constant/copy propagating equivalences resulting from
+ COND_EXPRs and SWITCH_EXPRs.
+
+ We want to do those propagations as they can sometimes allow
+ the SSA optimizers to do a better job. However, in the cases
+ where such propagations do not result in further optimization,
+ we would like to "undo" the propagation to avoid the redundant
+ copies and constant initializations.
+
+ This pass works by first associating equivalences with edges in
+ the CFG. For example, the edge leading from a SWITCH_EXPR to
+ its associated CASE_LABEL will have an equivalency between
+ SWITCH_COND and the value in the case label.
+
+ Once we have found the edge equivalences, we proceed to walk
+ the CFG in dominator order. As we traverse edges we record
+ equivalences associated with those edges we traverse.
+
+ When we encounter a PHI node, we walk its arguments to see if we
+ have an equivalence for the PHI argument. If so, then we replace
+ the argument.
+
+ Equivalences are looked up based on their value (think of it as
+ the RHS of an assignment). A value may be an SSA_NAME or an
+ invariant. We may have several SSA_NAMEs with the same value,
+ so with each value we have a list of SSA_NAMEs that have the
+ same value. */
+
+/* As we enter each block we record the value for any edge equivalency
+ leading to this block. If no such edge equivalency exists, then we
+ record NULL. These equivalences are live until we leave the dominator
+ subtree rooted at the block where we record the equivalency. */
+static VEC(tree,heap) *equiv_stack;
+
+/* Global hash table implementing a mapping from invariant values
+ to a list of SSA_NAMEs which have the same value. We might be
+ able to reuse tree-vn for this code. */
+static htab_t equiv;
+
+/* Main structure for recording equivalences into our hash table. */
+struct equiv_hash_elt
+{
+ /* The value/key of this entry. */
+ tree value;
+
+ /* List of SSA_NAMEs which have the same value/key. */
+ varray_type equivalences;
+};
+
+static void uncprop_initialize_block (struct dom_walk_data *, basic_block);
+static void uncprop_finalize_block (struct dom_walk_data *, basic_block);
+static void uncprop_into_successor_phis (struct dom_walk_data *, basic_block);
+
+/* Hashing and equality routines for the hash table. */
+
+static hashval_t
+equiv_hash (const void *p)
+{
+ tree value = ((struct equiv_hash_elt *)p)->value;
+ return iterative_hash_expr (value, 0);
+}
+
+static int
+equiv_eq (const void *p1, const void *p2)
+{
+ tree value1 = ((struct equiv_hash_elt *)p1)->value;
+ tree value2 = ((struct equiv_hash_elt *)p2)->value;
+
+ return operand_equal_p (value1, value2, 0);
+}
+
+/* Remove the most recently recorded equivalency for VALUE. */
+
+static void
+remove_equivalence (tree value)
+{
+ struct equiv_hash_elt equiv_hash_elt, *equiv_hash_elt_p;
+ void **slot;
+
+ equiv_hash_elt.value = value;
+ equiv_hash_elt.equivalences = NULL;
+
+ slot = htab_find_slot (equiv, &equiv_hash_elt, NO_INSERT);
+
+ equiv_hash_elt_p = (struct equiv_hash_elt *) *slot;
+ VARRAY_POP (equiv_hash_elt_p->equivalences);
+}
+
+/* Record EQUIVALENCE = VALUE into our hash table. */
+
+static void
+record_equiv (tree value, tree equivalence)
+{
+ struct equiv_hash_elt *equiv_hash_elt;
+ void **slot;
+
+ equiv_hash_elt = xmalloc (sizeof (struct equiv_hash_elt));
+ equiv_hash_elt->value = value;
+ equiv_hash_elt->equivalences = NULL;
+
+ slot = htab_find_slot (equiv, equiv_hash_elt, INSERT);
+
+ if (*slot == NULL)
+ *slot = (void *) equiv_hash_elt;
+ else
+ free (equiv_hash_elt);
+
+ equiv_hash_elt = (struct equiv_hash_elt *) *slot;
+
+ if (!equiv_hash_elt->equivalences)
+ VARRAY_TREE_INIT (equiv_hash_elt->equivalences, 10, "value equivs");
+ VARRAY_PUSH_TREE (equiv_hash_elt->equivalences, equivalence);
+}
+
+/* Main driver for un-cprop. */
+
+static void
+tree_ssa_uncprop (void)
+{
+ struct dom_walk_data walk_data;
+ basic_block bb;
+
+ associate_equivalences_with_edges ();
+
+ /* Create our global data structures. */
+ equiv = htab_create (1024, equiv_hash, equiv_eq, free);
+ equiv_stack = VEC_alloc (tree, heap, 2);
+
+ /* We're going to do a dominator walk, so ensure that we have
+ dominance information. */
+ calculate_dominance_info (CDI_DOMINATORS);
+
+ /* Setup callbacks for the generic dominator tree walker. */
+ walk_data.walk_stmts_backward = false;
+ walk_data.dom_direction = CDI_DOMINATORS;
+ walk_data.initialize_block_local_data = NULL;
+ walk_data.before_dom_children_before_stmts = uncprop_initialize_block;
+ walk_data.before_dom_children_walk_stmts = NULL;
+ walk_data.before_dom_children_after_stmts = uncprop_into_successor_phis;
+ walk_data.after_dom_children_before_stmts = NULL;
+ walk_data.after_dom_children_walk_stmts = NULL;
+ walk_data.after_dom_children_after_stmts = uncprop_finalize_block;
+ walk_data.global_data = NULL;
+ walk_data.block_local_data_size = 0;
+ walk_data.interesting_blocks = NULL;
+
+ /* Now initialize the dominator walker. */
+ init_walk_dominator_tree (&walk_data);
+
+ /* Recursively walk the dominator tree undoing unprofitable
+ constant/copy propagations. */
+ walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
+
+ /* Finalize and clean up. */
+ fini_walk_dominator_tree (&walk_data);
+
+ /* EQUIV_STACK should already be empty at this point, so we just
+ need to empty elements out of the hash table, free EQUIV_STACK,
+ and cleanup the AUX field on the edges. */
+ htab_delete (equiv);
+ VEC_free (tree, heap, equiv_stack);
+ FOR_EACH_BB (bb)
+ {
+ edge e;
+ edge_iterator ei;
+
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ {
+ if (e->aux)
+ {
+ free (e->aux);
+ e->aux = NULL;
+ }
+ }
+ }
+
+}
+
+
+/* We have finished processing the dominator children of BB, perform
+ any finalization actions in preparation for leaving this node in
+ the dominator tree. */
+
+static void
+uncprop_finalize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
+ basic_block bb ATTRIBUTE_UNUSED)
+{
+ /* Pop the topmost value off the equiv stack. */
+ tree value = VEC_pop (tree, equiv_stack);
+
+ /* If that value was non-null, then pop the topmost equivalency off
+ its equivalency stack. */
+ if (value != NULL)
+ remove_equivalence (value);
+}
+
+/* Unpropagate values from PHI nodes in successor blocks of BB. */
+
+static void
+uncprop_into_successor_phis (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
+ basic_block bb)
+{
+ edge e;
+ edge_iterator ei;
+
+ /* For each successor edge, first temporarily record any equivalence
+ on that edge. Then unpropagate values in any PHI nodes at the
+ destination of the edge. Then remove the temporary equivalence. */
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ {
+ tree phi = phi_nodes (e->dest);
+
+ /* If there are no PHI nodes in this destination, then there is
+ no sense in recording any equivalences. */
+ if (!phi)
+ continue;
+
+ /* Record any equivalency associated with E. */
+ if (e->aux)
+ {
+ struct edge_equivalency *equiv = e->aux;
+ record_equiv (equiv->rhs, equiv->lhs);
+ }
+
+ /* Walk over the PHI nodes, unpropagating values. */
+ for ( ; phi; phi = PHI_CHAIN (phi))
+ {
+ /* Sigh. We'll have more efficient access to this one day. */
+ tree arg = PHI_ARG_DEF (phi, e->dest_idx);
+ struct equiv_hash_elt equiv_hash_elt;
+ void **slot;
+
+ /* If the argument is not an invariant, or refers to the same
+ underlying variable as the PHI result, then there's no
+ point in un-propagating the argument. */
+ if (!is_gimple_min_invariant (arg)
+ && SSA_NAME_VAR (arg) != SSA_NAME_VAR (PHI_RESULT (phi)))
+ continue;
+
+ /* Lookup this argument's value in the hash table. */
+ equiv_hash_elt.value = arg;
+ equiv_hash_elt.equivalences = NULL;
+ slot = htab_find_slot (equiv, &equiv_hash_elt, NO_INSERT);
+
+ if (slot)
+ {
+ struct equiv_hash_elt *elt = *slot;
+ int j;
+
+ /* Walk every equivalence with the same value. If we find
+ one with the same underlying variable as the PHI result,
+ then replace the value in the argument with its equivalent
+ SSA_NAME. Use the most recent equivalence as hopefully
+ that results in shortest lifetimes. */
+ for (j = VARRAY_ACTIVE_SIZE (elt->equivalences) - 1; j >= 0; j--)
+ {
+ tree equiv = VARRAY_TREE (elt->equivalences, j);
+
+ if (SSA_NAME_VAR (equiv) == SSA_NAME_VAR (PHI_RESULT (phi)))
+ {
+ SET_PHI_ARG_DEF (phi, e->dest_idx, equiv);
+ break;
+ }
+ }
+ }
+ }
+
+ /* If we had an equivalence associated with this edge, remove it. */
+ if (e->aux)
+ {
+ struct edge_equivalency *equiv = e->aux;
+ remove_equivalence (equiv->rhs);
+ }
+ }
+}
+
+/* Ignoring loop backedges, if BB has precisely one incoming edge then
+ return that edge. Otherwise return NULL. */
+static edge
+single_incoming_edge_ignoring_loop_edges (basic_block bb)
+{
+ edge retval = NULL;
+ edge e;
+ edge_iterator ei;
+
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ {
+ /* A loop back edge can be identified by the destination of
+ the edge dominating the source of the edge. */
+ if (dominated_by_p (CDI_DOMINATORS, e->src, e->dest))
+ continue;
+
+ /* If we have already seen a non-loop edge, then we must have
+ multiple incoming non-loop edges and thus we return NULL. */
+ if (retval)
+ return NULL;
+
+ /* This is the first non-loop incoming edge we have found. Record
+ it. */
+ retval = e;
+ }
+
+ return retval;
+}
+
+static void
+uncprop_initialize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
+ basic_block bb)
+{
+ basic_block parent;
+ edge e;
+ bool recorded = false;
+
+ /* If this block is dominated by a single incoming edge and that edge
+ has an equivalency, then record the equivalency and push the
+ VALUE onto EQUIV_STACK. Else push a NULL entry on EQUIV_STACK. */
+ parent = get_immediate_dominator (CDI_DOMINATORS, bb);
+ if (parent)
+ {
+ e = single_incoming_edge_ignoring_loop_edges (bb);
+
+ if (e && e->src == parent && e->aux)
+ {
+ struct edge_equivalency *equiv = e->aux;
+
+ record_equiv (equiv->rhs, equiv->lhs);
+ VEC_safe_push (tree, heap, equiv_stack, equiv->rhs);
+ recorded = true;
+ }
+ }
+
+ if (!recorded)
+ VEC_safe_push (tree, heap, equiv_stack, NULL_TREE);
+}
+
+static bool
+gate_uncprop (void)
+{
+ return flag_tree_dom != 0;
+}
+
+struct tree_opt_pass pass_uncprop =
+{
+ "uncprop", /* name */
+ gate_uncprop, /* gate */
+ tree_ssa_uncprop, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_TREE_SSA_UNCPROP, /* tv_id */
+ PROP_cfg | PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func | TODO_verify_ssa, /* todo_flags_finish */
+ 0 /* letter */
+};
diff --git a/libffi/src/cris/ffi.c b/libffi/src/cris/ffi.c
new file mode 100644
index 00000000000..364c990f6f3
--- /dev/null
+++ b/libffi/src/cris/ffi.c
@@ -0,0 +1,381 @@
+/* -----------------------------------------------------------------------
+ ffi.c - Copyright (c) 1998 Cygnus Solutions
+ Copyright (c) 2004 Simon Posnjak
+ Copyright (c) 2005 Axis Communications AB
+
+ CRIS Foreign Function Interface
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ ``Software''), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL SIMON POSNJAK BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ ----------------------------------------------------------------------- */
+
+#include <ffi.h>
+#include <ffi_common.h>
+
+#define STACK_ARG_SIZE(x) ALIGN(x, FFI_SIZEOF_ARG)
+
+static ffi_status
+initialize_aggregate_packed_struct (ffi_type * arg)
+{
+ ffi_type **ptr;
+
+ FFI_ASSERT (arg != NULL);
+
+ FFI_ASSERT (arg->elements != NULL);
+ FFI_ASSERT (arg->size == 0);
+ FFI_ASSERT (arg->alignment == 0);
+
+ ptr = &(arg->elements[0]);
+
+ while ((*ptr) != NULL)
+ {
+ if (((*ptr)->size == 0)
+ && (initialize_aggregate_packed_struct ((*ptr)) != FFI_OK))
+ return FFI_BAD_TYPEDEF;
+
+ FFI_ASSERT (ffi_type_test ((*ptr)));
+
+ arg->size += (*ptr)->size;
+
+ arg->alignment = (arg->alignment > (*ptr)->alignment) ?
+ arg->alignment : (*ptr)->alignment;
+
+ ptr++;
+ }
+
+ if (arg->size == 0)
+ return FFI_BAD_TYPEDEF;
+ else
+ return FFI_OK;
+}
+
+int
+ffi_prep_args (char *stack, extended_cif * ecif)
+{
+ unsigned int i;
+ unsigned int struct_count = 0;
+ void **p_argv;
+ char *argp;
+ ffi_type **p_arg;
+
+ argp = stack;
+
+ p_argv = ecif->avalue;
+
+ for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
+ (i != 0); i--, p_arg++)
+ {
+ size_t z;
+
+ switch ((*p_arg)->type)
+ {
+ case FFI_TYPE_STRUCT:
+ {
+ z = (*p_arg)->size;
+ if (z <= 4)
+ {
+ memcpy (argp, *p_argv, z);
+ z = 4;
+ }
+ else if (z <= 8)
+ {
+ memcpy (argp, *p_argv, z);
+ z = 8;
+ }
+ else
+ {
+ unsigned int uiLocOnStack;
+ z = sizeof (void *);
+ uiLocOnStack = 4 * ecif->cif->nargs + struct_count;
+ struct_count = struct_count + (*p_arg)->size;
+ *(unsigned int *) argp =
+ (unsigned int) (UINT32 *) (stack + uiLocOnStack);
+ memcpy ((stack + uiLocOnStack), *p_argv, (*p_arg)->size);
+ }
+ break;
+ }
+ default:
+ z = (*p_arg)->size;
+ if (z < sizeof (int))
+ {
+ switch ((*p_arg)->type)
+ {
+ case FFI_TYPE_SINT8:
+ *(signed int *) argp = (signed int) *(SINT8 *) (*p_argv);
+ break;
+
+ case FFI_TYPE_UINT8:
+ *(unsigned int *) argp =
+ (unsigned int) *(UINT8 *) (*p_argv);
+ break;
+
+ case FFI_TYPE_SINT16:
+ *(signed int *) argp = (signed int) *(SINT16 *) (*p_argv);
+ break;
+
+ case FFI_TYPE_UINT16:
+ *(unsigned int *) argp =
+ (unsigned int) *(UINT16 *) (*p_argv);
+ break;
+
+ default:
+ FFI_ASSERT (0);
+ }
+ z = sizeof (int);
+ }
+ else if (z == sizeof (int))
+ *(unsigned int *) argp = (unsigned int) *(UINT32 *) (*p_argv);
+ else
+ memcpy (argp, *p_argv, z);
+ break;
+ }
+ p_argv++;
+ argp += z;
+ }
+
+ return (struct_count);
+}
+
+ffi_status
+ffi_prep_cif (ffi_cif * cif,
+ ffi_abi abi, unsigned int nargs,
+ ffi_type * rtype, ffi_type ** atypes)
+{
+ unsigned bytes = 0;
+ unsigned int i;
+ ffi_type **ptr;
+
+ FFI_ASSERT (cif != NULL);
+ FFI_ASSERT ((abi > FFI_FIRST_ABI) && (abi <= FFI_DEFAULT_ABI));
+
+ cif->abi = abi;
+ cif->arg_types = atypes;
+ cif->nargs = nargs;
+ cif->rtype = rtype;
+
+ cif->flags = 0;
+
+ if ((cif->rtype->size == 0)
+ && (initialize_aggregate_packed_struct (cif->rtype) != FFI_OK))
+ return FFI_BAD_TYPEDEF;
+
+ FFI_ASSERT_VALID_TYPE (cif->rtype);
+
+ for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
+ {
+ if (((*ptr)->size == 0)
+ && (initialize_aggregate_packed_struct ((*ptr)) != FFI_OK))
+ return FFI_BAD_TYPEDEF;
+
+ FFI_ASSERT_VALID_TYPE (*ptr);
+
+ if (((*ptr)->alignment - 1) & bytes)
+ bytes = ALIGN (bytes, (*ptr)->alignment);
+ if ((*ptr)->type == FFI_TYPE_STRUCT)
+ {
+ if ((*ptr)->size > 8)
+ {
+ bytes += (*ptr)->size;
+ bytes += sizeof (void *);
+ }
+ else
+ {
+ if ((*ptr)->size > 4)
+ bytes += 8;
+ else
+ bytes += 4;
+ }
+ }
+ else
+ bytes += STACK_ARG_SIZE ((*ptr)->size);
+ }
+
+ cif->bytes = bytes;
+
+ return ffi_prep_cif_machdep (cif);
+}
+
+ffi_status
+ffi_prep_cif_machdep (ffi_cif * cif)
+{
+ switch (cif->rtype->type)
+ {
+ case FFI_TYPE_VOID:
+ case FFI_TYPE_STRUCT:
+ case FFI_TYPE_FLOAT:
+ case FFI_TYPE_DOUBLE:
+ case FFI_TYPE_SINT64:
+ case FFI_TYPE_UINT64:
+ cif->flags = (unsigned) cif->rtype->type;
+ break;
+
+ default:
+ cif->flags = FFI_TYPE_INT;
+ break;
+ }
+
+ return FFI_OK;
+}
+
+extern void ffi_call_SYSV (int (*)(char *, extended_cif *),
+ extended_cif *,
+ unsigned, unsigned, unsigned *, void (*fn) ())
+ __attribute__ ((__visibility__ ("hidden")));
+
+void
+ffi_call (ffi_cif * cif, void (*fn) (), void *rvalue, void **avalue)
+{
+ extended_cif ecif;
+
+ ecif.cif = cif;
+ ecif.avalue = avalue;
+
+ if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT))
+ {
+ ecif.rvalue = alloca (cif->rtype->size);
+ }
+ else
+ ecif.rvalue = rvalue;
+
+ switch (cif->abi)
+ {
+ case FFI_SYSV:
+ ffi_call_SYSV (ffi_prep_args, &ecif, cif->bytes,
+ cif->flags, ecif.rvalue, fn);
+ break;
+ default:
+ FFI_ASSERT (0);
+ break;
+ }
+}
+
+/* Because the following variables are not exported outside libffi, we
+ mark them hidden. */
+
+/* Assembly code for the jump stub. */
+extern const char ffi_cris_trampoline_template[]
+ __attribute__ ((__visibility__ ("hidden")));
+
+/* Offset into ffi_cris_trampoline_template of where to put the
+ ffi_prep_closure_inner function. */
+extern const int ffi_cris_trampoline_fn_offset
+ __attribute__ ((__visibility__ ("hidden")));
+
+/* Offset into ffi_cris_trampoline_template of where to put the
+ closure data. */
+extern const int ffi_cris_trampoline_closure_offset
+ __attribute__ ((__visibility__ ("hidden")));
+
+/* This function is sibling-called (jumped to) by the closure
+ trampoline. We get R10..R13 at PARAMS[0..3] and a copy of [SP] at
+ PARAMS[4] to simplify handling of a straddling parameter. A copy
+ of R9 is at PARAMS[5] and SP at PARAMS[6]. These parameters are
+ put at the appropriate place in CLOSURE which is then executed and
+ the return value is passed back to the caller. */
+
+static unsigned long long
+ffi_prep_closure_inner (void **params, ffi_closure* closure)
+{
+ char *register_args = (char *) params;
+ void *struct_ret = params[5];
+ char *stack_args = params[6];
+ char *ptr = register_args;
+ ffi_cif *cif = closure->cif;
+ ffi_type **arg_types = cif->arg_types;
+
+ /* Max room needed is number of arguments as 64-bit values. */
+ void **avalue = alloca (closure->cif->nargs * sizeof(void *));
+ int i;
+ int doing_regs;
+ long long llret = 0;
+
+ /* Find the address of each argument. */
+ for (i = 0, doing_regs = 1; i < cif->nargs; i++)
+ {
+ /* Types up to and including 8 bytes go by-value. */
+ if (arg_types[i]->size <= 4)
+ {
+ avalue[i] = ptr;
+ ptr += 4;
+ }
+ else if (arg_types[i]->size <= 8)
+ {
+ avalue[i] = ptr;
+ ptr += 8;
+ }
+ else
+ {
+ FFI_ASSERT (arg_types[i]->type == FFI_TYPE_STRUCT);
+
+ /* Passed by-reference, so copy the pointer. */
+ avalue[i] = *(void **) ptr;
+ ptr += 4;
+ }
+
+ /* If we've handled more arguments than fit in registers, start
+ looking at the those passed on the stack. Step over the
+ first one if we had a straddling parameter. */
+ if (doing_regs && ptr >= register_args + 4*4)
+ {
+ ptr = stack_args + ((ptr > register_args + 4*4) ? 4 : 0);
+ doing_regs = 0;
+ }
+ }
+
+ /* Invoke the closure. */
+ (closure->fun) (cif,
+
+ cif->rtype->type == FFI_TYPE_STRUCT
+ /* The caller allocated space for the return
+ structure, and passed a pointer to this space in
+ R9. */
+ ? struct_ret
+
+ /* We take advantage of being able to ignore that
+ the high part isn't set if the return value is
+ not in R10:R11, but in R10 only. */
+ : (void *) &llret,
+
+ avalue, closure->user_data);
+
+ return llret;
+}
+
+/* API function: Prepare the trampoline. */
+
+ffi_status
+ffi_prep_closure (ffi_closure* closure,
+ ffi_cif* cif,
+ void (*fun)(ffi_cif *, void *, void **, void*),
+ void *user_data)
+{
+ void *innerfn = ffi_prep_closure_inner;
+ FFI_ASSERT (cif->abi == FFI_SYSV);
+ closure->cif = cif;
+ closure->user_data = user_data;
+ closure->fun = fun;
+ memcpy (closure->tramp, ffi_cris_trampoline_template,
+ FFI_CRIS_TRAMPOLINE_CODE_PART_SIZE);
+ memcpy (closure->tramp + ffi_cris_trampoline_fn_offset,
+ &innerfn, sizeof (void *));
+ memcpy (closure->tramp + ffi_cris_trampoline_closure_offset,
+ &closure, sizeof (void *));
+
+ return FFI_OK;
+}
diff --git a/libffi/src/cris/ffitarget.h b/libffi/src/cris/ffitarget.h
new file mode 100644
index 00000000000..3fb937c16dc
--- /dev/null
+++ b/libffi/src/cris/ffitarget.h
@@ -0,0 +1,50 @@
+/* -----------------------------------------------------------------*-C-*-
+ ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc.
+ Target configuration macros for CRIS.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ ``Software''), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+ ----------------------------------------------------------------------- */
+
+#ifndef LIBFFI_TARGET_H
+#define LIBFFI_TARGET_H
+
+#ifndef LIBFFI_ASM
+typedef unsigned long ffi_arg;
+typedef signed long ffi_sarg;
+
+typedef enum ffi_abi {
+ FFI_FIRST_ABI = 0,
+ FFI_SYSV,
+ FFI_DEFAULT_ABI = FFI_SYSV,
+ FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
+} ffi_abi;
+#endif
+
+/* ---- Definitions for closures ----------------------------------------- */
+
+#define FFI_CLOSURES 1
+#define FFI_CRIS_TRAMPOLINE_CODE_PART_SIZE 36
+#define FFI_CRIS_TRAMPOLINE_DATA_PART_SIZE (7*4)
+#define FFI_TRAMPOLINE_SIZE \
+ (FFI_CRIS_TRAMPOLINE_CODE_PART_SIZE + FFI_CRIS_TRAMPOLINE_DATA_PART_SIZE)
+#define FFI_NATIVE_RAW_API 0
+
+#endif
diff --git a/libffi/src/cris/sysv.S b/libffi/src/cris/sysv.S
new file mode 100644
index 00000000000..79abaee4d95
--- /dev/null
+++ b/libffi/src/cris/sysv.S
@@ -0,0 +1,215 @@
+/* -----------------------------------------------------------------------
+ sysv.S - Copyright (c) 2004 Simon Posnjak
+ Copyright (c) 2005 Axis Communications AB
+
+ CRIS Foreign Function Interface
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ ``Software''), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL SIMON POSNJAK BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ ----------------------------------------------------------------------- */
+
+#define LIBFFI_ASM
+#include <ffi.h>
+#define CONCAT(x,y) x ## y
+#define XCONCAT(x,y) CONCAT (x, y)
+#define L(x) XCONCAT (__USER_LABEL_PREFIX__, x)
+
+ .text
+
+ ;; OK, when we get called we should have this (according to
+ ;; AXIS ETRAX 100LX Programmer's Manual chapter 6.3).
+ ;;
+ ;; R10: ffi_prep_args (func. pointer)
+ ;; R11: &ecif
+ ;; R12: cif->bytes
+ ;; R13: fig->flags
+ ;; sp+0: ecif.rvalue
+ ;; sp+4: fn (function pointer to the function that we need to call)
+
+ .globl L(ffi_call_SYSV)
+ .type L(ffi_call_SYSV),@function
+ .hidden L(ffi_call_SYSV)
+
+L(ffi_call_SYSV):
+ ;; Save the regs to the stack.
+ push $srp
+ ;; Used for stack pointer saving.
+ push $r6
+ ;; Used for function address pointer.
+ push $r7
+ ;; Used for stack pointer saving.
+ push $r8
+ ;; We save fig->flags to stack we will need them after we
+ ;; call The Function.
+ push $r13
+
+ ;; Saving current stack pointer.
+ move.d $sp,$r8
+ move.d $sp,$r6
+
+ ;; Move address of ffi_prep_args to r13.
+ move.d $r10,$r13
+
+ ;; Make room on the stack for the args of fn.
+ sub.d $r12,$sp
+
+ ;; Function void ffi_prep_args(char *stack, extended_cif *ecif) parameters are:
+ ;; r10 <-- stack pointer
+ ;; r11 <-- &ecif (already there)
+ move.d $sp,$r10
+
+ ;; Call the function.
+ jsr $r13
+
+ ;; Save the size of the structures which are passed on stack.
+ move.d $r10,$r7
+
+ ;; Move first four args in to r10..r13.
+ move.d [$sp+0],$r10
+ move.d [$sp+4],$r11
+ move.d [$sp+8],$r12
+ move.d [$sp+12],$r13
+
+ ;; Adjust the stack and check if any parameters are given on stack.
+ addq 16,$sp
+ sub.d $r7,$r6
+ cmp.d $sp,$r6
+
+ bpl go_on
+ nop
+
+go_on_no_params_on_stack:
+ move.d $r6,$sp
+
+go_on:
+ ;; Discover if we need to put rval address in to r9.
+ move.d [$r8+0],$r7
+ cmpq FFI_TYPE_STRUCT,$r7
+ bne call_now
+ nop
+
+ ;; Move rval address to $r9.
+ move.d [$r8+20],$r9
+
+call_now:
+ ;; Move address of The Function in to r7.
+ move.d [$r8+24],$r7
+
+ ;; Call The Function.
+ jsr $r7
+
+ ;; Reset stack.
+ move.d $r8,$sp
+
+ ;; Load rval type (fig->flags) in to r13.
+ pop $r13
+
+ ;; Detect rval type.
+ cmpq FFI_TYPE_VOID,$r13
+ beq epilogue
+
+ cmpq FFI_TYPE_STRUCT,$r13
+ beq epilogue
+
+ cmpq FFI_TYPE_DOUBLE,$r13
+ beq return_double_or_longlong
+
+ cmpq FFI_TYPE_UINT64,$r13
+ beq return_double_or_longlong
+
+ cmpq FFI_TYPE_SINT64,$r13
+ beq return_double_or_longlong
+ nop
+
+ ;; Just return the 32 bit value.
+ ba return
+ nop
+
+return_double_or_longlong:
+ ;; Load half of the rval to r10 and the other half to r11.
+ move.d [$sp+16],$r13
+ move.d $r10,[$r13]
+ addq 4,$r13
+ move.d $r11,[$r13]
+ ba epilogue
+ nop
+
+return:
+ ;; Load the rval to r10.
+ move.d [$sp+16],$r13
+ move.d $r10,[$r13]
+
+epilogue:
+ pop $r8
+ pop $r7
+ pop $r6
+ Jump [$sp+]
+
+ .size ffi_call_SYSV,.-ffi_call_SYSV
+
+/* Save R10..R13 into an array, somewhat like varargs. Copy the next
+ argument too, to simplify handling of any straddling parameter.
+ Save R9 and SP after those. Jump to function handling the rest.
+ Since this is a template, copied and the main function filled in by
+ the user. */
+
+ .globl L(ffi_cris_trampoline_template)
+ .type L(ffi_cris_trampoline_template),@function
+ .hidden L(ffi_cris_trampoline_template)
+
+L(ffi_cris_trampoline_template):
+0:
+ /* The value we get for "PC" is right after the prefix instruction,
+ two bytes from the beginning, i.e. 0b+2. */
+ move.d $r10,[$pc+2f-(0b+2)]
+ move.d $pc,$r10
+1:
+ addq 2f-1b+4,$r10
+ move.d $r11,[$r10+]
+ move.d $r12,[$r10+]
+ move.d $r13,[$r10+]
+ move.d [$sp],$r11
+ move.d $r11,[$r10+]
+ move.d $r9,[$r10+]
+ move.d $sp,[$r10+]
+ subq FFI_CRIS_TRAMPOLINE_DATA_PART_SIZE,$r10
+ move.d 0,$r11
+3:
+ jump 0
+2:
+ .size ffi_cris_trampoline_template,.-0b
+
+/* This macro create a constant usable as "extern const int \name" in
+ C from within libffi, when \name has no prefix decoration. */
+
+ .macro const name,value
+ .globl \name
+ .type \name,@object
+ .hidden \name
+\name:
+ .dword \value
+ .size \name,4
+ .endm
+
+/* Constants for offsets within the trampoline. We could do this with
+ just symbols, avoiding memory contents and memory accesses, but the
+ C usage code would look a bit stranger. */
+
+ const L(ffi_cris_trampoline_fn_offset),2b-4-0b
+ const L(ffi_cris_trampoline_closure_offset),3b-4-0b
diff --git a/libjava/gnu/classpath/SystemProperties.java b/libjava/gnu/classpath/SystemProperties.java
new file mode 100644
index 00000000000..ee642804378
--- /dev/null
+++ b/libjava/gnu/classpath/SystemProperties.java
@@ -0,0 +1,154 @@
+/* SystemProperties.java -- Manage the System properties.
+ Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath;
+
+import java.util.Properties;
+
+/**
+ * The class manages the System properties. This class is only available to
+ * privileged code (i.e. code loaded by the bootstrap class loader) and
+ * therefore doesn't do any security checks.
+ * This class is separated out from java.lang.System to simplify bootstrap
+ * dependencies and to allow trusted code a simple and efficient mechanism
+ * to access the system properties.
+ */
+public class SystemProperties
+{
+ /**
+ * Stores the current system properties. This can be modified by
+ * {@link #setProperties(Properties)}, but will never be null, because
+ * setProperties(null) sucks in the default properties.
+ */
+ private static Properties properties;
+
+ /**
+ * The default properties. Once the default is stabilized,
+ * it should not be modified;
+ * instead it is cloned when calling <code>setProperties(null)</code>.
+ */
+ private static final Properties defaultProperties = new Properties();
+
+ private static native void insertSystemProperties(Properties properties);
+
+ static
+ {
+ insertSystemProperties(defaultProperties);
+
+ // Set base URL if not already set.
+ if (defaultProperties.get("gnu.classpath.home.url") == null)
+ defaultProperties.put("gnu.classpath.home.url",
+ "file://"
+ + defaultProperties.get("gnu.classpath.home")
+ + "/lib");
+
+ // Set short name if not already set.
+ if (defaultProperties.get("gnu.classpath.vm.shortname") == null)
+ {
+ String value = defaultProperties.getProperty("java.vm.name");
+ int index = value.lastIndexOf(' ');
+ if (index != -1)
+ value = value.substring(index + 1);
+ defaultProperties.put("gnu.classpath.vm.shortname", value);
+ }
+
+ // Network properties
+ if (defaultProperties.get("http.agent") == null)
+ {
+ String userAgent = ("gnu-classpath/"
+ + defaultProperties.getProperty("gnu.classpath.version")
+ + " ("
+ + defaultProperties.getProperty("gnu.classpath.vm.shortname")
+ + "/"
+ + defaultProperties.getProperty("java.vm.version")
+ + ")");
+ defaultProperties.put("http.agent", userAgent);
+ }
+
+ defaultProperties.put("gnu.cpu.endian",
+ isWordsBigEndian() ? "big" : "little");
+
+ // XXX FIXME - Temp hack for old systems that set the wrong property
+ if (defaultProperties.get("java.io.tmpdir") == null)
+ defaultProperties.put("java.io.tmpdir",
+ defaultProperties.get("java.tmpdir"));
+
+ // Note that we use clone here and not new. Some programs assume
+ // that the system properties do not have a parent.
+ properties = (Properties) defaultProperties.clone();
+ }
+
+ public static String getProperty(String name)
+ {
+ return properties.getProperty(name);
+ }
+
+ public static String getProperty(String name, String defaultValue)
+ {
+ return properties.getProperty(name, defaultValue);
+ }
+
+ public static String setProperty(String name, String value)
+ {
+ return (String) properties.setProperty(name, value);
+ }
+
+ public static Properties getProperties()
+ {
+ return properties;
+ }
+
+ public static void setProperties(Properties properties)
+ {
+ if (properties == null)
+ {
+ // Note that we use clone here and not new. Some programs
+ // assume that the system properties do not have a parent.
+ properties = (Properties)defaultProperties.clone();
+ }
+
+ SystemProperties.properties = properties;
+ }
+
+ /**
+ * Detect big-endian systems.
+ *
+ * @return true if the system is big-endian.
+ */
+ private static native boolean isWordsBigEndian();
+}
diff --git a/libjava/gnu/classpath/natSystemProperties.cc b/libjava/gnu/classpath/natSystemProperties.cc
new file mode 100644
index 00000000000..d4f610951af
--- /dev/null
+++ b/libjava/gnu/classpath/natSystemProperties.cc
@@ -0,0 +1,390 @@
+// natSystemProperties.cc - Implementation of native side of
+// SystemProperties class.
+
+/* Copyright (C) 2005 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <config.h>
+#include <platform.h>
+
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+
+#ifdef HAVE_UNAME
+#include <sys/utsname.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
+#ifdef HAVE_LANGINFO_H
+#include <langinfo.h>
+#endif
+
+#include <gcj/cni.h>
+#include <jvm.h>
+#include <java-props.h>
+#include <gnu/classpath/SystemProperties.h>
+#include <java/lang/String.h>
+#include <jni.h>
+
+#ifdef USE_LTDL
+#include <ltdl.h>
+
+void
+_Jv_SetDLLSearchPath (const char *path)
+{
+ lt_dlsetsearchpath (path);
+}
+
+#else
+
+void
+_Jv_SetDLLSearchPath (const char *)
+{
+ // Nothing.
+}
+
+#endif /* USE_LTDL */
+
+#if ! defined (DEFAULT_FILE_ENCODING) && defined (HAVE_ICONV) \
+ && defined (HAVE_NL_LANGINFO)
+
+static char *
+file_encoding ()
+{
+ setlocale (LC_CTYPE, "");
+ char *e = nl_langinfo (CODESET);
+ if (e == NULL || *e == '\0')
+ e = "8859_1";
+ return e;
+}
+
+#define DEFAULT_FILE_ENCODING file_encoding ()
+
+#endif
+
+#ifndef DEFAULT_FILE_ENCODING
+#define DEFAULT_FILE_ENCODING "8859_1"
+#endif
+
+static char *default_file_encoding = DEFAULT_FILE_ENCODING;
+
+#if HAVE_GETPWUID_R
+/* Use overload resolution to find out the signature of getpwuid_r. */
+
+ /* This is Posix getpwuid_r. */
+template <typename T_uid, typename T_passwd, typename T_buf, typename T_len>
+static inline int
+getpwuid_adaptor(int (*getpwuid_r)(T_uid user_id, T_passwd *pwd_r,
+ T_buf *buf_r, T_len len_r,
+ T_passwd **pwd_entry_ptr),
+ uid_t user_id, struct passwd *pwd_r,
+ char *buf_r, size_t len_r, struct passwd **pwd_entry)
+{
+ return getpwuid_r (user_id, pwd_r, buf_r, len_r, pwd_entry);
+}
+
+/* This is used on HPUX 10.20 */
+template <typename T_uid, typename T_passwd, typename T_buf, typename T_len>
+static inline int
+getpwuid_adaptor(int (*getpwuid_r)(T_uid user_id, T_passwd *pwd_r,
+ T_buf *buf_r, T_len len_r),
+ uid_t user_id, struct passwd *pwd_r,
+ char *buf_r, size_t len_r, struct passwd **pwd_entry)
+{
+ return getpwuid_r (user_id, pwd_r, buf_r, len_r);
+}
+
+/* This is used on IRIX 5.2. */
+template <typename T_uid, typename T_passwd, typename T_buf, typename T_len>
+static inline int
+getpwuid_adaptor(T_passwd * (*getpwuid_r)(T_uid user_id, T_passwd *pwd_r,
+ T_buf *buf_r, T_len len_r),
+ uid_t user_id, struct passwd *pwd_r,
+ char *buf_r, size_t len_r, struct passwd **pwd_entry)
+{
+ *pwd_entry = getpwuid_r (user_id, pwd_r, buf_r, len_r);
+ return (*pwd_entry == NULL) ? errno : 0;
+}
+#endif
+
+void
+gnu::classpath::SystemProperties::insertSystemProperties (java::util::Properties *newprops)
+{
+ // A convenience define.
+#define SET(Prop,Val) \
+ newprops->put(JvNewStringLatin1 (Prop), JvNewStringLatin1 (Val))
+
+ // A mixture of the Java Product Versioning Specification
+ // (introduced in 1.2), and earlier versioning properties. Some
+ // programs rely on seeing values that they expect, so we claim to
+ // be a 1.4-ish VM for their sake.
+ SET ("java.version", JV_VERSION);
+ SET ("java.runtime.version", JV_VERSION);
+ SET ("java.vendor", "Free Software Foundation, Inc.");
+ SET ("java.vendor.url", "http://gcc.gnu.org/java/");
+ SET ("java.class.version", "46.0");
+ SET ("java.vm.specification.version", "1.0");
+ SET ("java.vm.specification.name", "Java(tm) Virtual Machine Specification");
+ SET ("java.vm.specification.vendor", "Sun Microsystems Inc.");
+ SET ("java.vm.version", __VERSION__);
+ SET ("java.vm.vendor", "Free Software Foundation, Inc.");
+ SET ("java.vm.name", "GNU libgcj");
+ SET ("java.specification.version", JV_API_VERSION);
+ SET ("java.specification.name", "Java(tm) Platform API Specification");
+ SET ("java.specification.vendor", "Sun Microsystems Inc.");
+
+ char value[100];
+#define NAME "GNU libgcj "
+ strcpy (value, NAME);
+ strncpy (value + sizeof (NAME) - 1, __VERSION__,
+ sizeof(value) - sizeof(NAME));
+ value[sizeof (value) - 1] = '\0';
+ jstring version = JvNewStringLatin1 (value);
+ newprops->put (JvNewStringLatin1 ("java.fullversion"), version);
+ newprops->put (JvNewStringLatin1 ("java.vm.info"), version);
+
+ // This definition is rather arbitrary: we choose $(prefix). In
+ // part we do this because most people specify only --prefix and
+ // nothing else when installing gcj. Plus, people are free to
+ // redefine `java.home' with `-D' if necessary.
+ SET ("java.home", JAVA_HOME);
+ SET ("gnu.classpath.home", PREFIX);
+ // This is set to $(libdir) because we use this to find .security
+ // files at runtime.
+ char val2[sizeof ("file://") + sizeof (LIBDIR) + 1];
+ strcpy (val2, "file://");
+ strcat (val2, LIBDIR);
+ SET ("gnu.classpath.home.url", val2);
+
+ SET ("file.encoding", default_file_encoding);
+
+#ifdef HAVE_UNAME
+ struct utsname u;
+ if (! uname (&u))
+ {
+ SET ("os.name", u.sysname);
+ SET ("os.version", u.release);
+
+ // Normalize x86 architecture names to "i386" (except on Windows, which
+ // is handled in win32.cc).
+ if (u.machine[0] == 'i'
+ && u.machine[1] != 0
+ && u.machine[2] == '8'
+ && u.machine[3] == '6'
+ && u.machine[4] == 0)
+ SET ("os.arch", "i386");
+ else
+ SET ("os.arch", u.machine);
+ }
+ else
+ {
+ SET ("os.name", "unknown");
+ SET ("os.arch", "unknown");
+ SET ("os.version", "unknown");
+ }
+#endif /* HAVE_UNAME */
+
+#ifndef NO_GETUID
+#ifdef HAVE_PWD_H
+ uid_t user_id = getuid ();
+ struct passwd *pwd_entry;
+
+#ifdef HAVE_GETPWUID_R
+ struct passwd pwd_r;
+ size_t len_r = 200;
+ char *buf_r = (char *) _Jv_AllocBytes (len_r);
+
+ while (buf_r != NULL)
+ {
+ int r = getpwuid_adaptor (getpwuid_r, user_id, &pwd_r,
+ buf_r, len_r, &pwd_entry);
+ if (r == 0)
+ break;
+ else if (r != ERANGE)
+ {
+ pwd_entry = NULL;
+ break;
+ }
+ len_r *= 2;
+ buf_r = (char *) _Jv_AllocBytes (len_r);
+ }
+#else
+ pwd_entry = getpwuid (user_id);
+#endif /* HAVE_GETPWUID_R */
+
+ if (pwd_entry != NULL)
+ {
+ SET ("user.name", pwd_entry->pw_name);
+ SET ("user.home", pwd_entry->pw_dir);
+ }
+#endif /* HAVE_PWD_H */
+#endif /* NO_GETUID */
+
+#ifdef HAVE_GETCWD
+#ifdef HAVE_UNISTD_H
+ /* Use getcwd to set "user.dir". */
+ int buflen = 250;
+ char *buffer = (char *) malloc (buflen);
+ while (buffer != NULL)
+ {
+ if (getcwd (buffer, buflen) != NULL)
+ {
+ SET ("user.dir", buffer);
+ break;
+ }
+ if (errno != ERANGE)
+ break;
+ buflen = 2 * buflen;
+ buffer = (char *) realloc (buffer, buflen);
+ }
+ if (buffer != NULL)
+ free (buffer);
+#endif /* HAVE_UNISTD_H */
+#endif /* HAVE_GETCWD */
+
+ // Set user locale properties based on setlocale()
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ // We let the user choose the locale. However, since Java differs
+ // from POSIX, we arbitrarily pick LC_MESSAGES as determining the
+ // Java locale. We can't use LC_ALL because it might return a full
+ // list of all the settings. If we don't have LC_MESSAGES then we
+ // just default to `en_US'.
+ setlocale (LC_ALL, "");
+ char *locale = setlocale (LC_MESSAGES, "");
+ if (locale && strlen (locale) >= 2)
+ {
+ char buf[3];
+ buf[2] = '\0';
+ // copy the first two chars to user.language
+ strncpy (buf, locale, 2);
+ SET ("user.language", buf);
+ // if the next char is a '_', copy the two after that to user.region
+ locale += 2;
+ if (locale[0] == '_')
+ {
+ locale++;
+ strncpy (buf, locale, 2);
+ SET ("user.region", buf);
+ }
+ }
+ else
+#endif /* HAVE_SETLOCALE and HAVE_LC_MESSAGES */
+ {
+ SET ("user.language", "en");
+ SET ("user.region", "US");
+ }
+
+ // The java extensions directory.
+ SET ("java.ext.dirs", JAVA_EXT_DIRS);
+
+ // The endorsed directories that libgcj knows about by default.
+ // This is a way to get other jars into the boot class loader
+ // without overriding java.endorsed.dirs.
+ SET ("gnu.gcj.runtime.endorsed.dirs", GCJ_ENDORSED_DIRS);
+
+ // The path to libgcj's boot classes
+ SET ("sun.boot.class.path", BOOT_CLASS_PATH);
+
+ // If there is a default system database, set it.
+ SET ("gnu.gcj.precompiled.db.path", LIBGCJ_DEFAULT_DATABASE);
+
+ // Set some properties according to whatever was compiled in with
+ // `-D'. Important: after this point, the only properties that
+ // should be set are those which either the user cannot meaningfully
+ // override, or which augment whatever value the user has provided.
+ for (int i = 0; i < _Jv_Properties_Count; ++i)
+ {
+ const char *s, *p;
+ // Find the `='.
+ for (s = p = _Jv_Compiler_Properties[i]; *s && *s != '='; ++s)
+ ;
+ jstring name = JvNewStringLatin1 (p, s - p);
+ jstring val = JvNewStringLatin1 (*s == '=' ? s + 1 : s);
+ newprops->put (name, val);
+ }
+
+ // Set the system properties from the user's environment.
+#ifndef DISABLE_GETENV_PROPERTIES
+ if (_Jv_Environment_Properties)
+ {
+ size_t i = 0;
+
+ while (_Jv_Environment_Properties[i].key)
+ {
+ SET (_Jv_Environment_Properties[i].key,
+ _Jv_Environment_Properties[i].value);
+ i++;
+ }
+ }
+#endif
+
+ // The name used to invoke this process (argv[0] in C).
+ SET ("gnu.gcj.progname", _Jv_GetSafeArg (0));
+
+ // Allow platform specific settings and overrides.
+ _Jv_platform_initProperties (newprops);
+
+ // If java.library.path is set, tell libltdl so we search the new
+ // directories as well. FIXME: does this work properly on Windows?
+ ::java::lang::String *path = newprops->getProperty(JvNewStringLatin1("java.library.path"));
+ if (path)
+ {
+ char *val = (char *) _Jv_Malloc (JvGetStringUTFLength (path) + 1);
+ jsize total = JvGetStringUTFRegion (path, 0, path->length(), val);
+ val[total] = '\0';
+ _Jv_SetDLLSearchPath (val);
+ _Jv_Free (val);
+ }
+ else
+ {
+ // Set a value for user code to see.
+ // FIXME: JDK sets this to the actual path used, including
+ // LD_LIBRARY_PATH, etc.
+ SET ("java.library.path", "");
+ }
+
+ // If java.class.path is still not set then set it according to the
+ // CLASSPATH environment variable if given. See gij.cc main () and
+ // prims.cc _Jv_CreateJavaVM () for all the ways this could have
+ // been set much earlier.
+ // If CLASSPATH isn't set or if the path is empty fall back to "."
+ path = newprops->getProperty(JvNewStringLatin1("java.class.path"));
+ if (!path)
+ {
+ char *classpath = getenv("CLASSPATH");
+ if (classpath && classpath[0] != 0)
+ {
+ path = JvNewStringLatin1 (classpath);
+ newprops->put(JvNewStringLatin1 ("java.class.path"), path);
+ }
+ }
+
+ if (!path || path->length() == 0)
+ SET ("java.class.path", ".");
+}
+
+jboolean
+gnu::classpath::SystemProperties::isWordsBigEndian (void)
+{
+ union
+ {
+ long lval;
+ char cval;
+ } u;
+
+ u.lval = 1;
+ return u.cval == 0;
+}
+
diff --git a/libjava/gnu/javax/swing/text/html/package.html b/libjava/gnu/javax/swing/text/html/package.html
new file mode 100644
index 00000000000..622c4fcc126
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/package.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.swing.text.html package.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - javax.swing.text.html</title></head>
+
+<body>
+<p> Provides supporting classes for web browsers,
+ web robots, web page content analysers, web editors and
+ other applications applications working with Hypertext
+ Markup Language (HTML).
+</p>
+
+</body>
+</html>
diff --git a/libjava/gnu/javax/swing/text/html/parser/HTML_401F.java b/libjava/gnu/javax/swing/text/html/parser/HTML_401F.java
new file mode 100755
index 00000000000..bd2f9f9f862
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/HTML_401F.java
@@ -0,0 +1,3729 @@
+/* HTML_401F.java -- HTML 4.01 FRAMESET DTD java conception.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser;
+
+import gnu.javax.swing.text.html.parser.models.PCDATAonly_model;
+import gnu.javax.swing.text.html.parser.models.TableRowContentModel;
+import gnu.javax.swing.text.html.parser.models.noTagModel;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import javax.swing.text.html.parser.*;
+import javax.swing.text.html.parser.ContentModel;
+import javax.swing.text.html.parser.DTDConstants;
+
+/**
+ * This class represents the java implementation of the HTML 4.01
+ * ( -//W3C//DTD HTML 4.01 Frameset//EN ) Frameset version. The
+ * Frameset version includes as recommended, as obsoleted features and
+ * also the frameset support. This the default DTD to parse HTML
+ * documents in this implementation, containing 315 pre-defined general
+ * entities and 92 elements.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class HTML_401F
+ extends gnuDTD
+ implements DTDConstants, Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ /**
+ * The standard name of this DTD,
+ * '-//W3C//DTD HTML 4.01 Frameset//EN'
+ */
+ public static final String DTD_NAME = "-//W3C//DTD HTML 4.01 Frameset//EN";
+
+ /**
+ * The integer representing length in pixels.
+ */
+ static final int PIXELS = NUMBER;
+
+ static final String[] NONE = new String[0];
+
+ /* Define the HTML tags. */
+ static final String PCDATA = "#pcdata";
+ static final String A = "a";
+ static final String ABBR = "abbr";
+ static final String ACRONYM = "acronym";
+ static final String ADDRESS = "address";
+ static final String APPLET = "applet";
+ static final String AREA = "area";
+ static final String B = "b";
+ static final String BASE = "base";
+ static final String BASEFONT = "basefont";
+ static final String BDO = "bdo";
+ static final String BIG = "big";
+ static final String BLOCKQUOTE = "blockquote";
+ static final String BODY = "body";
+ static final String BR = "br";
+ static final String BUTTON = "button";
+ static final String CAPTION = "caption";
+ static final String CENTER = "center";
+ static final String CITE = "cite";
+ static final String CODE = "code";
+ static final String COL = "col";
+ static final String COLGROUP = "colgroup";
+ static final String DEFAULTS = "default";
+ static final String DD = "dd";
+ static final String DEL = "del";
+ static final String DFN = "dfn";
+ static final String DIR = "dir";
+ static final String DIV = "div";
+ static final String DL = "dl";
+ static final String DT = "dt";
+ static final String EM = "em";
+ static final String FIELDSET = "fieldset";
+ static final String FONT = "font";
+ static final String FORM = "form";
+ static final String FRAME = "frame";
+ static final String FRAMESET = "frameset";
+ static final String H1 = "h1";
+ static final String H2 = "h2";
+ static final String H3 = "h3";
+ static final String H4 = "h4";
+ static final String H5 = "h5";
+ static final String H6 = "h6";
+ static final String HEAD = "head";
+ static final String HR = "hr";
+ static final String HTML = "html";
+ static final String I = "i";
+ static final String IFRAME = "iframe";
+ static final String IMG = "img";
+ static final String INPUT = "input";
+ static final String INS = "ins";
+ static final String ISINDEX = "isindex";
+ static final String KBD = "kbd";
+ static final String LABEL = "label";
+ static final String LEGEND = "legend";
+ static final String LI = "li";
+ static final String LINK = "link";
+ static final String MAP = "map";
+ static final String MENU = "menu";
+ static final String META = "meta";
+ static final String NOFRAMES = "noframes";
+ static final String NOSCRIPT = "noscript";
+ static final String NONES = "none";
+ static final String sNAME = "name";
+ static final String OBJECT = "object";
+ static final String OL = "ol";
+ static final String OPTGROUP = "optgroup";
+ static final String OPTION = "option";
+ static final String P = "p";
+ static final String PARAM = "param";
+ static final String PRE = "pre";
+ static final String Q = "q";
+ static final String S = "s";
+ static final String SAMP = "samp";
+ static final String SCRIPT = "script";
+ static final String SELECT = "select";
+ static final String SMALL = "small";
+ static final String SPAN = "span";
+ static final String STRIKE = "strike";
+ static final String STRONG = "strong";
+ static final String STYLE = "style";
+ static final String SUB = "sub";
+ static final String SUP = "sup";
+ static final String TABLE = "table";
+ static final String TBODY = "tbody";
+ static final String TD = "td";
+ static final String TEXTAREA = "textarea";
+ static final String TFOOT = "tfoot";
+ static final String TH = "th";
+ static final String THEAD = "thead";
+ static final String TITLE = "title";
+ static final String TR = "tr";
+ static final String TT = "tt";
+ static final String U = "u";
+ static final String UL = "ul";
+ static final String VAR = "var";
+
+ /* Define the attribute constants. */
+ static final String C_0 = "0";
+ static final String C_1 = "1";
+ static final String CHECKBOX = "checkbox";
+ static final String DATA = "data";
+ static final String FILE = "file";
+ static final String GET = "get";
+ static final String HIDDEN = "hidden";
+ static final String IMAGE = "image";
+ static final String PASSWORD = "password";
+ static final String POST = "post";
+ static final String RADIO = "radio";
+ static final String REF = "ref";
+ static final String RESET = "reset";
+ static final String SUBMIT = "submit";
+ static final String TEXT = "text";
+ static final String ABOVE = "above";
+ static final String ACCEPT = "accept";
+ static final String ACCEPTCHARSET = "accept-charset";
+ static final String ACCESSKEY = "accesskey";
+ static final String ACTION = "action";
+ static final String ALIGN = "align";
+ static final String ALINK = "alink";
+ static final String ALL = "all";
+ static final String ALT = "alt";
+ static final String APPLICATION_X_WWW_FORM_URLENCODED
+ = "application/x-www-form-urlencoded";
+ static final String ARCHIVE = "archive";
+ static final String AUTO = "auto";
+ static final String AXIS = "axis";
+ static final String BACKGROUND = "background";
+ static final String BASELINE = "baseline";
+ static final String BELOW = "below";
+ static final String BGCOLOR = "bgcolor";
+ static final String BORDER = "border";
+ static final String BOTTOM = "bottom";
+ static final String BOX = "box";
+ static final String CELLPADDING = "cellpadding";
+ static final String CELLSPACING = "cellspacing";
+ static final String CHAR = "char";
+ static final String CHAROFF = "charoff";
+ static final String CHARSET = "charset";
+ static final String CHECKED = "checked";
+ static final String CIRCLE = "circle";
+ static final String CLASS = "class";
+ static final String CLASSID = "classid";
+ static final String CLEAR = "clear";
+ static final String CODEBASE = "codebase";
+ static final String CODETYPE = "codetype";
+ static final String COLOR = "color";
+ static final String COLS = "cols";
+ static final String COLSPAN = "colspan";
+ static final String COMPACT = "compact";
+ static final String CONTENT = "content";
+ static final String COORDS = "coords";
+ static final String DATAPAGESIZE = "datapagesize";
+ static final String DATETIME = "datetime";
+ static final String DECLARE = "declare";
+ static final String DEFER = "defer";
+ static final String DISABLED = "disabled";
+ static final String DISC = "disc";
+ static final String ENCTYPE = "enctype";
+ static final String EVENT = "event";
+ static final String FACE = "face";
+ static final String FOR = "for";
+ static final String FRAMEBORDER = "frameborder";
+ static final String GROUPS = "groups";
+ static final String HEADERS = "headers";
+ static final String HEIGHT = "height";
+ static final String HREF = "href";
+ static final String HREFLANG = "hreflang";
+ static final String HSIDES = "hsides";
+ static final String HSPACE = "hspace";
+ static final String HTTPEQUIV = "http-equiv";
+ static final String sID = "id";
+ static final String ISMAP = "ismap";
+ static final String JUSTIFY = "justify";
+ static final String LANG = "lang";
+ static final String LANGUAGE = "language";
+ static final String LEFT = "left";
+ static final String LHS = "lhs";
+ static final String LONGDESC = "longdesc";
+ static final String LTR = "ltr";
+ static final String MARGINHEIGHT = "marginheight";
+ static final String MARGINWIDTH = "marginwidth";
+ static final String MAXLENGTH = "maxlength";
+ static final String MEDIA = "media";
+ static final String METHOD = "method";
+ static final String MIDDLE = "middle";
+ static final String MULTIPLE = "multiple";
+ static final String NO = "no";
+ static final String NOHREF = "nohref";
+ static final String NORESIZE = "noresize";
+ static final String NOSHADE = "noshade";
+ static final String NOWRAP = "nowrap";
+ static final String ONBLUR = "onblur";
+ static final String ONCHANGE = "onchange";
+ static final String ONCLICK = "onclick";
+ static final String ONDBLCLICK = "ondblclick";
+ static final String ONFOCUS = "onfocus";
+ static final String ONKEYDOWN = "onkeydown";
+ static final String ONKEYPRESS = "onkeypress";
+ static final String ONKEYUP = "onkeyup";
+ static final String ONLOAD = "onload";
+ static final String ONMOUSEDOWN = "onmousedown";
+ static final String ONMOUSEMOVE = "onmousemove";
+ static final String ONMOUSEOUT = "onmouseout";
+ static final String ONMOUSEOVER = "onmouseover";
+ static final String ONMOUSEUP = "onmouseup";
+ static final String ONRESET = "onreset";
+ static final String ONSELECT = "onselect";
+ static final String ONSUBMIT = "onsubmit";
+ static final String ONUNLOAD = "onunload";
+ static final String POLY = "poly";
+ static final String PROFILE = "profile";
+ static final String PROMPT = "prompt";
+ static final String READONLY = "readonly";
+ static final String RECT = "rect";
+ static final String REL = "rel";
+ static final String REV = "rev";
+ static final String RHS = "rhs";
+ static final String RIGHT = "right";
+ static final String ROW = "row";
+ static final String ROWGROUP = "rowgroup";
+ static final String ROWS = "rows";
+ static final String ROWSPAN = "rowspan";
+ static final String RTL = "rtl";
+ static final String RULES = "rules";
+ static final String SCHEME = "scheme";
+ static final String SCOPE = "scope";
+ static final String SCROLLING = "scrolling";
+ static final String SELECTED = "selected";
+ static final String SHAPE = "shape";
+ static final String SIZE = "size";
+ static final String SQUARE = "square";
+ static final String SRC = "src";
+ static final String STANDBY = "standby";
+ static final String START = "start";
+ static final String SUMMARY = "summary";
+ static final String TABINDEX = "tabindex";
+ static final String TARGET = "target";
+ static final String TOP = "top";
+ static final String TYPE = "type";
+ static final String USEMAP = "usemap";
+ static final String VALIGN = "valign";
+ static final String VALUE = "value";
+ static final String VALUETYPE = "valuetype";
+ static final String VERSION = "version";
+ static final String VLINK = "vlink";
+ static final String VOID = "void";
+ static final String VSIDES = "vsides";
+ static final String VSPACE = "vspace";
+ static final String WIDTH = "width";
+ static final String YES = "yes";
+
+ static final String[] BLOCK =
+ new String[] {
+ ADDRESS, BLOCKQUOTE, CENTER, DIR,
+ DIV, DL, FIELDSET, FORM,
+ H1, H2, H3, H4, H5, H6,
+ HR, ISINDEX, MENU, NOFRAMES, NOSCRIPT,
+ OL, P, PRE, TABLE, UL
+ };
+
+ /**
+ * Creates this DTD, filling in the entities and attributes data
+ * as defined in -//W3C//DTD HTML 4.01 Frameset//EN.
+ */
+ protected HTML_401F()
+ {
+ super(DTD_NAME);
+ defineEntities();
+ defineElements();
+ }
+
+ /**
+ * Either takes the document (by name) from DTD table, or
+ * creates a new instance and registers it in the tabe.
+ * The document is registerd under name "-//W3C//DTD HTML 4.01 Frameset//EN".
+ * @return The new or existing DTD for parsing HTML 4.01 Frameset.
+ */
+ public static DTD getInstance()
+ {
+ try
+ {
+ DTD dtd = getDTD(DTD_NAME);
+ if (dtd == null || dtd.getClass().equals(DTD.class))
+ {
+ dtd = new HTML_401F();
+ putDTDHash(DTD_NAME, dtd);
+ }
+ return dtd;
+ }
+ catch (IOException ex)
+ {
+ throw new Error("This should never happen. Report the bug.", ex);
+ }
+ }
+
+ /**
+ * Define all elements of this DTD.
+ */
+ protected void defineElements()
+ {
+ /* Define the elements. */
+ defElement(PCDATA, 0, false, false, null, NONE, NONE,
+ new AttributeList[ 0 ]);
+
+ defElement(A, 0, false, false, null,
+ new String[] {
+ A
+ }
+ ,
+ new String[] {
+ PCDATA, ABBR, ACRONYM, APPLET,
+ B, BASEFONT, BDO, BIG, BR,
+ BUTTON, CITE, CODE, DFN, EM,
+ FONT, I, IFRAME, IMG, INPUT,
+ KBD, LABEL, MAP, OBJECT, Q,
+ S, SAMP, SCRIPT, SELECT, SMALL,
+ SPAN, STRIKE, STRONG, SUB, SUP,
+ TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(CHARSET, null, null, 0, IMPLIED),
+ attr(TYPE, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(HREF, null, null, 0, IMPLIED),
+ attr(HREFLANG, null, null, 0, IMPLIED),
+ attr(TARGET, null, null, 0, IMPLIED),
+ attr(REL, null, null, 0, IMPLIED),
+ attr(REV, null, null, 0, IMPLIED),
+ attr(ACCESSKEY, null, null, 0, IMPLIED),
+ attr(SHAPE, RECT, new String[] { RECT, CIRCLE, POLY, DEFAULTS },
+ 0, DEFAULT),
+ attr(COORDS, null, null, 0, IMPLIED),
+ attr(TABINDEX, null, null, NUMBER, IMPLIED),
+ attr(ONFOCUS, null, null, 0, IMPLIED),
+ attr(ONBLUR, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(ABBR, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(ACRONYM, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(ADDRESS, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ P
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(APPLET, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL, PARAM
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(CODEBASE, null, null, 0, IMPLIED),
+ attr(ARCHIVE, null, null, 0, IMPLIED),
+ attr(CODE, null, null, 0, IMPLIED),
+ attr(OBJECT, null, null, 0, IMPLIED),
+ attr(ALT, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, REQUIRED),
+ attr(HEIGHT, null, null, 0, REQUIRED),
+ attr(ALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, LEFT, RIGHT },
+ 0, IMPLIED),
+ attr(HSPACE, null, null, 0, IMPLIED),
+ attr(VSPACE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(AREA, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(SHAPE, RECT, new String[] { RECT, CIRCLE, POLY, DEFAULTS },
+ 0, DEFAULT),
+ attr(COORDS, null, null, 0, IMPLIED),
+ attr(HREF, null, null, 0, IMPLIED),
+ attr(TARGET, null, null, 0, IMPLIED),
+ attr(NOHREF, null, new String[] { NOHREF }, 0, IMPLIED),
+ attr(ALT, null, null, 0, REQUIRED),
+ attr(TABINDEX, null, null, NUMBER, IMPLIED),
+ attr(ACCESSKEY, null, null, 0, IMPLIED),
+ attr(ONFOCUS, null, null, 0, IMPLIED),
+ attr(ONBLUR, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(B, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(BASE, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(HREF, null, null, 0, IMPLIED),
+ attr(TARGET, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(BASEFONT, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(SIZE, null, null, 0, REQUIRED),
+ attr(COLOR, null, null, 0, IMPLIED),
+ attr(FACE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(BDO, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, REQUIRED)
+ }
+ );
+ defElement(BIG, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(BLOCKQUOTE, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(CITE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(BODY, 0, true, true, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DEL, DIR,
+ DIV, DL, FIELDSET, FORM, H1,
+ H2, H3, H4, H5, H6,
+ HR, INS, ISINDEX, MENU, NOFRAMES,
+ NOSCRIPT, OL, P, PRE, TABLE,
+ UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ONLOAD, null, null, 0, IMPLIED),
+ attr(ONUNLOAD, null, null, 0, IMPLIED),
+ attr(BACKGROUND, null, null, 0, IMPLIED),
+ attr(BGCOLOR, null, null, 0, IMPLIED),
+ attr(TEXT, null, null, 0, IMPLIED),
+ attr(LINK, null, null, 0, IMPLIED),
+ attr(VLINK, null, null, 0, IMPLIED),
+ attr(ALINK, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(BR, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(CLEAR, "NONE", new String[] { LEFT, ALL, RIGHT, NONES },
+ 0, DEFAULT)
+ }
+ );
+ defElement(BUTTON, 0, false, false, null,
+ new String[] {
+ A, BUTTON, IFRAME, INPUT,
+ LABEL, SELECT, TEXTAREA, FIELDSET, FORM,
+ ISINDEX
+ }
+ ,
+ new String[] {
+ PCDATA, ABBR, ACRONYM, APPLET,
+ B, BASEFONT, BDO, BIG, BR,
+ CITE, CODE, DFN, EM, FONT,
+ I, IMG, KBD, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SMALL,
+ SPAN, STRIKE, STRONG, SUB, SUP,
+ TT, U, VAR, ADDRESS, BLOCKQUOTE,
+ CENTER, DIR, DIV, DL, H1,
+ H2, H3, H4, H5, H6,
+ HR, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(VALUE, null, null, 0, IMPLIED),
+ attr(TYPE, SUBMIT, new String[] { BUTTON, SUBMIT, RESET }, 0, DEFAULT),
+ attr(DISABLED, null, new String[] { DISABLED }, 0, IMPLIED),
+ attr(TABINDEX, null, null, NUMBER, IMPLIED),
+ attr(ACCESSKEY, null, null, 0, IMPLIED),
+ attr(ONFOCUS, null, null, 0, IMPLIED),
+ attr(ONBLUR, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(CAPTION, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { TOP, BOTTOM, LEFT, RIGHT },
+ 0, IMPLIED)
+ }
+ );
+ defElement(CENTER, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(CITE, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(CODE, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(COL, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(SPAN, C_1, null, NUMBER, DEFAULT),
+ attr(WIDTH, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED)
+ }
+ );
+ defElement(COLGROUP, 0, false, true, null,
+ NONE
+ ,
+ new String[] {
+ COL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(SPAN, C_1, null, NUMBER, DEFAULT),
+ attr(WIDTH, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED)
+ }
+ );
+ defElement(DD, 0, false, true, new ContentModel(0,
+ new noTagModel( new String[] { DD, DT } ), null ),
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(DEL, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(CITE, null, null, 0, IMPLIED),
+ attr(DATETIME, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(DFN, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(DIR, 0, false, false, createListModel(),
+ new String[] {
+ ADDRESS, BLOCKQUOTE, CENTER, DIR,
+ DIV, DL, FIELDSET, FORM, H1,
+ H2, H3, H4, H5, H6,
+ HR, ISINDEX, MENU, NOFRAMES, NOSCRIPT,
+ OL, P, PRE, TABLE, UL
+ }
+ ,
+ new String[] {
+ LI, UL, OL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(COMPACT, null, new String[] { COMPACT }, 0, IMPLIED)
+ }
+ );
+ defElement(DIV, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(DL, 0, false, false, createDefListModel(),
+ NONE
+ ,
+ new String[] {
+ DD, DT
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(COMPACT, null, new String[] { COMPACT }, 0, IMPLIED)
+ }
+ );
+ defElement(DT, 0, false, true,
+ new ContentModel(0,
+ new noTagModel( new String[] { DT, DD } ), null),
+ BLOCK
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(EM, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(FIELDSET, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL, LEGEND
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(FONT, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(SIZE, null, null, 0, IMPLIED),
+ attr(COLOR, null, null, 0, IMPLIED),
+ attr(FACE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(FORM, 0, false, false, null,
+ new String[] {
+ FORM
+ }
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, H1, H2, H3,
+ H4, H5, H6, HR, ISINDEX,
+ MENU, NOFRAMES, NOSCRIPT, OL, P,
+ PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ACTION, null, null, 0, REQUIRED),
+ attr(METHOD, GET, new String[] { GET, POST }, 0, DEFAULT),
+ attr(ENCTYPE, APPLICATION_X_WWW_FORM_URLENCODED, null, 0, DEFAULT),
+ attr(ACCEPT, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(ONSUBMIT, null, null, 0, IMPLIED),
+ attr(ONRESET, null, null, 0, IMPLIED),
+ attr(TARGET, null, null, 0, IMPLIED),
+ attr(ACCEPTCHARSET, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(FRAME, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LONGDESC, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(SRC, null, null, 0, IMPLIED),
+ attr(FRAMEBORDER, C_1, new String[] { C_1, C_0 }, 0, DEFAULT),
+ attr(MARGINWIDTH, null, null, PIXELS, IMPLIED),
+ attr(MARGINHEIGHT, null, null, PIXELS, IMPLIED),
+ attr(NORESIZE, null, new String[] { NORESIZE }, 0, IMPLIED),
+ attr(SCROLLING, AUTO, new String[] { YES, NO, AUTO }, 0, DEFAULT)
+ }
+ );
+ defElement(FRAMESET, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ NOFRAMES, FRAME, FRAMESET
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(ROWS, null, null, 0, IMPLIED),
+ attr(COLS, null, null, 0, IMPLIED),
+ attr(ONLOAD, null, null, 0, IMPLIED),
+ attr(ONUNLOAD, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(H1, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(H2, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(H3, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(H4, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(H5, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(H6, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(HEAD, 0, true, true, null,
+ new String[] {
+ BODY
+ }
+ ,
+ new String[] {
+ TITLE, ISINDEX, BASE,
+ SCRIPT, STYLE, META, LINK, OBJECT
+ }
+ ,
+ new AttributeList[] {
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(PROFILE, null, null, 0, IMPLIED)
+ }
+ );
+
+ defElement(HR, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT }, 0, IMPLIED),
+ attr(NOSHADE, null, new String[] { NOSHADE }, 0, IMPLIED),
+ attr(SIZE, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(HTML, 0, true, true, createHtmlContentModel(),
+ NONE
+ ,
+ new String[] {
+ HEAD, BODY
+ }
+ ,
+ new AttributeList[] {
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(VERSION, DTD_NAME, null, 0, FIXED)
+ }
+ );
+ defElement(I, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(IFRAME, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LONGDESC, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(SRC, null, null, 0, IMPLIED),
+ attr(FRAMEBORDER, C_1, new String[] { C_1, C_0 }, 0, DEFAULT),
+ attr(MARGINWIDTH, null, null, PIXELS, IMPLIED),
+ attr(MARGINHEIGHT, null, null, PIXELS, IMPLIED),
+ attr(SCROLLING, AUTO, new String[] { YES, NO, AUTO }, 0, DEFAULT),
+ attr(ALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, LEFT, RIGHT },
+ 0, IMPLIED),
+ attr(HEIGHT, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(IMG, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(SRC, null, null, 0, REQUIRED),
+ attr(ALT, null, null, 0, REQUIRED),
+ attr(LONGDESC, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(HEIGHT, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, IMPLIED),
+ attr(USEMAP, null, null, 0, IMPLIED),
+ attr(ISMAP, null, new String[] { ISMAP }, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, LEFT, RIGHT },
+ 0, IMPLIED),
+ attr(BORDER, null, null, PIXELS, IMPLIED),
+ attr(HSPACE, null, null, 0, IMPLIED),
+ attr(VSPACE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(INPUT, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(TYPE, TEXT, new String[] { TEXT, PASSWORD, CHECKBOX, RADIO,
+ SUBMIT, RESET, FILE, HIDDEN, IMAGE, BUTTON }, 0, DEFAULT),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(VALUE, null, null, 0, IMPLIED),
+ attr(CHECKED, null, new String[] { CHECKED }, 0, IMPLIED),
+ attr(DISABLED, null, new String[] { DISABLED }, 0, IMPLIED),
+ attr(READONLY, null, new String[] { READONLY }, 0, IMPLIED),
+ attr(SIZE, null, null, 0, IMPLIED),
+ attr(MAXLENGTH, null, null, 0, IMPLIED),
+ attr(SRC, null, null, 0, IMPLIED),
+ attr(ALT, null, null, 0, IMPLIED),
+ attr(USEMAP, null, null, 0, IMPLIED),
+ attr(ISMAP, null, new String[] { ISMAP }, 0, IMPLIED),
+ attr(TABINDEX, null, null, NUMBER, IMPLIED),
+ attr(ACCESSKEY, null, null, 0, IMPLIED),
+ attr(ONFOCUS, null, null, 0, IMPLIED),
+ attr(ONBLUR, null, null, 0, IMPLIED),
+ attr(ONSELECT, null, null, 0, IMPLIED),
+ attr(ONCHANGE, null, null, 0, IMPLIED),
+ attr(ACCEPT, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, LEFT, RIGHT },
+ 0, IMPLIED)
+ }
+ );
+ defElement(INS, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(CITE, null, null, 0, IMPLIED),
+ attr(DATETIME, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(ISINDEX, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(PROMPT, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(KBD, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(LABEL, 0, false, false, null,
+ new String[] {
+ LABEL
+ }
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, MAP, OBJECT, Q,
+ S, SAMP, SCRIPT, SELECT, SMALL,
+ SPAN, STRIKE, STRONG, SUB, SUP,
+ TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(FOR, null, null, 0, IMPLIED),
+ attr(ACCESSKEY, null, null, 0, IMPLIED),
+ attr(ONFOCUS, null, null, 0, IMPLIED),
+ attr(ONBLUR, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(LEGEND, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ACCESSKEY, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { TOP, BOTTOM, LEFT, RIGHT },
+ 0, IMPLIED)
+ }
+ );
+ // LI has a special content model that will be resolved into
+ // by transformer.
+ defElement(LI, 0, false, true,
+ new ContentModel(0,
+ new noTagModel(LI), null),
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(TYPE, null, null, 0, IMPLIED),
+ attr(VALUE, null, null, NUMBER, IMPLIED)
+ }
+ );
+ defElement(LINK, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(CHARSET, null, null, 0, IMPLIED),
+ attr(HREF, null, null, 0, IMPLIED),
+ attr(HREFLANG, null, null, 0, IMPLIED),
+ attr(TYPE, null, null, 0, IMPLIED),
+ attr(REL, null, null, 0, IMPLIED),
+ attr(REV, null, null, 0, IMPLIED),
+ attr(MEDIA, null, null, 0, IMPLIED),
+ attr(TARGET, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(MAP, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ ADDRESS, BLOCKQUOTE, CENTER, DIR,
+ DIV, DL, FIELDSET, FORM, H1,
+ H2, H3, H4, H5, H6,
+ HR, ISINDEX, MENU, NOFRAMES, NOSCRIPT,
+ OL, P, PRE, TABLE, UL,
+ AREA
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, REQUIRED)
+ }
+ );
+ defElement(MENU, 0, false, false, createListModel(),
+ new String[] {
+ ADDRESS, BLOCKQUOTE, CENTER, DIR,
+ DIV, DL, FIELDSET, FORM, H1,
+ H2, H3, H4, H5, H6,
+ HR, ISINDEX, MENU, NOFRAMES, NOSCRIPT,
+ OL, P, PRE, TABLE, UL
+ }
+ ,
+ new String[] {
+ LI, UL, OL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(COMPACT, null, new String[] { COMPACT }, 0, IMPLIED)
+ }
+ );
+ defElement(META, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(HTTPEQUIV, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, NAME, IMPLIED),
+ attr(CONTENT, null, null, 0, REQUIRED),
+ attr(SCHEME, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(NOFRAMES, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(NOSCRIPT, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(OBJECT, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL, PARAM
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(DECLARE, null, new String[] { DECLARE }, 0, IMPLIED),
+ attr(CLASSID, null, null, 0, IMPLIED),
+ attr(CODEBASE, null, null, 0, IMPLIED),
+ attr(DATA, null, null, 0, IMPLIED),
+ attr(TYPE, null, null, 0, IMPLIED),
+ attr(CODETYPE, null, null, 0, IMPLIED),
+ attr(ARCHIVE, null, null, 0, IMPLIED),
+ attr(STANDBY, null, null, 0, IMPLIED),
+ attr(HEIGHT, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, IMPLIED),
+ attr(USEMAP, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(TABINDEX, null, null, NUMBER, IMPLIED),
+ attr(ALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, LEFT, RIGHT },
+ 0, IMPLIED),
+ attr(BORDER, null, null, PIXELS, IMPLIED),
+ attr(HSPACE, null, null, 0, IMPLIED),
+ attr(VSPACE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(OL, 0, false, false, createListModel(),
+ NONE
+ ,
+ new String[] {
+ // See note on the createListModel method
+ LI, UL, OL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(TYPE, null, null, 0, IMPLIED),
+ attr(COMPACT, null, new String[] { COMPACT }, 0, IMPLIED),
+ attr(START, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(OPTGROUP, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ OPTION
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(DISABLED, null, new String[] { DISABLED }, 0, IMPLIED),
+ attr(LABEL, null, null, 0, REQUIRED)
+ }
+ );
+ defElement(OPTION, 0, false, true, new ContentModel(0,
+ new PCDATAonly_model(), null),
+ NONE,
+ new String[] {
+ PCDATA
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(SELECTED, null, new String[] { SELECTED }, 0, IMPLIED),
+ attr(DISABLED, null, new String[] { DISABLED }, 0, IMPLIED),
+ attr(LABEL, null, null, 0, IMPLIED),
+ attr(VALUE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(P, 0, false, true, new ContentModel( 0,
+ new noTagModel(P), null),
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY },
+ 0, IMPLIED)
+ }
+ );
+ defElement(PARAM, EMPTY, false, true, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(sNAME, null, null, 0, REQUIRED),
+ attr(VALUE, null, null, 0, IMPLIED),
+ attr(VALUETYPE, DATA, new String[] { DATA, REF, OBJECT }, 0, DEFAULT),
+ attr(TYPE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(PRE, 0, false, false, null,
+ new String[] {
+ APPLET, BASEFONT, BIG, FONT,
+ IMG, OBJECT, SMALL, SUB, SUP
+ }
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ B, BDO, BR, BUTTON, CITE,
+ CODE, DFN, EM, I, IFRAME,
+ INPUT, KBD, LABEL, MAP, Q,
+ S, SAMP, SCRIPT, SELECT, SPAN,
+ STRIKE, STRONG, TEXTAREA, TT, U,
+ VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, NUMBER, IMPLIED)
+ }
+ );
+ defElement(Q, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(CITE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(S, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(SAMP, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(SCRIPT, CDATA, false, false, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(CHARSET, null, null, 0, IMPLIED),
+ attr(TYPE, null, null, 0, REQUIRED),
+ attr(LANGUAGE, null, null, 0, IMPLIED),
+ attr(SRC, null, null, 0, IMPLIED),
+ attr(DEFER, null, new String[] { DEFER }, 0, IMPLIED),
+ attr(EVENT, null, null, 0, IMPLIED),
+ attr(FOR, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(SELECT, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ OPTGROUP, OPTION
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(SIZE, null, null, NUMBER, IMPLIED),
+ attr(MULTIPLE, null, new String[] { MULTIPLE }, 0, IMPLIED),
+ attr(DISABLED, null, new String[] { DISABLED }, 0, IMPLIED),
+ attr(TABINDEX, null, null, NUMBER, IMPLIED),
+ attr(ONFOCUS, null, null, 0, IMPLIED),
+ attr(ONBLUR, null, null, 0, IMPLIED),
+ attr(ONCHANGE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(SMALL, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(SPAN, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(STRIKE, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(STRONG, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(STYLE, CDATA, false, false, null,
+ NONE
+ ,
+ NONE
+ ,
+ new AttributeList[] {
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(TYPE, null, null, 0, REQUIRED),
+ attr(MEDIA, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(SUB, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(SUP, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(TABLE, 0, false, false, createTableContentModel(),
+ NONE
+ ,
+ new String[] {
+ CAPTION, COL, COLGROUP, TBODY,
+ TFOOT, THEAD
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(SUMMARY, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, IMPLIED),
+ attr(BORDER, null, null, PIXELS, IMPLIED),
+ attr(FRAME, null, new String[] { VOID, ABOVE, BELOW, HSIDES, LHS, RHS,
+ VSIDES, BOX, BORDER }, 0, IMPLIED),
+ attr(RULES, null, new String[] { NONES, GROUPS, ROWS, COLS, ALL },
+ 0, IMPLIED),
+ attr(CELLSPACING, null, null, 0, IMPLIED),
+ attr(CELLPADDING, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT }, 0, IMPLIED),
+ attr(BGCOLOR, null, null, 0, IMPLIED),
+ attr(DATAPAGESIZE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(TBODY, 0, true, true, model(TR,'+'),
+ NONE
+ ,
+ new String[] {
+ TR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED)
+ }
+ );
+
+ defElement(TD, 0, false, true,
+ new ContentModel(0,
+ new noTagModel(new String[] {"TD", "TH", "TR" } ), null),
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ABBR, null, null, 0, IMPLIED),
+ attr(AXIS, null, null, 0, IMPLIED),
+ attr(HEADERS, null, null, 0, IMPLIED),
+ attr(SCOPE, null, new String[] { ROW, COL, ROWGROUP, COLGROUP },
+ 0, IMPLIED),
+ attr(ROWSPAN, C_1, null, NUMBER, DEFAULT),
+ attr(COLSPAN, C_1, null, NUMBER, DEFAULT),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED),
+ attr(NOWRAP, null, new String[] { NOWRAP }, 0, IMPLIED),
+ attr(BGCOLOR, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, IMPLIED),
+ attr(HEIGHT, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(TEXTAREA, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(sNAME, null, null, 0, IMPLIED),
+ attr(ROWS, null, null, NUMBER, REQUIRED),
+ attr(COLS, null, null, NUMBER, REQUIRED),
+ attr(DISABLED, null, new String[] { DISABLED }, 0, IMPLIED),
+ attr(READONLY, null, new String[] { READONLY }, 0, IMPLIED),
+ attr(TABINDEX, null, null, NUMBER, IMPLIED),
+ attr(ACCESSKEY, null, null, 0, IMPLIED),
+ attr(ONFOCUS, null, null, 0, IMPLIED),
+ attr(ONBLUR, null, null, 0, IMPLIED),
+ attr(ONSELECT, null, null, 0, IMPLIED),
+ attr(ONCHANGE, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(TFOOT, 0, false, true, model(TR,'+'),
+ NONE
+ ,
+ new String[] {
+ TR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED)
+ }
+ );
+ defElement(TH, 0, false, true, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR,
+ ADDRESS, BLOCKQUOTE, CENTER, DIR, DIV,
+ DL, FIELDSET, FORM, H1, H2,
+ H3, H4, H5, H6, HR,
+ ISINDEX, MENU, NOFRAMES, NOSCRIPT, OL,
+ P, PRE, TABLE, UL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ABBR, null, null, 0, IMPLIED),
+ attr(AXIS, null, null, 0, IMPLIED),
+ attr(HEADERS, null, null, 0, IMPLIED),
+ attr(SCOPE, null, new String[] { ROW, COL, ROWGROUP, COLGROUP },
+ 0, IMPLIED),
+ attr(ROWSPAN, C_1, null, NUMBER, DEFAULT),
+ attr(COLSPAN, C_1, null, NUMBER, DEFAULT),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED),
+ attr(NOWRAP, null, new String[] { NOWRAP }, 0, IMPLIED),
+ attr(BGCOLOR, null, null, 0, IMPLIED),
+ attr(WIDTH, null, null, 0, IMPLIED),
+ attr(HEIGHT, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(THEAD, 0, false, true, model(TR,'+'),
+ NONE
+ ,
+ new String[] {
+ TR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED)
+ }
+ );
+ defElement(TITLE, 0, false, false, null,
+ new String[] {
+ OBJECT, SCRIPT, LINK, META,
+ STYLE
+ }
+ ,
+ new String[] {
+ PCDATA
+ }
+ ,
+ new AttributeList[] {
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED)
+ }
+ );
+ defElement(TR, 0, false, true,
+ new ContentModel(0, new TableRowContentModel(this), null),
+ NONE
+ ,
+ new String[] {
+ TD, TH
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(ALIGN, null, new String[] { LEFT, CENTER, RIGHT, JUSTIFY, CHAR },
+ 0, IMPLIED),
+ attr(CHAR, null, null, 0, IMPLIED),
+ attr(CHAROFF, null, null, 0, IMPLIED),
+ attr(VALIGN, null, new String[] { TOP, MIDDLE, BOTTOM, BASELINE },
+ 0, IMPLIED),
+ attr(BGCOLOR, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(TT, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(U, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+ defElement(UL, 0, false, false, createListModel(),
+ NONE
+ ,
+ new String[] {
+ // See note on the createListModel method
+ LI, UL, OL
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED),
+ attr(TYPE, null, new String[] { DISC, SQUARE, CIRCLE }, 0, IMPLIED),
+ attr(COMPACT, null, new String[] { COMPACT }, 0, IMPLIED)
+ }
+ );
+ defElement(VAR, 0, false, false, null,
+ NONE
+ ,
+ new String[] {
+ PCDATA, A, ABBR, ACRONYM,
+ APPLET, B, BASEFONT, BDO, BIG,
+ BR, BUTTON, CITE, CODE, DFN,
+ EM, FONT, I, IFRAME, IMG,
+ INPUT, KBD, LABEL, MAP, OBJECT,
+ Q, S, SAMP, SCRIPT, SELECT,
+ SMALL, SPAN, STRIKE, STRONG, SUB,
+ SUP, TEXTAREA, TT, U, VAR
+ }
+ ,
+ new AttributeList[] {
+ attr(sID, null, null, ID, IMPLIED),
+ attr(CLASS, null, null, 0, IMPLIED),
+ attr(STYLE, null, null, 0, IMPLIED),
+ attr(TITLE, null, null, 0, IMPLIED),
+ attr(LANG, null, null, 0, IMPLIED),
+ attr(DIR, null, new String[] { LTR, RTL }, 0, IMPLIED),
+ attr(ONCLICK, null, null, 0, IMPLIED),
+ attr(ONDBLCLICK, null, null, 0, IMPLIED),
+ attr(ONMOUSEDOWN, null, null, 0, IMPLIED),
+ attr(ONMOUSEUP, null, null, 0, IMPLIED),
+ attr(ONMOUSEOVER, null, null, 0, IMPLIED),
+ attr(ONMOUSEMOVE, null, null, 0, IMPLIED),
+ attr(ONMOUSEOUT, null, null, 0, IMPLIED),
+ attr(ONKEYPRESS, null, null, 0, IMPLIED),
+ attr(ONKEYDOWN, null, null, 0, IMPLIED),
+ attr(ONKEYUP, null, null, 0, IMPLIED)
+ }
+ );
+
+ }
+
+ /**
+ * Define all entities in this DTD.
+ */
+ protected void defineEntities()
+ {
+ /* Define general entities */
+ defineEntity("AElig", 198);
+ defineEntity("Aacute", 193);
+ defineEntity("Acirc", 194);
+ defineEntity("Agrave", 192);
+ defineEntity("Alpha", 913);
+ defineEntity("Aring", 197);
+ defineEntity("Atilde", 195);
+ defineEntity("Auml", 196);
+ defineEntity("Beta", 914);
+ defineEntity("Ccedil", 199);
+ defineEntity("Chi", 935);
+ defineEntity("Dagger", 8225);
+ defineEntity("Delta", 916);
+ defineEntity("ETH", 208);
+ defineEntity("Eacute", 201);
+ defineEntity("Ecirc", 202);
+ defineEntity("Egrave", 200);
+ defineEntity("Epsilon", 917);
+ defineEntity("Eta", 919);
+ defineEntity("Euml", 203);
+ defineEntity("Gamma", 915);
+ defineEntity("Iacute", 205);
+ defineEntity("Icirc", 206);
+ defineEntity("Igrave", 204);
+ defineEntity("Iota", 921);
+ defineEntity("Iuml", 207);
+ defineEntity("Kappa", 922);
+ defineEntity("Lambda", 923);
+ defineEntity("Mu", 924);
+ defineEntity("Ntilde", 209);
+ defineEntity("Nu", 925);
+ defineEntity("OElig", 338);
+ defineEntity("Oacute", 211);
+ defineEntity("Ocirc", 212);
+ defineEntity("Ograve", 210);
+ defineEntity("Omega", 937);
+ defineEntity("Omicron", 927);
+ defineEntity("Oslash", 216);
+ defineEntity("Otilde", 213);
+ defineEntity("Ouml", 214);
+ defineEntity("Phi", 934);
+ defineEntity("Pi", 928);
+ defineEntity("Prime", 8243);
+ defineEntity("Psi", 936);
+ defineEntity("Rho", 929);
+ defineEntity("Scaron", 352);
+ defineEntity("Sigma", 931);
+ defineEntity("THORN", 222);
+ defineEntity("Tau", 932);
+ defineEntity("Theta", 920);
+ defineEntity("Uacute", 218);
+ defineEntity("Ucirc", 219);
+ defineEntity("Ugrave", 217);
+ defineEntity("Upsilon", 933);
+ defineEntity("Uuml", 220);
+ defineEntity("Xi", 926);
+ defineEntity("Yacute", 221);
+ defineEntity("Yuml", 376);
+ defineEntity("Zeta", 918);
+ defineEntity("aacute", 225);
+ defineEntity("acirc", 226);
+ defineEntity("acute", 180);
+ defineEntity("aelig", 230);
+ defineEntity("agrave", 224);
+ defineEntity("alefsym", 8501);
+ defineEntity("alpha", 945);
+ defineEntity("amp", 38);
+ defineEntity("and", 8743);
+ defineEntity("ang", 8736);
+ defineEntity("aring", 229);
+ defineEntity("asymp", 8776);
+ defineEntity("atilde", 227);
+ defineEntity("auml", 228);
+ defineEntity("bdquo", 8222);
+ defineEntity("beta", 946);
+ defineEntity("brvbar", 166);
+ defineEntity("bull", 8226);
+ defineEntity("cap", 8745);
+ defineEntity("ccedil", 231);
+ defineEntity("cedil", 184);
+ defineEntity("cent", 162);
+ defineEntity("chi", 967);
+ defineEntity("circ", 710);
+ defineEntity("clubs", 9827);
+ defineEntity("cong", 8773);
+ defineEntity("copy", 169);
+ defineEntity("crarr", 8629);
+ defineEntity("cup", 8746);
+ defineEntity("curren", 164);
+ defineEntity("dArr", 8659);
+ defineEntity("dagger", 8224);
+ defineEntity("darr", 8595);
+ defineEntity("deg", 176);
+ defineEntity("delta", 948);
+ defineEntity("diams", 9830);
+ defineEntity("divide", 247);
+ defineEntity("eacute", 233);
+ defineEntity("ecirc", 234);
+ defineEntity("egrave", 232);
+ defineEntity("empty", 8709);
+ defineEntity("emsp", 8195);
+ defineEntity("ensp", 8194);
+ defineEntity("epsilon", 949);
+ defineEntity("equiv", 8801);
+ defineEntity("eta", 951);
+ defineEntity("eth", 240);
+ defineEntity("euml", 235);
+ defineEntity("euro", 8364);
+ defineEntity("exist", 8707);
+ defineEntity("fnof", 402);
+ defineEntity("forall", 8704);
+ defineEntity("frac12", 189);
+ defineEntity("frac14", 188);
+ defineEntity("frac34", 190);
+ defineEntity("frasl", 8260);
+ defineEntity("gamma", 947);
+ defineEntity("ge", 8805);
+ defineEntity("gt", 62);
+ defineEntity("hArr", 8660);
+ defineEntity("harr", 8596);
+ defineEntity("hearts", 9829);
+ defineEntity("hellip", 8230);
+ defineEntity("iacute", 237);
+ defineEntity("icirc", 238);
+ defineEntity("iexcl", 161);
+ defineEntity("igrave", 236);
+ defineEntity("image", 8465);
+ defineEntity("infin", 8734);
+ defineEntity("int", 8747);
+ defineEntity("iota", 953);
+ defineEntity("iquest", 191);
+ defineEntity("isin", 8712);
+ defineEntity("iuml", 239);
+ defineEntity("kappa", 954);
+ defineEntity("lArr", 8656);
+ defineEntity("lambda", 955);
+ defineEntity("lang", 9001);
+ defineEntity("laquo", 171);
+ defineEntity("larr", 8592);
+ defineEntity("lceil", 8968);
+ defineEntity("ldquo", 8220);
+ defineEntity("le", 8804);
+ defineEntity("lfloor", 8970);
+ defineEntity("lowast", 8727);
+ defineEntity("loz", 9674);
+ defineEntity("lrm", 8206);
+ defineEntity("lsaquo", 8249);
+ defineEntity("lsquo", 8216);
+ defineEntity("lt", 60);
+ defineEntity("macr", 175);
+ defineEntity("mdash", 8212);
+ defineEntity("micro", 181);
+ defineEntity("middot", 183);
+ defineEntity("minus", 8722);
+ defineEntity("mu", 956);
+ defineEntity("nabla", 8711);
+ defineEntity("nbsp", 160);
+ defineEntity("ndash", 8211);
+ defineEntity("ne", 8800);
+ defineEntity("ni", 8715);
+ defineEntity("not", 172);
+ defineEntity("notin", 8713);
+ defineEntity("nsub", 8836);
+ defineEntity("ntilde", 241);
+ defineEntity("nu", 957);
+ defineEntity("oacute", 243);
+ defineEntity("ocirc", 244);
+ defineEntity("oelig", 339);
+ defineEntity("ograve", 242);
+ defineEntity("oline", 8254);
+ defineEntity("omega", 969);
+ defineEntity("omicron", 959);
+ defineEntity("oplus", 8853);
+ defineEntity("or", 8744);
+ defineEntity("ordf", 170);
+ defineEntity("ordm", 186);
+ defineEntity("oslash", 248);
+ defineEntity("otilde", 245);
+ defineEntity("otimes", 8855);
+ defineEntity("ouml", 246);
+ defineEntity("para", 182);
+ defineEntity("part", 8706);
+ defineEntity("permil", 8240);
+ defineEntity("perp", 8869);
+ defineEntity("phi", 966);
+ defineEntity("pi", 960);
+ defineEntity("piv", 982);
+ defineEntity("plusmn", 177);
+ defineEntity("pound", 163);
+ defineEntity("prime", 8242);
+ defineEntity("prod", 8719);
+ defineEntity("prop", 8733);
+ defineEntity("psi", 968);
+ defineEntity("quot", 34);
+ defineEntity("rArr", 8658);
+ defineEntity("radic", 8730);
+ defineEntity("rang", 9002);
+ defineEntity("raquo", 187);
+ defineEntity("rarr", 8594);
+ defineEntity("rceil", 8969);
+ defineEntity("rdquo", 8221);
+ defineEntity("real", 8476);
+ defineEntity("reg", 174);
+ defineEntity("rfloor", 8971);
+ defineEntity("rho", 961);
+ defineEntity("rlm", 8207);
+ defineEntity("rsaquo", 8250);
+ defineEntity("rsquo", 8217);
+ defineEntity("sbquo", 8218);
+ defineEntity("scaron", 353);
+ defineEntity("sdot", 8901);
+ defineEntity("sect", 167);
+ defineEntity("shy", 173);
+ defineEntity("sigma", 963);
+ defineEntity("sigmaf", 962);
+ defineEntity("sim", 8764);
+ defineEntity("spades", 9824);
+ defineEntity("sub", 8834);
+ defineEntity("sube", 8838);
+ defineEntity("sum", 8721);
+ defineEntity("sup", 8835);
+ defineEntity("sup1", 185);
+ defineEntity("sup2", 178);
+ defineEntity("sup3", 179);
+ defineEntity("supe", 8839);
+ defineEntity("szlig", 223);
+ defineEntity("tau", 964);
+ defineEntity("there4", 8756);
+ defineEntity("theta", 952);
+ defineEntity("thetasym", 977);
+ defineEntity("thinsp", 8201);
+ defineEntity("thorn", 254);
+ defineEntity("tilde", 732);
+ defineEntity("times", 215);
+ defineEntity("trade", 8482);
+ defineEntity("uArr", 8657);
+ defineEntity("uacute", 250);
+ defineEntity("uarr", 8593);
+ defineEntity("ucirc", 251);
+ defineEntity("ugrave", 249);
+ defineEntity("uml", 168);
+ defineEntity("upsih", 978);
+ defineEntity("upsilon", 965);
+ defineEntity("uuml", 252);
+ defineEntity("weierp", 8472);
+ defineEntity("xi", 958);
+ defineEntity("yacute", 253);
+ defineEntity("yen", 165);
+ defineEntity("yuml", 255);
+ defineEntity("zeta", 950);
+ defineEntity("zwj", 8205);
+ defineEntity("zwnj", 8204);
+ }
+
+ /**
+ * Crate a content model, consisting of the single
+ * element, specified by name.
+ */
+ private ContentModel model(String element)
+ {
+ return new ContentModel(getElement(element));
+ }
+
+ /**
+ * Crate a chain from the two content models,
+ * the last containing the given element and
+ * the specified unary operation.
+ */
+ private ContentModel model(String element, int unary)
+ {
+ ContentModel ct = model(element);
+ ct.type = unary;
+ return new ContentModel(0, ct);
+ }
+
+ /**
+ * Create the model HEAD, BODY
+ * @return
+ */
+ protected ContentModel createHtmlContentModel()
+ {
+ ContentModel head = model(HEAD);
+ ContentModel body = model(BODY);
+ head.next = body;
+ head.type = ',';
+ return head;
+ }
+
+ /**
+ * Create the model
+ * ( CAPTION ? , ( COL * | COLGROUP * ) , THEAD ? , TFOOT ? , TBODY + )
+ */
+ protected ContentModel createTableContentModel()
+ {
+ ContentModel col_colgroup = new ContentModel
+ ('|', model(COL,'*'), model(COLGROUP,'*') );
+
+ col_colgroup = new ContentModel('*', col_colgroup);
+ col_colgroup = new ContentModel(',', col_colgroup);
+
+ ContentModel caption = model(CAPTION,'?');
+ ContentModel thead = model(THEAD, '?');
+ ContentModel tfoot = model(TFOOT, '?');
+ ContentModel tbody = model(TBODY, '+');
+
+ caption.next = col_colgroup;
+ col_colgroup.next = thead;
+ thead.next = tfoot;
+ tfoot.next = tbody;
+
+ caption.type = col_colgroup.type = thead.type = tfoot.type =
+ tbody.type = ',';
+
+ return caption;
+ }
+
+ /**
+ * Creates a model for &lt;DL&gt; tag:
+ * <code> DT+ | DL+ </code>.
+ * @return
+ */
+ protected ContentModel createDefListModel()
+ {
+ ContentModel dt = model(DT, '+');
+ ContentModel dd = model(DD, '+');
+
+ dt.next = dd;
+ dt.type = dd.type = '|';
+ return dt;
+ }
+
+ /**
+ * This model is used for UL, OL, MENU and DIR.
+ * HTML 4.01 specifies LI only, but the nested
+ * list seems rendered correctly only if
+ * it is not enclosed into <LI>-</LI> of the
+ * parent list.
+ */
+ protected ContentModel createListModel()
+ {
+ ContentModel li = model(LI, '+');
+ ContentModel ul = model(UL, '+');
+ ContentModel ol = model(OL, '+');
+
+ li.next = ul;
+ ul.next = ol;
+ li.type = ul.type = ol.type = '|';
+ return li;
+ }
+
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/gnuDTD.java b/libjava/gnu/javax/swing/text/html/parser/gnuDTD.java
new file mode 100755
index 00000000000..24d800af2fc
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/gnuDTD.java
@@ -0,0 +1,422 @@
+/* gnuDTD.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser;
+
+import java.io.PrintStream;
+import java.io.Serializable;
+
+import java.util.BitSet;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.swing.text.html.parser.AttributeList;
+import javax.swing.text.html.parser.ContentModel;
+import javax.swing.text.html.parser.Element;
+import javax.swing.text.html.parser.Entity;
+
+/**
+ * <p>
+ * The class is derived from {@link gnu.javax.swing.text.html.parser.DTD }
+ * making structure creation methods public. This is required when
+ * creating the DTD by SGML parser that must have access to the structure.
+ *
+ * SGML DTD representation. Provides basis for describing a syntax of the
+ * HTML documents. The fields of this class are NOT initialized in
+ * constructor. You need to do this separately before passing this data
+ * structure to the parser constructor.</p>
+ *
+ * <p>This implementation also provides you the derived class
+ * <code>gnu.javax.swing.text.html.parser.DTD.HTML_4_0_1</code>, where
+ * all fields are initialized to the values, representing HTML 4.01
+ * ("-//W3C//DTD HTML 4.01 Frameset//EN") DTD. You can use it if you do not care
+ * about the portability between different implementations of the core
+ * class libraries. </p>
+ * <p>Use {@link javax.swing.HTML.HTMLEditorKit.Parser#parse }
+ * for parsing in accordance with "-//W3C//DTD HTML 4.01 Frameset//EN"
+ * without specifying DTD separately.</p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuDTD
+ extends javax.swing.text.html.parser.DTD
+ implements javax.swing.text.html.parser.DTDConstants, Serializable
+{
+ /* The undocumented element types, used to specify types, not defined
+ in DTDConstants. */
+
+ /**
+ * The URI element type (not defined in DTDConstants).
+ */
+ public static final int URI = 512;
+
+ /**
+ * The Length element type
+ */
+ public static final int Length = 513;
+
+ /**
+ * The Char element type
+ */
+ public static final int Char = 514;
+
+ /**
+ * The Color element type
+ */
+ public static final int Color = 515;
+
+ /**
+ * Creates a new instance of gnuDTD.
+ * @param name the name of the DTD.
+ */
+ public gnuDTD(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Creates and returns new attribute (not an attribute list).
+ * @param name the name of this attribute
+ * @param type the type of this attribute (FIXED, IMPLIED or
+ * REQUIRED from <code>DTDConstants</code>).
+ * @param modifier the modifier of this attribute
+ * @param default_value the default value of this attribute or null if
+ * it is not specified.
+ * @param allowed_values the allowed values of this attribute. The multiple
+ * possible values in this parameter are supposed to be separated by
+ * '|', same as in SGML DTD <code>&lt;!ATTLIST </code>tag. This parameter
+ * can be null if no list of allowed values is specified.
+ * @param atts the previous attribute of this element. This is
+ * placed to the field
+ * {@link javax.swing.text.html.parser.AttributeList#next },
+ * creating a linked list.
+ * @return
+ */
+ public AttributeList defAttributeList(String name, int type, int modifier,
+ String default_value,
+ String allowed_values,
+ AttributeList atts
+ )
+ {
+ return super.defAttributeList(name, type, modifier, default_value,
+ allowed_values, atts
+ );
+ }
+
+ /**
+ * Define the attributes for the element with the given name.
+ * If the element is not exist, it is created. This method is
+ * needed if the element attributes are defined befor the
+ * element itself.
+ * @param forElement
+ * @param attributes
+ */
+ public void defAttrsFor(String forElement, AttributeList attributes)
+ {
+ super.defineAttributes(forElement, attributes);
+ }
+
+ /**
+ * Creates a new content model.
+ * @param type specifies the BNF operation for this content model.
+ * The valid operations are documented in the
+ * {@link javax.swing.text.html.parser.ContentModel#type }.
+ * @param content the content of this content model
+ * @param next if the content model is specified by BNF-like
+ * expression, contains the rest of this expression.
+ * @return The newly created content model.
+ */
+ public ContentModel defContentModel(int type, Object content,
+ ContentModel next
+ )
+ {
+ return super.defContentModel(type, content, next);
+ }
+
+ /**
+ * Defines a new element and adds it to the element table.
+ * If the element alredy exists,
+ * overrides it settings with the specified values.
+ * @param name the name of the new element
+ * @param type the type of the element
+ * @param headless true if the element needs no starting tag
+ * @param tailless true if the element needs no closing tag
+ * @param content the element content.
+ * @param exclusions the elements that must be excluded from the
+ * content of this element, in all levels of the hierarchy.
+ * @param inclusions the elements that can be included as the
+ * content of this element.
+ * @param attributes the element attributes.
+ * @return the created or updated element.
+ */
+ public Element defElement(String name, int type, boolean headless,
+ boolean tailless, ContentModel content,
+ String[] exclusions, String[] inclusions,
+ AttributeList attributes
+ )
+ {
+ return super.defElement(name, type, headless, tailless, content,
+ exclusions, inclusions, attributes
+ );
+ }
+
+ /**
+ * Defines a new element and adds it to the element table.
+ * If the element alredy exists,
+ * overrides it settings with the specified values.
+ * @param name the name of the new element
+ * @param type the type of the element
+ * @param headless true if the element needs no starting tag
+ * @param tailless true if the element needs no closing tag
+ * @param content the element content.
+ * @param exclusions the elements that must be excluded from the
+ * content of this element, in all levels of the hierarchy.
+ * @param inclusions the elements that can be included as the
+ * content of this element.
+ * @param attributes the element attributes.
+ * @return the created or updated element.
+ */
+ public Element defElement(String name, int type, boolean headless,
+ boolean tailless, ContentModel content,
+ Collection exclusions, Collection inclusions,
+ AttributeList attributes
+ )
+ {
+ return super.defElement(name, type, headless, tailless, content,
+ toStringArray(exclusions),
+ toStringArray(inclusions), attributes
+ );
+ }
+
+ /**
+ * Defines a new element and adds it to the element table.
+ * If the element alredy exists,
+ * overrides it settings with the specified values.
+ * @param name the name of the new element
+ * @param type the type of the element
+ * @param headless true if the element needs no starting tag
+ * @param tailless true if the element needs no closing tag
+ * @param content the element content.
+ * @param exclusions the elements that must be excluded from the
+ * content of this element, in all levels of the hierarchy.
+ * @param inclusions the elements that can be included as the
+ * content of this element.
+ * @param attributes the element attributes (an array and not a
+ * linked list). The attributes are chained into the linked list
+ * inside this method.
+ * @return the created or updated element.
+ */
+ public Element defElement(String name, int type, boolean headless,
+ boolean tailless, ContentModel content,
+ String[] exclusions, String[] inclusions,
+ AttributeList[] attributes
+ )
+ {
+ AttributeList list;
+
+ if (attributes == null || attributes.length == 0)
+ list = null;
+ else
+ {
+ if (attributes.length > 1)
+ for (int i = 1; i < attributes.length; i++)
+ {
+ attributes [ i - 1 ].next = attributes [ i ];
+ }
+ list = attributes [ 0 ];
+ }
+
+ Element e =
+ super.defElement(name, type, headless, tailless, content, exclusions,
+ inclusions, list
+ );
+ return e;
+ }
+
+ /**
+ * Creates, adds into the internal table and returns the
+ * character entity like <code>&amp;lt;</code>
+ * (means '<code>&lt;</code>' );
+ * This method inactivates the recursive refenrences to the same
+ * entity.
+ * @param name The entity name (without heading &amp; and closing ;)
+ * @param type The entity type
+ * @param character The entity value (single character)
+ * @return The created entity
+ */
+ public Entity defEntity(String name, int type, String data)
+ {
+ int r;
+ String eref = "%" + name + ";";
+ do
+ {
+ r = data.indexOf(eref);
+ if (r > 0)
+ {
+ data = data.substring(0, r) + data.substring(r + 1);
+ }
+ }
+ while (r > 0);
+
+ return super.defEntity(name, type, data);
+ }
+
+ /**
+ * Summarises the document content into the given PrintStream.
+ */
+ public void dump(PrintStream p)
+ {
+ Iterator iter = entityHash.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry item = (Map.Entry) iter.next();
+ Entity e = (Entity) item.getValue();
+ if (e.isGeneral())
+ p.println("Entity " + e.getName() + ": " + e.getString());
+ }
+
+ iter = elementHash.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry item = (Map.Entry) iter.next();
+ Element e = (Element) item.getValue();
+ p.println("Element " + e.getName());
+
+ System.out.println(" includes:");
+ dump(e.inclusions);
+ System.out.println(" excludes:");
+ dump(e.exclusions);
+ System.out.println(" attributes:");
+
+ AttributeList atts = e.atts;
+ while (atts != null)
+ {
+ p.print(" " + atts.name + " = " + atts.value);
+ if (atts.values == null || atts.values.size() == 0)
+ p.println();
+ else
+ {
+ Iterator viter = atts.values.iterator();
+ System.out.print(" ( ");
+ while (viter.hasNext())
+ {
+ System.out.print(viter.next());
+ if (viter.hasNext())
+ System.out.print(" | ");
+ }
+ System.out.println(" ) ");
+ }
+ atts = atts.next;
+ }
+ }
+ }
+
+ /**
+ * Prints the content of the given attribute set to the System.out.
+ * @param b
+ */
+ public void dump(BitSet b)
+ {
+ if (b != null)
+ {
+ for (int i = 0; i < b.size(); i++)
+ {
+ if (b.get(i))
+ System.out.println(" " + elements.get(i));
+ }
+ }
+ else
+ System.out.println(" NULL set");
+ }
+
+ /**
+ * Creates the attribute.
+ * @param name The attribute name.
+ * @param type The attribute type.
+ * @param modifier The attribute modifier.
+ * @param defaultValue Default value (or null)
+ * @param allowed_values Allowed values (or null)
+ * @return The newly created AttributeList. The <code>next</code>
+ * field is initialized to null.
+ */
+ protected AttributeList attr(String name, String default_value,
+ String[] allowed_values, int type, int modifier
+ )
+ {
+ Vector allowed = null;
+
+ if (allowed_values != null)
+ {
+ allowed = new Vector(allowed_values.length);
+ for (int i = 0; i < allowed_values.length; i++)
+ {
+ allowed.add(allowed_values [ i ]);
+ }
+ }
+ ;
+
+ AttributeList attr =
+ new AttributeList(name, type, modifier, default_value, allowed, null);
+
+ return attr;
+ }
+
+ /**
+ * Define the general entity, holding a single character.
+ * @param name The entity name (for example, 'amp').
+ * The defined entity <b>is</b> stored into the entity table.
+ * @param character The entity character (for example, '&').
+ */
+ protected void defineEntity(String name, int character)
+ {
+ super.defEntity(name, GENERAL, character);
+ }
+
+ private String[] toStringArray(Collection c)
+ {
+ String[] s = new String[ c.size() ];
+ Iterator iter = c.iterator();
+ for (int i = 0; i < s.length; i++)
+ {
+ s [ i ] = iter.next().toString();
+ }
+ return s;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/htmlAttributeSet.java b/libjava/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
new file mode 100644
index 00000000000..f42b4632880
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
@@ -0,0 +1,133 @@
+/* htmlAttributeSet.java -- A set to store HTML attributes
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser;
+
+import java.util.Enumeration;
+
+import javax.swing.text.AttributeSet;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.html.HTML;
+
+/**
+ * A set, adapted to store HTML attributes.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class htmlAttributeSet
+ extends SimpleAttributeSet
+{
+ public static final htmlAttributeSet EMPTY_HTML_ATTRIBUTE_SET =
+ new htmlAttributeSet();
+ AttributeSet parent;
+
+ /**
+ * Looks in this set and, if not found, later looks in the parent set.
+ * Calls toString(), allowing to pass as HTML.Attribute, as String
+ * to this method.
+ * @param key A key to search for a value.
+ * @return The value, if one is defined.
+ */
+ public Object getAttribute(Object _key)
+ {
+ Object key = _key.toString().toLowerCase();
+
+ Object v = super.getAttribute(key);
+ if (v != null)
+ return v;
+ else if (parent != null)
+ return parent.getAttribute(key);
+ else
+ return null;
+ }
+
+ /**
+ * The name set must return HTML.Attribute and not a string,
+ * where applicable.
+ */
+ public Enumeration getAttributeNames()
+ {
+ // Replace the string keys by HTML.attribute, where applicable
+ final Enumeration enumeration = super.getAttributeNames();
+
+ return new Enumeration()
+ {
+ public boolean hasMoreElements()
+ {
+ return enumeration.hasMoreElements();
+ }
+
+ public Object nextElement()
+ {
+ Object key = enumeration.nextElement();
+ HTML.Attribute hKey = HTML.getAttributeKey((String) key);
+ if (hKey != null)
+ return hKey;
+ else
+ return key;
+ }
+ };
+ }
+
+ /**
+ * Set the parent set, containing the default values.
+ * @param a_parent
+ */
+ public void setResolveParent(AttributeSet a_parent)
+ {
+ parent = a_parent;
+ }
+
+ /**
+ * Get the parent set, containing the default values.
+ * @return
+ */
+ public AttributeSet getResolveParent()
+ {
+ return parent;
+ }
+
+ /**
+ * Add the attribute to this attribute set.
+ * @param key Attribute key (will be case insensitive)
+ * @param value Attribute value
+ */
+ public void addAttribute(Object key, Object value)
+ {
+ super.addAttribute(key.toString().toLowerCase(), value);
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/htmlValidator.java b/libjava/gnu/javax/swing/text/html/parser/htmlValidator.java
new file mode 100644
index 00000000000..bcb23aa8b0d
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/htmlValidator.java
@@ -0,0 +1,610 @@
+/* tagStack.java -- The HTML tag stack.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser;
+
+import gnu.javax.swing.text.html.parser.models.node;
+import gnu.javax.swing.text.html.parser.models.transformer;
+
+import java.util.BitSet;
+import java.util.Enumeration;
+import java.util.LinkedList;
+import java.util.ListIterator;
+
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.html.HTML;
+import javax.swing.text.html.parser.*;
+
+/**
+ * <p>The HTML content validator, is responsible for opening and
+ * closing elements with optional start/end tags, detecting
+ * the wrongly placed html tags and reporting errors. The working instance
+ * is the inner class inside the {@link javax.swing.text.html.parser.Parser }
+ * </p>
+ * <p>This class could potentially
+ * provide basis for automated closing and insertion of the html tags,
+ * correcting the found html errors.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class htmlValidator
+{
+ /**
+ * The tag reference, holding additional information that the tag
+ * has been forcibly closed.
+ */
+ protected class hTag
+ {
+ protected final Element element;
+ protected final HTML.Tag tag;
+ protected final TagElement tgElement;
+ protected boolean forcibly_closed;
+ protected node validationTrace;
+
+ protected hTag(TagElement an_element)
+ {
+ element = an_element.getElement();
+ tag = an_element.getHTMLTag();
+ tgElement = an_element;
+
+ if (element.content != null)
+ validationTrace = transformer.transform(element.content, dtd);
+ }
+
+ /**
+ * This is called when the tag must be forcibly closed because
+ * it would make the newly appearing tag invalid.
+ * The parser is not notified about such event (just the error
+ * is reported). For such tags, the closing message does not
+ * appear when later reaching the end of stream. The exception is
+ * the &lt;head&gt; tag: the parser is notified about its silent closing
+ * when &lt;body&gt; or other html content appears.
+ */
+ protected void forciblyCloseDueContext()
+ {
+ forcibly_closed = true;
+ }
+
+ /**
+ * This is called when the tag must be forcibly closed after
+ * reaching the end of stream. The parser is notified as if
+ * closing the tag explicitly.
+ */
+ protected void forciblyCloseDueEndOfStream()
+ {
+ forcibly_closed = true;
+ handleSupposedEndTag(element);
+ }
+ }
+
+ /**
+ * The DTD, providing information about the valid document structure.
+ */
+ protected final DTD dtd;
+
+ /**
+ * The stack, holding the current tag context.
+ */
+ protected final LinkedList stack = new LinkedList();
+
+ /**
+ * Creates a new tag stack, using the given DTD.
+ * @param a_dtd A DTD, providing the information about the valid
+ * tag content.
+ */
+ public htmlValidator(DTD a_dtd)
+ {
+ dtd = a_dtd;
+ }
+
+ /**
+ * Close all opened tags (called at the end of parsing).
+ */
+ public void closeAll()
+ {
+ hTag h;
+ while (!stack.isEmpty())
+ {
+ h = (hTag) stack.getLast();
+ if (!h.forcibly_closed && !h.element.omitEnd())
+ s_error("Unclosed <" + h.tag + ">, closing at the end of stream");
+
+ handleSupposedEndTag(h.element);
+
+ closeTag(h.tgElement);
+ }
+ }
+
+ /**
+ * Remove the given tag from the stack or (if found) from the list
+ * of the forcibly closed tags.
+ */
+ public void closeTag(TagElement tElement)
+ {
+ HTML.Tag tag = tElement.getHTMLTag();
+ hTag x;
+ hTag close;
+
+ if (!stack.isEmpty())
+ {
+ ListIterator iter = stack.listIterator(stack.size());
+
+ while (iter.hasPrevious())
+ {
+ x = (hTag) iter.previous();
+ if (tag.equals(x.tag))
+ {
+ if (x.forcibly_closed && !x.element.omitEnd())
+ s_error("The tag <" + x.tag +
+ "> has already been forcibly closed"
+ );
+
+
+ // If the tag has a content model defined, forcibly close all
+ // tags that were opened after the tag being currently closed.
+ closing:
+ if (x.element.content != null)
+ {
+ iter = stack.listIterator(stack.size());
+ while (iter.hasPrevious())
+ {
+ close = (hTag) iter.previous();
+ if (close == x)
+ break closing;
+ handleSupposedEndTag(close.element);
+ iter.remove();
+ }
+ }
+
+ stack.remove(x);
+ return;
+ }
+ }
+ }
+ s_error("Closing unopened <" + tag + ">");
+ }
+
+ /**
+ * Add the given HTML tag to the stack of the opened tags. Forcibly closes
+ * all tags in the stack that does not allow this tag in they content (error
+ * is reported).
+ * @param element
+ */
+ public void openTag(TagElement tElement, htmlAttributeSet parameters)
+ {
+ // If this is a fictional call, the message from the parser
+ // has recursively returned - ignore.
+ if (tElement.fictional())
+ return;
+
+ validateParameters(tElement, parameters);
+
+ // If the stack is empty, start from HTML
+ if (stack.isEmpty() && tElement.getHTMLTag() != HTML.Tag.HTML)
+ {
+ Element html = dtd.getElement(HTML.Tag.HTML.toString());
+ openFictionalTag(html);
+ }
+
+ Object v = tagIsValidForContext(tElement);
+ if (v != Boolean.TRUE)
+ {
+ // The tag is not valid for context, the content
+ // model suggest to open another tag.
+ if (v instanceof Element)
+ {
+ int n = 0;
+ while (v instanceof Element && (n++ < 100))
+ {
+ Element fe = (Element) v;
+
+ // notify the content model that we add the proposed tag
+ getCurrentContentModel().show(fe);
+ openFictionalTag(fe);
+
+ Object vv = tagIsValidForContext(tElement);
+ if (vv instanceof Element) // One level of nesting is supported.
+ {
+ openFictionalTag((Element) vv);
+
+ Object vx = tagIsValidForContext(tElement);
+ if (vx instanceof Element)
+ openFictionalTag((Element) vx);
+ }
+ else if (vv == Boolean.FALSE)
+ {
+ // The tag is still not valid for the current
+ // content after opening a fictional element.
+ if (fe.omitEnd())
+ {
+ // close the previously opened fictional tag.
+ closeLast();
+ vv = tagIsValidForContext(tElement);
+ if (vv instanceof Element)
+
+ // another tag was suggested by the content model
+ openFictionalTag((Element) vv);
+ }
+ }
+ v = tagIsValidForContext(tElement);
+ }
+ }
+ else // If the current element has the optional end tag, close it.
+ {
+ if (!stack.isEmpty())
+ {
+ closing:
+ do
+ {
+ hTag last = (hTag) stack.getLast();
+ if (last.element.omitEnd())
+ {
+ closeLast();
+ v = tagIsValidForContext(tElement);
+ if (v instanceof Element) // another tag was suggested by the content model
+ {
+ openFictionalTag((Element) v);
+ break closing;
+ }
+ }
+ else
+ break closing;
+ }
+ while (v == Boolean.FALSE && !stack.isEmpty());
+ }
+ }
+ }
+
+ stack.add(new hTag(tElement));
+ }
+
+ /**
+ * Clear the stack.
+ */
+ public void restart()
+ {
+ stack.clear();
+ }
+
+ /**
+ * Check if this tag is valid for the current context.
+ * Return Boolean.True if it is OK, Boolean.False
+ * if it is surely not OK or the Element that the
+ * content model recommends to insert making the situation
+ * ok. If Boolean.True is returned, the content model current
+ * position is moved forward. Otherwise this position remains
+ * the same.
+ * @param tElement
+ * @return
+ */
+ public Object tagIsValidForContext(TagElement tElement)
+ {
+ // Check the current content model, if one is available.
+ node cv = getCurrentContentModel();
+
+ if (cv != null)
+ return cv.show(tElement.getElement());
+
+ // Check exclusions and inclusions.
+ ListIterator iter = stack.listIterator(stack.size());
+ hTag t;
+ final int idx = tElement.getElement().index;
+
+ // Check only known tags.
+ if (idx >= 0)
+ {
+ BitSet inclusions = new BitSet();
+ while (iter.hasPrevious())
+ {
+ t = (hTag) iter.previous();
+ if (!t.forcibly_closed)
+ {
+ if (t.element.exclusions != null &&
+ t.element.exclusions.get(idx)
+ )
+ return Boolean.FALSE;
+
+ if (t.element.inclusions != null)
+ inclusions.or(t.element.inclusions);
+ }
+ }
+ if (!inclusions.get(idx))
+ return Boolean.FALSE;
+ }
+ return Boolean.TRUE;
+ }
+
+ /**
+ * Validate tag without storing in into the tag stack. This is called
+ * for the empty tags and results the subsequent calls to the openTag
+ * and closeTag.
+ */
+ public void validateTag(TagElement tElement, htmlAttributeSet parameters)
+ {
+ openTag(tElement, parameters);
+ closeTag(tElement);
+ }
+
+ /**
+ * Check for mandatory elements, subsequent to the last tag:
+ * @param tElement The element that will be inserted next.
+ */
+ protected void checkContentModel(TagElement tElement, boolean first)
+ {
+ if (stack.isEmpty())
+ return;
+
+ hTag last = (hTag) stack.getLast();
+ if (last.validationTrace == null)
+ return;
+
+ Object r = last.validationTrace.show(tElement.getElement());
+ if (r == Boolean.FALSE)
+ s_error("The <" + last.element + "> does not match the content model " +
+ last.validationTrace
+ );
+ else if (r instanceof Element) // The content model recommends insertion of this element
+ {
+ if (!first)
+ closeTag(last.tgElement);
+ handleSupposedStartTag((Element) r);
+ openTag(new TagElement((Element) r), null);
+ }
+ }
+
+ /**
+ * The method is called when the tag must be closed because
+ * it does not allow the subsequent elements inside its context
+ * or the end of stream has been reached. The parser is only
+ * informed if the element being closed does not require the
+ * end tag (the "omitEnd" flag is set).
+ * The closing message must be passed to the parser mechanism
+ * before passing message about the opening the next tag.
+ *
+ * @param element The tag being fictionally (forcibly) closed.
+ */
+ protected abstract void handleSupposedEndTag(Element element);
+
+ /**
+ * The method is called when the validator decides to open the
+ * tag on its own initiative. This may happen if the content model
+ * includes the element with the optional (supposed) start tag.
+ *
+ * @param element The tag being opened.
+ */
+ protected abstract void handleSupposedStartTag(Element element);
+
+ /**
+ * Handles the error message. This method must be overridden to pass
+ * the message where required.
+ * @param msg The message text.
+ */
+ protected abstract void s_error(String msg);
+
+ /**
+ * Validate the parameters, report the error if the given parameter is
+ * not in the parameter set, valid for the given attribute. The information
+ * about the valid parameter set is taken from the Element, enclosed
+ * inside the tag. The method does not validate the default parameters.
+ * @param tag The tag
+ * @param parameters The parameters of this tag.
+ */
+ protected void validateParameters(TagElement tag, htmlAttributeSet parameters)
+ {
+ if (parameters == null ||
+ parameters == htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET ||
+ parameters == SimpleAttributeSet.EMPTY
+ )
+ return;
+
+ Enumeration enumeration = parameters.getAttributeNames();
+
+ while (enumeration.hasMoreElements())
+ {
+ validateAttribute(tag, parameters, enumeration);
+ }
+
+ // Check for missing required values.
+ AttributeList a = tag.getElement().getAttributes();
+
+ while (a != null)
+ {
+ if (a.getModifier() == DTDConstants.REQUIRED)
+ if (parameters.getAttribute(a.getName()) == null)
+ {
+ s_error("Missing required attribute '" + a.getName() + "' for <" +
+ tag.getHTMLTag() + ">"
+ );
+ }
+ a = a.next;
+ }
+ }
+
+ private node getCurrentContentModel()
+ {
+ if (!stack.isEmpty())
+ {
+ hTag last = (hTag) stack.getLast();
+ return last.validationTrace;
+ }
+ else
+ return null;
+ }
+
+ private void closeLast()
+ {
+ handleSupposedEndTag(((hTag) stack.getLast()).element);
+ stack.removeLast();
+ }
+
+ private void openFictionalTag(Element e)
+ {
+ handleSupposedStartTag(e);
+ stack.add(new hTag(new TagElement(e, true)));
+ if (!e.omitStart())
+ s_error("<" + e + "> is expected (supposing it)");
+ }
+
+ private void validateAttribute(TagElement tag, htmlAttributeSet parameters,
+ Enumeration enumeration
+ )
+ {
+ Object foundAttribute;
+ AttributeList dtdAttribute;
+ foundAttribute = enumeration.nextElement();
+ dtdAttribute = tag.getElement().getAttribute(foundAttribute.toString());
+ if (dtdAttribute == null)
+ {
+ StringBuffer valid =
+ new StringBuffer("The tag <" + tag.getHTMLTag() +
+ "> cannot contain the attribute '" + foundAttribute +
+ "'. The valid attributes for this tag are: "
+ );
+
+ AttributeList a = tag.getElement().getAttributes();
+
+ while (a != null)
+ {
+ valid.append(a.name.toUpperCase());
+ valid.append(' ');
+ a = a.next;
+ }
+ s_error(valid.toString());
+ }
+
+ else
+ {
+ String value = parameters.getAttribute(foundAttribute).toString();
+
+ if (dtdAttribute.type == DTDConstants.NUMBER)
+ validateNumberAttribute(tag, foundAttribute, value);
+
+ if (dtdAttribute.type == DTDConstants.NAME ||
+ dtdAttribute.type == DTDConstants.ID
+ )
+ validateNameOrIdAttribute(tag, foundAttribute, value);
+
+ if (dtdAttribute.values != null)
+ validateAttributeWithValueList(tag, foundAttribute, dtdAttribute,
+ value
+ );
+ }
+ }
+
+ private void validateAttributeWithValueList(TagElement tag,
+ Object foundAttribute,
+ AttributeList dtdAttribute,
+ String value
+ )
+ {
+ if (!dtdAttribute.values.contains(value.toLowerCase()) &&
+ !dtdAttribute.values.contains(value.toUpperCase())
+ )
+ {
+ StringBuffer valid;
+ if (dtdAttribute.values.size() == 1)
+ valid =
+ new StringBuffer("The attribute '" + foundAttribute +
+ "' of the tag <" + tag.getHTMLTag() +
+ "> cannot have the value '" + value +
+ "'. The only valid value is "
+ );
+ else
+ valid =
+ new StringBuffer("The attribute '" + foundAttribute +
+ "' of the tag <" + tag.getHTMLTag() +
+ "> cannot have the value '" + value + "'. The " +
+ dtdAttribute.values.size() +
+ " valid values are: "
+ );
+
+ Enumeration vv = dtdAttribute.values.elements();
+ while (vv.hasMoreElements())
+ {
+ valid.append('"');
+ valid.append(vv.nextElement());
+ valid.append("\" ");
+ }
+ s_error(valid.toString());
+ }
+ }
+
+ private void validateNameOrIdAttribute(TagElement tag, Object foundAttribute,
+ String value
+ )
+ {
+ boolean ok = true;
+
+ if (!Character.isLetter(value.charAt(0)))
+ ok = false;
+
+ char c;
+ for (int i = 0; i < value.length(); i++)
+ {
+ c = value.charAt(i);
+ if (!(
+ Character.isLetter(c) || Character.isDigit(c) ||
+ "".indexOf(c) >= 0
+ )
+ )
+ ok = false;
+ }
+ if (!ok)
+ s_error("The '" + foundAttribute + "' attribute of the tag <" +
+ tag.getHTMLTag() + "> must start from letter and consist of " +
+ "letters, digits, hypens, colons, underscores and periods. " +
+ "It cannot be '" + value + "'"
+ );
+ }
+
+ private void validateNumberAttribute(TagElement tag, Object foundAttribute,
+ String value
+ )
+ {
+ try
+ {
+ Integer.parseInt(value);
+ }
+ catch (NumberFormatException ex)
+ {
+ s_error("The '" + foundAttribute + "' attribute of the tag <" +
+ tag.getHTMLTag() + "> must be a valid number and not '" +
+ value + "'"
+ );
+ }
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java b/libjava/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
new file mode 100755
index 00000000000..4bfc3b960e8
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
@@ -0,0 +1,62 @@
+/* PCDATAonly_model.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.models;
+
+import java.io.Serializable;
+
+/**
+ * The model, allowing only PCDATA in it (like for element OPTION).
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class PCDATAonly_model
+ extends node
+ implements Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ public PCDATAonly_model()
+ {
+ super((char) 0, (char) 0, null);
+ }
+
+ public Object show(Object x)
+ {
+ return x.toString().equalsIgnoreCase("#pcdata") ? Boolean.TRUE : Boolean.FALSE;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java b/libjava/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
new file mode 100755
index 00000000000..1a803d5476d
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
@@ -0,0 +1,77 @@
+/* TableRowContentModel.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.models;
+
+import java.io.Serializable;
+
+import javax.swing.text.html.parser.DTD;
+import javax.swing.text.html.parser.Element;
+
+/**
+ * Table row content model.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class TableRowContentModel
+ extends node
+ implements Serializable
+{
+ private static final long serialVersionUID = 1;
+ final Element TD;
+
+ public TableRowContentModel(DTD dtd)
+ {
+ super((char) 0, (char) 0, null);
+ TD = dtd.getElement("TD");
+ }
+
+ public Object show(Object x)
+ {
+ // Always accept TD and TH
+ String s = x.toString();
+ if (s.equalsIgnoreCase("TD") || s.equalsIgnoreCase("TH"))
+ return Boolean.TRUE;
+
+ // Suggest closing in response to TR:
+ if (s.equalsIgnoreCase("TR"))
+ return Boolean.FALSE;
+
+ // Recommend TD for other cases:
+ return TD;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/models/list.java b/libjava/gnu/javax/swing/text/html/parser/models/list.java
new file mode 100755
index 00000000000..1fa16d96556
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/models/list.java
@@ -0,0 +1,382 @@
+/* list.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.models;
+
+import java.io.Serializable;
+
+/**
+ * Part of the internal representation of the content model.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class list
+ extends node
+ implements Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ /**
+ * Setting to true means that the list nodes must always be connected
+ * by the same operation. This is far safer and clearer, but not
+ * required by default standard.
+ */
+ public static boolean CLEAR;
+
+ /**
+ * A list of nodes.
+ */
+ public final node[] nodes;
+
+ /**
+ * Creates a new model list that is a member of some enclosing list.
+ * @param binary_operator An operator with that this list is connected
+ * with other members of the enclosing list.
+ * @param unary_operator The unary operator for this list.
+ * @param a_nodes The nodes inside this list.
+ */
+ public list(char binary_operator, char unary_operator, node[] a_nodes)
+ {
+ super(binary_operator, unary_operator, a_nodes);
+ nodes = a_nodes;
+ }
+
+ /**
+ * Creates a new model list. Assigns the previous field.
+ * @param a_nodes The nodes for this list.
+ * @throws an error if the node elements are connected by the
+ * different operations. This is not supported, use grouping.
+ */
+ public list(node[] a_nodes)
+ throws Error
+ {
+ this(',', (char) 0, a_nodes);
+
+ int operation = nodes [ 0 ].binary;
+
+ for (int i = 0; i < nodes.length; i++)
+ {
+ if (CLEAR && nodes [ i ].binary != operation)
+ throw new Error("List members can only be connected by " +
+ "the same operation, use grouping"
+ );
+
+ if (i > 0)
+ nodes [ i ].previous = nodes [ i - 1 ];
+ }
+ }
+
+ /**
+ * Returns true if all members in the list are closed.
+ */
+ public boolean isClosed()
+ {
+ if (super.isClosed())
+ return true;
+ for (int i = 0; i < nodes.length; i++)
+ {
+ if (!nodes [ i ].isClosed())
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Find the token that could match as the next token in
+ * the token list.
+ *
+ * @return Such token object or null if none is found.
+ */
+ public Object findFreeNode()
+ {
+ Object fn;
+ for (int j = 0; j < nodes.length; j++)
+ {
+ if (!nodes [ j ].isClosed())
+ {
+ fn = nodes [ j ].findFreeNode();
+ if (fn != null)
+ return fn;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Tries to match this list agains the given token sequence.
+ * @param tokens the sequence of the tokens to match.
+ * @return true if the valid match is found.
+ */
+ public boolean matches(Object[] tokens)
+ {
+ reset();
+
+ Object x;
+ boolean m;
+ boolean matched = false;
+
+ for (int i = 0; i < tokens.length; i++)
+ {
+ matched = false;
+ x = tokens [ i ];
+
+ nodescan:
+ for (int j = 0; j < nodes.length; j++)
+ {
+ if (!nodes [ j ].isClosed())
+ {
+ m = nodes [ j ].performMatch(x);
+
+ if (m)
+ {
+ matched = true;
+ break nodescan;
+ }
+ }
+ }
+ if (!matched)
+ return false;
+ }
+
+ boolean valid = true;
+
+ for (int i = 0; i < nodes.length; i++)
+ {
+ if (!nodes [ i ].valid())
+ valid = false;
+ }
+
+ return valid;
+ }
+
+ /**
+ * The list never closes, despite it is trated as closed
+ * if all members in the list are closed.
+ * @return false.
+ */
+ public boolean mustClose()
+ {
+ return false;
+ }
+
+ /**
+ * Perform a match operation for the single token
+ * against this list.
+ * @param token a token to match.
+ * @return true if the match is found.
+ */
+ public boolean performMatch(Object token)
+ {
+ boolean ok = false;
+ Matching:
+ for (int i = 0; i < nodes.length; i++)
+ {
+ ok = nodes [ i ].performMatch(token);
+
+ if (ok)
+ break Matching;
+ }
+
+ if (ok)
+ matches();
+
+ return ok;
+ }
+
+ /**
+ * Prepeares the list for the next matching operation.
+ */
+ public void reset()
+ {
+ super.reset();
+ for (int i = 0; i < nodes.length; i++)
+ nodes [ i ].reset();
+ }
+
+ /**
+ * Check if the provided token can match as a next token in the
+ * list. In the case of match, the list state changes, moving
+ * current position after the matched token. However if this method
+ * returns a suggested new token to insert before the provided one,
+ * the state of the list does not change.
+ * @return Boolean.TRUE if the match is found,
+ * Boolean.FALSE if the match is not possible and no token can be
+ * inserted to make the match valid. Otherwise, returns the
+ * token object that can be inserted before the last token in the
+ * list, probably (not for sure) making the match valid.
+ * If the object is an instance of Element or TagElement,
+ * it is first ensured that the object flag "omit start" is set.
+ */
+ public Object show(Object x)
+ {
+ boolean m;
+ boolean matched = false;
+
+ nodescan:
+ for (int j = 0; j < nodes.length; j++)
+ {
+ if (!nodes [ j ].isClosed())
+ {
+ m = nodes [ j ].performMatch(x);
+
+ if (m)
+ {
+ matched = true;
+ break nodescan;
+ }
+ else
+ {
+ // For comma operation, only first not closed
+ // node must be tested for a match.
+ // unless it allows matching zero times.
+ if (binary == ',' &&
+ !(nodes [ j ].unary == '?' || nodes [ j ].unary == '*')
+ )
+ break nodescan;
+ }
+ }
+ }
+
+ if (!matched)
+ {
+ // Find and return that would be matched.
+ Object freeNode = findFreeNode();
+ if (freeNode == null)
+ return Boolean.FALSE;
+ else
+ return freeNode;
+ }
+
+ for (int i = 0; i < nodes.length; i++)
+ if (!nodes [ i ].validPreliminary())
+ {
+ return Boolean.FALSE;
+ }
+
+ return Boolean.TRUE;
+ }
+
+ /**
+ * Returns a string representation of the list.
+ * @return String representation, similar to BNF expression.
+ */
+ public String toString()
+ {
+ StringBuffer b = new StringBuffer();
+ b.append(" ( ");
+ for (int i = 0; i < nodes.length; i++)
+ {
+ if (i > 0)
+ b.append(" " + (char) nodes [ i ].binary + " ");
+ b.append(nodes [ i ]);
+ }
+
+ b.append(" )");
+ if (unary != 0)
+ b.append((char) unary);
+ else
+ b.append(' ');
+ return b.toString();
+ }
+
+ /**
+ * Returns true if all memebers in the list are valid.
+ */
+ public boolean valid()
+ {
+ for (int i = 0; i < nodes.length; i++)
+ {
+ if (!nodes [ i ].valid())
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns true if all memebers in the list are either valid
+ * or unvisited. The unvisited members can become valid after
+ * more tokens will be shown.
+ */
+ public boolean validPreliminary()
+ {
+ if (silenceAllowed())
+ {
+ boolean everVisited = false;
+ for (int i = 0; i < nodes.length; i++)
+ {
+ if (nodes [ i ].visits > 0)
+ {
+ everVisited = true;
+ break;
+ }
+ }
+ if (!everVisited)
+ return true;
+ }
+
+ for (int i = 0; i < nodes.length; i++)
+ {
+ if (!nodes [ i ].validPreliminary())
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Closes all members in the list.
+ */
+ protected void close()
+ {
+ super.close();
+ for (int i = 0; i < nodes.length; i++)
+ {
+ nodes [ i ].close();
+ }
+ }
+
+ /**
+ * Compare given token with the token of this node.
+ * If the token represents a <code>list</code>, the call may be
+ * delegeted to the child subnodes.
+ * @param a_token A token to compare.
+ * @return True if the token matches the token of this node.
+ */
+ protected boolean compare(Object a_token)
+ {
+ return performMatch(a_token);
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/models/noTagModel.java b/libjava/gnu/javax/swing/text/html/parser/models/noTagModel.java
new file mode 100755
index 00000000000..7ac58f0506d
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/models/noTagModel.java
@@ -0,0 +1,75 @@
+/* noTagModel.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.models;
+
+import java.io.Serializable;
+
+/**
+ * Disallows a single given tag at the current content level only.
+ * <p>@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)</p>
+ */
+public class noTagModel
+ extends node
+ implements Serializable
+{
+ private static final long serialVersionUID = 1;
+ final String[] no;
+
+ public noTagModel(String[] noTag)
+ {
+ super((char) 0, (char) 0, null);
+ no = noTag;
+ }
+
+ public noTagModel(String noTag)
+ {
+ super((char) 0, (char) 0, null);
+ no = new String[] { noTag };
+ }
+
+ public Object show(Object x)
+ {
+ for (int i = 0; i < no.length; i++)
+ {
+ if (x.toString().equalsIgnoreCase(no [ i ]))
+ return Boolean.FALSE;
+ }
+ return Boolean.TRUE;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/models/node.java b/libjava/gnu/javax/swing/text/html/parser/models/node.java
new file mode 100755
index 00000000000..42505d0bef0
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/models/node.java
@@ -0,0 +1,337 @@
+/* node.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.models;
+
+import java.io.Serializable;
+
+/**
+ * Part of the internal representation of the content model.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class node
+ implements Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ /**
+ * The token to match (can be instance of list).
+ */
+ public Object token;
+
+ /**
+ * True for the node that cannot be visited again.
+ */
+ public boolean _closed;
+
+ /**
+ * The binary operation for this node.
+ */
+ public char binary;
+
+ /**
+ * The unary opeation for this node.
+ */
+ public char unary;
+
+ /**
+ * The number of times the node already was visited.
+ */
+ public int visits;
+
+ /**
+ * The previous node in content model (used for closing nodes).
+ */
+ public node previous;
+
+ /**
+ * Creates a new node.
+ * @param binary_operator The operator, connecting all nodes in the list.
+ * The nodes, connected by the different operators, must be arranged into
+ * the different lists.
+ * @param unary_operator The unary operator for this node or zero if
+ * no such was specified.
+ * @param token The token to match. This can be either a string or
+ * the new instance of the list.
+ * @param a_previous The previous node in the list, null for the first
+ * node. This is used for propagating the closing operation for the
+ * comma delimited list.
+ */
+ public node(char binary_operator, char unary_operator, Object a_token)
+ {
+ if (a_token != null)
+ if (a_token.getClass().equals(node.class))
+ throw new Error("Creating node in node is redundant and ineffective.");
+
+ binary = binary_operator;
+ unary = unary_operator;
+ token = a_token;
+ }
+
+ /**
+ * Checks if this node is in the closed state.
+ * @return True if the node is closed.
+ */
+ public boolean isClosed()
+ {
+ return _closed;
+ }
+
+ /**
+ * Check if closing this node means closing the previous node.
+ */
+ public boolean closePrevious()
+ {
+ return binary == ',';
+ }
+
+ /**
+ * Return the token object if it could match as a next token in
+ * a token list of null if it could not.
+ * @return
+ */
+ public Object findFreeNode()
+ {
+ boolean ok;
+ if (isClosed() || silenceAllowed())
+ return null;
+
+ // Try if the node would stay valid after a one more visit.
+ visits++;
+ ok = valid();
+ visits--;
+
+ if (ok)
+ {
+ if (token instanceof node)
+ return ((node) token).findFreeNode();
+ else
+ return token;
+ }
+ else
+ return null;
+ }
+
+ /**
+ * Check if the current situation is such that the node must be closed
+ * now.
+ */
+ public boolean mustClose()
+ {
+ switch (unary)
+ {
+ case 0 :
+ return true;
+
+ case '*' :
+ return false;
+
+ case '+' :
+ return false;
+
+ case '?' :
+ return visits <= 1;
+
+ default :
+ throw new Error("Invalid unary operation " + unary + " ( '" +
+ (char) unary + "' )"
+ );
+ }
+ }
+
+ /**
+ * Do the match operation with the given token. This sets various
+ * flags.
+ * @param token The token to match.
+ * @return true if the the token matches node, false if it does not match
+ * or if the node is closed.
+ */
+ public boolean performMatch(Object a_token)
+ {
+ if (isClosed())
+ return false;
+
+ boolean matches = compare(a_token);
+ if (matches)
+ matches();
+
+ return matches;
+ }
+
+ /**
+ * Prepares the node for matching against a new list of tokens.
+ */
+ public void reset()
+ {
+ _closed = false;
+ visits = 0;
+ }
+
+ /**
+ * Check if the provided token can match this node.
+ * In the case of match, the node state changes, moving
+ * current position after the matched token. However if this method
+ * returns a suggested new token to insert before the provided one,
+ * the state of the list does not change.
+ * @return Boolean.TRUE if the match is found,
+ * Boolean.FALSE if the match is not possible and no token can be
+ * inserted to make the match valid. Otherwise, returns the
+ * token object that can be inserted before the last token in the
+ * list, probably (not for sure) making the match valid.
+ */
+ public Object show(Object x)
+ {
+ if (compare(x))
+ return performMatch(x) ? Boolean.TRUE : Boolean.FALSE;
+
+ Object recommended = findFreeNode();
+ return recommended != null ? recommended : Boolean.FALSE;
+ }
+
+ /**
+ * Check if it would be a valid case if this node is visited zero times.
+ * Nodes with unary operator * or ? need not be matched to make a
+ * model valid.
+ */
+ public boolean silenceAllowed()
+ {
+ return unary == '?' || unary == '*';
+ }
+
+ /**
+ * Returns a string representation of the list.
+ * @return String representation, similar to BNF expression.
+ */
+ public String toString()
+ {
+ StringBuffer b = new StringBuffer();
+
+ b.append(token);
+ if (unary != 0)
+ b.append((char) unary);
+ else
+ b.append('\'');
+
+ return b.toString();
+ }
+
+ /**
+ * Check if the node state is valid.
+ */
+ public boolean valid()
+ {
+ switch (unary)
+ {
+ case 0 :
+ if (binary == '|')
+ return true;
+ else
+ return visits == 1;
+
+ case '*' :
+ return true;
+
+ case '+' :
+ return visits > 0;
+
+ case '?' :
+ return visits <= 1;
+
+ default :
+ throw new Error("Invalid unary operation " + unary + " ( '" +
+ (char) unary + "' )"
+ );
+ }
+ }
+
+ public boolean validPreliminary()
+ {
+ return visits == 0 || valid();
+ }
+
+ /**
+ * Closes this node and, if closePrevious() returs true, calls close() for
+ * the previous node.
+ */
+ protected void close()
+ {
+ _closed = true;
+ if (previous != null && closePrevious())
+ previous.close();
+ }
+
+ /**
+ * Compare the provided token object with the token object of this node.
+ */
+ protected boolean compare(Object a_token)
+ {
+ if (token instanceof Object[])
+ throw new Error("Invalid token object, probably the 'list' " +
+ "should be used. "
+ );
+
+ if (token instanceof node[])
+ throw new Error("Do not use 'node' for the array of nodes, use 'list'. ");
+
+ if (token instanceof node)
+ {
+ return ((node) token).performMatch(a_token);
+ }
+
+ boolean rt = false;
+
+ if (token == a_token)
+ rt = true;
+ if (token.equals(a_token))
+ rt = true;
+ if (token.toString().equalsIgnoreCase(a_token.toString()))
+ rt = true;
+
+ return rt;
+ }
+
+ /**
+ * Fire the changes that must happen then the token matches this node.
+ */
+ protected void matches()
+ {
+ visits++;
+ if (mustClose())
+ close();
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/models/package.html b/libjava/gnu/javax/swing/text/html/parser/models/package.html
new file mode 100644
index 00000000000..60719d0cc97
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/models/package.html
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.swing.text.html.parser package.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - gnu.javax.swing.text.html.parser.models</title></head>
+
+<body>
+<p>This package contains classes for working with content models. In this implementation, the
+standardized content model is pre-processed by <code>transformer</code> into an instance of
+<code>node</code>. Node holds a single element of the content model with the optional unary operation.
+The derived class <code>list</code> holds multiple nodes connected by the same binary operation.
+As the members of this <code>list</code> can also be lists itself, these structures support
+the most of required operations. Several cases when the model cannot be expressed using
+BNF syntax are handled providing specialised classes that are also derived from <code>node</code>.
+</p>
+@author Audrius Meskauskas, Lithuania
+</body>
+</html>
diff --git a/libjava/gnu/javax/swing/text/html/parser/models/transformer.java b/libjava/gnu/javax/swing/text/html/parser/models/transformer.java
new file mode 100755
index 00000000000..c8c4a2544a4
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/models/transformer.java
@@ -0,0 +1,201 @@
+/* transformer.java -- Content model transforms.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.models;
+
+import java.io.Serializable;
+
+import javax.swing.text.html.parser.ContentModel;
+import javax.swing.text.html.parser.DTD;
+
+/**
+ * Transforms the standard ContentModel tree into the internal representation,
+ * used in this implementation.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class transformer
+ implements Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ /**
+ * All binary operators.
+ */
+ protected static String binary = "&|,";
+
+ /**
+ * All unary operators.
+ */
+ protected static String unary = "+*?";
+
+ /**
+ * Measure length of the linked list of the content models.
+ * @param c The heading element of the linked list.
+ * @return the length of the list (0 for null 1 if c!=null and c.next==null,
+ * etc.
+ */
+ public static int measureChainLength(ContentModel c)
+ {
+ if (c == null)
+ return 0;
+ else
+ return measureChainLength(c.next) + 1;
+ }
+
+ /**
+ * Transform into internal representation without usind dtd.
+ * This should be used only for testing.
+ */
+ public static node transform(ContentModel c)
+ {
+ return transform(c, null);
+ }
+
+ /**
+ * Transform into internal representation.
+ * @param c a model to transform
+ * @return a transformed model
+ * @throws Error if the model structure contains errors.
+ */
+ public static node transform(ContentModel c, DTD dtd)
+ {
+ // Handle the special cases first.
+ if (c.content instanceof node)
+ return (node) c.content;
+
+ // Do the typical transform.
+ node n;
+
+ /* Case with the single token */
+ if (c.next == null)
+ {
+ n = optionalTransform(c, dtd);
+ }
+ else /* Case with the chain of the multiple tokens. */
+ {
+ node[] l = new node[ measureChainLength(c) ];
+ ContentModel m = c;
+ for (int i = 0; i < l.length; i++)
+ {
+ if (m.content instanceof ContentModel)
+ {
+ ContentModel nested = (ContentModel) m.content;
+ if (nested.next == null &&
+ !(nested.content instanceof ContentModel)
+ )
+ {
+ l [ i ] =
+ new node((char) m.type, (char) nested.type, nested.content);
+ }
+ else
+ {
+ l [ i ] = transform(nested, dtd);
+ }
+ }
+ else
+ l [ i ] = new node((char) 0, (char) 0, m.content);
+ addtype(l [ i ], (char) m.type);
+ m = m.next;
+ }
+
+ if (isBinary(c.type))
+ for (int i = 0; i < l.length; i++)
+ {
+ l [ i ].binary = (char) c.type;
+ }
+
+ n = new list(l);
+ }
+
+ addtype(n, (char) c.type);
+
+ return n;
+ }
+
+ /**
+ * True for binary operator
+ * @param c a character to test
+ * @return true for [ ,&| ], false otherwise.
+ */
+ private static boolean isBinary(int c)
+ {
+ return binary.indexOf((char) c) >= 0;
+ }
+
+ /**
+ * True for unary operator.
+ * @param c a character to test
+ * @return true for [ +?* ], false otherwise.
+ */
+ private static boolean isUnary(int c)
+ {
+ return unary.indexOf((char) c) >= 0;
+ }
+
+ /**
+ * Assign an operation type for the given node.
+ * @param n A node to set the operation to.
+ * @param type Either binary or unary operation, is assigned to the
+ * corresponding field of the node.
+ * @throws error if the operation type is not
+ * representing a valid unary or binary operation.
+ */
+ private static void addtype(node n, char type)
+ {
+ if (isBinary(type))
+ n.binary = type;
+
+ else if (isUnary(type))
+ n.unary = type;
+
+ else if (type != 0)
+ throw new Error("Invalid operation '" + (char) type + "'");
+ }
+
+ private static node optionalTransform(ContentModel c, DTD dtd)
+ {
+ node n;
+ if (c.content instanceof ContentModel)
+ n = transform((ContentModel) c.content, dtd);
+ else
+
+ /* A single token with the specified operation */
+ n = new node((char) 0, (char) 0, c.content);
+ return n;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/package.html b/libjava/gnu/javax/swing/text/html/parser/package.html
new file mode 100644
index 00000000000..7fa69953021
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/package.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.swing.text.html.parser package.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - javax.swing.text.html.parser</title></head>
+
+<body>
+<p>Provides the error tolerant, DTD-driven HTML 4.01 parser.
+The parser that is used in web robots, html content analysers,
+web browsers, web editors and other related applications.
+It should compativle with the older HTML versions, supporting
+obsoleted HTML featues. This package also includes some
+supporting classes.</p>
+@author Audrius Meskauskas, Lithuania
+</body>
+</html>
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/Parser.java b/libjava/gnu/javax/swing/text/html/parser/support/Parser.java
new file mode 100755
index 00000000000..1e5147a4728
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/Parser.java
@@ -0,0 +1,1443 @@
+/* Parser.java -- HTML parser.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support;
+
+import gnu.javax.swing.text.html.parser.htmlAttributeSet;
+import gnu.javax.swing.text.html.parser.htmlValidator;
+import gnu.javax.swing.text.html.parser.support.low.Constants;
+import gnu.javax.swing.text.html.parser.support.low.ParseException;
+import gnu.javax.swing.text.html.parser.support.low.ReaderTokenizer;
+import gnu.javax.swing.text.html.parser.support.low.Token;
+import gnu.javax.swing.text.html.parser.support.low.node;
+import gnu.javax.swing.text.html.parser.support.low.pattern;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import java.util.Comparator;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.Vector;
+
+import javax.swing.text.ChangedCharSetException;
+import javax.swing.text.html.HTML;
+import javax.swing.text.html.parser.AttributeList;
+import javax.swing.text.html.parser.DTD;
+import javax.swing.text.html.parser.DTDConstants;
+import javax.swing.text.html.parser.Element;
+import javax.swing.text.html.parser.Entity;
+import javax.swing.text.html.parser.TagElement;
+
+/**
+ * <p>A simple error-tolerant HTML parser that uses a DTD document
+ * to access data on the possible tokens, arguments and syntax.</p>
+ * <p> The parser reads an HTML content from a Reader and calls various
+ * notifying methods (which should be overridden in a subclass)
+ * when tags or data are encountered.</p>
+ * <p>Some HTML elements need no opening or closing tags. The
+ * task of this parser is to invoke the tag handling methods also when
+ * the tags are not explicitly specified and must be supposed using
+ * information, stored in the DTD.
+ * For example, parsing the document
+ * <p>&lt;table&gt;&lt;tr&gt;&lt;td&gt;a&lt;td&gt;b&lt;td&gt;c&lt;/tr&gt; <br>
+ * will invoke exactly the handling methods exactly in the same order
+ * (and with the same parameters) as if parsing the document: <br>
+ * <em>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;table&gt;&lt;
+ * tbody&gt;</em>&lt;tr&gt;&lt;td&gt;a<em>&lt;/td&gt;</em>&lt;td&gt;b<em>
+ * &lt;/td&gt;</em>&lt;td&gt;c<em>&lt;/td&gt;&lt;/tr&gt;</em>&lt;
+ * <em>/tbody&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</em></p>
+ * (supposed tags are given in italics). The parser also supports
+ * obsolete elements of HTML syntax.<p>
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Parser
+ extends ReaderTokenizer
+ implements DTDConstants
+{
+ /**
+ * The current html tag.
+ */
+ public Token hTag = new Token();
+
+ /**
+ * The document template description that will be used to parse the documents.
+ */
+ protected DTD dtd;
+
+ /**
+ * The value of this field determines whether or not the Parser will be
+ * strict in enforcing SGML compatibility. The default value is false,
+ * stating that the parser should do everything to parse and get at least
+ * some information even from the incorrectly written HTML input.
+ */
+ protected boolean strict;
+
+ /**
+ * This fields has positive values in preformatted tags.
+ */
+ protected int preformatted = 0;
+
+ /**
+ * The set of the document tags. This field is used for supporting
+ * markFirstTime().
+ */
+ private Set documentTags =
+ new TreeSet(new Comparator()
+ {
+ public int compare(Object a, Object b)
+ {
+ return ((String) a).compareToIgnoreCase((String) b);
+ }
+ }
+ );
+
+ /**
+ * The buffer to collect the incremental output like text or coment.
+ */
+ private StringBuffer buffer = new StringBuffer();
+
+ /**
+ * The buffer to store the document title.
+ */
+ private StringBuffer title = new StringBuffer();
+
+ /**
+ * The current token.
+ */
+ private Token t;
+
+ /**
+ * True means that the 'title' tag of this document has
+ * already been handled.
+ */
+ private boolean titleHandled;
+
+ /**
+ * True means that the 'title' tag is currently open and all
+ * text is also added to the title buffer.
+ */
+ private boolean titleOpen;
+
+ /**
+ * The attributes of the current HTML element.
+ * Package-private to avoid an accessor method.
+ */
+ htmlAttributeSet attributes =
+ htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET;
+
+ /**
+ * The validator, controlling the forcible closing of the tags that
+ * (in accordance to dtd) are not allowed in the current context.
+ */
+ private htmlValidator validator;
+
+ /**
+ * Provides the default values for parameters in the case when these
+ * values are defined in the DTD.
+ */
+ private parameterDefaulter defaulter;
+
+ /**
+ * The text pre-processor for handling line ends and tabs.
+ */
+ private textPreProcessor textProcessor = new textPreProcessor();
+
+ /**
+ * Creates a new Parser that uses the given
+ * {@link javax.swing.text.html.parser.DTD }. The only standard way
+ * to get an instance of DTD is to construct it manually, filling in
+ * all required fields.
+ * @param a_dtd The DTD to use. The parser behaviour after passing null
+ * as an argument is not documented and may vary between implementations.
+ */
+ public Parser(DTD a_dtd)
+ {
+ if (a_dtd == null)
+ dtd = gnu.javax.swing.text.html.parser.HTML_401F.getInstance();
+ else
+ dtd = a_dtd;
+
+ defaulter = new parameterDefaulter(dtd);
+
+ validator =
+ new htmlValidator(dtd)
+ {
+ /**
+ * Handles the error message. This method must be overridden to pass
+ * the message where required.
+ * @param msg The message text.
+ */
+ protected void s_error(String msg)
+ {
+ error(msg);
+ }
+
+ /**
+ * The method is called when the tag validator decides to close the
+ * tag on its own initiative. After reaching the end of stream,
+ * The tag validator closes all unclosed elements that are required
+ * to have the end (closing) tag.
+ *
+ * @param element The tag being fictionally (forcibly) closed.
+ */
+ protected void handleSupposedEndTag(Element tElement)
+ {
+ // The tag is cloned as the original tElement is the
+ // element from the starting tag - may be accidently used
+ // somewhere else.
+ TagElement tag = makeTag(tElement, true);
+ _handleEndTag_remaining(tag);
+ }
+
+ /**
+ * The method is called when the the tag validator decides to open
+ * the new tag on its own initiative. The tags, opened in this
+ * way, are HTML, HEAD and BODY. The attribute set is temporary
+ * assigned to the empty one, the previous value is
+ * restored before return.
+ *
+ * @param element The tag being fictionally (forcibly) closed.
+ */
+ protected void handleSupposedStartTag(Element tElement)
+ {
+ TagElement tag = makeTag(tElement, true);
+ htmlAttributeSet were = attributes;
+ attributes = htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET;
+ _handleStartTag(tag);
+ attributes = were;
+ }
+ };
+ }
+
+ /**
+ * Get the attributes of the current tag.
+ * @return The attribute set, representing the attributes of the current tag.
+ */
+ public htmlAttributeSet getAttributes()
+ {
+ return attributes;
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * delegates the call to handleError, also providing the current line.
+ */
+ public void error(String msg)
+ {
+ error(msg, getTokenAhead());
+ }
+
+ public void error(String msg, Token atToken)
+ {
+ if (atToken != null)
+ handleError(atToken.where.beginLine,
+ msg + ": line " + atToken.where.beginLine +
+ ", absolute pos " + atToken.where.startPosition
+ );
+ else
+ handleError(0, msg);
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * delegates the call to error (parm1+": '"+parm2+"'").
+ */
+ public void error(String msg, String invalid)
+ {
+ error(msg + ": '" + invalid + "'");
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * delegates the call to error (parm1+" "+ parm2+" "+ parm3).
+ */
+ public void error(String parm1, String parm2, String parm3)
+ {
+ error(parm1 + " " + parm2 + " " + parm3);
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * delegates the call to error (parm1+" "+ parm2+" "+ parm3+" "+ parm4).
+ */
+ public void error(String parm1, String parm2, String parm3, String parm4)
+ {
+ error(parm1 + " " + parm2 + " " + parm3 + " " + parm4);
+ }
+
+ public void flushAttributes()
+ {
+ }
+
+ /**
+ * Parse the HTML text, calling various methods in response to the
+ * occurence of the corresponding HTML constructions.
+ * @param reader The reader to read the source HTML from.
+ * @throws IOException If the reader throws one.
+ */
+ public synchronized void parse(Reader reader)
+ throws IOException
+ {
+ reset(reader);
+ restart();
+ try
+ {
+ parseDocument();
+ validator.closeAll();
+ }
+ catch (ParseException ex)
+ {
+ if (ex != null)
+ {
+ error("Unable to continue parsing the document", ex.getMessage());
+
+ Throwable cause = ex.getCause();
+ if (cause instanceof IOException)
+ throw (IOException) cause;
+ }
+ }
+ }
+
+ /**
+ * Parses DTD markup declaration. Currently returns null without action.
+ * @return null.
+ * @throws IOException
+ */
+ public String parseDTDMarkup()
+ throws IOException
+ {
+ return null;
+ }
+
+ /**
+ * Parse SGML insertion ( &lt;! ... &gt; ). When the
+ * the SGML insertion is found, this method is called, passing
+ * SGML in the string buffer as a parameter. The default method
+ * returns false without action and can be overridden to
+ * implement user - defined SGML support.
+ * <p>
+ * If you need more information about SGML insertions in HTML documents,
+ * the author suggests to read SGML tutorial on
+ * {@link http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html}.
+ * We also recommend Goldfarb C.F (1991) <i>The SGML Handbook</i>,
+ * Oxford University Press, 688 p, ISBN: 0198537379.
+ * </p>
+ * @param strBuff
+ * @return true if this is a valid DTD markup declaration.
+ * @throws IOException
+ */
+ public boolean parseMarkupDeclarations(StringBuffer strBuff)
+ throws IOException
+ {
+ return false;
+ }
+
+ /**
+ * Get the first line of the last parsed token.
+ */
+ protected int getCurrentLine()
+ {
+ return hTag.where.beginLine;
+ }
+
+ /**
+ * Read parseable character data, add to buffer.
+ * @param clearBuffer If true, buffer if filled by CDATA section,
+ * otherwise the section is appended to the existing content of the
+ * buffer.
+ *
+ * @throws ParseException
+ */
+ protected void CDATA(boolean clearBuffer)
+ throws ParseException
+ {
+ Token start = hTag = getTokenAhead();
+
+ if (clearBuffer)
+ buffer.setLength(0);
+
+ // Handle expected EOF.
+ if (start.kind == EOF)
+ return;
+
+ read:
+ while (true)
+ {
+ t = getTokenAhead();
+ if (t.kind == EOF)
+ {
+ error("unexpected eof", t);
+ break read;
+ }
+ else if (t.kind == BEGIN)
+ break read;
+ else if (t.kind == Constants.ENTITY)
+ {
+ resolveAndAppendEntity(t);
+ getNextToken();
+ }
+ else
+ {
+ append(t);
+ getNextToken();
+ }
+ }
+ hTag = new Token(start, getTokenAhead(0));
+ if (buffer.length() != 0)
+ _handleText();
+ }
+
+ /**
+ * Process Comment. This method skips till --> without
+ * taking SGML constructs into consideration. The supported SGML
+ * constructs are handled separately.
+ */
+ protected void Comment()
+ throws ParseException
+ {
+ buffer.setLength(0);
+
+ Token start = hTag = mustBe(BEGIN);
+ optional(WS);
+ mustBe(EXCLAMATION);
+ optional(WS);
+ mustBe(DOUBLE_DASH);
+
+ Token t;
+ Token last;
+
+ comment:
+ while (true)
+ {
+ t = getTokenAhead();
+ if (t.kind == EOF)
+ {
+ handleEOFInComment();
+ last = t;
+ break comment;
+ }
+ else if (COMMENT_END.matches(this))
+ {
+ mustBe(DOUBLE_DASH);
+ optional(WS);
+ last = mustBe(END);
+ break comment;
+ }
+ else if (COMMENT_TRIPLEDASH_END.matches(this))
+ {
+ mustBe(DOUBLE_DASH);
+ t = mustBe(NUMTOKEN);
+ if (t.getImage().equals("-"))
+ {
+ append(t);
+ last = mustBe(END);
+ break comment;
+ }
+ else
+ {
+ buffer.append("--");
+ append(t);
+ t = getTokenAhead();
+ }
+ }
+ else
+ /* The lllll-- can match as NUMTOKEN */
+ if ((t.getImage().endsWith("--")) &&
+ (
+ getTokenAhead(1).kind == END ||
+ (getTokenAhead(1).kind == WS && getTokenAhead(2).kind == END)
+ )
+ )
+ {
+ buffer.append(t.getImage().substring(0, t.getImage().length() - 2));
+
+ /* Skip the closing > that we have already checked. */
+ last = mustBe(t.kind);
+ break comment;
+ }
+ else
+ append(t);
+ mustBe(t.kind);
+ }
+ hTag = new Token(start, last);
+ handleComment();
+ }
+
+ /**
+ * Read a script. The text, returned without any changes,
+ * is terminated only by the closing tag SCRIPT.
+ */
+ protected void Script()
+ throws ParseException
+ {
+ Token name;
+
+ Token start = hTag = mustBe(BEGIN);
+ optional(WS);
+
+ name = mustBe(SCRIPT);
+
+ optional(WS);
+
+ restOfTag(false, name, start);
+
+ buffer.setLength(0);
+
+ script:
+ while (!SCRIPT_CLOSE.matches(this))
+ {
+ append(getNextToken());
+ }
+
+ consume(SCRIPT_CLOSE);
+
+ _handleText();
+
+ endTag(false);
+ _handleEndTag(makeTagElement(name.getImage(), false));
+ }
+
+ /**
+ * Process SGML insertion that is not a comment.
+ */
+ protected void Sgml()
+ throws ParseException
+ {
+ if (COMMENT_OPEN.matches(this))
+ Comment();
+ else // skip till ">"
+ {
+ Token start = hTag = mustBe(BEGIN);
+ optional(WS);
+ mustBe(EXCLAMATION);
+
+ buffer.setLength(0);
+ read:
+ while (true)
+ {
+ t = getNextToken();
+ if (t.kind == Constants.ENTITY)
+ {
+ resolveAndAppendEntity(t);
+ }
+ else if (t.kind == EOF)
+ {
+ error("unexpected eof", t);
+ break read;
+ }
+ else if (t.kind == END)
+ break read;
+ else
+ append(t);
+ }
+
+ try
+ {
+ parseMarkupDeclarations(buffer);
+ }
+ catch (IOException ex)
+ {
+ error("Unable to parse SGML insertion: '" + buffer + "'",
+ new Token(start, t)
+ );
+ }
+ }
+ }
+
+ /**
+ * Read a style definition. The text, returned without any changes,
+ * is terminated only by the closing tag STYLE.
+ */
+ protected void Style()
+ throws ParseException
+ {
+ Token name;
+
+ Token start = hTag = mustBe(BEGIN);
+ optional(WS);
+
+ name = mustBe(STYLE);
+
+ optional(WS);
+
+ restOfTag(false, name, start);
+
+ buffer.setLength(0);
+
+ style:
+ while (!STYLE_CLOSE.matches(this))
+ {
+ append(getNextToken());
+ }
+
+ consume(STYLE_CLOSE);
+
+ _handleText();
+
+ endTag(false);
+ _handleEndTag(makeTagElement(name.getImage(), false));
+ }
+
+ /**
+ * Read a html tag.
+ */
+ protected void Tag()
+ throws ParseException
+ {
+ mark(true);
+
+ boolean closing = false;
+ Token name;
+ Token start = hTag = mustBe(BEGIN);
+
+ optional(WS);
+ name = getNextToken();
+ optional(WS);
+
+ if (name.kind == SLASH)
+ {
+ closing = true;
+ name = getNextToken();
+ }
+
+ restOfTag(closing, name, start);
+ }
+
+ /**
+ * A hook, for operations, preceeding call to handleText.
+ * Handle text in a string buffer.
+ * In non - preformatted mode, all line breaks immediately following the
+ * start tag and immediately before an end tag is discarded,
+ * \r, \n and \t are replaced by spaces, multiple space are replaced
+ * by the single one and the result is moved into array,
+ * passing it to handleText().
+ */
+ protected void _handleText()
+ {
+ char[] text;
+
+ if (preformatted > 0)
+ text = textProcessor.preprocessPreformatted(buffer);
+ else
+ text = textProcessor.preprocess(buffer);
+
+ if (text != null && text.length > 0)
+ {
+ TagElement pcdata = new TagElement(dtd.getElement("#pcdata"));
+ attributes = htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET;
+ _handleEmptyTag(pcdata);
+
+ handleText(text);
+ if (titleOpen)
+ title.append(text);
+ }
+ }
+
+ /**
+ * Add the image of this token to the buffer.
+ * @param t A token to append.
+ */
+ protected final void append(Token t)
+ {
+ if (t.kind != EOF)
+ t.appendTo(buffer);
+ }
+
+ /**
+ * Consume pattern that must match.
+ * @param p A pattern to consume.
+ */
+ protected final void consume(pattern p)
+ {
+ node n;
+ for (int i = 0; i < p.nodes.length; i++)
+ {
+ n = p.nodes [ i ];
+ if (n.optional)
+ optional(n.kind);
+ else
+ mustBe(n.kind);
+ }
+ }
+
+ /**
+ * The method is called when the HTML end (closing) tag is found or if
+ * the parser concludes that the one should be present in the
+ * current position. The method is called immediatly
+ * before calling the handleEndTag().
+ * @param omitted True if the tag is no actually present in the document,
+ * but is supposed by the parser (like &lt;/html&gt; at the end of the
+ * document).
+ */
+ protected void endTag(boolean omitted)
+ {
+ }
+
+ /**
+ * Handle HTML comment. The default method returns without action.
+ * @param comment
+ */
+ protected void handleComment(char[] comment)
+ {
+ }
+
+ /**
+ * This is additionally called in when the HTML content terminates
+ * without closing the HTML comment. This can only happen if the
+ * HTML document contains errors (for example, the closing --;gt is
+ * missing.
+ */
+ protected void handleEOFInComment()
+ {
+ error("Unclosed comment");
+ }
+
+ /**
+ * Handle the tag with no content, like &lt;br&gt;. The method is
+ * called for the elements that, in accordance with the current DTD,
+ * has an empty content.
+ * @param The tag being handled.
+ * @throws javax.swing.text.ChangedCharSetException
+ */
+ protected void handleEmptyTag(TagElement tag)
+ throws javax.swing.text.ChangedCharSetException
+ {
+ }
+
+ /**
+ * The method is called when the HTML closing tag ((like &lt;/table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param The tag
+ */
+ protected void handleEndTag(TagElement tag)
+ {
+ }
+
+ /* Handle error that has occured in the given line. */
+ protected void handleError(int line, String message)
+ {
+ }
+
+ /**
+ * The method is called when the HTML opening tag ((like &lt;table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param The tag
+ */
+ protected void handleStartTag(TagElement tag)
+ {
+ }
+
+ /**
+ * Handle the text section.
+ * <p> For non-preformatted section, the parser replaces
+ * \t, \r and \n by spaces and then multiple spaces
+ * by a single space. Additionaly, all whitespace around
+ * tags is discarded.
+ * </p>
+ * <p> For pre-formatted text (inside TEXAREA and PRE), the parser preserves
+ * all tabs and spaces, but removes <b>one</b> bounding \r, \n or \r\n,
+ * if it is present. Additionally, it replaces each occurence of \r or \r\n
+ * by a single \n.</p>
+ *
+ * @param text A section text.
+ */
+ protected void handleText(char[] text)
+ {
+ }
+
+ /**
+ * Handle HTML &lt;title&gt; tag. This method is invoked when
+ * both title starting and closing tags are already behind.
+ * The passed argument contains the concatenation of all
+ * title text sections.
+ * @param The title text.
+ */
+ protected void handleTitle(char[] title)
+ {
+ }
+
+ /**
+ * Constructs the tag from the given element. In this implementation,
+ * this is defined, but never called.
+ * @return the tag
+ */
+ protected TagElement makeTag(Element element)
+ {
+ return makeTag(element, false);
+ }
+
+ /**
+ * Constructs the tag from the given element.
+ * @param the tag base {@link javax.swing.text.html.parser.Element}
+ * @param isSupposed true if the tag is not actually present in the
+ * html input, but the parser supposes that it should to occur in
+ * the current location.
+ * @return the tag
+ */
+ protected TagElement makeTag(Element element, boolean isSupposed)
+ {
+ return new TagElement(element, isSupposed);
+ }
+
+ /**
+ * This is called when the tag, representing the given element,
+ * occurs first time in the document.
+ * @param element
+ */
+ protected void markFirstTime(Element element)
+ {
+ }
+
+ /**
+ * Consume the token that was checked before and hence MUST be present.
+ * @param kind The kind of token to consume.
+ */
+ protected Token mustBe(int kind)
+ {
+ if (getTokenAhead().kind == kind)
+ return getNextToken();
+ else
+ {
+ String ei = "";
+ if (kind < 1000)
+ ei = " ('" + (char) kind + "') ";
+ throw new AssertionError("The token of kind " + kind + ei +
+ " MUST be here,"
+ );
+ }
+ }
+
+ /**
+ * Handle attribute without value. The default method uses
+ * the only allowed attribute value from DTD.
+ * If the attribute is unknown or allows several values,
+ * the HTML.NULL_ATTRIBUTE_VALUE is used. The attribute with
+ * this value is added to the attribute set.
+ * @param element The name of element.
+ * @param attribute The name of attribute without value.
+ */
+ protected void noValueAttribute(String element, String attribute)
+ {
+ Object value = HTML.NULL_ATTRIBUTE_VALUE;
+
+ Element e = (Element) dtd.elementHash.get(element.toLowerCase());
+ if (e != null)
+ {
+ AttributeList attr = e.getAttribute(attribute);
+ if (attr != null)
+ {
+ Vector values = attr.values;
+ if (values != null && values.size() == 1)
+ value = values.get(0);
+ }
+ }
+ attributes.addAttribute(attribute, value);
+ }
+
+ /**
+ * Consume the optional token, if present.
+ * @param kind The kind of token to consume.
+ */
+ protected Token optional(int kind)
+ {
+ if (getTokenAhead().kind == kind)
+ return getNextToken();
+ else
+ return null;
+ }
+
+ /** Parse the html document. */
+ protected void parseDocument()
+ throws ParseException
+ {
+ while (getTokenAhead().kind != EOF)
+ {
+ advanced = false;
+ if (TAG.matches(this))
+ Tag();
+ else if (COMMENT_OPEN.matches(this))
+ Comment();
+ else if (STYLE_OPEN.matches(this))
+ Style();
+ else if (SCRIPT_OPEN.matches(this))
+ Script();
+ else if (SGML.matches(this))
+ Sgml();
+ else
+ CDATA(true);
+
+ // Surely HTML error, treat as a text.
+ if (!advanced)
+ {
+ Token wrong = getNextToken();
+ error("unexpected '" + wrong.getImage() + "'", wrong);
+ buffer.setLength(0);
+ buffer.append(wrong.getImage());
+ _handleText();
+ }
+ }
+ }
+
+ /**
+ * Read the element attributes, adding them into attribute set.
+ * @param element The element name (needed to access attribute
+ * information in dtd).
+ */
+ protected void readAttributes(String element)
+ {
+ Token name;
+ Token value;
+ Token next;
+ String attrValue;
+
+ attributes = new htmlAttributeSet();
+
+ optional(WS);
+
+ attributeReading:
+ while (getTokenAhead().kind == NUMTOKEN)
+ {
+ name = getNextToken();
+ optional(WS);
+
+ next = getTokenAhead();
+ if (next.kind == EQ)
+ {
+ mustBe(EQ);
+ optional(WS);
+
+ next = getNextToken();
+
+ switch (next.kind)
+ {
+ case QUOT :
+
+ // read "quoted" attribute.
+ buffer.setLength(0);
+ readTillTokenE(QUOT);
+ attrValue = buffer.toString();
+ break;
+
+ case AP :
+
+ // read 'quoted' attribute.
+ buffer.setLength(0);
+ readTillTokenE(AP);
+ attrValue = buffer.toString();
+ break;
+
+ // read unquoted attribute.
+ case NUMTOKEN :
+ value = next;
+ optional(WS);
+
+ // Check maybe the opening quote is missing.
+ next = getTokenAhead();
+ if (bQUOTING.get(next.kind))
+ {
+ hTag = next;
+ error("The value without opening quote is closed with '" +
+ next.getImage() + "'"
+ );
+ }
+ attrValue = value.getImage();
+ break;
+
+ default :
+ break attributeReading;
+ }
+ attributes.addAttribute(name.getImage(), attrValue);
+ optional(WS);
+ }
+ else // The '=' is missing: attribute without value.
+ {
+ noValueAttribute(element, name.getImage());
+ }
+ }
+ }
+
+ /**
+ * Return string, corresponding the given named entity.
+ * The name is passed with the preceeding &, but without
+ * the ending semicolon.
+ */
+ protected String resolveNamedEntity(final String a_tag)
+ {
+ // Discard &
+ if (!a_tag.startsWith("&"))
+ throw new AssertionError("Named entity " + a_tag +
+ " must start witn '&'."
+ );
+
+ String tag = a_tag.substring(1);
+
+ try
+ {
+ Entity entity = dtd.getEntity(tag);
+ if (entity != null)
+ return entity.getString();
+
+ entity = dtd.getEntity(tag.toLowerCase());
+
+ if (entity != null)
+ {
+ error("The name of this entity should be in lowercase", a_tag);
+ return entity.getString();
+ }
+ }
+ catch (IndexOutOfBoundsException ibx)
+ {
+ /* The error will be reported. */
+ }
+
+ error("Unknown named entity", a_tag);
+ return a_tag;
+ }
+
+ /**
+ * Return char, corresponding the given numeric entity.
+ * The name is passed with the preceeding &#, but without
+ * the ending semicolon.
+ */
+ protected char resolveNumericEntity(final String a_tag)
+ {
+ // Discard &#
+ if (!a_tag.startsWith("&#"))
+ throw new AssertionError("Numeric entity " + a_tag +
+ " must start witn '&#'."
+ );
+
+ String tag = a_tag.substring(2);
+
+ try
+ {
+ // Determine the encoding type:
+ char cx = tag.charAt(0);
+ if (cx == 'x' || cx == 'X') // Hexadecimal &#Xnnn;
+
+ return (char) Integer.parseInt(tag.substring(1), 16);
+
+ return (char) Integer.parseInt(tag);
+ }
+
+ /* The error will be reported. */
+ catch (NumberFormatException nex)
+ {
+ }
+ catch (IndexOutOfBoundsException ix)
+ {
+ }
+
+ error("Invalid numeric entity", a_tag);
+ return '?';
+ }
+
+ /**
+ * Reset all fields into the intial default state, preparing the
+ * parset for parsing the next document.
+ */
+ protected void restart()
+ {
+ documentTags.clear();
+ titleHandled = false;
+ titleOpen = false;
+ buffer.setLength(0);
+ title.setLength(0);
+ validator.restart();
+ }
+
+ /**
+ * The method is called when the HTML opening tag ((like &lt;table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position. The method is called immediately before
+ * calling the handleStartTag.
+ * @param The tag
+ */
+ protected void startTag(TagElement tag)
+ throws ChangedCharSetException
+ {
+ }
+
+ /**
+ * Handle a complete element, when the tag content is already present in the
+ * buffer and both starting and heading tags behind. This is called
+ * in the case when the tag text must not be parsed for the nested
+ * elements (elements STYLE and SCRIPT).
+ */
+ private void _handleCompleteElement(TagElement tag)
+ {
+ _handleStartTag(tag);
+
+ // Suppress inclusion of the SCRIPT ans STYLE texts into the title.
+ HTML.Tag h = tag.getHTMLTag();
+ if (h == HTML.Tag.SCRIPT || h == HTML.Tag.STYLE)
+ {
+ boolean tmp = titleOpen;
+ titleOpen = false;
+ _handleText();
+ titleOpen = tmp;
+ }
+ else
+ _handleText();
+
+ _handleEndTag(tag);
+ }
+
+ /**
+ * A hooks for operations, preceeding call to handleEmptyTag().
+ * Handle the tag with no content, like &lt;br&gt;. As no any
+ * nested tags are expected, the tag validator is not involved.
+ * @param The tag being handled.
+ */
+ private void _handleEmptyTag(TagElement tag)
+ {
+ try
+ {
+ validator.validateTag(tag, attributes);
+ handleEmptyTag(tag);
+ }
+ catch (ChangedCharSetException ex)
+ {
+ error("Changed charset exception:", ex.getMessage());
+ }
+ }
+
+ /**
+ * A hooks for operations, preceeding call to handleEndTag().
+ * The method is called when the HTML closing tag
+ * is found. Calls handleTitle after closing the 'title' tag.
+ * @param The tag
+ */
+ private void _handleEndTag(TagElement tag)
+ {
+ validator.closeTag(tag);
+ _handleEndTag_remaining(tag);
+ }
+
+ /**
+ * Actions that are also required if the closing action was
+ * initiated by the tag validator.
+ * Package-private to avoid an accessor method.
+ */
+ void _handleEndTag_remaining(TagElement tag)
+ {
+ HTML.Tag h = tag.getHTMLTag();
+
+ handleEndTag(tag);
+ endTag(tag.fictional());
+
+ if (h.isPreformatted())
+ preformatted--;
+ if (preformatted < 0)
+ preformatted = 0;
+
+ if (h == HTML.Tag.TITLE)
+ {
+ titleOpen = false;
+ titleHandled = true;
+
+ char[] a = new char[ title.length() ];
+ title.getChars(0, a.length, a, 0);
+ handleTitle(a);
+ }
+ }
+
+ /**
+ * A hooks for operations, preceeding call to handleStartTag().
+ * The method is called when the HTML opening tag ((like &lt;table&gt;)
+ * is found.
+ * Package-private to avoid an accessor method.
+ * @param The tag
+ */
+ void _handleStartTag(TagElement tag)
+ {
+ validator.openTag(tag, attributes);
+ startingTag(tag);
+ handleStartTag(tag);
+
+ HTML.Tag h = tag.getHTMLTag();
+
+ if (h.isPreformatted())
+ preformatted++;
+
+ if (h == HTML.Tag.TITLE)
+ {
+ if (titleHandled)
+ error("Repetetive <TITLE> tag");
+ titleOpen = true;
+ titleHandled = false;
+ }
+ }
+
+ /**
+ * Resume parsing after heavy errors in HTML tag structure.
+ * @throws ParseException
+ */
+ private void forciblyCloseTheTag()
+ throws ParseException
+ {
+ int closeAt = 0;
+ buffer.setLength(0);
+
+ ahead:
+ for (int i = 1; i < 100; i++)
+ {
+ t = getTokenAhead(i - 1);
+ if (t.kind == EOF || t.kind == BEGIN)
+ break ahead;
+ if (t.kind == END)
+ {
+ /* Closing '>' found. */
+ closeAt = i;
+ break ahead;
+ }
+ }
+ if (closeAt > 0)
+ {
+ buffer.append("Ignoring '");
+ for (int i = 1; i <= closeAt; i++)
+ {
+ t = getNextToken();
+ append(t);
+ }
+ buffer.append('\'');
+ error(buffer.toString());
+ }
+ }
+
+ /**
+ * Handle comment in string buffer. You can avoid allocating a char
+ * array each time by processing your comment directly here.
+ */
+ private void handleComment()
+ {
+ char[] a = new char[ buffer.length() ];
+ buffer.getChars(0, a.length, a, 0);
+ handleComment(a);
+ }
+
+ private TagElement makeTagElement(String name, boolean isSupposed)
+ {
+ Element e = (Element) dtd.elementHash.get(name.toLowerCase());
+ if (e == null)
+ {
+ error("Unknown tag <" + name + ">");
+ e = dtd.getElement(name);
+ e.name = name.toUpperCase();
+ e.index = -1;
+ }
+
+ if (!documentTags.contains(e.name))
+ {
+ markFirstTime(e);
+ documentTags.add(e.name);
+ }
+
+ return makeTag(e, isSupposed);
+ }
+
+ /**
+ * Read till the given token, resolving entities. Consume the given
+ * token without adding it to buffer.
+ * @param till The token to read till
+ * @throws ParseException
+ */
+ private void readTillTokenE(int till)
+ throws ParseException
+ {
+ buffer.setLength(0);
+ read:
+ while (true)
+ {
+ t = getNextToken();
+ if (t.kind == Constants.ENTITY)
+ {
+ resolveAndAppendEntity(t);
+ }
+ else if (t.kind == EOF)
+ {
+ error("unexpected eof", t);
+ break read;
+ }
+ else if (t.kind == till)
+ break read;
+ else if (t.kind == WS)
+ {
+ // Processing whitespace in accordance with CDATA rules:
+ String s = t.getImage();
+ char c;
+ for (int i = 0; i < s.length(); i++)
+ {
+ c = s.charAt(i);
+ if (c == '\r')
+ buffer.append(' '); // CR replaced by space
+ else if (c == '\n')
+ ; // LF ignored
+ else if (c == '\t')
+ buffer.append(' '); // Tab replaced by space
+ else
+ buffer.append(c);
+ }
+ }
+ else
+ append(t);
+ }
+ }
+
+ /**
+ * Resolve the entity and append it to the end of buffer.
+ * @param entity
+ */
+ private void resolveAndAppendEntity(Token entity)
+ {
+ switch (entity.category)
+ {
+ case ENTITY_NAMED :
+ buffer.append(resolveNamedEntity(entity.getImage()));
+ break;
+
+ case ENTITY_NUMERIC :
+ buffer.append(resolveNumericEntity(entity.getImage()));
+ break;
+
+ default :
+ throw new AssertionError("Invalid entity category " +
+ entity.category
+ );
+ }
+ }
+
+ /**
+ * Handle the remaining of HTML tags. This is a common end for
+ * TAG, SCRIPT and STYLE.
+ * @param closing True for closing tags ( &lt;/TAG&gt; ).
+ * @param name Name of element
+ * @param start Token where element has started
+ * @throws ParseException
+ */
+ private void restOfTag(boolean closing, Token name, Token start)
+ throws ParseException
+ {
+ boolean end = false;
+ Token next;
+
+ optional(WS);
+
+ readAttributes(name.getImage());
+
+ optional(WS);
+
+ next = getTokenAhead();
+ if (next.kind == END)
+ {
+ mustBe(END);
+ end = true;
+ }
+
+ hTag = new Token(start, next);
+
+ attributes.setResolveParent(defaulter.getDefaultParameters(name.getImage()));
+
+ if (!end)
+ {
+ // The tag body contains errors. If additionally the tag
+ // name is not valid, this construction is treated as text.
+ if (dtd.elementHash.get(name.getImage().toLowerCase()) == null &&
+ backupMode
+ )
+ {
+ error("Errors in tag body and unknown tag name. " +
+ "Treating the tag as a text."
+ );
+ reset();
+
+ hTag = mustBe(BEGIN);
+ buffer.setLength(0);
+ buffer.append(hTag.getImage());
+ CDATA(false);
+ return;
+ }
+ else
+ {
+ error("Forcibly closing invalid parameter list");
+ forciblyCloseTheTag();
+ }
+ }
+
+ if (closing)
+ {
+ endTag(false);
+ _handleEndTag(makeTagElement(name.getImage(), false));
+ }
+ else
+ {
+ TagElement te = makeTagElement(name.getImage(), false);
+ if (te.getElement().type == DTDConstants.EMPTY)
+ _handleEmptyTag(te);
+ else
+ _handleStartTag(te);
+ }
+ }
+
+ /**
+ * This should fire additional actions in response to the
+ * ChangedCharSetException. The current implementation
+ * does nothing.
+ * @param tag
+ */
+ private void startingTag(TagElement tag)
+ {
+ try
+ {
+ startTag(tag);
+ }
+ catch (ChangedCharSetException cax)
+ {
+ error("Invalid change of charset");
+ }
+ }
+
+ private void ws_error()
+ {
+ error("Whitespace here is not permitted");
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java b/libjava/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
new file mode 100755
index 00000000000..2887bac0a11
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
@@ -0,0 +1,112 @@
+/* gnuStringIntMapper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * A helper class, mapping between the strings and they unique integer
+ * identifiers.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class gnuStringIntMapper
+{
+ /**
+ * Maps argument integer values from DTDConstants into they string
+ * names. Initialized on demand.
+ */
+ private Map is_Map;
+
+ /**
+ * Maps argument string names into they integer values from DTDConstants.
+ * Initialized on demand.
+ */
+ private Map si_Map;
+
+ /**
+ * Get string from id or null if no such id is present in the mapper.
+ */
+ public final String get(int id)
+ {
+ if (is_Map == null)
+ createTheMap();
+
+ return (String) is_Map.get(new Integer(id));
+ }
+
+ /** Get id from string or 0 if no such string is present in the mapper. */
+ public final int get(String id)
+ {
+ if (si_Map == null)
+ createTheMap();
+
+ Integer i = (Integer) si_Map.get(id);
+
+ return i != null ? i.intValue() : 0;
+ }
+
+ /**
+ * Create the mapping table for this mapper by adding the required
+ * String/int pairs. The method is invoked
+ * only once for each instance, after the first invocation of the any
+ * form of the <code>get</code> method. Use <code>add</code> to
+ * create a map for a concrete instance.
+ */
+ protected abstract void create();
+
+ /**
+ * Add an id/string pair to this mapper. This is called from
+ * the method <code>create</code> only.
+ */
+ protected void add(String name, int id)
+ {
+ Integer i = new Integer(id);
+ si_Map.put(name, i);
+ is_Map.put(i, name);
+ }
+
+ private void createTheMap()
+ {
+ is_Map = new HashMap();
+ si_Map = new TreeMap();
+ create();
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/Buffer.java b/libjava/gnu/javax/swing/text/html/parser/support/low/Buffer.java
new file mode 100644
index 00000000000..b9e8edc13f6
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/Buffer.java
@@ -0,0 +1,238 @@
+/* Buffer.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+/**
+ * A string buffer that additionally holds line and absolute postion
+ * information.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Buffer
+{
+ public static int INITIAL_SIZE = 2048;
+
+ /**
+ * True if the \n symbol has been seen.
+ */
+ public boolean n_seen;
+
+ /**
+ * True if the \r symbol has been seen.
+ */
+ public boolean r_seen;
+ char[] chr = new char[ INITIAL_SIZE ];
+ int[] line = new int[ INITIAL_SIZE ];
+ int[] position = new int[ INITIAL_SIZE ];
+
+ /**
+ * Current line.
+ */
+ int current_line = 0;
+
+ /**
+ * Point to the next free position.
+ */
+ int length;
+
+ public Buffer()
+ {
+ }
+
+ public Buffer(String content)
+ {
+ for (int i = 0; i < content.length(); i++)
+ {
+ append(content.charAt(i), i);
+ }
+ }
+
+ /**
+ * Get the characters into array.
+ * @param srcBegin From, inclusive
+ * @param srcEnd To, exclusive.
+ * @param dst Into
+ * @param dstBegin Offset.
+ */
+ public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
+ {
+ System.arraycopy(chr, srcBegin, dst, dstBegin, (srcEnd - srcBegin));
+ }
+
+ /**
+ * Return the sequence, used to separate lines in the document.
+ * @return one of \n, \r or \r\n.
+ */
+ public String getEndOfLineSequence()
+ {
+ if (r_seen && n_seen)
+ return "\r\n";
+ else if (r_seen)
+ return "\r";
+ else
+
+ // This also is returned for single-line document.
+ return "\n";
+ }
+
+ /**
+ * Truncate.
+ * @param n The length to truncate till.
+ */
+ public void setLength(int n)
+ {
+ length = n;
+ }
+
+ /**
+ * Get location information for the given region.
+ * @param from Region start, inclusive.
+ * @param to Region end, exclusive.
+ * @return The location, covering the region.
+ */
+ public Location getLocation(int from, int to)
+ {
+ Location l = new Location();
+ l.beginLine = line [ from ];
+ l.endLine = line [ to - 1 ];
+
+ l.startPosition = position [ from ];
+ l.endPosition = position [ to - 1 ] + 1;
+
+ return l;
+ }
+
+ /**
+ * Add the character.
+ * @param c The character.
+ * @param pos The character position in the stream (the line number
+ * is handled internally in the buffer).
+ */
+ public void append(char c, int pos)
+ {
+ if (length >= chr.length)
+ expand();
+ chr [ length ] = c;
+ position [ length ] = pos;
+
+ if (c == '\n')
+ {
+ if (!r_seen)
+ current_line++;
+ n_seen = true;
+ }
+ else if (c == '\r')
+ {
+ current_line++;
+ r_seen = true;
+ }
+
+ line [ length ] = current_line;
+
+ length++;
+ }
+
+ /**
+ * Return char at the given positon.
+ */
+ public char charAt(int i)
+ {
+ return chr [ i ];
+ }
+
+ /**
+ * Delete the range
+ * @param from Start position, inclusive.
+ * @param to End position, exclusive.
+ */
+ public void delete(int from, int to)
+ {
+ int len = to - from;
+ if (len < 1)
+ throw new AssertionError("Deleting " + from + " till " + to);
+
+ int tail = length - to;
+
+ System.arraycopy(chr, to, chr, from, tail);
+ System.arraycopy(position, to, position, from, tail);
+ System.arraycopy(line, to, line, from, tail);
+ length = length - len;
+ }
+
+ /**
+ * Double the buffer size.
+ */
+ public void expand()
+ {
+ int nSize = 2 * chr.length;
+
+ char[] nchr = new char[ nSize ];
+ int[] nposition = new int[ nSize ];
+ int[] nline = new int[ nSize ];
+
+ System.arraycopy(chr, 0, nchr, 0, chr.length);
+ System.arraycopy(position, 0, nposition, 0, position.length);
+ System.arraycopy(line, 0, nline, 0, line.length);
+
+ chr = nchr;
+ position = nposition;
+ line = nline;
+ }
+
+ /**
+ * Return length of the occupied part of the buffer.
+ */
+ public int length()
+ {
+ return length;
+ }
+
+ /**
+ * Prepare for parsing the new document.
+ */
+ public void reset()
+ {
+ setLength(0);
+ r_seen = n_seen = false;
+ }
+
+ public String toString()
+ {
+ return new String(chr, 0, length);
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/Constants.java b/libjava/gnu/javax/swing/text/html/parser/support/low/Constants.java
new file mode 100755
index 00000000000..367dd03962c
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/Constants.java
@@ -0,0 +1,422 @@
+/* Constants.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+import java.util.BitSet;
+
+/**
+ * The parser constants and operations, directly related to the parser
+ * constants.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Constants
+{
+ /* Single character tokens are reflected into they ASCII codes. */
+
+ /**
+ * Start of HTML token.
+ */
+ public static final int BEGIN = '<';
+
+ /**
+ * End of HTML token.
+ */
+ public static final int END = '>';
+
+ /**
+ * Exclamation (indicates SGML or comment).
+ */
+ public static final int EXCLAMATION = '!';
+
+ /**
+ * Slash (indicates closing tag).
+ */
+ public static final int SLASH = '/';
+
+ /**
+ * Equals sign.
+ */
+ public static final int EQ = '=';
+
+ /**
+ * Quoting sign.
+ */
+ public static final int AP = '\'';
+
+ /**
+ * Quoting sign.
+ */
+ public static final int QUOT = '"';
+
+ /* The numbers of other tokens start outside the ascii space. */
+ /* String tokens */
+
+ /**
+ * Double dash (--)
+ */
+ public static final int DOUBLE_DASH = 1000;
+
+ /**
+ * The STYLE tag (needs special handling).
+ */
+ public static final int STYLE = 1001;
+
+ /**
+ * The SCRIPT tag (needs special handling).
+ */
+ public static final int SCRIPT = 1002;
+
+ /* Pattern tokens */
+
+ /**
+ * HTML whitespace.
+ */
+ public static final int WS = 1003;
+
+ /**
+ * Named or numeric entity,
+ */
+ public static final int ENTITY = 1004;
+
+ /**
+ * Sequence of valid name characters (can start from digit).
+ */
+ public static final int NUMTOKEN = 1005;
+
+ /* Complex tokens */
+
+ /**
+ * Comment opening sequence.
+ */
+ public static final pattern COMMENT_OPEN =
+ new pattern(new node[]
+ {
+ new node(BEGIN), new node(WS, true), new node(EXCLAMATION),
+ new node(WS, true), new node(DOUBLE_DASH),
+ }
+ );
+
+ /**
+ * Comment closing sequence
+ */
+ public static final pattern COMMENT_END =
+ new pattern(new node[]
+ {
+ new node(DOUBLE_DASH), new node(WS, true), new node(END)
+ }
+ );
+
+ /**
+ * Special case ---> (also is treated as end of comment).
+ */
+ public static final pattern COMMENT_TRIPLEDASH_END =
+ new pattern(new node[]
+ {
+ new node(DOUBLE_DASH), new node(NUMTOKEN), new node(END)
+ }
+ );
+
+ /**
+ * STYLE element heading pattern.
+ */
+ public static final pattern STYLE_OPEN =
+ new pattern(new node[] { new node(BEGIN), new node(WS, true), new node(STYLE) });
+
+ /**
+ * SCRIPT element heading pattern.
+ */
+ public static final pattern SCRIPT_OPEN =
+ new pattern(new node[] { new node(BEGIN), new node(WS, true), new node(SCRIPT) });
+
+ /**
+ * SGML element heading pattern.
+ */
+ public static final pattern SGML =
+ new pattern(new node[]
+ {
+ new node(BEGIN), new node(WS, true), new node(EXCLAMATION)
+ }
+ );
+
+ /**
+ * SCRIPT element closing pattern.
+ */
+ public static final pattern SCRIPT_CLOSE =
+ new pattern(new node[]
+ {
+ new node(BEGIN), new node(WS, true), new node(SLASH),
+ new node(WS, true), new node(SCRIPT), new node(WS, true),
+ new node(END)
+ }
+ );
+
+ /**
+ * STYLE element closing pattern.
+ */
+ public static final pattern STYLE_CLOSE =
+ new pattern(new node[]
+ {
+ new node(BEGIN), new node(WS, true), new node(SLASH),
+ new node(WS, true), new node(STYLE), new node(WS, true),
+ new node(END)
+ }
+ );
+
+ /**
+ * Ordinary HTML tag heading pattern.
+ */
+ public static final pattern TAG =
+ new pattern(new node[]
+ {
+ new node(BEGIN), new node(WS, true), new node(SLASH, true),
+ new node(WS, true), new node(NUMTOKEN)
+ }
+ );
+
+ /* Special tokens */
+
+ /**
+ * All other tokens.
+ */
+ public static final int OTHER = 1999;
+
+ /**
+ * The UNICODE "end of text" control code
+ */
+ static final char ETX = 3;
+
+ /**
+ * End of file.
+ */
+ public static final int EOF = ETX;
+
+ /* Character categories */
+
+ /**
+ * All single char tokens.
+ */
+ public static final BitSet bSINGLE_CHAR_TOKEN = new BitSet();
+
+ /**
+ * Non letters and non numbers, allowed in HTML names.
+ */
+ public static final BitSet bSPECIAL = new BitSet();
+
+ /**
+ * All letters, used in HTML names.
+ */
+ public static final BitSet bLETTER = new BitSet();
+
+ /**
+ * Digits.
+ */
+ public static final BitSet bDIGIT = new BitSet();
+
+ /**
+ * Both line breaks.
+ */
+ public static final BitSet bLINEBREAK = new BitSet();
+
+ /**
+ * All whitespace.
+ */
+ public static final BitSet bWHITESPACE = new BitSet();
+
+ /**
+ * Both quoting characters.
+ */
+ public static final BitSet bQUOTING = new BitSet();
+
+ /**
+ * Valid name characters.
+ */
+ public static final BitSet bNAME = new BitSet();
+
+ /* Entity subcategories */
+
+ /**
+ * Named entity.
+ */
+ public static final int ENTITY_NAMED = 1;
+
+ /**
+ * Numeric entity.
+ */
+ public static final int ENTITY_NUMERIC = 2;
+
+ static
+ {
+ bQUOTING.set(AP);
+ bQUOTING.set(QUOT);
+
+ bSINGLE_CHAR_TOKEN.set(BEGIN);
+ bSINGLE_CHAR_TOKEN.set(END);
+ bSINGLE_CHAR_TOKEN.set(EXCLAMATION);
+ bSINGLE_CHAR_TOKEN.set(SLASH);
+ bSINGLE_CHAR_TOKEN.set(EQ);
+ bSINGLE_CHAR_TOKEN.set(EOF);
+
+ bSINGLE_CHAR_TOKEN.or(bQUOTING);
+
+ bLINEBREAK.set('\r');
+ bLINEBREAK.set('\n');
+
+ bWHITESPACE.set(' ');
+ bWHITESPACE.set('\t');
+ bWHITESPACE.set(0xC);
+ bWHITESPACE.or(bLINEBREAK);
+
+ for (char i = '0'; i <= '9'; i++)
+ {
+ bDIGIT.set(i);
+ }
+
+ for (char i = 'a'; i <= 'z'; i++)
+ {
+ bLETTER.set(i);
+ }
+
+ for (char i = 'A'; i <= 'Z'; i++)
+ {
+ bLETTER.set(i);
+ }
+
+ bSPECIAL.set('-');
+ bSPECIAL.set('_');
+ bSPECIAL.set(':');
+ bSPECIAL.set('.');
+
+ bNAME.or(bLETTER);
+ bNAME.or(bDIGIT);
+ bNAME.or(bSPECIAL);
+ }
+
+ /**
+ * Verifies if one of the tokens matches the end of string
+ * buffer. The last character in the string buffer is the
+ * "future character", some tokens needs to verify it the
+ * token does not continue "towards the future". If the token
+ * matches, it matches till "pre-last" character in the buffer.
+ * @param b
+ * @return
+ */
+ public Token endMatches(Buffer b)
+ {
+ if (b.length() < 2)
+ return null;
+
+ int p = b.length() - 2;
+
+ if (b.length() > 2 && b.charAt(p) == '-' && b.charAt(p - 1) == '-')
+ return new Token(DOUBLE_DASH, "--", b.getLocation(p - 1, p + 1));
+
+ char last = b.charAt(p);
+
+ if (bSINGLE_CHAR_TOKEN.get(last))
+ return new Token(last, last, b.getLocation(p, p + 1));
+
+ char future = b.charAt(p + 1);
+
+ // Check for numtokens, script and style:
+ if (bNAME.get(last) && !bNAME.get(future))
+ {
+ // Scan the history up:
+ int u = p - 1;
+ while (u >= 0 && bNAME.get(b.charAt(u)))
+ u--;
+ u++;
+
+ char[] token = new char[ p - u + 1 ];
+
+ // Found a numtoken
+ b.getChars(u, p + 1, token, 0);
+
+ // Verify for the built-in tokens:
+ String e = new String(token);
+
+ // found the entity reference
+ if (u > 0 && b.charAt(u - 1) == '&')
+ {
+ // The subsequent semicolon may be the part of the token
+ // as well. The semicolon must be ignored. This must be
+ // handled elsewhere.
+ return new Token(ENTITY, ENTITY_NAMED, "&" + e,
+ b.getLocation(u - 1, p + 1)
+ );
+ }
+
+ // found the numeric entity reference
+ if (u > 1 && b.charAt(u - 1) == '#' && b.charAt(u - 2) == '&')
+ {
+ // The subsequent semicolon may be the part of the token
+ // as well. The semicolon must be ignored. This must be
+ // handled elsewhere.
+ return new Token(ENTITY, ENTITY_NUMERIC, "&#" + e,
+ b.getLocation(u - 2, p + 2)
+ );
+ }
+
+ Location le = b.getLocation(u, p + 1);
+
+ if (e.equalsIgnoreCase("SCRIPT"))
+ return new Token(SCRIPT, e, le);
+ else if (e.equalsIgnoreCase("STYLE"))
+ return new Token(STYLE, e, le);
+ else
+ return new Token(NUMTOKEN, e, le);
+ }
+
+ // Check for whitespace
+ if (bWHITESPACE.get(last) && !bWHITESPACE.get(future))
+ {
+ // Scan the history up:
+ int u = p - 1;
+ while (u >= 0 && bWHITESPACE.get(b.charAt(u)))
+ u--;
+ u++;
+
+ char[] token = new char[ p - u + 1 ];
+ b.getChars(u, p + 1, token, 0);
+
+ return new Token(WS, new String(token), b.getLocation(u, p + 1));
+ }
+
+ return null;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/Location.java b/libjava/gnu/javax/swing/text/html/parser/support/low/Location.java
new file mode 100644
index 00000000000..5a0f2046f49
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/Location.java
@@ -0,0 +1,83 @@
+/* Location.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+/**
+ * Defines a region in the text: its bounding positions and the line number.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Location
+{
+ /**
+ * The line number, where the token starts.
+ */
+ public int beginLine;
+
+ /**
+ * The line, where the token ends.
+ */
+ public int endLine;
+
+ /**
+ * The absolute token end position in the input stream,
+ * exclusive.
+ */
+ public int endPosition;
+
+ /**
+ * The absolute token start position in the input stream,
+ * inclusive.
+ */
+ public int startPosition;
+
+ public Location()
+ {
+ }
+
+ /**
+ * Special case, used to mark EOF.
+ * @param p The total stream length.
+ */
+ public Location(int p)
+ {
+ startPosition = p;
+ endPosition = p + 1;
+ beginLine = endLine = -1;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/ParseException.java b/libjava/gnu/javax/swing/text/html/parser/support/low/ParseException.java
new file mode 100644
index 00000000000..9f1094e6285
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/ParseException.java
@@ -0,0 +1,51 @@
+/* ParseException.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+/**
+ * This can be thrown from various parsing methods.
+ */
+public class ParseException
+ extends RuntimeException
+{
+ public ParseException(String s, Throwable cause)
+ {
+ super(s, cause);
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/Queue.java b/libjava/gnu/javax/swing/text/html/parser/support/low/Queue.java
new file mode 100755
index 00000000000..30890e4ebdf
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/Queue.java
@@ -0,0 +1,142 @@
+/* Queue.java -- a token queue.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+import java.util.Arrays;
+
+/**
+ * A token queue.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Queue
+{
+ Token[] m = new Token[ 64 ];
+ int a = 0;
+ int b = 0;
+
+ /**
+ * True for the empty queue.
+ */
+ public boolean isEmpty()
+ {
+ return size() == 0;
+ }
+
+ /**
+ * Add this trace to the end of the queue.
+ */
+ public void add(Token u)
+ {
+ if (a < m.length)
+ {
+ m [ a ] = u;
+ a++;
+ }
+ else // The end of array has been reached.
+ {
+ if (b > 0) // If some elements were deleted from the start of the queue, shift.
+ {
+ int d = b;
+ System.arraycopy(m, b, m, 0, a - b);
+ b = b - d;
+ a = a - d;
+ m [ a ] = u;
+ a++;
+ }
+ else // Enlarge the queue, doubling the size.
+ {
+ int n = m.length * 2;
+ Token[] nm = new Token[ 2 * n ];
+ System.arraycopy(m, 0, nm, 0, m.length);
+ Arrays.fill(m, null);
+
+ nm [ a ] = u;
+ m = nm;
+ a++;
+ }
+ }
+ }
+
+ /**
+ * Clear the queue.
+ */
+ public void clear()
+ {
+ a = b = 0;
+ Arrays.fill(m, null);
+ }
+
+ /**
+ * Read the value ahead. 0 is the value that will be returned with
+ * the following next. This method does not remove values from the
+ * queue. To test if there is enough tokens in the queue, size() must
+ * be checked before calling this method.
+ */
+ public Token get(int ahead)
+ {
+ int p = b + ahead;
+ if (p < a)
+ return m [ p ];
+ else
+ throw new ArrayIndexOutOfBoundsException("Not enough tokens");
+ }
+
+ /**
+ * Read the oldest value from the queue and remove this value from
+ * the queue.
+ */
+ public Token next()
+ {
+ if (a == b)
+ throw new ArrayIndexOutOfBoundsException("queue empty");
+
+ Token r = m [ b ];
+ m [ b ] = null;
+ b++;
+ return r;
+ }
+
+ /**
+ * Size of the queue.
+ */
+ public int size()
+ {
+ return a - b;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java b/libjava/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
new file mode 100755
index 00000000000..f354bec6e63
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
@@ -0,0 +1,374 @@
+/* ReaderTokenizer.java -- splits the input char sequence int tokens.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * Reader splits the input char sequence into tokens.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ReaderTokenizer
+ extends Constants
+{
+ /**
+ * This is set to true each time the getNextToken is called.
+ * Used in preventing loops when all patterns refuse to accept
+ * the invalid input.
+ */
+ protected boolean advanced;
+
+ /**
+ * If true, the returned tokens are also placed in the backup
+ * queue.
+ */
+ protected boolean backupMode;
+
+ /**
+ * The buffer to read document into.
+ */
+ Buffer buffer = new Buffer();
+
+ /**
+ * The queue for supporting mark().
+ */
+ Queue backup = new Queue();
+
+ /**
+ * The queue of found tokens.
+ */
+ Queue queue = new Queue();
+
+ /**
+ * The reader to read the document from.
+ */
+ Reader reader;
+
+ /**
+ * Array of char tokens
+ */
+ char[] charTokens;
+
+ /**
+ * Array of string tokens.
+ */
+ String[] stringTokens;
+
+ /**
+ * The current reader position.
+ */
+ int readerPosition = -1;
+
+ /**
+ * Creates a new ReaderTokenizer. The reset(...) method must be
+ * subsequently called to set the reader.
+ */
+ public ReaderTokenizer()
+ {
+ }
+
+ /**
+ * Return the sequence, used to separate lines in the document.
+ * @return one of \n, \r or \r\n.
+ */
+ public String getEndOfLineSequence()
+ {
+ return buffer.getEndOfLineSequence();
+ }
+
+ /**
+ * Get the next token.
+ * @return
+ */
+ public Token getNextToken()
+ {
+ Token rt;
+ advanced = true;
+ try
+ {
+ if (queue.isEmpty())
+ read(1);
+
+ if (!queue.isEmpty())
+ rt = queue.next();
+ else
+ rt = new Token(EOF, new Location(readerPosition));
+ }
+ catch (IOException ex)
+ {
+ throw new ParseException("IO Exception", ex);
+ }
+ if (backupMode)
+ backup.add(rt);
+ return rt;
+ }
+
+ /**
+ * Get a token, lying the given number of tokens
+ * ahead. getToken(0) will return the same token,
+ * what would be returned by getNextToken().
+ * getToken(..) does change the current position
+ * in the input stream. If the end of stream is
+ * reached, the EOF token is always returned.
+ */
+ public Token getTokenAhead(int ahead)
+ {
+ try
+ {
+ read(ahead - queue.size() + 1);
+ return queue.size() >= ahead ? queue.get(ahead) : eofToken();
+ }
+ catch (IOException ex)
+ {
+ throw new ParseException("IO Exception", ex);
+ }
+ }
+
+ /**
+ * Get a token, bein immediatley ahead.
+ * If the end of stream is
+ * reached, the EOF token is always returned.
+ * The method is equivalent calling getTokenAhead(0).
+ */
+ public Token getTokenAhead()
+ {
+ try
+ {
+ if (queue.isEmpty())
+ read(1);
+ if (!queue.isEmpty())
+ return queue.get(0);
+ else
+ return eofToken();
+ }
+ catch (IOException ex)
+ {
+ throw new ParseException("IO Exception", ex);
+ }
+ }
+
+ /**
+ * Invokes the error handler.
+ */
+ public void error(String msg, Token at)
+ {
+ System.out.println(msg);
+ }
+
+ /**
+ * Turns the backup mode on or off.
+ * It is possible to return where the mark(true) was last called
+ * by calling reset().
+ * @param mode True if it is required to save tokens, making
+ * returning to the current point possible.
+ */
+ public void mark(boolean mode)
+ {
+ backup.clear();
+ backupMode = mode;
+ }
+
+ /**
+ * Prepare for new parsing from the given stream.
+ * @param a_reader A reader to parse from.
+ */
+ public void reset(Reader a_reader)
+ {
+ reader = a_reader;
+ readerPosition = -1;
+ buffer.reset();
+ queue.clear();
+ }
+
+ /**
+ * Reset the internal cursor to the position where the mark()
+ * was last time called. Switches the backup mode off.
+ */
+ public void reset()
+ {
+ if (!backupMode)
+ throw new AssertionError("Call mark(true) before using reset()!");
+ backupMode = false;
+
+ // That is now in the queue, will be appended to the end of backup.
+ while (!queue.isEmpty())
+ backup.add(queue.next());
+
+ Queue t = queue;
+ queue = backup;
+ backup = t;
+ backup.clear();
+ }
+
+ /**
+ * Read the given number of the tokens. Add the needed number of EOF
+ * tokens if there are no more data in the stream.
+ * @param amount The number of additional tokens to read.
+ */
+ void read(int numberOfTokens)
+ throws IOException
+ {
+ if (numberOfTokens <= 0)
+ return;
+
+ reading:
+ for (int i = 0; i < numberOfTokens; i++)
+ readToken();
+ }
+
+ /**
+ * Read next token from the reader, add it to the queue
+ */
+ void readToken()
+ throws IOException
+ {
+ Token t;
+ int ch;
+
+ enlarging:
+ while (true)
+ {
+ t = tokenMatches();
+ if (t != null)
+ break enlarging;
+ else
+ {
+ ch = reader.read();
+ readerPosition++;
+ if (ch == ETX)
+ ch = ' ';
+ if (ch < 0)
+ {
+ if (buffer.length() == 0)
+ {
+ queue.add(eofToken());
+ return;
+ }
+ else
+ {
+ if (buffer.charAt(buffer.length() - 1) != ETX)
+ buffer.append(ETX, readerPosition++);
+ else
+ {
+ // Discard terminating ETX
+ buffer.setLength(buffer.length() - 1);
+ if (buffer.length() > 0)
+ {
+ t = new Token(OTHER, buffer.toString(),
+ buffer.getLocation(0, buffer.length())
+ );
+ queue.add(t);
+ buffer.setLength(0);
+ }
+ return;
+ }
+ }
+ }
+ else
+ buffer.append((char) ch, readerPosition);
+ }
+ }
+ }
+
+ /**
+ * Check if the end of buffer matches one of the tokens. If it does,
+ * return this token and remove the token sequence from the end of
+ * buffer.
+ * @return The matching token.
+ */
+ Token tokenMatches()
+ {
+ Token rt = endMatches(buffer);
+ if (rt != null) // Remove the matched image
+ {
+ // Consume future character if it was an entity and the future
+ // character is semicolon.
+ if (rt.kind == ENTITY)
+ {
+ if (buffer.charAt(buffer.length() - 1) == ';')
+ buffer.setLength(buffer.length() - rt.getImage().length() - 1);
+ else
+ {
+ error("Missing closing semicolon for entity '" + rt.getImage() +
+ "'", rt
+ );
+ consumeBuffer(rt);
+ }
+ }
+ else
+ {
+ consumeBuffer(rt);
+ }
+ }
+
+ // If the buffer is not empty, some sequence does not match any tokens.
+ // Add it to the queue as "OTHER".
+ if (rt != null)
+ {
+ if (buffer.length() > 1)
+ {
+ String rest = buffer.toString();
+ rest = rest.substring(0, rest.length() - 1);
+
+ Token other =
+ new Token(OTHER, rest, buffer.getLocation(0, buffer.length));
+ queue.add(other);
+ consumeBuffer(other);
+ }
+ queue.add(rt);
+ }
+ return rt;
+ }
+
+ private void consumeBuffer(Token rt)
+ {
+ buffer.delete(buffer.length() - rt.getImage().length() - 1,
+ buffer.length() - 1
+ );
+ }
+
+ /**
+ * Create EOF token.
+ */
+ private Token eofToken()
+ {
+ return new Token(EOF, "#", new Location(readerPosition));
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/Token.java b/libjava/gnu/javax/swing/text/html/parser/support/low/Token.java
new file mode 100644
index 00000000000..c298d78171d
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/Token.java
@@ -0,0 +1,169 @@
+/* Token.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+/**
+ * A token.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Token
+{
+ /**
+ * The place of this token in the document.
+ */
+ public Location where;
+
+ /**
+ * The additional category of token.
+ */
+ public int category;
+
+ /**
+ * An integer that describes the kind of this token.
+ */
+ public int kind;
+
+ /**
+ * The string image of the token, null if the char image must be used.
+ */
+ private String stringImage;
+
+ /**
+ * The char image of the token.
+ */
+ private char charImage;
+
+ /**
+ * Creates a new token with fields, initialized to the default values.
+ */
+ public Token()
+ {
+ }
+
+ /**
+ * Creates a new token of the given kind.
+ */
+ public Token(int _kind, Location _where)
+ {
+ kind = _kind;
+ where = _where;
+ }
+
+ /**
+ * Creates a new token of the given kind and given single char image.
+ */
+ public Token(int _kind, char _image, Location _where)
+ {
+ kind = _kind;
+ charImage = _image;
+ where = _where;
+ }
+
+ /**
+ * Creates a new token of the given kind and given string image.
+ */
+ public Token(int _kind, String _image, Location _where)
+ {
+ kind = _kind;
+ stringImage = _image;
+ where = _where;
+ }
+
+ /**
+ * Creates a new token of the given kind, category and given string image.
+ */
+ public Token(int _kind, int _category, String _image, Location _where)
+ {
+ kind = _kind;
+ category = _category;
+ stringImage = _image;
+ where = _where;
+ }
+
+ /**
+ * Creates a new token, where location fields are set as for token,
+ * spanning over two provided tokens and any tokens between them.
+ * The image field is initialized to null, the kind field is set to -1.
+ */
+ public Token(Token fromInclusive, Token toInclusive)
+ {
+ where = new Location();
+ where.beginLine = fromInclusive.where.beginLine;
+ where.startPosition = fromInclusive.where.startPosition;
+
+ where.endLine = toInclusive.where.endLine;
+ where.endPosition = toInclusive.where.endPosition;
+ }
+
+ public String getImage()
+ {
+ if (kind == 3)
+ return "#";
+ if (stringImage == null)
+ {
+ if (charImage == 0)
+ return null;
+ stringImage = new String(new char[] { charImage });
+ }
+ return stringImage;
+ }
+
+ /**
+ * Append the token image to the given string buffer.
+ * This may be more effective that buffer.append(this.getImage()).
+ * @param buffer A buffer to append.
+ */
+ public void appendTo(StringBuffer buffer)
+ {
+ if (charImage == 0)
+ buffer.append(getImage());
+ else
+ buffer.append(charImage);
+ }
+
+ /**
+ * Returns the string image or, if null, the bounding positions.
+ */
+ public String toString()
+ {
+ return getImage() != null ? kind + "'" + getImage()
+ : "<line " + where.beginLine + ", abs pos " + where.startPosition +
+ ".." + where.endPosition + ">";
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/node.java b/libjava/gnu/javax/swing/text/html/parser/support/low/node.java
new file mode 100644
index 00000000000..981166562ce
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/node.java
@@ -0,0 +1,78 @@
+/* node.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+/**
+ * A text level content model node. The only required unary operations
+ * here are "appears" and "optionally appears" ('?').
+ * <p>@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)</p>
+ */
+public class node
+{
+ /**
+ * True for node that is optional for the given position.
+ */
+ public boolean optional;
+
+ /**
+ * The kind of the token to match.
+ */
+ public int kind;
+
+ /**
+ * Creates the new node for matching a given kind of the token.
+ * @param kind The kind of the token to match.
+ * @param modifier The modifier (*?+).
+ */
+ public node(int kind, boolean _optional)
+ {
+ this.kind = kind;
+ optional = _optional;
+ }
+
+ /**
+ * Creates the node, indicating that token must match exactluy one time.
+ * @param kind The kind of token to match.
+ */
+ public node(int kind)
+ {
+ this.kind = kind;
+ optional = false;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/package.html b/libjava/gnu/javax/swing/text/html/parser/support/low/package.html
new file mode 100644
index 00000000000..a4ae57bffc5
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/package.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.swing.text.html.parser package.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - gnu.javax.swing.text.html.parser.support.low</title></head>
+
+<body>
+<p>This package contains classes that are directly used to process
+the text input: adapted stream tokenizer, specialized buffer and text-level content models .</p>
+@author Audrius Meskauskas, Lithuania
+</body>
+</html>
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/low/pattern.java b/libjava/gnu/javax/swing/text/html/parser/support/low/pattern.java
new file mode 100755
index 00000000000..ac82a205046
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/low/pattern.java
@@ -0,0 +1,105 @@
+/* pattern.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support.low;
+
+
+/**
+ * The simple pattern, consisting from the sequence of tokens that
+ * may have the unary modifier '?'. Choices and grouping
+ * are not required here.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class pattern
+{
+ /**
+ * The nodes of this pattern.
+ */
+ public final node[] nodes;
+
+ /**
+ * Create a pattern, containing the given list of nodes.
+ * @param a_nodes
+ */
+ public pattern(node[] a_nodes)
+ {
+ nodes = a_nodes;
+ }
+
+ /**
+ * Checks if the pattern can match the tokens in this
+ * tokenizer. Does not change the state of tokenizer.
+ * @param stream The tokenizer to read data from
+ * @return True if the pattern sequence matches the
+ * beginning of the tokenizer content.
+ */
+ public boolean matches(ReaderTokenizer stream)
+ {
+ try
+ {
+ int pt = 0;
+ int pn = 0;
+ Token t;
+ node n;
+
+ while (pn < nodes.length)
+ {
+ n = nodes [ pn ];
+ t = stream.getTokenAhead(pt);
+
+ if (t.kind == n.kind)
+ {
+ pn++;
+ pt++;
+ }
+ else
+ {
+ if (!n.optional)
+ return false;
+ else
+ pn++;
+ }
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ throw new ParseException("Exception", ex);
+ }
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/package.html b/libjava/gnu/javax/swing/text/html/parser/support/package.html
new file mode 100644
index 00000000000..35071ed00ca
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/package.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.swing.text.html.parser package.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - gnu.javax.swing.text.html.parser.support</title></head>
+
+<body>
+<p>This package provides various specialised classes, needed by HTML parser.
+</p>
+@author Audrius Meskauskas, Lithuania
+</body>
+</html>
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java b/libjava/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
new file mode 100755
index 00000000000..4b4878a7918
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
@@ -0,0 +1,106 @@
+/* parameterDefaulter.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support;
+
+import gnu.javax.swing.text.html.parser.htmlAttributeSet;
+
+import java.util.Hashtable;
+
+import javax.swing.text.html.parser.AttributeList;
+import javax.swing.text.html.parser.DTD;
+import javax.swing.text.html.parser.Element;
+
+/**
+ * Returns an attribute set, containing default
+ * parameters for the given element. Caches sets of default
+ * parameters.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class parameterDefaulter
+{
+ public final DTD dtd;
+ Hashtable sets = new Hashtable();
+
+ /**
+ * Create a parameterDefaulter that looks for the default attribute
+ * values in the given DTD.
+ * @param a_dtd
+ */
+ public parameterDefaulter(DTD a_dtd)
+ {
+ dtd = a_dtd;
+ }
+
+ /**
+ * Get the default parameter set for the given element.
+ * @param element The element name (case insensitive).
+ * @return the default attrbute set.
+ */
+ public htmlAttributeSet getDefaultParameters(String element)
+ {
+ String key = element.toLowerCase();
+ htmlAttributeSet atts = (htmlAttributeSet) sets.get(key);
+
+ if (atts == null)
+ {
+ htmlAttributeSet set = new htmlAttributeSet();
+ Element e = (Element) dtd.elementHash.get(element.toLowerCase());
+
+ if (e != null)
+ {
+ AttributeList a = e.getAttributes();
+
+ while (a != null)
+ {
+ if (a.value != null)
+ set.addAttribute(a.name, a.value);
+ a = a.next;
+ }
+ }
+
+ if (set.getAttributeCount() > 0)
+ sets.put(key, set);
+ else
+ sets.put(key, htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET);
+
+ atts = set;
+ }
+ return atts;
+ }
+}
diff --git a/libjava/gnu/javax/swing/text/html/parser/support/textPreProcessor.java b/libjava/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
new file mode 100755
index 00000000000..20af8f6352c
--- /dev/null
+++ b/libjava/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
@@ -0,0 +1,193 @@
+/* textPreProcessor.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.javax.swing.text.html.parser.support;
+
+import gnu.javax.swing.text.html.parser.support.low.Constants;
+
+/**
+ * Pre - processes text in text parts of the html document.
+ * Not thread - safe.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class textPreProcessor
+{
+ /**
+ * Pre - process non-preformatted text.
+ * \t, \r and \n mutate into spaces, then multiple spaces mutate
+ * into single one, all whitespace around tags is consumed.
+ * The content of the passed buffer is destroyed.
+ * @param text A text to pre-process.
+ */
+ public char[] preprocess(StringBuffer a_text)
+ {
+ if (a_text.length() == 0)
+ return null;
+
+ char[] text = toCharArray(a_text);
+
+ int a = 0;
+ int b = text.length - 1;
+
+ try
+ {
+ while (Constants.bWHITESPACE.get(text [ a ]))
+ a++;
+ while (Constants.bWHITESPACE.get(text [ b ]))
+ b--;
+ }
+ catch (ArrayIndexOutOfBoundsException sx)
+ {
+ // A text fragment, consisting from line breaks only.
+ return null;
+ }
+
+ a_text.setLength(0);
+
+ boolean spacesWere = false;
+ boolean spaceNow;
+ char c;
+
+ chars:
+ for (int i = a; i <= b; i++)
+ {
+ c = text [ i ];
+ spaceNow = Constants.bWHITESPACE.get(c);
+ if (spacesWere && spaceNow)
+ continue chars;
+ if (spaceNow)
+ a_text.append(' ');
+ else
+ a_text.append(c);
+ spacesWere = spaceNow;
+ }
+
+ if (a_text.length() == text.length)
+ {
+ a_text.getChars(0, a_text.length(), text, 0);
+ return text;
+ }
+ else
+ return toCharArray(a_text);
+ }
+
+ /**
+ * Pre - process pre-formatted text.
+ * Heading/closing spaces and tabs preserved.
+ * ONE bounding \r, \n or \r\n is removed.
+ * \r or \r\n mutate into \n. Tabs are
+ * preserved.
+ * The content of the passed buffer is destroyed.
+ * @param text
+ * @return
+ */
+ public char[] preprocessPreformatted(StringBuffer a_text)
+ {
+ if (a_text.length() == 0)
+ return null;
+
+ char[] text = toCharArray(a_text);
+
+ int a = 0;
+ int n = text.length - 1;
+ int b = n;
+
+ if (text [ 0 ] == '\n')
+ a++;
+ else
+ {
+ if (text [ 0 ] == '\r')
+ {
+ a++;
+ if (text.length > 1 && text [ 1 ] == '\n')
+ a++;
+ }
+ }
+
+ if (text [ n ] == '\r')
+ b--;
+ else
+ {
+ if (text [ n ] == '\n')
+ {
+ b--;
+ if (n > 0 && text [ n - 1 ] == '\r')
+ b--;
+ }
+ }
+
+ a_text.setLength(0);
+
+ if (a > b)
+ return null;
+
+ char c;
+
+ for (int i = a; i <= b; i++)
+ {
+ c = text [ i ];
+ if (c == '\r')
+ {
+ if (i == b || text [ i + 1 ] != '\n')
+ a_text.append('\n');
+ }
+ else
+ a_text.append(c);
+ }
+
+ if (a_text.length() == text.length)
+ {
+ a_text.getChars(0, a_text.length(), text, 0);
+ return text;
+ }
+ else
+ return toCharArray(a_text);
+ }
+
+ /**
+ * Return array of chars, present in the given buffer.
+ * @param a_text The buffer
+ * @return
+ */
+ private static char[] toCharArray(StringBuffer a_text)
+ {
+ char[] text = new char[ a_text.length() ];
+ a_text.getChars(0, text.length, text, 0);
+ return text;
+ }
+}
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLAnchorElement.java b/libjava/gnu/xml/dom/html2/DomHTMLAnchorElement.java
new file mode 100644
index 00000000000..625fa6c93cb
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLAnchorElement.java
@@ -0,0 +1,189 @@
+/* DomHTMLAnchorElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLAnchorElement;
+
+/**
+ * An HTML 'A' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLAnchorElement
+ extends DomHTMLElement
+ implements HTMLAnchorElement
+{
+
+ protected DomHTMLAnchorElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAccessKey()
+ {
+ return getHTMLAttribute("accesskey");
+ }
+
+ public void setAccessKey(String accessKey)
+ {
+ setHTMLAttribute("accesskey", accessKey);
+ }
+
+ public String getCharset()
+ {
+ return getHTMLAttribute("charset");
+ }
+
+ public void setCharset(String charset)
+ {
+ setHTMLAttribute("charset", charset);
+ }
+
+ public String getCoords()
+ {
+ return getHTMLAttribute("coords");
+ }
+
+ public void setCoords(String coords)
+ {
+ setHTMLAttribute("coords", coords);
+ }
+
+ public String getHref()
+ {
+ return getHTMLAttribute("href");
+ }
+
+ public void setHref(String href)
+ {
+ setHTMLAttribute("href", href);
+ }
+
+ public String getHreflang()
+ {
+ return getHTMLAttribute("hreflang");
+ }
+
+ public void setHreflang(String hreflang)
+ {
+ setHTMLAttribute("hreflang", hreflang);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getRel()
+ {
+ return getHTMLAttribute("rel");
+ }
+
+ public void setRel(String rel)
+ {
+ setHTMLAttribute("rel", rel);
+ }
+
+ public String getRev()
+ {
+ return getHTMLAttribute("rev");
+ }
+
+ public void setRev(String rev)
+ {
+ setHTMLAttribute("rev", rev);
+ }
+
+ public String getShape()
+ {
+ return getHTMLAttribute("shape");
+ }
+
+ public void setShape(String shape)
+ {
+ setHTMLAttribute("shape", shape);
+ }
+
+ public int getTabIndex()
+ {
+ return getIntHTMLAttribute("tabindex");
+ }
+
+ public void setTabIndex(int tabIndex)
+ {
+ setIntHTMLAttribute("tabindex", tabIndex);
+ }
+
+ public String getTarget()
+ {
+ return getHTMLAttribute("target");
+ }
+
+ public void setTarget(String target)
+ {
+ setHTMLAttribute("target", target);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+ public void blur()
+ {
+ dispatchUIEvent("blur");
+ }
+
+ public void focus()
+ {
+ dispatchUIEvent("focus");
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLAppletElement.java b/libjava/gnu/xml/dom/html2/DomHTMLAppletElement.java
new file mode 100644
index 00000000000..39bc4061a49
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLAppletElement.java
@@ -0,0 +1,169 @@
+/* DomHTMLAppletElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLAppletElement;
+
+/**
+ * An HTML 'APPLET' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLAppletElement
+ extends DomHTMLElement
+ implements HTMLAppletElement
+{
+
+ protected DomHTMLAppletElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getAlt()
+ {
+ return getHTMLAttribute("alt");
+ }
+
+ public void setAlt(String alt)
+ {
+ setHTMLAttribute("alt", alt);
+ }
+
+ public String getArchive()
+ {
+ return getHTMLAttribute("archive");
+ }
+
+ public void setArchive(String archive)
+ {
+ setHTMLAttribute("archive", archive);
+ }
+
+ public String getCode()
+ {
+ return getHTMLAttribute("code");
+ }
+
+ public void setCode(String code)
+ {
+ setHTMLAttribute("code", code);
+ }
+
+ public String getCodeBase()
+ {
+ return getHTMLAttribute("codebase");
+ }
+
+ public void setCodeBase(String codeBase)
+ {
+ setHTMLAttribute("codebase", codeBase);
+ }
+
+ public String getHeight()
+ {
+ return getHTMLAttribute("height");
+ }
+
+ public void setHeight(String height)
+ {
+ setHTMLAttribute("height", height);
+ }
+
+ public int getHspace()
+ {
+ return getIntHTMLAttribute("hspace");
+ }
+
+ public void setHspace(int hspace)
+ {
+ setIntHTMLAttribute("hspace", hspace);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getObject()
+ {
+ return getHTMLAttribute("object");
+ }
+
+ public void setObject(String object)
+ {
+ setHTMLAttribute("object", object);
+ }
+
+ public int getVspace()
+ {
+ return getIntHTMLAttribute("vspace");
+ }
+
+ public void setVspace(int vspace)
+ {
+ setIntHTMLAttribute("vspace", vspace);
+ }
+
+ public String getWidth()
+ {
+ return getHTMLAttribute("width");
+ }
+
+ public void setWidth(String width)
+ {
+ setHTMLAttribute("width", width);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLAreaElement.java b/libjava/gnu/xml/dom/html2/DomHTMLAreaElement.java
new file mode 100644
index 00000000000..10229fe2c7c
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLAreaElement.java
@@ -0,0 +1,139 @@
+/* DomHTMLAreaElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLAreaElement;
+
+/**
+ * An HTML 'AREA' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLAreaElement
+ extends DomHTMLElement
+ implements HTMLAreaElement
+{
+
+ protected DomHTMLAreaElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAccessKey()
+ {
+ return getHTMLAttribute("accesskey");
+ }
+
+ public void setAccessKey(String accessKey)
+ {
+ setHTMLAttribute("accesskey", accessKey);
+ }
+
+ public String getAlt()
+ {
+ return getHTMLAttribute("alt");
+ }
+
+ public void setAlt(String alt)
+ {
+ setHTMLAttribute("alt", alt);
+ }
+
+ public String getCoords()
+ {
+ return getHTMLAttribute("coords");
+ }
+
+ public void setCoords(String coords)
+ {
+ setHTMLAttribute("coords", coords);
+ }
+
+ public String getHref()
+ {
+ return getHTMLAttribute("href");
+ }
+
+ public void setHref(String href)
+ {
+ setHTMLAttribute("href", href);
+ }
+
+ public boolean getNoHref()
+ {
+ return getBooleanHTMLAttribute("nohref");
+ }
+
+ public void setNoHref(boolean nohref)
+ {
+ setBooleanHTMLAttribute("nohref", nohref);
+ }
+
+ public String getShape()
+ {
+ return getHTMLAttribute("shape");
+ }
+
+ public void setShape(String shape)
+ {
+ setHTMLAttribute("shape", shape);
+ }
+
+ public int getTabIndex()
+ {
+ return getIntHTMLAttribute("tabindex");
+ }
+
+ public void setTabIndex(int tabIndex)
+ {
+ setIntHTMLAttribute("tabindex", tabIndex);
+ }
+
+ public String getTarget()
+ {
+ return getHTMLAttribute("target");
+ }
+
+ public void setTarget(String target)
+ {
+ setHTMLAttribute("target", target);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLBRElement.java b/libjava/gnu/xml/dom/html2/DomHTMLBRElement.java
new file mode 100644
index 00000000000..d02ad22cafb
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLBRElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLBRElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLBRElement;
+
+/**
+ * An HTML 'BR' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLBRElement
+ extends DomHTMLElement
+ implements HTMLBRElement
+{
+
+ protected DomHTMLBRElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getClear()
+ {
+ return getHTMLAttribute("clear");
+ }
+
+ public void setClear(String clear)
+ {
+ setHTMLAttribute("clear", clear);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLBaseElement.java b/libjava/gnu/xml/dom/html2/DomHTMLBaseElement.java
new file mode 100644
index 00000000000..a7b241aadd1
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLBaseElement.java
@@ -0,0 +1,79 @@
+/* DomHTMLBaseElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLBaseElement;
+
+/**
+ * An HTML 'BASE' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLBaseElement
+ extends DomHTMLElement
+ implements HTMLBaseElement
+{
+
+ protected DomHTMLBaseElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getHref()
+ {
+ return getHTMLAttribute("href");
+ }
+
+ public void setHref(String href)
+ {
+ setHTMLAttribute("href", href);
+ }
+
+ public String getTarget()
+ {
+ return getHTMLAttribute("target");
+ }
+
+ public void setTarget(String target)
+ {
+ setHTMLAttribute("target", target);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLBaseFontElement.java b/libjava/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
new file mode 100644
index 00000000000..0d64f445ed5
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
@@ -0,0 +1,89 @@
+/* DomHTMLBaseFontElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLBaseFontElement;
+
+/**
+ * An HTML 'BASEFONT' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLBaseFontElement
+ extends DomHTMLElement
+ implements HTMLBaseFontElement
+{
+
+ protected DomHTMLBaseFontElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getColor()
+ {
+ return getHTMLAttribute("color");
+ }
+
+ public void setColor(String color)
+ {
+ setHTMLAttribute("color", color);
+ }
+
+ public String getFace()
+ {
+ return getHTMLAttribute("face");
+ }
+
+ public void setFace(String face)
+ {
+ setHTMLAttribute("face", face);
+ }
+
+ public int getSize()
+ {
+ return getIntHTMLAttribute("size");
+ }
+
+ public void setSize(int size)
+ {
+ setIntHTMLAttribute("size", size);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLBodyElement.java b/libjava/gnu/xml/dom/html2/DomHTMLBodyElement.java
new file mode 100644
index 00000000000..efcd855b317
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLBodyElement.java
@@ -0,0 +1,119 @@
+/* DomHTMLBodyElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLBodyElement;
+
+/**
+ * An HTML 'BODY' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLBodyElement
+ extends DomHTMLElement
+ implements HTMLBodyElement
+{
+
+ protected DomHTMLBodyElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getALink()
+ {
+ return getHTMLAttribute("alink");
+ }
+
+ public void setALink(String alink)
+ {
+ setHTMLAttribute("alink", alink);
+ }
+
+ public String getBackground()
+ {
+ return getHTMLAttribute("background");
+ }
+
+ public void setBackground(String background)
+ {
+ setHTMLAttribute("background", background);
+ }
+
+ public String getBgColor()
+ {
+ return getHTMLAttribute("bgcolor");
+ }
+
+ public void setBgColor(String bgcolor)
+ {
+ setHTMLAttribute("bgcolor", bgcolor);
+ }
+
+ public String getLink()
+ {
+ return getHTMLAttribute("link");
+ }
+
+ public void setLink(String link)
+ {
+ setHTMLAttribute("link", link);
+ }
+
+ public String getText()
+ {
+ return getHTMLAttribute("text");
+ }
+
+ public void setText(String text)
+ {
+ setHTMLAttribute("text", text);
+ }
+
+ public String getVLink()
+ {
+ return getHTMLAttribute("vlink");
+ }
+
+ public void setVLink(String vlink)
+ {
+ setHTMLAttribute("vlink", vlink);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLButtonElement.java b/libjava/gnu/xml/dom/html2/DomHTMLButtonElement.java
new file mode 100644
index 00000000000..996750ea6c6
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLButtonElement.java
@@ -0,0 +1,121 @@
+/* DomHTMLButtonElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.html2.HTMLButtonElement;
+import org.w3c.dom.html2.HTMLFormElement;
+
+/**
+ * An HTML 'BUTTON' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLButtonElement
+ extends DomHTMLElement
+ implements HTMLButtonElement
+{
+
+ protected DomHTMLButtonElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public String getAccessKey()
+ {
+ return getHTMLAttribute("accesskey");
+ }
+
+ public void setAccessKey(String accessKey)
+ {
+ setHTMLAttribute("accesskey", accessKey);
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public int getTabIndex()
+ {
+ return getIntHTMLAttribute("tabindex");
+ }
+
+ public void setTabIndex(int tabIndex)
+ {
+ setIntHTMLAttribute("tabindex", tabIndex);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public String getValue()
+ {
+ return getHTMLAttribute("value");
+ }
+
+ public void setValue(String value)
+ {
+ setHTMLAttribute("value", value);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLCollection.java b/libjava/gnu/xml/dom/html2/DomHTMLCollection.java
new file mode 100644
index 00000000000..da9d0142e39
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLCollection.java
@@ -0,0 +1,218 @@
+/* DomHTMLCollection.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomDOMException;
+import gnu.xml.dom.DomElement;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.html2.HTMLCollection;
+import org.w3c.dom.html2.HTMLOptionsCollection;
+import org.w3c.dom.traversal.NodeFilter;
+import org.w3c.dom.traversal.NodeIterator;
+
+/**
+ * An HTML element collection.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+class DomHTMLCollection
+ implements HTMLCollection, HTMLOptionsCollection, NodeList, NodeFilter
+{
+
+ final DomHTMLDocument doc;
+ final Node root;
+ List nodeNames;
+ List attributeNames;
+ List results;
+
+ DomHTMLCollection(DomHTMLDocument doc, Node root)
+ {
+ this.doc = doc;
+ this.root = root;
+ }
+
+ // -- Node name and attribute filtering --
+
+ void addNodeName(String name)
+ {
+ if (nodeNames == null)
+ {
+ nodeNames = new LinkedList();
+ }
+ nodeNames.add(name);
+ }
+
+ void addAttributeName(String name)
+ {
+ if (attributeNames == null)
+ {
+ attributeNames = new LinkedList();
+ }
+ attributeNames.add(name);
+ }
+
+ public short acceptNode(Node n)
+ {
+ if (n.getNodeType() != Node.ELEMENT_NODE)
+ {
+ return NodeFilter.FILTER_SKIP;
+ }
+ if (nodeNames != null && !acceptName(n.getLocalName()))
+ {
+ return NodeFilter.FILTER_SKIP;
+ }
+ if (attributeNames != null && !acceptAttributes(n.getAttributes()))
+ {
+ return NodeFilter.FILTER_SKIP;
+ }
+ return NodeFilter.FILTER_ACCEPT;
+ }
+
+ private boolean acceptName(String name)
+ {
+ for (Iterator i = nodeNames.iterator(); i.hasNext(); )
+ {
+ String nodeName = (String) i.next();
+ if (nodeName.equalsIgnoreCase(name))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean acceptAttributes(NamedNodeMap attrs)
+ {
+ for (Iterator i = attributeNames.iterator(); i.hasNext(); )
+ {
+ String attributeName = (String) i.next();
+ Node attr = getNamedItem(attrs, attributeName);
+ if (attr != null)
+ {
+ // Check that attribute has a non-null value
+ String nodeValue = attr.getNodeValue();
+ if (nodeValue != null && nodeValue.length() > 0)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Case-insensitive version of getNamedItem.
+ */
+ private Node getNamedItem(NamedNodeMap attrs, String name)
+ {
+ int len = attrs.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node attr = attrs.item(i);
+ String attrName = attr.getLocalName();
+ if (name.equalsIgnoreCase(attrName))
+ {
+ return attr;
+ }
+ }
+ return null;
+ }
+
+ // -- Perform query --
+
+ void evaluate()
+ {
+ NodeIterator i = doc.createNodeIterator(root, NodeFilter.SHOW_ELEMENT,
+ this, true);
+ results = new ArrayList();
+ for (Node node = i.nextNode(); node != null; node = i.nextNode())
+ {
+ results.add(node);
+ }
+ }
+
+ // -- HTMLCollection/NodeList interface --
+
+ public int getLength()
+ {
+ return results.size();
+ }
+
+ public void setLength(int length)
+ {
+ throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR);
+ }
+
+ public Node item(int index)
+ {
+ return (Node) results.get(index);
+ }
+
+ public Node namedItem(String name)
+ {
+ boolean xhtml = false; // FIXME detect XHTML document
+ for (Iterator i = results.iterator(); i.hasNext(); )
+ {
+ Node node = (Node) i.next();
+ NamedNodeMap attrs = node.getAttributes();
+ Node attr = getNamedItem(attrs, "id");
+ if (name.equals(attr.getTextContent()))
+ {
+ return node;
+ }
+ if (!xhtml)
+ {
+ attr = getNamedItem(attrs, "name");
+ if (name.equals(attr.getTextContent()))
+ {
+ return node;
+ }
+ }
+ }
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLDListElement.java b/libjava/gnu/xml/dom/html2/DomHTMLDListElement.java
new file mode 100644
index 00000000000..790e3081aec
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLDListElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLDListElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLDListElement;
+
+/**
+ * An HTML 'DL' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLDListElement
+ extends DomHTMLElement
+ implements HTMLDListElement
+{
+
+ protected DomHTMLDListElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getCompact()
+ {
+ return getBooleanHTMLAttribute("compact");
+ }
+
+ public void setCompact(boolean compact)
+ {
+ setBooleanHTMLAttribute("compact", compact);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLDirectoryElement.java b/libjava/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
new file mode 100644
index 00000000000..0f71f960ba4
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLDirectoryElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLDirectoryElement;
+
+/**
+ * An HTML 'DIR' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLDirectoryElement
+ extends DomHTMLElement
+ implements HTMLDirectoryElement
+{
+
+ protected DomHTMLDirectoryElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getCompact()
+ {
+ return getBooleanHTMLAttribute("compact");
+ }
+
+ public void setCompact(boolean compact)
+ {
+ setBooleanHTMLAttribute("compact", compact);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLDivElement.java b/libjava/gnu/xml/dom/html2/DomHTMLDivElement.java
new file mode 100644
index 00000000000..a35a5fb9360
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLDivElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLDivElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLDivElement;
+
+/**
+ * An HTML 'DIV' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLDivElement
+ extends DomHTMLElement
+ implements HTMLDivElement
+{
+
+ protected DomHTMLDivElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLDocument.java b/libjava/gnu/xml/dom/html2/DomHTMLDocument.java
new file mode 100644
index 00000000000..1ff0a27edf5
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLDocument.java
@@ -0,0 +1,425 @@
+/* DomHTMLDocument.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomDocument;
+import gnu.xml.dom.DomDOMException;
+import java.lang.reflect.Constructor;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.html2.HTMLCollection;
+import org.w3c.dom.html2.HTMLDocument;
+import org.w3c.dom.html2.HTMLElement;
+
+/**
+ * An HTML document.
+ * This is the factory object used to create HTML elements.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLDocument
+ extends DomDocument
+ implements HTMLDocument
+{
+
+ private static final Class[] ELEMENT_PT = new Class[] {
+ DomHTMLDocument.class,
+ String.class,
+ String.class
+ };
+
+ private static Map ELEMENT_CLASSES;
+ static
+ {
+ Map map = new HashMap();
+ map.put("a", DomHTMLAnchorElement.class);
+ map.put("applet", DomHTMLAppletElement.class);
+ map.put("area", DomHTMLAreaElement.class);
+ map.put("base", DomHTMLBaseElement.class);
+ map.put("basefont", DomHTMLBaseFontElement.class);
+ map.put("body", DomHTMLBodyElement.class);
+ map.put("br", DomHTMLBRElement.class);
+ map.put("button", DomHTMLButtonElement.class);
+ map.put("dir", DomHTMLDirectoryElement.class);
+ map.put("div", DomHTMLDivElement.class);
+ map.put("dlist", DomHTMLDListElement.class);
+ map.put("fieldset", DomHTMLFieldSetElement.class);
+ map.put("font", DomHTMLFontElement.class);
+ map.put("form", DomHTMLFormElement.class);
+ map.put("frame", DomHTMLFrameElement.class);
+ map.put("frameset", DomHTMLFrameSetElement.class);
+ map.put("head", DomHTMLHeadElement.class);
+ map.put("h1", DomHTMLHeadingElement.class);
+ map.put("h2", DomHTMLHeadingElement.class);
+ map.put("h3", DomHTMLHeadingElement.class);
+ map.put("h4", DomHTMLHeadingElement.class);
+ map.put("h5", DomHTMLHeadingElement.class);
+ map.put("h6", DomHTMLHeadingElement.class);
+ map.put("html", DomHTMLHtmlElement.class);
+ map.put("iframe", DomHTMLIFrameElement.class);
+ map.put("img", DomHTMLImageElement.class);
+ map.put("input", DomHTMLInputElement.class);
+ map.put("isindex", DomHTMLIsIndexElement.class);
+ map.put("label", DomHTMLLabelElement.class);
+ map.put("legend", DomHTMLLegendElement.class);
+ map.put("li", DomHTMLLIElement.class);
+ map.put("link", DomHTMLLinkElement.class);
+ map.put("map", DomHTMLMapElement.class);
+ map.put("menu", DomHTMLMenuElement.class);
+ map.put("meta", DomHTMLMetaElement.class);
+ map.put("ins", DomHTMLModElement.class);
+ map.put("del", DomHTMLModElement.class);
+ map.put("object", DomHTMLObjectElement.class);
+ map.put("ol", DomHTMLOListElement.class);
+ map.put("optgroup", DomHTMLOptGroupElement.class);
+ map.put("option", DomHTMLOptionElement.class);
+ map.put("p", DomHTMLParagraphElement.class);
+ map.put("param", DomHTMLParamElement.class);
+ map.put("pre", DomHTMLPreElement.class);
+ map.put("q", DomHTMLQuoteElement.class);
+ map.put("blockquote", DomHTMLQuoteElement.class);
+ map.put("script", DomHTMLScriptElement.class);
+ map.put("select", DomHTMLSelectElement.class);
+ map.put("style", DomHTMLStyleElement.class);
+ map.put("caption", DomHTMLTableCaptionElement.class);
+ map.put("th", DomHTMLTableCellElement.class);
+ map.put("td", DomHTMLTableCellElement.class);
+ map.put("col", DomHTMLTableColElement.class);
+ map.put("colgroup", DomHTMLTableColElement.class);
+ map.put("table", DomHTMLTableElement.class);
+ map.put("tr", DomHTMLTableRowElement.class);
+ map.put("thead", DomHTMLTableSectionElement.class);
+ map.put("tfoot", DomHTMLTableSectionElement.class);
+ map.put("tbody", DomHTMLTableSectionElement.class);
+ map.put("textarea", DomHTMLTextAreaElement.class);
+ map.put("title", DomHTMLTitleElement.class);
+ map.put("ul", DomHTMLUListElement.class);
+ ELEMENT_CLASSES = Collections.unmodifiableMap(map);
+ }
+
+ private static Set HTML_NS_URIS;
+ static
+ {
+ Set set = new HashSet();
+ set.add("http://www.w3.org/TR/html4/strict");
+ set.add("http://www.w3.org/TR/html4/loose");
+ set.add("http://www.w3.org/TR/html4/frameset");
+ set.add("http://www.w3.org/1999/xhtml");
+ set.add("http://www.w3.org/TR/xhtml1/strict");
+ set.add("http://www.w3.org/TR/xhtml1/loose");
+ set.add("http://www.w3.org/TR/xhtml1/frameset");
+ HTML_NS_URIS = Collections.unmodifiableSet(set);
+ }
+
+ /**
+ * Convenience constructor.
+ */
+ public DomHTMLDocument()
+ {
+ this(new DomHTMLImpl());
+ }
+
+ /**
+ * Constructor.
+ * This is called by the DOMImplementation.
+ */
+ public DomHTMLDocument(DomHTMLImpl impl)
+ {
+ super(impl);
+ }
+
+ private Node getChildNodeByName(Node parent, String name)
+ {
+ for (Node ctx = parent.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (name.equalsIgnoreCase(ctx.getNodeName()))
+ {
+ return ctx;
+ }
+ }
+ return null;
+ }
+
+ public String getTitle()
+ {
+ Node html = getDocumentElement();
+ if (html != null)
+ {
+ Node head = getChildNodeByName(html, "head");
+ if (head != null)
+ {
+ Node title = getChildNodeByName(head, "title");
+ if (title != null)
+ {
+ return title.getTextContent();
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setTitle(String title)
+ {
+ Node html = getDocumentElement();
+ if (html == null)
+ {
+ html = createElement("html");
+ appendChild(html);
+ }
+ Node head = getChildNodeByName(html, "head");
+ if (head == null)
+ {
+ head = createElement("head");
+ Node first = html.getFirstChild();
+ if (first != null)
+ {
+ html.insertBefore(first, head);
+ }
+ else
+ {
+ html.appendChild(head);
+ }
+ }
+ Node titleNode = getChildNodeByName(head, "title");
+ if (titleNode == null)
+ {
+ titleNode = createElement("title");
+ Node first = head.getFirstChild();
+ if (first != null)
+ {
+ head.insertBefore(first, titleNode);
+ }
+ else
+ {
+ head.appendChild(titleNode);
+ }
+ }
+ titleNode.setTextContent(title);
+ }
+
+ public String getReferrer()
+ {
+ // TODO getReferrer
+ return null;
+ }
+
+ public String getDomain()
+ {
+ try
+ {
+ URL url = new URL(getDocumentURI());
+ return url.getHost();
+ }
+ catch (MalformedURLException e)
+ {
+ return null;
+ }
+ }
+
+ public String getURL()
+ {
+ return getDocumentURI();
+ }
+
+ public HTMLElement getBody()
+ {
+ Node html = getDocumentElement();
+ if (html != null)
+ {
+ Node body = getChildNodeByName(html, "body");
+ if (body == null)
+ {
+ body = getChildNodeByName(html, "frameset");
+ }
+ return (HTMLElement) body;
+ }
+ return null;
+ }
+
+ public void setBody(HTMLElement body)
+ {
+ Node html = getDocumentElement();
+ if (html == null)
+ {
+ html = createElement("html");
+ appendChild(html);
+ }
+ Node ref = getBody();
+ if (ref == null)
+ {
+ html.appendChild(body);
+ }
+ else
+ {
+ html.replaceChild(body, ref);
+ }
+ }
+
+ public HTMLCollection getImages()
+ {
+ DomHTMLCollection ret = new DomHTMLCollection(this, this);
+ ret.addNodeName("img");
+ ret.evaluate();
+ return ret;
+ }
+
+ public HTMLCollection getApplets()
+ {
+ DomHTMLCollection ret = new DomHTMLCollection(this, this);
+ ret.addNodeName("object");
+ ret.addNodeName("applet");
+ ret.evaluate();
+ return ret;
+ }
+
+ public HTMLCollection getLinks()
+ {
+ DomHTMLCollection ret = new DomHTMLCollection(this, this);
+ ret.addNodeName("area");
+ ret.addNodeName("a");
+ ret.evaluate();
+ return ret;
+ }
+
+ public HTMLCollection getForms()
+ {
+ DomHTMLCollection ret = new DomHTMLCollection(this, this);
+ ret.addNodeName("form");
+ ret.evaluate();
+ return ret;
+ }
+
+ public HTMLCollection getAnchors()
+ {
+ DomHTMLCollection ret = new DomHTMLCollection(this, this);
+ ret.addNodeName("a");
+ ret.addAttributeName("name");
+ ret.evaluate();
+ return ret;
+ }
+
+ public String getCookie()
+ {
+ // TODO getCookie
+ return null;
+ }
+
+ public void setCookie(String cookie)
+ {
+ // TODO setCookie
+ }
+
+ public void open()
+ {
+ // TODO open
+ }
+
+ public void close()
+ {
+ // TODO close
+ }
+
+ public void write(String text)
+ {
+ // TODO write
+ }
+
+ public void writeln(String text)
+ {
+ // TODO write
+ }
+
+ public NodeList getElementsByName(String name)
+ {
+ DomHTMLCollection ret = new DomHTMLCollection(this, this);
+ ret.addNodeName(name);
+ ret.evaluate();
+ return ret;
+ // TODO xhtml: return only form controls (?)
+ }
+
+ public Element createElement(String tagName)
+ {
+ return createElementNS(null, tagName);
+ }
+
+ public Element createElementNS(String uri, String qName)
+ {
+ /* If a non-HTML element, use the default implementation. */
+ if (uri != null && !HTML_NS_URIS.contains(uri))
+ {
+ return super.createElementNS(uri, qName);
+ }
+ String localName = qName.toLowerCase();
+ int ci = qName.indexOf(':');
+ if (ci != -1)
+ {
+ localName = qName.substring(ci + 1);
+ }
+ Class t = (Class) ELEMENT_CLASSES.get(localName);
+ /* If a non-HTML element, use the default implementation. */
+ if (t == null)
+ {
+ return super.createElementNS(uri, qName);
+ }
+ try
+ {
+ Constructor c = t.getDeclaredConstructor(ELEMENT_PT);
+ Object[] args = new Object[] { this, uri, qName };
+ return (Element) c.newInstance(args);
+ }
+ catch (Exception e)
+ {
+ DOMException e2 = new DomDOMException(DOMException.TYPE_MISMATCH_ERR);
+ e2.initCause(e);
+ throw e2;
+ }
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLElement.java b/libjava/gnu/xml/dom/html2/DomHTMLElement.java
new file mode 100644
index 00000000000..b2952e8b49b
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLElement.java
@@ -0,0 +1,269 @@
+/* DomHTMLElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomDOMException;
+import gnu.xml.dom.DomElement;
+import gnu.xml.dom.DomEvent;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.events.UIEvent;
+import org.w3c.dom.html2.HTMLElement;
+
+/**
+ * Abstract implementation of an HTML element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public abstract class DomHTMLElement
+ extends DomElement
+ implements HTMLElement
+{
+
+ protected DomHTMLElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ /**
+ * Returns the value of the specified attribute.
+ * The attribute name is case insensitive.
+ */
+ protected String getHTMLAttribute(String name)
+ {
+ if (hasAttributes())
+ {
+ NamedNodeMap attrs = getAttributes();
+ int len = attrs.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node attr = attrs.item(i);
+ String attrName = attr.getLocalName();
+ if (attrName.equalsIgnoreCase(name))
+ {
+ return attr.getNodeValue();
+ }
+ }
+ }
+ return "";
+ }
+
+ protected int getIntHTMLAttribute(String name)
+ {
+ String value = getHTMLAttribute(name);
+ if (value == null)
+ {
+ return -1;
+ }
+ try
+ {
+ return Integer.parseInt(value);
+ }
+ catch (NumberFormatException e)
+ {
+ return -1;
+ }
+ }
+
+ protected boolean getBooleanHTMLAttribute(String name)
+ {
+ String value = getHTMLAttribute(name);
+ return value != null;
+ }
+
+ /**
+ * Sets the value of the specified attribute.
+ * The attribute name is case insensitive.
+ */
+ protected void setHTMLAttribute(String name, String value)
+ {
+ Node attr;
+ NamedNodeMap attrs = getAttributes();
+ int len = attrs.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ attr = attrs.item(i);
+ String attrName = attr.getLocalName();
+ if (attrName.equalsIgnoreCase(name))
+ {
+ if (value != null)
+ {
+ attr.setNodeValue(value);
+ }
+ else
+ {
+ attrs.removeNamedItem(attr.getNodeName());
+ }
+ return;
+ }
+ }
+ if (value != null)
+ {
+ // Create a new attribute
+ DomHTMLDocument doc = (DomHTMLDocument) getOwnerDocument();
+ // XXX namespace URI for attribute?
+ attr = doc.createAttribute(name);
+ attr.setNodeValue(value);
+ }
+ }
+
+ protected void setIntHTMLAttribute(String name, int value)
+ {
+ setHTMLAttribute(name, Integer.toString(value));
+ }
+
+ protected void setBooleanHTMLAttribute(String name, boolean value)
+ {
+ setHTMLAttribute(name, value ? name : null);
+ }
+
+ /**
+ * Returns the first parent element with the specified name.
+ */
+ protected Node getParentElement(String name)
+ {
+ for (Node parent = getParentNode(); parent != null;
+ parent = parent.getParentNode())
+ {
+ if (name.equalsIgnoreCase(parent.getLocalName()))
+ {
+ return parent;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the first child element with the specified name.
+ */
+ protected Node getChildElement(String name)
+ {
+ for (Node child = getFirstChild(); child != null;
+ child = child.getNextSibling())
+ {
+ if (name.equalsIgnoreCase(child.getLocalName()))
+ {
+ return child;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the index of this element among elements of the same name,
+ * relative to its parent.
+ */
+ protected int getIndex()
+ {
+ int index = 0;
+ Node parent = getParentNode();
+ if (parent != null)
+ {
+ for (Node ctx = parent.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (ctx == this)
+ {
+ return index;
+ }
+ index++;
+ }
+ }
+ throw new DomDOMException(DOMException.NOT_FOUND_ERR);
+ }
+
+ protected void dispatchUIEvent(String name)
+ {
+ UIEvent event = new DomEvent.DomUIEvent(name);
+ dispatchEvent(event);
+ }
+
+ public String getId()
+ {
+ return getHTMLAttribute("id");
+ }
+
+ public void setId(String id)
+ {
+ setHTMLAttribute("id", id);
+ }
+
+ public String getTitle()
+ {
+ return getHTMLAttribute("title");
+ }
+
+ public void setTitle(String title)
+ {
+ setHTMLAttribute("title", title);
+ }
+
+ public String getLang()
+ {
+ return getHTMLAttribute("lang");
+ }
+
+ public void setLang(String lang)
+ {
+ setHTMLAttribute("lang", lang);
+ }
+
+ public String getDir()
+ {
+ return getHTMLAttribute("dir");
+ }
+
+ public void setDir(String dir)
+ {
+ setHTMLAttribute("dir", dir);
+ }
+
+ public String getClassName()
+ {
+ return getHTMLAttribute("class");
+ }
+
+ public void setClassName(String className)
+ {
+ setHTMLAttribute("class", className);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLFieldSetElement.java b/libjava/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
new file mode 100644
index 00000000000..2e49fe47437
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
@@ -0,0 +1,65 @@
+/* DomHTMLFieldSetElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFieldSetElement;
+import org.w3c.dom.html2.HTMLFormElement;
+
+/**
+ * An HTML 'FIELDSET' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLFieldSetElement
+ extends DomHTMLElement
+ implements HTMLFieldSetElement
+{
+
+ protected DomHTMLFieldSetElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLFontElement.java b/libjava/gnu/xml/dom/html2/DomHTMLFontElement.java
new file mode 100644
index 00000000000..3fd1d98e70d
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLFontElement.java
@@ -0,0 +1,89 @@
+/* DomHTMLFontElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFontElement;
+
+/**
+ * An HTML 'FONT' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLFontElement
+ extends DomHTMLElement
+ implements HTMLFontElement
+{
+
+ protected DomHTMLFontElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getColor()
+ {
+ return getHTMLAttribute("color");
+ }
+
+ public void setColor(String color)
+ {
+ setHTMLAttribute("color", color);
+ }
+
+ public String getFace()
+ {
+ return getHTMLAttribute("face");
+ }
+
+ public void setFace(String face)
+ {
+ setHTMLAttribute("face", face);
+ }
+
+ public String getSize()
+ {
+ return getHTMLAttribute("size");
+ }
+
+ public void setSize(String size)
+ {
+ setHTMLAttribute("size", size);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLFormElement.java b/libjava/gnu/xml/dom/html2/DomHTMLFormElement.java
new file mode 100644
index 00000000000..0785cc989ba
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLFormElement.java
@@ -0,0 +1,150 @@
+/* DomHTMLFormElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLCollection;
+import org.w3c.dom.html2.HTMLFormElement;
+
+/**
+ * An HTML 'FORM' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLFormElement
+ extends DomHTMLElement
+ implements HTMLFormElement
+{
+
+ protected DomHTMLFormElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLCollection getElements()
+ {
+ DomHTMLCollection ret =
+ new DomHTMLCollection((DomHTMLDocument) getOwnerDocument(), this);
+ ret.addNodeName("input");
+ ret.addNodeName("button");
+ ret.addNodeName("select");
+ ret.addNodeName("textarea");
+ ret.addNodeName("isindex");
+ ret.addNodeName("label");
+ ret.addNodeName("option");
+ ret.evaluate();
+ return ret;
+ }
+
+ public int getLength()
+ {
+ return getElements().getLength();
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getAcceptCharset()
+ {
+ return getHTMLAttribute("accept-charset");
+ }
+
+ public void setAcceptCharset(String acceptCharset)
+ {
+ setHTMLAttribute("accept-charset", acceptCharset);
+ }
+
+ public String getAction()
+ {
+ return getHTMLAttribute("action");
+ }
+
+ public void setAction(String action)
+ {
+ setHTMLAttribute("action", action);
+ }
+
+ public String getEnctype()
+ {
+ return getHTMLAttribute("enctype");
+ }
+
+ public void setEnctype(String enctype)
+ {
+ setHTMLAttribute("enctype", enctype);
+ }
+
+ public String getMethod()
+ {
+ return getHTMLAttribute("method");
+ }
+
+ public void setMethod(String method)
+ {
+ setHTMLAttribute("method", method);
+ }
+
+ public String getTarget()
+ {
+ return getHTMLAttribute("target");
+ }
+
+ public void setTarget(String target)
+ {
+ setHTMLAttribute("target", target);
+ }
+
+ public void submit()
+ {
+ dispatchUIEvent("submit");
+ }
+
+ public void reset()
+ {
+ dispatchUIEvent("reset");
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLFrameElement.java b/libjava/gnu/xml/dom/html2/DomHTMLFrameElement.java
new file mode 100644
index 00000000000..db3cbfe0063
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLFrameElement.java
@@ -0,0 +1,146 @@
+/* DomHTMLFrameElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.html2.HTMLFrameElement;
+
+/**
+ * An HTML 'FRAME' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLFrameElement
+ extends DomHTMLElement
+ implements HTMLFrameElement
+{
+
+ protected DomHTMLFrameElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getFrameBorder()
+ {
+ return getHTMLAttribute("frameborder");
+ }
+
+ public void setFrameBorder(String frameBorder)
+ {
+ setHTMLAttribute("frameborder", frameBorder);
+ }
+
+ public String getLongDesc()
+ {
+ return getHTMLAttribute("longdesc");
+ }
+
+ public void setLongDesc(String longDesc)
+ {
+ setHTMLAttribute("longdesc", longDesc);
+ }
+
+ public String getMarginHeight()
+ {
+ return getHTMLAttribute("marginheight");
+ }
+
+ public void setMarginHeight(String marginHeight)
+ {
+ setHTMLAttribute("marginheight", marginHeight);
+ }
+
+ public String getMarginWidth()
+ {
+ return getHTMLAttribute("marginwidth");
+ }
+
+ public void setMarginWidth(String marginWidth)
+ {
+ setHTMLAttribute("marginwidth", marginWidth);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public boolean getNoResize()
+ {
+ return getBooleanHTMLAttribute("noresize");
+ }
+
+ public void setNoResize(boolean noResize)
+ {
+ setBooleanHTMLAttribute("noresize", noResize);
+ }
+
+ public String getScrolling()
+ {
+ return getHTMLAttribute("scrolling");
+ }
+
+ public void setScrolling(String scrolling)
+ {
+ setHTMLAttribute("scrolling", scrolling);
+ }
+
+ public String getSrc()
+ {
+ return getHTMLAttribute("src");
+ }
+
+ public void setSrc(String src)
+ {
+ setHTMLAttribute("src", src);
+ }
+
+ public Document getContentDocument()
+ {
+ // TODO getContentDocument
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLFrameSetElement.java b/libjava/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
new file mode 100644
index 00000000000..8e5eb331253
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
@@ -0,0 +1,79 @@
+/* DomHTMLFrameSetElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFrameSetElement;
+
+/**
+ * An HTML 'FRAMESET' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLFrameSetElement
+ extends DomHTMLElement
+ implements HTMLFrameSetElement
+{
+
+ protected DomHTMLFrameSetElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getCols()
+ {
+ return getHTMLAttribute("cols");
+ }
+
+ public void setCols(String cols)
+ {
+ setHTMLAttribute("cols", cols);
+ }
+
+ public String getRows()
+ {
+ return getHTMLAttribute("rows");
+ }
+
+ public void setRows(String rows)
+ {
+ setHTMLAttribute("rows", rows);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLHRElement.java b/libjava/gnu/xml/dom/html2/DomHTMLHRElement.java
new file mode 100644
index 00000000000..850907b8e43
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLHRElement.java
@@ -0,0 +1,99 @@
+/* DomHTMLHRElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLHRElement;
+
+/**
+ * An HTML 'HR' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLHRElement
+ extends DomHTMLElement
+ implements HTMLHRElement
+{
+
+ protected DomHTMLHRElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public boolean getNoShade()
+ {
+ return getBooleanHTMLAttribute("noshade");
+ }
+
+ public void setNoShade(boolean noShade)
+ {
+ setBooleanHTMLAttribute("noshade", noShade);
+ }
+
+ public String getSize()
+ {
+ return getHTMLAttribute("size");
+ }
+
+ public void setSize(String size)
+ {
+ setHTMLAttribute("size", size);
+ }
+
+ public String getWidth()
+ {
+ return getHTMLAttribute("width");
+ }
+
+ public void setWidth(String width)
+ {
+ setHTMLAttribute("width", width);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLHeadElement.java b/libjava/gnu/xml/dom/html2/DomHTMLHeadElement.java
new file mode 100644
index 00000000000..d6072a0709a
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLHeadElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLHeadElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLHeadElement;
+
+/**
+ * An HTML 'HEAD' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLHeadElement
+ extends DomHTMLElement
+ implements HTMLHeadElement
+{
+
+ protected DomHTMLHeadElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getProfile()
+ {
+ return getHTMLAttribute("profile");
+ }
+
+ public void setProfile(String profile)
+ {
+ setHTMLAttribute("profile", profile);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLHeadingElement.java b/libjava/gnu/xml/dom/html2/DomHTMLHeadingElement.java
new file mode 100644
index 00000000000..a336e31e92c
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLHeadingElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLHeadingElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLHeadingElement;
+
+/**
+ * An HTML 'H1', 'H2', 'H3', 'H4', 'H5', or 'H6' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLHeadingElement
+ extends DomHTMLElement
+ implements HTMLHeadingElement
+{
+
+ protected DomHTMLHeadingElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLHtmlElement.java b/libjava/gnu/xml/dom/html2/DomHTMLHtmlElement.java
new file mode 100644
index 00000000000..6a4e195f676
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLHtmlElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLHtmlElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLHtmlElement;
+
+/**
+ * An HTML 'HTML' top-level element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLHtmlElement
+ extends DomHTMLElement
+ implements HTMLHtmlElement
+{
+
+ protected DomHTMLHtmlElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getVersion()
+ {
+ return getHTMLAttribute("version");
+ }
+
+ public void setVersion(String version)
+ {
+ setHTMLAttribute("version", version);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLIFrameElement.java b/libjava/gnu/xml/dom/html2/DomHTMLIFrameElement.java
new file mode 100644
index 00000000000..def7b967d4d
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLIFrameElement.java
@@ -0,0 +1,166 @@
+/* DomHTMLIFrameElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.html2.HTMLIFrameElement;
+
+/**
+ * An HTML 'IFRAME' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLIFrameElement
+ extends DomHTMLElement
+ implements HTMLIFrameElement
+{
+
+ protected DomHTMLIFrameElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getFrameBorder()
+ {
+ return getHTMLAttribute("frameborder");
+ }
+
+ public void setFrameBorder(String frameBorder)
+ {
+ setHTMLAttribute("frameborder", frameBorder);
+ }
+
+ public String getHeight()
+ {
+ return getHTMLAttribute("height");
+ }
+
+ public void setHeight(String height)
+ {
+ setHTMLAttribute("height", height);
+ }
+
+ public String getLongDesc()
+ {
+ return getHTMLAttribute("longdesc");
+ }
+
+ public void setLongDesc(String longDesc)
+ {
+ setHTMLAttribute("longdesc", longDesc);
+ }
+
+ public String getMarginHeight()
+ {
+ return getHTMLAttribute("marginheight");
+ }
+
+ public void setMarginHeight(String marginHeight)
+ {
+ setHTMLAttribute("marginheight", marginHeight);
+ }
+
+ public String getMarginWidth()
+ {
+ return getHTMLAttribute("marginwidth");
+ }
+
+ public void setMarginWidth(String marginWidth)
+ {
+ setHTMLAttribute("marginwidth", marginWidth);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getScrolling()
+ {
+ return getHTMLAttribute("scrolling");
+ }
+
+ public void setScrolling(String scrolling)
+ {
+ setHTMLAttribute("scrolling", scrolling);
+ }
+
+ public String getSrc()
+ {
+ return getHTMLAttribute("src");
+ }
+
+ public void setSrc(String src)
+ {
+ setHTMLAttribute("src", src);
+ }
+
+ public String getWidth()
+ {
+ return getHTMLAttribute("width");
+ }
+
+ public void setWidth(String width)
+ {
+ setHTMLAttribute("width", width);
+ }
+
+ public Document getContentDocument()
+ {
+ // TODO getContentDocument
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLImageElement.java b/libjava/gnu/xml/dom/html2/DomHTMLImageElement.java
new file mode 100644
index 00000000000..7a621a6db37
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLImageElement.java
@@ -0,0 +1,179 @@
+/* DomHTMLImageElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLImageElement;
+
+/**
+ * An HTML 'IMG' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLImageElement
+ extends DomHTMLElement
+ implements HTMLImageElement
+{
+
+ protected DomHTMLImageElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getAlt()
+ {
+ return getHTMLAttribute("alt");
+ }
+
+ public void setAlt(String alt)
+ {
+ setHTMLAttribute("alt", alt);
+ }
+
+ public String getBorder()
+ {
+ return getHTMLAttribute("border");
+ }
+
+ public void setBorder(String border)
+ {
+ setHTMLAttribute("border", border);
+ }
+
+ public int getHeight()
+ {
+ return getIntHTMLAttribute("height");
+ }
+
+ public void setHeight(int height)
+ {
+ setIntHTMLAttribute("height", height);
+ }
+
+ public int getHspace()
+ {
+ return getIntHTMLAttribute("hspace");
+ }
+
+ public void setHspace(int hspace)
+ {
+ setIntHTMLAttribute("hspace", hspace);
+ }
+
+ public boolean getIsMap()
+ {
+ return getBooleanHTMLAttribute("ismap");
+ }
+
+ public void setIsMap(boolean isMap)
+ {
+ setBooleanHTMLAttribute("ismap", isMap);
+ }
+
+ public String getLongDesc()
+ {
+ return getHTMLAttribute("longdesc");
+ }
+
+ public void setLongDesc(String longDesc)
+ {
+ setHTMLAttribute("longdesc", longDesc);
+ }
+
+ public String getSrc()
+ {
+ return getHTMLAttribute("src");
+ }
+
+ public void setSrc(String src)
+ {
+ setHTMLAttribute("src", src);
+ }
+
+ public String getUseMap()
+ {
+ return getHTMLAttribute("usemap");
+ }
+
+ public void setUseMap(String useMap)
+ {
+ setHTMLAttribute("usemap", useMap);
+ }
+
+ public int getVspace()
+ {
+ return getIntHTMLAttribute("vspace");
+ }
+
+ public void setVspace(int vspace)
+ {
+ setIntHTMLAttribute("vspace", vspace);
+ }
+
+ public int getWidth()
+ {
+ return getIntHTMLAttribute("width");
+ }
+
+ public void setWidth(int width)
+ {
+ setIntHTMLAttribute("width", width);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLImpl.java b/libjava/gnu/xml/dom/html2/DomHTMLImpl.java
new file mode 100644
index 00000000000..6f5538e71aa
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLImpl.java
@@ -0,0 +1,67 @@
+/* DomHTMLImpl.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomImpl;
+import org.w3c.dom.Document;
+
+/**
+ * Specialised DOMImplementation for creating HTML documents.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLImpl
+ extends DomImpl
+{
+
+ protected Document createDocument()
+ {
+ return new DomHTMLDocument(this);
+ }
+
+ public Object getFeature(String feature, String version)
+ {
+ if (hasFeature(feature, version))
+ {
+ return this;
+ }
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLInputElement.java b/libjava/gnu/xml/dom/html2/DomHTMLInputElement.java
new file mode 100644
index 00000000000..787be536af8
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLInputElement.java
@@ -0,0 +1,266 @@
+/* DomHTMLInputElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLInputElement;
+
+/**
+ * An HTML 'INPUT' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLInputElement
+ extends DomHTMLElement
+ implements HTMLInputElement
+{
+
+ protected String value;
+ protected Boolean checked;
+
+ protected DomHTMLInputElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getDefaultValue()
+ {
+ return getHTMLAttribute("value");
+ }
+
+ public void setDefaultValue(String defaultValue)
+ {
+ setHTMLAttribute("value", defaultValue);
+ }
+
+ public boolean getDefaultChecked()
+ {
+ return getBooleanHTMLAttribute("checked");
+ }
+
+ public void setDefaultChecked(boolean defaultChecked)
+ {
+ setBooleanHTMLAttribute("checked", defaultChecked);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public String getAccept()
+ {
+ return getHTMLAttribute("accept");
+ }
+
+ public void setAccept(String accept)
+ {
+ setHTMLAttribute("accept", accept);
+ }
+
+ public String getAccessKey()
+ {
+ return getHTMLAttribute("accesskey");
+ }
+
+ public void setAccessKey(String accessKey)
+ {
+ setHTMLAttribute("accesskey", accessKey);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getAlt()
+ {
+ return getHTMLAttribute("alt");
+ }
+
+ public void setAlt(String alt)
+ {
+ setHTMLAttribute("alt", alt);
+ }
+
+ public boolean getChecked()
+ {
+ if (checked == null)
+ {
+ checked = Boolean.valueOf(getDefaultChecked());
+ }
+ return checked.booleanValue();
+ }
+
+ public void setChecked(boolean checked)
+ {
+ this.checked = Boolean.valueOf(checked);
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public int getMaxLength()
+ {
+ return getIntHTMLAttribute("maxLength");
+ }
+
+ public void setMaxLength(int maxLength)
+ {
+ setIntHTMLAttribute("maxLength", maxLength);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public boolean getReadOnly()
+ {
+ return getBooleanHTMLAttribute("readonly");
+ }
+
+ public void setReadOnly(boolean readOnly)
+ {
+ setBooleanHTMLAttribute("readonly", readOnly);
+ }
+
+ public int getSize()
+ {
+ return getIntHTMLAttribute("size");
+ }
+
+ public void setSize(int size)
+ {
+ setIntHTMLAttribute("size", size);
+ }
+
+ public String getSrc()
+ {
+ return getHTMLAttribute("src");
+ }
+
+ public void setSrc(String src)
+ {
+ setHTMLAttribute("src", src);
+ }
+
+ public int getTabIndex()
+ {
+ return getIntHTMLAttribute("tabindex");
+ }
+
+ public void setTabIndex(int tabIndex)
+ {
+ setIntHTMLAttribute("tabindex", tabIndex);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+ public String getUseMap()
+ {
+ return getHTMLAttribute("usemap");
+ }
+
+ public void setUseMap(String useMap)
+ {
+ setHTMLAttribute("usemap", useMap);
+ }
+
+ public String getValue()
+ {
+ if (value == null)
+ {
+ value = getDefaultValue();
+ }
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public void blur()
+ {
+ dispatchUIEvent("blur");
+ }
+
+ public void focus()
+ {
+ dispatchUIEvent("focus");
+ }
+
+ public void select()
+ {
+ dispatchUIEvent("select");
+ }
+
+ public void click()
+ {
+ dispatchUIEvent("click");
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLIsIndexElement.java b/libjava/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
new file mode 100644
index 00000000000..02d5a9886e6
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
@@ -0,0 +1,75 @@
+/* DomHTMLIsIndexElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLIsIndexElement;
+
+/**
+ * An HTML 'ISINDEX' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLIsIndexElement
+ extends DomHTMLElement
+ implements HTMLIsIndexElement
+{
+
+ protected DomHTMLIsIndexElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public String getPrompt()
+ {
+ return getHTMLAttribute("prompt");
+ }
+
+ public void setPrompt(String prompt)
+ {
+ setHTMLAttribute("prompt", prompt);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLLIElement.java b/libjava/gnu/xml/dom/html2/DomHTMLLIElement.java
new file mode 100644
index 00000000000..ea99ee1711f
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLLIElement.java
@@ -0,0 +1,79 @@
+/* DomHTMLLIElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLLIElement;
+
+/**
+ * An HTML 'LI' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLLIElement
+ extends DomHTMLElement
+ implements HTMLLIElement
+{
+
+ protected DomHTMLLIElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+ public int getValue()
+ {
+ return getIntHTMLAttribute("value");
+ }
+
+ public void setValue(int value)
+ {
+ setIntHTMLAttribute("value", value);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLLabelElement.java b/libjava/gnu/xml/dom/html2/DomHTMLLabelElement.java
new file mode 100644
index 00000000000..0dd2f833f66
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLLabelElement.java
@@ -0,0 +1,85 @@
+/* DomHTMLLabelElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLLabelElement;
+
+/**
+ * An HTML 'LABEL' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLLabelElement
+ extends DomHTMLElement
+ implements HTMLLabelElement
+{
+
+ protected DomHTMLLabelElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public String getAccessKey()
+ {
+ return getHTMLAttribute("accesskey");
+ }
+
+ public void setAccessKey(String accessKey)
+ {
+ setHTMLAttribute("accesskey", accessKey);
+ }
+
+ public String getHtmlFor()
+ {
+ return getHTMLAttribute("for");
+ }
+
+ public void setHtmlFor(String htmlFor)
+ {
+ setHTMLAttribute("for", htmlFor);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLLegendElement.java b/libjava/gnu/xml/dom/html2/DomHTMLLegendElement.java
new file mode 100644
index 00000000000..663e67c7d7a
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLLegendElement.java
@@ -0,0 +1,85 @@
+/* DomHTMLLegendElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLLegendElement;
+
+/**
+ * An HTML 'LEGEND' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLLegendElement
+ extends DomHTMLElement
+ implements HTMLLegendElement
+{
+
+ protected DomHTMLLegendElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public String getAccessKey()
+ {
+ return getHTMLAttribute("accesskey");
+ }
+
+ public void setAccessKey(String accessKey)
+ {
+ setHTMLAttribute("accesskey", accessKey);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLLinkElement.java b/libjava/gnu/xml/dom/html2/DomHTMLLinkElement.java
new file mode 100644
index 00000000000..c81486a8aed
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLLinkElement.java
@@ -0,0 +1,149 @@
+/* DomHTMLLinkElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLLinkElement;
+
+/**
+ * An HTML 'LINK' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLLinkElement
+ extends DomHTMLElement
+ implements HTMLLinkElement
+{
+
+ protected DomHTMLLinkElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public String getCharset()
+ {
+ return getHTMLAttribute("charset");
+ }
+
+ public void setCharset(String charset)
+ {
+ setHTMLAttribute("charset", charset);
+ }
+
+ public String getHref()
+ {
+ return getHTMLAttribute("href");
+ }
+
+ public void setHref(String href)
+ {
+ setHTMLAttribute("href", href);
+ }
+
+ public String getHreflang()
+ {
+ return getHTMLAttribute("hreflang");
+ }
+
+ public void setHreflang(String hreflang)
+ {
+ setHTMLAttribute("hreflang", hreflang);
+ }
+
+ public String getMedia()
+ {
+ return getHTMLAttribute("media");
+ }
+
+ public void setMedia(String media)
+ {
+ setHTMLAttribute("media", media);
+ }
+
+ public String getRel()
+ {
+ return getHTMLAttribute("rel");
+ }
+
+ public void setRel(String rel)
+ {
+ setHTMLAttribute("rel", rel);
+ }
+
+ public String getRev()
+ {
+ return getHTMLAttribute("rev");
+ }
+
+ public void setRev(String rev)
+ {
+ setHTMLAttribute("rev", rev);
+ }
+
+ public String getTarget()
+ {
+ return getHTMLAttribute("target");
+ }
+
+ public void setTarget(String target)
+ {
+ setHTMLAttribute("target", target);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLMapElement.java b/libjava/gnu/xml/dom/html2/DomHTMLMapElement.java
new file mode 100644
index 00000000000..d078f70f0a2
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLMapElement.java
@@ -0,0 +1,79 @@
+/* DomHTMLMapElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLCollection;
+import org.w3c.dom.html2.HTMLMapElement;
+
+/**
+ * An HTML 'MAP' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLMapElement
+ extends DomHTMLElement
+ implements HTMLMapElement
+{
+
+ protected DomHTMLMapElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLCollection getAreas()
+ {
+ DomHTMLCollection ret =
+ new DomHTMLCollection((DomHTMLDocument) getOwnerDocument(), this);
+ ret.addNodeName("area");
+ ret.evaluate();
+ return ret;
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLMenuElement.java b/libjava/gnu/xml/dom/html2/DomHTMLMenuElement.java
new file mode 100644
index 00000000000..e674f3e7ed1
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLMenuElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLMenuElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLMenuElement;
+
+/**
+ * An HTML 'MENU' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLMenuElement
+ extends DomHTMLElement
+ implements HTMLMenuElement
+{
+
+ protected DomHTMLMenuElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getCompact()
+ {
+ return getBooleanHTMLAttribute("compact");
+ }
+
+ public void setCompact(boolean compact)
+ {
+ setBooleanHTMLAttribute("compact", compact);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLMetaElement.java b/libjava/gnu/xml/dom/html2/DomHTMLMetaElement.java
new file mode 100644
index 00000000000..d8bd435097e
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLMetaElement.java
@@ -0,0 +1,99 @@
+/* DomHTMLMetaElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLMetaElement;
+
+/**
+ * An HTML 'META' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLMetaElement
+ extends DomHTMLElement
+ implements HTMLMetaElement
+{
+
+ protected DomHTMLMetaElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getContent()
+ {
+ return getHTMLAttribute("content");
+ }
+
+ public void setContent(String content)
+ {
+ setHTMLAttribute("content", content);
+ }
+
+ public String getHttpEquiv()
+ {
+ return getHTMLAttribute("http-equiv");
+ }
+
+ public void setHttpEquiv(String httpEquiv)
+ {
+ setHTMLAttribute("http-equiv", httpEquiv);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getScheme()
+ {
+ return getHTMLAttribute("scheme");
+ }
+
+ public void setScheme(String scheme)
+ {
+ setHTMLAttribute("scheme", scheme);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLModElement.java b/libjava/gnu/xml/dom/html2/DomHTMLModElement.java
new file mode 100644
index 00000000000..78f94011c88
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLModElement.java
@@ -0,0 +1,79 @@
+/* DomHTMLModElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLModElement;
+
+/**
+ * An HTML 'INS' or 'DEL' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLModElement
+ extends DomHTMLElement
+ implements HTMLModElement
+{
+
+ protected DomHTMLModElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getCite()
+ {
+ return getHTMLAttribute("cite");
+ }
+
+ public void setCite(String cite)
+ {
+ setHTMLAttribute("cite", cite);
+ }
+
+ public String getDateTime()
+ {
+ return getHTMLAttribute("datetime");
+ }
+
+ public void setDateTime(String dateTime)
+ {
+ setHTMLAttribute("datetime", dateTime);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLOListElement.java b/libjava/gnu/xml/dom/html2/DomHTMLOListElement.java
new file mode 100644
index 00000000000..85d1b3fcd90
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLOListElement.java
@@ -0,0 +1,89 @@
+/* DomHTMLOListElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLOListElement;
+
+/**
+ * An HTML 'OL' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLOListElement
+ extends DomHTMLElement
+ implements HTMLOListElement
+{
+
+ protected DomHTMLOListElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getCompact()
+ {
+ return getBooleanHTMLAttribute("compact");
+ }
+
+ public void setCompact(boolean compact)
+ {
+ setBooleanHTMLAttribute("compact", compact);
+ }
+
+ public int getStart()
+ {
+ return getIntHTMLAttribute("start");
+ }
+
+ public void setStart(int start)
+ {
+ setIntHTMLAttribute("start", start);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLObjectElement.java b/libjava/gnu/xml/dom/html2/DomHTMLObjectElement.java
new file mode 100644
index 00000000000..8b8abe7ed6f
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLObjectElement.java
@@ -0,0 +1,242 @@
+/* DomHTMLObjectElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLObjectElement;
+
+/**
+ * An HTML 'OBJECT' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLObjectElement
+ extends DomHTMLElement
+ implements HTMLObjectElement
+{
+
+ protected DomHTMLObjectElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public String getCode()
+ {
+ return getHTMLAttribute("code");
+ }
+
+ public void setCode(String code)
+ {
+ setHTMLAttribute("code", code);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getArchive()
+ {
+ return getHTMLAttribute("archive");
+ }
+
+ public void setArchive(String archive)
+ {
+ setHTMLAttribute("archive", archive);
+ }
+
+ public String getBorder()
+ {
+ return getHTMLAttribute("border");
+ }
+
+ public void setBorder(String border)
+ {
+ setHTMLAttribute("border", border);
+ }
+
+ public String getCodeBase()
+ {
+ return getHTMLAttribute("codebase");
+ }
+
+ public void setCodeBase(String codeBase)
+ {
+ setHTMLAttribute("codebase", codeBase);
+ }
+
+ public String getCodeType()
+ {
+ return getHTMLAttribute("codetype");
+ }
+
+ public void setCodeType(String codeType)
+ {
+ setHTMLAttribute("codetype", codeType);
+ }
+
+ public String getData()
+ {
+ return getHTMLAttribute("data");
+ }
+
+ public void setData(String data)
+ {
+ setHTMLAttribute("data", data);
+ }
+
+ public boolean getDeclare()
+ {
+ return getBooleanHTMLAttribute("declare");
+ }
+
+ public void setDeclare(boolean declare)
+ {
+ setBooleanHTMLAttribute("declare", declare);
+ }
+
+ public String getHeight()
+ {
+ return getHTMLAttribute("height");
+ }
+
+ public void setHeight(String height)
+ {
+ setHTMLAttribute("height", height);
+ }
+
+ public int getHspace()
+ {
+ return getIntHTMLAttribute("hspace");
+ }
+
+ public void setHspace(int hspace)
+ {
+ setIntHTMLAttribute("hspace", hspace);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getStandby()
+ {
+ return getHTMLAttribute("standby");
+ }
+
+ public void setStandby(String standby)
+ {
+ setHTMLAttribute("standby", standby);
+ }
+
+ public int getTabIndex()
+ {
+ return getIntHTMLAttribute("tabindex");
+ }
+
+ public void setTabIndex(int tabIndex)
+ {
+ setIntHTMLAttribute("tabindex", tabIndex);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+ public String getUseMap()
+ {
+ return getHTMLAttribute("usemap");
+ }
+
+ public void setUseMap(String useMap)
+ {
+ setHTMLAttribute("usemap", useMap);
+ }
+
+ public int getVspace()
+ {
+ return getIntHTMLAttribute("vspace");
+ }
+
+ public void setVspace(int vspace)
+ {
+ setIntHTMLAttribute("vspace", vspace);
+ }
+
+ public String getWidth()
+ {
+ return getHTMLAttribute("width");
+ }
+
+ public void setWidth(String width)
+ {
+ setHTMLAttribute("width", width);
+ }
+
+ public Document getContentDocument()
+ {
+ // TODO getContentDocument
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLOptGroupElement.java b/libjava/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
new file mode 100644
index 00000000000..782deb21699
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
@@ -0,0 +1,79 @@
+/* DomHTMLOptGroupElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLOptGroupElement;
+
+/**
+ * An HTML 'OPTGROUP' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLOptGroupElement
+ extends DomHTMLElement
+ implements HTMLOptGroupElement
+{
+
+ protected DomHTMLOptGroupElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public String getLabel()
+ {
+ return getHTMLAttribute("label");
+ }
+
+ public void setLabel(String label)
+ {
+ setHTMLAttribute("label", label);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLOptionElement.java b/libjava/gnu/xml/dom/html2/DomHTMLOptionElement.java
new file mode 100644
index 00000000000..21952e6de9b
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLOptionElement.java
@@ -0,0 +1,131 @@
+/* DomHTMLOptionElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLOptionElement;
+
+/**
+ * An HTML 'OPTION' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLOptionElement
+ extends DomHTMLElement
+ implements HTMLOptionElement
+{
+
+ protected Boolean selected;
+
+ protected DomHTMLOptionElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public boolean getDefaultSelected()
+ {
+ return getBooleanHTMLAttribute("selected");
+ }
+
+ public void setDefaultSelected(boolean defaultSelected)
+ {
+ setBooleanHTMLAttribute("selected", defaultSelected);
+ }
+
+ public String getText()
+ {
+ return getTextContent();
+ }
+
+ public int getIndex()
+ {
+ return super.getIndex();
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public String getLabel()
+ {
+ return getHTMLAttribute("label");
+ }
+
+ public void setLabel(String label)
+ {
+ setHTMLAttribute("label", label);
+ }
+
+ public boolean getSelected()
+ {
+ if (selected == null)
+ {
+ selected = Boolean.valueOf(getDefaultSelected());
+ }
+ return selected.booleanValue();
+ }
+
+ public void setSelected(boolean selected)
+ {
+ this.selected = Boolean.valueOf(selected);
+ }
+
+ public String getValue()
+ {
+ return getHTMLAttribute("value");
+ }
+
+ public void setValue(String value)
+ {
+ setHTMLAttribute("value", value);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLParagraphElement.java b/libjava/gnu/xml/dom/html2/DomHTMLParagraphElement.java
new file mode 100644
index 00000000000..573ddc9db38
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLParagraphElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLParagraphElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLParagraphElement;
+
+/**
+ * An HTML 'P' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLParagraphElement
+ extends DomHTMLElement
+ implements HTMLParagraphElement
+{
+
+ protected DomHTMLParagraphElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLParamElement.java b/libjava/gnu/xml/dom/html2/DomHTMLParamElement.java
new file mode 100644
index 00000000000..c8e565d1572
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLParamElement.java
@@ -0,0 +1,99 @@
+/* DomHTMLParamElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLParamElement;
+
+/**
+ * An HTML 'PARAM' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLParamElement
+ extends DomHTMLElement
+ implements HTMLParamElement
+{
+
+ protected DomHTMLParamElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+ public String getValue()
+ {
+ return getHTMLAttribute("value");
+ }
+
+ public void setValue(String value)
+ {
+ setHTMLAttribute("value", value);
+ }
+
+ public String getValueType()
+ {
+ return getHTMLAttribute("valuetype");
+ }
+
+ public void setValueType(String valueType)
+ {
+ setHTMLAttribute("valuetype", valueType);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLParser.java b/libjava/gnu/xml/dom/html2/DomHTMLParser.java
new file mode 100644
index 00000000000..f1b970e1264
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLParser.java
@@ -0,0 +1,266 @@
+/* DomHTMLParser.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.xml.dom.html2;
+
+import gnu.javax.swing.text.html.parser.support.Parser;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import javax.swing.text.AttributeSet;
+import javax.swing.text.html.HTML;
+import javax.swing.text.html.parser.DTD;
+import javax.swing.text.html.parser.TagElement;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.html2.HTMLDocument;
+
+/**
+ * This parser reads HTML from the given stream and stores into
+ * {@link HTMLDocument}. The HTML tag becomes the {@link Node}.
+ * The tag attributes become the node attributes. The text inside
+ * HTML tag is inserted as one or several text nodes. The nested
+ * HTML tags are inserted as child nodes.
+ *
+ * If the strict tree structure, closing the tag means closing all
+ * nested tags. To work around this, this parser closes the nested
+ * tags and immediately reopens them after the closed tag.
+ * In this way, <code>&lt;b&gt;&lt;i&gt;c&lt;/b&gt;d</code>
+ * is parsed as <code>&lt;b&gt;&lt;i&gt;c&lt;/i&gt;&lt;/b&gt;&lt;i&gt;d</code> .
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class DomHTMLParser
+ extends gnu.javax.swing.text.html.parser.support.Parser
+{
+ /**
+ * The target where HTML document will be inserted.
+ */
+ protected DomHTMLDocument document;
+
+ /**
+ * The subsequently created new nodes will be inserted as the
+ * childs of this cursor.
+ */
+ protected Node cursor;
+
+ /**
+ * Create parser using the given DTD.
+ *
+ * @param dtd the DTD (for example,
+ * {@link gnu.javax.swing.text.html.parser.HTML_401F}).
+ */
+ public DomHTMLParser(DTD dtd)
+ {
+ super(dtd);
+ }
+
+ /**
+ * Parse SGML insertion ( &lt;! ... &gt; ).
+ * Currently just treats it as comment.
+ */
+ public boolean parseMarkupDeclarations(StringBuffer strBuff)
+ throws java.io.IOException
+ {
+ Node c = document.createComment(strBuff.toString());
+ cursor.appendChild(c);
+ return false;
+ }
+
+ /**
+ * Read the document, present in the given stream, and
+ * return the corresponding {@link HTMLDocument}.
+ *
+ * @param input a stream to read from.
+ * @return a document, reflecting the structure of the provided HTML
+ * text.
+ *
+ * @throws IOException if the reader throws one.
+ */
+ public HTMLDocument parseDocument(Reader input)
+ throws IOException
+ {
+ try
+ {
+ document = new DomHTMLDocument();
+
+ cursor = document;
+
+ parse(input);
+
+ DomHTMLDocument h = document;
+ document = null;
+ return h;
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ throw new IOException("Exception: " + ex.getMessage());
+ }
+ }
+
+ /**
+ * Create a new node.
+ * @param name the name of node, case insensitive.
+ * @return the created node.
+ */
+ protected Node createNode(String name)
+ {
+ Node new_node = document.createElement(name.toLowerCase());
+ AttributeSet hatts = getAttributes();
+ NamedNodeMap natts = new_node.getAttributes();
+
+ Enumeration enumeration = hatts.getAttributeNames();
+ Object key;
+ Node attribute;
+
+ while (hatts != null)
+ {
+ while (enumeration.hasMoreElements())
+ {
+ key = enumeration.nextElement();
+ attribute = document.createAttribute(key.toString());
+ attribute.setNodeValue(hatts.getAttribute(key).toString());
+ natts.setNamedItem(attribute);
+ }
+
+ // The default values are stored in a parent node.
+ hatts = hatts.getResolveParent();
+ }
+
+ return new_node;
+ }
+
+ /**
+ * Handle comment by inserting the comment node.
+ * @param text the comment text.
+ */
+ protected void handleComment(char[] text)
+ {
+ Node c = document.createComment(new String(text));
+ cursor.appendChild(c);
+ }
+
+ /**
+ * Handle the tag with no content.
+ * @param tag the tag to handle.
+ */
+ protected void handleEmptyTag(TagElement tag)
+ {
+ String name = tag.getHTMLTag().toString();
+
+ if (name.equalsIgnoreCase("#pcdata"))
+ return;
+
+ Node c = createNode(name);
+ cursor.appendChild(c);
+ }
+
+ /**
+ * Close the given tag. Close and reopen all nested tags.
+ * @param tag the tag to close.
+ */
+ protected void handleEndTag(TagElement tag)
+ {
+ String name = tag.getHTMLTag().toString();
+ String nname = cursor.getNodeName();
+
+ // Closing the current tag.
+ if (nname != null && nname.equalsIgnoreCase(name))
+ {
+ cursor = cursor.getParentNode();
+ }
+ else
+ {
+ Node nCursor = cursor.getParentNode();
+
+ // Remember the opened nodes.
+ LinkedList open = new LinkedList();
+ Node close = cursor;
+ while (close != null && !close.getNodeName().equalsIgnoreCase(name))
+ {
+ if (close != document)
+ open.addFirst(close);
+ close = close.getParentNode();
+ }
+
+ if (close == null)
+ cursor = document;
+ else
+ cursor = close.getParentNode();
+
+ // Insert the copies of the opened nodes.
+ Iterator iter = open.iterator();
+ while (iter.hasNext())
+ {
+ Node item = (Node) iter.next();
+ Node copy = item.cloneNode(true);
+ cursor.appendChild(copy);
+ cursor = copy;
+ }
+ }
+ }
+
+ /**
+ * Handle the start tag by inserting the HTML element.
+ * @param tag the tag to handle.
+ */
+ protected void handleStartTag(TagElement tag)
+ {
+ HTML.Tag h = tag.getHTMLTag();
+ Node c = createNode(h.toString());
+ cursor.appendChild(c);
+ cursor = c;
+ }
+
+ /**
+ * Handle text by inserting the text node.
+ * @param text the text to insert.
+ */
+ protected void handleText(char[] text)
+ {
+ Node c = document.createTextNode(text, 0, text.length);
+ cursor.appendChild(c);
+ }
+}
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLPreElement.java b/libjava/gnu/xml/dom/html2/DomHTMLPreElement.java
new file mode 100644
index 00000000000..c8f306fff1a
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLPreElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLPreElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLPreElement;
+
+/**
+ * An HTML 'PRE' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLPreElement
+ extends DomHTMLElement
+ implements HTMLPreElement
+{
+
+ protected DomHTMLPreElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public int getWidth()
+ {
+ return getIntHTMLAttribute("width");
+ }
+
+ public void setWidth(int width)
+ {
+ setIntHTMLAttribute("width", width);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLQuoteElement.java b/libjava/gnu/xml/dom/html2/DomHTMLQuoteElement.java
new file mode 100644
index 00000000000..0424ebf3b88
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLQuoteElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLQuoteElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLQuoteElement;
+
+/**
+ * An HTML 'Q' or 'BLOCKQUOTE' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLQuoteElement
+ extends DomHTMLElement
+ implements HTMLQuoteElement
+{
+
+ protected DomHTMLQuoteElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getCite()
+ {
+ return getHTMLAttribute("cite");
+ }
+
+ public void setCite(String cite)
+ {
+ setHTMLAttribute("cite", cite);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLScriptElement.java b/libjava/gnu/xml/dom/html2/DomHTMLScriptElement.java
new file mode 100644
index 00000000000..2bf6a5579b2
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLScriptElement.java
@@ -0,0 +1,129 @@
+/* DomHTMLScriptElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLScriptElement;
+
+/**
+ * An HTML 'SCRIPT' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLScriptElement
+ extends DomHTMLElement
+ implements HTMLScriptElement
+{
+
+ protected DomHTMLScriptElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getText()
+ {
+ return getTextContent();
+ }
+
+ public void setText(String text)
+ {
+ setTextContent(text);
+ }
+
+ public String getHtmlFor()
+ {
+ return getHTMLAttribute("for");
+ }
+
+ public void setHtmlFor(String htmlFor)
+ {
+ setHTMLAttribute("for", htmlFor);
+ }
+
+ public String getEvent()
+ {
+ return getHTMLAttribute("event");
+ }
+
+ public void setEvent(String event)
+ {
+ setHTMLAttribute("event", event);
+ }
+
+ public String getCharset()
+ {
+ return getHTMLAttribute("charset");
+ }
+
+ public void setCharset(String charset)
+ {
+ setHTMLAttribute("charset", charset);
+ }
+
+ public boolean getDefer()
+ {
+ return getBooleanHTMLAttribute("defer");
+ }
+
+ public void setDefer(boolean defer)
+ {
+ setBooleanHTMLAttribute("defer", defer);
+ }
+
+ public String getSrc()
+ {
+ return getHTMLAttribute("src");
+ }
+
+ public void setSrc(String src)
+ {
+ setHTMLAttribute("src", src);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLSelectElement.java b/libjava/gnu/xml/dom/html2/DomHTMLSelectElement.java
new file mode 100644
index 00000000000..b888b57e6c3
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLSelectElement.java
@@ -0,0 +1,211 @@
+/* DomHTMLSelectElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomDOMException;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.html2.HTMLElement;
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLOptionElement;
+import org.w3c.dom.html2.HTMLOptionsCollection;
+import org.w3c.dom.html2.HTMLSelectElement;
+
+/**
+ * An HTML 'SELECT' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLSelectElement
+ extends DomHTMLElement
+ implements HTMLSelectElement
+{
+
+ protected DomHTMLSelectElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public int getSelectedIndex()
+ {
+ HTMLOptionsCollection options = getOptions();
+ int len = options.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ HTMLOptionElement option = (HTMLOptionElement) options.item(i);
+ if (option.getSelected())
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public void setSelectedIndex(int selectedIndex)
+ {
+ HTMLOptionsCollection options = getOptions();
+ int len = options.getLength();
+ if (selectedIndex < 0 || selectedIndex >= len)
+ {
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
+ }
+ for (int i = 0; i < len; i++)
+ {
+ HTMLOptionElement option = (HTMLOptionElement) options.item(i);
+ option.setSelected(i == selectedIndex);
+ }
+ }
+
+ public String getValue()
+ {
+ return getHTMLAttribute("value");
+ }
+
+ public void setValue(String value)
+ {
+ setHTMLAttribute("value", value);
+ }
+
+ public int getLength()
+ {
+ return getIntHTMLAttribute("length");
+ }
+
+ public void setLength(int length)
+ {
+ setIntHTMLAttribute("length", length);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public HTMLOptionsCollection getOptions()
+ {
+ DomHTMLCollection ret =
+ new DomHTMLCollection((DomHTMLDocument) getOwnerDocument(), this);
+ ret.addNodeName("option");
+ ret.evaluate();
+ return ret;
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public boolean getMultiple()
+ {
+ return getBooleanHTMLAttribute("multiple");
+ }
+
+ public void setMultiple(boolean multiple)
+ {
+ setBooleanHTMLAttribute("multiple", multiple);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public int getSize()
+ {
+ return getIntHTMLAttribute("size");
+ }
+
+ public void setSize(int size)
+ {
+ setIntHTMLAttribute("size", size);
+ }
+
+ public int getTabIndex()
+ {
+ return getIntHTMLAttribute("tabindex");
+ }
+
+ public void setTabIndex(int tabIndex)
+ {
+ setIntHTMLAttribute("tabindex", tabIndex);
+ }
+
+ public void add(HTMLElement element, HTMLElement before)
+ {
+ insertBefore(before, element);
+ }
+
+ public void remove(int index)
+ {
+ HTMLOptionsCollection options = getOptions();
+ int len = options.getLength();
+ if (index < 0 || index >= len)
+ {
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
+ }
+ HTMLOptionElement option = (HTMLOptionElement) options.item(index);
+ option.getParentNode().removeChild(option);
+ }
+
+ public void blur()
+ {
+ dispatchUIEvent("blur");
+ }
+
+ public void focus()
+ {
+ dispatchUIEvent("focus");
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLStyleElement.java b/libjava/gnu/xml/dom/html2/DomHTMLStyleElement.java
new file mode 100644
index 00000000000..4d2de8c6b48
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLStyleElement.java
@@ -0,0 +1,89 @@
+/* DomHTMLStyleElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLStyleElement;
+
+/**
+ * An HTML 'STYLE' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLStyleElement
+ extends DomHTMLElement
+ implements HTMLStyleElement
+{
+
+ protected DomHTMLStyleElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public String getMedia()
+ {
+ return getHTMLAttribute("media");
+ }
+
+ public void setMedia(String media)
+ {
+ setHTMLAttribute("media", media);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
new file mode 100644
index 00000000000..a481f47fa34
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
@@ -0,0 +1,70 @@
+/* DomHTMLTableCaptionElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLTableCaptionElement;
+
+/**
+ * An HTML 'CAPTION' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTableCaptionElement
+ extends DomHTMLElement
+ implements HTMLTableCaptionElement
+{
+
+ protected DomHTMLTableCaptionElement(DomHTMLDocument owner,
+ String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTableCellElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTableCellElement.java
new file mode 100644
index 00000000000..6338b88d050
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTableCellElement.java
@@ -0,0 +1,205 @@
+/* DomHTMLTableCellElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLTableCellElement;
+
+/**
+ * An HTML 'TH' or 'TD' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTableCellElement
+ extends DomHTMLElement
+ implements HTMLTableCellElement
+{
+
+ protected DomHTMLTableCellElement(DomHTMLDocument owner,
+ String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public int getCellIndex()
+ {
+ return getIndex();
+ }
+
+ public String getAbbr()
+ {
+ return getHTMLAttribute("abbr");
+ }
+
+ public void setAbbr(String abbr)
+ {
+ setHTMLAttribute("abbr", abbr);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getAxis()
+ {
+ return getHTMLAttribute("axis");
+ }
+
+ public void setAxis(String axis)
+ {
+ setHTMLAttribute("axis", axis);
+ }
+
+ public String getBgColor()
+ {
+ return getHTMLAttribute("bgcolor");
+ }
+
+ public void setBgColor(String bgColor)
+ {
+ setHTMLAttribute("bgcolor", bgColor);
+ }
+
+ public String getCh()
+ {
+ return getHTMLAttribute("char");
+ }
+
+ public void setCh(String ch)
+ {
+ setHTMLAttribute("char", ch);
+ }
+
+ public String getChOff()
+ {
+ return getHTMLAttribute("charoff");
+ }
+
+ public void setChOff(String chOff)
+ {
+ setHTMLAttribute("charoff", chOff);
+ }
+
+ public int getColSpan()
+ {
+ return getIntHTMLAttribute("colspan");
+ }
+
+ public void setColSpan(int colSpan)
+ {
+ setIntHTMLAttribute("colspan", colSpan);
+ }
+
+ public String getHeaders()
+ {
+ return getHTMLAttribute("headers");
+ }
+
+ public void setHeaders(String headers)
+ {
+ setHTMLAttribute("headers", headers);
+ }
+
+ public String getHeight()
+ {
+ return getHTMLAttribute("height");
+ }
+
+ public void setHeight(String height)
+ {
+ setHTMLAttribute("height", height);
+ }
+
+ public boolean getNoWrap()
+ {
+ return getBooleanHTMLAttribute("nowrap");
+ }
+
+ public void setNoWrap(boolean noWrap)
+ {
+ setBooleanHTMLAttribute("nowrap", noWrap);
+ }
+
+ public int getRowSpan()
+ {
+ return getIntHTMLAttribute("rowspan");
+ }
+
+ public void setRowSpan(int rowSpan)
+ {
+ setIntHTMLAttribute("rowspan", rowSpan);
+ }
+
+ public String getScope()
+ {
+ return getHTMLAttribute("scope");
+ }
+
+ public void setScope(String scope)
+ {
+ setHTMLAttribute("scope", scope);
+ }
+
+ public String getVAlign()
+ {
+ return getHTMLAttribute("valign");
+ }
+
+ public void setVAlign(String vAlign)
+ {
+ setHTMLAttribute("valign", vAlign);
+ }
+
+ public String getWidth()
+ {
+ return getHTMLAttribute("width");
+ }
+
+ public void setWidth(String width)
+ {
+ setHTMLAttribute("width", width);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTableColElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTableColElement.java
new file mode 100644
index 00000000000..0ed20a07a8c
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTableColElement.java
@@ -0,0 +1,120 @@
+/* DomHTMLTableColElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLTableColElement;
+
+/**
+ * An HTML 'COL' or 'COLGROUP' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTableColElement
+ extends DomHTMLElement
+ implements HTMLTableColElement
+{
+
+ protected DomHTMLTableColElement(DomHTMLDocument owner,
+ String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getCh()
+ {
+ return getHTMLAttribute("char");
+ }
+
+ public void setCh(String ch)
+ {
+ setHTMLAttribute("char", ch);
+ }
+
+ public String getChOff()
+ {
+ return getHTMLAttribute("charoff");
+ }
+
+ public void setChOff(String chOff)
+ {
+ setHTMLAttribute("charoff", chOff);
+ }
+
+ public int getSpan()
+ {
+ return getIntHTMLAttribute("span");
+ }
+
+ public void setSpan(int span)
+ {
+ setIntHTMLAttribute("span", span);
+ }
+
+ public String getVAlign()
+ {
+ return getHTMLAttribute("valign");
+ }
+
+ public void setVAlign(String vAlign)
+ {
+ setHTMLAttribute("valign", vAlign);
+ }
+
+ public String getWidth()
+ {
+ return getHTMLAttribute("width");
+ }
+
+ public void setWidth(String width)
+ {
+ setHTMLAttribute("width", width);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTableElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTableElement.java
new file mode 100644
index 00000000000..95e29573320
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTableElement.java
@@ -0,0 +1,383 @@
+/* DomHTMLTableElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomDOMException;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+import org.w3c.dom.html2.HTMLCollection;
+import org.w3c.dom.html2.HTMLElement;
+import org.w3c.dom.html2.HTMLTableCaptionElement;
+import org.w3c.dom.html2.HTMLTableElement;
+import org.w3c.dom.html2.HTMLTableSectionElement;
+
+/**
+ * An HTML 'TABLE' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTableElement
+ extends DomHTMLElement
+ implements HTMLTableElement
+{
+
+ protected DomHTMLTableElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public HTMLTableCaptionElement getCaption()
+ {
+ return (HTMLTableCaptionElement) getChildElement("caption");
+ }
+
+ public void setCaption(HTMLTableCaptionElement caption)
+ {
+ HTMLTableCaptionElement ref = getCaption();
+ if (ref == null)
+ {
+ appendChild(caption);
+ }
+ else
+ {
+ replaceChild(caption, ref);
+ }
+ }
+
+ public HTMLTableSectionElement getTHead()
+ {
+ return (HTMLTableSectionElement) getChildElement("thead");
+ }
+
+ public void setTHead(HTMLTableSectionElement tHead)
+ {
+ HTMLTableSectionElement ref = getTHead();
+ if (ref == null)
+ {
+ appendChild(tHead);
+ }
+ else
+ {
+ replaceChild(tHead, ref);
+ }
+ }
+
+ public HTMLTableSectionElement getTFoot()
+ {
+ return (HTMLTableSectionElement) getChildElement("tfoot");
+ }
+
+ public void setTFoot(HTMLTableSectionElement tFoot)
+ {
+ HTMLTableSectionElement ref = getTFoot();
+ if (ref == null)
+ {
+ appendChild(tFoot);
+ }
+ else
+ {
+ replaceChild(tFoot, ref);
+ }
+ }
+
+ public HTMLCollection getRows()
+ {
+ DomHTMLCollection ret =
+ new DomHTMLCollection((DomHTMLDocument) getOwnerDocument(), this);
+ ret.addNodeName("tr");
+ ret.evaluate();
+ return ret;
+ }
+
+ public HTMLCollection getTBodies()
+ {
+ DomHTMLCollection ret =
+ new DomHTMLCollection((DomHTMLDocument) getOwnerDocument(), this);
+ ret.addNodeName("tbody");
+ ret.evaluate();
+ return ret;
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getBgColor()
+ {
+ return getHTMLAttribute("bgcolor");
+ }
+
+ public void setBgColor(String bgColor)
+ {
+ setHTMLAttribute("bgcolor", bgColor);
+ }
+
+ public String getBorder()
+ {
+ return getHTMLAttribute("border");
+ }
+
+ public void setBorder(String border)
+ {
+ setHTMLAttribute("border", border);
+ }
+
+ public String getCellPadding()
+ {
+ return getHTMLAttribute("cellpadding");
+ }
+
+ public void setCellPadding(String cellPadding)
+ {
+ setHTMLAttribute("cellpadding", cellPadding);
+ }
+
+ public String getCellSpacing()
+ {
+ return getHTMLAttribute("cellspacing");
+ }
+
+ public void setCellSpacing(String cellSpacing)
+ {
+ setHTMLAttribute("cellspacing", cellSpacing);
+ }
+
+ public String getFrame()
+ {
+ return getHTMLAttribute("frame");
+ }
+
+ public void setFrame(String frame)
+ {
+ setHTMLAttribute("frame", frame);
+ }
+
+ public String getRules()
+ {
+ return getHTMLAttribute("rules");
+ }
+
+ public void setRules(String rules)
+ {
+ setHTMLAttribute("rules", rules);
+ }
+
+ public String getSummary()
+ {
+ return getHTMLAttribute("summary");
+ }
+
+ public void setSummary(String summary)
+ {
+ setHTMLAttribute("summary", summary);
+ }
+
+ public String getWidth()
+ {
+ return getHTMLAttribute("width");
+ }
+
+ public void setWidth(String width)
+ {
+ setHTMLAttribute("width", width);
+ }
+
+ public HTMLElement createTHead()
+ {
+ HTMLTableSectionElement ref = getTHead();
+ if (ref == null)
+ {
+ return (HTMLElement) getOwnerDocument().createElement("thead");
+ }
+ else
+ {
+ return ref;
+ }
+ }
+
+ public void deleteTHead()
+ {
+ HTMLTableSectionElement ref = getTHead();
+ if (ref != null)
+ {
+ removeChild(ref);
+ }
+ }
+
+ public HTMLElement createTFoot()
+ {
+ HTMLTableSectionElement ref = getTFoot();
+ if (ref == null)
+ {
+ return (HTMLElement) getOwnerDocument().createElement("tfoot");
+ }
+ else
+ {
+ return ref;
+ }
+ }
+
+ public void deleteTFoot()
+ {
+ HTMLTableSectionElement ref = getTFoot();
+ if (ref != null)
+ {
+ removeChild(ref);
+ }
+ }
+
+ public HTMLElement createCaption()
+ {
+ HTMLTableCaptionElement ref = getCaption();
+ if (ref == null)
+ {
+ return (HTMLElement) getOwnerDocument().createElement("caption");
+ }
+ else
+ {
+ return ref;
+ }
+ }
+
+ public void deleteCaption()
+ {
+ HTMLTableCaptionElement ref = getCaption();
+ if (ref != null)
+ {
+ removeChild(ref);
+ }
+ }
+
+ public HTMLElement insertRow(int index)
+ {
+ Node ref = getRow(index);
+ Node row = getOwnerDocument().createElement("tr");
+ if (ref == null)
+ {
+ Node tbody = getChildElement("tbody");
+ if (tbody == null)
+ {
+ tbody = getOwnerDocument().createElement("tfoot");
+ appendChild(tbody);
+ }
+ tbody.appendChild(row);
+ }
+ else
+ {
+ ref.getParentNode().insertBefore(row, ref);
+ }
+ return (HTMLElement) row;
+ }
+
+ public void deleteRow(int index)
+ {
+ Node ref = getRow(index);
+ if (ref == null)
+ {
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
+ }
+ ref.getParentNode().removeChild(ref);
+ }
+
+ Node getRow(final int index)
+ {
+ int i = 0;
+ Node thead = getChildElement("thead");
+ if (thead != null)
+ {
+ for (Node ctx = thead.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ {
+ continue;
+ }
+ if (index == i)
+ {
+ return ctx;
+ }
+ i++;
+ }
+ }
+ Node tbody = getChildElement("tbody");
+ if (tbody == null)
+ {
+ tbody = this;
+ }
+ for (Node ctx = tbody.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ {
+ continue;
+ }
+ if (index == i)
+ {
+ return ctx;
+ }
+ i++;
+ }
+ Node tfoot = getChildElement("tfoot");
+ if (tfoot != null)
+ {
+ for (Node ctx = tfoot.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ {
+ continue;
+ }
+ if (index == i)
+ {
+ return ctx;
+ }
+ i++;
+ }
+ }
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTableRowElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTableRowElement.java
new file mode 100644
index 00000000000..e21e158b42a
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTableRowElement.java
@@ -0,0 +1,225 @@
+/* DomHTMLTableRowElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomDOMException;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+import org.w3c.dom.html2.HTMLCollection;
+import org.w3c.dom.html2.HTMLElement;
+import org.w3c.dom.html2.HTMLTableRowElement;
+
+/**
+ * An HTML 'TR' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTableRowElement
+ extends DomHTMLElement
+ implements HTMLTableRowElement
+{
+
+ protected DomHTMLTableRowElement(DomHTMLDocument owner,
+ String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public int getRowIndex()
+ {
+ return getIndex();
+ }
+
+ public int getSectionRowIndex()
+ {
+ int index = 0;
+ DomHTMLElement parent = (DomHTMLElement) getParentElement("table");
+ if (parent != null)
+ {
+ Node thead = parent.getChildElement("thead");
+ if (thead != null)
+ {
+ for (Node ctx = thead.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (ctx == this)
+ {
+ return index;
+ }
+ index++;
+ }
+ }
+ Node tbody = parent.getChildElement("tbody");
+ if (tbody != null)
+ {
+ for (Node ctx = tbody.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (ctx == this)
+ {
+ return index;
+ }
+ index++;
+ }
+ }
+ Node tfoot = parent.getChildElement("tfoot");
+ if (tfoot != null)
+ {
+ for (Node ctx = tfoot.getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (ctx == this)
+ {
+ return index;
+ }
+ index++;
+ }
+ }
+ }
+ throw new DomDOMException(DOMException.NOT_FOUND_ERR);
+ }
+
+ public HTMLCollection getCells()
+ {
+ DomHTMLCollection ret =
+ new DomHTMLCollection((DomHTMLDocument) getOwnerDocument(), this);
+ ret.addNodeName("th");
+ ret.addNodeName("td");
+ ret.evaluate();
+ return ret;
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getBgColor()
+ {
+ return getHTMLAttribute("bgcolor");
+ }
+
+ public void setBgColor(String bgColor)
+ {
+ setHTMLAttribute("bgcolor", bgColor);
+ }
+
+ public String getCh()
+ {
+ return getHTMLAttribute("char");
+ }
+
+ public void setCh(String ch)
+ {
+ setHTMLAttribute("char", ch);
+ }
+
+ public String getChOff()
+ {
+ return getHTMLAttribute("charoff");
+ }
+
+ public void setChOff(String chOff)
+ {
+ setHTMLAttribute("charoff", chOff);
+ }
+
+ public String getVAlign()
+ {
+ return getHTMLAttribute("valign");
+ }
+
+ public void setVAlign(String vAlign)
+ {
+ setHTMLAttribute("valign", vAlign);
+ }
+
+ public HTMLElement insertCell(int index)
+ {
+ Node ref = getCell(index);
+ Node cell = getOwnerDocument().createElement("td");
+ if (ref == null)
+ {
+ appendChild(cell);
+ }
+ else
+ {
+ insertBefore(cell, ref);
+ }
+ return (HTMLElement) cell;
+ }
+
+ public void deleteCell(int index)
+ {
+ Node ref = getCell(index);
+ if (ref == null)
+ {
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
+ }
+ removeChild(ref);
+ }
+
+ Node getCell(final int index)
+ {
+ int i = 0;
+ for (Node ctx = getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ String name = ctx.getLocalName();
+ if (!"td".equalsIgnoreCase(name) &&
+ !"th".equalsIgnoreCase(name))
+ {
+ continue;
+ }
+ if (index == i)
+ {
+ return ctx;
+ }
+ i++;
+ }
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTableSectionElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
new file mode 100644
index 00000000000..45dd67110b7
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
@@ -0,0 +1,158 @@
+/* DomHTMLTableSectionElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import gnu.xml.dom.DomDOMException;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+import org.w3c.dom.html2.HTMLCollection;
+import org.w3c.dom.html2.HTMLElement;
+import org.w3c.dom.html2.HTMLTableSectionElement;
+
+/**
+ * An HTML 'THEAD', 'TFOOT', or 'TBODY' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTableSectionElement
+ extends DomHTMLElement
+ implements HTMLTableSectionElement
+{
+
+ protected DomHTMLTableSectionElement(DomHTMLDocument owner,
+ String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getAlign()
+ {
+ return getHTMLAttribute("align");
+ }
+
+ public void setAlign(String align)
+ {
+ setHTMLAttribute("align", align);
+ }
+
+ public String getCh()
+ {
+ return getHTMLAttribute("char");
+ }
+
+ public void setCh(String ch)
+ {
+ setHTMLAttribute("char", ch);
+ }
+
+ public String getChOff()
+ {
+ return getHTMLAttribute("charoff");
+ }
+
+ public void setChOff(String chOff)
+ {
+ setHTMLAttribute("charoff", chOff);
+ }
+
+ public String getVAlign()
+ {
+ return getHTMLAttribute("valign");
+ }
+
+ public void setVAlign(String vAlign)
+ {
+ setHTMLAttribute("valign", vAlign);
+ }
+
+ public HTMLCollection getRows()
+ {
+ DomHTMLCollection ret =
+ new DomHTMLCollection((DomHTMLDocument) getOwnerDocument(), this);
+ ret.addNodeName("tr");
+ ret.evaluate();
+ return ret;
+ }
+
+ public HTMLElement insertRow(int index)
+ {
+ Node ref = getRow(index);
+ Node row = getOwnerDocument().createElement("tr");
+ if (ref == null)
+ {
+ appendChild(row);
+ }
+ else
+ {
+ insertBefore(row, ref);
+ }
+ return (HTMLElement) row;
+ }
+
+ public void deleteRow(int index)
+ {
+ Node ref = getRow(index);
+ if (ref == null)
+ {
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
+ }
+ removeChild(ref);
+ }
+
+ Node getRow(final int index)
+ {
+ int i = 0;
+ for (Node ctx = getFirstChild(); ctx != null;
+ ctx = ctx.getNextSibling())
+ {
+ if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ {
+ continue;
+ }
+ if (index == i)
+ {
+ return ctx;
+ }
+ i++;
+ }
+ return null;
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTextAreaElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
new file mode 100644
index 00000000000..93a918ab999
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
@@ -0,0 +1,182 @@
+/* DomHTMLTextAreaElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLFormElement;
+import org.w3c.dom.html2.HTMLTextAreaElement;
+
+/**
+ * An HTML 'TEXTAREA' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTextAreaElement
+ extends DomHTMLElement
+ implements HTMLTextAreaElement
+{
+
+ protected String value;
+
+ protected DomHTMLTextAreaElement(DomHTMLDocument owner,
+ String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getDefaultValue()
+ {
+ return getHTMLAttribute("value");
+ }
+
+ public void setDefaultValue(String defaultValue)
+ {
+ setHTMLAttribute("value", defaultValue);
+ }
+
+ public HTMLFormElement getForm()
+ {
+ return (HTMLFormElement) getParentElement("form");
+ }
+
+ public String getAccessKey()
+ {
+ return getHTMLAttribute("accesskey");
+ }
+
+ public void setAccessKey(String accessKey)
+ {
+ setHTMLAttribute("accesskey", accessKey);
+ }
+
+ public int getCols()
+ {
+ return getIntHTMLAttribute("cols");
+ }
+
+ public void setCols(int cols)
+ {
+ setIntHTMLAttribute("cols", cols);
+ }
+
+ public boolean getDisabled()
+ {
+ return getBooleanHTMLAttribute("disabled");
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ setBooleanHTMLAttribute("disabled", disabled);
+ }
+
+ public String getName()
+ {
+ return getHTMLAttribute("name");
+ }
+
+ public void setName(String name)
+ {
+ setHTMLAttribute("name", name);
+ }
+
+ public boolean getReadOnly()
+ {
+ return getBooleanHTMLAttribute("readOnly");
+ }
+
+ public void setReadOnly(boolean readOnly)
+ {
+ setBooleanHTMLAttribute("readonly", readOnly);
+ }
+
+ public int getRows()
+ {
+ return getIntHTMLAttribute("rows");
+ }
+
+ public void setRows(int rows)
+ {
+ setIntHTMLAttribute("rows", rows);
+ }
+
+ public int getTabIndex()
+ {
+ return getIntHTMLAttribute("tabindex");
+ }
+
+ public void setTabIndex(int tabIndex)
+ {
+ setIntHTMLAttribute("tabindex", tabIndex);
+ }
+
+ public String getType()
+ {
+ return "textarea";
+ }
+
+ public String getValue()
+ {
+ if (value == null)
+ {
+ value = getDefaultValue();
+ }
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public void blur()
+ {
+ dispatchUIEvent("blur");
+ }
+
+ public void focus()
+ {
+ dispatchUIEvent("focus");
+ }
+
+ public void select()
+ {
+ dispatchUIEvent("select");
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLTitleElement.java b/libjava/gnu/xml/dom/html2/DomHTMLTitleElement.java
new file mode 100644
index 00000000000..1c1105528ac
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLTitleElement.java
@@ -0,0 +1,69 @@
+/* DomHTMLTitleElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLTitleElement;
+
+/**
+ * An HTML 'TITLE' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLTitleElement
+ extends DomHTMLElement
+ implements HTMLTitleElement
+{
+
+ protected DomHTMLTitleElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public String getText()
+ {
+ return getTextContent();
+ }
+
+ public void setText(String text)
+ {
+ setTextContent(text);
+ }
+
+}
+
diff --git a/libjava/gnu/xml/dom/html2/DomHTMLUListElement.java b/libjava/gnu/xml/dom/html2/DomHTMLUListElement.java
new file mode 100644
index 00000000000..9f6b6924927
--- /dev/null
+++ b/libjava/gnu/xml/dom/html2/DomHTMLUListElement.java
@@ -0,0 +1,79 @@
+/* DomHTMLUListElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.dom.html2;
+
+import org.w3c.dom.html2.HTMLUListElement;
+
+/**
+ * An HTML 'UL' element node.
+ *
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
+ */
+public class DomHTMLUListElement
+ extends DomHTMLElement
+ implements HTMLUListElement
+{
+
+ protected DomHTMLUListElement(DomHTMLDocument owner, String namespaceURI,
+ String name)
+ {
+ super(owner, namespaceURI, name);
+ }
+
+ public boolean getCompact()
+ {
+ return getBooleanHTMLAttribute("compact");
+ }
+
+ public void setCompact(boolean compact)
+ {
+ setBooleanHTMLAttribute("compact", compact);
+ }
+
+ public String getType()
+ {
+ return getHTMLAttribute("type");
+ }
+
+ public void setType(String type)
+ {
+ setHTMLAttribute("type", type);
+ }
+
+}
+
diff --git a/libjava/include/jni_md.h b/libjava/include/jni_md.h
new file mode 100644
index 00000000000..7c04b955d6c
--- /dev/null
+++ b/libjava/include/jni_md.h
@@ -0,0 +1,151 @@
+/* jni_md.h
+ Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License. */
+
+#ifndef __GCJ_JNI_MD_H__
+#define __GCJ_JNI_MD_H__
+
+#include <gcj/libgcj-config.h>
+
+#ifdef __GCJ_JNI_IMPL__
+
+/* If __GCJ_JNI_IMPL__ is defined, then we assume that we're building
+ libgcj itself, and we include headers which taint the namespace
+ more than is acceptable for the ordinary JNI user. */
+#include <gcj/javaprims.h>
+#include <gcj/array.h>
+#include <gnu/gcj/runtime/JNIWeakRef.h>
+
+typedef gnu::gcj::runtime::JNIWeakRef *jweak;
+
+typedef struct _Jv_JNIEnv JNIEnv;
+typedef struct _Jv_JavaVM JavaVM;
+
+#define JNI_TRUE true
+#define JNI_FALSE false
+
+/* We defined jobject and friends, so don't redefine them in jni.h. */
+#define _CLASSPATH_VM_JNI_TYPES_DEFINED
+
+/* We defined jmethodID and and jfieldID, so don't redefine them in
+ jni.h. */
+#define _CLASSPATH_VM_INTERNAL_TYPES_DEFINED
+
+/* Contents of the JNIEnv; but only inside the implementation. */
+#define _CLASSPATH_JNIENV_CONTENTS \
+ /* The current exception. */ \
+ jthrowable ex; \
+ \
+ /* The class of the current native method. */ \
+ jclass klass; \
+ \
+ /* The chain of local frames. */ \
+ struct _Jv_JNI_LocalFrame *locals; \
+ \
+ /* The bottom-most element of the chain, initialized with the env and \
+ reused between non-nesting JNI calls. */ \
+ struct _Jv_JNI_LocalFrame *bottom_locals;
+
+
+#else /* __GCJ_JNI_IMPL__ */
+
+# ifdef __GNUC__
+
+/* If we're using gcc, we can use a platform-independent scheme to get
+ the right integer types. FIXME: this is not always correct, for
+ instance on the c4x it will be wrong -- it depends on whether
+ QImode is 8 bits. */
+typedef int jbyte __attribute__((__mode__(__QI__)));
+typedef int jshort __attribute__((__mode__(__HI__)));
+typedef int jint __attribute__((__mode__(__SI__)));
+typedef int jlong __attribute__((__mode__(__DI__)));
+typedef int jboolean __attribute__((__mode__(__QI__)));
+typedef unsigned short jchar __attribute__((__mode__(__HI__)));
+typedef float jfloat;
+typedef double jdouble;
+typedef jint jsize;
+
+# else /* __GNUC__ */
+
+# ifdef JV_HAVE_INTTYPES_H
+
+/* If <inttypes.h> is available, we use it. */
+
+# include <inttypes.h>
+
+typedef int8_t jbyte;
+typedef int16_t jshort;
+typedef int32_t jint;
+typedef int64_t jlong;
+typedef float jfloat;
+typedef double jdouble;
+typedef jint jsize;
+typedef int8_t jboolean;
+typedef uint16_t jchar;
+
+# else /* JV_HAVE_INTTYPES_H */
+
+/* For now, we require either gcc or <inttypes.h>. If we did more
+ work at configure time we could get around this, but right now it
+ doesn't seem worth it. */
+# error jni.h not ported to this platform
+
+# endif /* JV_HAVE_INTTYPES_H */
+
+# endif /* __GNUC__ */
+
+#endif /* __GCJ_JNI_IMPL__ */
+
+
+/* Linkage and calling conventions. */
+#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
+
+#define JNIIMPORT __declspec(dllimport)
+#define JNIEXPORT __declspec(dllexport)
+
+#define JNICALL __stdcall
+
+/* These defines apply to symbols in libgcj */
+#ifdef __GCJ_DLL__
+# ifdef __GCJ_JNI_IMPL__
+# define _CLASSPATH_JNIIMPEXP JNIEXPORT
+# else
+# define _CLASSPATH_JNIIMPEXP JNIIMPORT
+# endif /* ! __GCJ_JNI_IMPL__ */
+#else /* ! __GCJ_DLL__ */
+# define _CLASSPATH_JNIIMPEXP
+#endif /* __GCJ_DLL__ */
+
+#else /* !( _WIN32 || __WIN32__ || WIN32) */
+
+#define JNIIMPORT
+#define JNIEXPORT
+#define JNICALL
+#define _CLASSPATH_JNIIMPEXP
+
+#endif /* !( _WIN32 || __WIN32__ || WIN32) */
+
+
+#endif /* __GCJ_JNI_MD_H__ */
diff --git a/libjava/javax/swing/plaf/metal/MetalBorders.java b/libjava/javax/swing/plaf/metal/MetalBorders.java
new file mode 100644
index 00000000000..d5b467fa22f
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalBorders.java
@@ -0,0 +1,443 @@
+/* MetalBorders.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Insets;
+
+import javax.swing.AbstractButton;
+import javax.swing.ButtonModel;
+import javax.swing.JButton;
+import javax.swing.border.AbstractBorder;
+import javax.swing.border.Border;
+import javax.swing.plaf.BorderUIResource;
+import javax.swing.plaf.UIResource;
+import javax.swing.plaf.basic.BasicGraphicsUtils;
+import javax.swing.plaf.basic.BasicBorders;
+
+/**
+ * This factory class creates borders for the different Swing components
+ * UI.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public class MetalBorders
+{
+
+ /** The shared instance for getButtonBorder(). */
+ private static Border buttonBorder;
+
+ /** The shared instance for getRolloverButtonBorder(). */
+ private static Border toolbarButtonBorder;
+
+ /**
+ * A MarginBorder that gets shared by multiple components.
+ * Created on demand by the private helper function {@link
+ * #getMarginBorder()}.
+ */
+ private static BasicBorders.MarginBorder marginBorder;
+
+ /**
+ * The border that is drawn around Swing buttons.
+ */
+ public static class MetalButtonBorder
+ extends AbstractBorder
+ implements UIResource
+ {
+ /** The borders insets. */
+ protected static Insets borderInsets = new Insets(3, 3, 3, 3);
+
+ /**
+ * Creates a new instance of ButtonBorder.
+ */
+ public MetalButtonBorder()
+ {
+ }
+
+ /**
+ * Paints the button border.
+ *
+ * @param c the component for which we paint the border
+ * @param g the Graphics context to use
+ * @param x the X coordinate of the upper left corner of c
+ * @param y the Y coordinate of the upper left corner of c
+ * @param w the width of c
+ * @param h the height of c
+ */
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ int h)
+ {
+ ButtonModel bmodel = null;
+
+ if (c instanceof AbstractButton)
+ bmodel = ((AbstractButton) c).getModel();
+
+ Color darkShadow = MetalLookAndFeel.getControlDarkShadow();
+ Color shadow = MetalLookAndFeel.getControlShadow();
+ Color light = MetalLookAndFeel.getWhite();
+ Color middle = MetalLookAndFeel.getControl();
+
+ // draw dark border
+ g.setColor(darkShadow);
+ g.drawRect(x, y, w - 2, h - 2);
+
+ if (!bmodel.isPressed())
+ {
+ // draw light border
+ g.setColor(light);
+ g.drawRect(x + 1, y + 1, w - 2, h - 2);
+
+ // draw crossing pixels of both borders
+ g.setColor(middle);
+ g.drawRect(x + 1, y + h - 2, 0, 0);
+ g.drawRect(x + w - 2, y + 1, 0, 0);
+ }
+ else
+ {
+ // draw light border
+ g.setColor(light);
+ g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1);
+ g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1);
+
+ // draw shadow border
+ g.setColor(middle);
+ g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
+ g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
+
+ // draw crossing pixels of both borders
+ g.setColor(shadow);
+ g.drawRect(x + 1, y + h - 2, 0, 0);
+ g.drawRect(x + w - 2, y + 1, 0, 0);
+ }
+ }
+
+ /**
+ * Returns the insets of the ButtonBorder.
+ *
+ * @param c the component for which the border is used
+ *
+ * @return the insets of the ButtonBorder
+ */
+ public Insets getBorderInsets(Component c)
+ {
+ return getBorderInsets(c, null);
+ }
+
+ /**
+ * Returns the insets of the ButtonBorder in the specified Insets object.
+ *
+ * @param c the component for which the border is used
+ * @param newInsets the insets object where to put the values
+ *
+ * @return the insets of the ButtonBorder
+ */
+ public Insets getBorderInsets(Component c, Insets newInsets)
+ {
+ if (newInsets == null)
+ newInsets = new Insets(0, 0, 0, 0);
+
+ AbstractButton b = (AbstractButton) c;
+ newInsets.bottom = borderInsets.bottom;
+ newInsets.left = borderInsets.left;
+ newInsets.right = borderInsets.right;
+ newInsets.top = borderInsets.top;
+ return newInsets;
+ }
+ }
+
+ /**
+ * A border for JScrollPanes.
+ */
+ public static class ScrollPaneBorder
+ extends AbstractBorder
+ implements UIResource
+ {
+ /** The border insets. */
+ private static Insets insets = new Insets(1, 1, 2, 2);
+
+ /**
+ * Constructs a new ScrollPaneBorder.
+ */
+ public ScrollPaneBorder()
+ {
+ }
+
+ /**
+ * Returns the insets of the border for the Component <code>c</code>.
+ *
+ * @param c the Component for which we return the border insets
+ */
+ public Insets getBorderInsets(Component c)
+ {
+ return insets;
+ }
+
+ /**
+ * Paints the border.
+ *
+ * @param c the Component for which the border is painted
+ * @param g the Graphics context
+ * @param x the X coordinate of the upper left corner of the border
+ * @param y the Y coordinate of the upper left corner of the border
+ * @param w the width of the border
+ * @param h the height of the border
+ */
+ public void paintBorder(Component c, Graphics g, int x, int y,
+ int w, int h)
+ {
+ Color darkShadow = MetalLookAndFeel.getControlDarkShadow();
+ Color shadow = MetalLookAndFeel.getControlShadow();
+ Color light = MetalLookAndFeel.getWhite();
+ Color middle = MetalLookAndFeel.getControl();
+
+ // paint top border line
+ g.setColor(darkShadow);
+ g.drawLine(x, y, x + w - 2, y);
+
+ // paint left border line
+ g.drawLine(x, y, x, y + h - 2);
+
+ // paint right inner border line
+ g.drawLine(x + w - 2, y, x + w - 2, y + h + 1);
+
+ // paint bottom inner border line
+ g.drawLine(x + 2, y + h - 2, x + w - 2, y + h - 2);
+
+ // draw right outer border line
+ g.setColor(light);
+ g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);
+
+ // draw bottom outer border line
+ g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
+
+ // paint the lighter points
+ g.setColor(middle);
+ g.drawLine(x + w - 1, y, x + w - 1, y);
+ g.drawLine(x + w - 2, y + 2, x + w - 2, y + 2);
+ g.drawLine(x, y + h - 1, x, y + h - 1);
+ g.drawLine(x + 1, y + h - 2, x + 1, y + h - 2);
+
+ }
+
+ }
+
+ /**
+ * This border is used in Toolbar buttons as inner border.
+ */
+ static class RolloverMarginBorder extends AbstractBorder
+ {
+ /** The borders insets. */
+ protected static Insets borderInsets = new Insets(3, 3, 3, 3);
+
+ /**
+ * Creates a new instance of RolloverBorder.
+ */
+ public RolloverMarginBorder()
+ {
+ }
+
+ /**
+ * Returns the insets of the RolloverBorder.
+ *
+ * @param c the component for which the border is used
+ *
+ * @return the insets of the RolloverBorder
+ */
+ public Insets getBorderInsets(Component c)
+ {
+ return getBorderInsets(c, null);
+ }
+
+ /**
+ * Returns the insets of the RolloverMarginBorder in the specified
+ * Insets object.
+ *
+ * @param c the component for which the border is used
+ * @param newInsets the insets object where to put the values
+ *
+ * @return the insets of the RolloverMarginBorder
+ */
+ public Insets getBorderInsets(Component c, Insets newInsets)
+ {
+ if (newInsets == null)
+ newInsets = new Insets(0, 0, 0, 0);
+
+ AbstractButton b = (AbstractButton) c;
+ Insets margin = b.getMargin();
+ newInsets.bottom = borderInsets.bottom;
+ newInsets.left = borderInsets.left;
+ newInsets.right = borderInsets.right;
+ newInsets.top = borderInsets.top;
+ return newInsets;
+ }
+ }
+
+ /**
+ * A border implementation for popup menus.
+ */
+ public static class PopupMenuBorder
+ extends AbstractBorder
+ implements UIResource
+ {
+
+ /** The border's insets. */
+ protected static Insets borderInsets = new Insets(2, 2, 1, 1);
+
+ /**
+ * Constructs a new PopupMenuBorder.
+ */
+ public PopupMenuBorder()
+ {
+ }
+
+ /**
+ * Returns the insets of the border, creating a new Insets instance
+ * with each call.
+ *
+ * @param c the component for which we return the border insets
+ * (not used here)
+ */
+ public Insets getBorderInsets(Component c)
+ {
+ return getBorderInsets(c, null);
+ }
+
+ /**
+ * Returns the insets of the border, using the supplied Insets instance.
+ *
+ * @param c the component for which we return the border insets
+ * (not used here)
+ * @param i the Insets instance to fill with the Insets values
+ */
+ public Insets getBorderInsets(Component c, Insets i)
+ {
+ Insets insets;
+ if (i == null)
+ insets = new Insets(borderInsets.top, borderInsets.left,
+ borderInsets.bottom, borderInsets.right);
+ else
+ {
+ insets = i;
+ insets.top = borderInsets.top;
+ insets.left = borderInsets.left;
+ insets.bottom = borderInsets.bottom;
+ insets.right = borderInsets.right;
+ }
+
+ return insets;
+ }
+
+ /**
+ * Paints the border for component <code>c</code> using the
+ * Graphics context <code>g</code> with the dimension
+ * <code>x, y, w, h</code>.
+ *
+ * @param c the component for which we paint the border
+ * @param g the Graphics context to use
+ * @param x the X coordinate of the upper left corner of c
+ * @param y the Y coordinate of the upper left corner of c
+ * @param w the width of c
+ * @param h the height of c
+ */
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ int h)
+ {
+ Color darkShadow = MetalLookAndFeel.getPrimaryControlDarkShadow();
+ Color light = MetalLookAndFeel.getPrimaryControlHighlight();
+
+ // draw dark outer border
+ g.setColor(darkShadow);
+ g.drawRect(x, y, w - 1, h - 1);
+
+ // draw highlighted inner border (only top and left)
+ g.setColor(light);
+ g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
+ g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
+ }
+
+ }
+
+ /**
+ * Returns a border for Swing buttons in the Metal Look &amp; Feel.
+ *
+ * @return a border for Swing buttons in the Metal Look &amp; Feel
+ */
+ public static Border getButtonBorder()
+ {
+ if (buttonBorder == null)
+ {
+ Border outer = new MetalButtonBorder();
+ Border inner = getMarginBorder();
+ buttonBorder = new BorderUIResource.CompoundBorderUIResource
+ (outer, inner);
+ }
+ return buttonBorder;
+ }
+
+ /**
+ * Returns a border for Toolbar buttons in the Metal Look &amp; Feel.
+ *
+ * @return a border for Toolbar buttons in the Metal Look &amp; Feel
+ */
+ static Border getToolbarButtonBorder()
+ {
+ if (toolbarButtonBorder == null)
+ {
+ Border outer = new MetalButtonBorder();
+ Border inner = new RolloverMarginBorder();
+ toolbarButtonBorder = new BorderUIResource.CompoundBorderUIResource
+ (outer, inner);
+ }
+ return toolbarButtonBorder;
+ }
+
+ /**
+ * Returns a shared instance of {@link BasicBorders.MarginBorder}.
+ *
+ * @return a shared instance of {@link BasicBorders.MarginBorder}
+ */
+ static Border getMarginBorder()
+ {
+ if (marginBorder == null)
+ marginBorder = new BasicBorders.MarginBorder();
+ return marginBorder;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalButtonUI.java b/libjava/javax/swing/plaf/metal/MetalButtonUI.java
new file mode 100644
index 00000000000..7b9130e0e5d
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalButtonUI.java
@@ -0,0 +1,101 @@
+/* MetalButtonUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.AbstractButton;
+import javax.swing.JComponent;
+import javax.swing.JToolBar;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicButtonUI;
+
+/**
+ * The Metal Look &amp; Feel implementation for
+ * {@link javax.swing.AbstractButton}s.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public class MetalButtonUI
+ extends BasicButtonUI
+{
+
+ // FIXME: probably substitute with a Map in the future in the case
+ // that this UI becomes stateful
+
+ /** The cached MetalButtonUI instance. */
+ private static MetalButtonUI instance = null;
+
+ /**
+ * Creates a new instance of MetalButtonUI.
+ */
+ public MetalButtonUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalButtonUI.
+ *
+ * @param component a button for which a UI instance should be returned
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalButtonUI();
+ return instance;
+ }
+
+ /**
+ * Install the Look &amp; Feel defaults for Buttons.
+ *
+ * @param button the button for which to install the Look &amp; Feel
+ */
+ public void installDefaults(AbstractButton button)
+ {
+ super.installDefaults(button);
+
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+ button.setFont(defaults.getFont("Button.font"));
+
+ if (button.getParent() instanceof JToolBar)
+ button.setBorder(MetalBorders.getToolbarButtonBorder());
+ }
+
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalCheckBoxUI.java b/libjava/javax/swing/plaf/metal/MetalCheckBoxUI.java
new file mode 100644
index 00000000000..cc5ac73d7b9
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalCheckBoxUI.java
@@ -0,0 +1,74 @@
+/* MetalCheckBoxUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicCheckBoxUI;
+
+public class MetalCheckBoxUI
+ extends BasicCheckBoxUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for JCheckBoxes. */
+ private static MetalCheckBoxUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalCheckBoxUI.
+ */
+ public MetalCheckBoxUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalCheckBoxUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalCheckBoxUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalCheckBoxUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalComboBoxUI.java b/libjava/javax/swing/plaf/metal/MetalComboBoxUI.java
new file mode 100644
index 00000000000..3ba25b6c5dc
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalComboBoxUI.java
@@ -0,0 +1,74 @@
+/* MetalComboBoxUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicComboBoxUI;
+
+public class MetalComboBoxUI
+ extends BasicComboBoxUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for JComboBoxes. */
+ private static MetalComboBoxUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalComboBoxUI.
+ */
+ public MetalComboBoxUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalComboBoxUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalComboBoxUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalComboBoxUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalDesktopIconUI.java b/libjava/javax/swing/plaf/metal/MetalDesktopIconUI.java
new file mode 100644
index 00000000000..6ceedd0d696
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalDesktopIconUI.java
@@ -0,0 +1,74 @@
+/* MetalDesktopIconUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicDesktopIconUI;
+
+public class MetalDesktopIconUI
+ extends BasicDesktopIconUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalDesktopIcons */
+ private static MetalDesktopIconUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalDesktopIconUI.
+ */
+ public MetalDesktopIconUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalDesktopIconUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalDesktopIconUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalDesktopIconUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalInternalFrameUI.java b/libjava/javax/swing/plaf/metal/MetalInternalFrameUI.java
new file mode 100644
index 00000000000..f2f8e360060
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalInternalFrameUI.java
@@ -0,0 +1,88 @@
+/* MetalInternalFrameUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.util.HashMap;
+
+import javax.swing.JComponent;
+import javax.swing.JInternalFrame;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicInternalFrameUI;
+
+public class MetalInternalFrameUI
+ extends BasicInternalFrameUI
+{
+
+ /** The instances of MetalInternalFrameUI*/
+ private static HashMap instances;
+
+ /**
+ * Constructs a new instance of MetalInternalFrameUI.
+ */
+ public MetalInternalFrameUI(JInternalFrame frame)
+ {
+ super(frame);
+ }
+
+ /**
+ * Returns an instance of MetalInternalFrameUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalInternalFrameUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instances == null)
+ instances = new HashMap();
+
+
+ Object o = instances.get(component);
+ MetalInternalFrameUI instance;
+ if (o == null)
+ {
+ instance = new MetalInternalFrameUI((JInternalFrame) component);
+ instances.put(component, instance);
+ }
+ else
+ instance = (MetalInternalFrameUI) o;
+
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalLabelUI.java b/libjava/javax/swing/plaf/metal/MetalLabelUI.java
new file mode 100644
index 00000000000..12aa7b11624
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalLabelUI.java
@@ -0,0 +1,74 @@
+/* MetalLabelUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicLabelUI;
+
+public class MetalLabelUI
+ extends BasicLabelUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for JLabels. */
+ private static MetalLabelUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalLabelUI.
+ */
+ public MetalLabelUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalLabelUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalLabelUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalLabelUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java b/libjava/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java
new file mode 100644
index 00000000000..0892c56e487
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java
@@ -0,0 +1,73 @@
+/* MetalPopupMenuSeparatorUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+
+public class MetalPopupMenuSeparatorUI
+ extends MetalSeparatorUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalPopupMenuSeparatorUIs */
+ private static MetalPopupMenuSeparatorUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalPopupMenuSeparatorUI.
+ */
+ public MetalPopupMenuSeparatorUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalPopupMenuSeparatorUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalPopupMenuSeparatorUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalPopupMenuSeparatorUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalProgressBarUI.java b/libjava/javax/swing/plaf/metal/MetalProgressBarUI.java
new file mode 100644
index 00000000000..04ca52f71bb
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalProgressBarUI.java
@@ -0,0 +1,74 @@
+/* MetalProgressBarUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicProgressBarUI;
+
+public class MetalProgressBarUI
+ extends BasicProgressBarUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalProgressBarUIs */
+ private static MetalProgressBarUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalProgressBarUI.
+ */
+ public MetalProgressBarUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalProgressBarUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalProgressBarUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalProgressBarUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalRadioButtonUI.java b/libjava/javax/swing/plaf/metal/MetalRadioButtonUI.java
new file mode 100644
index 00000000000..b4ff10bd544
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalRadioButtonUI.java
@@ -0,0 +1,74 @@
+/* MetalRadioButtonUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicRadioButtonUI;
+
+public class MetalRadioButtonUI
+ extends BasicRadioButtonUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for JRadioButtons. */
+ private static MetalRadioButtonUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalRadioButtonUI.
+ */
+ public MetalRadioButtonUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalRadioButtonUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalRadioButtonUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalRadioButtonUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalRootPaneUI.java b/libjava/javax/swing/plaf/metal/MetalRootPaneUI.java
new file mode 100644
index 00000000000..5306b6182c4
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalRootPaneUI.java
@@ -0,0 +1,74 @@
+/* MetalRootPaneUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicRootPaneUI;
+
+public class MetalRootPaneUI
+ extends BasicRootPaneUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalRootPaneUIs */
+ private static MetalRootPaneUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalRootPaneUI.
+ */
+ public MetalRootPaneUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalRootPaneUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalRootPaneUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalRootPaneUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalScrollBarUI.java b/libjava/javax/swing/plaf/metal/MetalScrollBarUI.java
new file mode 100644
index 00000000000..e89ccc6a422
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalScrollBarUI.java
@@ -0,0 +1,87 @@
+/* MetalScrollBarUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.util.HashMap;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicScrollBarUI;
+
+public class MetalScrollBarUI
+ extends BasicScrollBarUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for JScrollBars. */
+ private static HashMap instances = null;
+
+ /**
+ * Constructs a new instance of MetalScrollBarUI.
+ */
+ public MetalScrollBarUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalScrollBarUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalScrollBarUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instances == null)
+ instances = new HashMap();
+
+ Object o = instances.get(component);
+ MetalScrollBarUI instance;
+ if (o == null)
+ {
+ instance = new MetalScrollBarUI();
+ instances.put(component, instance);
+ }
+ else
+ instance = (MetalScrollBarUI) o;
+
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalScrollPaneUI.java b/libjava/javax/swing/plaf/metal/MetalScrollPaneUI.java
new file mode 100644
index 00000000000..6220ea9e2d0
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalScrollPaneUI.java
@@ -0,0 +1,74 @@
+/* MetalScrollPaneUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicScrollPaneUI;
+
+public class MetalScrollPaneUI
+ extends BasicScrollPaneUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for JScrollPanes. */
+ private static MetalScrollPaneUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalScrollPaneUI.
+ */
+ public MetalScrollPaneUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalScrollPaneUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalScrollPaneUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalScrollPaneUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalSeparatorUI.java b/libjava/javax/swing/plaf/metal/MetalSeparatorUI.java
new file mode 100644
index 00000000000..e6c36b4e47f
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalSeparatorUI.java
@@ -0,0 +1,74 @@
+/* MetalSeparatorUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicSeparatorUI;
+
+public class MetalSeparatorUI
+ extends BasicSeparatorUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalSeparatorUIs */
+ private static MetalSeparatorUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalSeparatorUI.
+ */
+ public MetalSeparatorUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalSeparatorUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalSeparatorUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalSeparatorUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalSliderUI.java b/libjava/javax/swing/plaf/metal/MetalSliderUI.java
new file mode 100644
index 00000000000..fafd21d3e02
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalSliderUI.java
@@ -0,0 +1,87 @@
+/* MetalSliderUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.util.HashMap;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicSliderUI;
+
+public class MetalSliderUI
+ extends BasicSliderUI
+{
+
+ /** The UI instances for MetalSliderUIs */
+ private static HashMap instances;
+
+ /**
+ * Constructs a new instance of MetalSliderUI.
+ */
+ public MetalSliderUI()
+ {
+ super(null);
+ }
+
+ /**
+ * Returns an instance of MetalSliderUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalSliderUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instances == null)
+ instances = new HashMap();
+
+
+ Object o = instances.get(component);
+ MetalSliderUI instance;
+ if (o == null)
+ {
+ instance = new MetalSliderUI();
+ instances.put(component, instance);
+ }
+ else
+ instance = (MetalSliderUI) o;
+
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalSplitPaneUI.java b/libjava/javax/swing/plaf/metal/MetalSplitPaneUI.java
new file mode 100644
index 00000000000..5c2e141b1ba
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalSplitPaneUI.java
@@ -0,0 +1,74 @@
+/* MetalSplitPaneUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicSplitPaneUI;
+
+public class MetalSplitPaneUI
+ extends BasicSplitPaneUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalSplitPaneUIs */
+ private static MetalSplitPaneUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalSplitPaneUI.
+ */
+ public MetalSplitPaneUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalSplitPaneUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalSplitPaneUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalSplitPaneUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalTabbedPaneUI.java b/libjava/javax/swing/plaf/metal/MetalTabbedPaneUI.java
new file mode 100644
index 00000000000..524fc5253fd
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalTabbedPaneUI.java
@@ -0,0 +1,86 @@
+/* MetalTabbedPaneUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.util.HashMap;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicTabbedPaneUI;
+
+public class MetalTabbedPaneUI
+ extends BasicTabbedPaneUI
+{
+
+ /** The shared UI instance for JTabbedPanes. */
+ private static HashMap instances = null;
+
+ /**
+ * Constructs a new instance of MetalTabbedPaneUI.
+ */
+ public MetalTabbedPaneUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalTabbedPaneUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalTabbedPaneUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instances == null)
+ instances = new HashMap();
+
+ Object o = instances.get(component);
+ MetalTabbedPaneUI instance;
+ if (o == null)
+ {
+ instance = new MetalTabbedPaneUI();
+ instances.put(component, instance);
+ }
+ else
+ instance = (MetalTabbedPaneUI) o;
+
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalTextFieldUI.java b/libjava/javax/swing/plaf/metal/MetalTextFieldUI.java
new file mode 100644
index 00000000000..d2e9ea529da
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalTextFieldUI.java
@@ -0,0 +1,86 @@
+/* MetalTextFieldUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.util.HashMap;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicTextFieldUI;
+
+public class MetalTextFieldUI
+ extends BasicTextFieldUI
+{
+
+ /** The UI instances for MetalTextFieldUIs */
+ private static HashMap instances = null;
+
+ /**
+ * Constructs a new instance of MetalTextFieldUI.
+ */
+ public MetalTextFieldUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalTextFieldUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalTextFieldUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instances == null)
+ instances = new HashMap();
+
+ Object o = instances.get(component);
+ MetalTextFieldUI instance;
+ if (o == null)
+ {
+ instance = new MetalTextFieldUI();
+ instances.put(component, instance);
+ }
+ else
+ instance = (MetalTextFieldUI) o;
+
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalToggleButtonUI.java b/libjava/javax/swing/plaf/metal/MetalToggleButtonUI.java
new file mode 100644
index 00000000000..84af36a5e00
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalToggleButtonUI.java
@@ -0,0 +1,74 @@
+/* MetalToggleButtonUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicToggleButtonUI;
+
+public class MetalToggleButtonUI
+ extends BasicToggleButtonUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalToggleButtonUIs */
+ private static MetalToggleButtonUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalToggleButtonUI.
+ */
+ public MetalToggleButtonUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalToggleButtonUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalToggleButtonUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalToggleButtonUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalToolBarUI.java b/libjava/javax/swing/plaf/metal/MetalToolBarUI.java
new file mode 100644
index 00000000000..299a4c0a413
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalToolBarUI.java
@@ -0,0 +1,74 @@
+/* MetalToolBarUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicToolBarUI;
+
+public class MetalToolBarUI
+ extends BasicToolBarUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalToolBarUIs */
+ private static MetalToolBarUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalToolBarUI.
+ */
+ public MetalToolBarUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalToolBarUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalToolBarUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalToolBarUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalToolTipUI.java b/libjava/javax/swing/plaf/metal/MetalToolTipUI.java
new file mode 100644
index 00000000000..303b6294ac8
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalToolTipUI.java
@@ -0,0 +1,74 @@
+/* MetalToolTipUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicToolTipUI;
+
+public class MetalToolTipUI
+ extends BasicToolTipUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalToolTipUIs */
+ private static MetalToolTipUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalToolTipUI.
+ */
+ public MetalToolTipUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalToolTipUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalToolTipUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalToolTipUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/plaf/metal/MetalTreeUI.java b/libjava/javax/swing/plaf/metal/MetalTreeUI.java
new file mode 100644
index 00000000000..a420204b56f
--- /dev/null
+++ b/libjava/javax/swing/plaf/metal/MetalTreeUI.java
@@ -0,0 +1,74 @@
+/* MetalTreeUI.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicTreeUI;
+
+public class MetalTreeUI
+ extends BasicTreeUI
+{
+
+ // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The shared UI instance for MetalTreeUIs */
+ private static MetalTreeUI instance = null;
+
+ /**
+ * Constructs a new instance of MetalTreeUI.
+ */
+ public MetalTreeUI()
+ {
+ super();
+ }
+
+ /**
+ * Returns an instance of MetalTreeUI.
+ *
+ * @param component the component for which we return an UI instance
+ *
+ * @return an instance of MetalTreeUI
+ */
+ public static ComponentUI createUI(JComponent component)
+ {
+ if (instance == null)
+ instance = new MetalTreeUI();
+ return instance;
+ }
+}
diff --git a/libjava/javax/swing/text/ChangedCharSetException.java b/libjava/javax/swing/text/ChangedCharSetException.java
new file mode 100644
index 00000000000..bf592a65a97
--- /dev/null
+++ b/libjava/javax/swing/text/ChangedCharSetException.java
@@ -0,0 +1,100 @@
+/* ChangedCharSetException.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * The exception is thrown when the document charset is changed.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class ChangedCharSetException
+ extends IOException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ * This value corresponds the version 1.4.
+ */
+ private static final long serialVersionUID = 9119851554465432389L;
+
+ /**
+ * The char set specification.
+ */
+ private final String m_charSetSpec;
+
+ /**
+ * The char set key.
+ */
+ private final boolean m_charSetKey;
+
+ /**
+ * Constructs a new char set exception with two additional parameters,
+ * defining the circumstances under that the exception was raised.
+ */
+ public ChangedCharSetException(String charSetSpec, boolean charSetKey)
+ {
+ m_charSetSpec = charSetSpec;
+ m_charSetKey = charSetKey;
+ }
+
+ /**
+ * Get the value of the first parameter, previously passed to the
+ * constructor.
+ *
+ * @return the value of the first parameter
+ */
+ public String getCharSetSpec()
+ {
+ return m_charSetSpec;
+ }
+
+ /**
+ * Get the value of the second parameter, previously passed to the
+ * constructor.
+ *
+ * @return the value of the second parameter
+ */
+ public boolean keyEqualsCharSet()
+ {
+ return m_charSetKey;
+ }
+}
diff --git a/libjava/javax/swing/text/html/HTMLDocument.java b/libjava/javax/swing/text/html/HTMLDocument.java
new file mode 100644
index 00000000000..45c87c7b7fd
--- /dev/null
+++ b/libjava/javax/swing/text/html/HTMLDocument.java
@@ -0,0 +1,53 @@
+/* HTMLDocument.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html;
+
+import javax.swing.text.DefaultStyledDocument;
+
+/**
+ * TODO: This class is not yet completetely implemented.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class HTMLDocument extends DefaultStyledDocument
+{
+ public void processHTMLFrameHyperlinkEvent(HTMLFrameHyperlinkEvent event)
+ {
+ }
+}
diff --git a/libjava/javax/swing/text/html/HTMLEditorKit.java b/libjava/javax/swing/text/html/HTMLEditorKit.java
new file mode 100755
index 00000000000..742eab36eb7
--- /dev/null
+++ b/libjava/javax/swing/text/html/HTMLEditorKit.java
@@ -0,0 +1,173 @@
+/* HTMLEditorKit.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html;
+
+import java.io.Reader;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.MutableAttributeSet;
+
+/**
+ * This class is NOT implemented. This file currently holds only
+ * declarations of the two enclosing classes, necessary for testing
+ * the implemented javax.swing.text.html.parser package.
+ * @author No authorship is taken, implement the class and be!
+ * TODO: replace this header after implementing the class.
+ */
+public class HTMLEditorKit
+{
+ /**
+ * The abstract HTML parser declaration.
+ */
+ public abstract static class Parser
+ {
+ /**
+ * Parse the HTML text, calling various methods of the provided callback
+ * in response to the occurence of the corresponding HTML constructions.
+ * @param reader The reader to read the source HTML from.
+ * @param callback The callback to receive information about the parsed
+ * HTML structures
+ * @param ignoreCharSet If true, the parser ignores all charset information
+ * that may be present in HTML documents.
+ * @throws IOException, normally if the reader throws one.
+ */
+ public abstract void parse(Reader reader, ParserCallback callback,
+ boolean ignoreCharSet
+ )
+ throws java.io.IOException;
+ }
+
+ /**
+ * The "hook" that receives all information about the HTML document
+ * structure while parsing it. The methods are invoked by parser
+ * and should be normally overridden.
+ */
+ public static class ParserCallback
+ {
+ /**
+ * If the tag does not occurs in the html stream directly, but
+ * is supposed by parser, the tag attribute set contains this additional
+ * attribute, having value Boolean.True.
+ */
+ public static final Object IMPLIED = "_implied_";
+
+ /**
+ * The parser calls this method after it finishes parsing the document.
+ */
+ public void flush()
+ throws BadLocationException
+ {
+ }
+
+ /**
+ * Handle HTML comment, present in the given position.
+ * @param comment the comment
+ * @position the position of the comment in the text being parsed.
+ */
+ public void handleComment(char[] comment, int position)
+ {
+ }
+
+ /**
+ * Notifies about the character sequences, used to separate lines in
+ * this document. The parser calls this method after it finishes
+ * parsing the document, but before flush().
+ * @param end_of_line The "end of line sequence", one of: \r or \n or \r\n.
+ */
+ public void handleEndOfLineString(String end_of_line)
+ {
+ }
+
+ /**
+ * The method is called when the HTML closing tag ((like &lt;/table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param The tag being handled
+ * @position the tag position in the text being parsed.
+ */
+ public void handleEndTag(HTML.Tag tag, int position)
+ {
+ }
+
+ /**
+ * Handle the error.
+ * @param message The message, explaining the error.
+ * @param position The starting position of the fragment that has caused
+ * the error in the html document being parsed.
+ */
+ public void handleError(String message, int position)
+ {
+ }
+
+ /**
+ * Handle the tag with no content, like &lt;br&gt;. The method is
+ * called for the elements that, in accordance with the current DTD,
+ * has an empty content.
+ * @param tag The tag being handled.
+ * @param position The tag position in the text being parsed.
+ */
+ public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes,
+ int position
+ )
+ {
+ }
+
+ /**
+ * The method is called when the HTML opening tag ((like &lt;table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param tag The tag being handled
+ * @param position The tag position in the text bein parsed
+ */
+ public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes,
+ int position
+ )
+ {
+ }
+
+ /**
+ * Handle the text section.
+ * @param text A section text.
+ * @param position The text position in the HTML document text being parsed.
+ */
+ public void handleText(char[] text, int position)
+ {
+ }
+ }
+}
diff --git a/libjava/javax/swing/text/html/HTMLFrameHyperlinkEvent.java b/libjava/javax/swing/text/html/HTMLFrameHyperlinkEvent.java
new file mode 100644
index 00000000000..82de2a80355
--- /dev/null
+++ b/libjava/javax/swing/text/html/HTMLFrameHyperlinkEvent.java
@@ -0,0 +1,132 @@
+/* HTMLFrameHyperlinkEvent.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html;
+
+import java.net.URL;
+
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkEvent.EventType;
+import javax.swing.text.Element;
+
+/**
+ * HTMLFrameHyperlinkEvent transfers information about the link that was
+ * activated in a frame.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class HTMLFrameHyperlinkEvent
+ extends HyperlinkEvent
+{
+ private final String target_frame;
+
+ /**
+ * Creates a new hypertext link event.
+ *
+ * @param source The object this link is associated to.
+ * @param type The type of event.
+ * @param url The URL this link pointing too.
+ * @param element The element in the document representing the anchor.
+ * @param frame - the Frame to display the document in.
+ */
+ public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
+ Element element, String frame)
+ {
+ super(source, type, url, frame, element);
+ target_frame = frame;
+ }
+
+ /**
+ * Creates a new hypertext link event.
+ *
+ * @param source The object this link is associated to.
+ * @param type The type of event.
+ * @param url The URL this link pointing too.
+ * @param frame - the Frame to display the document in.
+ */
+ public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
+ String frame)
+ {
+ super(source, type, url, frame);
+ target_frame = frame;
+ }
+
+ /**
+ * Creates a new hypertext link event.
+ *
+ * @param source The object this link is associated to.
+ * @param type The type of event.
+ * @param url The URL this link pointing too.
+ * @param description The description for this link.
+ * @param element The element in the document representing the anchor.
+ * @param frame - the Frame to display the document in.
+ */
+ public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
+ String description, Element element,
+ String frame)
+ {
+ super(source, type, url, description, element);
+ target_frame = frame;
+ }
+
+ /**
+ * Creates a new hypertext link event.
+ *
+ * @param source The object this link is associated to.
+ * @param type The type of event.
+ * @param url The URL this link pointing too.
+ * @param description The description for this link.
+ * @param frame - the Frame to display the document in.
+ */
+ public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
+ String description, String frame)
+ {
+ super(source, type, url, description);
+ target_frame = frame;
+ }
+
+ /**
+ * Gets the string, passed as the target frame identifier.
+ *
+ * @return the target for the link.
+ */
+ public String getTarget()
+ {
+ return target_frame;
+ }
+}
diff --git a/libjava/javax/swing/text/html/parser/AttributeList.java b/libjava/javax/swing/text/html/parser/AttributeList.java
new file mode 100755
index 00000000000..c74f35953ab
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/AttributeList.java
@@ -0,0 +1,294 @@
+/* AttributeList.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import gnu.javax.swing.text.html.parser.support.gnuStringIntMapper;
+
+import java.io.Serializable;
+
+import java.util.Enumeration;
+import java.util.Vector;
+
+/**
+ * <p>
+ * Stores the attribute information, obtained by parsing SGML (DTD) tag
+ * <code>&lt;!ATTLIST .. &gt;</code></p>
+ * <p>
+ * Elements can have a associated named properties (attributes) having the
+ * assigned values. The element start tag can have any number of attribute
+ * value pairs, separated by spaces. They can appear in any order.
+ * SGML requires you to delimit the attribute values using either double (")
+ * or single (') quotation marks. In HTML, it is possible
+ * (but not recommended) to specify the value of an attribute without
+ * quotation marks. Such attribute value may only contain
+ * letters, digits, hyphens (-) and periods (.) .
+ * </p>
+ * <p>
+ * The <code>AttributeList</code> defines a single attribute that additionally
+ * has a pointer referencing the possible subsequent attribute.
+ * The whole structure is just a simple linked list, storing all attributes of
+ * some <code>Element</code>.
+ * Use the <code>getNext()</code> method repeatedly to see all attributes in
+ * the list.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class AttributeList
+ implements DTDConstants, Serializable
+{
+ /** Maps between type names and they string values. */
+ private static final gnuStringIntMapper mapper =
+ new gnuStringIntMapper()
+ {
+ protected void create()
+ {
+ add("CDATA", DTDConstants.CDATA);
+ add("ENTITY", DTDConstants.ENTITY);
+ add("ENTITIES", DTDConstants.ENTITIES);
+ add("ID", DTDConstants.ID);
+ add("IDREF", DTDConstants.IDREF);
+ add("IDREFS", DTDConstants.IDREFS);
+ add("NAME", DTDConstants.NAME);
+ add("NAMES", DTDConstants.NAMES);
+ add("NMTOKEN", DTDConstants.NMTOKEN);
+ add("NMTOKENS", DTDConstants.NMTOKENS);
+ add("NOTATION", DTDConstants.NOTATION);
+ add("NUMBER", DTDConstants.NUMBER);
+ add("NUMBERS", DTDConstants.NUMBERS);
+ add("NUTOKEN", DTDConstants.NUTOKEN);
+ add("NUTOKENS", DTDConstants.NUTOKENS);
+ }
+ };
+
+ /** Use serialVersionUID for interoperability. */
+ private static final long serialVersionUID = -1361214058742015233L;
+
+ /**
+ * The value of ( = pointer to ) the next attribute in the linked list,
+ * storing all attributes of some Element. Contains null for the
+ * last attribute.
+ */
+ public AttributeList next;
+
+ /**
+ * The name of the attribute. The attribute names are case insensitive.
+ */
+ public String name;
+
+ /**
+ * The default value of this attribute. Equals to null if no default value
+ * is specified.
+ */
+ public String value;
+
+ /**
+ * The explicit set of the allowed values of this attribute. Equals to
+ * null, if this parameter was not specified.
+ * Values, defined in DTD, are case insensitive.
+ */
+ public Vector values;
+
+ /**
+ * The modifier of this attribute. This field contains one of the
+ * following DTD constants:
+ * <ul>
+ * <li> REQUIRED if the attribute value is always required,</li>
+ * <li> IMPLIED if the user agent must supply the default value itself,</li>
+ * <li> FIXED if the attribute value is fixed to some value and cannot
+ * be changed.</li>
+ * <li> DEFAULT if the attribute default value has been supplied.</li>
+ * <li> CURRENT the value that at any point in the document is
+ * the last value supplied for that element. A value is required to be
+ * supplied for the first* occurrence of an element</li>
+ * <li> CONREF specifies the IDREF value of
+ * the reference to content in another location of the document.
+ * The element with this attribute is empty, the content from
+ * that another location must be used instead.</li>
+ * </ul>
+ */
+ public int modifier;
+
+ /**
+ * The type of the attribute. The possible values of this field
+ * (NUMBER, NAME, ID, CDATA and so on) are defined in DTDConstants.
+ */
+ public int type;
+
+ /**
+ * Creates the attribute with the given name, initializing other fields
+ * to the default values ( 0 and null ).
+ *
+ * @param a_name The name of the attribute.
+ */
+ public AttributeList(String a_name)
+ {
+ name = a_name;
+ }
+
+ /**
+ * Creates the attribute with the given properties.
+ * @param a_name The name of the attribute
+ * @param a_type The type of the attribute. The possible values are defined
+ * in <code> DTDConstants</code>.
+ * @param a_modifier The modifier of this attribute. The possible values
+ * are defined in <code> DTDConstants</code>.
+ * @param a_default The default value of this attribute
+ * @param allowed_values The explicit set of the allowed values of
+ * this attribute
+ * @param a_next The value of the subsequent instance of the AttributeList,
+ * representing the next attribute definition for the same element.
+ * Equals to null for the last attribute definition.
+ */
+ public AttributeList(String a_name, int a_type, int a_modifier,
+ String a_default, Vector allowed_values,
+ AttributeList a_next
+ )
+ {
+ this(a_name);
+ type = a_type;
+ modifier = a_modifier;
+ value = a_default;
+ values = allowed_values;
+ next = a_next;
+ }
+
+ /**
+ * Get the modifier of this attribute. This field contains one of the
+ * following DTD constants:
+ * <ul>
+ * <li> REQUIRED if the attribute value is always required,</li>
+ * <li> IMPLIED if the user agent must supply the default value itself,</li>
+ * <li> FIXED if the attribute value is fixed to some value and cannot
+ * be changed.</li>
+ * <li> DEFAULT if the attribute default value has been supplied.</li>
+ * <li> CURRENT the value that at any point in the document is
+ * the last value supplied for that element. A value is required to be
+ * supplied for the first* occurrence of an element</li>
+ * <li> CONREF specifies the IDREF value of
+ * the reference to content in another location of the document.
+ * The element with this attribute is empty, the content from
+ * that another location must be used instead.</li>
+ * </ul>
+ */
+ public int getModifier()
+ {
+ return modifier;
+ }
+
+ /**
+ * Get the name of the attribute.
+ * The value is returned as it was supplied to a
+ * constructor, preserving the character case.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Get the value of ( = pointer to ) the next attribute in the linked list,
+ * storing all attributes of some Element. Contains null for the
+ * last attribute.
+ */
+ public AttributeList getNext()
+ {
+ return next;
+ }
+
+ /**
+ * Get the type of the attribute. The possible values of this field
+ * (NUMBER, NAME, ID, CDATA and so on) are defined in DTDConstants.
+ */
+ public int getType()
+ {
+ return type;
+ }
+
+ /**
+ * Get the default value of this attribute.
+ */
+ public String getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Get the allowed values of this attribute.
+ */
+ public Enumeration getValues()
+ {
+ return values.elements();
+ }
+
+ /**
+ * Converts a string value, representing a valid SGLM attribute type,
+ * into the corresponding value, defined in DTDConstants.
+ * @param typeName the name of the type (character case is ignored).
+ * @return a value from DTDConstants or DTDConstants.ANY if the
+ * string is not representing a known type. The known attribute types
+ * in this implementation are CDATA, ENTITY, ENTITIES, ID, IDREF, IDREFS,
+ * NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN and
+ * NUTOKENS.
+ * @throws NullPointerException if the passed parameter is null.
+ */
+ public static int name2type(String typeName)
+ {
+ return mapper.get(typeName.toUpperCase());
+ }
+
+ /**
+ * Returns the attribute name.
+ */
+ public String toString()
+ {
+ return name;
+ }
+
+ /**
+ * Converts a value from DTDConstants into the string representation.
+ * @param type - an integer value of the public static integer field,
+ * defined in the DTDConstants class.
+ * @return a corresponding SGML DTD keyword (UPPERCASE) or null if there
+ * are no attribute type constant having the given value.
+ */
+ public static String type2name(int type)
+ {
+ return mapper.get(type);
+ }
+}
diff --git a/libjava/javax/swing/text/html/parser/ContentModel.java b/libjava/javax/swing/text/html/parser/ContentModel.java
new file mode 100755
index 00000000000..7c8ff35a250
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/ContentModel.java
@@ -0,0 +1,218 @@
+/* ContentModel.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import gnu.javax.swing.text.html.parser.models.transformer;
+
+import java.io.Serializable;
+
+import java.util.Vector;
+
+/**
+ * A representation of the element content. The instances of this class
+ * can be arranged into the linked list, representing a BNF expression.
+ * The content model is constructed as a branched tree structure in the
+ * following way:
+ * <pre>
+ * a = new ContentModel('+', A, null); // a reprensents A+
+ * b = new ContentModel('&amp;', B, a); // b represents B &amp; A+
+ * c = new ContentModel('*', b, null); // c represents ( B &amp; A+) *
+ * d = new ContentModel('|', new ContentModel('*', A, null),
+ * new ContentModel('?', B, null)); // d represents ( A* | B? )
+ * </pre>
+ * where the valid operations are:
+ * <ul>
+ * <li><code>E* </code> E occurs zero or more times</li>
+ * <li><code>E+ </code> E occurs one or more times</li>
+ * <li><code>E? </code> E occurs once or not atl all</li>
+ * <li><code>A,B</code> A occurs before B</li>
+ * <li><code>A|B</code> both A and B are permitted in any order.
+ * The '|' alone does not permit the repetetive occurence of A or B
+ * (use <code>(A|B)*</code>.</li>
+ * <li><code>A&amp;B</code> both A and B must occur once (in any order)</li>
+ * </ul>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ContentModel
+ implements Serializable
+{
+ /** Use serialVersionUID for interoperability. */
+ private static final long serialVersionUID = -1130825523866321257L;
+
+ /**
+ * The next content model model ( = pointer to the next element of
+ * the linked list) for the binary expression (',','&amp;' or '|'). Null
+ * for the last element in the list.
+ */
+ public ContentModel next;
+
+ /**
+ * The document content, containing either Element or the enclosed
+ * content model (that would be in the parentheses in BNF expression).
+ */
+ public Object content;
+
+ /**
+ * Specifies the BNF operation between this node and the node,
+ * stored in the field <code>next</code> (or for this node, if it is
+ * an unary operation.
+ */
+ public int type;
+
+ /** Create a content model initializing all fields to default values. */
+ public ContentModel()
+ {
+ }
+
+ /**
+ * Create a content model, consisting of the single element.
+ * Examples:
+ *<code>
+ * a = new ContentModel('+', A, null); // a reprensents A+
+ * b = new ContentModel('&amp;', B, a); // b represents B &amp; A+
+ * c = new ContentModel('*', b, null); // c represents ( B &amp; A+) *
+ * d = new ContentModel('|', A,
+ * new ContentModel('?',b, null);
+ * // d represents
+ * </code>
+ */
+ public ContentModel(Element a_content)
+ {
+ content = a_content;
+ }
+
+ /**
+ * Create a content model, involving expression of the given type.
+ * @param a_type The expression operation type ('*','?' or '+'
+ * @param a_content The content for that the expression is applied.
+ */
+ public ContentModel(int a_type, ContentModel a_content)
+ {
+ content = a_content;
+ type = a_type;
+ }
+
+ /**
+ * Create a content model, involving binary expression of the given type.
+ * @param a_type The expression operation type ( ',', '|' or '&amp;').
+ * @param a_content The content of the left part of the expression.
+ * @param a_next The content model, representing the right part of the
+ * expression.
+ */
+ public ContentModel(int a_type, Object a_content, ContentModel a_next)
+ {
+ content = a_content;
+ type = a_type;
+ next = a_next;
+ }
+
+ /**
+ * Adds all list elements to the given vector, ignoring the
+ * operations between the elements. The old vector values are not
+ * discarded.
+ * @param elements - a vector to add the values to.
+ */
+ public void getElements(Vector elements)
+ {
+ ContentModel c = this;
+
+ while (c != null)
+ {
+ elements.add(c.content);
+ c = c.next;
+ }
+ }
+
+ /**
+ * Checks if the content model matches an empty input stream.
+ * The empty content is created using SGML DTD keyword EMPTY.
+ * The empty model is a model with the content field equal to null.
+ *
+ * @return true if the content field is equal to null.
+ */
+ public boolean empty()
+ {
+ return content == null;
+ }
+
+ /**
+ * Get the element, stored in the <code>next.content</code>.
+ * The method is programmed as the part of the standard API, but not
+ * used in this implementation.
+ * @return the value of the field <code>next</code>.
+ */
+ public Element first()
+ {
+ return (Element) next.content;
+ }
+
+ /**
+ * Checks if this object can potentially be the first token in the
+ * ContenModel list. The method is programmed as the part of the
+ * standard API, but not used in this implementation.
+ */
+ public boolean first(Object token)
+ {
+ ContentModel c = this;
+ while (c.next != null)
+ {
+ if (c.content != null && c.content.toString().equals(token.toString()) &&
+ c.type != ','
+ )
+
+ // Agree if the operation with the preceeding element
+ // is not the comma operation.
+ return true;
+ c = c.next;
+ }
+ return false;
+ }
+
+ /**
+ * Returns a string representation (an expression) of this content model.
+ * The expression has BNF-like syntax, except the absence of the
+ * unary operator is additionally indicated by " ' ". It is
+ * advisable to check the created models for correctness using this
+ * method.
+ */
+ public String toString()
+ {
+ return transformer.transform(this).toString();
+ }
+}
diff --git a/libjava/javax/swing/text/html/parser/DTD.java b/libjava/javax/swing/text/html/parser/DTD.java
new file mode 100755
index 00000000000..270c8158f9e
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/DTD.java
@@ -0,0 +1,607 @@
+/* DTD.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.BitSet;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+/**
+ * <p>Representation or the SGML DTD document.
+ * Provides basis for describing a syntax of the
+ * HTML documents. The fields of this class are NOT initialized in
+ * constructor. You need to do this separately before passing this data
+ * structure to the HTML parser. The subclasses with the fields, pre-
+ * initialized, for example, for HTML 4.01, can be available only between
+ * the implementation specific classes
+ * ( for example, {@link gnu.javax.swing.text.html.parser.HTML_401F }
+ * in this implementation).</p>
+ * <p>
+ * If you need more information about SGML DTD documents,
+ * the author suggests to read SGML tutorial on
+ * {@link http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html}.
+ * We also recommend Goldfarb C.F (1991) <i>The SGML Handbook</i>,
+ * Oxford University Press, 688 p, ISBN: 0198537379.
+ * </p>
+ * <p>
+ * Warning: the html, head and other tag fields will only be automatically
+ * assigned if the VM has the correctly implemented reflection mechanism.
+ * As these fields are not used anywhere in the implementation, not
+ * exception will be thrown in the opposite case.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class DTD
+ implements DTDConstants
+{
+ /**
+ * The version of the persistent data format.
+ */
+ public static int FILE_VERSION = 1;
+
+ /**
+ * The table of existing available DTDs.
+ */
+ static Hashtable dtdHash = new Hashtable();
+
+ /**
+ * The applet element for this DTD.
+ */
+ public Element applet;
+
+ /**
+ * The base element for this DTD.
+ */
+ public Element base;
+
+ /**
+ * The body element for this DTD.
+ */
+ public Element body;
+
+ /**
+ * The head element for this DTD.
+ */
+ public Element head;
+
+ /**
+ * The html element for this DTD.
+ */
+ public Element html;
+
+ /**
+ * The isindex element of for this DTD.
+ */
+ public Element isindex;
+
+ /**
+ * The meta element for this DTD.
+ */
+ public Element meta;
+
+ /**
+ * The p element for this DTD.
+ */
+ public Element p;
+
+ /**
+ * The param element for this DTD.
+ */
+ public Element param;
+
+ /**
+ * The pcdata for this DTD.
+ */
+ public Element pcdata;
+
+ /**
+ * The title element for this DTD.
+ */
+ public Element title;
+
+ /**
+ * The element for accessing all DTD elements by name.
+ */
+ public Hashtable elementHash = new Hashtable();
+
+ /**
+ * The entity table for accessing all DTD entities by name.
+ */
+ public Hashtable entityHash = new Hashtable();
+
+ /**
+ * The name of this DTD.
+ */
+ public String name;
+
+ /**
+ * Contains all elements in this DTD. The
+ * javax.swing.text.html.parser.Element#index field of all elements
+ * in this vector is set to the element position in this vector.
+ */
+ public Vector elements = new Vector();
+
+ /** Create a new DTD with the specified name. */
+ protected DTD(String a_name)
+ {
+ name = a_name;
+ }
+
+ /** Get this DTD by name. The current implementation
+ * only looks in the internal table of DTD documents. If no corresponding
+ * entry is found, the new entry is created, placed into
+ * the table and returned. */
+ public static DTD getDTD(String name)
+ throws IOException
+ {
+ DTD d = (DTD) dtdHash.get(name);
+
+ if (d == null)
+ {
+ d = new DTD(name);
+ dtdHash.put(d.name, d);
+ }
+
+ return d;
+ }
+
+ /**
+ * Get the element by the element name. If the element is not yet
+ * defined, it is newly created and placed into the element table.
+ * If the element name matches (ingoring case) a public non static
+ * element field in this class, this field is assigned to the value
+ * of the newly created element.
+ */
+ public Element getElement(String element_name)
+ {
+ return newElement(element_name);
+ }
+
+ /**
+ * Get the element by the value of its
+ * {@link javax.swing.text.html.parser.Element#index} field.
+ */
+ public Element getElement(int index)
+ {
+ return (Element) elements.get(index);
+ }
+
+ /**
+ * Get the entity with the given identifier.
+ * @param id that can be returned by
+ * {@link javax.swing.text.html.parser.Entity#name2type(String an_entity)}
+ * @return The entity from this DTD or null if there is no entity with
+ * such id or such entity is not present in the table of this instance.
+ */
+ public Entity getEntity(int id)
+ {
+ String name = Entity.mapper.get(id);
+
+ if (name != null)
+ return (Entity) entityHash.get(name);
+ else
+ return null;
+ }
+
+ /**
+ * Get the named entity by its name.
+ */
+ public Entity getEntity(String entity_name)
+ {
+ return (Entity) entityHash.get(entity_name);
+ }
+
+ /**
+ * Get the name of this instance of DTD
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Creates, adds into the entity table and returns the
+ * character entity like <code>&amp;lt;</code>
+ * (means '<code>&lt;</code>' );
+ * @param name The entity name (without heading &amp; and closing ;)
+ * @param type The entity type
+ * @param character The entity value (single character)
+ * @return The created entity
+ */
+ public Entity defEntity(String name, int type, int character)
+ {
+ Entity e = newEntity(name, type);
+ e.data = new char[] { (char) character };
+ return e;
+ }
+
+ /**
+ * Define the attributes for the element with the given name.
+ * If the element is not exist, it is created.
+ * @param forElement
+ * @param attributes
+ */
+ public void defineAttributes(String forElement, AttributeList attributes)
+ {
+ Element e = (Element) elementHash.get(forElement.toLowerCase());
+
+ if (e == null)
+ e = newElement(forElement);
+
+ e.atts = attributes;
+ }
+
+ /**
+ * Defines the element and adds it to the element table. Sets the
+ * <code>Element.index</code> field to the value, unique for this
+ * instance of DTD. If the element with the given name already exists,
+ * replaces all other its settings by the method argument values.
+ * @param name the name of the element
+ * @param type the type of the element
+ * @param headless true if the element needs no starting tag
+ * (should not occur in HTML).
+ * @param tailless true if the element needs no ending tag (like
+ * <code>&lt;hr&gt;</code>
+ * @param content the element content
+ * @param exclusions the set of elements that must not occur inside
+ * this element. The <code>Element.index</code> value defines which
+ * bit in this bitset corresponds to that element.
+ * @param inclusions the set of elements that can occur inside this
+ * element. the <code>Element.index</code> value defines which
+ * bit in this bitset corresponds to that element.
+ * @param attributes the element attributes.
+ * @return the newly defined element.
+ */
+ public Element defineElement(String name, int type, boolean headless,
+ boolean tailless, ContentModel content,
+ BitSet exclusions, BitSet inclusions,
+ AttributeList attributes
+ )
+ {
+ Element e = newElement(name);
+ e.type = type;
+ e.oStart = headless;
+ e.oEnd = tailless;
+ e.content = content;
+ e.exclusions = exclusions;
+ e.inclusions = inclusions;
+ e.atts = attributes;
+
+ return e;
+ }
+
+ /**
+ * Creates, intializes and adds to the entity table the new
+ * entity.
+ * @param name the name of the entity
+ * @param type the type of the entity
+ * @param data the data section of the entity
+ * @return the created entity
+ */
+ public Entity defineEntity(String name, int type, char[] data)
+ {
+ Entity e = newEntity(name, type);
+ e.data = data;
+
+ return e;
+ }
+
+ /** Place this DTD into the DTD table. */
+ public static void putDTDHash(String name, DTD dtd)
+ {
+ dtdHash.put(name, dtd);
+ }
+
+ /**
+ * <p>Reads DTD from an archived format. This format is not standardized
+ * and differs between implementations.</p><p> This implementation
+ * reads and defines all entities and elements using
+ * ObjectInputStream. The elements and entities can be written into the
+ * stream in any order. The objects other than elements and entities
+ * are ignored.</p>
+ * @param stream A data stream to read from.
+ * @throws java.io.IOException If one is thrown by the input stream
+ */
+ public void read(DataInputStream stream)
+ throws java.io.IOException
+ {
+ ObjectInputStream oi = new ObjectInputStream(stream);
+ Object def;
+ try
+ {
+ while (true)
+ {
+ def = oi.readObject();
+ if (def instanceof Element)
+ {
+ Element e = (Element) def;
+ elementHash.put(e.name.toLowerCase(), e);
+ assignField(e);
+ }
+ else if (def instanceof Entity)
+ {
+ Entity e = (Entity) def;
+ entityHash.put(e.name, e);
+ }
+ }
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new IOException(ex.getMessage());
+ }
+ catch (EOFException ex)
+ {
+ // ok EOF
+ }
+ }
+
+ /**
+ * Returns the name of this instance of DTD.
+ */
+ public String toString()
+ {
+ return name;
+ }
+
+ /**
+ * Creates and returns new attribute (not an attribute list).
+ * @param name the name of this attribute
+ * @param type the type of this attribute (FIXED, IMPLIED or
+ * REQUIRED from <code>DTDConstants</code>).
+ * @param modifier the modifier of this attribute
+ * @param default_value the default value of this attribute
+ * @param allowed_values the allowed values of this attribute. The multiple
+ * possible values in this parameter are supposed to be separated by
+ * '|', same as in SGML DTD <code>&lt;!ATTLIST </code>tag. This parameter
+ * can be null if no list of allowed values is specified.
+ * @param atts the previous attribute of this element. This is
+ * placed to the field
+ * {@link javax.swing.text.html.parser.AttributeList#next },
+ * creating a linked list.
+ * @return
+ */
+ protected AttributeList defAttributeList(String name, int type, int modifier,
+ String default_value,
+ String allowed_values,
+ AttributeList atts
+ )
+ {
+ AttributeList al = new AttributeList(name);
+ al.modifier = modifier;
+ al.value = default_value;
+ al.next = atts;
+
+ if (allowed_values != null)
+ {
+ StringTokenizer st = new StringTokenizer(allowed_values, " \t|");
+ Vector v = new Vector(st.countTokens());
+
+ while (st.hasMoreTokens())
+ v.add(st.nextToken());
+
+ al.values = v;
+ }
+
+ return al;
+ }
+
+ /**
+ * Creates a new content model.
+ * @param type specifies the BNF operation for this content model.
+ * The valid operations are documented in the
+ * {@link javax.swing.text.html.parser.ContentModel#type }.
+ * @param content the content of this content model
+ * @param next if the content model is specified by BNF-like
+ * expression, contains the rest of this expression.
+ * @return The newly created content model.
+ */
+ protected ContentModel defContentModel(int type, Object content,
+ ContentModel next
+ )
+ {
+ ContentModel model = new ContentModel();
+ model.type = type;
+ model.next = next;
+ model.content = content;
+
+ return model;
+ }
+
+ /**
+ * Defines a new element and adds it to the element table.
+ * If the element alredy exists,
+ * overrides it settings with the specified values.
+ * @param name the name of the new element
+ * @param type the type of the element
+ * @param headless true if the element needs no starting tag
+ * @param tailless true if the element needs no closing tag
+ * @param content the element content.
+ * @param exclusions the elements that must be excluded from the
+ * content of this element, in all levels of the hierarchy.
+ * @param inclusions the elements that can be included as the
+ * content of this element.
+ * @param attributes the element attributes.
+ * @return the created or updated element.
+ */
+ protected Element defElement(String name, int type, boolean headless,
+ boolean tailless, ContentModel content,
+ String[] exclusions, String[] inclusions,
+ AttributeList attributes
+ )
+ {
+ // compute the bit sets
+ BitSet exclude = bitSet(exclusions);
+ BitSet include = bitSet(inclusions);
+
+ Element e =
+ defineElement(name, type, headless, tailless, content, exclude, include,
+ attributes
+ );
+
+ return e;
+ }
+
+ /**
+ * Creates, intializes and adds to the entity table the new
+ * entity.
+ * @param name the name of the entity
+ * @param type the type of the entity
+ * @param data the data section of the entity
+ * @return the created entity
+ */
+ protected Entity defEntity(String name, int type, String data)
+ {
+ Entity e = newEntity(name, type);
+ e.data = data.toCharArray();
+
+ return e;
+ }
+
+ private void assignField(Element e)
+ {
+ String element_name = e.name;
+ try
+ {
+ // Assign the field via reflection.
+ Field f = getClass().getField(element_name.toLowerCase());
+ if ((f.getModifiers() & Modifier.PUBLIC) != 0)
+ if ((f.getModifiers() & Modifier.STATIC) == 0)
+ if (f.getType().isAssignableFrom(e.getClass()))
+ f.set(this, e);
+ }
+ catch (IllegalAccessException ex)
+ {
+ unexpected(ex);
+ }
+ catch (NoSuchFieldException ex)
+ {
+ // This is ok.
+ }
+
+ // Some virtual machines may still lack the proper
+ // implementation of reflection. As the tag fields
+ // are not used anywhere in this implementation,
+ // (and this class is also rarely used by the end user),
+ // it may be better not to crash everything by throwing an error
+ // for each case when the HTML parsing is required.
+ catch (Throwable t)
+ {
+ // This VM has no reflection mechanism implemented!
+ if (t instanceof OutOfMemoryError)
+ throw (Error) t;
+ }
+ }
+
+ /**
+ * Create the bit set for this array of elements.
+ * The unknown elements are automatically defined and added
+ * to the element table.
+ * @param elements
+ * @return
+ */
+ private BitSet bitSet(String[] elements)
+ {
+ BitSet b = new BitSet();
+
+ for (int i = 0; i < elements.length; i++)
+ {
+ Element e = getElement(elements [ i ]);
+
+ if (e == null)
+ e = newElement(elements [ i ]);
+
+ b.set(e.index);
+ }
+
+ return b;
+ }
+
+ /**
+ * Find the element with the given name in the element table.
+ * If not find, create a new element with this name and add to the
+ * table.
+ * @param name the name of the element
+ * @return the found or created element.
+ */
+ private Element newElement(String name)
+ {
+ Element e = (Element) elementHash.get(name.toLowerCase());
+
+ if (e == null)
+ {
+ e = new Element();
+ e.name = name;
+ e.index = elements.size();
+ elements.add(e);
+ elementHash.put(e.name.toLowerCase(), e);
+ assignField(e);
+ }
+ return e;
+ }
+
+ /**
+ * Creates and adds to the element table the entity with an
+ * unitialized data section. Used internally.
+ * @param name the name of the entity
+ * @param type the type of the entity, a bitwise combination
+ * of GENERAL, PARAMETER, SYSTEM and PUBLIC.
+ * @throws an error if the parameter is both GENERAL and PARAMETER
+ * of both PUBLIC and SYSTEM.
+ * @return the created entity
+ */
+ private Entity newEntity(String name, int type)
+ {
+ Entity e = new Entity(name, type, null);
+ entityHash.put(e.name, e);
+ return e;
+ }
+
+ private void unexpected(Exception ex)
+ {
+ throw new Error("This should never happen, report a bug", ex);
+ }
+}
diff --git a/libjava/javax/swing/text/html/parser/DTDConstants.java b/libjava/javax/swing/text/html/parser/DTDConstants.java
new file mode 100755
index 00000000000..29218c25d7e
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/DTDConstants.java
@@ -0,0 +1,290 @@
+/* DTDConstants.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+/**
+ * <p>This class defines the SGML basic types, used for describing HTML 4.01
+ * at {@link http://www.w3.org/TR/html4/types.html }. Not all constants,
+ * defined here, are actually used in HTML 4.01 SGML specification. Some others
+ * are defined just as part of the required implementation.
+ * </p>
+ * <p>
+ * If you need more information about SGML DTD documents,
+ * the author suggests to read SGML tutorial on
+ * {@link http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html}.
+ * We also recommend Goldfarb C.F (1991) <i>The SGML Handbook</i>,
+ * Oxford University Press, 688 p, ISBN: 0198537379.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DTDConstants
+{
+ /* ----- The data types, used in HTML 4.01 SGML definition: ---- */
+
+ /**
+ * The CDATA (Character data) constant, specifes the content model,
+ * consisting of characters only. In SGML for HTML 4.01, the character
+ * entities must be replaced by characters, the line feeds must be
+ * ignored and any number of the subsequent carriage returns or tabs
+ * must be replaced by a single space.
+ */
+ int CDATA = 1;
+
+ /**
+ * The EMPTY constant, means the element with no content.
+ */
+ int EMPTY = 17;
+
+ /**
+ * The ID constant, means that the token is the unique identifier.
+ * This identifier can be referenced by attribute with value of IDREF.
+ * The identifier must begin with letter, followed by any number of
+ * letters, digits, hyphens, underscores, colons and periods.
+ */
+ int ID = 4;
+
+ /**
+ * The IDREF constant, specifies reference to a valid ID within
+ * the document.
+ */
+ int IDREF = 5;
+
+ /**
+ * The IDREFS constant, a space separated list of IDREFs
+ */
+ int IDREFS = 6;
+
+ /**
+ * The NAME constant, means the token that
+ * must begin with letter, followed by any number of
+ * letters, digits, hyphens, underscores, colons and periods.
+ */
+ int NAME = 7;
+
+ /**
+ * The NAMES constant, specifies a space separated of NAMEs.
+ */
+ int NAMES = 8;
+
+ /**
+ * The NMTOKEN constant, specifies the attribute, consisting of
+ * characters that can be either digits or alphabetic characters).
+ */
+ int NMTOKEN = 9;
+
+ /**
+ * The NMTOKENS constant, specifies a list of NMTOKENs.
+ */
+ int NMTOKENS = 10;
+
+ /**
+ * The NOTATION constant, a previously defined data type.
+ */
+ int NOTATION = 11;
+
+ /**
+ * The NUMBER constant (means that the attribute consists of at least
+ * one decimal digit).
+ */
+ int NUMBER = 12;
+
+ /**
+ * The NUMBERS constant, specifies a space separated list of NUMBERs.
+ */
+ int NUMBERS = 13;
+
+ /**
+ * The NUTOKEN constant.
+ */
+ int NUTOKEN = 14;
+
+ /**
+ * The NUTOKENS constant.
+ */
+ int NUTOKENS = 15;
+
+ /* -------
+ The entity scope constants.
+ As these four constants are combined with the bitwise OR,
+ they are defined in the hexadecimal notation.
+ The reason of setting the two bits at once (for PUBLIC and SYSTEM)
+ is probably historical. ----- */
+
+ /**
+ * The PUBLIC constant, specifies the public entity. The PUBLIC entities
+ * are assumed to be known to many systems so that a full declaration
+ * need not be transmitted. For example,
+ * &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;
+ */
+ int PUBLIC = 0xA;
+
+ /**
+ * The SYSTEM constant, specifies the system entitiy. The system entities
+ * are assumed to be known but require the clear identifer
+ * (like the file path), where they can be found in the system.
+ * For example, <code>
+ * &lt;DOCTYPE html SYSTEM "/path/to/file.dtd"&gt; </code>.
+ */
+ int SYSTEM = 0x11;
+
+ /**
+ * The PARAMETER constant, specifies that entity is only valid
+ * inside SGML DTD scope.
+ */
+ int PARAMETER = 0x40000;
+
+ /**
+ * The GENERAL constant, specifies theat the entity is valid in the
+ * whole HTML document scope.
+ */
+ int GENERAL = 0x10000;
+
+ /* ---- The constants, defining if the element attribute is required,
+ fixed or implied. ---- */
+
+ /**
+ * The attribute modifier #REQUIRED constant, indicates that the
+ * value must be supplied.
+ */
+ int REQUIRED = 2;
+
+ /**
+ * The attribute modifier #FIXED constant, means that the attribute has
+ * the fixed value that cannot be changed.
+ */
+ int FIXED = 1;
+
+ /**
+ * The attribute modifier #IMPLIED constant,
+ * indicating that for this attribute the user agent must provide
+ * the value itself.
+ */
+ int IMPLIED = 5;
+
+ /**
+ * The attribute modifier #CURRENT constant, specifies the value
+ * that at any point in the document is the last value supplied for
+ * that element. A value is required to be supplied for the first
+ * occurrence of an element
+ */
+ int CURRENT = 3;
+
+ /**
+ * The attribute modifier #CONREF constant, specifies the IDREF value of
+ * the reference to content in another location of the document.
+ * The element with this attribute is empty, the content from
+ * that another location must be used instead.
+ */
+ int CONREF = 4;
+
+ /* ----- Constants, defining if the element
+ start and end tags are required. ---- */
+
+ /**
+ * The STARTTAG, meaning that the element needs a starting tag.
+ */
+ int STARTTAG = 13;
+
+ /**
+ * The ENDTAG constant, meaning that the element needs a closing tag.
+ */
+ int ENDTAG = 14;
+
+ /* ----- Other constants: ----- */
+
+ /**
+ * The ANY constant, specifies
+ * an attribute, consisting from arbitrary characters.
+ */
+ int ANY = 19;
+
+ /**
+ * The DEFAULT constant, specifies the default value.
+ */
+ int DEFAULT = 131072;
+
+ /**
+ * The ENTITIES constant (list of ENTITYes)
+ */
+ int ENTITIES = 3;
+
+ /**
+ * The ENTITY constant, meaning the numeric or symbolic name of some
+ * HTML data.
+ */
+ int ENTITY = 2;
+
+ /**
+ * The MD constant.
+ */
+ int MD = 16;
+
+ /**
+ * The MODEL constant.
+ */
+ int MODEL = 18;
+
+ /**
+ * The MS constant.
+ */
+ int MS = 15;
+
+ /**
+ * The PI (Processing Instruction) constant, specifies a processing
+ * instruction. Processing instructions are used to embed information
+ * intended for specific applications.
+ */
+ int PI = 12;
+
+ /**
+ * The RCDATA constant (Entity References and Character Data), specifies
+ * the content model, consisting of characters AND entities. The
+ * "&lt;" is threated as an ordinary character, but
+ * "<code>&amp;name;</code>" still means the general entity with
+ * the given name.
+ */
+ int RCDATA = 16;
+
+ /**
+ * The SDATA constant. Means that the value contains the entity name
+ * and the replacement value of a character entity reference.
+ */
+ int SDATA = 11;
+}
diff --git a/libjava/javax/swing/text/html/parser/DocumentParser.java b/libjava/javax/swing/text/html/parser/DocumentParser.java
new file mode 100644
index 00000000000..f210d4f8804
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/DocumentParser.java
@@ -0,0 +1,261 @@
+/* DocumentParser.java -- A parser for HTML documents.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import gnu.javax.swing.text.html.parser.htmlAttributeSet;
+import javax.swing.text.html.parser.Parser;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.html.HTMLEditorKit;
+
+/**
+ * <p>A simple error-tolerant HTML parser that uses a DTD document
+ * to access data on the possible tokens, arguments and syntax.</p>
+ * <p> The parser reads an HTML content from a Reader and calls various
+ * notifying methods (which should be overridden in a subclass)
+ * when tags or data are encountered.</p>
+ * <p>Some HTML elements need no opening or closing tags. The
+ * task of this parser is to invoke the tag handling methods also when
+ * the tags are not explicitly specified and must be supposed using
+ * information, stored in the DTD.
+ * For example, parsing the document
+ * <p>&lt;table&gt;&lt;tr&gt;&lt;td&gt;a&lt;td&gt;b&lt;td&gt;c&lt;/tr&gt; <br>
+ * will invoke exactly the handling methods exactly in the same order
+ * (and with the same parameters) as if parsing the document: <br>
+ * <em>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;table&gt;&lt;
+ * tbody&gt;</em>&lt;tr&gt;&lt;td&gt;a<em>&lt;/td&gt;</em>&lt;td&gt;b<em>
+ * &lt;/td&gt;</em>&lt;td&gt;c<em>&lt;/td&gt;&lt;/tr&gt;</em>&lt;
+ * <em>/tbody&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</em></p>
+ * (supposed tags are given in italics). The parser also supports
+ * obsolete elements of HTML syntax.<p>
+ * </p>
+ * In this implementation, DocumentParser is directly derived from its
+ * ancestor without changes of functionality.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class DocumentParser
+ extends Parser
+ implements DTDConstants
+{
+ /**
+ * The enclosed working parser class.
+ */
+ private class gnuParser
+ extends gnu.javax.swing.text.html.parser.support.Parser
+ {
+ private gnuParser(DTD d)
+ {
+ super(d);
+ }
+
+ protected final void handleComment(char[] comment)
+ {
+ parser.handleComment(comment);
+ callBack.handleComment(comment, hTag.where.startPosition);
+ }
+
+ protected final void handleEmptyTag(TagElement tag)
+ throws javax.swing.text.ChangedCharSetException
+ {
+ parser.handleEmptyTag(tag);
+ callBack.handleSimpleTag(tag.getHTMLTag(), getAttributes(),
+ hTag.where.startPosition
+ );
+ }
+
+ protected final void handleEndTag(TagElement tag)
+ {
+ parser.handleEndTag(tag);
+ callBack.handleEndTag(tag.getHTMLTag(), hTag.where.startPosition);
+ }
+
+ protected final void handleError(int line, String message)
+ {
+ parser.handleError(line, message);
+ callBack.handleError(message, hTag.where.startPosition);
+ }
+
+ protected final void handleStartTag(TagElement tag)
+ {
+ parser.handleStartTag(tag);
+ htmlAttributeSet attributes = gnu.getAttributes();
+
+ if (tag.fictional())
+ attributes.addAttribute(HTMLEditorKit.ParserCallback.IMPLIED,
+ Boolean.TRUE
+ );
+
+ callBack.handleStartTag(tag.getHTMLTag(), attributes,
+ hTag.where.startPosition
+ );
+ }
+
+ protected final void handleText(char[] text)
+ {
+ parser.handleText(text);
+ callBack.handleText(text, hTag.where.startPosition);
+ }
+
+ DTD getDTD()
+ {
+ return dtd;
+ }
+ }
+
+ /**
+ * This field is used to access the identically named
+ * methods of the outer class.
+ * This is package-private to avoid an accessor method.
+ */
+ DocumentParser parser = this;
+
+ /**
+ * The callback.
+ * This is package-private to avoid an accessor method.
+ */
+ HTMLEditorKit.ParserCallback callBack;
+
+ /**
+ * The reference to the working class of HTML parser that is
+ * actually used to parse the document.
+ * This is package-private to avoid an accessor method.
+ */
+ gnuParser gnu;
+
+ /**
+ * Creates a new parser that uses the given DTD to access data on the
+ * possible tokens, arguments and syntax. There is no single - step way
+ * to get a default DTD; you must either refer to the implementation -
+ * specific packages, write your own DTD or obtain the working instance
+ * of parser in other way, for example, by calling
+ * {@link javax.swing.text.html.HTMLEditorKit#getParser() }.
+ * @param a_dtd a DTD to use.
+ */
+ public DocumentParser(DTD a_dtd)
+ {
+ super(a_dtd);
+ gnu = new gnuParser(a_dtd);
+ }
+
+ /**
+ * Parses the HTML document, calling methods of the provided
+ * callback. This method must be multithread - safe.
+ * @param reader The reader to read the HTML document from
+ * @param callback The callback that is notifyed about the presence
+ * of HTML elements in the document.
+ * @param ignoreCharSet If thrue, any charset changes during parsing
+ * are ignored.
+ * @throws java.io.IOException
+ */
+ public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback,
+ boolean ignoreCharSet
+ )
+ throws IOException
+ {
+ callBack = a_callback;
+ gnu.parse(reader);
+
+ callBack.handleEndOfLineString(gnu.getEndOfLineSequence());
+ try
+ {
+ callBack.flush();
+ }
+ catch (BadLocationException ex)
+ {
+ // Convert this into the supported type of exception.
+ throw new IOException(ex.getMessage());
+ }
+ }
+
+ /**
+ * Handle HTML comment. The default method returns without action.
+ * @param comment the comment being handled
+ */
+ protected void handleComment(char[] comment)
+ {
+ }
+
+ /**
+ * Handle the tag with no content, like &lt;br&gt;. The method is
+ * called for the elements that, in accordance with the current DTD,
+ * has an empty content.
+ * @param tag the tag being handled.
+ * @throws javax.swing.text.ChangedCharSetException
+ */
+ protected void handleEmptyTag(TagElement tag)
+ throws javax.swing.text.ChangedCharSetException
+ {
+ }
+
+ /**
+ * The method is called when the HTML closing tag ((like &lt;/table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param The tag being handled
+ */
+ protected void handleEndTag(TagElement tag)
+ {
+ }
+
+ /* Handle error that has occured in the given line. */
+ protected void handleError(int line, String message)
+ {
+ }
+
+ /**
+ * The method is called when the HTML opening tag ((like &lt;table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param The tag being handled
+ */
+ protected void handleStartTag(TagElement tag)
+ {
+ }
+
+ /**
+ * Handle the text section.
+ * @param text a section text.
+ */
+ protected void handleText(char[] text)
+ {
+ }
+}
diff --git a/libjava/javax/swing/text/html/parser/Element.java b/libjava/javax/swing/text/html/parser/Element.java
new file mode 100755
index 00000000000..4f39fbef0ee
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/Element.java
@@ -0,0 +1,317 @@
+/* Element.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import gnu.javax.swing.text.html.parser.support.gnuStringIntMapper;
+
+import java.io.Serializable;
+
+import java.util.BitSet;
+
+/**
+ * <p>
+ * Stores the element information, obtained by parsing SGML DTD
+ * tag <code>&lt;!ELEMENT .. &gt;</code>. This class has no public
+ * constructor and can only be instantiated using the
+ * {@link javax.swing.text.html.parser.DTD } methods</p>
+ *
+ * <p>SGML defines elements that represent structures or
+ * behavior. An element typically consists of a start tag, content, and an
+ * end tag. Hence the elements are not tags. The HTML 4.0 definition specifies
+ * that some elements are not required to have the end tags. Also, some
+ * HTML elements (like <code>&lt;hr&gt;</code>) have no content. Element names
+ * are case sensitive.</p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class Element
+ implements DTDConstants, Serializable
+{
+ /**
+ * Package level mapper between type names and they string values.
+ */
+ static final gnuStringIntMapper mapper =
+ new gnuStringIntMapper()
+ {
+ protected void create()
+ {
+ add("CDATA", DTDConstants.CDATA);
+ add("RCDATA", DTDConstants.RCDATA);
+ add("EMPTY", DTDConstants.EMPTY);
+ add("ANY", DTDConstants.ANY);
+ }
+ };
+
+ /** Use serialVersionUID for interoperability. */
+ private static final long serialVersionUID = -6717939384601675586L;
+
+ /**
+ * The element attributes.
+ */
+ public AttributeList atts;
+
+ /**
+ * Contains refernces to elements that must NOT occur inside this element,
+ * at any level of hierarchy.
+ */
+ public BitSet exclusions;
+
+ /**
+ * Contains refernces to elements that must CAN occur inside this element,
+ * at any level of hierarchy.
+ */
+ public BitSet inclusions;
+
+ /**
+ * The content model, defining elements, entities and DTD text
+ * that may/may not occur inside this element.
+ */
+ public ContentModel content;
+
+ /**
+ * A field to store additional user data for this Element.
+ */
+ public Object data;
+
+ /**
+ * The element name.
+ */
+ public String name;
+
+ /**
+ * True is this element need not to have the closing tag, false
+ * otherwise. The HTML 4.0 definition specifies
+ * that some elements (like <code>&lt;hr&gt;</code>are
+ * not required to have the end tags.
+ */
+ public boolean oEnd;
+
+ /**
+ * True is this element need not to have the starting tag, false
+ * otherwise. The HTML 4.0 definition specifies
+ * that some elements (like <code>&lt;head&gt;</code> or
+ * <code>&lt;body&gt;</code>) are
+ * not required to have the start tags.
+
+ */
+ public boolean oStart;
+
+ /**
+ * This field contains the unique integer identifier of this Element,
+ * used to refer the element (more exactly, the element flag)
+ * in <code>inclusions</code> and <code>exclusions</code> bit set.
+ */
+ public int index;
+
+ /**
+ * The element type, containing value, defined in DTDConstants.
+ * In this implementation, the element type can be
+ * CDATA, RCDATA, EMPTY or ANY.
+ */
+ public int type;
+
+ /**
+ * The default constructor must have package level access in this
+ * class. Use DTD.defineElement(..) to create an element when required.
+ * @todo MAKE THIS PACKAGE in the final version. Now the Parser needs it!
+ */
+ Element()
+ {
+ }
+
+ /**
+ * Converts the string representation of the element type
+ * into its unique integer identifier, defined in DTDConstants.
+ * @param a_type A name of the type
+ * @return DTDConstants.CDATA, DTDConstants.RCDATA, DTDConstants.EMPTY,
+ * DTDConstants.ANY or null if the type name is not
+ * "CDATA", "RCDATA", "EMPTY" or "ANY". This function is case sensitive.
+ * @throws NullPointerException if <code>a_type</code> is null.
+ */
+ public static int name2type(String a_type)
+ {
+ return mapper.get(a_type);
+ }
+
+ /**
+ * Get the element attribute by name.
+ * @param attribute the attribute name, case insensitive.
+ * @return the correspoding attribute of this element. The class,
+ * for storing as attribute list, as a single attribute, is used to
+ * store a single attribute in this case.
+ * @throws NullPointerException if the attribute name is null.
+ */
+ public AttributeList getAttribute(String attribute)
+ {
+ AttributeList a = atts;
+
+ while (a != null && !attribute.equalsIgnoreCase(a.name))
+ a = a.next;
+
+ return a;
+ }
+
+ /**
+ * Get the element attribute by its value.
+ * @param a_value the attribute value, case insensitive.
+ * @return the correspoding attribute of this element. The class,
+ * for storing as attribute list, as a single attribute, is used to
+ * store a single attribute in this case. If there are several
+ * attributes with the same value, there is no garranty, which one
+ * is returned.
+ */
+ public AttributeList getAttributeByValue(String a_value)
+ {
+ AttributeList a = atts;
+
+ if (a_value == null)
+ {
+ while (a != null)
+ {
+ if (a.value == null)
+ return a;
+
+ a = a.next;
+ }
+ }
+ else
+ {
+ while (a != null)
+ {
+ if (a.value != null && a_value.equalsIgnoreCase(a.value))
+ return a;
+
+ a = a.next;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Get all attributes of this document as an attribute list.
+ * @return
+ */
+ public AttributeList getAttributes()
+ {
+ return atts;
+ }
+
+ /**
+ * Get the content model, defining elements, entities and DTD text
+ * that may/may not occur inside this element.
+ */
+ public ContentModel getContent()
+ {
+ return content;
+ }
+
+ /**
+ * Returns true for the element with no content.
+ * Empty elements are defined with the SGML DTD keyword "EMPTY".
+ * @return true if content model field (content) method is equal to
+ * null or its method empty() returns true.
+ */
+ public boolean isEmpty()
+ {
+ return content == null || content.empty();
+ }
+
+ /**
+ * Get the unique integer identifier of this Element,
+ * used to refer the element (more exactly, the element flag)
+ * in <code>inclusions</code> and <code>exclusions</code> bit set.
+ * WARNING: This value may not be the same between different
+ * implementations.
+ */
+ public int getIndex()
+ {
+ return index;
+ }
+
+ /**
+ * Get the element name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Get the element type.
+ * @return one of the values, defined DTDConstants.
+ * In this implementation, the element type can be
+ * CDATA, RCDATA, EMPTY or ANY.
+ */
+ public int getType()
+ {
+ return type;
+ }
+
+ /**
+ * True is this element need not to have the starting tag, false
+ * otherwise.s element need not to have the closing tag, false
+ * otherwise. The HTML 4.0 definition specifies
+ * that some elements (like <code>&lt;hr&gt;</code>are
+ * not required to have the end tags.
+ */
+ public boolean omitEnd()
+ {
+ return oEnd;
+ }
+
+ /**
+ * True is this element need not to have the closing tag, false
+ * otherwise. The HTML 4.0 definition specifies
+ * that some elements (like <code>&lt;head&gt;</code> or
+ * <code>&lt;body&gt;</code>) are
+ * not required to have the start tags.
+ */
+ public boolean omitStart()
+ {
+ return oStart;
+ }
+
+ /**
+ * Returns the name of this element.
+ */
+ public String toString()
+ {
+ return name;
+ }
+}
diff --git a/libjava/javax/swing/text/html/parser/Entity.java b/libjava/javax/swing/text/html/parser/Entity.java
new file mode 100644
index 00000000000..ba79552c795
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/Entity.java
@@ -0,0 +1,185 @@
+/* Entity.java -- Stores information, obtained by parsing SGML DTL
+ * &lt;!ENTITY % .. &gt; tag
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import gnu.javax.swing.text.html.parser.support.gnuStringIntMapper;
+
+import java.io.Serializable;
+
+/**
+ * <p>Stores information, obtained by parsing SGML DTL
+ * &lt;!ENTITY % .. &gt; tag.</p>
+ * <p>
+ * The entity defines some kind of macro that can be used elsewhere in
+ * the document.
+ * When the macro is referred to by the name in the DTD, it is expanded into
+ * a string
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class Entity
+ implements DTDConstants, Serializable
+{
+ /**
+ * Package level mapper between type names and they string values.
+ */
+ final static gnuStringIntMapper mapper =
+ new gnuStringIntMapper()
+ {
+ protected void create()
+ {
+ add("ANY", DTDConstants.ANY);
+ add("CDATA", DTDConstants.CDATA);
+ add("PUBLIC", DTDConstants.PUBLIC);
+ add("SDATA", DTDConstants.SDATA);
+ add("PI", DTDConstants.PI);
+ add("STARTTAG", DTDConstants.STARTTAG);
+ add("ENDTAG", DTDConstants.ENDTAG);
+ add("MS", DTDConstants.MS);
+ add("MD", DTDConstants.MD);
+ add("SYSTEM", DTDConstants.SYSTEM);
+ }
+ };
+
+ /**
+ * The entity name.
+ */
+ public String name;
+
+ /**
+ * The entity data
+ */
+ public char[] data;
+
+ /**
+ * The entity type.
+ */
+ public int type;
+
+ /**
+ * String representation of the entity data.
+ */
+ private String sdata;
+
+ /**
+ * Create a new entity
+ * @param a_name the entity name
+ * @param a_type the entity type
+ * @param a_data the data replacing the entity reference
+ */
+ public Entity(String a_name, int a_type, char[] a_data)
+ {
+ name = a_name;
+ type = a_type;
+ data = a_data;
+ }
+
+ /**
+ * Converts a given string to the corresponding entity type.
+ * @return a value, defined in DTDConstants (one of
+ * PUBLIC, CDATA, SDATA, PI, STARTTAG, ENDTAG, MS, MD, SYSTEM)
+ * or CDATA if the parameter is not a valid entity type.
+ */
+ public static int name2type(String an_entity)
+ {
+ int r = mapper.get(an_entity);
+ return (r == 0) ? DTDConstants.CDATA : r;
+ }
+
+ /**
+ * Get the entity data.
+ */
+ public char[] getData()
+ {
+ return data;
+ }
+
+ /**
+ * Returns true for general entities. Each general entity can be
+ * referenced as <code>&entity-name;</code>. Such entities are
+ * defined by the SGML DTD tag
+ * <code>&lt;!ENTITY <i>name</i> "<i>value</i>"></code>. The general
+ * entities can be used anywhere in the document.
+ */
+ public boolean isGeneral()
+ {
+ return (type & DTDConstants.GENERAL) != 0;
+ }
+
+ /**
+ * Get the entity name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Returns true for parameter entities. Each parameter entity can be
+ * referenced as <code>&entity-name;</code>. Such entities are
+ * defined by the SGML DTD tag
+ * <code>&lt;!ENTITY % <i>name</i> "<i>value</i>"></code>. The parameter
+ * entities can be used only in SGML context.
+ */
+ public boolean isParameter()
+ {
+ return (type & DTDConstants.PARAMETER) != 0;
+ }
+
+ /**
+ * Returns a data as String
+ */
+ public String getString()
+ {
+ if (sdata == null)
+ sdata = new String(data);
+
+ return sdata;
+ }
+
+ /**
+ * Get the entity type.
+ * @return the value of the {@link #type}.
+ */
+ public int getType()
+ {
+ return type;
+ }
+
+}
diff --git a/libjava/javax/swing/text/html/parser/Parser.java b/libjava/javax/swing/text/html/parser/Parser.java
new file mode 100755
index 00000000000..7202f6b5b27
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/Parser.java
@@ -0,0 +1,436 @@
+/* Parser.java -- HTML parser
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import javax.swing.text.ChangedCharSetException;
+import javax.swing.text.SimpleAttributeSet;
+
+/*
+ * FOR DEVELOPERS: To avoid regression, please run the package test
+ * textsuite/javax.swing.text.html.parser/AllParserTests after your
+ * modifications.
+ */
+
+/**
+ * <p>A simple error-tolerant HTML parser that uses a DTD document
+ * to access data on the possible tokens, arguments and syntax.</p>
+ * <p> The parser reads an HTML content from a Reader and calls various
+ * notifying methods (which should be overridden in a subclass)
+ * when tags or data are encountered.</p>
+ * <p>Some HTML elements need no opening or closing tags. The
+ * task of this parser is to invoke the tag handling methods also when
+ * the tags are not explicitly specified and must be supposed using
+ * information, stored in the DTD.
+ * For example, parsing the document
+ * <p>&lt;table&gt;&lt;tr&gt;&lt;td&gt;a&lt;td&gt;b&lt;td&gt;c&lt;/tr&gt; <br>
+ * will invoke exactly the handling methods exactly in the same order
+ * (and with the same parameters) as if parsing the document: <br>
+ * <em>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;table&gt;&lt;
+ * tbody&gt;</em>&lt;tr&gt;&lt;td&gt;a<em>&lt;/td&gt;</em>&lt;td&gt;b<em>
+ * &lt;/td&gt;</em>&lt;td&gt;c<em>&lt;/td&gt;&lt;/tr&gt;</em>&lt;
+ * <em>/tbody&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</em></p>
+ * (supposed tags are given in italics). The parser also supports
+ * obsolete elements of HTML syntax.<p>
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Parser
+ implements DTDConstants
+{
+ /**
+ * The document template description that will be used to parse the documents.
+ */
+ protected DTD dtd;
+
+ /**
+ * The value of this field determines whether or not the Parser will be
+ * strict in enforcing SGML compatibility. The default value is false,
+ * stating that the parser should do everything to parse and get at least
+ * some information even from the incorrectly written HTML input.
+ */
+ protected boolean strict;
+
+ /**
+ * The package level reference to the working HTML parser in this
+ * implementation.
+ */
+ final gnu.javax.swing.text.html.parser.support.Parser gnu;
+
+ /**
+ * Creates a new parser that uses the given DTD to access data on the
+ * possible tokens, arguments and syntax. There is no single - step way
+ * to get a default DTD; you must either refer to the implementation -
+ * specific packages, write your own DTD or obtain the working instance
+ * of parser in other way, for example, by calling
+ * {@link javax.swing.text.html.HTMLEditorKit#getParser() }.
+ * @param a_dtd A DTD to use.
+ */
+ public Parser(DTD a_dtd)
+ {
+ dtd = a_dtd;
+
+ final Parser j = this;
+
+ gnu =
+ new gnu.javax.swing.text.html.parser.support.Parser(dtd)
+ {
+ protected final void handleComment(char[] comment)
+ {
+ j.handleComment(comment);
+ }
+
+ protected final void handleEOFInComment()
+ {
+ j.handleEOFInComment();
+ }
+
+ protected final void handleEmptyTag(TagElement tag)
+ throws javax.swing.text.ChangedCharSetException
+ {
+ j.handleEmptyTag(tag);
+ }
+
+ protected final void handleStartTag(TagElement tag)
+ {
+ j.handleStartTag(tag);
+ }
+
+ protected final void handleEndTag(TagElement tag)
+ {
+ j.handleEndTag(tag);
+ }
+
+ protected final void handleError(int line, String message)
+ {
+ j.handleError(line, message);
+ }
+
+ protected final void handleText(char[] text)
+ {
+ j.handleText(text);
+ }
+
+ protected final void handleTitle(char[] title)
+ {
+ j.handleTitle(title);
+ }
+
+ protected final void markFirstTime(Element element)
+ {
+ j.markFirstTime(element);
+ }
+
+ protected final void startTag(TagElement tag)
+ throws ChangedCharSetException
+ {
+ j.startTag(tag);
+ }
+
+ protected final void endTag(boolean omitted)
+ {
+ j.endTag(omitted);
+ }
+
+ protected TagElement makeTag(Element element)
+ {
+ return j.makeTag(element);
+ }
+
+ protected TagElement makeTag(Element element, boolean isSupposed)
+ {
+ return j.makeTag(element, isSupposed);
+ }
+ };
+ }
+
+ /**
+ * Parse the HTML text, calling various methods in response to the
+ * occurence of the corresponding HTML constructions.
+ * @param reader The reader to read the source HTML from.
+ * @throws IOException If the reader throws one.
+ */
+ public synchronized void parse(Reader reader)
+ throws IOException
+ {
+ gnu.parse(reader);
+ }
+
+ /**
+ * Parses DTD markup declaration. Currently returns without action.
+ * @return null.
+ * @throws java.io.IOException
+ */
+ public String parseDTDMarkup()
+ throws IOException
+ {
+ return gnu.parseDTDMarkup();
+ }
+
+ /**
+ * Parse DTD document declarations. Currently only parses the document
+ * type declaration markup.
+ * @param strBuff
+ * @return true if this is a valid DTD markup declaration.
+ * @throws IOException
+ */
+ protected boolean parseMarkupDeclarations(StringBuffer strBuff)
+ throws IOException
+ {
+ return gnu.parseMarkupDeclarations(strBuff);
+ }
+
+ /**
+ * Get the attributes of the current tag.
+ * @return The attribute set, representing the attributes of the current tag.
+ */
+ protected SimpleAttributeSet getAttributes()
+ {
+ return gnu.getAttributes();
+ }
+
+ /**
+ * Get the number of the document line being parsed.
+ * @return The current line.
+ */
+ protected int getCurrentLine()
+ {
+ return gnu.hTag.where.beginLine;
+ }
+
+ /**
+ * Get the current position in the document being parsed.
+ * @return The current position.
+ */
+ protected int getCurrentPos()
+ {
+ return gnu.hTag.where.startPosition;
+ }
+
+ /**
+ * The method is called when the HTML end (closing) tag is found or if
+ * the parser concludes that the one should be present in the
+ * current position. The method is called immediatly
+ * before calling the handleEndTag().
+ * @param omitted True if the tag is no actually present in the document,
+ * but is supposed by the parser (like &lt;/html&gt; at the end of the
+ * document).
+ */
+ protected void endTag(boolean omitted)
+ {
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * finally delegates the call to handleError, also providing the number of the
+ * current line.
+ */
+ protected void error(String msg)
+ {
+ gnu.error(msg);
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * finally delegates the call to error (msg+": '"+invalid+"'").
+ */
+ protected void error(String msg, String invalid)
+ {
+ gnu.error(msg, invalid);
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * finally delegates the call to error (parm1+" "+ parm2+" "+ parm3).
+ */
+ protected void error(String parm1, String parm2, String parm3)
+ {
+ gnu.error(parm1, parm2, parm3);
+ }
+
+ /**
+ * Invokes the error handler. The default method in this implementation
+ * finally delegates the call to error
+ * (parm1+" "+ parm2+" "+ parm3+" "+ parm4).
+ */
+ protected void error(String parm1, String parm2, String parm3, String parm4)
+ {
+ gnu.error(parm1, parm2, parm3, parm4);
+ }
+
+ /**
+ * In this implementation, this is never called and returns without action.
+ */
+ protected void flushAttributes()
+ {
+ gnu.flushAttributes();
+ }
+
+ /**
+ * Handle HTML comment. The default method returns without action.
+ * @param comment The comment being handled
+ */
+ protected void handleComment(char[] comment)
+ {
+ }
+
+ /**
+ * This is additionally called in when the HTML content terminates
+ * without closing the HTML comment. This can only happen if the
+ * HTML document contains errors (for example, the closing --;gt is
+ * missing. The default method calls the error handler.
+ */
+ protected void handleEOFInComment()
+ {
+ gnu.error("Unclosed comment");
+ }
+
+ /**
+ * Handle the tag with no content, like &lt;br&gt;. The method is
+ * called for the elements that, in accordance with the current DTD,
+ * has an empty content.
+ * @param The tag being handled.
+ * @throws javax.swing.text.ChangedCharSetException
+ */
+ protected void handleEmptyTag(TagElement tag)
+ throws ChangedCharSetException
+ {
+ }
+
+ /**
+ * The method is called when the HTML closing tag ((like &lt;/table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param The tag being handled
+ */
+ protected void handleEndTag(TagElement tag)
+ {
+ }
+
+ /* Handle error that has occured in the given line. */
+ protected void handleError(int line, String message)
+ {
+ }
+
+ /**
+ * The method is called when the HTML opening tag ((like &lt;table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position.
+ * @param The tag being handled
+ */
+ protected void handleStartTag(TagElement tag)
+ {
+ }
+
+ /**
+ * Handle the text section.
+ * <p> For non-preformatted section, the parser replaces
+ * \t, \r and \n by spaces and then multiple spaces
+ * by a single space. Additionaly, all whitespace around
+ * tags is discarded.
+ * </p>
+ * <p> For pre-formatted text (inside TEXAREA and PRE), the parser preserves
+ * all tabs and spaces, but removes <b>one</b> bounding \r, \n or \r\n,
+ * if it is present. Additionally, it replaces each occurence of \r or \r\n
+ * by a single \n.</p>
+ *
+ * @param text A section text.
+ */
+ protected void handleText(char[] text)
+ {
+ }
+
+ /**
+ * Handle HTML &lt;title&gt; tag. This method is invoked when
+ * both title starting and closing tags are already behind.
+ * The passed argument contains the concatenation of all
+ * title text sections.
+ * @param The title text.
+ */
+ protected void handleTitle(char[] title)
+ {
+ }
+
+ /**
+ * Constructs the tag from the given element. In this implementation,
+ * this is defined, but never called.
+ * @param element the base element of the tag.
+ * @return the tag
+ */
+ protected TagElement makeTag(Element element)
+ {
+ return makeTag(element, false);
+ }
+
+ /**
+ * Constructs the tag from the given element.
+ * @param the tag base {@link javax.swing.text.html.parser.Element}
+ * @param isSupposed true if the tag is not actually present in the
+ * html input, but the parser supposes that it should to occur in
+ * the current location.
+ * @return the tag
+ */
+ protected TagElement makeTag(Element element, boolean isSupposed)
+ {
+ return new TagElement(element, isSupposed);
+ }
+
+ /**
+ * This is called when the tag, representing the given element,
+ * occurs first time in the document.
+ * @param element
+ */
+ protected void markFirstTime(Element element)
+ {
+ }
+
+ /**
+ * The method is called when the HTML opening tag ((like &lt;table&gt;)
+ * is found or if the parser concludes that the one should be present
+ * in the current position. The method is called immediately before
+ * calling the handleStartTag.
+ * @param The tag
+ */
+ protected void startTag(TagElement tag)
+ throws ChangedCharSetException
+ {
+ }
+}
diff --git a/libjava/javax/swing/text/html/parser/TagElement.java b/libjava/javax/swing/text/html/parser/TagElement.java
new file mode 100755
index 00000000000..ab9465261df
--- /dev/null
+++ b/libjava/javax/swing/text/html/parser/TagElement.java
@@ -0,0 +1,142 @@
+/* TagElement.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.html.parser;
+
+import javax.swing.text.html.HTML;
+
+/**
+ * The SGML element, defining a single html tag.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class TagElement
+{
+ /**
+ * The Element the tag was constructed from.
+ */
+ private final Element element;
+
+ /**
+ * The coresponding HTML tag, assigned once in constructor.
+ */
+ private final HTML.Tag tag;
+
+ /**
+ * The 'fictional' flag.
+ */
+ private final boolean fictional;
+
+ /**
+ * Creates the html tag element from the defintion, stored in the
+ * given element. Sets the flag 'fictional' to false.
+ * @param an_element
+ */
+ public TagElement(Element an_element)
+ {
+ this(an_element, false);
+ }
+
+ /**
+ * Creates the html tag element from the defintion, stored in the
+ * given element, setting the flag 'fictional' to the given value.
+ */
+ public TagElement(Element an_element, boolean is_fictional)
+ {
+ element = an_element;
+ fictional = is_fictional;
+
+ HTML.Tag t = HTML.getTag(element.getName());
+
+ if (t != null)
+ tag = t;
+ else
+ tag = new HTML.UnknownTag(element.getName());
+ }
+
+ /**
+ * Get the element from that the tag was constructed.
+ */
+ public Element getElement()
+ {
+ return element;
+ }
+
+ /**
+ * Get the corresponding HTML tag. This is either one of the
+ * pre-defined HTML tags or the instance of the UnknownTag with the
+ * element name.
+ */
+ public HTML.Tag getHTMLTag()
+ {
+ return tag;
+ }
+
+ /**
+ * Calls isPreformatted() for the corresponding html tag and returns
+ * the obtained value.
+ */
+ public boolean isPreformatted()
+ {
+ return tag.isPreformatted();
+ }
+
+ /**
+ * Calls breaksFlow() for the corresponding html tag and returns
+ * the obtained value.
+ */
+ public boolean breaksFlow()
+ {
+ return tag.breaksFlow();
+ }
+
+ /**
+ * Get the value of the flag 'fictional'.
+ */
+ public boolean fictional()
+ {
+ return fictional;
+ }
+
+ /**
+ * Returns string representation of this object.
+ */
+ public String toString()
+ {
+ return getElement() + (fictional ? "?" : "");
+ }
+}
diff --git a/libjava/javax/swing/text/rtf/ControlWordToken.java b/libjava/javax/swing/text/rtf/ControlWordToken.java
new file mode 100644
index 00000000000..043cae412e7
--- /dev/null
+++ b/libjava/javax/swing/text/rtf/ControlWordToken.java
@@ -0,0 +1,86 @@
+/* ControlWordToken.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.rtf;
+
+/**
+ * A special {@link Token} that represents a control word in RTF like
+ * '\deff0' where 'deff' is the name of the control word and '0' is an
+ * optional parameter.
+ *
+ * @author Roman Kennke (roman@ontographics.com)
+ */
+class ControlWordToken extends Token
+{
+
+ /**
+ * The name of the control word.
+ */
+ public String name;
+
+ /**
+ * The optional parameter of the control word. Absence of a parameter is
+ * expressed through Integer.MIN_VALUE.
+ */
+ public int param;
+
+ /**
+ * Constructs a new ControlWordToken with the specified name and without
+ * a parameter.
+ *
+ * @param name the name of the control word
+ */
+ public ControlWordToken(String name)
+ {
+ this(name, Integer.MIN_VALUE);
+ }
+
+
+ /**
+ * Constructs a new ControlWordToken with the specified name and parameter.
+ *
+ * @param name the name of the control word
+ */
+ public ControlWordToken(String name, int param)
+ {
+ super(Token.CONTROL_WORD);
+ this.name = name;
+ this.param = param;
+ }
+
+}
diff --git a/libjava/javax/swing/text/rtf/RTFEditorKit.java b/libjava/javax/swing/text/rtf/RTFEditorKit.java
new file mode 100644
index 00000000000..8a6e88a84e4
--- /dev/null
+++ b/libjava/javax/swing/text/rtf/RTFEditorKit.java
@@ -0,0 +1,114 @@
+/* RTFEditorKit.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.rtf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.StyledEditorKit;
+
+/**
+ * Provides support for RTF data for use in
+ * {@link javax.swing.JEditorPane}s.
+ *
+ * @author Roman Kennke (roman@ontographics.com)
+ */
+public class RTFEditorKit
+ extends StyledEditorKit
+{
+
+ /**
+ * Constructs a new RTFEditorKit.
+ */
+ public RTFEditorKit()
+ {
+ super();
+ }
+
+ /**
+ * Returns the MIME content type. In the case of RTFEditorKit this is
+ * &apos;text/rtf&apos;
+ *
+ * @return the MIME content type for RTFEditorKit
+ */
+ public String getContentType()
+ {
+ return "text/rtf";
+ }
+
+ /**
+ * Reads RTF data from <code>stream</code> into <code>doc</code> at the
+ * specified position <code>pos</code>.
+ *
+ * @param stream the {@link InputStream} from where we read RTF data
+ * @param doc the {@link Document} into which we read the RTF data
+ * @param pos the position where to start
+ *
+ * @throws IOException if an IO error occurs
+ * @throws BadLocationException if the position is not valid
+ */
+ public void read(InputStream stream, Document doc, int pos)
+ throws IOException, BadLocationException
+ {
+ RTFParser parser = new RTFParser(stream, doc, pos);
+ parser.parse();
+ }
+
+
+ /**
+ * Reads RTF data from <code>reader</code> into <code>doc</code> at the
+ * specified position <code>pos</code>.
+ *
+ * @param reader the {@link Reader} from where we read RTF data
+ * @param doc the {@link Document} into which we read the RTF data
+ * @param pos the position where to start
+ *
+ * @throws IOException if an IO error occurs
+ * @throws BadLocationException if the position is not valid
+ */
+ public void read(Reader reader, Document doc, int pos)
+ throws IOException, BadLocationException
+ {
+ RTFParser parser = new RTFParser(reader, doc, pos);
+ parser.parse();
+ }
+}
diff --git a/libjava/javax/swing/text/rtf/RTFParseException.java b/libjava/javax/swing/text/rtf/RTFParseException.java
new file mode 100644
index 00000000000..dba51d2e0c3
--- /dev/null
+++ b/libjava/javax/swing/text/rtf/RTFParseException.java
@@ -0,0 +1,65 @@
+/* RTFParseException.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.rtf;
+
+/**
+ * Indicates a parsing error during RTF processing.
+ *
+ * @author Roman Kennke (roman@ontographics.com)
+ */
+class RTFParseException
+ extends RuntimeException
+{
+ /**
+ * Constructs a new RTFParseException without message.
+ */
+ public RTFParseException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs a new RTFParseException with the specified message.
+ */
+ public RTFParseException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/libjava/javax/swing/text/rtf/RTFParser.java b/libjava/javax/swing/text/rtf/RTFParser.java
new file mode 100644
index 00000000000..fe837fbff3a
--- /dev/null
+++ b/libjava/javax/swing/text/rtf/RTFParser.java
@@ -0,0 +1,195 @@
+/* RTFParser.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.rtf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+
+/**
+ * Parses an RTF file into a {@link Document}. The parser utilizes
+ * {@link RTFScanner}.
+ *
+ * @author Roman Kennke (roman@ontographics.com)
+ */
+class RTFParser
+{
+
+ /**
+ * Our scanner.
+ */
+ private RTFScanner scanner;
+
+ /**
+ * The document into which we parse.
+ */
+ private Document doc;
+
+ /**
+ * The current position.
+ */
+ private int pos;
+
+ /**
+ * Constructs a new RTFParser for the specified document and position,
+ * without initializing the scanner. This is only used internally.
+ *
+ * @param doc the {@link Document} into which we should parse
+ * @param pos the position to start
+ */
+ private RTFParser(Document doc, int pos)
+ {
+ this.doc = doc;
+ this.pos = pos;
+ }
+
+ /**
+ * Constructs a new RTFParser for the specified <code>stream</code>.
+ *
+ * @param stream the stream from which we parse
+ * @param doc the {@link Document} into which we should parse
+ * @param pos the position to start
+ */
+ public RTFParser(InputStream stream, Document doc, int pos)
+ {
+ this(doc, pos);
+ scanner = new RTFScanner(stream);
+ }
+
+ /**
+ * Constructs a new RTFParser for the specified <code>reader</code>.
+ *
+ * @param reader the reader from which we parse
+ * @param doc the {@link Document} into which we should parse
+ * @param pos the position to start
+ */
+ public RTFParser(Reader reader, Document doc, int pos)
+ {
+ this(doc, pos);
+ scanner = new RTFScanner(reader);
+ }
+
+ /**
+ * Returns the {@link Document} in which we parsed the RTF data.
+ *
+ * @return the {@link Document} in which we parsed the RTF data
+ */
+ public Document getDocument()
+ {
+ return doc;
+ }
+
+ /**
+ * Starts the parsing process.
+ */
+ public void parse()
+ throws IOException, BadLocationException
+ {
+ parseFile();
+ }
+
+ /**
+ * The parse rules for &lt;file&gt;.
+ */
+ private void parseFile()
+ throws IOException, BadLocationException
+ {
+ Token t1 = scanner.readToken();
+ if (t1.type != Token.LCURLY)
+ throw new RTFParseException("expected left curly braces");
+
+ parseHeader();
+ parseDocument();
+
+ Token t2 = scanner.readToken();
+ if (t2.type != Token.RCURLY)
+ throw new RTFParseException("expected right curly braces");
+
+ }
+
+ /**
+ * The parse rules for &lt;header&gt;.
+ *
+ * TODO: implement this properly
+ */
+ private void parseHeader()
+ //throws IOException, BadLocationException
+ {
+ // TODO add parse rules here
+ }
+
+
+ /**
+ * The parse rules for &lt;document&gt;.
+ *
+ * TODO: implement this properly
+ */
+ private void parseDocument()
+ throws IOException, BadLocationException
+ {
+ // !!! TODO !!!
+ // This simply emits every TEXT Token as text to the document
+ // which is plain stupid
+
+ boolean eof = false;
+
+ do {
+ Token token = scanner.readToken();
+ switch (token.type)
+ {
+ case Token.TEXT:
+ TextToken textToken = (TextToken) token;
+ doc.insertString(pos, textToken.text, null);
+ pos += textToken.text.length();
+ break;
+ case Token.EOF:
+ eof = true;
+ break;
+ default:
+ // FIXME
+ break;
+ }
+ } while (!eof);
+
+ }
+
+}
diff --git a/libjava/javax/swing/text/rtf/RTFScanner.java b/libjava/javax/swing/text/rtf/RTFScanner.java
new file mode 100644
index 00000000000..d964a43472c
--- /dev/null
+++ b/libjava/javax/swing/text/rtf/RTFScanner.java
@@ -0,0 +1,268 @@
+/* RTFScanner.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.rtf;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+/**
+ * Provides a scanner that scans an {@link InputStream} for tokens of the
+ * RTF syntax.
+ *
+ * This scanner is based upon the RTF specification 1.6
+ * available at:
+ *
+ * <a
+ * href="http://msdn.microsoft.com/library/en-us/dnrtfspec/html/rtfspec.asp">
+ * RTF specification at MSDN</a>
+ *
+ * @author Roman Kennke (roman@ontographics.com)
+ */
+class RTFScanner
+{
+
+ /**
+ * The reader from which we read the RTF data.
+ */
+ private Reader in;
+
+ /**
+ * This is used to constuct strings from the read in chars.
+ */
+ private StringBuffer buffer;
+
+ /**
+ * Constructs a new RTFScanner without initializing the {@link Reader}.
+ */
+ private RTFScanner()
+ {
+ buffer = new StringBuffer();
+ }
+
+ /**
+ * Constructs a new RTFScanner for the given {@link InputStream}.
+ * The stream is wrapped into an {@link InputStreamReader} and if it's
+ * not yet buffered then the Reader is wrapped in a {@link BufferedReader}
+ *
+ * @param stream the {@link InputStream} to read RTF data from
+ */
+ public RTFScanner(InputStream stream)
+ {
+ this();
+ InputStreamReader reader = new InputStreamReader(stream);
+ in = new BufferedReader(reader);
+ }
+
+ /**
+ * Constructs a new RTFScanner for the given {@link Reader}.
+ *
+ * If the reader is not an instance of {@link BufferedReader} then it
+ * is wrapped into a BufferedReader.
+ *
+ * @param reader the {@link BufferedReader} to read RTF data from
+ */
+ public RTFScanner(Reader reader)
+ {
+ this();
+ if (reader instanceof BufferedReader)
+ {
+ in = reader;
+ }
+ else
+ {
+ in = new BufferedReader(reader);
+ }
+ }
+
+ /**
+ * Reads in the next {@link Token} from the stream.
+ *
+ * @return the read {@link Token}
+ *
+ * @throws IOException if the underlying stream has problems
+ */
+ public Token readToken()
+ throws IOException
+ {
+ Token token = null;
+
+ int c = in.read();
+ switch(c)
+ {
+ case -1:
+ token = new Token(Token.EOF);
+ break;
+
+ case '{':
+ token = new Token(Token.LCURLY);
+ break;
+
+ case '}':
+ token = new Token(Token.RCURLY);
+ break;
+
+ case '\\':
+ buffer.delete(0, buffer.length());
+ buffer.append((char) c);
+ token = readControlWord();
+ break;
+
+ default:
+ buffer.delete(0, buffer.length());
+ buffer.append((char) c);
+ token = readText();
+ break;
+ }
+
+ return token;
+ }
+
+ /**
+ * Reads in a control word and optional parameter.
+ *
+ * @return the read in control word as {@link ControlWordToken}
+ *
+ * @throws IOException if the underlying stream has problems
+ */
+ private Token readControlWord()
+ throws IOException
+ {
+ // this flag indicates if we are still reading the name or are already
+ // in the parameter
+ boolean readingName = true;
+ String name = null;
+ String param = null;
+
+ while (true)
+ {
+ in.mark(1);
+ int c = in.read();
+
+ // check for 'a'..'z'
+ if (readingName && (c >= 'a') && (c <= 'z'))
+ {
+ buffer.append((char) c);
+ }
+ else if ((c >= '0') && (c <= '9'))
+ {
+ // if the last char was in the name, then finish reading the name
+ if (readingName)
+ {
+ name = buffer.toString();
+ buffer.delete(0, buffer.length());
+ readingName = false;
+ }
+ buffer.append((char) c);
+ }
+ else
+ {
+ // if we were in the name, then finish this
+ if (readingName)
+ {
+ name = buffer.toString();
+ }
+ // otherwise finish the parameter
+ else
+ {
+ param = buffer.toString();
+ }
+
+ // clear up
+ buffer.delete(0, buffer.length());
+ // reset input buffer to last char
+ in.reset();
+ // break while loop
+ break;
+ }
+ }
+
+ ControlWordToken token = null;
+
+ if (param == null)
+ token = new ControlWordToken(name);
+ else
+ token =new ControlWordToken(name, Integer.parseInt(param));
+
+ return token;
+
+ }
+
+ /**
+ * Reads in a block of text.
+ *
+ * @return the token for the text
+ */
+ private Token readText()
+ throws IOException
+ {
+
+ boolean readingText = true;
+ while (readingText)
+ {
+ in.mark(1);
+ int c = in.read();
+ switch(c)
+ {
+ case '\\':
+ case '{':
+ case '}':
+ case -1:
+ readingText = false;
+ in.reset();
+ break;
+
+ default:
+ buffer.append((char) c);
+ break;
+ }
+
+ }
+
+ String text = buffer.toString();
+ Token token = new TextToken(text);
+
+ buffer.delete(0, buffer.length());
+
+ return token;
+
+ }
+}
diff --git a/libjava/javax/swing/text/rtf/TextToken.java b/libjava/javax/swing/text/rtf/TextToken.java
new file mode 100644
index 00000000000..e326792cc1b
--- /dev/null
+++ b/libjava/javax/swing/text/rtf/TextToken.java
@@ -0,0 +1,65 @@
+/* TextToken.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.rtf;
+
+/**
+ * A special {@link Token} that represents a piece of text in RTF.
+ *
+ * @author Roman Kennke (roman@ontographics.com)
+ */
+class TextToken extends Token
+{
+
+ /**
+ * The text.
+ */
+ public String text;
+
+ /**
+ * Constructs a new TextToken with the specified textual data.
+ *
+ * @param text the text for this token
+ */
+ public TextToken(String text)
+ {
+ super(Token.TEXT);
+ this.text = text;
+ }
+
+}
diff --git a/libjava/javax/swing/text/rtf/Token.java b/libjava/javax/swing/text/rtf/Token.java
new file mode 100644
index 00000000000..a7a955269dc
--- /dev/null
+++ b/libjava/javax/swing/text/rtf/Token.java
@@ -0,0 +1,91 @@
+/* Token.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text.rtf;
+
+/**
+ * Represents a simple token that the RTFScanner can read. A simple
+ * only has a type (like LCURLY or RCURLY). More complex tokens may
+ * attach data to the token.
+ *
+ * @author Roman Kennke (roman@ontographics.com)
+ */
+class Token
+{
+
+ /**
+ * This special type inidicates the end of the input stream.
+ */
+ public static final int EOF = -1;
+
+ /**
+ * A left curly brace '{'.
+ */
+ public static final int LCURLY = 1;
+
+ /**
+ * A right curly brace '}'.
+ */
+ public static final int RCURLY = 2;
+
+ /**
+ * A control word like '\rtf1'. Tokens with this type are represented
+ * through the subclass {@link ControlWordToken}.
+ */
+ public static final int CONTROL_WORD = 3;
+
+ /**
+ * A token that contains text. This is represented through the subclass
+ * {@link TextToken}.
+ */
+ public static final int TEXT = 4;
+
+
+ /** The token type. */
+ public int type;
+
+ /**
+ * Constructs a new Token with the specified type.
+ *
+ * @param type the Token type
+ */
+ public Token(int type)
+ {
+ this.type = type;
+ }
+}
diff --git a/libjava/testsuite/libjava.special/pr21115.java b/libjava/testsuite/libjava.special/pr21115.java
new file mode 100644
index 00000000000..2e23f271eb1
--- /dev/null
+++ b/libjava/testsuite/libjava.special/pr21115.java
@@ -0,0 +1,34 @@
+public abstract class pr21115
+{
+ public static void main(String[] args) throws Exception
+ {
+ Class c = Class.forName("pr21115I");
+ Object o = c.newInstance();
+ pr21115 t = (pr21115) o;
+ // Try to fill the stack with 0xff.
+ t.test (0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff);
+ // Pass a bunch of false (0) values.
+ if (t.test (false, false,
+ false, false,
+ false, false,
+ false, false,
+ false, false))
+ System.out.println ("FAILED - expecting false return value.");
+ }
+
+ public abstract boolean test(boolean a, boolean b,
+ boolean c, boolean d,
+ boolean e, boolean f,
+ boolean g, boolean h,
+ boolean i, boolean j);
+
+ public abstract boolean test(int a, int b,
+ int c, int d,
+ int e, int f,
+ int g, int h,
+ int i, int j);
+}
diff --git a/libjava/testsuite/libjava.special/pr21115.out b/libjava/testsuite/libjava.special/pr21115.out
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/libjava/testsuite/libjava.special/pr21115.out
diff --git a/libjava/testsuite/libjava.special/pr21115I.java b/libjava/testsuite/libjava.special/pr21115I.java
new file mode 100644
index 00000000000..17701ac079c
--- /dev/null
+++ b/libjava/testsuite/libjava.special/pr21115I.java
@@ -0,0 +1,20 @@
+public class pr21115I extends pr21115
+{
+ public boolean test(boolean a, boolean b,
+ boolean c, boolean d,
+ boolean e, boolean f,
+ boolean g, boolean h,
+ boolean i, boolean j)
+ {
+ return a && b && c && d && e && f && g && h && i;
+ }
+
+ public boolean test(int a, int b,
+ int c, int d,
+ int e, int f,
+ int g, int h,
+ int i, int j)
+ {
+ return true;
+ }
+}
diff --git a/libjava/testsuite/libjava.special/special.exp b/libjava/testsuite/libjava.special/special.exp
new file mode 100644
index 00000000000..76afd9a70b0
--- /dev/null
+++ b/libjava/testsuite/libjava.special/special.exp
@@ -0,0 +1,30 @@
+# Special test cases. These require tricky build procedures.
+
+proc gcj_special_run {} {
+ global srcdir subdir env
+
+ # ---- PR 21115 -------------------------------------------------------
+
+ if {! [bytecompile_file ${srcdir}/${subdir}/pr21115I.java [pwd]]} {
+ fail "bytecompile ${srcdir}/${subdir}/libjava.special/pr21115I.java"
+ # FIXME - should use `untested' on all remaining tests.
+ # But that is hard.
+ return 0
+ }
+ pass "bytecompile pr21115I.java"
+
+ if {! [gcj_link pr21115 pr21115 [list ${srcdir}/${subdir}/pr21115.java]]} {
+ fail "compiling/linking pr21115.java"
+ # FIXME
+ return 0
+ }
+
+ if {! [gcj_invoke pr21115 ${srcdir}/${subdir}/pr21115.out ""]} {
+ # FIXME
+ return 0
+ }
+
+ return 1
+}
+
+gcj_special_run
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/16.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/16.cc
new file mode 100644
index 00000000000..03512714da8
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/16.cc
@@ -0,0 +1,202 @@
+// 2005-04-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.2.1.1 num_get members
+
+#include <locale>
+#include <sstream>
+#include <limits>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ using namespace std;
+ typedef istreambuf_iterator<char> iterator_type;
+
+ bool test __attribute__((unused)) = true;
+
+ stringstream ss;
+ const num_get<char>& ng = use_facet<num_get<char> >(ss.getloc());
+ ios_base::iostate err;
+ iterator_type end;
+
+ unsigned short us0, us1 = numeric_limits<unsigned short>::max();
+ unsigned int ui0, ui1 = numeric_limits<unsigned int>::max();
+ unsigned long ul0, ul1 = numeric_limits<unsigned long>::max();
+ long l01, l1 = numeric_limits<long>::max();
+ long l02, l2 = numeric_limits<long>::min();
+#ifdef _GLIBCXX_USE_LONG_LONG
+ unsigned long long ull0, ull1 = numeric_limits<unsigned long long>::max();
+ long long ll01, ll1 = numeric_limits<long long>::max();
+ long long ll02, ll2 = numeric_limits<long long>::min();
+#endif
+
+ const string empty;
+
+ us0 = 0;
+ ss << us1;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, us0);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( us0 == us1 );
+
+ us0 = 0;
+ ss.clear();
+ ss.str(empty);
+ ss << us1 << '0';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, us0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( us0 == 0 );
+
+ ui0 = 0U;
+ ss.clear();
+ ss.str(empty);
+ ss << ui1 << ' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ui0);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( ui0 == ui1 );
+
+ ui0 = 0U;
+ ss.clear();
+ ss.str(empty);
+ ss << ui1 << '1';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ui0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ui0 == 0U );
+
+ ul0 = 0UL;
+ ss.clear();
+ ss.str(empty);
+ ss << ul1;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ul0);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( ul0 == ul1 );
+
+ ul0 = 0UL;
+ ss.clear();
+ ss.str(empty);
+ ss << ul1 << '2';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ul0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ul0 == 0UL );
+
+ l01 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l1 << ' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l01);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( l01 == l1 );
+
+ l01 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l1 << '3';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l01);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( l01 == 0L );
+
+ l02 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l2;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l02);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( l02 == l2 );
+
+ l02 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l2 << '4';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l02);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( l02 == 0L );
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ ull0 = 0ULL;
+ ss.clear();
+ ss.str(empty);
+ ss << ull1 << ' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ull0);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( ull0 == ull1 );
+
+ ull0 = 0ULL;
+ ss.clear();
+ ss.str(empty);
+ ss << ull1 << '5';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ull0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ull0 == 0ULL );
+
+ ll01 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll1;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll01);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( ll01 == ll1 );
+
+ ll01 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll1 << '6';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll01);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ll01 == 0LL );
+
+ ll02 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll2 << ' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll02);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( ll02 == ll2 );
+
+ ll02 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll2 << '7';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll02);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ll02 == 0LL );
+#endif
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/16.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/16.cc
new file mode 100644
index 00000000000..ca774da4778
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/16.cc
@@ -0,0 +1,202 @@
+// 2005-04-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.2.1.1 num_get members
+
+#include <locale>
+#include <sstream>
+#include <limits>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ using namespace std;
+ typedef istreambuf_iterator<wchar_t> iterator_type;
+
+ bool test __attribute__((unused)) = true;
+
+ wstringstream ss;
+ const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(ss.getloc());
+ ios_base::iostate err;
+ iterator_type end;
+
+ unsigned short us0, us1 = numeric_limits<unsigned short>::max();
+ unsigned int ui0, ui1 = numeric_limits<unsigned int>::max();
+ unsigned long ul0, ul1 = numeric_limits<unsigned long>::max();
+ long l01, l1 = numeric_limits<long>::max();
+ long l02, l2 = numeric_limits<long>::min();
+#ifdef _GLIBCXX_USE_LONG_LONG
+ unsigned long long ull0, ull1 = numeric_limits<unsigned long long>::max();
+ long long ll01, ll1 = numeric_limits<long long>::max();
+ long long ll02, ll2 = numeric_limits<long long>::min();
+#endif
+
+ const wstring empty;
+
+ us0 = 0;
+ ss << us1;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, us0);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( us0 == us1 );
+
+ us0 = 0;
+ ss.clear();
+ ss.str(empty);
+ ss << us1 << L'0';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, us0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( us0 == 0 );
+
+ ui0 = 0U;
+ ss.clear();
+ ss.str(empty);
+ ss << ui1 << ' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ui0);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( ui0 == ui1 );
+
+ ui0 = 0U;
+ ss.clear();
+ ss.str(empty);
+ ss << ui1 << L'1';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ui0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ui0 == 0U );
+
+ ul0 = 0UL;
+ ss.clear();
+ ss.str(empty);
+ ss << ul1;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ul0);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( ul0 == ul1 );
+
+ ul0 = 0UL;
+ ss.clear();
+ ss.str(empty);
+ ss << ul1 << L'2';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ul0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ul0 == 0UL );
+
+ l01 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l1 << L' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l01);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( l01 == l1 );
+
+ l01 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l1 << L'3';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l01);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( l01 == 0L );
+
+ l02 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l2;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l02);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( l02 == l2 );
+
+ l02 = 0L;
+ ss.clear();
+ ss.str(empty);
+ ss << l2 << L'4';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, l02);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( l02 == 0L );
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ ull0 = 0ULL;
+ ss.clear();
+ ss.str(empty);
+ ss << ull1 << L' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ull0);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( ull0 == ull1 );
+
+ ull0 = 0ULL;
+ ss.clear();
+ ss.str(empty);
+ ss << ull1 << L'5';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ull0);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ull0 == 0ULL );
+
+ ll01 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll1;
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll01);
+ VERIFY( err == ios_base::eofbit );
+ VERIFY( ll01 == ll1 );
+
+ ll01 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll1 << L'6';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll01);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ll01 == 0LL );
+
+ ll02 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll2 << L' ';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll02);
+ VERIFY( err == ios_base::goodbit );
+ VERIFY( ll02 == ll2 );
+
+ ll02 = 0LL;
+ ss.clear();
+ ss.str(empty);
+ ss << ll2 << L'7';
+ err = ios_base::goodbit;
+ end = ng.get(ss.rdbuf(), 0, ss, err, ll02);
+ VERIFY( err == (ios_base::failbit | ios_base::eofbit) );
+ VERIFY( ll02 == 0LL );
+#endif
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc
new file mode 100644
index 00000000000..a90160c1cff
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc
@@ -0,0 +1,79 @@
+// 2005-04-17 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.2.2.1 num_put members
+
+#include <locale>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+// libstdc++/20914
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ // A locale that expects grouping.
+ locale loc_de = __gnu_test::try_named_locale("de_DE");
+
+ const string empty;
+ string result;
+
+ ostringstream oss;
+ oss.imbue(loc_de);
+ const num_put<char>& np = use_facet<num_put<char> >(oss.getloc());
+
+ long l0 = -300000;
+ long l1 = 300;
+ double d0 = -300000;
+ double d1 = 300;
+
+ oss.str(empty);
+ oss.clear();
+ np.put(oss.rdbuf(), oss, '*', l0);
+ result = oss.str();
+ VERIFY( result == "-300.000" );
+
+ oss.str(empty);
+ oss.clear();
+ np.put(oss.rdbuf(), oss, '*', d0);
+ result = oss.str();
+ VERIFY( result == "-300.000" );
+
+ oss.str(empty);
+ oss.clear();
+ oss.setf(ios::showpos);
+ np.put(oss.rdbuf(), oss, '*', l1);
+ result = oss.str();
+ VERIFY( result == "+300" );
+
+ oss.str(empty);
+ oss.clear();
+ oss.setf(ios::showpos);
+ np.put(oss.rdbuf(), oss, '*', d1);
+ result = oss.str();
+ VERIFY( result == "+300" );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc
new file mode 100644
index 00000000000..29dc16cd846
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc
@@ -0,0 +1,79 @@
+// 2005-04-17 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.2.2.1 num_put members
+
+#include <locale>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+// libstdc++/20914
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ // A locale that expects grouping.
+ locale loc_de = __gnu_test::try_named_locale("de_DE");
+
+ const wstring empty;
+ wstring result;
+
+ wostringstream oss;
+ oss.imbue(loc_de);
+ const num_put<wchar_t>& np = use_facet<num_put<wchar_t> >(oss.getloc());
+
+ long l0 = -300000;
+ long l1 = 300;
+ double d0 = -300000;
+ double d1 = 300;
+
+ oss.str(empty);
+ oss.clear();
+ np.put(oss.rdbuf(), oss, L'*', l0);
+ result = oss.str();
+ VERIFY( result == L"-300.000" );
+
+ oss.str(empty);
+ oss.clear();
+ np.put(oss.rdbuf(), oss, L'*', d0);
+ result = oss.str();
+ VERIFY( result == L"-300.000" );
+
+ oss.str(empty);
+ oss.clear();
+ oss.setf(ios::showpos);
+ np.put(oss.rdbuf(), oss, L'*', l1);
+ result = oss.str();
+ VERIFY( result == L"+300" );
+
+ oss.str(empty);
+ oss.clear();
+ oss.setf(ios::showpos);
+ np.put(oss.rdbuf(), oss, L'*', d1);
+ result = oss.str();
+ VERIFY( result == L"+300" );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}