aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog766
-rw-r--r--gcc/ChangeLog.plugins7
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in387
-rw-r--r--gcc/ada/ChangeLog1180
-rw-r--r--gcc/ada/Makefile.rtl8
-rw-r--r--gcc/ada/a-caldel-vms.adb14
-rw-r--r--gcc/ada/a-calend.adb35
-rw-r--r--gcc/ada/a-convec.ads1
-rw-r--r--gcc/ada/a-direct.adb14
-rw-r--r--gcc/ada/a-elchha.adb9
-rw-r--r--gcc/ada/a-except-2005.adb48
-rw-r--r--gcc/ada/a-except.adb50
-rw-r--r--gcc/ada/a-except.ads6
-rw-r--r--gcc/ada/a-exextr.adb9
-rw-r--r--gcc/ada/a-tasatt.adb5
-rw-r--r--gcc/ada/adaint.c258
-rw-r--r--gcc/ada/adaint.h10
-rw-r--r--gcc/ada/ali-util.adb2
-rw-r--r--gcc/ada/atree.adb1058
-rw-r--r--gcc/ada/atree.ads129
-rw-r--r--gcc/ada/bindgen.adb19
-rw-r--r--gcc/ada/checks.adb5
-rw-r--r--gcc/ada/checks.ads6
-rw-r--r--gcc/ada/debug.adb17
-rw-r--r--gcc/ada/einfo.adb16
-rw-r--r--gcc/ada/einfo.ads12
-rw-r--r--gcc/ada/exp_aggr.adb66
-rw-r--r--gcc/ada/exp_aggr.ads10
-rw-r--r--gcc/ada/exp_ch3.adb83
-rw-r--r--gcc/ada/exp_ch4.adb216
-rw-r--r--gcc/ada/exp_ch5.adb25
-rw-r--r--gcc/ada/exp_ch6.adb243
-rw-r--r--gcc/ada/exp_ch6.ads5
-rw-r--r--gcc/ada/exp_ch7.adb94
-rw-r--r--gcc/ada/exp_ch9.adb75
-rw-r--r--gcc/ada/exp_code.adb3
-rw-r--r--gcc/ada/exp_disp.adb52
-rw-r--r--gcc/ada/exp_disp.ads13
-rw-r--r--gcc/ada/exp_dist.adb135
-rw-r--r--gcc/ada/exp_fixd.adb4
-rw-r--r--gcc/ada/exp_imgv.adb3
-rw-r--r--gcc/ada/fmap.adb7
-rw-r--r--gcc/ada/freeze.adb104
-rw-r--r--gcc/ada/frontend.adb27
-rwxr-xr-xgcc/ada/g-byorma.adb2
-rwxr-xr-xgcc/ada/g-byorma.ads4
-rw-r--r--gcc/ada/g-calend.adb76
-rw-r--r--gcc/ada/g-calend.ads29
-rw-r--r--gcc/ada/g-comlin.adb5
-rw-r--r--gcc/ada/g-dirope.adb9
-rw-r--r--gcc/ada/g-hesora.adb2
-rw-r--r--gcc/ada/g-hesora.ads4
-rw-r--r--gcc/ada/g-htable.ads2
-rw-r--r--gcc/ada/g-moreex.adb39
-rw-r--r--gcc/ada/g-pehage.adb3
-rw-r--r--gcc/ada/g-sercom-mingw.adb2
-rw-r--r--gcc/ada/g-sercom.adb12
-rw-r--r--gcc/ada/g-socket.adb164
-rw-r--r--gcc/ada/g-socket.ads24
-rw-r--r--gcc/ada/g-socthi-mingw.adb6
-rw-r--r--gcc/ada/g-socthi-mingw.ads7
-rw-r--r--gcc/ada/g-socthi-vms.adb38
-rw-r--r--gcc/ada/g-socthi-vms.ads6
-rw-r--r--gcc/ada/g-socthi-vxworks.adb32
-rw-r--r--gcc/ada/g-socthi-vxworks.ads6
-rw-r--r--gcc/ada/g-socthi.adb32
-rw-r--r--gcc/ada/g-socthi.ads6
-rwxr-xr-xgcc/ada/g-spchge.adb4
-rwxr-xr-xgcc/ada/g-spchge.ads4
-rw-r--r--gcc/ada/g-speche.adb4
-rw-r--r--gcc/ada/g-speche.ads4
-rw-r--r--gcc/ada/g-stsifd-sockets.adb11
-rw-r--r--gcc/ada/g-trasym-unimplemented.adb72
-rw-r--r--gcc/ada/g-trasym-unimplemented.ads66
-rw-r--r--gcc/ada/g-trasym-vms-alpha.adb2
-rw-r--r--gcc/ada/g-trasym-vms-ia64.adb2
-rw-r--r--gcc/ada/g-trasym.ads6
-rwxr-xr-xgcc/ada/g-u3spch.adb4
-rwxr-xr-xgcc/ada/g-u3spch.ads4
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in865
-rw-r--r--gcc/ada/gcc-interface/Makefile.in93
-rw-r--r--gcc/ada/gcc-interface/misc.c43
-rw-r--r--gcc/ada/gcc-interface/trans.c58
-rw-r--r--gcc/ada/gnat1drv.adb6
-rw-r--r--gcc/ada/gnat_rm.texi36
-rw-r--r--gcc/ada/gnat_ugn.texi155
-rw-r--r--gcc/ada/gnatchop.adb67
-rw-r--r--gcc/ada/gprep.adb3
-rw-r--r--gcc/ada/i-cstrin.ads6
-rw-r--r--gcc/ada/init.c72
-rw-r--r--gcc/ada/initialize.c109
-rw-r--r--gcc/ada/lib-load.adb16
-rw-r--r--gcc/ada/lib-xref.adb9
-rw-r--r--gcc/ada/link.c9
-rw-r--r--gcc/ada/mingw32.h15
-rw-r--r--gcc/ada/mkdir.c2
-rwxr-xr-xgcc/ada/namet-sp.adb17
-rwxr-xr-xgcc/ada/namet-sp.ads3
-rw-r--r--gcc/ada/nlists.adb25
-rw-r--r--gcc/ada/nlists.ads7
-rw-r--r--gcc/ada/opt.ads31
-rw-r--r--gcc/ada/osint.adb2
-rw-r--r--gcc/ada/output.adb104
-rw-r--r--gcc/ada/output.ads15
-rw-r--r--gcc/ada/par-ch11.adb1
-rw-r--r--gcc/ada/par-ch3.adb11
-rw-r--r--gcc/ada/par-ch6.adb14
-rw-r--r--gcc/ada/par-ch9.adb7
-rw-r--r--gcc/ada/prep.adb42
-rw-r--r--gcc/ada/prep.ads6
-rw-r--r--gcc/ada/prepcomp.adb14
-rw-r--r--gcc/ada/prj-attr.adb3
-rw-r--r--gcc/ada/prj-nmsc.adb345
-rw-r--r--gcc/ada/prj-part.adb2
-rw-r--r--gcc/ada/prj-tree.adb31
-rw-r--r--gcc/ada/prj-tree.ads7
-rw-r--r--gcc/ada/prj.adb92
-rw-r--r--gcc/ada/prj.ads19
-rw-r--r--gcc/ada/restrict.adb14
-rw-r--r--gcc/ada/rtsfind.adb183
-rw-r--r--gcc/ada/rtsfind.ads101
-rw-r--r--gcc/ada/s-addope.adb2
-rw-r--r--gcc/ada/s-addope.ads2
-rw-r--r--gcc/ada/s-assert.adb2
-rw-r--r--gcc/ada/s-assert.ads2
-rw-r--r--gcc/ada/s-asthan-vms-alpha.adb9
-rw-r--r--gcc/ada/s-auxdec-vms_64.ads1
-rw-r--r--gcc/ada/s-auxdec.ads1
-rw-r--r--gcc/ada/s-carun8.adb2
-rw-r--r--gcc/ada/s-carun8.ads2
-rw-r--r--gcc/ada/s-casuti.adb4
-rw-r--r--gcc/ada/s-casuti.ads2
-rw-r--r--gcc/ada/s-conca2.adb55
-rw-r--r--gcc/ada/s-conca2.ads45
-rw-r--r--gcc/ada/s-conca3.adb59
-rw-r--r--gcc/ada/s-conca3.ads45
-rw-r--r--gcc/ada/s-conca4.adb63
-rw-r--r--gcc/ada/s-conca4.ads45
-rw-r--r--gcc/ada/s-conca5.adb67
-rw-r--r--gcc/ada/s-conca5.ads45
-rw-r--r--gcc/ada/s-conca6.adb71
-rw-r--r--gcc/ada/s-conca6.ads45
-rw-r--r--gcc/ada/s-conca7.adb78
-rw-r--r--gcc/ada/s-conca7.ads47
-rw-r--r--gcc/ada/s-conca8.adb82
-rw-r--r--gcc/ada/s-conca8.ads47
-rw-r--r--gcc/ada/s-conca9.adb86
-rw-r--r--gcc/ada/s-conca9.ads47
-rw-r--r--gcc/ada/s-crc32.adb2
-rw-r--r--gcc/ada/s-crc32.ads2
-rw-r--r--gcc/ada/s-crtl.ads17
-rwxr-xr-xgcc/ada/s-except.adb2
-rw-r--r--gcc/ada/s-except.ads4
-rw-r--r--gcc/ada/s-exctab.adb2
-rw-r--r--gcc/ada/s-exctab.ads2
-rw-r--r--gcc/ada/s-fileio.adb2
-rw-r--r--gcc/ada/s-htable.adb4
-rw-r--r--gcc/ada/s-htable.ads2
-rw-r--r--gcc/ada/s-imenne.adb2
-rw-r--r--gcc/ada/s-imenne.ads2
-rw-r--r--gcc/ada/s-imgenu.adb2
-rw-r--r--gcc/ada/s-imgenu.ads2
-rw-r--r--gcc/ada/s-intman-susv3.adb170
-rw-r--r--gcc/ada/s-mastop.adb2
-rw-r--r--gcc/ada/s-mastop.ads2
-rw-r--r--gcc/ada/s-memory.adb2
-rw-r--r--gcc/ada/s-memory.ads2
-rwxr-xr-xgcc/ada/s-os_lib.adb10
-rwxr-xr-xgcc/ada/s-os_lib.ads2
-rw-r--r--gcc/ada/s-oscons-tmplt.c5
-rw-r--r--gcc/ada/s-osinte-darwin.ads16
-rw-r--r--gcc/ada/s-osinte-linux.ads3
-rw-r--r--gcc/ada/s-osinte-vxworks-kernel.adb249
-rw-r--r--gcc/ada/s-osinte-vxworks.adb35
-rw-r--r--gcc/ada/s-osinte-vxworks.ads16
-rw-r--r--gcc/ada/s-osprim-darwin.adb8
-rw-r--r--gcc/ada/s-osprim-posix.adb8
-rw-r--r--gcc/ada/s-purexc.ads2
-rw-r--r--gcc/ada/s-scaval.adb2
-rw-r--r--gcc/ada/s-secsta.adb2
-rw-r--r--gcc/ada/s-secsta.ads2
-rw-r--r--gcc/ada/s-soflin.adb4
-rw-r--r--gcc/ada/s-soflin.ads40
-rw-r--r--gcc/ada/s-sopco3.adb2
-rw-r--r--gcc/ada/s-sopco3.ads2
-rw-r--r--gcc/ada/s-sopco4.adb2
-rw-r--r--gcc/ada/s-sopco4.ads2
-rw-r--r--gcc/ada/s-sopco5.adb2
-rw-r--r--gcc/ada/s-sopco5.ads2
-rw-r--r--gcc/ada/s-stache.adb2
-rw-r--r--gcc/ada/s-stache.ads2
-rw-r--r--gcc/ada/s-stalib.adb5
-rw-r--r--gcc/ada/s-stalib.ads2
-rw-r--r--gcc/ada/s-stoele.adb2
-rw-r--r--gcc/ada/s-stoele.ads8
-rw-r--r--gcc/ada/s-strcom.adb2
-rw-r--r--gcc/ada/s-strcom.ads2
-rwxr-xr-xgcc/ada/s-string.adb2
-rwxr-xr-xgcc/ada/s-string.ads2
-rw-r--r--gcc/ada/s-strops.adb2
-rw-r--r--gcc/ada/s-strops.ads2
-rw-r--r--gcc/ada/s-ststop.adb2
-rw-r--r--gcc/ada/s-ststop.ads2
-rw-r--r--gcc/ada/s-taprop-hpux-dce.adb29
-rw-r--r--gcc/ada/s-taprop-irix.adb29
-rw-r--r--gcc/ada/s-taprop-linux.adb33
-rw-r--r--gcc/ada/s-taprop-mingw.adb19
-rw-r--r--gcc/ada/s-taprop-posix.adb29
-rw-r--r--gcc/ada/s-taprop-solaris.adb29
-rw-r--r--gcc/ada/s-taprop-tru64.adb30
-rw-r--r--gcc/ada/s-taprop-vms.adb58
-rw-r--r--gcc/ada/s-taprop-vxworks.adb18
-rw-r--r--gcc/ada/s-tasdeb.adb12
-rw-r--r--gcc/ada/s-tasdeb.ads20
-rw-r--r--gcc/ada/s-tasini.adb124
-rw-r--r--gcc/ada/s-taskin.adb57
-rw-r--r--gcc/ada/s-taskin.ads36
-rw-r--r--gcc/ada/s-tasren.adb10
-rw-r--r--gcc/ada/s-tassta.adb47
-rw-r--r--gcc/ada/s-traceb.adb2
-rw-r--r--gcc/ada/s-traceb.ads24
-rw-r--r--gcc/ada/s-traent.adb2
-rw-r--r--gcc/ada/s-traent.ads2
-rwxr-xr-xgcc/ada/s-utf_32.adb2
-rwxr-xr-xgcc/ada/s-utf_32.ads2
-rw-r--r--gcc/ada/s-vxwext-kernel.adb55
-rw-r--r--gcc/ada/s-vxwext-kernel.ads33
-rw-r--r--gcc/ada/s-vxwext-rtp.adb53
-rw-r--r--gcc/ada/s-vxwext-rtp.ads31
-rw-r--r--gcc/ada/s-vxwext.ads29
-rw-r--r--gcc/ada/s-wchcnv.adb2
-rw-r--r--gcc/ada/s-wchcnv.ads2
-rwxr-xr-xgcc/ada/s-wchcon.adb2
-rw-r--r--gcc/ada/s-wchcon.ads2
-rw-r--r--gcc/ada/s-wchjis.adb2
-rw-r--r--gcc/ada/s-wchjis.ads2
-rw-r--r--gcc/ada/s-win32.ads113
-rw-r--r--gcc/ada/sem_attr.adb29
-rw-r--r--gcc/ada/sem_case.adb21
-rw-r--r--gcc/ada/sem_ch10.adb3
-rw-r--r--gcc/ada/sem_ch12.adb277
-rw-r--r--gcc/ada/sem_ch13.adb89
-rw-r--r--gcc/ada/sem_ch3.adb221
-rw-r--r--gcc/ada/sem_ch4.adb48
-rw-r--r--gcc/ada/sem_ch5.adb8
-rw-r--r--gcc/ada/sem_ch6.adb172
-rw-r--r--gcc/ada/sem_ch7.adb426
-rw-r--r--gcc/ada/sem_ch8.adb29
-rw-r--r--gcc/ada/sem_disp.adb17
-rw-r--r--gcc/ada/sem_elim.adb4
-rw-r--r--gcc/ada/sem_eval.adb32
-rw-r--r--gcc/ada/sem_prag.adb28
-rw-r--r--gcc/ada/sem_res.adb3
-rw-r--r--gcc/ada/sem_type.adb2
-rw-r--r--gcc/ada/sem_util.adb993
-rw-r--r--gcc/ada/sem_util.ads51
-rw-r--r--gcc/ada/sem_warn.adb24
-rw-r--r--gcc/ada/sinfo.ads30
-rw-r--r--gcc/ada/sinput-l.adb4
-rw-r--r--gcc/ada/sinput-p.adb67
-rw-r--r--gcc/ada/sinput-p.ads7
-rw-r--r--gcc/ada/snames.ads-tmpl6
-rw-r--r--gcc/ada/sprint.adb21
-rw-r--r--gcc/ada/stand.ads7
-rw-r--r--gcc/ada/sysdep.c105
-rw-r--r--gcc/ada/system-darwin-x86.ads2
-rw-r--r--gcc/ada/system-darwin-x86_64.ads6
-rw-r--r--gcc/ada/system-mingw-x86_64.ads2
-rw-r--r--gcc/ada/targparm.adb6
-rw-r--r--gcc/ada/tbuild.adb9
-rw-r--r--gcc/ada/tracebak.c3
-rw-r--r--gcc/ada/types.ads41
-rw-r--r--gcc/ada/types.h41
-rw-r--r--gcc/ada/xoscons.adb4
-rw-r--r--gcc/bt-load.c7
-rw-r--r--gcc/builtins.def6
-rw-r--r--gcc/c-common.c69
-rw-r--r--gcc/c-common.h3
-rw-r--r--gcc/c-decl.c6
-rw-r--r--gcc/c-opts.c21
-rw-r--r--gcc/c-parser.c107
-rw-r--r--gcc/c-semantics.c2
-rw-r--r--gcc/c-tree.h7
-rw-r--r--gcc/c-typeck.c113
-rw-r--r--gcc/c.opt6
-rw-r--r--gcc/cfglayout.c6
-rw-r--r--gcc/cfgrtl.c20
-rw-r--r--gcc/cgraph.c10
-rw-r--r--gcc/cgraph.h4
-rw-r--r--gcc/cgraphbuild.c8
-rw-r--r--gcc/cgraphunit.c13
-rw-r--r--gcc/combine-stack-adj.c9
-rw-r--r--gcc/combine.c31
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/config.gcc40
-rw-r--r--gcc/config/arm/sfp-machine.h5
-rw-r--r--gcc/config/avr/avr.md77
-rw-r--r--gcc/config/i386/cygwin-stdint.h4
-rw-r--r--gcc/config/mips/mips.c10
-rw-r--r--gcc/config/mips/mips.h9
-rw-r--r--gcc/config/mips/mips.md2
-rw-r--r--gcc/config/mips/xlr.md4
-rw-r--r--gcc/config/rs6000/rs6000.c29
-rw-r--r--gcc/config/rs6000/rs6000.md28
-rw-r--r--gcc/config/s390/s390.h4
-rw-r--r--gcc/config/s390/s390.md2
-rw-r--r--gcc/config/sh/lib1funcs.asm5
-rw-r--r--gcc/config/sh/linux-atomic.asm3
-rw-r--r--gcc/config/sh/predicates.md1
-rw-r--r--gcc/config/sh/sh.h2
-rw-r--r--gcc/config/sh/t-1e1
-rw-r--r--gcc/config/sh/t-linux1
-rw-r--r--gcc/config/sh/t-mlib-sh11
-rw-r--r--gcc/config/sh/t-mlib-sh21
-rw-r--r--gcc/config/sh/t-mlib-sh2a1
-rw-r--r--gcc/config/sh/t-mlib-sh2a-nofpu1
-rw-r--r--gcc/config/sh/t-mlib-sh2a-single1
-rw-r--r--gcc/config/sh/t-mlib-sh2a-single-only1
-rw-r--r--gcc/config/sh/t-mlib-sh2e1
-rw-r--r--gcc/config/sh/t-mlib-sh31
-rw-r--r--gcc/config/sh/t-mlib-sh3e1
-rw-r--r--gcc/config/sh/t-mlib-sh41
-rw-r--r--gcc/config/sh/t-mlib-sh4-nofpu1
-rw-r--r--gcc/config/sh/t-mlib-sh4-single1
-rw-r--r--gcc/config/sh/t-mlib-sh4-single-only1
-rw-r--r--gcc/config/sh/t-mlib-sh4a1
-rw-r--r--gcc/config/sh/t-mlib-sh4a-nofpu1
-rw-r--r--gcc/config/sh/t-mlib-sh4a-single1
-rw-r--r--gcc/config/sh/t-mlib-sh4a-single-only1
-rw-r--r--gcc/config/sh/t-mlib-sh4al1
-rw-r--r--gcc/config/sh/t-mlib-sh5-32media1
-rw-r--r--gcc/config/sh/t-mlib-sh5-32media-nofpu1
-rw-r--r--gcc/config/sh/t-mlib-sh5-64media1
-rw-r--r--gcc/config/sh/t-mlib-sh5-64media-nofpu1
-rw-r--r--gcc/config/sh/t-mlib-sh5-compact1
-rw-r--r--gcc/config/sh/t-mlib-sh5-compact-nofpu1
-rw-r--r--gcc/config/sh/t-sh35
-rwxr-xr-xgcc/configure50
-rw-r--r--gcc/configure.ac10
-rw-r--r--gcc/cp/ChangeLog30
-rw-r--r--gcc/cp/call.c29
-rw-r--r--gcc/cp/cp-tree.h9
-rw-r--r--gcc/cp/cvt.c15
-rw-r--r--gcc/cp/decl.c23
-rw-r--r--gcc/dbxout.c4
-rw-r--r--gcc/debug.c7
-rw-r--r--gcc/debug.h3
-rw-r--r--gcc/df-core.c8
-rw-r--r--gcc/df.h3
-rw-r--r--gcc/doc/extend.texi2
-rw-r--r--gcc/doc/install.texi51
-rw-r--r--gcc/doc/invoke.texi16
-rw-r--r--gcc/doc/tm.texi36
-rw-r--r--gcc/dwarf2out.c57
-rw-r--r--gcc/emit-rtl.c13
-rw-r--r--gcc/except.c151
-rw-r--r--gcc/except.h111
-rw-r--r--gcc/final.c5
-rw-r--r--gcc/function.c15
-rw-r--r--gcc/function.h2
-rw-r--r--gcc/gcc-plugin.h22
-rw-r--r--gcc/gcc.c111
-rw-r--r--gcc/gimple-low.c6
-rw-r--r--gcc/gimple.c233
-rw-r--r--gcc/gimple.h72
-rw-r--r--gcc/haifa-sched.c10
-rw-r--r--gcc/init-regs.c4
-rw-r--r--gcc/integrate.c4
-rw-r--r--gcc/ipa-pure-const.c234
-rw-r--r--gcc/ipa-reference.c81
-rw-r--r--gcc/ipa-struct-reorg.c10
-rw-r--r--gcc/ipa-utils.c16
-rw-r--r--gcc/ipa-utils.h3
-rw-r--r--gcc/ira-color.c16
-rw-r--r--gcc/ira-conflicts.c4
-rw-r--r--gcc/ira-costs.c63
-rw-r--r--gcc/ira-emit.c3
-rw-r--r--gcc/ira-int.h39
-rw-r--r--gcc/ira-lives.c9
-rw-r--r--gcc/ira.c2
-rw-r--r--gcc/jump.c2
-rw-r--r--gcc/main.c2
-rw-r--r--gcc/matrix-reorg.c3
-rw-r--r--gcc/omp-low.c32
-rw-r--r--gcc/passes.c10
-rw-r--r--gcc/plugin-version.c36
-rw-r--r--gcc/plugin.c43
-rw-r--r--gcc/recog.c12
-rw-r--r--gcc/reginfo.c34
-rw-r--r--gcc/reload1.c2
-rw-r--r--gcc/rtl.h7
-rw-r--r--gcc/rtlanal.c22
-rw-r--r--gcc/sdbout.c1
-rw-r--r--gcc/stack-ptr-mod.c4
-rw-r--r--gcc/target-def.h5
-rw-r--r--gcc/target.h3
-rw-r--r--gcc/testsuite/ChangeLog185
-rw-r--r--gcc/testsuite/g++.dg/ext/complit11.C16
-rw-r--r--gcc/testsuite/g++.dg/other/pr39496.C2
-rw-r--r--gcc/testsuite/g++.dg/template/defarg11.C18
-rw-r--r--gcc/testsuite/g++.dg/torture/pr39764.C14
-rw-r--r--gcc/testsuite/g++.dg/warn/Wlogical-op-1.C33
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-13.C7
-rw-r--r--gcc/testsuite/g++.dg/warn/pr36954.C23
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strlen-3.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/Wenum-compare-1.c33
-rw-r--r--gcc/testsuite/gcc.dg/Wlogical-op-1.c50
-rw-r--r--gcc/testsuite/gcc.dg/c99-flex-array-7.c17
-rw-r--r--gcc/testsuite/gcc.dg/c99-restrict-3.c7
-rw-r--r--gcc/testsuite/gcc.dg/call-diag-2.c17
-rw-r--r--gcc/testsuite/gcc.dg/cpp/include5.c9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/line7.c19
-rw-r--r--gcc/testsuite/gcc.dg/cpp/line8.c10
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste16.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/redef4.c499
-rw-r--r--gcc/testsuite/gcc.dg/lvalue-5.c14
-rw-r--r--gcc/testsuite/gcc.dg/lvalue-6.c17
-rw-r--r--gcc/testsuite/gcc.dg/lvalue-7.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr32061.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr36902.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39496.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39804.c31
-rw-r--r--gcc/testsuite/gfortran.dg/chmod_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/chmod_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/chmod_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_denormal_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gamma_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/int_conv_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_3.F903
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_5.F903
-rw-r--r--gcc/testsuite/gfortran.dg/isnan_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/isnan_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_nan.f901
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_42.f901
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_43.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nan_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nan_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nan_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nan_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/open_errors.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr20257.f901
-rw-r--r--gcc/testsuite/gfortran.dg/real_const_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/scalar_mask_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/stat_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/stat_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/vect/pr39318.f902
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/getarg_1.x5
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x4
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x4
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x4
-rw-r--r--gcc/testsuite/gnat.dg/ref_type.adb1
-rw-r--r--gcc/testsuite/gnat.dg/ref_type.ads2
-rw-r--r--gcc/testsuite/gnat.dg/rep_clause3.adb47
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp4
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp2
-rw-r--r--gcc/testsuite/lib/gfortran.exp8
-rw-r--r--gcc/testsuite/lib/gnat.exp4
-rw-r--r--gcc/timevar.h4
-rw-r--r--gcc/toplev.c22
-rw-r--r--gcc/toplev.h2
-rw-r--r--gcc/tree-cfg.c97
-rw-r--r--gcc/tree-complex.c7
-rw-r--r--gcc/tree-dfa.c47
-rw-r--r--gcc/tree-flow-inline.h2
-rw-r--r--gcc/tree-flow.h1
-rw-r--r--gcc/tree-if-conv.c5
-rw-r--r--gcc/tree-into-ssa.c4
-rw-r--r--gcc/tree-iterator.c96
-rw-r--r--gcc/tree-iterator.h3
-rw-r--r--gcc/tree-loop-distribution.c13
-rw-r--r--gcc/tree-mudflap.c12
-rw-r--r--gcc/tree-nomudflap.c4
-rw-r--r--gcc/tree-nrv.c4
-rw-r--r--gcc/tree-object-size.c5
-rw-r--r--gcc/tree-optimize.c20
-rw-r--r--gcc/tree-pass.h5
-rw-r--r--gcc/tree-pretty-print.c62
-rw-r--r--gcc/tree-profile.c2
-rw-r--r--gcc/tree-ssa-alias.c60
-rw-r--r--gcc/tree-ssa-ccp.c436
-rw-r--r--gcc/tree-ssa-dom.c26
-rw-r--r--gcc/tree-ssa-forwprop.c19
-rw-r--r--gcc/tree-ssa-live.c2
-rw-r--r--gcc/tree-ssa-math-opts.c8
-rw-r--r--gcc/tree-ssa-operands.c48
-rw-r--r--gcc/tree-ssa-pre.c8
-rw-r--r--gcc/tree-ssa-propagate.c30
-rw-r--r--gcc/tree-ssa-propagate.h1
-rw-r--r--gcc/tree-ssa-sccvn.c3
-rw-r--r--gcc/tree-ssa-structalias.c10
-rw-r--r--gcc/tree-ssa.c18
-rw-r--r--gcc/tree-ssanames.c7
-rw-r--r--gcc/tree-stdarg.c4
-rw-r--r--gcc/tree-tailcall.c6
-rw-r--r--gcc/tree-vect-generic.c7
-rw-r--r--gcc/tree-vect-loop-manip.c27
-rw-r--r--gcc/tree-vect-loop.c20
-rw-r--r--gcc/tree-vectorizer.c4
-rw-r--r--gcc/tree-vrp.c98
-rw-r--r--gcc/tree.c36
-rw-r--r--gcc/tree.h12
-rw-r--r--gcc/vmsdbgout.c1
510 files changed, 12880 insertions, 6251 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 491608cdd7b..bad6c39ce9c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,762 @@
+2009-04-19 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * config/i386/cygwin-stdint.h (INTPTR_TYPE): Remove "long".
+ (UINTPTR_TYPE): Likewise.
+
+2009-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/37481
+ * c-typeck.c (digest_init): Check for initializing an array with a
+ string literal.
+
+2009-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/19771
+ * c-semantics.c (pop_stmt_list): Propagate
+ STATEMENT_LIST_HAS_LABEL to parent statement list.
+
+2009-04-19 Adam Nemet <anemet@caviumnetworks.com>
+
+ * config/mips/mips.h (mips_tune_attr): New macro.
+ * config/mips/mips.md (cpu): Use it.
+
+2009-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/38243
+ * c-decl.c (shadow_tag_warned): Diagnose use of restrict when
+ declaring a tag.
+
+2009-04-19 Diego Novillo <dnovillo@google.com>
+
+ * toplev.c (compile_file): Move call to coverage_finish ...
+ * cgraphunit.c (ipa_passes): ... here.
+ Call cgraph_process_new_functions.
+ * ipa-utils.c (get_base_var): Handle CONSTRUCTOR.
+ * Makefile.in (cgraphunit.o): Add dependency on COVERAGE_H.
+
+2009-04-19 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (cgraph_create_edge, cgraph_set_call_stmt): Set proper cfun.
+ (dump_cgraph_node): Dump can throw external flag.
+ * ipa-pure-const.c (propagate): Fix propagation of nothrow flags.
+
+2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/32061
+ PR c++/36954
+ * doc/invoke.texi: Add -Wlogical-op to -Wextra.
+ * common.opt (Wlogical-op): Move from here...
+ * c.opt (Wlogical-op): ... to here.
+ * c-typeck.c (parser_build_binary_op): Update call to
+ warn_logical_operator.
+ * c-opts.c (c_common_post_options): Enable warn_logical_op with
+ extra_warnings.
+ * c-common.c (warn_logical_op): Update.
+ * c-common.h (warn_logical_op): Update declaration.
+
+2009-04-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree.c (protected_set_expr_location): Fix formatting.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/27676
+ * c-typeck.c (readonly_warning): new.
+ (build_unary_op, build_modify_expr): Use readonly_warning for
+ storing into something readonly but not const-qualified.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/22367
+ * c-typeck.c (build_unary_op): Check for taking address of
+ expression of type void.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/35210
+ * c-typeck.c (build_function_call): Check for calling a function
+ with qualified void return types. Call require_complete_type when
+ generating a trap.
+
+2009-04-18 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (cgraph_make_edge, dump_cgraph_node, cgraph_set_call_stmt):
+ Set nothrow flag.
+ * cgraph.h (struct function): Reduce loop_nest to 30 bits; add
+ can_throw_external flag.
+ * ipa-reference.c (ipa_utils_reduced_inorder): Update call.
+ * ipa-pure-const.c (ignore_edge): New function.
+ (propagate): Compute order for NOTHROW computation; set NOTHROWs
+ only over can_throw_external edges.
+ (local_pure_const): Add nothrow flag.
+ * ipa-utils.c (searchc): Add ignore_edge callback.
+ (ipa_utils_reduced_inorder): Add ignore_edge callback.
+ * ipa-utils.h (ipa_utils_reduced_inorder): Update prototype.
+ (set_nothrow_function_flags): Update cgraph.
+ * tree-cfg.c (verify_stmt): Relax nothrow checking when in IPA mode.
+
+2009-04-18 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/39804
+ * tree-ssa-ccp.c (fold_stmt_1): New function factored from ...
+ (fold_stmt): ... this and ...
+ (fold_stmt_inplace): ... this.
+ (fold_stmt_1): Fold references in calls and asms.
+ * tree-cfg.c (remove_useless_stmts_cond): Use fold_stmt.
+
+2009-04-18 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree-vrp.c (ssa_name_nonzero_p): Remove.
+ * tree.h: Remove the prototype for ssa_name_nonzero_p.
+
+2009-04-18 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree.c (function_args_count): Remove.
+ * tree.h: Remove the prototype for function_args_count.
+
+2009-04-18 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree-iterator.c (expr_only): Remove.
+ * tree.h: Remove the prototype for expr_only.
+
+2009-04-18 Kazu Hirata <kazu@codesourcery.com>
+
+ * reginfo.c (cannot_change_mode_set_regs): Remove.
+ * rtl.h: Remove the prototype for cannot_change_mode_set_regs.
+
+2009-04-08 Anatoly Sokolov <aesok@post.ru>
+
+ * config/avr/avr.md (*rotlsi3_8, *rotlsi3_16, *rotlsi3_24 ): Check
+ whether operands 0 and 1 overlaps.
+
+2009-04-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR middle-end/36902
+ * tree-vrp.c (check_array_ref): Pass a location_t instead of a
+ pointer. Use warning_at instead of warning.
+ (search_for_addr_array): Likewise.
+ (check_array_bounds): Likewise.
+ (check_all_array_refs): Check that the incoming edge is not in the
+ list of edges to be removed.
+ (check_all_array_refs): Avoid the temporal pointer.
+ (vrp_visit_cond_stmt): Fix typo.
+ (simplify_switch_using_ranges): Handle the case where the switch
+ index is an integer constant.
+
+2009-04-18 Adam Nemet <anemet@caviumnetworks.com>
+
+ * config/mips/mips.c (mips_final_postscan_insn): Make it static.
+
+2009-04-18 Kazu Hirata <kazu@codesourcery.com>
+
+ * doc/extend.texi, doc/invoke.texi: Fix typos.
+
+2009-04-17 Cary Coutant <ccoutant@google.com>
+
+ * tree-flow-inline.h (get_lineno): Fix inverted test.
+
+2009-04-17 Diego Novillo <dnovillo@google.com>
+
+ * tree-ssa-pre.c (create_expression_by_pieces): Remove
+ assertion for AVAIL_OUT.
+
+2009-04-17 Mike Frysinger <vapier@gentoo.org>
+
+ PR target/38627
+ * config/sh/lib1funcs.asm [__ELF__ && __linux__]: Add .note.GNU-stack.
+ * config/sh/linux-atomic.asm: Likewise.
+
+2009-04-17 Diego Novillo <dnovillo@google.com>
+
+ * except.c (debug_eh_tree): New.
+ (struct eh_region, struct eh_status): Move ...
+ * except.h: ... here.
+ (add_type_for_runtime): Declare extern.
+ (lookup_type_for_runtime): Likewise.
+ (debug_eh_tree): Declare.
+ * Makefile.in (GTFILES): List except.h before except.c
+
+2009-04-17 Diego Novillo <dnovillo@google.com>
+
+ * omp-low.c (create_omp_child_function): Set DECL_CONTEXT
+ for DECL.
+ * cgraphunit.c (cgraph_build_static_cdtor): Likewise.
+ * tree-dfa.c (find_referenced_vars_in): Factor out of ...
+ (find_vars_r): ... here.
+ * tree-flow.h (find_referenced_vars_in): Declare.
+ * tree-ssa-pre.c (create_expression_by_pieces): Assert
+ that AVAIL_OUT exists for BLOCK.
+ * Makefile.in (CGRAPH_H): Add dependency on cif-code.def
+ (tree-loop-distribution.o): Fix dependency on TREE_VECTORIZER_H.
+ (tree-parloops.o): Likewise.
+
+2009-04-17 Simon Baldwin <simonb@google.com>
+
+ * toplev.c (default_tree_printer): Add handling for %E format.
+
+2009-04-17 Diego Novillo <dnovillo@google.com>
+
+ * tree-pretty-print.c (dump_generic_node): Add break
+ after TREE_BINFO handler.
+ Handle COMPLEX_TYPE, REAL_TYPE and FIXED_POINT_TYPE
+ Handle NULL TREE_TYPEs.
+ Handle METHOD_TYPE and FUNCTION_TYPE together.
+ Call print_struct_decl when printing structures and
+ TDF_SLIM is not given.
+ (print_struct_decl): Fix logic for detecting recursion.
+
+2009-04-17 Rafael Avila de Espindola <espindola@google.com>
+
+ PR 31567
+ * gcc.c (create_at_file): New.
+ (compile_input_file_p): New.
+ (do_spec_1): Use @args files for %i. Use create_at_file for %o.
+ * main.c (main): Update call to toplev_main.
+ * toplev.c (toplev_main): Change signature. Call expandargv.
+ * toplev.h (toplev_main): Change signature.
+
+2009-04-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * dwarf2out.c (field_byte_offset): Use the type size as the field size
+ if the latter is not constant.
+
+2009-04-17 David Edelsohn <edelsohn@gnu.org>
+
+ * dbxout.c (xcoff_debug_hooks): Add set_name_debug_nothing.
+
+2009-04-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * dbxout.c (dbxout_block): Reinstate test on TREE_USED.
+ * tree-ssa-live.c (remove_unused_scope_block_p): Update TREE_USED bit.
+
+2009-04-17 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-structalias.c (get_constraint_for_component_ref):
+ Handle component references view-converting an invariant address.
+
+2009-04-17 Adam Nemet <anemet@caviumnetworks.com>
+
+ * doc/tm.texi (TARGET_DEFAULT_TARGET_FLAGS,
+ TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET,
+ TARGET_HAVE_SRODATA_SECTION, TARGET_HAVE_TLS,
+ TARGET_UNWIND_TABLES_DEFAULT, TARGET_TERMINATE_DW2_EH_FRAME_INFO):
+ Use @deftypevr rather than @deftypevar.
+
+2009-04-17 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-forwprop.c (get_prop_dest_stmt): Clean up
+ tuplification.
+ (get_prop_source_stmt): Likewise.
+ (can_propagate_from): Likewise.
+
+2009-04-17 Andrew Stubbs <ams@codesourcery.com>
+
+ * configure.ac: Add new AC_SUBST for TM_ENDIAN_CONFIG,
+ TM_MULTILIB_CONFIG and TM_MULTILIB_EXCEPTIONS_CONFIG.
+ (--with-multilib-list): Add default value.
+ * configure: Regenerate.
+ * Makefile.in (TM_ENDIAN_CONFIG): Define.
+ (TM_MULTILIB_CONFIG, TM_MULTILIB_EXCEPTIONS_CONFIG): Define.
+ * config.gcc (sh-*-*): Switch to using TM_ENDIAN_CONFIG,
+ TM_MULTILIB_CONFIG, and TM_MULTILIB_EXCEPTIONS_CONFIG.
+ Don't add default cpu to multilib list unnecessarily, but do enable
+ the relevant compiler option..
+ Add support for --with-multilib-list=<blank> and
+ --with-multilib-list=!<somelib> to supress unwanted multilibs.
+ * config/sh/t-sh (DEFAULT_ENDIAN, OTHER_ENDIAN): New variables.
+ (MULTILIB_ENDIAN, MULTILIB_CPUS): Delete variables.
+ (MULTILIB_OPTIONS): Redefine using OTHER_ENDIAN and
+ TM_MULTILIB_CONFIG.
+ (MULTILIB_EXCEPTIONS): Add TM_MULTILIB_EXCEPTIONS_CONFIG.
+ (MULTILIB_OSDIRNAMES): New variable.
+ * config/sh/t-1e: Delete file.
+ * config/sh/t-mlib-sh1: Delete file.
+ * config/sh/t-mlib-sh2: Delete file.
+ * config/sh/t-mlib-sh2a: Delete file.
+ * config/sh/t-mlib-sh2a-nofpu: Delete file.
+ * config/sh/t-mlib-sh2a-single: Delete file.
+ * config/sh/t-mlib-sh2a-single-only: Delete file.
+ * config/sh/t-mlib-sh2e: Delete file.
+ * config/sh/t-mlib-sh3e: Delete file.
+ * config/sh/t-mlib-sh4: Delete file.
+ * config/sh/t-mlib-sh4-nofpu: Delete file.
+ * config/sh/t-mlib-sh4-single: Delete file.
+ * config/sh/t-mlib-sh4-single-only: Delete file.
+ * config/sh/t-mlib-sh4a: Delete file.
+ * config/sh/t-mlib-sh4a-nofpu: Delete file.
+ * config/sh/t-mlib-sh4a-single: Delete file.
+ * config/sh/t-mlib-sh4a-single-only: Delete file.
+ * config/sh/t-mlib-sh4al: Delete file.
+ * config/sh/t-mlib-sh5-32media: Delete file.
+ * config/sh/t-mlib-sh5-32media-nofpu: Delete file.
+ * config/sh/t-mlib-sh5-64media: Delete file.
+ * config/sh/t-mlib-sh5-64media-nofpu: Delete file.
+ * config/sh/t-mlib-sh5-compact: Delete file.
+ * config/sh/t-mlib-sh5-compact-nofpu: Delete file.
+ * config/sh/t-linux: Don't override MULTILIB_EXCEPTIONS.
+ * doc/install.texi (Options specification): Add
+ --with-multilib-list and --with-endian.
+
+2009-04-17 Rafael Avila de Espindola <espindola@google.com>
+
+ * Makefile.in (REVISION_s): Always include quotes. Change ifdef to use
+ REVISION_c.
+ (OBJS-common): Add plugin-version.o.
+ (plugin-version.o): New.
+ * gcc-plugin.h (plugin_gcc_version): New.
+ (plugin_default_version_check): New.
+ (plugin_init_func, plugin_init): Add version argument.
+ * plugin-version.c: New.
+ * plugin.c (str_plugin_gcc_version_name): New.
+ (try_init_one_plugin): Read plugin_gcc_version from the plugin and
+ pass it to the init function.
+ (plugin_default_version_check): New.
+
+2009-04-17 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-alias.c (refs_may_alias_p_1): Do not use TBAA
+ for decl-vs-decl disambiguation.
+
+2009-04-17 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * config/s390/s390.h (s390_tune_attr): New macro definition.
+ * config/s390/s390.md (cpu attribute): Map to s390_tune_attr.
+
+2009-04-17 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-ccp.c (struct fold_stmt_r_data): Remove.
+ (fold_stmt_r): Likewise.
+ (maybe_fold_reference): New function.
+ (fold_gimple_assign): Handle cases fold_stmt_r did.
+ (fold_stmt): Do not use fold_stmt_r.
+ (fold_stmt_inplace): Likewise.
+
+2009-04-17 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-dom.c (gimple_assign_unary_useless_conversion_p): Remove.
+ (record_equivalences_from_stmt): Remove useless checks and
+ simplifications.
+ * tree-ssa-pre.c (eliminate): Avoid converting a constant if
+ the type is already suitable.
+
+2009-04-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * config/sh/sh.h (FUNCTION_VALUE): Fix call to sh_promote_prototypes.
+
+2009-04-17 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/arm/sfp-machine.h (__gcc_CMPtype): New typedef.
+ (CMPtype): Define as __gcc_CMPtype.
+
+2009-04-17 Aurelien Jarno <aurelien@aurel32.net>
+
+ * config.gcc: Add soft-fp/t-softfp and i386/t-linux to tmake_file
+ for i[34567]86-*-kfreebsd*-gnu*, x86_64-*-kfreebsd*-gnu*.
+
+2009-04-17 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39746
+ * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Remove
+ special-casing for builtins and static variable use/def.
+ (call_may_clobber_ref_p_1): Likewise.
+
+2009-04-16 Ian Lance Taylor <iant@google.com>
+
+ * df.h: Include "timevar.h".
+ (struct df_problem): Change tv_id field to timevar_id_t.
+ * tree-pass.h: Include "timevar.h".
+ (struct opt_pass): Change tv_id field to timevar_id_t.
+ * timevar.h (timevar_id_t): Define TV_NONE.
+ * passes.c (execute_one_ipa_transform_pass): Check for tv_id !=
+ TV_NONE rather than tv_id != 0.
+ (execute_one_pass): Likewise.
+ * Makefile.in (DF_H): Add $(TIMEVAR_H).
+ (TREE_PASS_H): Define. Change all instances of tree-pass.h in
+ dependencies to $(TREE_PASS_H).
+ * bt-load.c (pass_branch_target_load_optimize1): Set tv_id field
+ to TV_NONE.
+ (pass_branch_target_load_optimize2): Likewise.
+ * cfglayout.c (pass_into_cfg_layout_mode): Likewise.
+ (pass_outof_cfg_layout_mode): Likewise.
+ * cgraphbuild.c (pass_remove_cgraph_callee_edges): Likewise.
+ (pass_rebuild_cgraph_edges): Likewise.
+ (pass_remove_cgraph_callee_edges): Likewise.
+ * df-core.c (pass_df_initialize_opt): Likewise.
+ (pass_df_initialize_no_opt): Likewise.
+ (pass_df_finish): Likewise.
+ * emit-rtl.c (pass_unshare_all_rtl): Likewise.
+ * except.c (pass_set_nothrow_function_flags): Likewise.
+ (pass_convert_to_eh_region_ranges): Likewise.
+ * final.c (pass_compute_alignments): Likewise.
+ * function.c (pass_instantiate_virtual_regs): Likewise.
+ (pass_init_function): Likewise.
+ (pass_leaf_regs): Likewise.
+ (pass_match_asm_constraints): Likewise.
+ * gimple-low.c (pass_lower_cf): Likewise.
+ (pass_mark_used_blocks): Likewise.
+ * init-regs.c (pass_initialize_regs): Likewise.
+ * integrate.c (pass_initial_value_sets): Likewise.
+ * ira.c (pass_ira): Likewise.
+ * jump.c (pass_cleanup_barriers): Likewise.
+ * omp-low.c (pass_expand_omp): Likewise.
+ (pass_lower_omp): Likewise.
+ * matrix-reorg.c (pass_ipa_matrix_reorg): Likewise.
+ * recog.c (pass_split_all_insns): Likewise.
+ (pass_split_after_reload): Likewise.
+ (pass_split_before_regstack): Likewise.
+ (pass_split_before_sched2): Likewise.
+ (pass_split_for_shorten_branches): Likewise.
+ * reginfo.c (pass_reginfo_init): Likewise.
+ (pass_subregs_of_mode_init): Likewise.
+ (pass_subregs_of_mode_finish): Likewise.
+ * passes.c (pass_postreload): Likewise.
+ * stack-ptr-mod.c (pass_stack_ptr_mod): Likewise.
+ * tree-cfg.c (pass_remove_useless_stmts): Likewise.
+ (pass_warn_function_return): Likewise.
+ (pass_warn_function_noreturn): Likewise.
+ * tree-complex.c (pass_lower_complex): Likewise.
+ (pass_lower_complex_O0): Likewise.
+ * tree-if-conv.c (pass_if_conversion): Likewise.
+ * tree-into-ssa.c (pass_build_ssa): Likewise.
+ * tree-mudflap.c (pass_mudflap_1): Likewise.
+ (pass_mudflap_2): Likewise.
+ * tree-nomudflap.c (pass_mudflap_1): Likewise.
+ (pass_mudflap_2): Likewise.
+ * tree-nrv.c (pass_return_slot): Likewise.
+ * tree-object-size.c (pass_object_sizes): Likewise.
+ * tree-optimize.c (pass_all_optimizations): Likewise.
+ (pass_early_local_passes): Likewise.
+ (pass_all_early_optimizations): Likewise.
+ (pass_cleanup_cfg): Likewise.
+ (pass_cleanup_cfg_post_optimizing): Likewise.
+ (pass_free_datastructures): Likewise.
+ (pass_free_cfg_annotations): Likewise.
+ (pass_fixup_cfg): Likewise.
+ (pass_init_datastructures): Likewise.
+ * tree-ssa.c (pass_early_warn_uninitialized): Likewise.
+ (pass_late_warn_uninitialized): Likewise.
+ (pass_update_address_taken): Likewise.
+ * tree-ssa-ccp.c (pass_fold_builtins): Likewise.
+ * tree-ssa-math-opts.c (pass_cse_reciprocals): Likewise.
+ (pass_cse_sincos): Likewise.
+ (pass_convert_to_rsqrt): Likewise.
+ * tree-ssa-structalias.c (pass_build_alias): Likewise.
+ * tree-stdarg.c (pass_stdarg): Likewise.
+ * tree-tailcall.c (pass_tail_recursion): Likewise.
+ (pass_tail_calls): Likewise.
+ * tree-vect-generic.c (pass_lower_vector): Likewise.
+ (pass_lower_vector_ssa): Likewise.
+ * tree-vectorizer.c (pass_ipa_increase_alignment): Likewise.
+
+2009-04-16 Joseph Myers <joseph@codesourcery.com>
+
+ * config/mips/mips.c (mips_rtx_cost_data): Use SOFT_FP_COSTS in
+ XLR entry.
+ * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC, MIPS_ARCH_FLOAT_SPEC):
+ Handle -march=xlr.
+ * config/mips/xlr.md (ir_xlr_alu): Also accept insn types move,
+ logical and signext.
+
+2009-04-16 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/39767
+ * config/sh/predicates.md (arith_operand): Check if the operand
+ of TRUNCATE is a REG.
+
+2009-04-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * cfgrtl.c (delete_insn_chain_and_edges): Remove.
+ * rtl.h: Remove the prototype for delete_insn_chain_and_edges.
+
+2009-04-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree-iterator.c (tsi_split_statement_list_after,
+ tsi_split_statement_list_before): Remove.
+ * tree-iterator.h: Remove the prototypes for
+ tsi_split_statement_list_after and tsi_split_statement_list_before.
+
+2009-04-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree-ssa-propagate.c (stmt_makes_single_load): Remove.
+ * tree-ssa-propagate.h: Remove the prototype for
+ stmt_makes_single_load.
+
+2009-04-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * emit-rtl.c (set_mem_attrs_from_reg): Remove.
+ * rtl.h: Remove the prototype for set_mem_attrs_from_reg.
+
+2009-04-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree-iterator.c (EXPR_LAST_BODY): Remove.
+
+2009-04-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * except.c (eh_region_outer_p): Remove.
+ * except.h: Remove the prototype for eh_region_outer_p.
+
+2009-04-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * function.c (current_function_assembler_name): Remove.
+ * function.h: Remove the prototype for
+ current_function_assembler_name.
+
+2009-04-16 Ian Lance Taylor <iant@google.com>
+
+ * rtlanal.c (alloc_reg_note): New function, broken out of add_reg_note.
+ (add_reg_note): Call alloc_reg_note.
+ * rtl.h (alloc_reg_note): Declare.
+ * combine.c (try_combine): Use alloc_reg_note.
+ (recog_for_combine, move_deaths): Likewise.
+ (distribute_notes): Use alloc_reg_note and add_reg_note.
+ * haifa-sched.c (sched_create_recovery_edges): Use add_reg_note.
+ * combine-stack-adj.c (adjust_frame_related_expr): Likewise.
+ * reload1.c (eliminate_regs_1): Use alloc_reg_note.
+
+2009-04-16 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/39762
+ * ira-int.h (ira_register_move_cost, ira_may_move_in_cost,
+ ira_may_move_out_cost): Add comments about way of their usage.
+ (ira_get_register_move_cost, ira_get_may_move_cost): New functions.
+
+ * ira-conflicts.c (process_regs_for_copy): Use function
+ ira_get_register_move_cost instead of global
+ ira_register_move_cost.
+
+ * ira-color.c (update_copy_costs, calculate_allocno_spill_cost,
+ color_pass, move_spill_restore, update_curr_costs): Ditto.
+
+ * ira-lives.c (process_single_reg_class_operands): Ditto.
+
+ * ira-emit.c (emit_move_list): Ditto.
+
+ * ira-costs.c (copy_cost): Don't call ira_init_register_move_cost.
+ (record_reg_classes): Ditto. Use functions
+ ira_get_register_move_cost and ira_get_may_move_cost instead of
+ global vars ira_register_move_cost, ira_may_move_out_cost and
+ ira_may_move_in_cost.
+ (record_address_regs): Don't call ira_init_register_move_cost.
+ Use function ira_get_may_move_cost instead of global
+ ira_may_move_in_cost.
+ (process_bb_node_for_hard_reg_moves): Use function
+ ira_get_register_move_cost instead of global ira_register_move_cost.
+ (ira_costs): Don't call ira_init_register_move_cost.
+
+2009-04-16 Richard Guenther <rguenther@suse.de>
+
+ * tree-cfg.c (verify_gimple_assign_binary):
+ Allow POINTER_PLUS_EXPR-like PLUS_EXPR for vectors.
+ * ipa-struct-reorg.c (gen_size): Fold the built expressions.
+ (create_general_new_stmt): Note that this function is broken.
+
+2009-04-16 Rafael Avila de Espindola <espindola@google.com>
+
+ * common.opt (fhelp): Add Var(help_flag).
+ * gcc-plugin.h (plugin_info): Add help.
+ * plugin.c (plugin_name_args): Add help.
+ (register_plugin_info): Set plugin->help.
+ (print_help_one_plugin): New.
+ (print_plugins_help): New.
+ * plugin.h (print_plugins_help): New.
+ * toplev.c (toplev_main): Call print_plugins_help if needed.
+
+2009-04-16 Richard Guenther <rguenther@suse.de>
+
+ * gimple.c (gimple_copy): Do not clear addresses_taken bitmap.
+ (gimple_ior_addresses_taken_1): New function.
+ (gimple_ior_addresses_taken): Likewise.
+ * gimple.h (struct gimple_statement_with_ops_base): Remove
+ addresses_taken member.
+ (gimple_ior_addresses_taken): Declare.
+ (gimple_addresses_taken, gimple_addresses_taken_ptr,
+ gimple_set_addresses_taken): Remove.
+ * ipa-reference.c (mark_address): New function.
+ (scan_stmt_for_static_refs): Use it for marking addresses taken.
+ * tree-ssa-operands.c (add_to_addressable_set): Rename to ...
+ (mark_address_taken): ... this. Just set TREE_ADDRESSABLE.
+ (gimple_add_to_addresses_taken): Remove.
+ (get_tmr_operands): Call mark_address_taken.
+ (get_asm_expr_operands): Likewise.
+ (get_expr_operands): Likewise.
+ (build_ssa_operands): Do not clear the addresses_taken bitmap.
+ (free_stmt_operands): Do not free it.
+ * tree-ssa.c (delete_tree_ssa): Likewise.
+ (execute_update_addresses_taken): Use gimple_ior_addresses_taken.
+
+2009-04-16 Richard Guenther <rguenther@suse.de>
+
+ * gimple.h (walk_stmt_load_store_addr_ops): Declare.
+ (walk_stmt_load_store_ops): Likewise.
+ * gimple.c (get_base_loadstore): New function.
+ (walk_stmt_load_store_addr_ops): Likewise.
+ (walk_stmt_load_store_ops): Likewise.
+ * ipa-pure-const.c (check_op): Simplify.
+ (check_load, check_store): New functions.
+ (check_stmt): Use walk_stmt_load_store_ops.
+ * ipa-reference.c (mark_load): Adjust signature.
+ (mark_store): Likewise.
+ (scan_stmt_for_static_refs): Use walk_stmt_load_store_addr_ops.
+
+2009-04-16 Rafael Avila de Espindola <espindola@google.com>
+
+ * gcc-plugin.h (plugin_event): Add PLUGIN_INFO.
+ (plugin_info): New.
+ * opts.c (common_handle_option): Don't call print_version.
+ * plugin.c (plugin_name_args): Add version.
+ (register_plugin_info): New.
+ (register_callback): Handle PLUGIN_INFO.
+ (try_init_one_plugin): New.
+ (init_one_plugin): Use try_init_one_plugin. Only free plugin_name_args
+ if failed to init.
+ (finalize_one_plugin): New.
+ (finalize_plugins): New.
+ (print_one_plugin): New.
+ (print_plugins_versions): New.
+ * plugin.h (print_plugins_versions): New.
+ (finalize_plugins): New.
+ * toplev.c (compile_file): Don't call initialize_plugins.
+ (print_version): Call print_plugins_versions.
+ (toplev_main): Call initialize_plugins. Print version if needed.
+ Call finalize_plugins.
+
+2009-04-16 Rafael Avila de Espindola <espindola@google.com>
+
+ * common.opt (fversion): New.
+ * gcc.c (print_version): New.
+ (process_command): Don't print the version. Just set print_version.
+ (main): Print version. Call subprocesses if print_version and
+ verbose_flag are set.
+ * opts.c (common_handle_option): Handle OPT_fversion.
+
+2009-04-16 Richard Guenther <rguenther@suse.de>
+ Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/39698
+ * tree-vect-loop.c (get_initial_def_for_reduction): Use the
+ type of the reduction variable. Only generate the def if
+ it is needed.
+
+ * omp-low.c (expand_omp_for_generic): When converting to a pointer
+ make sure to first convert to an integer of the same precision.
+ * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Retain
+ the type of the evolution correctly in computing the new
+ induction variable base.
+
+2009-04-16 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/39625
+ * tree-cfg.c (make_blocks): Split statements with to-be
+ abnormal SSA names on the lhs.
+
+2009-04-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * c-common.c (vector_targets_convertible_p, vector_types_convertible_p):
+ Use TYPE_VECTOR_OPAQUE instead of targetm.vector_opaque_p.
+ * c-typeck.c (really_start_incremental_init): Likewise.
+ * target-def.h (TARGET_VECTOR_OPAQUE_P): Remove.
+ (TARGET_INITIALIZER): Remove it.
+ * target.h (struct target): Remove vector_opaque_p.
+ * tree.c (build_opaque_vector_type): New.
+ * tree.h (TYPE_VECTOR_OPAQUE): New.
+ (build_opaque_vector_type): Declare.
+ * doc/tm.texi (TARGET_VECTOR_OPAQUE_P): Remove.
+ * config/rs6000/rs6000.c (build_opaque_vector_type,
+ rs6000_is_vector_type, TARGET_VECTOR_OPAQUE_P): Remove.
+ (rs6000_init_builtins): Use build_opaque_vector_type for
+ opaque_V4SI_type_node.
+
+2009-04-15 Catherine Moore <clm@codesourcery.com>
+
+ * debug.h (set_name): Declare.
+ * dwarf2out.c (dwarf2out_set_name): Declare.
+ (dwarf2_debug_hooks): Add set_name.
+ (find_AT_string): New.
+ (add_AT_string): Call find_AT_string.
+ (dwarf2out_set_name): New.
+ * cp/decl.c (grokdeclarator): Call set_name.
+ * vmsdbgout.c (vmsdbg_debug_hooks): Add set_name_debug_nothing.
+ * debug.c (do_nothing_debug_hooks): Likewise.
+ * dbxout.c (dbx_debug_hooks): Likewise.
+ * sdbout.c (sdb_debug_hooks): Likewise.
+
+2009-04-15 Michael Eager <eager@eagercon.com>
+
+ * config/rs6000/rs6000.c (rs6000_function_value): Set function return
+ reg for single-precision FPU.
+ * config/rs6000/rs6000.md (movsi_internal1): Only for
+ !TARGET_SINGLE_FPU.
+ (movsi_internal1_single): New. Add pattern to move SI values to/from
+ single-precision FP regs.
+
+2009-04-15 Richard Guenther <rguenther@suse.de>
+
+ * omp-low.c (lower_rec_input_clauses): Build correct address
+ expressions.
+ (expand_omp_for_generic): Fix multiplication type.
+ * tree-loop-distribution.c (build_size_arg): Build a size_t argument.
+ (generate_memset_zero): Fix types.
+ * tree-profile.c (prepare_instrumented_value): Correctly
+ widen a pointer.
+
+2009-04-15 Ian Lance Taylor <iant@google.com>
+
+ * c.opt (Wenum-compare): Enable for C and Objc. Initialize to -1.
+ * c-opts.c (c_common_handle_option): For C, set warn_enum_compare
+ for -Wall and for -Wc++-compat.
+ (c_common_post_options): For C++, set warn_enum_compare if not
+ already set.
+ * c-tree.h (struct c_expr): Add field original_type.
+ (build_external_ref): Update declaration.
+ * c-parser.c (c_parser_braced_init): Set original_type.
+ (c_parser_initelt): Likewise.
+ (c_parser_expr_no_commas): Likewise.
+ (c_parser_conditional_expression): Likewise.
+ (c_parser_cast_expression): Likewise.
+ (c_parser_unary_expression): Likewise. Pull setting of
+ original_code to top of function.
+ (c_parser_sizeof_expression): Set original_type.
+ (c_parser_alignof_expression): Likewise.
+ (c_parser_postfix_expression): Likewise. Pull setting of
+ original_code to top of function.
+ (c_parser_postfix_expression_after_paren_type): Set original_type.
+ (c_parser_postfix_expression_after_primary): Likewise.
+ (c_parser_expression): Likewise.
+ * c-typeck.c (build_external_ref): Add type parameter. Change all
+ callers.
+ (c_expr_sizeof_expr): Set original_type field.
+ (parser_build_unary_op): Likewise.
+ (parser_build_binary_op): Likewise. Optionally warn about
+ comparisons of enums of different types.
+ (digest_init): Set original_type field.
+ (really_start_incremental_init): Likewise.
+ (push_init_level, pop_init_level): Likewise.
+ * doc/invoke.texi (Warning Options): -Wenum-compare now
+ supported in C.
+
+2009-04-15 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-pre.c (eliminate): When replacing a PHI node carry
+ out a necessary conversion.
+ * tree-ssa-sccvn.c (run_scc_vn): Also assign value-ids to
+ names we didn't value number.
+ * tree-mudflap.c (mf_build_check_statement_for): Use correct types.
+
+2009-04-15 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39764
+ * tree-ssa-ccp.c (get_value): Canonicalize value with
+ canonicalize_float_value.
+
+2009-04-15 Jan Hubicka <jh@suse.cz>
+
+ * builtins.def (va_start, va_end, va_copy): Fix my previous commit.
+ Wrong version of patch.
+
+2009-04-15 Jan Hubicka <jh@suse.cz>
+
+ * builtins.def (va_start, va_end, va_copy): Mark nothrow.
+
2009-04-15 Nathan Sidwell <nathan@codesourcery.com>
* config/rs6000/rs6000.c (rs6000_init_builtins): Set TYPE_NAME of
@@ -86,10 +845,9 @@
2009-04-14 Rafael Avila de Espindola <espindola@google.com>
Merge:
-
2008-12-19 Diego Novillo <dnovillo@google.com>
- * cgraph.c (dump_cgraph_node): Show memory address of NODE.
+ * cgraph.c (dump_cgraph_node): Show memory address of NODE.
2000-04-14 Richard Guenther <rguenther@suse.de>
@@ -178,7 +936,7 @@
* doc/install.texi: Correct description of default directory for
--with-gxx-include-dir.
-2009-04-12 Eric Botcazou <ebotcazou@adacore.com>
+2009-04-12 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c (build_range_check): Properly deal with enumeral and
boolean base types.
@@ -1871,7 +2629,7 @@
2009-04-02 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
- * c-decl.c: (clone_underlying_type): Move this ...
+ * c-decl.c (clone_underlying_type): Move this ...
* c-common.c (set_underlying_type): ... here.
Also, make sure the function properly sets TYPE_STUB_DECL() on
the newly created typedef variant type.
diff --git a/gcc/ChangeLog.plugins b/gcc/ChangeLog.plugins
index 952d3c369ec..ee4d073b72e 100644
--- a/gcc/ChangeLog.plugins
+++ b/gcc/ChangeLog.plugins
@@ -1,3 +1,10 @@
+2009-04-20 Rafael Avila de Espindola <espindola@google.com>
+
+ Merge with mainline @146369.
+
+ * configure.ac (ACX_PKGVERSION): Update.
+ * configure: Regenerate.
+
2009-04-16 Rafael Avila de Espindola <espindola@google.com>
* toplev.c (compile_file): Remove call to initialize_plugins.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index bcd21404ce6..599fa05002a 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20090415
+20090420
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 3b748d4fd23..f4f6764aff8 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -403,6 +403,9 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
xmake_file=@xmake_file@
tmake_file=@tmake_file@
+TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
+TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
+TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
out_file=$(srcdir)/config/@out_file@
out_object_file=@out_object_file@
md_file=$(srcdir)/config/@md_file@
@@ -780,7 +783,7 @@ BUGURL_TEXI := @REPORT_BUGS_TEXI@
ifdef REVISION_c
REVISION_s := "\"$(if $(DEVPHASE_c), $(REVISION_c))\""
else
-REVISION_s :=
+REVISION_s := "\"\""
endif
# Shorthand variables for dependency lists.
@@ -829,8 +832,8 @@ CFGLOOP_H = cfgloop.h $(BASIC_BLOCK_H) $(RTL_H) vecprim.h double-int.h
IPA_UTILS_H = ipa-utils.h $(TREE_H) $(CGRAPH_H)
IPA_REFERENCE_H = ipa-reference.h $(BITMAP_H) $(TREE_H)
IPA_TYPE_ESCAPE_H = ipa-type-escape.h $(TREE_H)
-CGRAPH_H = cgraph.h $(TREE_H) $(BASIC_BLOCK_H)
-DF_H = df.h $(BITMAP_H) $(BASIC_BLOCK_H) alloc-pool.h
+CGRAPH_H = cgraph.h $(TREE_H) $(BASIC_BLOCK_H) cif-code.def
+DF_H = df.h $(BITMAP_H) $(BASIC_BLOCK_H) alloc-pool.h $(TIMEVAR_H)
RESOURCE_H = resource.h hard-reg-set.h $(DF_H)
DDG_H = ddg.h sbitmap.h $(DF_H)
GCC_H = gcc.h version.h
@@ -854,7 +857,8 @@ MKDEPS_H = $(srcdir)/../libcpp/include/mkdeps.h
SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h $(OBSTACK_H)
CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h
CPP_INTERNAL_H = $(srcdir)/../libcpp/internal.h $(CPP_ID_DATA_H)
-TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) tree-pass.h
+TREE_PASS_H = tree-pass.h $(TIMEVAR_H)
+TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) $(TREE_PASS_H)
TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
$(BITMAP_H) $(BASIC_BLOCK_H) hard-reg-set.h $(GIMPLE_H) \
$(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H) \
@@ -1153,6 +1157,7 @@ OBJS-common = \
params.o \
passes.o \
plugin.o \
+ plugin-version.o \
pointer-set.o \
postreload-gcse.o \
postreload.o \
@@ -2002,7 +2007,7 @@ gcc-options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) opts.h intl
dumpvers: dumpvers.c
-ifdef REVISION_s
+ifdef REVISION_c
version.o: version.c version.h $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
else
version.o: version.c version.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
@@ -2059,13 +2064,13 @@ tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(OBSTACK_H) pointer-set.h fixed-value.h
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TOPLEV_H) $(SPLAY_TREE_H) $(TREE_DUMP_H) \
- tree-iterator.h tree-pass.h $(DIAGNOSTIC_H) $(REAL_H) fixed-value.h
+ tree-iterator.h $(TREE_PASS_H) $(DIAGNOSTIC_H) $(REAL_H) fixed-value.h
tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \
$(VARRAY_H) $(HASHTAB_H) $(TOPLEV_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
intl.h $(FUNCTION_H) $(GGC_H) $(GIMPLE_H) \
debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \
- $(IPA_PROP_H) value-prof.h tree-pass.h $(TARGET_H) $(INTEGRATE_H)
+ $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) $(INTEGRATE_H)
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(GGC_H) langhooks.h $(REAL_H) tree-iterator.h fixed-value.h \
$(DIAGNOSTIC_H) $(TREE_FLOW_H)
@@ -2077,19 +2082,19 @@ tree-ssa-structalias.o: tree-ssa-structalias.c \
$(SYSTEM_H) $(CONFIG_H) coretypes.h $(TM_H) $(GGC_H) $(OBSTACK_H) $(BITMAP_H) \
$(FLAGS_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) output.h \
$(DIAGNOSTIC_H) $(TREE_H) $(C_COMMON_H) $(TREE_FLOW_H) $(TREE_INLINE_H) varray.h \
- $(C_TREE_H) $(GIMPLE_H) $(HASHTAB_H) $(FUNCTION_H) $(CGRAPH_H) tree-pass.h \
- $(TIMEVAR_H) alloc-pool.h $(SPLAY_TREE_H) $(PARAMS_H) gt-tree-ssa-structalias.h \
- $(CGRAPH_H) $(ALIAS_H) pointer-set.h
+ $(C_TREE_H) $(GIMPLE_H) $(HASHTAB_H) $(FUNCTION_H) $(CGRAPH_H) \
+ $(TREE_PASS_H) $(TIMEVAR_H) alloc-pool.h $(SPLAY_TREE_H) $(PARAMS_H) \
+ gt-tree-ssa-structalias.h $(CGRAPH_H) $(ALIAS_H) pointer-set.h
tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) langhooks.h tree-pass.h $(BASIC_BLOCK_H) $(BITMAP_H) \
+ $(TREE_DUMP_H) langhooks.h $(TREE_PASS_H) $(BASIC_BLOCK_H) $(BITMAP_H) \
$(FLAGS_H) $(GGC_H) hard-reg-set.h $(HASHTAB_H) pointer-set.h \
$(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H)
tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- langhooks.h domwalk.h tree-pass.h $(GGC_H) $(PARAMS_H) $(BASIC_BLOCK_H) \
+ langhooks.h domwalk.h $(TREE_PASS_H) $(GGC_H) $(PARAMS_H) $(BASIC_BLOCK_H) \
$(BITMAP_H) $(CFGLOOP_H) $(FLAGS_H) hard-reg-set.h $(HASHTAB_H) \
$(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) vecprim.h
tree-ssa-ter.o : tree-ssa-ter.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
@@ -2100,60 +2105,62 @@ tree-ssa-coalesce.o : tree-ssa-coalesce.c $(TREE_FLOW_H) $(CONFIG_H) \
$(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) $(TOPLEV_H)
tree-outof-ssa.o : tree-outof-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) $(TOPLEV_H)
+ $(TREE_PASS_H) $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) \
+ $(TOPLEV_H)
tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) domwalk.h $(FLAGS_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) domwalk.h $(FLAGS_H) \
$(DIAGNOSTIC_H) $(TIMEVAR_H) langhooks.h
tree-ssa-forwprop.o : tree-ssa-forwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
langhooks.h $(FLAGS_H) $(GIMPLE_H)
tree-ssa-phiprop.o : tree-ssa-phiprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
langhooks.h $(FLAGS_H)
tree-ssa-ifcombine.o : tree-ssa-ifcombine.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H)
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H)
tree-ssa-phiopt.o : tree-ssa-phiopt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) langhooks.h $(FLAGS_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) langhooks.h $(FLAGS_H) \
$(DIAGNOSTIC_H) $(TIMEVAR_H) pointer-set.h domwalk.h
tree-nrv.o : tree-nrv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(RTL_H) $(FUNCTION_H) $(BASIC_BLOCK_H) $(EXPR_H) \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TREE_DUMP_H) tree-pass.h \
+ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TREE_DUMP_H) $(TREE_PASS_H) \
langhooks.h
tree-ssa-copy.o : tree-ssa-copy.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(BASIC_BLOCK_H) tree-pass.h langhooks.h tree-ssa-propagate.h $(FLAGS_H) \
- $(CFGLOOP_H)
+ $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h tree-ssa-propagate.h \
+ $(FLAGS_H) $(CFGLOOP_H)
tree-ssa-propagate.o : tree-ssa-propagate.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(BASIC_BLOCK_H) tree-pass.h langhooks.h \
+ $(TREE_DUMP_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h \
tree-ssa-propagate.h vec.h value-prof.h gt-tree-ssa-propagate.h $(FLAGS_H) \
$(VARRAY_H) $(GIMPLE_H)
tree-ssa-dom.o : tree-ssa-dom.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(BASIC_BLOCK_H) domwalk.h tree-pass.h $(FLAGS_H) langhooks.h \
+ $(BASIC_BLOCK_H) domwalk.h $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
tree-ssa-propagate.h $(CFGLOOP_H) $(PARAMS_H) $(REAL_H)
tree-ssa-uncprop.o : tree-ssa-uncprop.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(BASIC_BLOCK_H) domwalk.h tree-pass.h $(FLAGS_H) \
+ $(TREE_DUMP_H) $(BASIC_BLOCK_H) domwalk.h $(TREE_PASS_H) $(FLAGS_H) \
langhooks.h tree-ssa-propagate.h $(REAL_H)
tree-ssa-threadedge.o : tree-ssa-threadedge.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(FLAGS_H) $(RTL_H) $(TM_P_H) $(GGC_H) \
$(BASIC_BLOCK_H) $(CFGLOOP_H) output.h $(EXPR_H) \
$(FUNCTION_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TREE_DUMP_H) $(TREE_FLOW_H) \
- domwalk.h $(REAL_H) tree-pass.h tree-ssa-propagate.h langhooks.h $(PARAMS_H)
+ domwalk.h $(REAL_H) $(TREE_PASS_H) tree-ssa-propagate.h langhooks.h \
+ $(PARAMS_H)
tree-ssa-threadupdate.o : tree-ssa-threadupdate.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(BASIC_BLOCK_H) $(FLAGS_H) tree-pass.h $(CFGLOOP_H)
+ $(BASIC_BLOCK_H) $(FLAGS_H) $(TREE_PASS_H) $(CFGLOOP_H)
tree-ssanames.o : tree-ssanames.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(VARRAY_H) $(GGC_H) $(TREE_FLOW_H)
tree-phinodes.o : tree-phinodes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2165,45 +2172,45 @@ tree-ssa-live.o : tree-ssa-live.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(TREE_SSA_LIVE_H) $(BITMAP_H) $(TOPLEV_H) debug.h $(FLAGS_H)
tree-ssa-copyrename.o : tree-ssa-copyrename.c $(TREE_FLOW_H) $(CONFIG_H) \
- $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) tree-pass.h \
- $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) \
- $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) langhooks.h $(GIMPLE_H) \
- $(TREE_INLINE_H) $(GIMPLE_H)
+ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) \
+ $(TREE_PASS_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SSA_LIVE_H) \
+ $(BASIC_BLOCK_H) $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) langhooks.h \
+ $(GIMPLE_H) $(TREE_INLINE_H) $(GIMPLE_H)
tree-ssa-pre.o : tree-ssa-pre.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) langhooks.h $(CFGLOOP_H) \
- alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) $(GIMPLE_H) \
- $(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
+ $(CFGLOOP_H) alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) \
+ $(GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) \
$(DBGCNT_H)
tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(CFGLOOP_H) \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(CFGLOOP_H) \
alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) langhooks.h $(HASHTAB_H) $(GIMPLE_H) \
$(TREE_INLINE_H) tree-iterator.h tree-ssa-propagate.h tree-ssa-sccvn.h \
$(PARAMS_H)
tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \
$(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \
$(CFGLOOP_H) tree-chrec.h $(TIMEVAR_H) $(TOPLEV_H) intl.h
tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) tree-pass.h \
+ $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \
$(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(TOPLEV_H) \
value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H)
tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) $(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) tree-pass.h \
+ $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \
$(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) $(TOPLEV_H) \
tree-ssa-propagate.h tree-scalar-evolution.h
tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(EXCEPT_H) tree-pass.h $(FLAGS_H) langhooks.h \
+ $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
$(BASIC_BLOCK_H) hard-reg-set.h $(DBGCNT_H)
tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) alloc-pool.h \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) alloc-pool.h \
$(BASIC_BLOCK_H) $(BITMAP_H) $(CFGLOOP_H) $(FIBHEAP_H) $(HASHTAB_H) \
langhooks.h $(REAL_H) $(GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h
tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
@@ -2213,7 +2220,7 @@ tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
tree-if-conv.o: tree-if-conv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FLAGS_H) $(TIMEVAR_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) \
$(CFGLOOP_H) $(RTL_H) $(C_COMMON_H) tree-chrec.h $(TREE_DATA_REF_H) \
- $(SCEV_H) tree-pass.h $(DIAGNOSTIC_H) $(TARGET_H) $(TREE_DUMP_H) \
+ $(SCEV_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) $(TARGET_H) $(TREE_DUMP_H) \
$(VARRAY_H)
tree-iterator.o : tree-iterator.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
coretypes.h $(GGC_H) tree-iterator.h $(GIMPLE_H) gt-tree-iterator.h
@@ -2221,59 +2228,59 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \
$(TREE_INLINE_H) $(HASHTAB_H) pointer-set.h $(FLAGS_H) $(FUNCTION_H) \
$(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h $(TREE_DUMP_H) \
- tree-pass.h $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) hard-reg-set.h \
+ $(TREE_PASS_H) $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) hard-reg-set.h \
$(GIMPLE_H)
tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
- $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) tree-pass.h $(TOPLEV_H) \
+ $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) $(TOPLEV_H) \
coretypes.h langhooks.h $(IPA_REFERENCE_H)
tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H) langhooks.h \
- $(GGC_H) tree-pass.h coretypes.h $(TIMEVAR_H) $(TM_P_H) pointer-set.h \
+ $(GGC_H) $(TREE_PASS_H) coretypes.h $(TIMEVAR_H) $(TM_P_H) pointer-set.h \
$(TREE_DUMP_H) $(TREE_INLINE_H) tree-iterator.h $(TOPLEV_H)
tree-ssa-loop.o : tree-ssa-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) output.h \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) tree-pass.h $(TIMEVAR_H) \
+ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TREE_PASS_H) $(TIMEVAR_H) \
$(CFGLOOP_H) $(FLAGS_H) $(TREE_INLINE_H) tree-scalar-evolution.h
tree-ssa-loop-unswitch.o : tree-ssa-loop-unswitch.c $(TREE_FLOW_H) \
$(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \
domwalk.h $(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) tree-pass.h $(BASIC_BLOCK_H) hard-reg-set.h \
+ coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(BASIC_BLOCK_H) hard-reg-set.h \
$(TREE_INLINE_H)
tree-ssa-address.o : tree-ssa-address.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h $(EXPR_H) \
- gt-tree-ssa-address.h $(GGC_H) tree-affine.h
+ $(TREE_PASS_H) $(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h \
+ $(EXPR_H) gt-tree-ssa-address.h $(GGC_H) tree-affine.h
tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(TOPLEV_H) $(FLAGS_H) tree-pass.h $(SCEV_H) $(TREE_DATA_REF_H) $(BASIC_BLOCK_H) \
- $(GGC_H) hard-reg-set.h tree-chrec.h intl.h
+ $(TOPLEV_H) $(FLAGS_H) $(TREE_PASS_H) $(SCEV_H) $(TREE_DATA_REF_H) \
+ $(BASIC_BLOCK_H) $(GGC_H) hard-reg-set.h tree-chrec.h intl.h
tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(FLAGS_H) tree-pass.h $(SCEV_H) $(BASIC_BLOCK_H) $(GGC_H) hard-reg-set.h \
- tree-chrec.h
+ $(FLAGS_H) $(TREE_PASS_H) $(SCEV_H) $(BASIC_BLOCK_H) $(GGC_H) \
+ hard-reg-set.h tree-chrec.h
tree-ssa-loop-ch.o : tree-ssa-loop-ch.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(TREE_INLINE_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) hard-reg-set.h
+ $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) hard-reg-set.h
tree-ssa-loop-prefetch.o: tree-ssa-loop-prefetch.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(EXPR_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
+ $(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
$(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h \
tree-chrec.h $(TOPLEV_H) langhooks.h $(TREE_INLINE_H) $(TREE_DATA_REF_H) \
$(OPTABS_H)
tree-predcom.o: tree-predcom.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) \
$(CFGLOOP_H) $(TREE_FLOW_H) $(GGC_H) $(TREE_DATA_REF_H) $(SCEV_H) \
- $(PARAMS_H) $(DIAGNOSTIC_H) tree-pass.h $(TM_H) coretypes.h tree-affine.h \
- $(TREE_INLINE_H)
+ $(PARAMS_H) $(DIAGNOSTIC_H) $(TREE_PASS_H) $(TM_H) coretypes.h \
+ tree-affine.h $(TREE_INLINE_H)
tree-ssa-loop-ivopts.o : tree-ssa-loop-ivopts.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(EXPR_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
+ $(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
$(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h \
tree-chrec.h $(VARRAY_H) tree-affine.h pointer-set.h $(TARGET_H)
tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
@@ -2282,33 +2289,33 @@ tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h \
$(BASIC_BLOCK_H) output.h $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(TIMEVAR_H) $(CFGLOOP_H) tree-pass.h $(CFGLAYOUT_H) tree-scalar-evolution.h \
- $(PARAMS_H) $(TREE_INLINE_H)
+ $(TIMEVAR_H) $(CFGLOOP_H) $(TREE_PASS_H) $(CFGLAYOUT_H) \
+ tree-scalar-evolution.h $(PARAMS_H) $(TREE_INLINE_H)
tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) domwalk.h \
$(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(REAL_H) $(BASIC_BLOCK_H) \
+ $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(REAL_H) $(BASIC_BLOCK_H) \
hard-reg-set.h pointer-set.h tree-affine.h tree-ssa-propagate.h
tree-ssa-math-opts.o : tree-ssa-math-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(REAL_H) $(TIMEVAR_H) tree-pass.h \
- alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H)
+ $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(REAL_H) $(TIMEVAR_H) \
+ $(TREE_PASS_H) alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H)
tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(TREE_INLINE_H) $(FLAGS_H) \
$(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \
- $(TREE_DUMP_H) tree-pass.h $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
+ $(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
hard-reg-set.h $(GIMPLE_H) vec.h \
$(IPA_TYPE_ESCAPE_H) vecprim.h pointer-set.h alloc-pool.h
tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) tree-iterator.h\
- $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) vec.h langhooks.h \
- alloc-pool.h pointer-set.h $(CFGLOOP_H)
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \
+ tree-iterator.h $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) vec.h \
+ langhooks.h alloc-pool.h pointer-set.h $(CFGLOOP_H)
tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) hard-reg-set.h $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(TOPLEV_H) $(FUNCTION_H) langhooks.h $(FLAGS_H) $(CGRAPH_H) \
- $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) tree-pass.h \
- $(CFGLOOP_H) $(EXCEPT_H)
+ $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) \
+ $(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H)
c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(C_TREE_H) $(C_COMMON_H) $(DIAGNOSTIC_H) $(GIMPLE_H) $(VARRAY_H) \
@@ -2326,35 +2333,36 @@ gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \
$(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) tree-pass.h \
+ $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) $(TREE_PASS_H) \
$(HASHTAB_H) $(TOPLEV.H) tree-iterator.h
omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_H) \
- $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(TOPLEV_H) tree-pass.h \
- $(GGC_H) $(EXCEPT_H) $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) \
- tree-iterator.h
+ $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(TOPLEV_H) \
+ $(TREE_PASS_H) $(GGC_H) $(EXCEPT_H) $(SPLAY_TREE_H) $(OPTABS_H) \
+ $(CFGLOOP_H) tree-iterator.h
tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \
$(TM_H) coretypes.h
omega.o : omega.c omega.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- errors.h $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) varray.h tree-pass.h $(PARAMS_H)
+ errors.h $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) varray.h $(TREE_PASS_H) \
+ $(PARAMS_H)
tree-chrec.o: tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(GGC_H) $(TREE_H) $(REAL_H) $(SCEV_H) tree-pass.h $(PARAMS_H) \
+ $(GGC_H) $(TREE_H) $(REAL_H) $(SCEV_H) $(TREE_PASS_H) $(PARAMS_H) \
$(DIAGNOSTIC_H) $(CFGLOOP_H) $(TREE_FLOW_H)
tree-scalar-evolution.o: tree-scalar-evolution.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(REAL_H) $(RTL_H) \
$(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(TIMEVAR_H) $(CFGLOOP_H) $(SCEV_H) tree-pass.h $(FLAGS_H) tree-chrec.h \
+ $(TIMEVAR_H) $(CFGLOOP_H) $(SCEV_H) $(TREE_PASS_H) $(FLAGS_H) tree-chrec.h \
gt-tree-scalar-evolution.h
tree-data-ref.o: tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- $(TREE_DATA_REF_H) $(SCEV_H) tree-pass.h tree-chrec.h langhooks.h
+ $(TREE_DATA_REF_H) $(SCEV_H) $(TREE_PASS_H) tree-chrec.h langhooks.h
graphite.o: graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TOPLEV_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) domwalk.h \
- $(TREE_DATA_REF_H) $(SCEV_H) tree-pass.h tree-chrec.h graphite.h pointer-set.h \
- value-prof.h
+ $(TREE_DATA_REF_H) $(SCEV_H) $(TREE_PASS_H) tree-chrec.h graphite.h \
+ pointer-set.h value-prof.h
tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
$(TREE_DUMP_H) $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TOPLEV_H) \
@@ -2381,46 +2389,46 @@ tree-vect-data-refs.o: tree-vect-data-refs.c $(CONFIG_H) $(SYSTEM_H) \
$(EXPR_H) $(OPTABS_H) tree-chrec.h $(SCEV_H) tree-vectorizer.h $(TOPLEV_H)
tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(CFGLOOP_H) tree-pass.h tree-vectorizer.h $(TIMEVAR_H)
+ $(CFGLOOP_H) $(TREE_PASS_H) tree-vectorizer.h $(TIMEVAR_H)
tree-loop-linear.o: tree-loop-linear.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-pass.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) $(LAMBDA_H) \
+ $(TREE_PASS_H) $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) $(LAMBDA_H) \
$(TARGET_H) tree-chrec.h $(OBSTACK_H)
tree-loop-distribution.o: tree-loop-distribution.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-pass.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) \
- $(TARGET_H) tree-chrec.h langhooks.h tree-vectorizer.h
+ $(TREE_PASS_H) $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) \
+ $(TARGET_H) tree-chrec.h langhooks.h $(TREE_VECTORIZER_H)
tree-parloops.o: tree-parloops.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_FLOW_H) $(TREE_H) $(RTL_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(GGC_H) \
- $(DIAGNOSTIC_H) tree-pass.h $(SCEV_H) langhooks.h gt-tree-parloops.h \
- tree-vectorizer.h
+ $(DIAGNOSTIC_H) $(TREE_PASS_H) $(SCEV_H) langhooks.h gt-tree-parloops.h \
+ $(TREE_VECTORIZER_H)
tree-stdarg.o: tree-stdarg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TREE_H) $(FUNCTION_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-pass.h \
+ $(TREE_H) $(FUNCTION_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
tree-stdarg.h $(TARGET_H) langhooks.h
tree-object-size.o: tree-object-size.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(TREE_H) $(TOPLEV_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-pass.h \
- tree-ssa-propagate.h
+ $(TM_H) $(TREE_H) $(TOPLEV_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
+ $(TREE_PASS_H) tree-ssa-propagate.h
gimple.o : gimple.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(GGC_H) $(GIMPLE_H) $(GIMPLE_H) $(DIAGNOSTIC_H) gt-gimple.h \
$(TREE_FLOW_H) value-prof.h $(FLAGS_H)
gimple-pretty-print.o : gimple-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(REAL_H) $(HASHTAB_H) $(TREE_FLOW_H) \
- $(TM_H) coretypes.h tree-pass.h $(GIMPLE_H) value-prof.h
+ $(TM_H) coretypes.h $(TREE_PASS_H) $(GIMPLE_H) value-prof.h
tree-mudflap.o : $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TREE_INLINE_H) \
$(GIMPLE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) langhooks.h tree-mudflap.h \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(CGRAPH_H) $(GGC_H) \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(CGRAPH_H) $(GGC_H) \
gt-tree-mudflap.h $(BASIC_BLOCK_H) $(FLAGS_H) $(FUNCTION_H) hard-reg-set.h \
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(TOPLEV.H) $(GIMPLE_H) tree-iterator.h
tree-nomudflap.o : $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TREE_INLINE_H) \
$(C_TREE_H) $(C_COMMON_H) $(GIMPLE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \
output.h $(VARRAY_H) langhooks.h tree-mudflap.h $(TM_H) coretypes.h \
- $(GGC_H) gt-tree-mudflap.h tree-pass.h $(TOPLEV_H)
+ $(GGC_H) gt-tree-mudflap.h $(TREE_PASS_H) $(TOPLEV_H)
tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(REAL_H) $(HASHTAB_H) $(TREE_FLOW_H) \
- $(TM_H) coretypes.h tree-iterator.h tree-chrec.h langhooks.h tree-pass.h \
- value-prof.h fixed-value.h output.h
+ $(TM_H) coretypes.h tree-iterator.h tree-chrec.h langhooks.h \
+ $(TREE_PASS_H) value-prof.h fixed-value.h output.h
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FLAGS_H) $(REAL_H) $(TOPLEV_H) $(HASHTAB_H) $(EXPR_H) $(RTL_H) \
$(GGC_H) $(TM_P_H) langhooks.h $(MD5_H) intl.h fixed-value.h $(TARGET_H) \
@@ -2432,7 +2440,8 @@ diagnostic.o : diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
opts.o : opts.c opts.h options.h $(TOPLEV_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_H) $(TM_H) langhooks.h $(GGC_H) $(EXPR_H) $(RTL_H) \
output.h $(DIAGNOSTIC_H) $(TM_P_H) $(INSN_ATTR_H) intl.h $(TARGET_H) \
- $(FLAGS_H) $(PARAMS_H) tree-pass.h $(DBGCNT_H) debug.h varray.h $(PLUGIN_H)
+ $(FLAGS_H) $(PARAMS_H) $(TREE_PASS_H) $(DBGCNT_H) debug.h varray.h \
+ $(PLUGIN_H)
opts-common.o : opts-common.c opts.h $(CONFIG_H) $(SYSTEM_H) \
coretypes.h intl.h
targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
@@ -2448,7 +2457,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
value-prof.h $(PARAMS_H) $(TM_P_H) reload.h ira.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) hosthooks.h \
$(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \
- opts.h params.def tree-mudflap.h $(REAL_H) tree-pass.h $(GIMPLE_H) \
+ opts.h params.def tree-mudflap.h $(REAL_H) $(TREE_PASS_H) $(GIMPLE_H) \
tree-ssa-alias.h $(PLUGIN_H)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
-DTARGET_NAME=\"$(target_noncanonical)\" \
@@ -2461,12 +2470,18 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
graph.h $(EXCEPT_H) $(REGS_H) $(TIMEVAR_H) value-prof.h \
$(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h $(CFGLAYOUT_H) $(REAL_H) $(CFGLOOP_H) \
- hosthooks.h $(CGRAPH_H) $(COVERAGE_H) tree-pass.h $(TREE_DUMP_H) \
+ hosthooks.h $(CGRAPH_H) $(COVERAGE_H) $(TREE_PASS_H) $(TREE_DUMP_H) \
$(GGC_H) $(INTEGRATE_H) $(CPPLIB_H) opts.h $(TREE_FLOW_H) $(TREE_INLINE_H) \
gt-passes.h $(DF_H) $(PREDICT_H)
plugin.o : plugin.c $(PLUGIN_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- errors.h $(TOPLEV_H) $(TREE_H) tree-pass.h intl.h
+ errors.h $(TOPLEV_H) $(TREE_H) $(TREE_PASS_H) intl.h
+
+plugin-version.o : plugin-version.c $(SYSTEM_H) gcc-plugin.h configargs.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
+ -DREVISION=$(REVISION_s) -DDEVPHASE=$(DEVPHASE_s) -c \
+ -DPLUGIN $(srcdir)/plugin-version.c $(OUTPUT_OPTION)
main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H)
@@ -2498,9 +2513,9 @@ function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
output.h $(TOPLEV_H) $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \
- tree-pass.h $(DF_H) $(TIMEVAR_H) vecprim.h
+ $(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h
statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- tree-pass.h $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_H)
+ $(TREE_PASS_H) $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_H)
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \
libfuncs.h $(EXCEPT_H) $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \
@@ -2511,14 +2526,14 @@ except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
dwarf2asm.h dwarf2out.h $(TOPLEV_H) $(HASHTAB_H) intl.h $(GGC_H) \
gt-$(EXCEPT_H) $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) dwarf2.h \
- $(TARGET_H) $(TM_P_H) tree-pass.h $(TIMEVAR_H)
+ $(TARGET_H) $(TM_P_H) $(TREE_PASS_H) $(TIMEVAR_H)
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) $(EXPR_H) $(OPTABS_H) \
libfuncs.h $(INSN_ATTR_H) insn-config.h $(RECOG_H) output.h \
typeclass.h hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) reload.h \
$(GGC_H) langhooks.h intl.h $(TM_P_H) $(REAL_H) $(TARGET_H) \
tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
- tree-pass.h $(DF_H) $(DIAGNOSTIC_H) vecprim.h
+ $(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h
dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
$(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \
langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H)
@@ -2569,7 +2584,7 @@ xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) insn-config.h $(RECOG_H) \
$(GGC_H) $(EXPR_H) hard-reg-set.h $(BITMAP_H) $(TOPLEV_H) $(BASIC_BLOCK_H) \
- $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h tree-pass.h gt-emit-rtl.h \
+ $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h $(TREE_PASS_H) gt-emit-rtl.h \
$(REAL_H) $(DF_H)
real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(TOPLEV_H) $(TM_P_H) $(REAL_H) dfp.h
@@ -2581,10 +2596,10 @@ integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) $(FLAGS_H) debug.h $(INTEGRATE_H) insn-config.h \
$(EXPR_H) $(REAL_H) $(REGS_H) intl.h $(FUNCTION_H) output.h $(RECOG_H) \
$(EXCEPT_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h \
- gt-integrate.h $(GGC_H) tree-pass.h $(DF_H)
+ gt-integrate.h $(GGC_H) $(TREE_PASS_H) $(DF_H)
jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) hard-reg-set.h $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) \
- $(REAL_H) $(EXCEPT_H) $(FUNCTION_H) tree-pass.h $(DIAGNOSTIC_H) \
+ $(REAL_H) $(EXCEPT_H) $(FUNCTION_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) \
$(TOPLEV_H) $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) \
$(TIMEVAR_H) $(TARGET_H)
simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -2598,68 +2613,69 @@ cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
cgraphunit.o : cgraphunit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(TOPLEV_H) $(FLAGS_H) $(GGC_H) \
$(TARGET_H) $(CGRAPH_H) intl.h pointer-set.h $(FUNCTION_H) $(GIMPLE_H) \
- $(TREE_FLOW_H) tree-pass.h $(C_COMMON_H) debug.h $(DIAGNOSTIC_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(C_COMMON_H) debug.h $(DIAGNOSTIC_H) \
$(FIBHEAP_H) output.h $(PARAMS_H) $(RTL_H) $(TIMEVAR_H) $(IPA_PROP_H) \
- gt-cgraphunit.h tree-iterator.h
+ gt-cgraphunit.h tree-iterator.h $(COVERAGE_H)
cgraphbuild.o : cgraphbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(CGRAPH_H) intl.h pointer-set.h $(GIMPLE_H) \
- $(TREE_FLOW_H) tree-pass.h
+ $(TREE_FLOW_H) $(TREE_PASS_H)
varpool.o : varpool.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(CGRAPH_H) langhooks.h $(DIAGNOSTIC_H) $(HASHTAB_H) \
$(GGC_H) $(TIMEVAR_H) debug.h $(TARGET_H) output.h $(GIMPLE_H) \
$(TREE_FLOW_H) gt-varpool.h
ipa.o : ipa.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(CGRAPH_H) \
- tree-pass.h $(TIMEVAR_H)
+ $(TREE_PASS_H) $(TIMEVAR_H)
ipa-prop.o : ipa-prop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
langhooks.h $(GGC_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(DIAGNOSTIC_H) \
- $(TREE_FLOW_H) $(TM_H) tree-pass.h $(FLAGS_H) $(TREE_H) $(TREE_INLINE_H) \
- $(TIMEVAR_H)
+ $(TREE_FLOW_H) $(TM_H) $(TREE_PASS_H) $(FLAGS_H) $(TREE_H) \
+ $(TREE_INLINE_H) $(TIMEVAR_H)
ipa-cp.o : ipa-cp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TREE_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(TREE_FLOW_H) tree-pass.h \
- $(FLAGS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H) $(TREE_DUMP_H) $(TREE_INLINE_H)
+ $(TREE_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(TREE_FLOW_H) \
+ $(TREE_PASS_H) $(FLAGS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H) $(TREE_DUMP_H) \
+ $(TREE_INLINE_H)
matrix-reorg.o : matrix-reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) $(TREE_INLINE_H) $(TREE_FLOW_H) \
tree-flow-inline.h langhooks.h $(HASHTAB_H) $(TOPLEV_H) $(FLAGS_H) $(GGC_H) \
debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(PARAMS_H) \
$(FIBHEAP_H) $(C_COMMON_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(CFGLOOP_H) \
- tree-iterator.h tree-pass.h opts.h $(TREE_DATA_REF_H) tree-chrec.h \
+ tree-iterator.h $(TREE_PASS_H) opts.h $(TREE_DATA_REF_H) tree-chrec.h \
tree-scalar-evolution.h
ipa-inline.o : ipa-inline.c gt-ipa-inline.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \
- $(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) tree-pass.h \
+ $(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(RTL_H) $(IPA_PROP_H)
ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(C_COMMON_H) $(GIMPLE_H) \
- $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(TIMEVAR_H) $(DIAGNOSTIC_H)
+ $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H)
ipa-reference.o : ipa-reference.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(IPA_REFERENCE_H) $(IPA_UTILS_H) $(C_COMMON_H) \
- $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h \
+ $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) \
$(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H)
ipa-pure-const.o : ipa-pure-const.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) $(TARGET_H) \
- $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(TIMEVAR_H) \
+ $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) $(TIMEVAR_H) \
$(DIAGNOSTIC_H)
ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(IPA_TYPE_ESCAPE_H) $(IPA_UTILS_H) $(C_COMMON_H) \
- $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h \
+ $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) \
$(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H)
ipa-struct-reorg.o: ipa-struct-reorg.c ipa-struct-reorg.h $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(GIMPLE_H) tree-inline.h \
$(TREE_FLOW_H) langhooks.h pointer-set.h $(HASHTAB_H) $(C_TREE_H) $(TOPLEV_H) \
$(FLAGS_H) debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
$(PARAMS_H) $(FIBHEAP_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) tree-iterator.h \
- tree-pass.h opts.h $(IPA_TYPE_ESCAPE_H) $(TREE_DUMP_H) $(C_COMMON_H) \
+ $(TREE_PASS_H) opts.h $(IPA_TYPE_ESCAPE_H) $(TREE_DUMP_H) $(C_COMMON_H) \
$(GIMPLE_H)
coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
$(FUNCTION_H) $(TOPLEV_H) $(GGC_H) langhooks.h $(COVERAGE_H) gt-coverage.h \
- $(HASHTAB_H) tree-iterator.h $(CGRAPH_H) tree-pass.h gcov-io.c $(TM_P_H)
+ $(HASHTAB_H) tree-iterator.h $(CGRAPH_H) $(TREE_PASS_H) gcov-io.c $(TM_P_H)
cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(RECOG_H) \
$(EMIT_RTL_H) $(TOPLEV_H) output.h $(FUNCTION_H) cselib.h $(GGC_H) $(TM_P_H) \
@@ -2667,31 +2683,31 @@ cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) $(EXPR_H) $(TOPLEV_H) \
output.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \
- $(EXCEPT_H) $(TARGET_H) $(PARAMS_H) rtlhooks-def.h tree-pass.h $(REAL_H) \
- $(DF_H) $(DBGCNT_H)
+ $(EXCEPT_H) $(TARGET_H) $(PARAMS_H) rtlhooks-def.h $(TREE_PASS_H) \
+ $(REAL_H) $(DF_H) $(DBGCNT_H)
dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(DF_H) cselib.h \
- $(DBGCNT_H) dce.h $(TIMEVAR_H) tree-pass.h $(DBGCNT_H) $(TM_P_H)
+ $(DBGCNT_H) dce.h $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H) $(TM_P_H)
dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(RECOG_H) $(EXPR_H) $(DF_H) cselib.h $(DBGCNT_H) $(TIMEVAR_H) tree-pass.h \
- alloc-pool.h $(ALIAS_H) dse.h $(OPTABS_H) $(TARGET_H)
+ $(RECOG_H) $(EXPR_H) $(DF_H) cselib.h $(DBGCNT_H) $(TIMEVAR_H) \
+ $(TREE_PASS_H) alloc-pool.h $(ALIAS_H) dse.h $(OPTABS_H) $(TARGET_H)
fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TOPLEV_H) insn-config.h $(RECOG_H) $(FLAGS_H) $(OBSTACK_H) $(BASIC_BLOCK_H) \
- output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) tree-pass.h $(TARGET_H) $(TM_P_H) \
- $(CFGLOOP_H) $(EMIT_RTL_H)
+ output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) $(TREE_PASS_H) $(TARGET_H) \
+ $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H)
web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
- $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h
+ $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H)
see.o : see.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h \
- $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(RECOG_H) $(EXPR_H) $(SPLAY_TREE_H) \
- $(HASHTAB_H) $(REGS_H) dce.h
+ $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H) $(RECOG_H) $(EXPR_H) \
+ $(SPLAY_TREE_H) $(HASHTAB_H) $(REGS_H) dce.h
gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(GGC_H) \
$(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(TM_P_H) $(PARAMS_H) $(EXCEPT_H) gt-gcse.h $(TREE_H) cselib.h $(TIMEVAR_H) \
- intl.h $(OBSTACK_H) tree-pass.h $(DF_H) $(DBGCNT_H)
+ intl.h $(OBSTACK_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
coretypes.h $(TM_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) $(DF_H) \
$(FUNCTION_H) $(TOPLEV_H) $(INSN_ATTR_H) $(EXCEPT_H) $(PARAMS_H) $(TM_P_H)
@@ -2701,43 +2717,43 @@ lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(INSN_ATTR_H) $(RECOG_H) $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) \
- output.h tree-pass.h $(TIMEVAR_H) $(REAL_H) $(DF_H)
+ output.h $(TREE_PASS_H) $(TIMEVAR_H) $(REAL_H) $(DF_H)
tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) \
+ coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
$(GGC_H) hard-reg-set.h $(OBSTACK_H) $(GIMPLE_H) $(CFGLOOP_H) \
tree-scalar-evolution.h
tree-call-cdce.o : tree-call-cdce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) \
+ coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
$(GGC_H) hard-reg-set.h $(OBSTACK_H) $(GIMPLE_H)
tree-ssa-ccp.o : tree-ssa-ccp.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(BASIC_BLOCK_H) tree-pass.h langhooks.h \
+ $(TREE_DUMP_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h \
tree-ssa-propagate.h value-prof.h $(FLAGS_H) $(TARGET_H) $(TOPLEV_H)
tree-sra.o : tree-sra.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
$(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(GIMPLE_H) \
- langhooks.h tree-pass.h $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) \
+ langhooks.h $(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) \
$(BITMAP_H) $(GGC_H) hard-reg-set.h $(OBSTACK_H) $(PARAMS_H) $(TARGET_H)
tree-switch-conversion.o : tree-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(GIMPLE_H) \
- tree-pass.h $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h \
+ $(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h \
$(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H)
tree-complex.o : tree-complex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(TM_H) $(RTL_H) $(REAL_H) $(FLAGS_H) $(TREE_FLOW_H) $(GIMPLE_H) \
- tree-iterator.h tree-pass.h tree-ssa-propagate.h $(DIAGNOSTIC_H)
+ tree-iterator.h $(TREE_PASS_H) tree-ssa-propagate.h $(DIAGNOSTIC_H)
tree-vect-generic.o : tree-vect-generic.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
- $(TM_H) $(TREE_FLOW_H) $(GIMPLE_H) tree-iterator.h tree-pass.h \
+ $(TM_H) $(TREE_FLOW_H) $(GIMPLE_H) tree-iterator.h $(TREE_PASS_H) \
$(FLAGS_H) $(OPTABS_H) $(RTL_H) $(MACHMODE_H) $(EXPR_H) \
langhooks.h $(FLAGS_H) $(DIAGNOSTIC_H) gt-tree-vect-generic.h $(GGC_H) \
coretypes.h insn-codes.h
df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
- $(TM_P_H) $(FLAGS_H) output.h tree-pass.h $(PARAMS_H)
+ $(TM_P_H) $(FLAGS_H) output.h $(TREE_PASS_H) $(PARAMS_H)
df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
@@ -2746,7 +2762,7 @@ df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
$(TM_P_H) $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) output.h \
- tree-pass.h
+ $(TREE_PASS_H)
df-byte-scan.o : df-byte-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
tm_p.h $(DF_H) output.h $(DBGCNT_H)
regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -2755,22 +2771,22 @@ regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \
$(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \
- $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h
+ $(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H)
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \
$(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \
- $(CFGLOOP_H) $(TIMEVAR_H) tree-pass.h profile.h
+ $(CFGLOOP_H) $(TIMEVAR_H) $(TREE_PASS_H) profile.h
mcf.o : mcf.c profile.h $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h \
$(BASIC_BLOCK_H) output.h langhooks.h $(GCOV_IO_H) $(TREE_H)
tree-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
$(FUNCTION_H) $(TOPLEV_H) $(COVERAGE_H) $(TREE_H) value-prof.h $(TREE_DUMP_H) \
- tree-pass.h $(TREE_FLOW_H) $(TIMEVAR_H) $(GGC_H) gt-tree-profile.h $(CGRAPH_H)
+ $(TREE_PASS_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(GGC_H) gt-tree-profile.h $(CGRAPH_H)
value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h value-prof.h $(EXPR_H) output.h $(FLAGS_H) \
$(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
$(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \
- tree-flow-inline.h $(TIMEVAR_H) tree-pass.h $(TOPLEV_H) pointer-set.h
+ tree-flow-inline.h $(TIMEVAR_H) $(TREE_PASS_H) $(TOPLEV_H) pointer-set.h
loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
$(TOPLEV_H) $(CFGLOOP_H) output.h $(PARAMS_H) $(TARGET_H)
@@ -2778,23 +2794,23 @@ alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h $(HASHTAB_H)
auto-inc-dec.o : auto-inc-dec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) insn-config.h \
$(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) $(EXCEPT_H) $(TOPLEV_H) $(RECOG_H) \
- $(EXPR_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H)
+ $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) \
$(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(GGC_H) \
$(TM_P_H) $(TIMEVAR_H) $(OBSTACK_H) $(TREE_H) alloc-pool.h \
- $(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) tree-pass.h
+ $(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) $(TREE_PASS_H)
cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TOPLEV_H) $(CFGLOOP_H)
cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h tree-pass.h $(RTL_H) \
+ coretypes.h $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(TREE_PASS_H) $(RTL_H) \
$(DIAGNOSTIC_H) $(TOPLEV_H) $(BASIC_BLOCK_H) $(FLAGS_H) debug.h $(PARAMS_H) \
value-prof.h $(TREE_INLINE_H) $(TARGET_H)
cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) insn-config.h $(EXPR_H) \
$(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
- tree-pass.h $(DF_H) $(GGC_H)
+ $(TREE_PASS_H) $(DF_H) $(GGC_H)
cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h insn-config.h $(RECOG_H) $(TM_P_H) \
$(TIMEVAR_H) $(OBSTACK_H) $(TOPLEV_H) vecprim.h
@@ -2804,7 +2820,7 @@ cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TIMEVAR_H) hard-reg-set.h output.h $(FLAGS_H) $(RECOG_H) \
$(TOPLEV_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) \
- $(REGS_H) $(EMIT_RTL_H) $(CFGLAYOUT_H) tree-pass.h $(CFGLOOP_H) $(EXPR_H) \
+ $(REGS_H) $(EMIT_RTL_H) $(CFGLAYOUT_H) $(TREE_PASS_H) $(CFGLOOP_H) $(EXPR_H) \
$(DF_H) $(DBGCNT_H) dce.h
cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(FLAGS_H) $(FUNCTION_H) \
@@ -2827,7 +2843,8 @@ cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H) $(TREE_FLOW_H)
loop-init.o : loop-init.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(GGC_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) \
- coretypes.h $(TM_H) $(OBSTACK_H) tree-pass.h $(TIMEVAR_H) $(FLAGS_H) $(DF_H)
+ coretypes.h $(TM_H) $(OBSTACK_H) $(TREE_PASS_H) $(TIMEVAR_H) $(FLAGS_H) \
+ $(DF_H)
loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
output.h $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H)
@@ -2844,12 +2861,12 @@ combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) $(FUNCTION_H) insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \
rtlhooks-def.h $(BASIC_BLOCK_H) $(RECOG_H) $(REAL_H) hard-reg-set.h \
$(TOPLEV_H) $(TM_P_H) $(TREE_H) $(TARGET_H) output.h $(PARAMS_H) $(OPTABS_H) \
- insn-codes.h $(TIMEVAR_H) tree-pass.h $(DF_H) vecprim.h $(CGRAPH_H)
+ insn-codes.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) vecprim.h $(CGRAPH_H)
reginfo.o : reginfo.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) insn-config.h \
$(RECOG_H) reload.h $(REAL_H) $(TOPLEV_H) $(FUNCTION_H) output.h $(GGC_H) \
$(TM_P_H) $(EXPR_H) $(TIMEVAR_H) gt-reginfo.h $(HASHTAB_H) \
- $(TARGET_H) tree-pass.h $(DF_H) ira.h
+ $(TARGET_H) $(TREE_PASS_H) $(DF_H) ira.h
bitmap.o : bitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) $(GGC_H) gt-bitmap.h $(BITMAP_H) $(OBSTACK_H) $(HASHTAB_H)
varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) \
@@ -2871,35 +2888,35 @@ postreload.o : postreload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REAL_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) \
hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) output.h \
$(FUNCTION_H) $(TOPLEV_H) cselib.h $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(MACHMODE_H) \
- $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H)
+ $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h $(OBSTACK_H) \
- $(PARAMS_H) $(TIMEVAR_H) tree-pass.h $(REAL_H) $(DBGCNT_H)
+ $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) $(REAL_H) $(DBGCNT_H)
caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(FUNCTION_H) \
addresses.h $(RECOG_H) reload.h $(EXPR_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) \
output.h ira.h gt-caller-save.h $(GGC_H)
bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(EXCEPT_H) \
$(RTL_H) hard-reg-set.h $(REGS_H) $(TM_P_H) $(FIBHEAP_H) output.h $(EXPR_H) \
- $(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) tree-pass.h $(TOPLEV_H) \
- $(DF_H) vecprim.h $(RECOG_H)
+ $(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) $(TREE_PASS_H) \
+ $(TOPLEV_H) $(DF_H) vecprim.h $(RECOG_H)
reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
conditions.h hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \
$(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \
$(EXPR_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(OBSTACK_H) $(RESOURCE_H) \
- $(TIMEVAR_H) $(TARGET_H) tree-pass.h
+ $(TIMEVAR_H) $(TARGET_H) $(TREE_PASS_H)
alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(TOPLEV_H) output.h \
$(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H) $(TM_P_H) \
langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \
- $(SPLAY_TREE_H) $(VARRAY_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) tree-pass.h
+ $(SPLAY_TREE_H) $(VARRAY_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_H)
stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) tree-pass.h \
+ $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
$(BASIC_BLOCK_H) $(FLAGS_H) output.h $(DF_H)
init-regs.o : init-regs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) tree-pass.h \
+ $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
$(BASIC_BLOCK_H) $(FLAGS_H) $(DF_H)
ira-build.o: ira-build.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
@@ -2931,13 +2948,13 @@ ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(OBSTACK_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) \
$(DF_H) $(IRA_INT_H) $(PARAMS_H) $(TIMEVAR_H) $(INTEGRATE_H) \
- tree-pass.h output.h
+ $(TREE_PASS_H) output.h
regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- insn-config.h $(TIMEVAR_H) tree-pass.h $(DF_H)\
+ insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)\
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(EXCEPT_H) reload.h
combine-stack-adj.o : combine-stack-adj.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) tree-pass.h \
+ $(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) \
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) $(EXCEPT_H) reload.h
ddg.o : ddg.c $(DDG_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) \
@@ -2949,7 +2966,7 @@ modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TARGET_H) $(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \
$(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
$(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
- cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) tree-pass.h \
+ cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(DF_H) $(DBGCNT_H)
haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
@@ -2962,7 +2979,7 @@ sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
- $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
+ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(DBGCNT_H)
sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
@@ -2970,73 +2987,73 @@ sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h
sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
- $(REAL_H) tree-pass.h $(INSN_ATTR_H)
+ $(REAL_H) $(TREE_PASS_H) $(INSN_ATTR_H)
sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
- $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
+ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) \
$(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h
sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
- $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
+ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(SEL_SCHED_DUMP_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H)
sel-sched-ir.o : sel-sched-ir.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
- $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
+ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H)
final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) intl.h $(REGS_H) $(RECOG_H) conditions.h \
insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h hard-reg-set.h \
- $(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h tree-pass.h \
- $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) $(CFGLAYOUT_H) dbxout.h \
- $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) $(REAL_H) $(DF_H) vecprim.h $(GGC_H) \
- $(CFGLOOP_H) $(PARAMS_H)
+ $(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h \
+ $(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
+ $(CFGLAYOUT_H) dbxout.h $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) $(REAL_H) \
+ $(DF_H) vecprim.h $(GGC_H) $(CFGLOOP_H) $(PARAMS_H)
recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
$(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(TOPLEV_H) output.h reload.h \
- addresses.h $(TM_P_H) $(TIMEVAR_H) tree-pass.h hard-reg-set.h $(REAL_H) \
+ addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) hard-reg-set.h $(REAL_H) \
$(DF_H) $(DBGCNT_H) $(TARGET_H)
reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
insn-config.h $(TOPLEV_H) reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \
$(BASIC_BLOCK_H) $(CFGLAYOUT_H) output.h $(VARRAY_H) $(TIMEVAR_H) \
- tree-pass.h $(TARGET_H) vecprim.h $(DF_H)
+ $(TREE_PASS_H) $(TARGET_H) vecprim.h $(DF_H)
sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h
predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) \
hard-reg-set.h output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) $(EXCEPT_H) \
$(TM_P_H) $(PREDICT_H) sreal.h $(PARAMS_H) $(TARGET_H) $(CFGLOOP_H) \
$(COVERAGE_H) $(SCEV_H) $(GGC_H) predict.def $(TIMEVAR_H) $(TREE_DUMP_H) \
- $(TREE_FLOW_H) tree-pass.h $(EXPR_H) pointer-set.h
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(EXPR_H) pointer-set.h
lists.o: lists.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) \
$(RTL_H) $(GGC_H) gt-lists.h
bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(FLAGS_H) $(TIMEVAR_H) output.h $(CFGLAYOUT_H) $(FIBHEAP_H) \
$(TARGET_H) $(FUNCTION_H) $(TM_P_H) $(OBSTACK_H) $(EXPR_H) $(REGS_H) \
- $(PARAMS_H) $(TOPLEV_H) tree-pass.h $(DF_H)
+ $(PARAMS_H) $(TOPLEV_H) $(TREE_PASS_H) $(DF_H)
tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(BASIC_BLOCK_H) hard-reg-set.h output.h $(CFGLAYOUT_H) \
$(FLAGS_H) $(TIMEVAR_H) $(PARAMS_H) $(COVERAGE_H) $(FIBHEAP_H) \
- tree-pass.h $(TREE_FLOW_H) $(TREE_INLINE_H)
+ $(TREE_PASS_H) $(TREE_FLOW_H) $(TREE_INLINE_H)
cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h \
$(FUNCTION_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(TARGET_H) gt-cfglayout.h \
- $(GGC_H) alloc-pool.h $(FLAGS_H) $(OBSTACK_H) tree-pass.h vecprim.h \
+ $(GGC_H) alloc-pool.h $(FLAGS_H) $(OBSTACK_H) $(TREE_PASS_H) vecprim.h \
$(DF_H)
timevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TIMEVAR_H) $(FLAGS_H) intl.h $(TOPLEV_H) $(RTL_H) timevar.def
regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \
- addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) tree-pass.h $(DF_H)
+ addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) $(TOPLEV_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \
$(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \
- $(REAL_H) $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) tree-pass.h \
- $(DF_H) $(DBGCNT_H)
+ $(REAL_H) $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) \
+ $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
lambda-mat.o : lambda-mat.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
$(TM_H) coretypes.h $(TREE_H) $(TREE_FLOW_H)
lambda-trans.o: lambda-trans.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
@@ -3045,7 +3062,7 @@ lambda-code.o: lambda-code.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
$(TM_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
$(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) coretypes.h $(TARGET_H) \
- tree-chrec.h tree-pass.h vec.h vecprim.h $(OBSTACK_H) pointer-set.h
+ tree-chrec.h $(TREE_PASS_H) vec.h vecprim.h $(OBSTACK_H) pointer-set.h
params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) $(TOPLEV_H)
pointer-set.o: pointer-set.c pointer-set.h $(CONFIG_H) $(SYSTEM_H)
hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
@@ -3057,7 +3074,7 @@ dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h errors.h $(DBGCNT_H) \
lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(TIMEVAR_H) $(FLAGS_H) \
insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \
- $(EXPR_H) $(EXCEPT_H) $(REGS_H) tree-pass.h $(DF_H)
+ $(EXPR_H) $(EXCEPT_H) $(REGS_H) $(TREE_PASS_H) $(DF_H)
$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \
@@ -3290,9 +3307,9 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/dbxout.c $(srcdir)/ipa-struct-reorg.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
$(srcdir)/tree-vect-generic.c \
$(srcdir)/dojump.c \
- $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
+ $(srcdir)/emit-rtl.c $(srcdir)/except.h $(srcdir)/explow.c $(srcdir)/expr.c \
$(srcdir)/expr.h \
- $(srcdir)/function.c $(srcdir)/except.h \
+ $(srcdir)/function.c $(srcdir)/except.c \
$(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
$(srcdir)/profile.c $(srcdir)/reginfo.c $(srcdir)/mcf.c \
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c $(srcdir)/cfglayout.h \
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index b56f38f0a52..b9463f6a4d3 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,1182 @@
+2009-04-20 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * a-calend.adb: Remove types char_Pointer, int, tm and tm_Pointer.
+ (localtime_tzoff): This routine no longer accepts an actual of type
+ tm_Pointer.
+ (UTC_Time_Offset): Remove local variable Secs_TM.
+
+ * sysdep.c (__gnat_localtime_tzoff): This routine no longer accepts an
+ actual of type struct tm*. Add local variable of type struct tm for all
+ targets that provide localtime_r and need to invoke it.
+
+2009-04-20 Thomas Quinot <quinot@adacore.com>
+
+ * s-oscons-tmplt.c, g-socket.adb, g-socket.ads
+ (GNAT.Sockets.Resolve_Error): Add case of EPIPE
+ Add case of EAGAIN for platforms where it is not equal to EWOULDBLOCK
+
+2009-04-20 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch3.adb: Minor reformatting
+
+ * lib-load.adb: Minor reformatting
+
+ * sem_ch4.adb: Minor reformatting
+
+2009-04-20 Robert Dewar <dewar@adacore.com>
+
+ * namet-sp.ads, namet-sp.adb (Is_Bad_Spelling_Of): Implement new spec
+ (equal values => False).
+
+2009-04-20 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch6.adb (Is_Null_Procedure): predicate is global, so that calls
+ to null procedures can be inlined unconditionally.
+
+2009-04-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (call_to_gnu): When creating the copy for a
+ non-addressable parameter passed by reference, do not convert the
+ actual if its type is already the nominal type, unless it is of
+ self-referential size.
+
+2009-04-20 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat_ugn.texi: Fix typos.
+
+2009-04-20 Robert Dewar <dewar@adacore.com>
+
+ * debug.adb, gnat1drv.adb, sem_ch13.adb: Add circuitry to
+ Validate_Unchecked_Warnings to suppress warnings about size or
+ alignment or extra bits if either type involved has pragma Warnings
+ (Off) set for the type entity.
+
+2009-04-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (gigi): Make the special IA-64 descriptor type
+ a builtin type and give it a name.
+
+2009-04-17 Diego Novillo <dnovillo@google.com>
+
+ * gcc-interface/misc.c (gnat_expand_expr): Remove.
+ (LANG_HOOKS_EXPAND_EXPR): Remove.
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch3.adb: Minor reformatting
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * adaint.c: Add __gnat_use_acl global variable to control use of ACL.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Build_Derived_Enumeration_Type): Diagnose properly
+ illegal constraints on type derived from formal discrete types.
+
+2009-04-17 Thomas Quinot <quinot@adacore.com>
+
+ PR ada/35953
+
+ * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
+ g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads,
+ g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads, g-socket.adb,
+ g-socket.ads (GNAT.Sockets.Thin.C_Send,
+ GNAT.Sockets.Thin.Syscall_Send): Remove unused subprograms.
+ Replace calls to send(2) with equivalent sendto(2) calls.
+ (GNAT.Sockets.Send_Socket): Factor common code in inlined subprogram.
+ (GNAT.Sockets.Write): Account for the case of hyper-empty arrays, do not
+ report an error in that case. Factor code common to the two versions
+ (datagram and stream) in common routine Stream_Write.
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * exp_disp.adb: Minor reformatting
+ Minor code reorganization (use Nkind_In)
+
+ * prepcomp.adb: Minor reformatting
+
+ * sem_ch3.adb: Minor reformatting
+
+ * sem_res.adb: Minor comment addition
+
+ * exp_ch5.adb (Expand_Assign_Array): Use Has_Address_Clause to test
+ for address clause
+
+ * lib-xref.adb (Generate_Reference): Exclude recursive calls from
+ setting Is_Referenced
+
+ * types.ads: Minor reformatting
+
+2009-04-17 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat_ugn.texi: Initial documentation on binding generator.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * einfo.ads, einfo.adb: New attribute Underlying_Record_View, to handle
+ type extensions whose parent is a type with unknown discriminants.
+
+ * exp_aggr.adb (Expand_Record_Aggregate): If the type of an extension
+ aggregate has unknown discriminants, use the Underlying_Record_View to
+ obtain the discriminants of the ancestor part.
+
+ * exp_disp.adb (Build_Dispatch_Tables): Types that are
+ Underlying_Record_Views share the dispatching information of the
+ original record extension.
+
+ * exp_ch3.adb (Expand_Record_Extension): If the type inherits unknown
+ discriminants, propagate dispach table information to the
+ Underlying_Record_View.
+
+ * sem_ch3.adb (Build_Derived_Private_Type): If parent type has unknown
+ discriminants and declaration is not a completion, generate
+ Underlying_Record_View to provide proper discriminant information to
+ the front-end and to gigi.
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * s-conca5.adb, g-sercom.adb, s-conca5.ads, s-conca7.adb, exp_imgv.adb,
+ s-conca7.ads, s-crc32.adb, s-crc32.ads, s-conca9.adb, s-conca9.ads,
+ s-addope.adb, i-cstrin.ads, s-addope.ads, s-carun8.adb, s-carun8.ads,
+ g-htable.ads, g-hesora.adb, g-hesora.ads, s-htable.adb, s-htable.ads,
+ s-conca2.adb, s-conca2.ads, a-except.adb, s-conca4.adb, a-except.ads,
+ s-conca4.ads, s-except.adb, s-except.ads, s-conca6.adb, s-conca6.ads,
+ g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads, s-conca8.adb,
+ s-conca8.ads, g-byorma.adb, g-byorma.ads, s-memory.adb, s-memory.ads,
+ g-speche.adb, g-speche.ads, g-stsifd-sockets.adb, exp_dist.adb,
+ s-imgenu.adb, s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-exctab.adb,
+ s-exctab.ads, s-imenne.adb, s-imenne.ads, s-casuti.adb, osint.adb,
+ s-assert.adb, s-casuti.ads, s-assert.ads, s-os_lib.adb, s-conca3.adb,
+ s-conca3.ads: Remove unneeded pragma Warnings
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * g-moreex.adb: Add comments.
+
+ * s-auxdec.ads: Add ??? comment for uncommented pragma Warnings (Off)
+
+ * s-auxdec-vms_64.ads: Add ??? comment for uncommented pragma
+ Warnings (Off)
+
+ * prepcomp.adb: Add ??? comment
+
+ * a-tasatt.adb: Minor reformatting
+
+ * g-trasym-vms-alpha.adb: Add ??? comment
+
+ * g-trasym-vms-ia64.adb: Add ??? comment
+
+ * xoscons.adb: Minor reformatting
+
+ * s-tassta.adb: Minor reformatting
+
+ * s-scaval.adb: Add ??? comment
+
+ * stand.ads: Minor code clean up (remove junk with of Namet)
+
+ * s-strcom.adb, s-strcom.ads, s-string.adb, s-string.ads, s-sopco3.adb,
+ s-sopco3.ads, s-strops.adb, s-strops.ads, s-sopco5.adb, s-sopco5.ads,
+ s-wchcnv.adb, s-wchcnv.ads, s-ststop.adb, s-ststop.ads, s-soflin.adb,
+ s-soflin.ads, s-traceb.adb, s-traceb.ads, s-traent.adb, s-traent.ads,
+ s-secsta.adb, s-secsta.ads, s-utf_32.adb, s-utf_32.ads, s-wchcon.adb,
+ s-wchjis.adb, s-wchcon.ads, s-wchjis.ads, s-sopco4.adb, s-sopco4.ads,
+ s-stache.adb, s-stache.ads, s-stoele.adb, s-stoele.ads, s-stalib.adb,
+ s-stalib.ads, s-os_lib.ads, s-purexc.ads: Remove no longer needed
+ Warnings off pragmas.
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * initialize.c: Fix test for reallocating the arguments array.
+
+2009-04-17 Geert Bosch <bosch@adacore.com>
+
+ * exp_fixd.adb (Expand_Convert_Float_To_Fixed): Have float to fixed
+ conversion truncate only for decimal fixed point types.
+
+2009-04-17 Jerome Lambourg <lambourg@adacore.com>
+
+ * g-comlin.adb (Initialize_Scan_Option): Make sure the sections are
+ reinitialized.
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch5.adb (Expand_Assign_Array): Do not set Forwards_OK and
+ Backwards_OK if either operand has an address clause.
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * initialize.c: Code clean up, use realloc.
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * initialize.c: Do not get Unicode command line if Unicode support not
+ activated.
+ Add support for wildcard expansion for Unicode parameters on Win32.
+
+ * mingw32.h: Add missing macros when Unicode support not activated.
+
+2009-04-17 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch6.adb (Check_Anonymous_Return): Add missing checks to
+ avoid generating code that references the Current_Master
+ when compiling without tasks.
+
+2009-04-17 Vincent Celier <celier@adacore.com>
+
+ * prj-attr.adb: New project level attribute Target
+
+ * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
+ attribute Target
+
+ * prj.ads (Project_Configuration): New component Target
+
+2009-04-17 Thomas Quinot <quinot@adacore.com>
+
+ * exp_ch7.adb (Expand_Ctrl_Function_Call): Remove incorrect special
+ case for the case of an aggregate component, the attach call for the
+ result is actually needed.
+
+ * exp_aggr.adb (Backend_Processing_Possible): Backend processing for
+ an array aggregate must be disabled if the component type requires
+ controlled actions.
+
+ * exp_ch3.adb: Minor reformatting
+
+2009-04-17 Bob Duff <duff@adacore.com>
+
+ * output.ads (Indent,Outdent): New procedures for indenting the output.
+ (Write_Char): Correct comment -- LF _is_ allowed.
+
+ * output.adb (Indent,Outdent): New procedures for indenting the output.
+ Keep track of the indentation level, and make sure it doesn't get too
+ high.
+ (Flush_Buffer): Insert spaces at the beginning of each line, if
+ indentation level is nonzero.
+ (Save_Output_Buffer,Restore_Output_Buffer): Save and restore the current
+ indentation level.
+ (Set_Standard_Error,Set_Standard_Output): Remove superfluous
+ "Next_Col := 1;". Flush_Buffer does that.
+
+ * sem_ch6.adb, sem_ch7.adb (Debug_Flag_C): Reorganize the output
+ controlled by the -gnatdc switch. It now occurs on entry/exit to the
+ relevant analysis routines, and calls Indent/Outdent to make the
+ indentation reflect the nesting level. Add "helper" routines, since
+ otherwise lots of "return;" statements would skip the debugging output.
+
+2009-04-17 Arnaud Charlet <charlet@adacore.com>
+
+ * s-taprop-tru64.adb, s-taprop-vms.adb, s-taprop-linux.adb,
+ s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop-hpux-dce.adb,
+ s-taprop-posix.adb (Suspend_Until_True): Protect against early wakeup.
+
+2009-04-17 Thomas Quinot <quinot@adacore.com>
+
+ * exp_aggr.adb: Minor code reorganization, no behaviour change.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Use_One_Type): Handle properly a redundant use type
+ clause in a unit that is a package body or a subunit, when the previous
+ clause appears in a spec or a parent.
+
+2009-04-17 Thomas Quinot <quinot@adacore.com>
+
+ * sinfo.ads, exp_aggr.adb, exp_aggr.ads: Minor reformatting
+
+ * exp_ch7.adb: Minor reformatting
+
+2009-04-17 Bob Duff <duff@adacore.com>
+
+ * exp_ch4.adb (Expand_Allocator_Expression): In an initialized
+ allocator, check that the expression of the qualified expression obeys
+ the constraints of the subtype of the qualified expression.
+
+2009-04-17 Thomas Quinot <quinot@adacore.com>
+
+ * sprint.adb (Write_Itype): Add handling of enumeration subtypes.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch4.adb (Expand_Allocator_Expression): Apply constraint check to
+ aggregate, using context imposed by subtype mark in allocator.
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * gnat_rm.texi: Document GNAT_CODE_PAGE environment variable
+
+2009-04-17 Nicolas Roche <roche@adacore.com>
+
+ * initialize.c (__gnat_initialize): remove MAX_PATH limitation on each
+ argument length.
+
+2009-04-17 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_elim.adb (Eliminate_Error_Msg): Minor change to error message to
+ cover both calls and attribute references ("call" => "reference").
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype of an access
+ type for which Storage_Size is set to 0 is legal in a pure unit.
+
+2009-04-17 Thomas Quinot <quinot@adacore.com>
+
+ * exp_ch7.adb: Minor reformatting
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * restrict.adb (Check_Restriction_No_Dependence): Don't check
+ restriction if outside main extended source unit.
+
+ * sem_ch10.adb (Analyze_With_Clause): Check No_Dependence restriction
+ for parents of child units as well as the child unit itself.
+
+2009-04-17 Bob Duff <duff@adacore.com>
+
+ * checks.ads: Minor comment fix
+
+ * exp_aggr.ads: Minor comment fix
+
+2009-04-17 Nicolas Roche <roche@adacore.com>
+
+ * adaint.c: Improve cross compiler detection and handling.
+
+2009-04-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_ch4.adb (Expand_Concatenation): Do not use calls at -Os.
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * mingw32.h: Add S2WSC and WS2SC macros to convert to/from
+ CurrentCodePage.
+
+ * adaint.h: Encoding_Unspecified is now defined. Corresponds to the
+ value when no encoding form paramter is set on Text_IO services.
+
+ * adaint.c: CurrentCodePage new variable on Windows.
+ Use new macros S2WSC and WS2SC instead of the UTF-8 oriented
+ ones.
+
+ * mkdir.c: Use new macros S2WSC and WS2SC instead of the UTF-8 oriented
+ ones.
+
+ * initialize.c: Initialize CurrentCodePage depending on GNAT_CODE_PAGE
+ environment variable value. Default is UTF-8.
+
+ * s-crtl.ads: Filename_Encoding add Unspecified in the enumeration type.
+ fopen and freopen encoding parameter is now set to Unspecified.
+ The default value is in this case UTF-8 (as it was before) but
+ use the new macros that convert to/from the code page set
+ at runtime (CurrentCodePage).
+
+ * s-fileio.adb: When no encoding specified use Unspecified value.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * atree.adb, atree.ads: Remove dead code.
+
+2009-04-17 Arnaud Charlet <charlet@adacore.com>
+
+ * gcc-interface/Make-lang.in: Update dependencies.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Access_Subprogram_Definition): Additional checks on
+ illegal uses of incomplete types in formal parts and return types.
+
+ * sem_ch6.adb (Process_Formals): Taft-amendment types are legal in
+ access to subprograms.
+
+ * sem_ch7.adb (Uninstall_Declarations): diagnose attempts to use
+ Taft-amendment types as the return type of an access_to_function type.
+
+ * freeze.adb (Freeze_Entity): Remove tests on formals of an incomplete
+ type for access_to_subprograms. The check is performed on package exit.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * atree.ads, atree.adb: Move New_Copy_Tree.to sem_util.
+
+ * nlists.ads, nlists.adb: Move New_Copy_List to sem_util.
+
+ * lib-load.adb: Use Copy_Separate_Tree rather than New_Copy_Tree
+
+ * sem_util.ads, sem_util.adb: New_Copy_Tree and New_Copy_List belong in
+ semantic units, because the handling of itypes in the copied tree
+ requires semantic information that does not belong in atree.
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * par-ch6.adb: Minor reformatting
+
+ * prj.adb: Minor reformatting
+
+2009-04-17 Gary Dismukes <dismukes@adacore.com>
+
+ * par-ch6.adb (P_Subprogram): Overriding indicators should be allowed
+ on protected subprogram bodies, so exclude the case where Pf_Flags is
+ Pf_Decl_Pbod from the error check.
+
+ * par-ch9.adb (P_Protected_Operation_Items): Permit overriding
+ indicators on subprograms in protected bodies, and proceed with parsing
+ the subprogram.
+
+ * sem_ch6.adb (Verify_Overriding_Indicator): Exclude protected
+ subprograms from the check for primitiveness on subprograms with
+ overriding indicators.
+ (Check_Overriding_Indicator): Include protected subprograms in the
+ style check for missing overriding indicators.
+
+2009-04-17 Tristan Gingold <gingold@adacore.com>
+
+ * init.c: Fix stack checking for x86 Darwin.
+
+2009-04-17 Vincent Celier <celier@adacore.com>
+
+ * prj-attr.adb: New project level attribute Object_File_Suffix
+ (<language>).
+
+ * prj-nmsc.adb (Add_Source): Use the object file suffix to get the
+ object file name
+ (Process_Compiler): Process attribute Object_File_Suffix
+
+ * prj.adb (Object_Name): Use suffix Object_File_Suffix instead of
+ platform suffix, when specified.
+
+ * prj.ads (Language_Config): New component Object_File_Suffix,
+ defaulted to No_Name.
+ (Object_Name): New parameter Object_File_Suffix, defaulted to No_Name
+
+ * snames.ads-tmpl: New standard name Object_File_Suffix
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * gnat_rm.texi: Add documentation about No_Streams restriction
+
+ * sem_attr.adb (Check_Stream_Attribute): Exclude implicit stream
+ attributes when checking No_Streams restriction.
+
+2009-04-17 Thomas Quinot <quinot@adacore.com>
+
+ * rtsfind.ads (RE_Request_Destroy): New PolyORB s-parint entity.
+
+ * exp_dist.adb (PolyORB_Support.Build_General_Calling_Stubs): Add
+ missing calls to RE_Request_Destroy to deallocate request objects after
+ use.
+
+2009-04-17 Nicolas Setton <setton@adacore.com>
+
+ * link.c: Fix support for passing a response file under Darwin.
+
+2009-04-17 Emmanuel Briot <briot@adacore.com>
+
+ * prj.adb (Free): new subprogram.
+
+2009-04-17 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb: additional initialization on incomplete subtypes.
+
+ * sem_ch6.adb (Process_Formals): if the subprogram is in the private
+ part and one of the formals is an incomplete tagged type, attach to
+ list of private dependends of the type for later validation.
+
+ * sem_ch7.adb (Uninstall_Declarations): diagnose attempts to declare
+ primitive operations of a Taft-amendmment type.
+
+ * freeze.adb (Freeze_Entity): Remove tests on formals of an incomplete
+ type. The check is performed on package exit, possibly after the
+ subprogram is frozen.
+
+2009-04-17 Vincent Celier <celier@adacore.com>
+
+ * prj-nmsc.adb (Get_Directories): Get the object and exec directory
+ before looking for source directories, but make sure that there are nil
+ if they are not explicitely declared and there is explicitely no
+ sources in the project.
+
+2009-04-17 Pascal Obry <obry@adacore.com>
+
+ * initialize.c: Set gnat_argv with UTF-8 encoded strings on Windows.
+
+ * init.c: Fix minor typo and style fix.
+
+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * a-except.adb, a-except-2005.adb: Add PE_Address_Of_Intrinsic
+
+ * sem_attr.adb (Analyze_Attribute, case Address): Use
+ PE_Address_Of_Intrinsic.
+
+ * types.ads: Add PE_Address_Of_Intrinsic
+
+ * types.h: Add PE_Address_Of_Intrinsic
+
+2009-04-17 Nicolas Setton <setton@adacore.com>
+
+ * gcc-interface/Makefile.in: Under darwin, build shared libraries
+ with install_name starting with "@rpath/".
+
+2009-04-17 Nicolas Setton <setton@adacore.com>
+
+ * link.c: Add darwin section
+
+2009-04-16 Robert Dewar <dewar@adacore.com>
+
+ * g-pehage.adb: Minor reformatting
+
+ * sem_ch12.adb: Minor reformatting
+
+ * exp_dist.adb: Minor reformatting
+
+ * bindgen.adb: Minor style fixes.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_eval.adb (Eval_Indexed_Component): Extend constant-folding of
+ indexed components to the case where the prefix is a static string
+ literal.
+
+2009-04-16 Javier Miranda <miranda@adacore.com>
+
+ * exp_ch3.adb (Expand_N_Object_Declaration): In case of build-in-place
+ objects avoid any further expansion of the expression initializing the
+ object.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch12.adb (Preanalyze_Actuals): If the instance is a child unit
+ that hides an outer homograph, make that homograph invisible when
+ analyzing the actuals, to to prevent illegal direct visibility on it.
+
+2009-04-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g-pehage.adb (Initialize): Fix off-by-one error.
+
+2009-04-16 Tristan Gingold <gingold@adacore.com>
+
+ * init.c: Detect real stack overflow on Darwin.
+
+ * system-darwin-x86.ads: Use stack probing on darwin x86.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_attr.adb (Analyze_Attribute, case 'Address): It is illegal to
+ take the address of an intrinsic subprogram.
+
+2009-04-16 Arnaud Charlet <charlet@adacore.com>
+
+ * gcc-interface/Makefile.in: Change g-trasym to g-trasym-unimplemented
+ for the targets where GNAT.Traceback.Symbolic is not supported.
+
+2009-04-16 Vincent Celier <celier@adacore.com>
+
+ * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: New file.
+
+ * g-trasym.ads: Update comments.
+
+2009-04-16 Vasiliy Fofanov <fofanov@adacore.com>
+
+ * tracebak.c (STOP_FRAME): Verify validity of the current address
+ before dereferencing.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sprint.adb (Write_Itype): If the itype is an array subtype, preserve
+ the original location of the index expressions and the index subtypes,
+ to prevent spurious out-of-scope references in gigi.
+
+2009-04-16 Tristan Gingold <gingold@adacore.com>
+
+ * init.c, s-osinte-darwin.ads, system-darwin-x86_64.ads:
+ Add support for stack checking on darwin.
+
+2009-04-16 Vincent Celier <celier@adacore.com>
+
+ * prj-attr.adb: New attribute Runtime_Source_Dir
+
+ * prj-nmsc.adb (Process_Project_Level_Array_Attributes): Process
+ attribute Runtime_Source_Dir.
+ (Check_Naming_Schemes): Give default values to out parameters to avoid
+ invalid data.
+
+ * prj.ads (Language_Config): New component Runtime_Source_Dir
+
+ * snames.ads-tmpl: New standard name Runtime_Source_Dir
+
+2009-04-16 Pascal Obry <obry@adacore.com>
+
+ * adaint.h, adaint.c (__gnat_rmdir): New routine.
+ Simple wrapper routines used to convert to proper encoding on
+ Windows.
+
+ * s-crtl.ads: Use __gnat_rmdir instead of direct call to the C library.
+
+ * g-dirope.adb (Remove_Dir): Fix a bug, the root directory was removed
+ twice.
+
+2009-04-16 Pascal Obry <obry@adacore.com>
+
+ * s-crtl.ads, s-os_lib.adb: Minor code clean-up.
+
+2009-04-16 Thomas Quinot <quinot@adacore.com>
+
+ * snames.ads-tmpl (Name_Defined): New predefined name for use by the
+ integrated preprocessor.
+
+ * prep.ads, prep.adb (Setup_Hooks): New subprogram.
+ (Initialize): Split into two subprograms, Initialize (to be called
+ prior to compiler command line processing) and Setup_Hooks (to be called
+ later on when the first source file is loaded).
+
+ * gprep.adb: Change call to Prep.Initialize to call to Prep.Setup_Hooks.
+ Add call to Prep.Initialize.
+
+ * sinput-l.adb, prepcomp.adb: Change call to Prep.Initialize to call
+ to Prep.Setup_Hooks.
+
+2009-04-16 Pascal Obry <obry@adacore.com>
+
+ * adaint.h, adaint.c (__gnat_chdir): New routine.
+ Simple wrapper routines used to convert to proper encoding on
+ Windows.
+
+ * s-crtl.ads: Use __gnat_chdir instead of direct call to the C library.
+
+ * a-direct.adb, g-dirope.adb: Use chdir from System.CRTL.
+
+2009-04-16 Quentin Ochem <ochem@adacore.com>
+
+ * sinput-p.adb (Clear_Source_File_Table): Use Sinput.Initialize instead
+ of Source.Init.
+
+2009-04-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * a-convec.ads (Is_Empty): Mark inline.
+
+2009-04-16 Nicolas Roche <roche@adacore.com>
+
+ * init.c (__gnat_init_float): Initialize FPU on x86_64 windows
+
+2009-04-16 Thomas Quinot <quinot@adacore.com>
+
+ * prepcomp.adb: Minor reformatting
+
+2009-04-16 Jerome Lambourg <lambourg@adacore.com>
+
+ * sem_prag.adb (Process_Import_Or_Interface): With .NET,
+ Access_Subprogram types can also be imported.
+ (Check_Form_Of_Interface_Name): Accept '/' character in entity CIL
+ names.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
+ preserve homonym chain when the declaration is rewritten into a
+ renaming declaration, in order to preserve visibility structure.
+
+2009-04-16 Jerome Lambourg <lambourg@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma): Make sure that pragma pack is not
+ taken into account for VM targets.
+
+2009-04-16 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * g-calend.ads, g-calend.adb (Week_In_Year): Now calls
+ Year_Week_In_Year.
+ (Year_Week_In_Year): New routine which contains the original code from
+ Week_In_Year. Add the missing special case for January 1st falling on
+ a Monday.
+
+2009-04-16 Thomas Quinot <quinot@adacore.com>
+
+ * exp_dist.adb (Build_From_Any_Call): For a subtype that is a generic
+ actual type, use the base type to build the To_Any function.
+ (Build_From_Any_Function): Remove junk, useless subtype conversion.
+
+2009-04-16 Thomas Quinot <quinot@adacore.com>
+
+ * exp_ch9.adb, exp_code.adb, tbuild.adb, sem_case.adb,
+ restrict.adb: Minor code reorganization (use
+ Add_{Char,Str}_To_Name_Buffer instead of inlining it by hand).
+
+2009-04-16 Bob Duff <duff@adacore.com>
+
+ * exp_ch6.ads, exp_ch6.adb (Is_Build_In_Place_Function_Return): Remove,
+ unused.
+
+2009-04-16 Thomas Quinot <quinot@adacore.com>
+
+ * sem_ch4.adb: Minor reformatting
+
+ * adaint.c: Remove junk duplicated code.
+
+ * sem_ch3.adb: Minor reformatting
+
+ * exp_dist.adb: Minor comment rewording
+
+2009-04-16 Robert Dewar <dewar@adacore.com>
+
+ * gnat_rm.texi: Document effect of Assume_No_Invalid_Values and -gnatVa
+ used together.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Find_Equality_Types): Filter out types that are not
+ usable before calling Add_One_Interp, to resolve spurious ambiguities.
+
+2009-04-16 Robert Dewar <dewar@adacore.com>
+
+ * Make-lang.in: Add entries for s-conca?.o
+
+ * Makefile.rtl: Add entries for s-conca?
+
+ * debug.adb: Add debug flags -gnatd.c and -gnatd.C to control behavior
+ of concatenation expansion
+
+ * exp_ch4.adb (Expand_Concatenation): Generate calls for certain
+ string cases instead of expanding assignments inline.
+
+ * opt.ads (Optimize_Size): New flag
+
+ * s-conca2.ads, s-conca2.adb, s-conca3.adb, s-conca3.ads,
+ s-conca4.adb, s-conca4.ads, s-conca5.adb, s-conca5.ads, s-conca6.adb,
+ s-conca6.ads, s-conca7.ads, s-conca7.adb, s-conca8.adb, s-conca8.ads,
+ s-conca9.adb, s-conca9.ads: New file.
+
+2009-04-16 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch6.adb: Add comments
+
+ * rtsfind.ads: Add entries for s-conca? routines
+
+2009-04-16 Arnaud Charlet <charlet@adacore.com>
+
+ * gcc-interface/Make-lang.in: Update dependencies.
+
+ * gcc-interface/Makefile.in: Update translation for vms.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch12.adb (Map_Formal_Package_Entities): renamed from Map_Entities
+ and made global, to be used when installing parents of a child
+ instance, to provide mappings for entities declared in formal packages
+ of ancestor units. Now called from Install_Formal_Packages.
+
+2009-04-16 Doug Rupp <rupp@adacore.com>
+
+ * s-taskin.adb (Initialize_ATCB): Initialize Debug_Events with others
+ notation for clarity.
+
+ * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
+ s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
+ s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-posix.adb
+ (Initialize): Initialize Known_Tasks with Environment task.
+
+ * s-taskin.ads (Task_States): Move new states to end for the sake of
+ GDB compatibility.
+
+ * s-tassta.adb (Task_Wrapper): Fix comment about Enter_Task.
+
+2009-04-16 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch9.adb (Expand_N_Protected_Type_Declaration): If a protected
+ operation has an inline pragma, propagate the flag to the internal
+ unprotected subprogram.
+
+2009-04-16 Doug Rupp <rupp@adacore.com>
+
+ * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-mingw.adb,
+ s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
+ s-taprop-hpux-dce.adb, s-taprop-posix.adb
+ (Enter_Task): Move Known_Tasks initialization to s-tassta.adb
+
+ * s-taprop-vms.adb (Enter_Task): Likewise.
+ (Initialize): Import DBEXT, Debug_Register. Register DBGEXT callback.
+
+ * s-tassta.adb (Activate_Tasks): After task creation set state to
+ Activating, vice Runnable. Initialize Known_Tasks, moved here from
+ s-taprop.adb (Enter_Task). Set Debug_Event_Activating for debugger.
+ Set state to Runnable after above.
+ (Task_Wrapper): Set Debug_Event_Run. In exception block set
+ Debug_Event_Terminated.
+
+ * s-taskin.ads (Task_States): Add new states Activiting and
+ Activator_Delay_Sleep.
+ (Bit_Array, Debug_Event_Array): New types.
+ (Global_Task_Debug_Event_Set: New flag.
+ (Common_ATCB): New field Debug_Events.
+
+ * s-taskin.adb (Initialize_ATCB): Initialize Debug_Events.
+
+ * s-tasren.adb (Timed_Selective_Wait): Set Activator_Delay_Sleep vice
+ Activator_Sleep.
+
+ * s-tasini.adb (Locked_Abort_To_Level): Add case alternatives for when
+ Activating and when Acceptor_Delay_Sleep.
+
+ * s-tasdeb.ads: Add constants for Debug_Events.
+ (Debug_Event_Kind_Type): New subtype.
+ (Signal_Debug_Event): New subprogram.
+
+ * s-tasdeb.adb (Signal_Debug_Event): New null subprogram.
+
+2009-04-16 Thomas Quinot <quinot@adacore.com>
+
+ * sem_elim.adb: Minor reformatting
+
+ * freeze.adb: Minor reformatting
+
+ * exp_ch4.adb: Minor reformatting
+
+2009-04-16 Emmanuel Briot <briot@adacore.com>
+
+ * prj-nmsc.adb (Path_Name_Of): fix memory leak
+
+2009-04-16 Robert Dewar <dewar@adacore.com>
+
+ * sinfo.ads (Backwards_OK, Forwards_OK): Clarify documentation
+
+2009-04-16 Vincent Celier <celier@adacore.com>
+
+ * fmap.adb (Initialize): Show the current line when the mapping file
+ is detected as "incorrectly formatted".
+
+2009-04-16 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch12.adb: Minor reformatting
+
+ * sem_ch5.adb: Minor comment addition
+
+ * sem_util.adb: Minor reformatting
+
+ * sinput-p.adb: Minor reformatting
+ Add missing pragma Warnings (On)
+
+2009-04-16 Ed Falis <falis@adacore.com>
+
+ * s-vxwext-kernel.adb: (ERROR): deleted unused constant
+
+2009-04-16 Vincent Celier <celier@adacore.com>
+
+ * ali-util.adb: Minor comment spelling error fix
+
+2009-04-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_ch5.adb (Expand_Assign_Array): For the GCC back-end, do not
+ generate an assignment loop in case of overlap.
+
+2009-04-16 Olivier Hainque <hainque@adacore.com>
+
+ * gnat_ugn.texi (gnatmem description): Make it explicit that
+ gnatmem is designed to work in association with static runtime
+ library only.
+
+2009-04-16 Thomas Quinot <quinot@adacore.com>
+
+ * sem_type.adb: Minor reformatting
+
+2009-04-16 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * s-osprim-darwin.adb, s-osprim-posix.adb (Clock): Add comment
+ concerning return codes of gettimeofday and return value check.
+
+2009-04-16 Ed Falis <falis@adacore.com>
+
+ * s-vxwext-kernel.ads (Int_Lock, Int_Unlock): set to convention C so
+ body can be renaming of imported routines.
+
+2009-04-16 Vasiliy Fofanov <fofanov@adacore.com>
+
+ * s-asthan-vms-alpha.adb: Disable warnings on alignment in a more
+ targeted fashion.
+
+2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch9.adb: Comment improvements.
+ (Build_Entry_Family_Name): Add parentheses around the index of a entry
+ family member.
+
+2009-04-15 Bob Duff <duff@adacore.com>
+
+ * sem_warn.adb (Check_Infinite_Loop_Warning): Catch cases like
+ "while X /= null loop" where X is unchanged inside the loop. We were
+ not warning in this case, because of the pointers -- we feared that the
+ loop variable could be updated via a pointer, if there are any pointers
+ around the place. But that is impossible in this case.
+
+ * sem_util.adb (May_Be_Lvalue): This routine was overly pessimistic in
+ the case of dereferences. In X.all, X cannot be an l-value. We now
+ catch that case (and implicit dereferences, too).
+
+2009-04-15 Vincent Celier <celier@adacore.com>
+
+ * sinput-p.ads, sinput-p.adb (Clear_Source_File_Table): New procedure
+
+2009-04-15 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch12.adb (Is_Actual_Of_Previous_Formal): Make fully recursive.
+ From code reading.
+ (Analyze_Package_Instantiation): If generic unit in child instance is
+ the same as generic unit in parent instance, look for an outer homonym
+ to locate the desired generic.
+
+2009-04-15 Bob Duff <duff@adacore.com>
+
+ * sem_ch5.adb (Analyze_Loop_Statement): Don't check for infinite loop
+ warnings unless the loop comes from source, because checking generated
+ loops is a waste of time, and makes it harder to debug
+ Check_Infinite_Loop_Warning.
+
+ * sem_warn.adb (Check_Infinite_Loop_Warning): If the local variable
+ tested in the while loop is a renaming, do not warn. Otherwise, we get
+ false alarms, because it's usually renaming something that we can't
+ deal with (an indexed component, a global variable, ...).
+
+ * gnat_rm.texi: Fix typo
+
+2009-04-15 Thomas Quinot <quinot@adacore.com>
+
+ * sem_ch6.adb: Minor reformatting
+
+2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch7.adb (Expand_Ctrl_Function_Call): Check for the case where the
+ immediate parent of the controlled function call is a component
+ association.
+
+2009-04-15 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Use_One_Type): If the type is tagged, indicate that the
+ corresponding class-wide type is also in use.
+
+2009-04-15 Thomas Quinot <quinot@adacore.com>
+
+ * frontend.adb: Minor comment fix
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * gnatchop.adb (BOM_Length): New global variable
+ (Write_Unit): Add new parameter Write_BOM
+ (Write_Chopped_Files): Check for BOM and set Write_BOM for call
+ to Write_Unit
+
+ * gnat_ugn.texi: Add note on propagation of BOM by gnatchop
+
+2009-04-15 Geert Bosch <bosch@adacore.com>
+
+ * system-mingw-x86_64.ads, system-darwin-x86_64.ads
+ (Backend_Overflow_Checks): Set to True.
+
+2009-04-15 Gary Dismukes <dismukes@adacore.com>
+
+ * par-ch3.adb (P_Type_Declaration): Issue an error if the synchronized
+ keyword is given in a record extension.
+
+2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch7.adb (Expand_Ctrl_Function_Call): Procede with the expansion
+ of a controlled function call in the context of a record aggregate.
+ This does not apply to array aggregates since the call will be expanded
+ into assignments.
+
+2009-04-15 Ed Falis <falis@adacore.com>
+
+ * s-osinte-vxworks-kernel.adb, s-osinte-vxworks.adb,
+ s-osinte-vxworks.ads s-vxwext.ads, s-vxwext-kernel.adb,
+ s-vxwext-kernel.ads, s-vxwext-rtp.ads, s-vxwext-rtp.adb: Reorganize
+ s-osinte-vxworks* and s-vxwext*.
+
+2009-04-15 Arnaud Charlet <charlet@adacore.com>
+
+ * gcc-interface/Make-lang.in: Update dependencies.
+
+ * gcc-interface/Makefile.in: Reorganization of s-osinte-vxworks*
+ and s-vxwext*.
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch13.adb (Unchecked_Conversions): Store source location instead
+ of node for location for warning messages.
+
+ * gnatchop.adb: Minor reformatting
+
+2009-04-15 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch6.adb: additional guard for renaming declarations for in
+ parameters of an array type.
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * sem_eval.adb (Get_Static_Length): Go to origin node for array bounds
+ in case they were rewritten by expander (Force_Evaluation).
+
+ * targparm.adb (Get_Target_Parameters): Correct check for
+ Suppress_Exception_Locations.
+
+2009-04-15 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch6.adb (Expand_Inlined_Call): If an in-parameter in a call to be
+ inlined is of an array type that is not bit-packed, use a renaming
+ declaration to capture its value, rather than a constant declaration.
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * rtsfind.adb: Minor reformatting.
+
+2009-04-15 Emmanuel Briot <briot@adacore.com>
+
+ * prj-part.adb, prj-tree.adb, prj-tree.ads (Restore_And_Free): renames
+ Restore, and free the saved context.
+
+2009-04-15 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_ch3.adb (Analyze_Private_Extension_Declaration): Move error check
+ for illegal private extension from a synchronized interface parent in
+ front of check for illegal limited extension so that limited extension
+ from a synchronized interface will be rejected.
+ (Check_Ifaces): Check that a private extension that has a synchronized
+ interface as a progenitor must be explicitly declared synchronized.
+ Also check that a record extension cannot derive from a synchronized
+ interface.
+
+2009-04-15 Pascal Obry <obry@adacore.com>
+
+ * adaint.h (__gnat_unlink): Add spec.
+ (__gnat_rename): Likewise.
+
+2009-04-15 Vincent Celier <celier@adacore.com>
+
+ * prj-nmsc.adb: Minor spelling error corrections in error messages
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * sinfo.ads: Minor comment update
+
+ * opt.ads: Minor comment updates
+
+ * checks.adb (Enable_Overflow_Check): Do not set Do_Overflow_Check for
+ modular type.
+
+2009-04-15 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_disp.ads, exp_disp.adb (Register_Primitive): Is now a function
+ that generates the code needed to update a dispatch table when a
+ primitive operation is declared with a subprogram body without previous
+ spec. Insertion of the generated code is responsibility of the caller.
+ (Make_DT): When building static tables, append the code created by
+ Register_Primitive to update a secondary table after it has been
+ constructed.
+
+ * exp_ch3.adb, exp_ch6.adb: use new version of Register_Primitive.
+
+ * sem_disp.adb (Check_Dispatching_Operation): Call Register_Primitive
+ on an overriding operation that implements an interface operation only
+ if not building static dispatch tables.
+
+2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * a-caldel-vms.adb (To_Duration): Declare a "safe" end of time which
+ does not cause overflow when converted to Duration. Use the safe value
+ as the maximum allowable time delay..
+
+2009-04-15 Jerome Lambourg <lambourg@adacore.com>
+
+ * g-comlin.adb (Set_Command_Line): When adding a switch with attached
+ parameter, specify that the delimiter is NUL, otherwise "-j2" will be
+ translated to "-j 2".
+
+2009-04-15 Bob Duff <duff@adacore.com>
+
+ * rtsfind.adb (Maybe_Add_With): Split out procedure to add implicit
+ with_clauses, to avoid code duplication. Change this processing so we
+ always add a with_clause on the main unit if needed.
+
+2009-04-15 Pascal Obry <obry@adacore.com>
+
+ Add support for Win32 native encoding for delete/rename routines.
+
+ * adaint.c (__gnat_unlink): New routine.
+ (__gnat_rename): New routine.
+ Simple wrapper routines used to convert to proper encoding on
+ Windows.
+
+ * s-os_lib.adb: Use __gnat_unlink and __gnat_rename instead of direct
+ call to the C library.
+
+ * g-sercom-mingw.adb, s-win32.ads: Update Win32 binding.
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * s-tassta.adb: Minor reformatting
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * frontend.adb (Frontend): Set proper default for
+ Warn_On_Non_Local_Exception.
+
+ * opt.ads (Exception_Handler_Encountered): New flag
+ (No_Warn_On_Non_Local_Exception): New flag
+
+ * par-ch11.adb (P_Exception_Handler): Set Exception_Handler_Encountered
+
+ * sem_warn.adb (Set_Warning_Switch): Set No_Warn_On_Non_Local_Exception
+ (Set_Dot_Warning_Switch): Set No_Warn_On_Non_Local_Exception
+
+2009-04-15 Cyrille Comar <comar@adacore.com>
+
+ * s-tassta.adb, a-exextr.adb, a-elchha.adb
+ (Ada.Exception.Last_Chance_Handler): Do not print unhandled exception
+ message when exception traces are active since it would generate
+ redundant information.
+ (Exception_Traces.Notify_Exception): put message output by a critical
+ section to avoid unsynchronized output.
+ (Trace_Unhandled_Exception_In_Task): put message output by a critical
+ section to avoid unsynchronized output.
+
+2009-04-15 Emmanuel Briot <briot@adacore.com>
+
+ * g-comlin.adb, prj-tree.adb, prj-tree.ads, prj.adb, prj.ads
+ (Free): New subprogram.
+
+2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * a-calend.adb: Add new constant Nanos_In_Four_Years.
+ (Formatting_Operations.Time_Of): Change the way four year chunks of
+ nanoseconds are added to the intermediate result.
+
+2009-04-15 Nicolas Setton <setton@adacore.com>
+
+ * sysdep.c: Add __APPLE__ in the list of systems where get_immediate
+ does not need to wait for a carriage return.
+
+2009-04-15 Tristan Gingold <gingold@adacore.com>
+
+ * bindgen.adb: Do not generate adafinal if No_Finalization restriction
+ is set.
+
+2009-04-15 Ed Schonberg <schonberg@adacore.com>
+
+ * freeze.adb (Freeze_Entity): improve error message for improper use of
+ incomplete types.
+ Diagnose additional illegal uses of incomplete types in formal parts.
+ appearing in formal parts.
+
+ * sem_ch6.adb (Process_Formals, Analyze_Return_Type): ditto.
+
+2009-04-15 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch4.adb (Expand_N_Allocator): Install test for object too large.
+
+2009-04-15 Nicolas Roche <roche@adacore.com>
+
+ * adaint.c: Add function __gnat_lwp_self that retrieves the LWP of the
+ current thread.
+
+ * s-osinte-linux.ads: Import the __gnat_lwp_self function as lwp_self
+
+ * s-taprop-linux.adb (Enter_Task): Store the LWP in the TCB
+
2009-04-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb: improve error message on exponentiation.
@@ -70,6 +1249,7 @@
* gcc-interface/Make-lang.in: Update dependencies.
* gcc-interface/Makefile.in: Fix VxWorks target pairs.
+ Update xenomai target pairs.
2009-04-15 Javier Miranda <miranda@adacore.com>
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 1a85461669c..66c48e06093 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -416,6 +416,14 @@ GNATRTL_NONTASKING_OBJS= \
s-caun32$(objext) \
s-caun64$(objext) \
s-chepoo$(objext) \
+ s-conca2$(objext) \
+ s-conca3$(objext) \
+ s-conca4$(objext) \
+ s-conca5$(objext) \
+ s-conca6$(objext) \
+ s-conca7$(objext) \
+ s-conca8$(objext) \
+ s-conca9$(objext) \
s-crtl$(objext) \
s-crc32$(objext) \
s-direio$(objext) \
diff --git a/gcc/ada/a-caldel-vms.adb b/gcc/ada/a-caldel-vms.adb
index b60bc8b5cb1..8b7715744d6 100644
--- a/gcc/ada/a-caldel-vms.adb
+++ b/gcc/ada/a-caldel-vms.adb
@@ -75,8 +75,20 @@ package body Ada.Calendar.Delays is
-----------------
function To_Duration (T : Time) return Duration is
+ Safe_Ada_High : constant Time := Time_Of (2250, 1, 1, 0.0);
+ -- A value distant enough to emulate "end of time" but which does not
+ -- cause overflow.
+
+ Safe_T : Time;
+
begin
- return OSP.To_Duration (OSP.OS_Time (T), OSP.Absolute_Calendar);
+ if T > Safe_Ada_High then
+ Safe_T := Safe_Ada_High;
+ else
+ Safe_T := T;
+ end if;
+
+ return OSP.To_Duration (OSP.OS_Time (Safe_T), OSP.Absolute_Calendar);
end To_Duration;
--------------------
diff --git a/gcc/ada/a-calend.adb b/gcc/ada/a-calend.adb
index a2759b53a89..9aa88521b90 100644
--- a/gcc/ada/a-calend.adb
+++ b/gcc/ada/a-calend.adb
@@ -148,6 +148,7 @@ package body Ada.Calendar is
Ada_Min_Year : constant Year_Number := Year_Number'First;
Secs_In_Four_Years : constant := (3 * 365 + 366) * Secs_In_Day;
Secs_In_Non_Leap_Year : constant := 365 * Secs_In_Day;
+ Nanos_In_Four_Years : constant := Secs_In_Four_Years * Nano;
-- Lower and upper bound of Ada time. The zero (0) value of type Time is
-- positioned at year 2150. Note that the lower and upper bound account
@@ -1317,7 +1318,9 @@ package body Ada.Calendar is
-- the input date.
Count := (Year - Year_Number'First) / 4;
- Res_N := Res_N + Time_Rep (Count) * Secs_In_Four_Years * Nano;
+ for Four_Year_Segments in 1 .. Count loop
+ Res_N := Res_N + Nanos_In_Four_Years;
+ end loop;
-- Note that non-leap centennial years are automatically considered
-- leap in the operation above. An adjustment of several days is
@@ -1471,39 +1474,15 @@ package body Ada.Calendar is
Nanos_In_56_Years : constant := (14 * 366 + 42 * 365) * Nanos_In_Day;
- -- Base C types. There is no point dragging in Interfaces.C just for
- -- these four types.
-
- type char_Pointer is access Character;
- subtype int is Integer;
subtype long is Long_Integer;
type long_Pointer is access all long;
- -- The Ada equivalent of struct tm and type time_t
-
- type tm is record
- tm_sec : int; -- seconds after the minute (0 .. 60)
- tm_min : int; -- minutes after the hour (0 .. 59)
- tm_hour : int; -- hours since midnight (0 .. 24)
- tm_mday : int; -- day of the month (1 .. 31)
- tm_mon : int; -- months since January (0 .. 11)
- tm_year : int; -- years since 1900
- tm_wday : int; -- days since Sunday (0 .. 6)
- tm_yday : int; -- days since January 1 (0 .. 365)
- tm_isdst : int; -- Daylight Savings Time flag (-1 .. 1)
- tm_gmtoff : long; -- offset from UTC in seconds
- tm_zone : char_Pointer; -- timezone abbreviation
- end record;
-
- type tm_Pointer is access all tm;
-
subtype time_t is long;
type time_t_Pointer is access all time_t;
procedure localtime_tzoff
- (C : time_t_Pointer;
- res : tm_Pointer;
- off : long_Pointer);
+ (timer : time_t_Pointer;
+ off : long_Pointer);
pragma Import (C, localtime_tzoff, "__gnat_localtime_tzoff");
-- This is a lightweight wrapper around the system library function
-- localtime_r. Parameter 'off' captures the UTC offset which is either
@@ -1519,7 +1498,6 @@ package body Ada.Calendar is
Date_N : Time_Rep;
Offset : aliased long;
Secs_T : aliased time_t;
- Secs_TM : aliased tm;
begin
Date_N := Time_Rep (Date);
@@ -1565,7 +1543,6 @@ package body Ada.Calendar is
localtime_tzoff
(Secs_T'Unchecked_Access,
- Secs_TM'Unchecked_Access,
Offset'Unchecked_Access);
return Offset;
diff --git a/gcc/ada/a-convec.ads b/gcc/ada/a-convec.ads
index 5c79d875601..4b709659978 100644
--- a/gcc/ada/a-convec.ads
+++ b/gcc/ada/a-convec.ads
@@ -310,6 +310,7 @@ private
pragma Inline (Query_Element);
pragma Inline (Update_Element);
pragma Inline (Replace_Element);
+ pragma Inline (Is_Empty);
pragma Inline (Contains);
pragma Inline (Next);
pragma Inline (Previous);
diff --git a/gcc/ada/a-direct.adb b/gcc/ada/a-direct.adb
index 32ddce9e5b3..db9ef9f7c51 100644
--- a/gcc/ada/a-direct.adb
+++ b/gcc/ada/a-direct.adb
@@ -70,7 +70,7 @@ package body Ada.Directories is
type Search_Data is record
Is_Valid : Boolean := False;
- Name : Ada.Strings.Unbounded.Unbounded_String;
+ Name : Unbounded_String;
Pattern : Regexp;
Filter : Filter_Type;
Dir : Dir_Type_Value := No_Dir;
@@ -481,9 +481,7 @@ package body Ada.Directories is
C_Dir_Name : constant String := Directory & ASCII.NUL;
begin
- rmdir (C_Dir_Name);
-
- if System.OS_Lib.Is_Directory (Directory) then
+ if rmdir (C_Dir_Name) /= 0 then
raise Use_Error with
"deletion of directory """ & Directory & """ failed";
end if;
@@ -565,9 +563,7 @@ package body Ada.Directories is
C_Dir_Name : constant String := Directory & ASCII.NUL;
begin
- rmdir (C_Dir_Name);
-
- if System.OS_Lib.Is_Directory (Directory) then
+ if rmdir (C_Dir_Name) /= 0 then
raise Use_Error with
"directory tree rooted at """ &
Directory & """ could not be deleted";
@@ -1044,10 +1040,6 @@ package body Ada.Directories is
procedure Set_Directory (Directory : String) is
C_Dir_Name : constant String := Directory & ASCII.NUL;
-
- function chdir (Dir_Name : String) return Integer;
- pragma Import (C, chdir, "chdir");
-
begin
if not Is_Valid_Path_Name (Directory) then
raise Name_Error with
diff --git a/gcc/ada/a-elchha.adb b/gcc/ada/a-elchha.adb
index caa89ffb7b5..087e22f4ffb 100644
--- a/gcc/ada/a-elchha.adb
+++ b/gcc/ada/a-elchha.adb
@@ -79,7 +79,7 @@ begin
System.Soft_Links.Task_Termination_Handler :=
System.Soft_Links.Task_Termination_NT'Access;
- -- Let's shutdown the runtime now. The rest of the procedure needs to be
+ -- We shutdown the runtime now. The rest of the procedure needs to be
-- careful not to use anything that would require runtime support. In
-- particular, functions returning strings are banned since the sec stack
-- is no longer functional. This is particularly important to note for the
@@ -93,11 +93,16 @@ begin
System.Standard_Library.Adafinal;
+ -- Print a message only when exception traces are not active
+
+ if Exception_Trace /= RM_Convention then
+ null;
+
-- Check for special case of raising _ABORT_SIGNAL, which is not
-- really an exception at all. We recognize this by the fact that
-- it is the only exception whose name starts with underscore.
- if To_Ptr (Except.Id.Full_Name) (1) = '_' then
+ elsif To_Ptr (Except.Id.Full_Name) (1) = '_' then
To_Stderr (Nline);
To_Stderr ("Execution terminated by abort of environment task");
To_Stderr (Nline);
diff --git a/gcc/ada/a-except-2005.adb b/gcc/ada/a-except-2005.adb
index 9db770c3eb2..ad43e2121d1 100644
--- a/gcc/ada/a-except-2005.adb
+++ b/gcc/ada/a-except-2005.adb
@@ -457,6 +457,7 @@ package body Ada.Exceptions is
procedure Rcheck_30 (File : System.Address; Line : Integer);
procedure Rcheck_31 (File : System.Address; Line : Integer);
procedure Rcheck_32 (File : System.Address; Line : Integer);
+ procedure Rcheck_33 (File : System.Address; Line : Integer);
pragma Export (C, Rcheck_00, "__gnat_rcheck_00");
pragma Export (C, Rcheck_01, "__gnat_rcheck_01");
@@ -491,6 +492,7 @@ package body Ada.Exceptions is
pragma Export (C, Rcheck_30, "__gnat_rcheck_30");
pragma Export (C, Rcheck_31, "__gnat_rcheck_31");
pragma Export (C, Rcheck_32, "__gnat_rcheck_32");
+ pragma Export (C, Rcheck_33, "__gnat_rcheck_33");
-- None of these procedures ever returns (they raise an exception!). By
-- using pragma No_Return, we ensure that any junk code after the call,
@@ -528,6 +530,7 @@ package body Ada.Exceptions is
pragma No_Return (Rcheck_29);
pragma No_Return (Rcheck_30);
pragma No_Return (Rcheck_32);
+ pragma No_Return (Rcheck_33);
---------------------------------------------
-- Reason Strings for Run-Time Check Calls --
@@ -554,25 +557,27 @@ package body Ada.Exceptions is
Rmsg_13 : constant String := "tag check failed" & NUL;
Rmsg_14 : constant String := "access before elaboration" & NUL;
Rmsg_15 : constant String := "accessibility check failed" & NUL;
- Rmsg_16 : constant String := "all guards closed" & NUL;
- Rmsg_17 : constant String := "Current_Task referenced in entry" &
+ Rmsg_16 : constant String := "attempt to take address of" &
+ " intrinsic subprogram" & NUL;
+ Rmsg_17 : constant String := "all guards closed" & NUL;
+ Rmsg_18 : constant String := "Current_Task referenced in entry" &
" body" & NUL;
- Rmsg_18 : constant String := "duplicated entry address" & NUL;
- Rmsg_19 : constant String := "explicit raise" & NUL;
- Rmsg_20 : constant String := "finalize/adjust raised exception" & NUL;
- Rmsg_21 : constant String := "implicit return with No_Return" & NUL;
- Rmsg_22 : constant String := "misaligned address value" & NUL;
- Rmsg_23 : constant String := "missing return" & NUL;
- Rmsg_24 : constant String := "overlaid controlled object" & NUL;
- Rmsg_25 : constant String := "potentially blocking operation" & NUL;
- Rmsg_26 : constant String := "stubbed subprogram called" & NUL;
- Rmsg_27 : constant String := "unchecked union restriction" & NUL;
- Rmsg_28 : constant String := "actual/returned class-wide value "
- & "not transportable" & NUL;
- Rmsg_29 : constant String := "empty storage pool" & NUL;
- Rmsg_30 : constant String := "explicit raise" & NUL;
- Rmsg_31 : constant String := "infinite recursion" & NUL;
- Rmsg_32 : constant String := "object too large" & NUL;
+ Rmsg_19 : constant String := "duplicated entry address" & NUL;
+ Rmsg_20 : constant String := "explicit raise" & NUL;
+ Rmsg_21 : constant String := "finalize/adjust raised exception" & NUL;
+ Rmsg_22 : constant String := "implicit return with No_Return" & NUL;
+ Rmsg_23 : constant String := "misaligned address value" & NUL;
+ Rmsg_24 : constant String := "missing return" & NUL;
+ Rmsg_25 : constant String := "overlaid controlled object" & NUL;
+ Rmsg_26 : constant String := "potentially blocking operation" & NUL;
+ Rmsg_27 : constant String := "stubbed subprogram called" & NUL;
+ Rmsg_28 : constant String := "unchecked union restriction" & NUL;
+ Rmsg_29 : constant String := "actual/returned class-wide" &
+ " value not transportable" & NUL;
+ Rmsg_30 : constant String := "empty storage pool" & NUL;
+ Rmsg_31 : constant String := "explicit raise" & NUL;
+ Rmsg_32 : constant String := "infinite recursion" & NUL;
+ Rmsg_33 : constant String := "object too large" & NUL;
-----------------------
-- Polling Interface --
@@ -1161,7 +1166,7 @@ package body Ada.Exceptions is
procedure Rcheck_29 (File : System.Address; Line : Integer) is
begin
- Raise_Storage_Error_Msg (File, Line, Rmsg_29'Address);
+ Raise_Program_Error_Msg (File, Line, Rmsg_29'Address);
end Rcheck_29;
procedure Rcheck_30 (File : System.Address; Line : Integer) is
@@ -1179,6 +1184,11 @@ package body Ada.Exceptions is
Raise_Storage_Error_Msg (File, Line, Rmsg_32'Address);
end Rcheck_32;
+ procedure Rcheck_33 (File : System.Address; Line : Integer) is
+ begin
+ Raise_Storage_Error_Msg (File, Line, Rmsg_33'Address);
+ end Rcheck_33;
+
-------------
-- Reraise --
-------------
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb
index 9a07b2fb2ee..cf04fd46f3e 100644
--- a/gcc/ada/a-except.adb
+++ b/gcc/ada/a-except.adb
@@ -40,9 +40,7 @@
-- 2005 functionality is required. In particular, it is used for building
-- run times on all targets.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Style_Checks (All_Checks);
-- No subprogram ordering check, due to logical grouping
@@ -414,6 +412,7 @@ package body Ada.Exceptions is
procedure Rcheck_30 (File : System.Address; Line : Integer);
procedure Rcheck_31 (File : System.Address; Line : Integer);
procedure Rcheck_32 (File : System.Address; Line : Integer);
+ procedure Rcheck_33 (File : System.Address; Line : Integer);
pragma Export (C, Rcheck_00, "__gnat_rcheck_00");
pragma Export (C, Rcheck_01, "__gnat_rcheck_01");
@@ -448,6 +447,7 @@ package body Ada.Exceptions is
pragma Export (C, Rcheck_30, "__gnat_rcheck_30");
pragma Export (C, Rcheck_31, "__gnat_rcheck_31");
pragma Export (C, Rcheck_32, "__gnat_rcheck_32");
+ pragma Export (C, Rcheck_33, "__gnat_rcheck_33");
-- None of these procedures ever returns (they raise an exception!). By
-- using pragma No_Return, we ensure that any junk code after the call,
@@ -485,6 +485,7 @@ package body Ada.Exceptions is
pragma No_Return (Rcheck_29);
pragma No_Return (Rcheck_30);
pragma No_Return (Rcheck_32);
+ pragma No_Return (Rcheck_33);
---------------------------------------------
-- Reason Strings for Run-Time Check Calls --
@@ -511,25 +512,27 @@ package body Ada.Exceptions is
Rmsg_13 : constant String := "tag check failed" & NUL;
Rmsg_14 : constant String := "access before elaboration" & NUL;
Rmsg_15 : constant String := "accessibility check failed" & NUL;
- Rmsg_16 : constant String := "all guards closed" & NUL;
- Rmsg_17 : constant String := "Current_Task referenced in entry" &
+ Rmsg_16 : constant String := "attempt to take address of" &
+ " intrinsic subprogram" & NUL;
+ Rmsg_17 : constant String := "all guards closed" & NUL;
+ Rmsg_18 : constant String := "Current_Task referenced in entry" &
" body" & NUL;
- Rmsg_18 : constant String := "duplicated entry address" & NUL;
- Rmsg_19 : constant String := "explicit raise" & NUL;
- Rmsg_20 : constant String := "finalize/adjust raised exception" & NUL;
- Rmsg_21 : constant String := "implicit return with No_Return" & NUL;
- Rmsg_22 : constant String := "misaligned address value" & NUL;
- Rmsg_23 : constant String := "missing return" & NUL;
- Rmsg_24 : constant String := "overlaid controlled object" & NUL;
- Rmsg_25 : constant String := "potentially blocking operation" & NUL;
- Rmsg_26 : constant String := "stubbed subprogram called" & NUL;
- Rmsg_27 : constant String := "unchecked union restriction" & NUL;
- Rmsg_28 : constant String := "actual/returned class-wide value "
- & "not transportable" & NUL;
- Rmsg_29 : constant String := "empty storage pool" & NUL;
- Rmsg_30 : constant String := "explicit raise" & NUL;
- Rmsg_31 : constant String := "infinite recursion" & NUL;
- Rmsg_32 : constant String := "object too large" & NUL;
+ Rmsg_19 : constant String := "duplicated entry address" & NUL;
+ Rmsg_20 : constant String := "explicit raise" & NUL;
+ Rmsg_21 : constant String := "finalize/adjust raised exception" & NUL;
+ Rmsg_22 : constant String := "implicit return with No_Return" & NUL;
+ Rmsg_23 : constant String := "misaligned address value" & NUL;
+ Rmsg_24 : constant String := "missing return" & NUL;
+ Rmsg_25 : constant String := "overlaid controlled object" & NUL;
+ Rmsg_26 : constant String := "potentially blocking operation" & NUL;
+ Rmsg_27 : constant String := "stubbed subprogram called" & NUL;
+ Rmsg_28 : constant String := "unchecked union restriction" & NUL;
+ Rmsg_29 : constant String := "actual/returned class-wide" &
+ " value not transportable" & NUL;
+ Rmsg_30 : constant String := "empty storage pool" & NUL;
+ Rmsg_31 : constant String := "explicit raise" & NUL;
+ Rmsg_32 : constant String := "infinite recursion" & NUL;
+ Rmsg_33 : constant String := "object too large" & NUL;
-----------------------
-- Polling Interface --
@@ -1127,7 +1130,7 @@ package body Ada.Exceptions is
procedure Rcheck_29 (File : System.Address; Line : Integer) is
begin
- Raise_Storage_Error_Msg (File, Line, Rmsg_29'Address);
+ Raise_Program_Error_Msg (File, Line, Rmsg_29'Address);
end Rcheck_29;
procedure Rcheck_30 (File : System.Address; Line : Integer) is
@@ -1145,6 +1148,11 @@ package body Ada.Exceptions is
Raise_Storage_Error_Msg (File, Line, Rmsg_32'Address);
end Rcheck_32;
+ procedure Rcheck_33 (File : System.Address; Line : Integer) is
+ begin
+ Raise_Storage_Error_Msg (File, Line, Rmsg_33'Address);
+ end Rcheck_33;
+
-------------
-- Reraise --
-------------
diff --git a/gcc/ada/a-except.ads b/gcc/ada/a-except.ads
index 725bcb8bcb5..14aea1dd326 100644
--- a/gcc/ada/a-except.ads
+++ b/gcc/ada/a-except.ads
@@ -44,14 +44,12 @@
-- 2005 functionality is required. In particular, it is used for building
-- run times on all targets.
+pragma Compiler_Unit;
+
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
-- elaboration circularities with ourself.
-pragma Warnings (Off);
-pragma Compiler_Unit;
-pragma Warnings (On);
-
with System;
with System.Parameters;
with System.Standard_Library;
diff --git a/gcc/ada/a-exextr.adb b/gcc/ada/a-exextr.adb
index 967a54b1099..2ea9a3ad1e5 100644
--- a/gcc/ada/a-exextr.adb
+++ b/gcc/ada/a-exextr.adb
@@ -101,9 +101,13 @@ package body Exception_Traces is
if not Excep.Id.Not_Handled_By_Others
and then
- (Exception_Trace = Every_Raise
- or else (Exception_Trace = Unhandled_Raise and then Is_Unhandled))
+ (Exception_Trace = Every_Raise
+ or else (Exception_Trace = Unhandled_Raise and then Is_Unhandled))
then
+ -- Exception trace messages need to be protected when several tasks
+ -- can issue them at the same time.
+
+ Lock_Task.all;
To_Stderr (Nline);
if Is_Unhandled then
@@ -113,6 +117,7 @@ package body Exception_Traces is
To_Stderr ("Exception raised");
To_Stderr (Nline);
To_Stderr (Tailored_Exception_Information (Excep.all));
+ Unlock_Task.all;
end if;
-- Call the user-specific actions
diff --git a/gcc/ada/a-tasatt.adb b/gcc/ada/a-tasatt.adb
index b1a6b2da52d..69c4b9bdf71 100644
--- a/gcc/ada/a-tasatt.adb
+++ b/gcc/ada/a-tasatt.adb
@@ -276,8 +276,7 @@ package body Ada.Task_Attributes is
-- For reference to directly addressed task attributes
pragma Warnings (On);
- -- End of warnings off region for directly addressed
- -- attribute conversion functions.
+ -- End warnings off region for directly addressed attribute conversions
function To_Access_Address is new Ada.Unchecked_Conversion
(Access_Node, Access_Address);
@@ -307,8 +306,6 @@ package body Ada.Task_Attributes is
(Local_Deallocator, Deallocator);
-- To defeat accessibility check
- pragma Warnings (On);
-
------------------------
-- Storage Management --
------------------------
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 7d35f11b3e1..9ab2c201970 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -82,6 +82,9 @@
#include <Rtapi.h>
#else
#include "mingw32.h"
+
+/* Current code page to use, set in initialize.c. */
+UINT CurrentCodePage;
#endif
#include <sys/utime.h>
@@ -234,9 +237,11 @@ struct vstring
#endif
/* Check for cross-compilation */
-#ifdef CROSS_DIRECTORY_STRUCTURE
+#if defined (CROSS_COMPILE) || defined (CROSS_DIRECTORY_STRUCTURE)
+#define IS_CROSS 1
int __gnat_is_cross_compiler = 1;
#else
+#undef IS_CROSS
int __gnat_is_cross_compiler = 0;
#endif
@@ -326,6 +331,10 @@ const int __gnat_vmsp = 0;
int __gnat_max_path_len = GNAT_MAX_PATH_LEN;
int max_path_len = GNAT_MAX_PATH_LEN;
+/* Control whether we can use ACL on Windows. */
+
+int __gnat_use_acl = 1;
+
/* The following macro HAVE_READDIR_R should be defined if the
system provides the routine readdir_r. */
#undef HAVE_READDIR_R
@@ -469,7 +478,7 @@ __gnat_symlink (char *oldpath ATTRIBUTE_UNUSED,
/* Try to lock a file, return 1 if success. */
#if defined (__vxworks) || defined (__nucleus__) || defined (MSDOS) \
- || defined (_WIN32)
+ || defined (_WIN32) || defined (__EMX__) || defined (VMS)
/* Version that does not use link. */
@@ -482,8 +491,8 @@ __gnat_try_lock (char *dir, char *file)
TCHAR wfile[GNAT_MAX_PATH_LEN];
TCHAR wdir[GNAT_MAX_PATH_LEN];
- S2WSU (wdir, dir, GNAT_MAX_PATH_LEN);
- S2WSU (wfile, file, GNAT_MAX_PATH_LEN);
+ S2WSC (wdir, dir, GNAT_MAX_PATH_LEN);
+ S2WSC (wfile, file, GNAT_MAX_PATH_LEN);
_stprintf (wfull_path, _T("%s%c%s"), wdir, _T(DIR_SEPARATOR), wfile);
fd = _topen (wfull_path, O_CREAT | O_EXCL, 0600);
@@ -501,27 +510,6 @@ __gnat_try_lock (char *dir, char *file)
return 1;
}
-#elif defined (__EMX__) || defined (VMS)
-
-/* More cases that do not use link; identical code, to solve too long
- line problem ??? */
-
-int
-__gnat_try_lock (char *dir, char *file)
-{
- char full_path[256];
- int fd;
-
- sprintf (full_path, "%s%c%s", dir, DIR_SEPARATOR, file);
- fd = open (full_path, O_CREAT | O_EXCL, 0600);
-
- if (fd < 0)
- return 0;
-
- close (fd);
- return 1;
-}
-
#else
/* Version using link(), more secure over NFS. */
@@ -606,7 +594,7 @@ __gnat_get_current_dir (char *dir, int *length)
_tgetcwd (wdir, *length);
- WS2SU (dir, wdir, GNAT_MAX_PATH_LEN);
+ WS2SC (dir, wdir, GNAT_MAX_PATH_LEN);
#elif defined (VMS)
/* Force Unix style, which is what GNAT uses internally. */
@@ -682,8 +670,8 @@ __gnat_os_filename (char *filename, char *w_filename ATTRIBUTE_UNUSED,
char *os_name, int *o_length,
char *encoding ATTRIBUTE_UNUSED, int *e_length)
{
-#if defined (_WIN32) && ! defined (__vxworks) && ! defined (CROSS_DIRECTORY_STRUCTURE)
- WS2SU (os_name, (TCHAR *)w_filename, o_length);
+#if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS)
+ WS2SC (os_name, (TCHAR *)w_filename, (DWORD)o_length);
*o_length = strlen (os_name);
strcpy (encoding, "encoding=utf8");
*e_length = strlen (encoding);
@@ -694,16 +682,87 @@ __gnat_os_filename (char *filename, char *w_filename ATTRIBUTE_UNUSED,
#endif
}
+/* Delete a file. */
+
+int
+__gnat_unlink (char *path)
+{
+#if defined (__MINGW32__) && ! defined (__vxworks) && ! defined (IS_CROSS)
+ {
+ TCHAR wpath[GNAT_MAX_PATH_LEN];
+
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
+ return _tunlink (wpath);
+ }
+#else
+ return unlink (path);
+#endif
+}
+
+/* Rename a file. */
+
+int
+__gnat_rename (char *from, char *to)
+{
+#if defined (__MINGW32__) && ! defined (__vxworks) && ! defined (IS_CROSS)
+ {
+ TCHAR wfrom[GNAT_MAX_PATH_LEN], wto[GNAT_MAX_PATH_LEN];
+
+ S2WSC (wfrom, from, GNAT_MAX_PATH_LEN);
+ S2WSC (wto, to, GNAT_MAX_PATH_LEN);
+ return _trename (wfrom, wto);
+ }
+#else
+ return rename (from, to);
+#endif
+}
+
+/* Changing directory. */
+
+int
+__gnat_chdir (char *path)
+{
+#if defined (__MINGW32__) && ! defined (__vxworks) && ! defined (IS_CROSS)
+ {
+ TCHAR wpath[GNAT_MAX_PATH_LEN];
+
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
+ return _tchdir (wpath);
+ }
+#else
+ return chdir (path);
+#endif
+}
+
+/* Removing a directory. */
+
+int
+__gnat_rmdir (char *path)
+{
+#if defined (__MINGW32__) && ! defined (__vxworks) && ! defined (IS_CROSS)
+ {
+ TCHAR wpath[GNAT_MAX_PATH_LEN];
+
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
+ return _trmdir (wpath);
+ }
+#else
+ return rmdir (path);
+#endif
+}
+
FILE *
__gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED)
{
-#if defined (_WIN32) && ! defined (__vxworks) && ! defined (CROSS_DIRECTORY_STRUCTURE)
+#if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS)
TCHAR wpath[GNAT_MAX_PATH_LEN];
TCHAR wmode[10];
S2WS (wmode, mode, 10);
- if (encoding == Encoding_UTF8)
+ if (encoding == Encoding_Unspecified)
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
+ else if (encoding == Encoding_UTF8)
S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
else
S2WS (wpath, path, GNAT_MAX_PATH_LEN);
@@ -719,13 +778,15 @@ __gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED)
FILE *
__gnat_freopen (char *path, char *mode, FILE *stream, int encoding ATTRIBUTE_UNUSED)
{
-#if defined (_WIN32) && ! defined (__vxworks) && ! defined (CROSS_DIRECTORY_STRUCTURE)
+#if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS)
TCHAR wpath[GNAT_MAX_PATH_LEN];
TCHAR wmode[10];
S2WS (wmode, mode, 10);
- if (encoding == Encoding_UTF8)
+ if (encoding == Encoding_Unspecified)
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
+ else if (encoding == Encoding_UTF8)
S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
else
S2WS (wpath, path, GNAT_MAX_PATH_LEN);
@@ -757,7 +818,7 @@ __gnat_open_read (char *path, int fmode)
{
TCHAR wpath[GNAT_MAX_PATH_LEN];
- S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
fd = _topen (wpath, O_RDONLY | o_fmode, 0444);
}
#else
@@ -798,7 +859,7 @@ __gnat_open_rw (char *path, int fmode)
{
TCHAR wpath[GNAT_MAX_PATH_LEN];
- S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
fd = _topen (wpath, O_RDWR | o_fmode, PERM);
}
#else
@@ -824,7 +885,7 @@ __gnat_open_create (char *path, int fmode)
{
TCHAR wpath[GNAT_MAX_PATH_LEN];
- S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
fd = _topen (wpath, O_WRONLY | O_CREAT | O_TRUNC | o_fmode, PERM);
}
#else
@@ -846,7 +907,7 @@ __gnat_create_output_file (char *path)
{
TCHAR wpath[GNAT_MAX_PATH_LEN];
- S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
fd = _topen (wpath, O_WRONLY | O_CREAT | O_TRUNC | O_TEXT, PERM);
}
#else
@@ -872,7 +933,7 @@ __gnat_open_append (char *path, int fmode)
{
TCHAR wpath[GNAT_MAX_PATH_LEN];
- S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
fd = _topen (wpath, O_WRONLY | O_CREAT | O_APPEND | o_fmode, PERM);
}
#else
@@ -900,7 +961,7 @@ __gnat_open_new (char *path, int fmode)
{
TCHAR wpath[GNAT_MAX_PATH_LEN];
- S2WSU (wpath, path, GNAT_MAX_PATH_LEN);
+ S2WSC (wpath, path, GNAT_MAX_PATH_LEN);
fd = _topen (wpath, O_WRONLY | O_CREAT | O_EXCL | o_fmode, PERM);
}
#else
@@ -1053,7 +1114,7 @@ DIR* __gnat_opendir (char *name)
#elif defined (__MINGW32__)
TCHAR wname[GNAT_MAX_PATH_LEN];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN);
return (DIR*)_topendir (wname);
#else
@@ -1077,7 +1138,7 @@ __gnat_readdir (DIR *dirp, char *buffer, int *len)
if (dirent != NULL)
{
- WS2SU (buffer, dirent->d_name, GNAT_MAX_PATH_LEN);
+ WS2SC (buffer, dirent->d_name, GNAT_MAX_PATH_LEN);
*len = strlen (buffer);
return buffer;
@@ -1183,7 +1244,7 @@ __gnat_file_time_name (char *name)
time_t ret = -1;
TCHAR wname[GNAT_MAX_PATH_LEN];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN);
HANDLE h = CreateFile
(wname, GENERIC_READ, FILE_SHARE_READ, 0,
@@ -1320,7 +1381,7 @@ __gnat_set_file_time_name (char *name, time_t time_stamp)
} t_write;
TCHAR wname[GNAT_MAX_PATH_LEN];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN);
HANDLE h = CreateFile
(wname, GENERIC_WRITE, FILE_SHARE_WRITE, NULL,
@@ -1523,7 +1584,8 @@ __gnat_get_libraries_from_registry (void)
{
char *result = (char *) "";
-#if defined (_WIN32) && ! defined (__vxworks) && ! defined (CROSS_DIRECTORY_STRUCTURE) && ! defined (RTX)
+#if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS) \
+ && ! defined (RTX)
HKEY reg_key;
DWORD name_size, value_size;
@@ -1551,7 +1613,7 @@ __gnat_get_libraries_from_registry (void)
for (index = 0; res == ERROR_SUCCESS; index++)
{
value_size = name_size = 256;
- res = RegEnumValueA (reg_key, index, (TCHAR*)name, &name_size, 0,
+ res = RegEnumValueA (reg_key, index, name, &name_size, 0,
&type, (LPBYTE)value, &value_size);
if (res == ERROR_SUCCESS && type == REG_SZ)
@@ -1583,7 +1645,7 @@ __gnat_stat (char *name, struct stat *statbuf)
int name_len;
TCHAR last_char;
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
name_len = _tcslen (wname);
if (name_len > GNAT_MAX_PATH_LEN)
@@ -1603,7 +1665,7 @@ __gnat_stat (char *name, struct stat *statbuf)
if (name_len == 2 && wname[1] == _T(':'))
_tcscat (wname, _T("\\"));
- return _tstat (wname, statbuf);
+ return _tstat (wname, (struct _stat *)statbuf);
#else
return stat (name, statbuf);
@@ -1619,7 +1681,7 @@ __gnat_file_exists (char *name)
offset the _stat() routine fails on specific files like CON: */
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
return GetFileAttributes (wname) != INVALID_FILE_ATTRIBUTES;
#else
struct stat statbuf;
@@ -1803,12 +1865,18 @@ __gnat_is_readable_file (char *name)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
GENERIC_MAPPING GenericMapping;
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ if (__gnat_use_acl)
+ {
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
+
+ ZeroMemory (&GenericMapping, sizeof (GENERIC_MAPPING));
+ GenericMapping.GenericRead = GENERIC_READ;
- ZeroMemory (&GenericMapping, sizeof (GENERIC_MAPPING));
- GenericMapping.GenericRead = GENERIC_READ;
+ return __gnat_check_OWNER_ACL (wname, FILE_READ_DATA, GenericMapping);
+ }
+ else
+ return 1;
- return __gnat_check_OWNER_ACL (wname, FILE_READ_DATA, GenericMapping);
#else
int ret;
int mode;
@@ -1827,14 +1895,20 @@ __gnat_is_writable_file (char *name)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
GENERIC_MAPPING GenericMapping;
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
+
+ if (__gnat_use_acl)
+ {
+ ZeroMemory (&GenericMapping, sizeof (GENERIC_MAPPING));
+ GenericMapping.GenericWrite = GENERIC_WRITE;
- ZeroMemory (&GenericMapping, sizeof (GENERIC_MAPPING));
- GenericMapping.GenericWrite = GENERIC_WRITE;
+ return __gnat_check_OWNER_ACL
+ (wname, FILE_WRITE_DATA | FILE_APPEND_DATA, GenericMapping)
+ && !(GetFileAttributes (wname) & FILE_ATTRIBUTE_READONLY);
+ }
+ else
+ return !(GetFileAttributes (wname) & FILE_ATTRIBUTE_READONLY);
- return __gnat_check_OWNER_ACL
- (wname, FILE_WRITE_DATA | FILE_APPEND_DATA, GenericMapping)
- && !(GetFileAttributes (wname) & FILE_ATTRIBUTE_READONLY);
#else
int ret;
int mode;
@@ -1853,12 +1927,19 @@ __gnat_is_executable_file (char *name)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
GENERIC_MAPPING GenericMapping;
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
+
+ if (__gnat_use_acl)
+ {
+ ZeroMemory (&GenericMapping, sizeof (GENERIC_MAPPING));
+ GenericMapping.GenericExecute = GENERIC_EXECUTE;
- ZeroMemory (&GenericMapping, sizeof (GENERIC_MAPPING));
- GenericMapping.GenericExecute = GENERIC_EXECUTE;
+ return __gnat_check_OWNER_ACL (wname, FILE_EXECUTE, GenericMapping);
+ }
+ else
+ return GetFileAttributes (wname) != INVALID_FILE_ATTRIBUTES
+ && _tcsstr (wname, _T(".exe")) - wname == (_tcslen (wname) - 4);
- return __gnat_check_OWNER_ACL (wname, FILE_EXECUTE, GenericMapping);
#else
int ret;
int mode;
@@ -1876,9 +1957,11 @@ __gnat_set_writable (char *name)
#if defined (_WIN32) && !defined (RTX)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
+
+ if (__gnat_use_acl)
+ __gnat_set_OWNER_ACL (wname, GRANT_ACCESS, FILE_GENERIC_WRITE);
- __gnat_set_OWNER_ACL (wname, GRANT_ACCESS, FILE_GENERIC_WRITE);
SetFileAttributes
(wname, GetFileAttributes (wname) & ~FILE_ATTRIBUTE_READONLY);
#elif ! defined (__vxworks) && ! defined(__nucleus__)
@@ -1898,9 +1981,12 @@ __gnat_set_executable (char *name)
#if defined (_WIN32) && !defined (RTX)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ if (__gnat_use_acl)
+ {
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
- __gnat_set_OWNER_ACL (wname, GRANT_ACCESS, FILE_GENERIC_EXECUTE);
+ __gnat_set_OWNER_ACL (wname, GRANT_ACCESS, FILE_GENERIC_EXECUTE);
+ }
#elif ! defined (__vxworks) && ! defined(__nucleus__)
struct stat statbuf;
@@ -1918,12 +2004,14 @@ __gnat_set_non_writable (char *name)
#if defined (_WIN32) && !defined (RTX)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
+
+ if (__gnat_use_acl)
+ __gnat_set_OWNER_ACL
+ (wname, DENY_ACCESS,
+ FILE_WRITE_DATA | FILE_APPEND_DATA |
+ FILE_WRITE_EA | FILE_WRITE_ATTRIBUTES);
- __gnat_set_OWNER_ACL
- (wname, DENY_ACCESS,
- FILE_WRITE_DATA | FILE_APPEND_DATA |
- FILE_WRITE_EA | FILE_WRITE_ATTRIBUTES);
SetFileAttributes
(wname, GetFileAttributes (wname) | FILE_ATTRIBUTE_READONLY);
#elif ! defined (__vxworks) && ! defined(__nucleus__)
@@ -1943,9 +2031,12 @@ __gnat_set_readable (char *name)
#if defined (_WIN32) && !defined (RTX)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ if (__gnat_use_acl)
+ {
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
- __gnat_set_OWNER_ACL (wname, GRANT_ACCESS, FILE_GENERIC_READ);
+ __gnat_set_OWNER_ACL (wname, GRANT_ACCESS, FILE_GENERIC_READ);
+ }
#elif ! defined (__vxworks) && ! defined(__nucleus__)
struct stat statbuf;
@@ -1962,9 +2053,12 @@ __gnat_set_non_readable (char *name)
#if defined (_WIN32) && !defined (RTX)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
- S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
+ if (__gnat_use_acl)
+ {
+ S2WSC (wname, name, GNAT_MAX_PATH_LEN + 2);
- __gnat_set_OWNER_ACL (wname, DENY_ACCESS, FILE_GENERIC_READ);
+ __gnat_set_OWNER_ACL (wname, DENY_ACCESS, FILE_GENERIC_READ);
+ }
#elif ! defined (__vxworks) && ! defined(__nucleus__)
struct stat statbuf;
@@ -2237,7 +2331,7 @@ win32_no_block_spawn (char *command, char *args[])
int wsize = csize * 2;
TCHAR *wcommand = (TCHAR *) xmalloc (wsize);
- S2WSU (wcommand, full_command, wsize);
+ S2WSC (wcommand, full_command, wsize);
free (full_command);
@@ -2533,7 +2627,7 @@ __gnat_locate_exec_on_path (char *exec_name)
apath_val = alloca (EXPAND_BUFFER_SIZE);
- WS2SU (apath_val, wapath_val, EXPAND_BUFFER_SIZE);
+ WS2SC (apath_val, wapath_val, EXPAND_BUFFER_SIZE);
return __gnat_locate_exec (exec_name, apath_val);
#else
@@ -3123,7 +3217,7 @@ _flush_cache()
}
#endif
-#if defined (CROSS_DIRECTORY_STRUCTURE) \
+#if defined (IS_CROSS) \
|| (! ((defined (sparc) || defined (i386)) && defined (sun) \
&& defined (__SVR4)) \
&& ! (defined (linux) && (defined (i386) || defined (__x86_64__))) \
@@ -3346,3 +3440,13 @@ __gnat_pthread_setaffinity_np (pthread_t th ATTRIBUTE_UNUSED,
}
#endif
#endif
+
+#if defined (linux)
+/* There is no function in the glibc to retrieve the LWP of the current
+ thread. We need to do a system call in order to retrieve this
+ information. */
+#include <sys/syscall.h>
+void *__gnat_lwp_self (void) {
+ return (void *) syscall (__NR_gettid);
+}
+#endif
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index 3c9e4c44730..2ecaf730528 100644
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/adaint.h
@@ -39,8 +39,9 @@
#include <dirent.h>
/* Constants used for the form parameter encoding values */
-#define Encoding_UTF8 0
-#define Encoding_8bits 1
+#define Encoding_UTF8 0 /* UTF-8 */
+#define Encoding_8bits 1 /* Standard 8bits, CP_ACP on Windows. */
+#define Encoding_Unspecified 2 /* Based on GNAT_CODE_PAGE env variable. */
typedef long OS_Time; /* Type corresponding to GNAT.OS_Lib.OS_Time */
@@ -70,6 +71,11 @@ extern int __gnat_open_new_temp (char *, int);
extern int __gnat_mkdir (char *);
extern int __gnat_stat (char *,
struct stat *);
+extern int __gnat_unlink (char *);
+extern int __gnat_rename (char *, char *);
+extern int __gnat_chdir (char *);
+extern int __gnat_rmdir (char *);
+
extern FILE *__gnat_fopen (char *, char *, int);
extern FILE *__gnat_freopen (char *, char *, FILE *,
int);
diff --git a/gcc/ada/ali-util.adb b/gcc/ada/ali-util.adb
index 25a0d7a7d51..14ccd6707a0 100644
--- a/gcc/ada/ali-util.adb
+++ b/gcc/ada/ali-util.adb
@@ -139,7 +139,7 @@ package body ALI.Util is
Full_Name := Find_File (Fname, Osint.Source);
-- If we cannot find the file, then return an impossible checksum,
- -- impossible becaues checksums have the high order bit zero, so
+ -- impossible because checksums have the high order bit zero, so
-- that checksums do not match.
if Full_Name = No_File then
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index 027df3cdb18..79f2ffda5b5 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -38,13 +38,10 @@ pragma Style_Checks (All_Checks);
with Debug; use Debug;
with Nlists; use Nlists;
-with Elists; use Elists;
with Output; use Output;
with Sinput; use Sinput;
with Tree_IO; use Tree_IO;
-with GNAT.HTable; use GNAT.HTable;
-
package body Atree is
---------------
@@ -105,8 +102,6 @@ package body Atree is
use Atree_Private_Part;
-- We are also allowed to see our private data structures!
- function E_To_N is new Unchecked_Conversion (Entity_Kind, Node_Kind);
- function N_To_E is new Unchecked_Conversion (Node_Kind, Entity_Kind);
-- Functions used to store Entity_Kind value in Nkind field
-- The following declarations are used to store flags 65-72 in the
@@ -395,91 +390,6 @@ package body Atree is
function To_Flag_Word5_Ptr is new
Unchecked_Conversion (Union_Id_Ptr, Flag_Word5_Ptr);
- -- Default value used to initialize default nodes. Note that some of the
- -- fields get overwritten, and in particular, Nkind always gets reset.
-
- Default_Node : Node_Record := (
- Is_Extension => False,
- Pflag1 => False,
- Pflag2 => False,
- In_List => False,
- Unused_1 => False,
- Rewrite_Ins => False,
- Analyzed => False,
- Comes_From_Source => False, -- modified by Set_Comes_From_Source_Default
- Error_Posted => False,
- Flag4 => False,
-
- Flag5 => False,
- Flag6 => False,
- Flag7 => False,
- Flag8 => False,
- Flag9 => False,
- Flag10 => False,
- Flag11 => False,
- Flag12 => False,
-
- Flag13 => False,
- Flag14 => False,
- Flag15 => False,
- Flag16 => False,
- Flag17 => False,
- Flag18 => False,
-
- Nkind => N_Unused_At_Start,
-
- Sloc => No_Location,
- Link => Empty_List_Or_Node,
- Field1 => Empty_List_Or_Node,
- Field2 => Empty_List_Or_Node,
- Field3 => Empty_List_Or_Node,
- Field4 => Empty_List_Or_Node,
- Field5 => Empty_List_Or_Node);
-
- -- Default value used to initialize node extensions (i.e. the second
- -- and third and fourth components of an extended node). Note we are
- -- cheating a bit here when it comes to Node12, which really holds
- -- flags an (for the third component), the convention. But it works
- -- because Empty, False, Convention_Ada, all happen to be all zero bits.
-
- Default_Node_Extension : constant Node_Record := (
- Is_Extension => True,
- Pflag1 => False,
- Pflag2 => False,
- In_List => False,
- Unused_1 => False,
- Rewrite_Ins => False,
- Analyzed => False,
- Comes_From_Source => False,
- Error_Posted => False,
- Flag4 => False,
-
- Flag5 => False,
- Flag6 => False,
- Flag7 => False,
- Flag8 => False,
- Flag9 => False,
- Flag10 => False,
- Flag11 => False,
- Flag12 => False,
-
- Flag13 => False,
- Flag14 => False,
- Flag15 => False,
- Flag16 => False,
- Flag17 => False,
- Flag18 => False,
-
- Nkind => E_To_N (E_Void),
-
- Field6 => Empty_List_Or_Node,
- Field7 => Empty_List_Or_Node,
- Field8 => Empty_List_Or_Node,
- Field9 => Empty_List_Or_Node,
- Field10 => Empty_List_Or_Node,
- Field11 => Empty_List_Or_Node,
- Field12 => Empty_List_Or_Node);
-
--------------------------------------------------
-- Implementation of Tree Substitution Routines --
--------------------------------------------------
@@ -501,35 +411,6 @@ package body Atree is
Table_Increment => Alloc.Orig_Nodes_Increment,
Table_Name => "Orig_Nodes");
- ----------------------------------------
- -- Global_Variables for New_Copy_Tree --
- ----------------------------------------
-
- -- These global variables are used by New_Copy_Tree. See description
- -- of the body of this subprogram for details. Global variables can be
- -- safely used by New_Copy_Tree, since there is no case of a recursive
- -- call from the processing inside New_Copy_Tree.
-
- NCT_Hash_Threshhold : constant := 20;
- -- If there are more than this number of pairs of entries in the
- -- map, then Hash_Tables_Used will be set, and the hash tables will
- -- be initialized and used for the searches.
-
- NCT_Hash_Tables_Used : Boolean := False;
- -- Set to True if hash tables are in use
-
- NCT_Table_Entries : Nat;
- -- Count entries in table to see if threshhold is reached
-
- NCT_Hash_Table_Setup : Boolean := False;
- -- Set to True if hash table contains data. We set this True if we
- -- setup the hash table with data, and leave it set permanently
- -- from then on, this is a signal that second and subsequent users
- -- of the hash table must clear the old entries before reuse.
-
- subtype NCT_Header_Num is Int range 0 .. 511;
- -- Defines range of headers in hash tables (512 headers)
-
--------------------------
-- Paren_Count Handling --
--------------------------
@@ -1073,12 +954,6 @@ package body Atree is
Dummy := New_Node (N_Error, No_Location);
Set_Name1 (Error, Error_Name);
Set_Error_Posted (Error, True);
-
- -- Set global variables for New_Copy_Tree
-
- NCT_Hash_Tables_Used := False;
- NCT_Table_Entries := 0;
- NCT_Hash_Table_Setup := False;
end Initialize;
--------------------------
@@ -1154,939 +1029,6 @@ package body Atree is
return New_Id;
end New_Copy;
- -------------------
- -- New_Copy_Tree --
- -------------------
-
- -- Our approach here requires a two pass traversal of the tree. The
- -- first pass visits all nodes that eventually will be copied looking
- -- for defining Itypes. If any defining Itypes are found, then they are
- -- copied, and an entry is added to the replacement map. In the second
- -- phase, the tree is copied, using the replacement map to replace any
- -- Itype references within the copied tree.
-
- -- The following hash tables are used if the Map supplied has more
- -- than hash threshhold entries to speed up access to the map. If
- -- there are fewer entries, then the map is searched sequentially
- -- (because setting up a hash table for only a few entries takes
- -- more time than it saves.
-
- function New_Copy_Hash (E : Entity_Id) return NCT_Header_Num;
- -- Hash function used for hash operations
-
- -------------------
- -- New_Copy_Hash --
- -------------------
-
- function New_Copy_Hash (E : Entity_Id) return NCT_Header_Num is
- begin
- return Nat (E) mod (NCT_Header_Num'Last + 1);
- end New_Copy_Hash;
-
- ---------------
- -- NCT_Assoc --
- ---------------
-
- -- The hash table NCT_Assoc associates old entities in the table
- -- with their corresponding new entities (i.e. the pairs of entries
- -- presented in the original Map argument are Key-Element pairs).
-
- package NCT_Assoc is new Simple_HTable (
- Header_Num => NCT_Header_Num,
- Element => Entity_Id,
- No_Element => Empty,
- Key => Entity_Id,
- Hash => New_Copy_Hash,
- Equal => Types."=");
-
- ---------------------
- -- NCT_Itype_Assoc --
- ---------------------
-
- -- The hash table NCT_Itype_Assoc contains entries only for those
- -- old nodes which have a non-empty Associated_Node_For_Itype set.
- -- The key is the associated node, and the element is the new node
- -- itself (NOT the associated node for the new node).
-
- package NCT_Itype_Assoc is new Simple_HTable (
- Header_Num => NCT_Header_Num,
- Element => Entity_Id,
- No_Element => Empty,
- Key => Entity_Id,
- Hash => New_Copy_Hash,
- Equal => Types."=");
-
- -- Start of processing for New_Copy_Tree function
-
- function New_Copy_Tree
- (Source : Node_Id;
- Map : Elist_Id := No_Elist;
- New_Sloc : Source_Ptr := No_Location;
- New_Scope : Entity_Id := Empty) return Node_Id
- is
- Actual_Map : Elist_Id := Map;
- -- This is the actual map for the copy. It is initialized with the
- -- given elements, and then enlarged as required for Itypes that are
- -- copied during the first phase of the copy operation. The visit
- -- procedures add elements to this map as Itypes are encountered.
- -- The reason we cannot use Map directly, is that it may well be
- -- (and normally is) initialized to No_Elist, and if we have mapped
- -- entities, we have to reset it to point to a real Elist.
-
- function Assoc (N : Node_Or_Entity_Id) return Node_Id;
- -- Called during second phase to map entities into their corresponding
- -- copies using Actual_Map. If the argument is not an entity, or is not
- -- in Actual_Map, then it is returned unchanged.
-
- procedure Build_NCT_Hash_Tables;
- -- Builds hash tables (number of elements >= threshold value)
-
- function Copy_Elist_With_Replacement
- (Old_Elist : Elist_Id) return Elist_Id;
- -- Called during second phase to copy element list doing replacements
-
- procedure Copy_Itype_With_Replacement (New_Itype : Entity_Id);
- -- Called during the second phase to process a copied Itype. The actual
- -- copy happened during the first phase (so that we could make the entry
- -- in the mapping), but we still have to deal with the descendents of
- -- the copied Itype and copy them where necessary.
-
- function Copy_List_With_Replacement (Old_List : List_Id) return List_Id;
- -- Called during second phase to copy list doing replacements
-
- function Copy_Node_With_Replacement (Old_Node : Node_Id) return Node_Id;
- -- Called during second phase to copy node doing replacements
-
- procedure Visit_Elist (E : Elist_Id);
- -- Called during first phase to visit all elements of an Elist
-
- procedure Visit_Field (F : Union_Id; N : Node_Id);
- -- Visit a single field, recursing to call Visit_Node or Visit_List
- -- if the field is a syntactic descendent of the current node (i.e.
- -- its parent is Node N).
-
- procedure Visit_Itype (Old_Itype : Entity_Id);
- -- Called during first phase to visit subsidiary fields of a defining
- -- Itype, and also create a copy and make an entry in the replacement
- -- map for the new copy.
-
- procedure Visit_List (L : List_Id);
- -- Called during first phase to visit all elements of a List
-
- procedure Visit_Node (N : Node_Or_Entity_Id);
- -- Called during first phase to visit a node and all its subtrees
-
- -----------
- -- Assoc --
- -----------
-
- function Assoc (N : Node_Or_Entity_Id) return Node_Id is
- E : Elmt_Id;
- Ent : Entity_Id;
-
- begin
- if not Has_Extension (N) or else No (Actual_Map) then
- return N;
-
- elsif NCT_Hash_Tables_Used then
- Ent := NCT_Assoc.Get (Entity_Id (N));
-
- if Present (Ent) then
- return Ent;
- else
- return N;
- end if;
-
- -- No hash table used, do serial search
-
- else
- E := First_Elmt (Actual_Map);
- while Present (E) loop
- if Node (E) = N then
- return Node (Next_Elmt (E));
- else
- E := Next_Elmt (Next_Elmt (E));
- end if;
- end loop;
- end if;
-
- return N;
- end Assoc;
-
- ---------------------------
- -- Build_NCT_Hash_Tables --
- ---------------------------
-
- procedure Build_NCT_Hash_Tables is
- Elmt : Elmt_Id;
- Ent : Entity_Id;
- begin
- if NCT_Hash_Table_Setup then
- NCT_Assoc.Reset;
- NCT_Itype_Assoc.Reset;
- end if;
-
- Elmt := First_Elmt (Actual_Map);
- while Present (Elmt) loop
- Ent := Node (Elmt);
-
- -- Get new entity, and associate old and new
-
- Next_Elmt (Elmt);
- NCT_Assoc.Set (Ent, Node (Elmt));
-
- if Is_Type (Ent) then
- declare
- Anode : constant Entity_Id :=
- Associated_Node_For_Itype (Ent);
-
- begin
- if Present (Anode) then
-
- -- Enter a link between the associated node of the
- -- old Itype and the new Itype, for updating later
- -- when node is copied.
-
- NCT_Itype_Assoc.Set (Anode, Node (Elmt));
- end if;
- end;
- end if;
-
- Next_Elmt (Elmt);
- end loop;
-
- NCT_Hash_Tables_Used := True;
- NCT_Hash_Table_Setup := True;
- end Build_NCT_Hash_Tables;
-
- ---------------------------------
- -- Copy_Elist_With_Replacement --
- ---------------------------------
-
- function Copy_Elist_With_Replacement
- (Old_Elist : Elist_Id) return Elist_Id
- is
- M : Elmt_Id;
- New_Elist : Elist_Id;
-
- begin
- if No (Old_Elist) then
- return No_Elist;
-
- else
- New_Elist := New_Elmt_List;
-
- M := First_Elmt (Old_Elist);
- while Present (M) loop
- Append_Elmt (Copy_Node_With_Replacement (Node (M)), New_Elist);
- Next_Elmt (M);
- end loop;
- end if;
-
- return New_Elist;
- end Copy_Elist_With_Replacement;
-
- ---------------------------------
- -- Copy_Itype_With_Replacement --
- ---------------------------------
-
- -- This routine exactly parallels its phase one analog Visit_Itype,
- -- and like that routine, knows far too many semantic details about
- -- the descendents of Itypes and whether they need copying or not.
-
- procedure Copy_Itype_With_Replacement (New_Itype : Entity_Id) is
- begin
- -- Translate Next_Entity, Scope and Etype fields, in case they
- -- reference entities that have been mapped into copies.
-
- Set_Next_Entity (New_Itype, Assoc (Next_Entity (New_Itype)));
- Set_Etype (New_Itype, Assoc (Etype (New_Itype)));
-
- if Present (New_Scope) then
- Set_Scope (New_Itype, New_Scope);
- else
- Set_Scope (New_Itype, Assoc (Scope (New_Itype)));
- end if;
-
- -- Copy referenced fields
-
- if Is_Discrete_Type (New_Itype) then
- Set_Scalar_Range (New_Itype,
- Copy_Node_With_Replacement (Scalar_Range (New_Itype)));
-
- elsif Has_Discriminants (Base_Type (New_Itype)) then
- Set_Discriminant_Constraint (New_Itype,
- Copy_Elist_With_Replacement
- (Discriminant_Constraint (New_Itype)));
-
- elsif Is_Array_Type (New_Itype) then
- if Present (First_Index (New_Itype)) then
- Set_First_Index (New_Itype,
- First (Copy_List_With_Replacement
- (List_Containing (First_Index (New_Itype)))));
- end if;
-
- if Is_Packed (New_Itype) then
- Set_Packed_Array_Type (New_Itype,
- Copy_Node_With_Replacement
- (Packed_Array_Type (New_Itype)));
- end if;
- end if;
- end Copy_Itype_With_Replacement;
-
- --------------------------------
- -- Copy_List_With_Replacement --
- --------------------------------
-
- function Copy_List_With_Replacement
- (Old_List : List_Id) return List_Id
- is
- New_List : List_Id;
- E : Node_Id;
-
- begin
- if Old_List = No_List then
- return No_List;
-
- else
- New_List := Empty_List;
-
- E := First (Old_List);
- while Present (E) loop
- Append (Copy_Node_With_Replacement (E), New_List);
- Next (E);
- end loop;
-
- return New_List;
- end if;
- end Copy_List_With_Replacement;
-
- --------------------------------
- -- Copy_Node_With_Replacement --
- --------------------------------
-
- function Copy_Node_With_Replacement
- (Old_Node : Node_Id) return Node_Id
- is
- New_Node : Node_Id;
-
- procedure Adjust_Named_Associations
- (Old_Node : Node_Id;
- New_Node : Node_Id);
- -- If a call node has named associations, these are chained through
- -- the First_Named_Actual, Next_Named_Actual links. These must be
- -- propagated separately to the new parameter list, because these
- -- are not syntactic fields.
-
- function Copy_Field_With_Replacement
- (Field : Union_Id) return Union_Id;
- -- Given Field, which is a field of Old_Node, return a copy of it
- -- if it is a syntactic field (i.e. its parent is Node), setting
- -- the parent of the copy to poit to New_Node. Otherwise returns
- -- the field (possibly mapped if it is an entity).
-
- -------------------------------
- -- Adjust_Named_Associations --
- -------------------------------
-
- procedure Adjust_Named_Associations
- (Old_Node : Node_Id;
- New_Node : Node_Id)
- is
- Old_E : Node_Id;
- New_E : Node_Id;
-
- Old_Next : Node_Id;
- New_Next : Node_Id;
-
- begin
- Old_E := First (Parameter_Associations (Old_Node));
- New_E := First (Parameter_Associations (New_Node));
- while Present (Old_E) loop
- if Nkind (Old_E) = N_Parameter_Association
- and then Present (Next_Named_Actual (Old_E))
- then
- if First_Named_Actual (Old_Node)
- = Explicit_Actual_Parameter (Old_E)
- then
- Set_First_Named_Actual
- (New_Node, Explicit_Actual_Parameter (New_E));
- end if;
-
- -- Now scan parameter list from the beginning,to locate
- -- next named actual, which can be out of order.
-
- Old_Next := First (Parameter_Associations (Old_Node));
- New_Next := First (Parameter_Associations (New_Node));
-
- while Nkind (Old_Next) /= N_Parameter_Association
- or else Explicit_Actual_Parameter (Old_Next)
- /= Next_Named_Actual (Old_E)
- loop
- Next (Old_Next);
- Next (New_Next);
- end loop;
-
- Set_Next_Named_Actual
- (New_E, Explicit_Actual_Parameter (New_Next));
- end if;
-
- Next (Old_E);
- Next (New_E);
- end loop;
- end Adjust_Named_Associations;
-
- ---------------------------------
- -- Copy_Field_With_Replacement --
- ---------------------------------
-
- function Copy_Field_With_Replacement
- (Field : Union_Id) return Union_Id
- is
- begin
- if Field = Union_Id (Empty) then
- return Field;
-
- elsif Field in Node_Range then
- declare
- Old_N : constant Node_Id := Node_Id (Field);
- New_N : Node_Id;
-
- begin
- -- If syntactic field, as indicated by the parent pointer
- -- being set, then copy the referenced node recursively.
-
- if Parent (Old_N) = Old_Node then
- New_N := Copy_Node_With_Replacement (Old_N);
-
- if New_N /= Old_N then
- Set_Parent (New_N, New_Node);
- end if;
-
- -- For semantic fields, update possible entity reference
- -- from the replacement map.
-
- else
- New_N := Assoc (Old_N);
- end if;
-
- return Union_Id (New_N);
- end;
-
- elsif Field in List_Range then
- declare
- Old_L : constant List_Id := List_Id (Field);
- New_L : List_Id;
-
- begin
- -- If syntactic field, as indicated by the parent pointer,
- -- then recursively copy the entire referenced list.
-
- if Parent (Old_L) = Old_Node then
- New_L := Copy_List_With_Replacement (Old_L);
- Set_Parent (New_L, New_Node);
-
- -- For semantic list, just returned unchanged
-
- else
- New_L := Old_L;
- end if;
-
- return Union_Id (New_L);
- end;
-
- -- Anything other than a list or a node is returned unchanged
-
- else
- return Field;
- end if;
- end Copy_Field_With_Replacement;
-
- -- Start of processing for Copy_Node_With_Replacement
-
- begin
- if Old_Node <= Empty_Or_Error then
- return Old_Node;
-
- elsif Has_Extension (Old_Node) then
- return Assoc (Old_Node);
-
- else
- New_Node := New_Copy (Old_Node);
-
- -- If the node we are copying is the associated node of a
- -- previously copied Itype, then adjust the associated node
- -- of the copy of that Itype accordingly.
-
- if Present (Actual_Map) then
- declare
- E : Elmt_Id;
- Ent : Entity_Id;
-
- begin
- -- Case of hash table used
-
- if NCT_Hash_Tables_Used then
- Ent := NCT_Itype_Assoc.Get (Old_Node);
-
- if Present (Ent) then
- Set_Associated_Node_For_Itype (Ent, New_Node);
- end if;
-
- -- Case of no hash table used
-
- else
- E := First_Elmt (Actual_Map);
- while Present (E) loop
- if Is_Itype (Node (E))
- and then
- Old_Node = Associated_Node_For_Itype (Node (E))
- then
- Set_Associated_Node_For_Itype
- (Node (Next_Elmt (E)), New_Node);
- end if;
-
- E := Next_Elmt (Next_Elmt (E));
- end loop;
- end if;
- end;
- end if;
-
- -- Recursively copy descendents
-
- Set_Field1
- (New_Node, Copy_Field_With_Replacement (Field1 (New_Node)));
- Set_Field2
- (New_Node, Copy_Field_With_Replacement (Field2 (New_Node)));
- Set_Field3
- (New_Node, Copy_Field_With_Replacement (Field3 (New_Node)));
- Set_Field4
- (New_Node, Copy_Field_With_Replacement (Field4 (New_Node)));
- Set_Field5
- (New_Node, Copy_Field_With_Replacement (Field5 (New_Node)));
-
- -- Adjust Sloc of new node if necessary
-
- if New_Sloc /= No_Location then
- Set_Sloc (New_Node, New_Sloc);
-
- -- If we adjust the Sloc, then we are essentially making
- -- a completely new node, so the Comes_From_Source flag
- -- should be reset to the proper default value.
-
- Nodes.Table (New_Node).Comes_From_Source :=
- Default_Node.Comes_From_Source;
- end if;
-
- -- If the node is call and has named associations,
- -- set the corresponding links in the copy.
-
- if (Nkind (Old_Node) = N_Function_Call
- or else Nkind (Old_Node) = N_Entry_Call_Statement
- or else
- Nkind (Old_Node) = N_Procedure_Call_Statement)
- and then Present (First_Named_Actual (Old_Node))
- then
- Adjust_Named_Associations (Old_Node, New_Node);
- end if;
-
- -- Reset First_Real_Statement for Handled_Sequence_Of_Statements.
- -- The replacement mechanism applies to entities, and is not used
- -- here. Eventually we may need a more general graph-copying
- -- routine. For now, do a sequential search to find desired node.
-
- if Nkind (Old_Node) = N_Handled_Sequence_Of_Statements
- and then Present (First_Real_Statement (Old_Node))
- then
- declare
- Old_F : constant Node_Id := First_Real_Statement (Old_Node);
- N1, N2 : Node_Id;
-
- begin
- N1 := First (Statements (Old_Node));
- N2 := First (Statements (New_Node));
-
- while N1 /= Old_F loop
- Next (N1);
- Next (N2);
- end loop;
-
- Set_First_Real_Statement (New_Node, N2);
- end;
- end if;
- end if;
-
- -- All done, return copied node
-
- return New_Node;
- end Copy_Node_With_Replacement;
-
- -----------------
- -- Visit_Elist --
- -----------------
-
- procedure Visit_Elist (E : Elist_Id) is
- Elmt : Elmt_Id;
- begin
- if Present (E) then
- Elmt := First_Elmt (E);
-
- while Elmt /= No_Elmt loop
- Visit_Node (Node (Elmt));
- Next_Elmt (Elmt);
- end loop;
- end if;
- end Visit_Elist;
-
- -----------------
- -- Visit_Field --
- -----------------
-
- procedure Visit_Field (F : Union_Id; N : Node_Id) is
- begin
- if F = Union_Id (Empty) then
- return;
-
- elsif F in Node_Range then
-
- -- Copy node if it is syntactic, i.e. its parent pointer is
- -- set to point to the field that referenced it (certain
- -- Itypes will also meet this criterion, which is fine, since
- -- these are clearly Itypes that do need to be copied, since
- -- we are copying their parent.)
-
- if Parent (Node_Id (F)) = N then
- Visit_Node (Node_Id (F));
- return;
-
- -- Another case, if we are pointing to an Itype, then we want
- -- to copy it if its associated node is somewhere in the tree
- -- being copied.
-
- -- Note: the exclusion of self-referential copies is just an
- -- optimization, since the search of the already copied list
- -- would catch it, but it is a common case (Etype pointing
- -- to itself for an Itype that is a base type).
-
- elsif Has_Extension (Node_Id (F))
- and then Is_Itype (Entity_Id (F))
- and then Node_Id (F) /= N
- then
- declare
- P : Node_Id;
-
- begin
- P := Associated_Node_For_Itype (Node_Id (F));
- while Present (P) loop
- if P = Source then
- Visit_Node (Node_Id (F));
- return;
- else
- P := Parent (P);
- end if;
- end loop;
-
- -- An Itype whose parent is not being copied definitely
- -- should NOT be copied, since it does not belong in any
- -- sense to the copied subtree.
-
- return;
- end;
- end if;
-
- elsif F in List_Range
- and then Parent (List_Id (F)) = N
- then
- Visit_List (List_Id (F));
- return;
- end if;
- end Visit_Field;
-
- -----------------
- -- Visit_Itype --
- -----------------
-
- -- Note: we are relying on far too much semantic knowledge in this
- -- routine, it really should just do a blind replacement of all
- -- fields, or at least a more blind replacement. For example, we
- -- do not deal with corresponding record types, and that works
- -- because we have no Itypes of task types, but nowhere is there
- -- a guarantee that this will always be the case. ???
-
- procedure Visit_Itype (Old_Itype : Entity_Id) is
- New_Itype : Entity_Id;
- E : Elmt_Id;
- Ent : Entity_Id;
-
- begin
- -- Itypes that describe the designated type of access to subprograms
- -- have the structure of subprogram declarations, with signatures,
- -- etc. Either we duplicate the signatures completely, or choose to
- -- share such itypes, which is fine because their elaboration will
- -- have no side effects. In any case, this is additional semantic
- -- information that seems awkward to have in atree.
-
- if Ekind (Old_Itype) = E_Subprogram_Type then
- return;
- end if;
-
- New_Itype := New_Copy (Old_Itype);
-
- -- The new Itype has all the attributes of the old one, and
- -- we just copy the contents of the entity. However, the back-end
- -- needs different names for debugging purposes, so we create a
- -- new internal name by appending the letter 'c' (copy) to the
- -- name of the original.
-
- Get_Name_String (Chars (Old_Itype));
- Add_Char_To_Name_Buffer ('c');
- Set_Chars (New_Itype, Name_Enter);
-
- -- If our associated node is an entity that has already been copied,
- -- then set the associated node of the copy to point to the right
- -- copy. If we have copied an Itype that is itself the associated
- -- node of some previously copied Itype, then we set the right
- -- pointer in the other direction.
-
- if Present (Actual_Map) then
-
- -- Case of hash tables used
-
- if NCT_Hash_Tables_Used then
-
- Ent := NCT_Assoc.Get (Associated_Node_For_Itype (Old_Itype));
-
- if Present (Ent) then
- Set_Associated_Node_For_Itype (New_Itype, Ent);
- end if;
-
- Ent := NCT_Itype_Assoc.Get (Old_Itype);
- if Present (Ent) then
- Set_Associated_Node_For_Itype (Ent, New_Itype);
-
- -- If the hash table has no association for this Itype and
- -- its associated node, enter one now.
-
- else
- NCT_Itype_Assoc.Set
- (Associated_Node_For_Itype (Old_Itype), New_Itype);
- end if;
-
- -- Case of hash tables not used
-
- else
- E := First_Elmt (Actual_Map);
- while Present (E) loop
- if Associated_Node_For_Itype (Old_Itype) = Node (E) then
- Set_Associated_Node_For_Itype
- (New_Itype, Node (Next_Elmt (E)));
- end if;
-
- if Is_Type (Node (E))
- and then
- Old_Itype = Associated_Node_For_Itype (Node (E))
- then
- Set_Associated_Node_For_Itype
- (Node (Next_Elmt (E)), New_Itype);
- end if;
-
- E := Next_Elmt (Next_Elmt (E));
- end loop;
- end if;
- end if;
-
- if Present (Freeze_Node (New_Itype)) then
- Set_Is_Frozen (New_Itype, False);
- Set_Freeze_Node (New_Itype, Empty);
- end if;
-
- -- Add new association to map
-
- if No (Actual_Map) then
- Actual_Map := New_Elmt_List;
- end if;
-
- Append_Elmt (Old_Itype, Actual_Map);
- Append_Elmt (New_Itype, Actual_Map);
-
- if NCT_Hash_Tables_Used then
- NCT_Assoc.Set (Old_Itype, New_Itype);
-
- else
- NCT_Table_Entries := NCT_Table_Entries + 1;
-
- if NCT_Table_Entries > NCT_Hash_Threshhold then
- Build_NCT_Hash_Tables;
- end if;
- end if;
-
- -- If a record subtype is simply copied, the entity list will be
- -- shared. Thus cloned_Subtype must be set to indicate the sharing.
-
- if Ekind (Old_Itype) = E_Record_Subtype
- or else Ekind (Old_Itype) = E_Class_Wide_Subtype
- then
- Set_Cloned_Subtype (New_Itype, Old_Itype);
- end if;
-
- -- Visit descendents that eventually get copied
-
- Visit_Field (Union_Id (Etype (Old_Itype)), Old_Itype);
-
- if Is_Discrete_Type (Old_Itype) then
- Visit_Field (Union_Id (Scalar_Range (Old_Itype)), Old_Itype);
-
- elsif Has_Discriminants (Base_Type (Old_Itype)) then
- -- ??? This should involve call to Visit_Field
- Visit_Elist (Discriminant_Constraint (Old_Itype));
-
- elsif Is_Array_Type (Old_Itype) then
- if Present (First_Index (Old_Itype)) then
- Visit_Field (Union_Id (List_Containing
- (First_Index (Old_Itype))),
- Old_Itype);
- end if;
-
- if Is_Packed (Old_Itype) then
- Visit_Field (Union_Id (Packed_Array_Type (Old_Itype)),
- Old_Itype);
- end if;
- end if;
- end Visit_Itype;
-
- ----------------
- -- Visit_List --
- ----------------
-
- procedure Visit_List (L : List_Id) is
- N : Node_Id;
- begin
- if L /= No_List then
- N := First (L);
-
- while Present (N) loop
- Visit_Node (N);
- Next (N);
- end loop;
- end if;
- end Visit_List;
-
- ----------------
- -- Visit_Node --
- ----------------
-
- procedure Visit_Node (N : Node_Or_Entity_Id) is
-
- -- Start of processing for Visit_Node
-
- begin
- -- Handle case of an Itype, which must be copied
-
- if Has_Extension (N)
- and then Is_Itype (N)
- then
- -- Nothing to do if already in the list. This can happen with an
- -- Itype entity that appears more than once in the tree.
- -- Note that we do not want to visit descendents in this case.
-
- -- Test for already in list when hash table is used
-
- if NCT_Hash_Tables_Used then
- if Present (NCT_Assoc.Get (Entity_Id (N))) then
- return;
- end if;
-
- -- Test for already in list when hash table not used
-
- else
- declare
- E : Elmt_Id;
- begin
- if Present (Actual_Map) then
- E := First_Elmt (Actual_Map);
- while Present (E) loop
- if Node (E) = N then
- return;
- else
- E := Next_Elmt (Next_Elmt (E));
- end if;
- end loop;
- end if;
- end;
- end if;
-
- Visit_Itype (N);
- end if;
-
- -- Visit descendents
-
- Visit_Field (Field1 (N), N);
- Visit_Field (Field2 (N), N);
- Visit_Field (Field3 (N), N);
- Visit_Field (Field4 (N), N);
- Visit_Field (Field5 (N), N);
- end Visit_Node;
-
- -- Start of processing for New_Copy_Tree
-
- begin
- Actual_Map := Map;
-
- -- See if we should use hash table
-
- if No (Actual_Map) then
- NCT_Hash_Tables_Used := False;
-
- else
- declare
- Elmt : Elmt_Id;
-
- begin
- NCT_Table_Entries := 0;
-
- Elmt := First_Elmt (Actual_Map);
- while Present (Elmt) loop
- NCT_Table_Entries := NCT_Table_Entries + 1;
- Next_Elmt (Elmt);
- Next_Elmt (Elmt);
- end loop;
-
- if NCT_Table_Entries > NCT_Hash_Threshhold then
- Build_NCT_Hash_Tables;
- else
- NCT_Hash_Tables_Used := False;
- end if;
- end;
- end if;
-
- -- Hash table set up if required, now start phase one by visiting
- -- top node (we will recursively visit the descendents).
-
- Visit_Node (Source);
-
- -- Now the second phase of the copy can start. First we process
- -- all the mapped entities, copying their descendents.
-
- if Present (Actual_Map) then
- declare
- Elmt : Elmt_Id;
- New_Itype : Entity_Id;
- begin
- Elmt := First_Elmt (Actual_Map);
- while Present (Elmt) loop
- Next_Elmt (Elmt);
- New_Itype := Node (Elmt);
- Copy_Itype_With_Replacement (New_Itype);
- Next_Elmt (Elmt);
- end loop;
- end;
- end if;
-
- -- Now we can copy the actual tree
-
- return Copy_Node_With_Replacement (Source);
- end New_Copy_Tree;
-
----------------
-- New_Entity --
----------------
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
index df25f6e7291..ae6a1ac7588 100644
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -430,46 +430,6 @@ package Atree is
-- Source to be Empty, in which case Relocate_Node simply returns
-- Empty as the result.
- function New_Copy_Tree
- (Source : Node_Id;
- Map : Elist_Id := No_Elist;
- New_Sloc : Source_Ptr := No_Location;
- New_Scope : Entity_Id := Empty) return Node_Id;
- -- Given a node that is the root of a subtree, Copy_Tree copies the entire
- -- syntactic subtree, including recursively any descendents whose parent
- -- field references a copied node (descendents not linked to a copied node
- -- by the parent field are not copied, instead the copied tree references
- -- the same descendent as the original in this case, which is appropriate
- -- for non-syntactic fields such as Etype). The parent pointers in the
- -- copy are properly set. Copy_Tree (Empty/Error) returns Empty/Error.
- -- The one exception to the rule of not copying semantic fields is that
- -- any implicit types attached to the subtree are duplicated, so that
- -- the copy contains a distinct set of implicit type entities. The Map
- -- argument, if set to a non-empty Elist, specifies a set of mappings
- -- to be applied to entities in the tree. The map has the form:
- --
- -- old entity 1
- -- new entity to replace references to entity 1
- -- old entity 2
- -- new entity to replace references to entity 2
- -- ...
- --
- -- The call destroys the contents of Map in this case
- --
- -- The parameter New_Sloc, if set to a value other than No_Location, is
- -- used as the Sloc value for all nodes in the new copy. If New_Sloc is
- -- set to its default value No_Location, then the Sloc values of the
- -- nodes in the copy are simply copied from the corresponding original.
- --
- -- The Comes_From_Source indication is unchanged if New_Sloc is set to
- -- the default No_Location value, but is reset if New_Sloc is given, since
- -- in this case the result clearly is neither a source node or an exact
- -- copy of a source node.
- --
- -- The parameter New_Scope, if set to a value other than Empty, is the
- -- value to use as the Scope for any Itypes that are copied. The most
- -- typical value for this parameter, if given, is Current_Scope.
-
function Copy_Separate_Tree (Source : Node_Id) return Node_Id;
-- Given a node that is the root of a subtree, Copy_Separate_Tree copies
-- the entire syntactic subtree, including recursively any descendants
@@ -3114,6 +3074,95 @@ package Atree is
for Node_Record'Size use 8*32;
for Node_Record'Alignment use 4;
+ function E_To_N is new Unchecked_Conversion (Entity_Kind, Node_Kind);
+ function N_To_E is new Unchecked_Conversion (Node_Kind, Entity_Kind);
+
+ -- Default value used to initialize default nodes. Note that some of the
+ -- fields get overwritten, and in particular, Nkind always gets reset.
+
+ Default_Node : Node_Record := (
+ Is_Extension => False,
+ Pflag1 => False,
+ Pflag2 => False,
+ In_List => False,
+ Unused_1 => False,
+ Rewrite_Ins => False,
+ Analyzed => False,
+ Comes_From_Source => False,
+ -- modified by Set_Comes_From_Source_Default
+ Error_Posted => False,
+ Flag4 => False,
+
+ Flag5 => False,
+ Flag6 => False,
+ Flag7 => False,
+ Flag8 => False,
+ Flag9 => False,
+ Flag10 => False,
+ Flag11 => False,
+ Flag12 => False,
+
+ Flag13 => False,
+ Flag14 => False,
+ Flag15 => False,
+ Flag16 => False,
+ Flag17 => False,
+ Flag18 => False,
+
+ Nkind => N_Unused_At_Start,
+
+ Sloc => No_Location,
+ Link => Empty_List_Or_Node,
+ Field1 => Empty_List_Or_Node,
+ Field2 => Empty_List_Or_Node,
+ Field3 => Empty_List_Or_Node,
+ Field4 => Empty_List_Or_Node,
+ Field5 => Empty_List_Or_Node);
+
+ -- Default value used to initialize node extensions (i.e. the second
+ -- and third and fourth components of an extended node). Note we are
+ -- cheating a bit here when it comes to Node12, which really holds
+ -- flags an (for the third component), the convention. But it works
+ -- because Empty, False, Convention_Ada, all happen to be all zero bits.
+
+ Default_Node_Extension : constant Node_Record := (
+ Is_Extension => True,
+ Pflag1 => False,
+ Pflag2 => False,
+ In_List => False,
+ Unused_1 => False,
+ Rewrite_Ins => False,
+ Analyzed => False,
+ Comes_From_Source => False,
+ Error_Posted => False,
+ Flag4 => False,
+
+ Flag5 => False,
+ Flag6 => False,
+ Flag7 => False,
+ Flag8 => False,
+ Flag9 => False,
+ Flag10 => False,
+ Flag11 => False,
+ Flag12 => False,
+
+ Flag13 => False,
+ Flag14 => False,
+ Flag15 => False,
+ Flag16 => False,
+ Flag17 => False,
+ Flag18 => False,
+
+ Nkind => E_To_N (E_Void),
+
+ Field6 => Empty_List_Or_Node,
+ Field7 => Empty_List_Or_Node,
+ Field8 => Empty_List_Or_Node,
+ Field9 => Empty_List_Or_Node,
+ Field10 => Empty_List_Or_Node,
+ Field11 => Empty_List_Or_Node,
+ Field12 => Empty_List_Or_Node);
+
-- The following defines the extendable array used for the nodes table
-- Nodes with extensions use five consecutive entries in the array
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index 6f6b557ca1d..ce81c7ae005 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -2273,7 +2273,7 @@ package body Bindgen is
-- If the standard library is not suppressed, these variables
-- are in the runtime data area for easy access from the
- -- runtime
+ -- runtime.
if not Suppress_Standard_Library_On_Target then
WBI ("");
@@ -2332,10 +2332,13 @@ package body Bindgen is
"""__gnat_ada_main_program_name"");");
end if;
- WBI ("");
- WBI (" procedure " & Ada_Final_Name.all & ";");
- WBI (" pragma Export (C, " & Ada_Final_Name.all & ", """ &
- Ada_Final_Name.all & """);");
+ if not Cumulative_Restrictions.Set (No_Finalization) then
+ WBI ("");
+ WBI (" procedure " & Ada_Final_Name.all & ";");
+ WBI (" pragma Export (C, " & Ada_Final_Name.all & ", """ &
+ Ada_Final_Name.all & """);");
+ end if;
+
WBI ("");
WBI (" procedure " & Ada_Init_Name.all & ";");
WBI (" pragma Export (C, " & Ada_Init_Name.all & ", """ &
@@ -2507,7 +2510,11 @@ package body Bindgen is
Gen_Adainit_Ada;
- Gen_Adafinal_Ada;
+ -- Generate the adafinal routine unless there is no finalization to do
+
+ if not Cumulative_Restrictions.Set (No_Finalization) then
+ Gen_Adafinal_Ada;
+ end if;
if Bind_Main_Program and then VM_Target = No_VM then
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 45462db72b5..39f63f3a383 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -3568,6 +3568,11 @@ package body Checks is
then
return;
+ -- Nothing to do for unsigned integer types, which do not overflow
+
+ elsif Is_Modular_Integer_Type (Typ) then
+ return;
+
-- Nothing to do if the range of the result is known OK. We skip this
-- for conversions, since the caller already did the check, and in any
-- case the condition for deleting the check for a type conversion is
diff --git a/gcc/ada/checks.ads b/gcc/ada/checks.ads
index 07ac2722549..e0cc54d0936 100644
--- a/gcc/ada/checks.ads
+++ b/gcc/ada/checks.ads
@@ -135,9 +135,9 @@ package Checks is
Typ : Entity_Id;
No_Sliding : Boolean := False);
-- Top-level procedure, calls all the others depending on the class of Typ.
- -- Checks that expression N verifies the constraint of type Typ. No_Sliding
- -- is only relevant for constrained array types, if set to True, it
- -- checks that indexes are in range.
+ -- Checks that expression N satisfies the constraint of type Typ.
+ -- No_Sliding is only relevant for constrained array types, if set to True,
+ -- it checks that indexes are in range.
procedure Apply_Discriminant_Check
(N : Node_Id;
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index 2cc4f74a469..0ce0db632e6 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -91,9 +91,9 @@ package body Debug is
-- dY Enable configurable run-time mode
-- dZ Generate listing showing the contents of the dispatch tables
- -- d.a
+ -- d.a Force Target_Strict_Alignment mode to True
-- d.b
- -- d.c
+ -- d.c Generate inline concatenation, do not call procedure
-- d.d
-- d.e
-- d.f Inhibit folding of static expressions
@@ -120,7 +120,7 @@ package body Debug is
-- d.A
-- d.B
- -- d.C
+ -- d.C Generate concatenation call, do not generate inline code
-- d.D
-- d.E
-- d.F
@@ -498,6 +498,14 @@ package body Debug is
-- - In case of abstract subprograms the text "is abstract" is
-- added at the end of the line.
+ -- d.a Force Target_Strict_Alignment to True, even on targets where it
+ -- would normally be false. Can be used for testing strict alignment
+ -- circuitry in the compiler.
+
+ -- d.c Generate inline concatenation, instead of calling one of the
+ -- System.Concat_n.Str_Concat_n routines in cases where the latter
+ -- routines would normally be called.
+
-- d.f Suppress folding of static expressions. This of course results
-- in seriously non-conforming behavior, but is useful sometimes
-- when tracking down handling of complex expressions.
@@ -542,6 +550,9 @@ package body Debug is
-- fully compiled and analyzed, they just get eliminated from the
-- code generation step.
+ -- d.C Generate call to System.Concat_n.Str_Concat_n routines in cases
+ -- where we would normally generate inline concatenation code.
+
-- d.I Inspector mode. Relevant for VM_Target /= None. Try to generate
-- byte code, even in case of unsupported construct, for the sake
-- of static analysis tools.
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 72db40fcf84..92d9ce26b8f 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -206,6 +206,7 @@ package body Einfo is
-- Stored_Constraint Elist23
-- Spec_PPC_List Node24
+ -- Underlying_Record_View Node24
-- Interface_Alias Node25
-- Interfaces Elist25
@@ -2672,6 +2673,12 @@ package body Einfo is
return Node19 (Id);
end Underlying_Full_View;
+ function Underlying_Record_View (Id : E) return E is
+ begin
+ pragma Assert (Ekind (Id) = E_Record_Type);
+ return Node24 (Id);
+ end Underlying_Record_View;
+
function Universal_Aliasing (Id : E) return B is
begin
pragma Assert (Is_Type (Id));
@@ -5152,6 +5159,12 @@ package body Einfo is
Set_Node19 (Id, V);
end Set_Underlying_Full_View;
+ procedure Set_Underlying_Record_View (Id : E; V : E) is
+ begin
+ pragma Assert (Ekind (Id) = E_Record_Type);
+ Set_Node24 (Id, V);
+ end Set_Underlying_Record_View;
+
procedure Set_Universal_Aliasing (Id : E; V : B := True) is
begin
pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
@@ -7909,6 +7922,9 @@ package body Einfo is
when Subprogram_Kind =>
Write_Str ("Spec_PPC_List");
+ when E_Record_Type =>
+ Write_Str ("Underlying record view");
+
when others =>
Write_Str ("???");
end case;
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index 94861354b70..91883e72a89 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -3558,6 +3558,13 @@ package Einfo is
-- private completion. If Td is already constrained, then its full view
-- can serve directly as the full view of T.
+-- Underlying_Record_View (Node24)
+-- Present in record types. Set for record types that are extensions of
+-- types with unknown discriminants. Such types do not have a completion,
+-- but they cannot be used without having some discriminated view at
+-- hand. This view is a record type with the same structure, whose parent
+-- type is the full view of the parent in the original type extension.
+
-- Underlying_Type (synthesized)
-- Applies to all entities. This is the identity function except in the
-- case where it is applied to an incomplete or private type, in which
@@ -5246,6 +5253,7 @@ package Einfo is
-- Discriminant_Constraint (Elist21)
-- Corresponding_Remote_Type (Node22)
-- Stored_Constraint (Elist23)
+ -- Underlying_Record_View (Node24) (base type only)
-- Interfaces (Elist25)
-- Component_Alignment (special) (base type only)
-- C_Pass_By_Copy (Flag125) (base type only)
@@ -5983,6 +5991,7 @@ package Einfo is
function Task_Body_Procedure (Id : E) return N;
function Treat_As_Volatile (Id : E) return B;
function Underlying_Full_View (Id : E) return E;
+ function Underlying_Record_View (Id : E) return E;
function Universal_Aliasing (Id : E) return B;
function Unset_Reference (Id : E) return N;
function Used_As_Generic_Actual (Id : E) return B;
@@ -6534,6 +6543,7 @@ package Einfo is
procedure Set_Task_Body_Procedure (Id : E; V : N);
procedure Set_Treat_As_Volatile (Id : E; V : B := True);
procedure Set_Underlying_Full_View (Id : E; V : E);
+ procedure Set_Underlying_Record_View (Id : E; V : E);
procedure Set_Universal_Aliasing (Id : E; V : B := True);
procedure Set_Unset_Reference (Id : E; V : N);
procedure Set_Used_As_Generic_Actual (Id : E; V : B := True);
@@ -7226,6 +7236,7 @@ package Einfo is
pragma Inline (Task_Body_Procedure);
pragma Inline (Treat_As_Volatile);
pragma Inline (Underlying_Full_View);
+ pragma Inline (Underlying_Record_View);
pragma Inline (Universal_Aliasing);
pragma Inline (Unset_Reference);
pragma Inline (Used_As_Generic_Actual);
@@ -7610,6 +7621,7 @@ package Einfo is
pragma Inline (Set_Task_Body_Procedure);
pragma Inline (Set_Treat_As_Volatile);
pragma Inline (Set_Underlying_Full_View);
+ pragma Inline (Set_Underlying_Record_View);
pragma Inline (Set_Universal_Aliasing);
pragma Inline (Set_Unset_Reference);
pragma Inline (Set_Used_As_Generic_Actual);
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 6ea4ddc961f..bd9fb0d1e85 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -506,6 +506,8 @@ package body Exp_Aggr is
-- 9. There cannot be any discriminated record components, since the
-- back end cannot handle this complex case.
+ -- 10. No controlled actions need to be generated for components.
+
function Backend_Processing_Possible (N : Node_Id) return Boolean is
Typ : constant Entity_Id := Etype (N);
-- Typ is the correct constrained array subtype of the aggregate
@@ -580,9 +582,9 @@ package body Exp_Aggr is
-- Start of processing for Backend_Processing_Possible
begin
- -- Checks 2 (array must not be bit packed)
+ -- Checks 2 (array not bit packed) and 10 (no controlled actions)
- if Is_Bit_Packed_Array (Typ) then
+ if Is_Bit_Packed_Array (Typ) or else Needs_Finalization (Typ) then
return False;
end if;
@@ -1226,10 +1228,10 @@ package body Exp_Aggr is
if Present (Comp_Type)
and then Needs_Finalization (Comp_Type)
and then not Is_Limited_Type (Comp_Type)
- and then
- (not Is_Array_Type (Comp_Type)
- or else not Is_Controlled (Component_Type (Comp_Type))
- or else Nkind (Expr) /= N_Aggregate)
+ and then not
+ (Is_Array_Type (Comp_Type)
+ and then Is_Controlled (Component_Type (Comp_Type))
+ and then Nkind (Expr) = N_Aggregate)
then
Append_List_To (L,
Make_Adjust_Call (
@@ -2548,6 +2550,9 @@ package body Exp_Aggr is
-- in the limited case, the ancestor part must be either a
-- function call (possibly qualified, or wrapped in an unchecked
-- conversion) or aggregate (definitely qualified).
+ -- The ancestor part can also be a function call (that may be
+ -- transformed into an explicit dereference) or a qualification
+ -- of one such.
elsif Is_Limited_Type (Etype (A))
and then Nkind (Unqualify (A)) /= N_Function_Call -- aggregate?
@@ -2555,6 +2560,7 @@ package body Exp_Aggr is
(Nkind (Unqualify (A)) /= N_Unchecked_Type_Conversion
or else
Nkind (Expression (Unqualify (A))) /= N_Function_Call)
+ and then Nkind (Unqualify (A)) /= N_Explicit_Dereference
then
Ancestor_Is_Expression := True;
@@ -3418,6 +3424,7 @@ package body Exp_Aggr is
procedure Convert_To_Assignments (N : Node_Id; Typ : Entity_Id) is
Loc : constant Source_Ptr := Sloc (N);
+ T : Entity_Id;
Temp : Entity_Id;
Instr : Node_Id;
@@ -3506,10 +3513,10 @@ package body Exp_Aggr is
Is_Controlled (Typ) or else Has_Controlled_Component (Typ));
end if;
- -- If the aggregate is non-limited, create a temporary. If it is
- -- limited and the context is an assignment, this is a subaggregate
- -- for an enclosing aggregate being expanded. It must be built in place,
- -- so use the target of the current assignment.
+ -- If the aggregate is non-limited, create a temporary. If it is limited
+ -- and the context is an assignment, this is a subaggregate for an
+ -- enclosing aggregate being expanded. It must be built in place, so use
+ -- the target of the current assignment.
if Is_Limited_Type (Typ)
and then Nkind (Parent (N)) = N_Assignment_Statement
@@ -3522,18 +3529,29 @@ package body Exp_Aggr is
else
Temp := Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
+ -- If the type inherits unknown discriminants, use the view with
+ -- known discriminants if available.
+
+ if Has_Unknown_Discriminants (Typ)
+ and then Present (Underlying_Record_View (Typ))
+ then
+ T := Underlying_Record_View (Typ);
+ else
+ T := Typ;
+ end if;
+
Instr :=
Make_Object_Declaration (Loc,
Defining_Identifier => Temp,
- Object_Definition => New_Occurrence_Of (Typ, Loc));
+ Object_Definition => New_Occurrence_Of (T, Loc));
Set_No_Initialization (Instr);
Insert_Action (N, Instr);
- Initialize_Discriminants (Instr, Typ);
+ Initialize_Discriminants (Instr, T);
Target_Expr := New_Occurrence_Of (Temp, Loc);
- Insert_Actions (N, Build_Record_Aggr_Code (N, Typ, Target_Expr));
+ Insert_Actions (N, Build_Record_Aggr_Code (N, T, Target_Expr));
Rewrite (N, New_Occurrence_Of (Temp, Loc));
- Analyze_And_Resolve (N, Typ);
+ Analyze_And_Resolve (N, T);
end if;
end Convert_To_Assignments;
@@ -4947,8 +4965,8 @@ package body Exp_Aggr is
-- STEP 3
- -- Delay expansion for nested aggregates it will be taken care of
- -- when the parent aggregate is expanded
+ -- Delay expansion for nested aggregates: it will be taken care of
+ -- when the parent aggregate is expanded.
Parent_Node := Parent (N);
Parent_Kind := Nkind (Parent_Node);
@@ -4979,7 +4997,7 @@ package body Exp_Aggr is
-- STEP 4
- -- Look if in place aggregate expansion is possible
+ -- Look if in place aggregate expansion is possible.
-- For object declarations we build the aggregate in place, unless
-- the array is bit-packed or the component is controlled.
@@ -5018,8 +5036,8 @@ package body Exp_Aggr is
and then In_Place_Assign_OK);
end if;
- -- If this is an array of tasks, it will be expanded into build-in-
- -- -place assignments. Build an activation chain for the tasks now
+ -- If this is an array of tasks, it will be expanded into build-in-place
+ -- assignments. Build an activation chain for the tasks now.
if Has_Task (Etype (N)) then
Build_Activation_Chain_Entity (N);
@@ -5114,8 +5132,8 @@ package body Exp_Aggr is
Set_No_Initialization (Tmp_Decl, True);
-- If we are within a loop, the temporary will be pushed on the
- -- stack at each iteration. If the aggregate is the expression for
- -- an allocator, it will be immediately copied to the heap and can
+ -- stack at each iteration. If the aggregate is the expression for an
+ -- allocator, it will be immediately copied to the heap and can
-- be reclaimed at once. We create a transient scope around the
-- aggregate for this purpose.
@@ -5128,9 +5146,9 @@ package body Exp_Aggr is
Insert_Action (N, Tmp_Decl);
end if;
- -- Construct and insert the aggregate code. We can safely suppress
- -- index checks because this code is guaranteed not to raise CE
- -- on index checks. However we should *not* suppress all checks.
+ -- Construct and insert the aggregate code. We can safely suppress index
+ -- checks because this code is guaranteed not to raise CE on index
+ -- checks. However we should *not* suppress all checks.
declare
Target : Node_Id;
diff --git a/gcc/ada/exp_aggr.ads b/gcc/ada/exp_aggr.ads
index 8f9f9630a25..5d14f1d5fe1 100644
--- a/gcc/ada/exp_aggr.ads
+++ b/gcc/ada/exp_aggr.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -34,9 +34,9 @@ package Exp_Aggr is
-- Returns True if N is an aggregate of some kind whose Expansion_Delayed
-- flag is set (see sinfo for meaning of flag).
- procedure Convert_Aggr_In_Object_Decl (N : Node_Id);
- -- N is a N_Object_Declaration with an expression which must be
- -- an N_Aggregate or N_Extension_Aggregate with Expansion_Delayed
+ procedure Convert_Aggr_In_Object_Decl (N : Node_Id);
+ -- N is a N_Object_Declaration with an expression which must be an
+ -- N_Aggregate or N_Extension_Aggregate with Expansion_Delayed.
-- This procedure performs in-place aggregate assignment.
procedure Convert_Aggr_In_Allocator
@@ -45,7 +45,7 @@ package Exp_Aggr is
Aggr : Node_Id);
-- Alloc is the allocator whose expression is the aggregate Aggr.
-- Decl is an N_Object_Declaration created during allocator expansion.
- -- This procedure perform in-place aggregate assignment into the
+ -- This procedure performs in-place aggregate assignment into the
-- temporary declared in Decl, and the allocator becomes an access to
-- that temporary.
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 7f30178432c..4442a78e01d 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -2061,9 +2061,9 @@ package body Exp_Ch3 is
-- return O.Iface_Comp'Position;
-- end Fxx;
- ------------------------------
- -- Build_Offset_To_Top_Body --
- ------------------------------
+ ----------------------------------
+ -- Build_Offset_To_Top_Function --
+ ----------------------------------
procedure Build_Offset_To_Top_Function (Iface_Comp : Entity_Id) is
Body_Node : Node_Id;
@@ -2394,9 +2394,8 @@ package body Exp_Ch3 is
and then Convention (Prim) = Convention_CPP
and then not Present (Interface_Alias (Prim))
then
- Register_Primitive (Loc,
- Prim => Prim,
- Ins_Nod => Last (Init_Tags_List));
+ Append_List_To (Init_Tags_List,
+ Register_Primitive (Loc, Prim => Prim));
end if;
Next_Elmt (E);
@@ -3008,7 +3007,9 @@ package body Exp_Ch3 is
-- If it is a type derived from a type with unknown discriminants,
-- we cannot build an initialization procedure for it.
- if Has_Unknown_Discriminants (Rec_Id) then
+ if Has_Unknown_Discriminants (Rec_Id)
+ or else Has_Unknown_Discriminants (Etype (Rec_Id))
+ then
return False;
end if;
@@ -3891,6 +3892,16 @@ package body Exp_Ch3 is
Par_Subtype := Process_Subtype (New_Copy_Tree (Indic), Def);
end if;
+ -- If this is an extension of a type with unknown discriminants, use
+ -- full view to provide proper discriminants to gigi.
+
+ if Has_Unknown_Discriminants (Par_Subtype)
+ and then Is_Private_Type (Par_Subtype)
+ and then Present (Full_View (Par_Subtype))
+ then
+ Par_Subtype := Full_View (Par_Subtype);
+ end if;
+
Set_Parent_Subtype (T, Par_Subtype);
Comp_Decl :=
@@ -4146,7 +4157,6 @@ package body Exp_Ch3 is
Expr_Q : Node_Id;
Id_Ref : Node_Id;
New_Ref : Node_Id;
- BIP_Call : Boolean := False;
Init_After : Node_Id := N;
-- Node after which the init proc call is to be inserted. This is
@@ -4410,21 +4420,25 @@ package body Exp_Ch3 is
if Is_Delayed_Aggregate (Expr_Q) then
Convert_Aggr_In_Object_Decl (N);
- else
- -- Ada 2005 (AI-318-02): If the initialization expression is a
- -- call to a build-in-place function, then access to the declared
- -- object must be passed to the function. Currently we limit such
- -- functions to those with constrained limited result subtypes,
- -- but eventually we plan to expand the allowed forms of functions
- -- that are treated as build-in-place.
+ -- Ada 2005 (AI-318-02): If the initialization expression is a call
+ -- to a build-in-place function, then access to the declared object
+ -- must be passed to the function. Currently we limit such functions
+ -- to those with constrained limited result subtypes, but eventually
+ -- plan to expand the allowed forms of functions that are treated as
+ -- build-in-place.
- if Ada_Version >= Ada_05
- and then Is_Build_In_Place_Function_Call (Expr_Q)
- then
- Make_Build_In_Place_Call_In_Object_Declaration (N, Expr_Q);
- BIP_Call := True;
- end if;
+ elsif Ada_Version >= Ada_05
+ and then Is_Build_In_Place_Function_Call (Expr_Q)
+ then
+ Make_Build_In_Place_Call_In_Object_Declaration (N, Expr_Q);
+
+ -- The previous call expands the expression initializing the
+ -- built-in-place object into further code that will be analyzed
+ -- later. No further expansion needed here.
+ return;
+
+ else
-- In most cases, we must check that the initial value meets any
-- constraint imposed by the declared type. However, there is one
-- very important exception to this rule. If the entity has an
@@ -4572,7 +4586,6 @@ package body Exp_Ch3 is
if Needs_Finalization (Typ)
and then not Is_Inherently_Limited_Type (Typ)
- and then not BIP_Call
then
Insert_Actions_After (Init_After,
Make_Adjust_Call (
@@ -5731,6 +5744,27 @@ package body Exp_Ch3 is
end if;
end if;
+ -- If the type has unknown discriminants, propagate dispatching
+ -- information to its underlying record view, which does not get
+ -- its own dispatch table.
+
+ if Is_Derived_Type (Def_Id)
+ and then Has_Unknown_Discriminants (Def_Id)
+ and then Present (Underlying_Record_View (Def_Id))
+ then
+ declare
+ Rep : constant Entity_Id :=
+ Underlying_Record_View (Def_Id);
+ begin
+ Set_Access_Disp_Table
+ (Rep, Access_Disp_Table (Def_Id));
+ Set_Dispatch_Table_Wrappers
+ (Rep, Dispatch_Table_Wrappers (Def_Id));
+ Set_Primitive_Operations
+ (Rep, Primitive_Operations (Def_Id));
+ end;
+ end if;
+
-- Make sure that the primitives Initialize, Adjust and Finalize
-- are Frozen before other TSS subprograms. We don't want them
-- Frozen inside.
@@ -6857,8 +6891,7 @@ package body Exp_Ch3 is
and then Is_Variable_Size_Record (Etype (Comp_Typ))
and then Chars (Tag_Comp) /= Name_uTag
then
- pragma Assert
- (Present (DT_Offset_To_Top_Func (Tag_Comp)));
+ pragma Assert (Present (DT_Offset_To_Top_Func (Tag_Comp)));
-- Issue error if Set_Dynamic_Offset_To_Top is not available in a
-- configurable run-time environment.
@@ -7526,7 +7559,7 @@ package body Exp_Ch3 is
Null_Exclusion_Present =>
Null_Exclusion_Present (Parent (Formal)),
Parameter_Type =>
- New_Reference_To (Etype (Formal), Loc),
+ New_Occurrence_Of (Etype (Formal), Loc),
Expression =>
New_Copy_Tree (Expression (Parent (Formal)))),
Formal_List);
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 27bc6c6e7e0..ef4dbc51989 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -25,6 +25,7 @@
with Atree; use Atree;
with Checks; use Checks;
+with Debug; use Debug;
with Einfo; use Einfo;
with Elists; use Elists;
with Errout; use Errout;
@@ -976,15 +977,14 @@ package body Exp_Ch4 is
Rewrite (Exp, New_Copy (Expression (Exp)));
end if;
else
- -- First check against the type of the qualified expression
- --
- -- NOTE: The commented call should be correct, but for some reason
- -- causes the compiler to bomb (sigsegv) on ACVC test c34007g, so for
- -- now we just perform the old (incorrect) test against the
- -- designated subtype with no sliding in the else part of the if
- -- statement below. ???
- --
- -- Apply_Constraint_Check (Exp, T, No_Sliding => True);
+ -- If we have:
+ -- type A is access T1;
+ -- X : A := new T2'(...);
+ -- T1 and T2 can be different subtypes, and we might need to check
+ -- both constraints. First check against the type of the qualified
+ -- expression.
+
+ Apply_Constraint_Check (Exp, T, No_Sliding => True);
-- A check is also needed in cases where the designated subtype is
-- constrained and differs from the subtype given in the qualified
@@ -996,14 +996,6 @@ package body Exp_Ch4 is
then
Apply_Constraint_Check
(Exp, DesigT, No_Sliding => False);
-
- -- The nonsliding check should really be performed (unconditionally)
- -- against the subtype of the qualified expression, but that causes a
- -- problem with c34007g (see above), so for now we retain this.
-
- else
- Apply_Constraint_Check
- (Exp, DesigT, No_Sliding => True);
end if;
-- For an access to unconstrained packed array, GIGI needs to see an
@@ -2757,9 +2749,10 @@ package body Exp_Ch4 is
Right_Opnd => Make_Artyp_Literal (1))));
-- Note that calculation of the high bound may cause overflow in some
- -- very weird cases, so in the general case we need an overflow check
- -- on the high bound. We can avoid this for the common case of string
- -- types since we chose a wider range for the arithmetic type.
+ -- very weird cases, so in the general case we need an overflow check on
+ -- the high bound. We can avoid this for the common case of string types
+ -- and other types whose index is Positive, since we chose a wider range
+ -- for the arithmetic type.
if Istyp /= Standard_Positive then
Activate_Overflow_Check (High_Bound);
@@ -2813,6 +2806,80 @@ package body Exp_Ch4 is
-- Now we will generate the assignments to do the actual concatenation
+ -- There is one case in which we will not do this, namely when all the
+ -- following conditions are met:
+
+ -- The result type is Standard.String
+
+ -- There are nine or fewer retained (non-null) operands
+
+ -- The optimization level is -O0
+
+ -- The corresponding System.Concat_n.Str_Concat_n routine is
+ -- available in the run time.
+
+ -- The debug flag gnatd.c is not set
+
+ -- If all these conditions are met then we generate a call to the
+ -- relevant concatenation routine. The purpose of this is to avoid
+ -- undesirable code bloat at -O0.
+
+ if Atyp = Standard_String
+ and then NN in 2 .. 9
+ and then (Opt.Optimization_Level = 0 or else Debug_Flag_Dot_CC)
+ and then not Debug_Flag_Dot_C
+ then
+ declare
+ RR : constant array (Nat range 2 .. 9) of RE_Id :=
+ (RE_Str_Concat_2,
+ RE_Str_Concat_3,
+ RE_Str_Concat_4,
+ RE_Str_Concat_5,
+ RE_Str_Concat_6,
+ RE_Str_Concat_7,
+ RE_Str_Concat_8,
+ RE_Str_Concat_9);
+
+ begin
+ if RTE_Available (RR (NN)) then
+ declare
+ Opnds : constant List_Id :=
+ New_List (New_Occurrence_Of (Ent, Loc));
+
+ begin
+ for J in 1 .. NN loop
+ if Is_List_Member (Operands (J)) then
+ Remove (Operands (J));
+ end if;
+
+ if Base_Type (Etype (Operands (J))) = Ctyp then
+ Append_To (Opnds,
+ Make_Aggregate (Loc,
+ Component_Associations => New_List (
+ Make_Component_Association (Loc,
+ Choices => New_List (
+ Make_Integer_Literal (Loc, 1)),
+ Expression => Operands (J)))));
+
+ else
+ Append_To (Opnds, Operands (J));
+ end if;
+ end loop;
+
+ Insert_Action (Cnode,
+ Make_Procedure_Call_Statement (Loc,
+ Name => New_Reference_To (RTE (RR (NN)), Loc),
+ Parameter_Associations => Opnds));
+
+ Result := New_Reference_To (Ent, Loc);
+ goto Done;
+ end;
+ end if;
+ end;
+ end if;
+
+ -- Not special case so generate the assignments
+
Known_Non_Null_Operand_Seen := False;
for J in 1 .. NN loop
@@ -2935,6 +3002,12 @@ package body Exp_Ch4 is
-- constrain. Such occurrences can be rewritten as aliased objects
-- and their unrestricted access used instead of the coextension.
+ function Size_In_Storage_Elements (E : Entity_Id) return Node_Id;
+ -- Given a constrained array type E, returns a node representing the
+ -- code to compute the size in storage elements for the given type.
+ -- This is done without using the attribute (which malfunctions for
+ -- large sizes ???)
+
---------------------------------------
-- Complete_Coextension_Finalization --
---------------------------------------
@@ -3031,8 +3104,10 @@ package body Exp_Ch4 is
-- Retrieve the declaration of the body
- Decl := Parent (Parent (
- Corresponding_Body (Parent (Parent (S)))));
+ Decl :=
+ Parent
+ (Parent
+ (Corresponding_Body (Parent (Parent (S)))));
exit;
end if;
@@ -3161,6 +3236,61 @@ package body Exp_Ch4 is
Analyze_And_Resolve (N, PtrT);
end Rewrite_Coextension;
+ ------------------------------
+ -- Size_In_Storage_Elements --
+ ------------------------------
+
+ function Size_In_Storage_Elements (E : Entity_Id) return Node_Id is
+ begin
+ -- Logically this just returns E'Max_Size_In_Storage_Elements.
+ -- However, the reason for the existence of this function is
+ -- to construct a test for sizes too large, which means near the
+ -- 32-bit limit on a 32-bit machine, and precisely the trouble
+ -- is that we get overflows when sizes are greater than 2**31.
+
+ -- So what we end up doing for array types is to use the expression:
+
+ -- number-of-elements * component_type'Max_Size_In_Storage_Elements
+
+ -- which avoids this problem. All this is a big bogus, but it does
+ -- mean we catch common cases of trying to allocate arrays that
+ -- are too large, and which in the absence of a check results in
+ -- undetected chaos ???
+
+ declare
+ Len : Node_Id;
+ Res : Node_Id;
+
+ begin
+ for J in 1 .. Number_Dimensions (E) loop
+ Len :=
+ Make_Attribute_Reference (Loc,
+ Prefix => New_Occurrence_Of (E, Loc),
+ Attribute_Name => Name_Length,
+ Expressions => New_List (
+ Make_Integer_Literal (Loc, J)));
+
+ if J = 1 then
+ Res := Len;
+
+ else
+ Res :=
+ Make_Op_Multiply (Loc,
+ Left_Opnd => Res,
+ Right_Opnd => Len);
+ end if;
+ end loop;
+
+ return
+ Make_Op_Multiply (Loc,
+ Left_Opnd => Len,
+ Right_Opnd =>
+ Make_Attribute_Reference (Loc,
+ Prefix => New_Occurrence_Of (Component_Type (E), Loc),
+ Attribute_Name => Name_Max_Size_In_Storage_Elements));
+ end;
+ end Size_In_Storage_Elements;
+
-- Start of processing for Expand_N_Allocator
begin
@@ -3272,9 +3402,51 @@ package body Exp_Ch4 is
Complete_Coextension_Finalization;
end if;
+ -- Check for size too large, we do this because the back end misses
+ -- proper checks here and can generate rubbish allocation calls when
+ -- we are near the limit. We only do this for the 32-bit address case
+ -- since that is from a practical point of view where we see a problem.
+
+ if System_Address_Size = 32
+ and then not Storage_Checks_Suppressed (PtrT)
+ and then not Storage_Checks_Suppressed (Dtyp)
+ and then not Storage_Checks_Suppressed (Etyp)
+ then
+ -- The check we want to generate should look like
+
+ -- if Etyp'Max_Size_In_Storage_Elements > 3.5 gigabytes then
+ -- raise Storage_Error;
+ -- end if;
+
+ -- where 3.5 gigabytes is a constant large enough to accomodate any
+ -- reasonable request for. But we can't do it this way because at
+ -- least at the moment we don't compute this attribute right, and
+ -- can silently give wrong results when the result gets large. Since
+ -- this is all about large results, that's bad, so instead we only
+ -- apply the check for constrained arrays, and manually compute the
+ -- value of the attribute ???
+
+ if Is_Array_Type (Etyp) and then Is_Constrained (Etyp) then
+ Insert_Action (N,
+ Make_Raise_Storage_Error (Loc,
+ Condition =>
+ Make_Op_Gt (Loc,
+ Left_Opnd => Size_In_Storage_Elements (Etyp),
+ Right_Opnd =>
+ Make_Integer_Literal (Loc,
+ Intval => Uint_7 * (Uint_2 ** 29))),
+ Reason => SE_Object_Too_Large));
+ end if;
+ end if;
+
-- Handle case of qualified expression (other than optimization above)
+ -- First apply constraint checks, because the bounds or discriminants
+ -- in the aggregate might not match the subtype mark in the allocator.
if Nkind (Expression (N)) = N_Qualified_Expression then
+ Apply_Constraint_Check
+ (Expression (Expression (N)), Etype (Expression (N)));
+
Expand_Allocator_Expression (N);
return;
end if;
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 99870dc873d..5008f4c1eed 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -308,6 +308,14 @@ package body Exp_Ch5 is
-- can be performed directly.
end if;
+ -- If either operand has an address clause clear Backwards_OK and
+ -- Forwards_OK, since we cannot tell if the operands overlap.
+
+ if Has_Address_Clause (Lhs) or else Has_Address_Clause (Rhs) then
+ Set_Forwards_OK (N, False);
+ Set_Backwards_OK (N, False);
+ end if;
+
-- We certainly must use a loop for change of representation and also
-- we use the operand of the conversion on the right hand side as the
-- effective right hand side (the component types must match in this
@@ -634,16 +642,21 @@ package body Exp_Ch5 is
end if;
end if;
- -- If after that analysis, Forwards_OK is still True, and
- -- Loop_Required is False, meaning that we have not discovered some
- -- non-overlap reason for requiring a loop, then we can still let
- -- gigi handle it.
+ -- If after that analysis Loop_Required is False, meaning that we
+ -- have not discovered some non-overlap reason for requiring a loop,
+ -- then the outcome depends on the capabilities of the back end.
if not Loop_Required then
- -- Assume gigi can handle it if Forwards_OK is set
+ -- The GCC back end can deal with all cases of overlap by falling
+ -- back to memmove if it cannot use a more efficient approach.
- if Forwards_OK (N) then
+ if VM_Target = No_VM and not AAMP_On_Target then
+ return;
+
+ -- Assume other back ends can handle it if Forwards_OK is set
+
+ elsif Forwards_OK (N) then
return;
-- If Forwards_OK is not set, the back end will need something
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 2cd2f101a64..17332f26fbc 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -215,6 +215,10 @@ package body Exp_Ch6 is
-- reference to the object itself, and the call becomes a call to the
-- corresponding protected subprogram.
+ function Is_Null_Procedure (Subp : Entity_Id) return Boolean;
+ -- Predicate to recognize stubbed procedures and null procedures, which
+ -- can be inlined unconditionally in all cases.
+
----------------------------------------------
-- Add_Access_Actual_To_Build_In_Place_Call --
----------------------------------------------
@@ -2887,6 +2891,14 @@ package body Exp_Ch6 is
if Ekind (Subp) = E_Function
or else Ekind (Subp) = E_Procedure
then
+ -- A simple optimization: always replace calls to null procedures
+ -- with a null statement.
+
+ if Is_Null_Procedure (Subp) then
+ Rewrite (N, Make_Null_Statement (Loc));
+ return;
+ end if;
+
if Is_Inlined (Subp) then
Inlined_Subprogram : declare
@@ -3216,10 +3228,6 @@ package body Exp_Ch6 is
-- If the type returned by the function is unconstrained and the
-- call can be inlined, special processing is required.
- function Is_Null_Procedure return Boolean;
- -- Predicate to recognize stubbed procedures and null procedures, for
- -- which there is no need for the full inlining mechanism.
-
procedure Make_Exit_Label;
-- Build declaration for exit label to be used in Return statements
@@ -3246,50 +3254,6 @@ package body Exp_Ch6 is
function Formal_Is_Used_Once (Formal : Entity_Id) return Boolean;
-- Determine whether a formal parameter is used only once in Orig_Bod
- -----------------------
- -- Is_Null_Procedure --
- -----------------------
-
- function Is_Null_Procedure return Boolean is
- Decl : constant Node_Id := Unit_Declaration_Node (Subp);
-
- begin
- if Ekind (Subp) /= E_Procedure then
- return False;
-
- elsif Nkind (Orig_Bod) /= N_Subprogram_Body then
- return False;
-
- -- Check if this is an Ada 2005 null procedure
-
- elsif Nkind (Decl) = N_Subprogram_Declaration
- and then Null_Present (Specification (Decl))
- then
- return True;
-
- -- Check if the body contains only a null statement, followed by the
- -- return statement added during expansion.
-
- else
- declare
- Stat : constant Node_Id :=
- First
- (Statements (Handled_Statement_Sequence (Orig_Bod)));
-
- Stat2 : constant Node_Id := Next (Stat);
-
- begin
- return
- Nkind (Stat) = N_Null_Statement
- and then
- (No (Stat2)
- or else
- (Nkind (Stat2) = N_Simple_Return_Statement
- and then No (Next (Stat2))));
- end;
- end if;
- end Is_Null_Procedure;
-
---------------------
-- Make_Exit_Label --
---------------------
@@ -3611,11 +3575,11 @@ package body Exp_Ch6 is
-- Start of processing for Expand_Inlined_Call
begin
- -- Check for special case of To_Address call, and if so, just do an
- -- unchecked conversion instead of expanding the call. Not only is this
- -- more efficient, but it also avoids problem with order of elaboration
- -- when address clauses are inlined (address expression elaborated at
- -- wrong point).
+
+ -- For To_Address, just do an unchecked conversion . Not only is this
+ -- efficient, but it also avoids problem with order of elaboration
+ -- when address clauses are inlined (address expression elaborated
+ -- at the wrong point).
if Subp = RTE (RE_To_Address) then
Rewrite (N,
@@ -3623,10 +3587,6 @@ package body Exp_Ch6 is
(RTE (RE_Address),
Relocate_Node (First_Actual (N))));
return;
-
- elsif Is_Null_Procedure then
- Rewrite (N, Make_Null_Statement (Loc));
- return;
end if;
-- Check for an illegal attempt to inline a recursive procedure. If the
@@ -3795,9 +3755,19 @@ package body Exp_Ch6 is
-- its value is captured in a renaming declaration. Otherwise
-- declare a local constant initialized with the actual.
+ -- We also use a renaming declaration for expressions of an array
+ -- type that is not bit-packed, both for efficiency reasons and to
+ -- respect the semantics of the call: in most cases the original
+ -- call will pass the parameter by reference, and thus the inlined
+ -- code will have the same semantics.
+
if Ekind (F) = E_In_Parameter
and then not Is_Limited_Type (Etype (A))
and then not Is_Tagged_Type (Etype (A))
+ and then
+ (not Is_Array_Type (Etype (A))
+ or else not Is_Object_Reference (A)
+ or else Is_Bit_Packed_Array (Etype (A)))
then
Decl :=
Make_Object_Declaration (Loc,
@@ -3847,9 +3817,9 @@ package body Exp_Ch6 is
Set_Is_Internal (Temp);
-- For the unconstrained case, the generated temporary has the
- -- same constrained declaration as the result variable.
- -- It may eventually be possible to remove that temporary and
- -- use the result variable directly.
+ -- same constrained declaration as the result variable. It may
+ -- eventually be possible to remove that temporary and use the
+ -- result variable directly.
if Is_Unc then
Decl :=
@@ -3909,7 +3879,7 @@ package body Exp_Ch6 is
end if;
-- Analyze Blk with In_Inlined_Body set, to avoid spurious errors on
- -- conflicting private views that Gigi would ignore. If this is
+ -- conflicting private views that Gigi would ignore. If this is a
-- predefined unit, analyze with checks off, as is done in the non-
-- inlined run-time units.
@@ -3972,9 +3942,9 @@ package body Exp_Ch6 is
begin
Expand_Call (N);
- -- If the return value of a foreign compiled function is
- -- VAX Float then expand the return (adjusts the location
- -- of the return value on Alpha/VMS, noop everywhere else).
+ -- If the return value of a foreign compiled function is VAX Float, then
+ -- expand the return (adjusts the location of the return value on
+ -- Alpha/VMS, no-op everywhere else).
-- Comes_From_Source intercepts recursive expansion.
if Vax_Float (Etype (N))
@@ -4001,11 +3971,11 @@ package body Exp_Ch6 is
-- Expand_N_Subprogram_Body --
------------------------------
- -- Add poll call if ATC polling is enabled, unless the body will be
- -- inlined by the back-end.
+ -- Add poll call if ATC polling is enabled, unless the body will be inlined
+ -- by the back-end.
-- Add dummy push/pop label nodes at start and end to clear any local
- -- exception indications if local-exception-to-goto optimization active.
+ -- exception indications if local-exception-to-goto optimization is active.
-- Add return statement if last statement in body is not a return statement
-- (this makes things easier on Gigi which does not want to have to handle
@@ -4037,8 +4007,8 @@ package body Exp_Ch6 is
procedure Add_Return (S : List_Id);
-- Append a return statement to the statement sequence S if the last
-- statement is not already a return or a goto statement. Note that
- -- the latter test is not critical, it does not matter if we add a
- -- few extra returns, since they get eliminated anyway later on.
+ -- the latter test is not critical, it does not matter if we add a few
+ -- extra returns, since they get eliminated anyway later on.
----------------
-- Add_Return --
@@ -4084,11 +4054,11 @@ package body Exp_Ch6 is
Rtn : constant Node_Id := Make_Simple_Return_Statement (Loc);
begin
- -- Append return statement, and set analyzed manually. We
- -- can't call Analyze on this return since the scope is wrong.
+ -- Append return statement, and set analyzed manually. We can't
+ -- call Analyze on this return since the scope is wrong.
-- Note: it almost works to push the scope and then do the
- -- analyze call, but something goes wrong in some weird cases
+ -- Analyze call, but something goes wrong in some weird cases
-- and it is not worth worrying about ???
Append_To (S, Rtn);
@@ -4114,9 +4084,9 @@ package body Exp_Ch6 is
-- Start of processing for Expand_N_Subprogram_Body
begin
- -- Set L to either the list of declarations if present, or
- -- to the list of statements if no declarations are present.
- -- This is used to insert new stuff at the start.
+ -- Set L to either the list of declarations if present, or to the list
+ -- of statements if no declarations are present. This is used to insert
+ -- new stuff at the start.
if Is_Non_Empty_List (Declarations (N)) then
L := Declarations (N);
@@ -4174,11 +4144,13 @@ package body Exp_Ch6 is
-- Need poll on entry to subprogram if polling enabled. We only do this
-- for non-empty subprograms, since it does not seem necessary to poll
- -- for a dummy null subprogram. Do not add polling point if calls to
- -- this subprogram will be inlined by the back-end, to avoid repeated
- -- polling points in nested inlinings.
+ -- for a dummy null subprogram.
if Is_Non_Empty_List (L) then
+
+ -- Do not add a polling call if the subprogram is to be inlined by
+ -- the back-end, to avoid repeated calls with multiple inlinings.
+
if Is_Inlined (Spec_Id)
and then Front_End_Inlining
and then Optimization_Level > 1
@@ -4189,18 +4161,18 @@ package body Exp_Ch6 is
end if;
end if;
- -- If this is a Pure function which has any parameters whose root
- -- type is System.Address, reset the Pure indication, since it will
- -- likely cause incorrect code to be generated as the parameter is
- -- probably a pointer, and the fact that the same pointer is passed
- -- does not mean that the same value is being referenced.
+ -- If this is a Pure function which has any parameters whose root type
+ -- is System.Address, reset the Pure indication, since it will likely
+ -- cause incorrect code to be generated as the parameter is probably
+ -- a pointer, and the fact that the same pointer is passed does not mean
+ -- that the same value is being referenced.
-- Note that if the programmer gave an explicit Pure_Function pragma,
-- then we believe the programmer, and leave the subprogram Pure.
- -- This code should probably be at the freeze point, so that it
- -- happens even on a -gnatc (or more importantly -gnatt) compile
- -- so that the semantic tree has Is_Pure set properly ???
+ -- This code should probably be at the freeze point, so that it happens
+ -- even on a -gnatc (or more importantly -gnatt) compile, so that the
+ -- semantic tree has Is_Pure set properly ???
if Is_Pure (Spec_Id)
and then Is_Subprogram (Spec_Id)
@@ -4286,8 +4258,8 @@ package body Exp_Ch6 is
Set_Discriminals (Parent (Base_Type (Scope (Spec_Id))));
end if;
- -- Returns_By_Ref flag is normally set when the subprogram is frozen
- -- but subprograms with no specs are not frozen.
+ -- Returns_By_Ref flag is normally set when the subprogram is frozen but
+ -- subprograms with no specs are not frozen.
declare
Typ : constant Entity_Id := Etype (Spec_Id);
@@ -4308,8 +4280,8 @@ package body Exp_Ch6 is
end if;
end;
- -- For a procedure, we add a return for all possible syntactic ends
- -- of the subprogram.
+ -- For a procedure, we add a return for all possible syntactic ends of
+ -- the subprogram.
if Ekind (Spec_Id) = E_Procedure
or else Ekind (Spec_Id) = E_Generic_Procedure
@@ -4342,13 +4314,13 @@ package body Exp_Ch6 is
-- raise Program_Error;
-- end;
- -- This approach is necessary because the raise must be signalled
- -- to the caller, not handled by any local handler (RM 6.4(11)).
+ -- This approach is necessary because the raise must be signalled to the
+ -- caller, not handled by any local handler (RM 6.4(11)).
- -- Note: we do not need to analyze the constructed sequence here,
- -- since it has no handler, and an attempt to analyze the handled
- -- statement sequence twice is risky in various ways (e.g. the
- -- issue of expanding cleanup actions twice).
+ -- Note: we do not need to analyze the constructed sequence here, since
+ -- it has no handler, and an attempt to analyze the handled statement
+ -- sequence twice is risky in various ways (e.g. the issue of expanding
+ -- cleanup actions twice).
elsif Has_Missing_Return (Spec_Id) then
declare
@@ -4736,22 +4708,6 @@ package body Exp_Ch6 is
end if;
end Is_Build_In_Place_Function_Call;
- ---------------------------------------
- -- Is_Build_In_Place_Function_Return --
- ---------------------------------------
-
- function Is_Build_In_Place_Function_Return (N : Node_Id) return Boolean is
- begin
- if Nkind_In (N, N_Simple_Return_Statement,
- N_Extended_Return_Statement)
- then
- return Is_Build_In_Place_Function
- (Return_Applies_To (Return_Statement_Entity (N)));
- else
- return False;
- end if;
- end Is_Build_In_Place_Function_Return;
-
-----------------------
-- Freeze_Subprogram --
-----------------------
@@ -4911,9 +4867,8 @@ package body Exp_Ch6 is
Register_Predefined_DT_Entry (Subp);
end if;
- Register_Primitive (Loc,
- Prim => Subp,
- Ins_Nod => N);
+ Insert_Actions_After (N,
+ Register_Primitive (Loc, Prim => Subp));
end if;
end if;
end;
@@ -4935,6 +4890,61 @@ package body Exp_Ch6 is
end;
end Freeze_Subprogram;
+ -----------------------
+ -- Is_Null_Procedure --
+ -----------------------
+
+ function Is_Null_Procedure (Subp : Entity_Id) return Boolean is
+ Decl : constant Node_Id := Unit_Declaration_Node (Subp);
+
+ begin
+ if Ekind (Subp) /= E_Procedure then
+ return False;
+
+ -- Check if this is a declared null procedure
+
+ elsif Nkind (Decl) = N_Subprogram_Declaration then
+ if Null_Present (Specification (Decl)) then
+ return True;
+
+ elsif No (Body_To_Inline (Decl)) then
+ return False;
+
+ -- Check if the body contains only a null statement, followed by
+ -- the return statement added during expansion.
+
+ else
+ declare
+ Orig_Bod : constant Node_Id := Body_To_Inline (Decl);
+
+ Stat : Node_Id;
+ Stat2 : Node_Id;
+
+ begin
+ if Nkind (Orig_Bod) /= N_Subprogram_Body then
+ return False;
+ else
+ Stat :=
+ First
+ (Statements (Handled_Statement_Sequence (Orig_Bod)));
+ Stat2 := Next (Stat);
+
+ return
+ Nkind (Stat) = N_Null_Statement
+ and then
+ (No (Stat2)
+ or else
+ (Nkind (Stat2) = N_Simple_Return_Statement
+ and then No (Next (Stat2))));
+ end if;
+ end;
+ end if;
+
+ else
+ return False;
+ end if;
+ end Is_Null_Procedure;
+
-------------------------------------------
-- Make_Build_In_Place_Call_In_Allocator --
-------------------------------------------
@@ -5593,7 +5603,7 @@ package body Exp_Ch6 is
-- in current scope). The Next_Entity links of the two entities also
-- have to be swapped since the entities are part of the return
-- scope's entity list and the list structure would otherwise be
- -- corrupted.
+ -- corrupted. Finally, the homonym chain must be preserved as well.
declare
Renaming_Def_Id : constant Entity_Id :=
@@ -5607,6 +5617,7 @@ package body Exp_Ch6 is
Set_Next_Entity (Renaming_Def_Id, Next_Entity (Obj_Def_Id));
Set_Next_Entity (Obj_Def_Id, Next_Entity_Temp);
+ Set_Homonym (Renaming_Def_Id, Homonym (Obj_Def_Id));
Exchange_Entities (Renaming_Def_Id, Obj_Def_Id);
end;
diff --git a/gcc/ada/exp_ch6.ads b/gcc/ada/exp_ch6.ads
index c470ee329ab..242995f490d 100644
--- a/gcc/ada/exp_ch6.ads
+++ b/gcc/ada/exp_ch6.ads
@@ -112,11 +112,6 @@ package Exp_Ch6 is
-- that requires handling as a build-in-place call or is a qualified
-- expression applied to such a call; otherwise returns False.
- function Is_Build_In_Place_Function_Return (N : Node_Id) return Boolean;
- -- Ada 2005 (AI-318-02): Returns True if N is an N_Simple_Return_Statement
- -- or N_Extended_Return_Statement and it applies to a build-in-place
- -- function or generic function.
-
procedure Make_Build_In_Place_Call_In_Allocator
(Allocator : Node_Id;
Function_Call : Node_Id);
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index c44c17f3e30..ea05b24b264 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -87,11 +87,11 @@ package body Exp_Ch7 is
-- (See Wrap_Transient_Expression for details)
-- 3. In a expression of an object_declaration. No wrapping is possible
- -- here, so the finalization actions, if any are done right after the
+ -- here, so the finalization actions, if any, are done right after the
-- declaration and the secondary stack deallocation is done in the
-- proper enclosing scope (see Wrap_Transient_Declaration for details)
- -- Note about functions returning tagged types: It has been decided to
+ -- Note about functions returning tagged types: it has been decided to
-- always allocate their result in the secondary stack, even though is not
-- absolutely mandatory when the tagged type is constrained because the
-- caller knows the size of the returned object and thus could allocate the
@@ -124,10 +124,9 @@ package body Exp_Ch7 is
--------------------------------------------------
function Find_Node_To_Be_Wrapped (N : Node_Id) return Node_Id;
- -- N is a node which may generate a transient scope. Loop over the
- -- parent pointers of N until it find the appropriate node to
- -- wrap. It it returns Empty, it means that no transient scope is
- -- needed in this context.
+ -- N is a node which may generate a transient scope. Loop over the parent
+ -- pointers of N until it find the appropriate node to wrap. If it returns
+ -- Empty, it means that no transient scope is needed in this context.
function Make_Clean
(N : Node_Id;
@@ -158,14 +157,14 @@ package body Exp_Ch7 is
procedure Insert_Actions_In_Scope_Around (N : Node_Id);
-- Insert the before-actions kept in the scope stack before N, and the
- -- after after-actions, after N which must be a member of a list.
+ -- after-actions after N, which must be a member of a list.
function Make_Transient_Block
(Loc : Source_Ptr;
Action : Node_Id) return Node_Id;
- -- Create a transient block whose name is Scope, which is also a
- -- controlled block if Flist is not empty and whose only code is
- -- Action (either a single statement or single declaration).
+ -- Create a transient block whose name is Scope, which is also a controlled
+ -- block if Flist is not empty and whose only code is Action (either a
+ -- single statement or single declaration).
type Final_Primitives is (Initialize_Case, Adjust_Case, Finalize_Case);
-- This enumeration type is defined in order to ease sharing code for
@@ -193,26 +192,24 @@ package body Exp_Ch7 is
(Prim : Final_Primitives;
Typ : Entity_Id;
Stmts : List_Id) return Node_Id;
- -- This function generates the tree for Deep_Initialize, Deep_Adjust
- -- or Deep_Finalize procedures according to the first parameter,
- -- these procedures operate on the type Typ. The Stmts parameter
- -- gives the body of the procedure.
+ -- This function generates the tree for Deep_Initialize, Deep_Adjust or
+ -- Deep_Finalize procedures according to the first parameter, these
+ -- procedures operate on the type Typ. The Stmts parameter gives the body
+ -- of the procedure.
function Make_Deep_Array_Body
(Prim : Final_Primitives;
Typ : Entity_Id) return List_Id;
-- This function generates the list of statements for implementing
- -- Deep_Initialize, Deep_Adjust or Deep_Finalize procedures
- -- according to the first parameter, these procedures operate on the
- -- array type Typ.
+ -- Deep_Initialize, Deep_Adjust or Deep_Finalize procedures according to
+ -- the first parameter, these procedures operate on the array type Typ.
function Make_Deep_Record_Body
(Prim : Final_Primitives;
Typ : Entity_Id) return List_Id;
-- This function generates the list of statements for implementing
- -- Deep_Initialize, Deep_Adjust or Deep_Finalize procedures
- -- according to the first parameter, these procedures operate on the
- -- record type Typ.
+ -- Deep_Initialize, Deep_Adjust or Deep_Finalize procedures according to
+ -- the first parameter, these procedures operate on the record type Typ.
procedure Check_Visibly_Controlled
(Prim : Final_Primitives;
@@ -1371,47 +1368,38 @@ package body Exp_Ch7 is
end if;
-- Resolution is now finished, make sure we don't start analysis again
- -- because of the duplication
+ -- because of the duplication.
Set_Analyzed (N);
Ref := Duplicate_Subexpr_No_Checks (N);
- -- Now we can generate the Attach Call, note that this value is
- -- always in the (secondary) stack and thus is attached to a singly
- -- linked final list:
+ -- Now we can generate the Attach Call. Note that this value is always
+ -- on the (secondary) stack and thus is attached to a singly linked
+ -- final list:
-- Resx := F (X)'reference;
-- Attach_To_Final_List (_Lx, Resx.all, 1);
- -- or when there are controlled components
+ -- or when there are controlled components:
-- Attach_To_Final_List (_Lx, Resx._controller, 1);
- -- or when it is both is_controlled and has_controlled_components
+ -- or when it is both Is_Controlled and Has_Controlled_Components:
-- Attach_To_Final_List (_Lx, Resx._controller, 1);
-- Attach_To_Final_List (_Lx, Resx, 1);
- -- or if it is an array with is_controlled (and has_controlled)
+ -- or if it is an array with Is_Controlled (and Has_Controlled)
-- Attach_To_Final_List (_Lx, Resx (Resx'last), 3);
- -- An attach level of 3 means that a whole array is to be
- -- attached to the finalization list (including the controlled
- -- components)
- -- or if it is an array with has_controlled components but not
- -- is_controlled
+ -- An attach level of 3 means that a whole array is to be attached to
+ -- the finalization list (including the controlled components).
- -- Attach_To_Final_List (_Lx, Resx (Resx'last)._controller, 3);
-
- -- If the context is an aggregate, the call will be expanded into an
- -- assignment, and the attachment will be done when the aggregate
- -- expansion is complete. See body of Exp_Aggr for the treatment of
- -- other controlled components.
+ -- or if it is an array with Has_Controlled_Components but not
+ -- Is_Controlled:
- if Nkind (Parent (N)) = N_Aggregate then
- return;
- end if;
+ -- Attach_To_Final_List (_Lx, Resx (Resx'last)._controller, 3);
-- Case where type has controlled components
@@ -1424,10 +1412,10 @@ package body Exp_Ch7 is
if Is_Array_Type (T2) then
Len_Ref :=
Make_Attribute_Reference (Loc,
- Prefix =>
- Duplicate_Subexpr_Move_Checks
- (Unchecked_Convert_To (T2, Ref)),
- Attribute_Name => Name_Length);
+ Prefix =>
+ Duplicate_Subexpr_Move_Checks
+ (Unchecked_Convert_To (T2, Ref)),
+ Attribute_Name => Name_Length);
end if;
while Is_Array_Type (T2) loop
@@ -1461,8 +1449,8 @@ package body Exp_Ch7 is
end if;
end;
- -- Here we know that 'Ref' has a controller so we may as well
- -- attach it directly
+ -- Here we know that 'Ref' has a controller so we may as well attach
+ -- it directly.
Action :=
Make_Attach_Call (
@@ -1480,12 +1468,12 @@ package body Exp_Ch7 is
With_Attach => Make_Integer_Literal (Loc, Attach_Level));
end if;
- -- Here, we have a controlled type that does not seem to have
- -- controlled components but it could be a class wide type whose
- -- further derivations have controlled components. So we don't know
- -- if the object itself needs to be attached or if it has a record
- -- controller. We need to call a runtime function (Deep_Tag_Attach)
- -- which knows what to do thanks to the RC_Offset in the dispatch table.
+ -- Here, we have a controlled type that does not seem to have controlled
+ -- components but it could be a class wide type whose further
+ -- derivations have controlled components. So we don't know if the
+ -- object itself needs to be attached or if it has a record controller.
+ -- We need to call a runtime function (Deep_Tag_Attach) which knows what
+ -- to do thanks to the RC_Offset in the dispatch table.
else
Action :=
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 1a91bf1b0a3..d09911a680b 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -1132,8 +1132,9 @@ package body Exp_Ch9 is
-- for Lnn in Family_Low .. Family_High loop
-- Inn := Inn + 1;
-- Set_Entry_Name
- -- (_init._object, Inn, new String ("<Entry name> " & Lnn'Img));
- -- _init._task_id
+ -- (_init._object <or> _init._task_id,
+ -- Inn,
+ -- new String ("<Entry name>(" & Lnn'Img & ")"));
-- end loop;
-- Note that the bounds of the range may reference discriminants. The
-- above construct is added directly to the statements of the block.
@@ -1141,8 +1142,10 @@ package body Exp_Ch9 is
procedure Build_Entry_Name (Id : Entity_Id);
-- Generate:
-- Inn := Inn + 1;
- -- Set_Entry_Name (_init._task_id, Inn, new String ("<Entry name>");
- -- _init._object
+ -- Set_Entry_Name
+ -- (_init._object <or>_init._task_id,
+ -- Inn,
+ -- new String ("<Entry name>");
-- The above construct is added directly to the statements of the block.
function Build_Set_Entry_Name_Call (Arg3 : Node_Id) return Node_Id;
@@ -1213,13 +1216,12 @@ package body Exp_Ch9 is
begin
Get_Name_String (Chars (Id));
- if Is_Enumeration_Type (Etype (Def)) then
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := ' ';
- end if;
+ -- Add a leading '('
+
+ Add_Char_To_Name_Buffer ('(');
-- Generate:
- -- new String'("<Entry name>" & Lnn'Img);
+ -- new String'("<Entry name>(" & Lnn'Img & ")");
-- This is an implicit heap allocation, and Comes_From_Source is
-- False, which ensures that it will get flagged as a violation of
@@ -1233,13 +1235,18 @@ package body Exp_Ch9 is
Expression =>
Make_Op_Concat (Loc,
Left_Opnd =>
- Make_String_Literal (Loc,
- String_From_Name_Buffer),
+ Make_Op_Concat (Loc,
+ Left_Opnd =>
+ Make_String_Literal (Loc,
+ Strval => String_From_Name_Buffer),
+ Right_Opnd =>
+ Make_Attribute_Reference (Loc,
+ Prefix =>
+ New_Reference_To (L_Id, Loc),
+ Attribute_Name => Name_Img)),
Right_Opnd =>
- Make_Attribute_Reference (Loc,
- Prefix =>
- New_Reference_To (L_Id, Loc),
- Attribute_Name => Name_Img))));
+ Make_String_Literal (Loc,
+ Strval => ")"))));
Increment_Index (L_Stmts);
Append_To (L_Stmts, Build_Set_Entry_Name_Call (Val));
@@ -1247,7 +1254,8 @@ package body Exp_Ch9 is
-- Generate:
-- for Lnn in Family_Low .. Family_High loop
-- Inn := Inn + 1;
- -- Set_Entry_Name (_init._task_id, Inn, <Val>);
+ -- Set_Entry_Name
+ -- (_init._object <or> _init._task_id, Inn, <Val>);
-- end loop;
Append_To (B_Stmts,
@@ -3167,13 +3175,9 @@ package body Exp_Ch9 is
Name_Len := Name_Len - 1;
end if;
- Name_Buffer (Name_Len + 1) := '_';
- Name_Buffer (Name_Len + 2) := '_';
-
- Name_Len := Name_Len + 2;
+ Add_Str_To_Name_Buffer ("__");
for J in 1 .. Select_Len loop
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := Select_Buffer (J);
+ Add_Char_To_Name_Buffer (Select_Buffer (J));
end loop;
-- Now add the Append_Char if specified. The encoding to follow
@@ -3186,13 +3190,10 @@ package body Exp_Ch9 is
if Append_Char /= ' ' then
if Append_Char = 'P' or Append_Char = 'N' then
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := Append_Char;
+ Add_Char_To_Name_Buffer (Append_Char);
return Name_Find;
else
- Name_Buffer (Name_Len + 1) := '_';
- Name_Buffer (Name_Len + 2) := Append_Char;
- Name_Len := Name_Len + 2;
+ Add_Str_To_Name_Buffer ((1 => '_', 2 => Append_Char));
return New_External_Name (Name_Find, ' ', -1);
end if;
else
@@ -7461,10 +7462,27 @@ package body Exp_Ch9 is
E_Count : Int;
Object_Comp : Node_Id;
+ procedure Check_Inlining (Subp : Entity_Id);
+ -- If the original operation has a pragma Inline, propagate the flag
+ -- to the internal body, for possible inlining later on. The source
+ -- operation is invisible to the back-end and is never actually called.
+
procedure Register_Handler;
-- For a protected operation that is an interrupt handler, add the
-- freeze action that will register it as such.
+ --------------------
+ -- Check_Inlining --
+ --------------------
+
+ procedure Check_Inlining (Subp : Entity_Id) is
+ begin
+ if Is_Inlined (Subp) then
+ Set_Is_Inlined (Protected_Body_Subprogram (Subp));
+ Set_Is_Inlined (Subp, False);
+ end if;
+ end Check_Inlining;
+
----------------------
-- Register_Handler --
----------------------
@@ -7713,7 +7731,7 @@ package body Exp_Ch9 is
Set_Protected_Body_Subprogram
(Defining_Unit_Name (Specification (Priv)),
Defining_Unit_Name (Specification (Sub)));
-
+ Check_Inlining (Defining_Unit_Name (Specification (Priv)));
Current_Node := Sub;
Sub :=
@@ -7800,6 +7818,7 @@ package body Exp_Ch9 is
Set_Protected_Body_Subprogram
(Defining_Unit_Name (Specification (Comp)),
Defining_Unit_Name (Specification (Sub)));
+ Check_Inlining (Defining_Unit_Name (Specification (Comp)));
-- Make the protected version of the subprogram available for
-- expansion of external calls.
diff --git a/gcc/ada/exp_code.adb b/gcc/ada/exp_code.adb
index e42bd6aa9dc..2b0275268cf 100644
--- a/gcc/ada/exp_code.adb
+++ b/gcc/ada/exp_code.adb
@@ -220,8 +220,7 @@ package body Exp_Code is
Name_Len := 0;
loop
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := C;
+ Add_Char_To_Name_Buffer (C);
Clobber_Ptr := Clobber_Ptr + 1;
exit when Clobber_Ptr > Len;
C := Get_Character (Get_String_Char (Str, Clobber_Ptr));
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index 72131c4f68b..d0903200a59 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -164,14 +164,29 @@ package body Exp_Disp is
-- Handle full type declarations and derivations of library
-- level tagged types
- elsif (Nkind (D) = N_Full_Type_Declaration
- or else Nkind (D) = N_Derived_Type_Definition)
+ elsif Nkind_In (D, N_Full_Type_Declaration,
+ N_Derived_Type_Definition)
and then Is_Library_Level_Tagged_Type (Defining_Entity (D))
and then Ekind (Defining_Entity (D)) /= E_Record_Subtype
and then not Is_Private_Type (Defining_Entity (D))
then
- Insert_List_After_And_Analyze (Last (Target_List),
- Make_DT (Defining_Entity (D)));
+ -- We do not generate dispatch tables for the internal type
+ -- created for a type extension with unknown discriminants
+ -- The needed information is shared with the source type,
+ -- See Expand_N_Record_Extension.
+
+ if not Comes_From_Source (Defining_Entity (D))
+ and then
+ Has_Unknown_Discriminants (Etype (Defining_Entity (D)))
+ and then
+ not Comes_From_Source (First_Subtype (Defining_Entity (D)))
+ then
+ null;
+
+ else
+ Insert_List_After_And_Analyze (Last (Target_List),
+ Make_DT (Defining_Entity (D)));
+ end if;
-- Handle private types of library level tagged types. We must
-- exchange the private and full-view to ensure the correct
@@ -6273,17 +6288,16 @@ package body Exp_Disp is
-- Register_Primitive --
------------------------
- procedure Register_Primitive
+ function Register_Primitive
(Loc : Source_Ptr;
- Prim : Entity_Id;
- Ins_Nod : Node_Id)
+ Prim : Entity_Id) return List_Id
is
DT_Ptr : Entity_Id;
Iface_Prim : Entity_Id;
Iface_Typ : Entity_Id;
Iface_DT_Ptr : Entity_Id;
Iface_DT_Elmt : Elmt_Id;
- L : List_Id;
+ L : constant List_Id := New_List;
Pos : Uint;
Tag : Entity_Id;
Tag_Typ : Entity_Id;
@@ -6294,7 +6308,7 @@ package body Exp_Disp is
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
if not RTE_Available (RE_Tag) then
- return;
+ return L;
end if;
if not Present (Interface_Alias (Prim)) then
@@ -6308,7 +6322,7 @@ package body Exp_Disp is
DT_Ptr :=
Node (Next_Elmt (First_Elmt (Access_Disp_Table (Tag_Typ))));
- Insert_After (Ins_Nod,
+ Append_To (L,
Build_Set_Predefined_Prim_Op_Address (Loc,
Tag_Node => New_Reference_To (DT_Ptr, Loc),
Position => Pos,
@@ -6324,7 +6338,7 @@ package body Exp_Disp is
and then RTE_Record_Component_Available (RE_Size_Func)
then
DT_Ptr := Node (First_Elmt (Access_Disp_Table (Tag_Typ)));
- Insert_After (Ins_Nod,
+ Append_To (L,
Build_Set_Size_Function (Loc,
Tag_Node => New_Reference_To (DT_Ptr, Loc),
Size_Func => Prim));
@@ -6334,7 +6348,7 @@ package body Exp_Disp is
pragma Assert (Pos /= Uint_0 and then Pos <= DT_Entry_Count (Tag));
DT_Ptr := Node (First_Elmt (Access_Disp_Table (Tag_Typ)));
- Insert_After (Ins_Nod,
+ Append_To (L,
Build_Set_Prim_Op_Address (Loc,
Typ => Tag_Typ,
Tag_Node => New_Reference_To (DT_Ptr, Loc),
@@ -6363,12 +6377,6 @@ package body Exp_Disp is
if not Is_Ancestor (Iface_Typ, Tag_Typ)
and then Present (Thunk_Code)
then
- -- Comment needed on why checks are suppressed. This is not just
- -- efficiency, but fundamental functionality (see 1.295 RH, which
- -- still does not answer this question) ???
-
- Insert_Action (Ins_Nod, Thunk_Code, Suppress => All_Checks);
-
-- Generate the code necessary to fill the appropriate entry of
-- the secondary dispatch table of Prim's controlling type with
-- Thunk_Id's address.
@@ -6380,7 +6388,8 @@ package body Exp_Disp is
Iface_Prim := Interface_Alias (Prim);
Pos := DT_Position (Iface_Prim);
Tag := First_Tag_Component (Iface_Typ);
- L := New_List;
+
+ Prepend_To (L, Thunk_Code);
if Is_Predefined_Dispatching_Operation (Prim)
or else Is_Predefined_Dispatching_Alias (Prim)
@@ -6412,8 +6421,6 @@ package body Exp_Disp is
Prefix => New_Reference_To (Alias (Prim), Loc),
Attribute_Name => Name_Unrestricted_Access))));
- Insert_Actions_After (Ins_Nod, L);
-
else
pragma Assert (Pos /= Uint_0
and then Pos <= DT_Entry_Count (Tag));
@@ -6445,10 +6452,11 @@ package body Exp_Disp is
Prefix => New_Reference_To (Alias (Prim), Loc),
Attribute_Name => Name_Unrestricted_Access))));
- Insert_Actions_After (Ins_Nod, L);
end if;
end if;
end if;
+
+ return L;
end Register_Primitive;
-------------------------
diff --git a/gcc/ada/exp_disp.ads b/gcc/ada/exp_disp.ads
index abdc949855e..ed866695246 100644
--- a/gcc/ada/exp_disp.ads
+++ b/gcc/ada/exp_disp.ads
@@ -306,19 +306,22 @@ package Exp_Disp is
-- tagged types this routine imports the forward declaration of the tag
-- entity, that will be declared and exported by Make_DT.
- procedure Register_Primitive
+ function Register_Primitive
(Loc : Source_Ptr;
- Prim : Entity_Id;
- Ins_Nod : Node_Id);
- -- Register Prim in the corresponding primary or secondary dispatch table.
+ Prim : Entity_Id) return List_Id;
+ -- Build code to register Prim in the primary or secondary dispatch table.
-- If Prim is associated with a secondary dispatch table then generate also
-- its thunk and register it in the associated secondary dispatch table.
-- In general the dispatch tables are always generated by Make_DT and
-- Make_Secondary_DT; this routine is only used in two corner cases:
+ --
-- 1) To construct the dispatch table of a tagged type whose parent
-- is a CPP_Class (see Build_Init_Procedure).
-- 2) To handle late overriding of dispatching operations (see
- -- Check_Dispatching_Operation).
+ -- Check_Dispatching_Operation and Make_DT).
+ --
+ -- The caller is responsible for inserting the generated code in the
+ -- proper place.
procedure Set_All_DT_Position (Typ : Entity_Id);
-- Set the DT_Position field for each primitive operation. In the CPP
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
index 0fc6288604f..04a2187c8ce 100644
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -3645,9 +3645,7 @@ package body Exp_Dist is
(Vis_Decl : Node_Id;
RAS_Type : Entity_Id)
is
- pragma Warnings (Off);
pragma Unreferenced (RAS_Type);
- pragma Warnings (On);
begin
Add_RAS_Access_TSS (Vis_Decl);
end Add_RAST_Features;
@@ -4111,10 +4109,8 @@ package body Exp_Dist is
-- List of statements for extra formal parameters. It will appear
-- after the regular statements for writing out parameters.
- pragma Warnings (Off);
pragma Unreferenced (RACW_Type);
-- Used only for the PolyORB case
- pragma Warnings (On);
begin
-- The general form of a calling stub for a given subprogram is:
@@ -5601,9 +5597,7 @@ package body Exp_Dist is
RPC_Receiver_Decl : Node_Id;
Body_Decls : List_Id)
is
- pragma Warnings (Off);
pragma Unreferenced (RPC_Receiver_Decl);
- pragma Warnings (On);
begin
Add_RACW_From_Any
@@ -5730,9 +5724,8 @@ package body Exp_Dist is
Stub_Type_Access : Entity_Id;
Body_Decls : List_Id)
is
- pragma Warnings (Off);
pragma Unreferenced (Stub_Type, Stub_Type_Access);
- pragma Warnings (On);
+
Loc : constant Source_Ptr := Sloc (RACW_Type);
Proc_Decl : Node_Id;
@@ -6047,9 +6040,7 @@ package body Exp_Dist is
Stub_Type_Access : Entity_Id;
Body_Decls : List_Id)
is
- pragma Warnings (Off);
pragma Unreferenced (Stub_Type, Stub_Type_Access);
- pragma Warnings (On);
Loc : constant Source_Ptr := Sloc (RACW_Type);
@@ -7157,13 +7148,37 @@ package body Exp_Dist is
is
Loc : constant Source_Ptr := Sloc (Nod);
+ Request : constant Entity_Id :=
+ Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
+ -- The request object constructed by these stubs
+ -- Could we use Name_R instead??? (see GLADE client stubs)
+
+ function Make_Request_RTE_Call
+ (RE : RE_Id;
+ Actuals : List_Id := New_List) return Node_Id;
+ -- Generate a procedure call statement calling RE with the given
+ -- actuals. Request is appended to the list.
+
+ ---------------------------
+ -- Make_Request_RTE_Call --
+ ---------------------------
+
+ function Make_Request_RTE_Call
+ (RE : RE_Id;
+ Actuals : List_Id := New_List) return Node_Id
+ is
+ begin
+ Append_To (Actuals, New_Occurrence_Of (Request, Loc));
+ return Make_Procedure_Call_Statement (Loc,
+ Name =>
+ New_Occurrence_Of (RTE (RE), Loc),
+ Parameter_Associations => Actuals);
+ end Make_Request_RTE_Call;
+
Arguments : Node_Id;
-- Name of the named values list used to transmit parameters
-- to the remote package
- Request : Node_Id;
- -- The request object constructed by these stubs
-
Result : Node_Id;
-- Name of the result named value (in non-APC cases) which get the
-- result of the remote subprogram.
@@ -7194,8 +7209,8 @@ package body Exp_Dist is
-- after the regular statements for writing out parameters.
After_Statements : constant List_Id := New_List;
- -- Statements to be executed after call returns (to assign
- -- in out or out parameter values).
+ -- Statements to be executed after call returns (to assign IN OUT or
+ -- OUT parameter values).
Etyp : Entity_Id;
-- The type of the formal parameter being processed
@@ -7209,7 +7224,6 @@ package body Exp_Dist is
begin
-- ??? document general form of stub subprograms for the PolyORB case
- Request := Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
Append_To (Decls,
Make_Object_Declaration (Loc,
@@ -7449,19 +7463,13 @@ package body Exp_Dist is
Append_List_To (Statements, Extra_Formal_Statements);
Append_To (Statements,
- Make_Procedure_Call_Statement (Loc,
- Name =>
- New_Occurrence_Of (RTE (RE_Request_Create), Loc),
-
- Parameter_Associations => New_List (
- Target_Object,
- Subprogram_Id,
- New_Occurrence_Of (Arguments, Loc),
- New_Occurrence_Of (Result, Loc),
- New_Occurrence_Of (RTE (RE_Nil_Exc_List), Loc))));
-
- Append_To (Parameter_Associations (Last (Statements)),
- New_Occurrence_Of (Request, Loc));
+ Make_Request_RTE_Call (RE_Request_Create, New_List (
+ Target_Object,
+ Subprogram_Id,
+ New_Occurrence_Of (Arguments, Loc),
+ New_Occurrence_Of (Result, Loc),
+ New_Occurrence_Of
+ (RTE (RE_Nil_Exc_List), Loc))));
pragma Assert
(not (Is_Known_Non_Asynchronous and Is_Known_Asynchronous));
@@ -7487,22 +7495,22 @@ package body Exp_Dist is
RTE (RE_Asynchronous_P_To_Sync_Scope), Loc),
Expressions => New_List (Asynchronous_P)));
- Append_To (Statements,
- Make_Procedure_Call_Statement (Loc,
- Name =>
- New_Occurrence_Of (RTE (RE_Request_Invoke), Loc),
- Parameter_Associations => New_List (
- New_Occurrence_Of (Request, Loc))));
+ Append_To (Statements, Make_Request_RTE_Call (RE_Request_Invoke));
- Non_Asynchronous_Statements := New_List (Make_Null_Statement (Loc));
- Asynchronous_Statements := New_List (Make_Null_Statement (Loc));
+ -- Asynchronous case
- if not Is_Known_Asynchronous then
+ if not Is_Known_Non_Asynchronous then
+ Asynchronous_Statements :=
+ New_List (Make_Request_RTE_Call (RE_Request_Destroy));
+ end if;
+
+ -- Non-asynchronous case
+ if not Is_Known_Asynchronous then
-- Reraise an exception occurrence from the completed request.
-- If the exception occurrence is empty, this is a no-op.
- Append_To (Non_Asynchronous_Statements,
+ Non_Asynchronous_Statements := New_List (
Make_Procedure_Call_Statement (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Request_Raise_Occurrence), Loc),
@@ -7511,6 +7519,9 @@ package body Exp_Dist is
if Is_Function then
+ Append_To (Non_Asynchronous_Statements,
+ Make_Request_RTE_Call (RE_Request_Destroy));
+
-- If this is a function call, read the value and return it
Append_To (Non_Asynchronous_Statements,
@@ -7522,11 +7533,18 @@ package body Exp_Dist is
Prefix => Result,
Selector_Name => Name_Argument),
Decls))));
+
+ else
+
+ -- Case of a procedure: deal with IN OUT and OUT formals
+
+ Append_List_To (Non_Asynchronous_Statements, After_Statements);
+
+ Append_To (Non_Asynchronous_Statements,
+ Make_Request_RTE_Call (RE_Request_Destroy));
end if;
end if;
- Append_List_To (Non_Asynchronous_Statements, After_Statements);
-
if Is_Known_Asynchronous then
Append_List_To (Statements, Asynchronous_Statements);
@@ -7602,9 +7620,8 @@ package body Exp_Dist is
RPC_Receiver_Decl : out Node_Id)
is
Loc : constant Source_Ptr := Sloc (Stub_Type);
- pragma Warnings (Off);
+
pragma Unreferenced (RACW_Type);
- pragma Warnings (On);
begin
Stub_Type_Decl :=
@@ -7667,9 +7684,9 @@ package body Exp_Dist is
Request := Make_Defining_Identifier (Loc, Name_R);
RPC_Receiver_Spec :=
- Build_RPC_Receiver_Specification (
- RPC_Receiver => RPC_Receiver,
- Request_Parameter => Request);
+ Build_RPC_Receiver_Specification
+ (RPC_Receiver => RPC_Receiver,
+ Request_Parameter => Request);
Subp_Id := Make_Defining_Identifier (Loc, Name_P);
Subp_Index := Make_Defining_Identifier (Loc, Name_I);
@@ -8461,8 +8478,17 @@ package body Exp_Dist is
else
declare
Decl : Entity_Id;
+ Typ : Entity_Id := U_Type;
+
begin
- Build_From_Any_Function (Loc, U_Type, Decl, Fnam);
+ -- For the subtype representing a generic actual type, go
+ -- to the base type.
+
+ if Is_Generic_Actual_Type (Typ) then
+ Typ := Base_Type (Typ);
+ end if;
+
+ Build_From_Any_Function (Loc, Typ, Decl, Fnam);
Append_To (Decls, Decl);
end;
end if;
@@ -8528,7 +8554,7 @@ package body Exp_Dist is
Parameter_Type => New_Occurrence_Of (RTE (RE_Any), Loc))),
Result_Definition => New_Occurrence_Of (Typ, Loc));
- -- The following is taken care of by Exp_Dist.Add_RACW_From_Any
+ -- The RACW case is taken care of by Exp_Dist.Add_RACW_From_Any
pragma Assert
(not (Is_Remote_Access_To_Class_Wide_Type (Typ)));
@@ -8565,11 +8591,10 @@ package body Exp_Dist is
Append_To (Stms,
Make_Simple_Return_Statement (Loc,
Expression =>
- OK_Convert_To (Typ,
- Build_From_Any_Call
- (Etype (Typ),
- New_Occurrence_Of (Any_Parameter, Loc),
- Decls))));
+ Build_From_Any_Call
+ (Etype (Typ),
+ New_Occurrence_Of (Any_Parameter, Loc),
+ Decls)));
else
declare
@@ -9859,9 +9884,7 @@ package body Exp_Dist is
Counter : Entity_Id;
Datum : Node_Id)
is
- pragma Warnings (Off);
pragma Unreferenced (Counter);
- pragma Warnings (On);
Element_Any : Node_Id;
@@ -10352,9 +10375,7 @@ package body Exp_Dist is
Rec : Entity_Id;
Field : Node_Id)
is
- pragma Warnings (Off);
pragma Unreferenced (Any, Counter, Rec);
- pragma Warnings (On);
begin
if Nkind (Field) = N_Defining_Identifier then
diff --git a/gcc/ada/exp_fixd.adb b/gcc/ada/exp_fixd.adb
index afac7b0b298..fa878c2bf78 100644
--- a/gcc/ada/exp_fixd.adb
+++ b/gcc/ada/exp_fixd.adb
@@ -1701,13 +1701,15 @@ package body Exp_Fixd is
Set_Result (N, Expr, Rng_Check, Trunc => True);
-- Normal case where multiply is required
+ -- Rounding is truncating for decimal fixed point types only,
+ -- see RM 4.6(29).
else
Set_Result (N,
Build_Multiply (N,
Fpt_Value (Expr),
Real_Literal (N, Ureal_1 / Small)),
- Rng_Check, Trunc => True);
+ Rng_Check, Trunc => Is_Decimal_Fixed_Point_Type (Result_Type));
end if;
end Expand_Convert_Float_To_Fixed;
diff --git a/gcc/ada/exp_imgv.adb b/gcc/ada/exp_imgv.adb
index ed53ca0c111..cf4a9c02a80 100644
--- a/gcc/ada/exp_imgv.adb
+++ b/gcc/ada/exp_imgv.adb
@@ -1158,9 +1158,8 @@ package body Exp_Imgv is
-- as is done with other ZFP violations.
declare
- pragma Warnings (Off); -- since Discard is unreferenced
Discard : constant Entity_Id := RTE (RE_Null);
- pragma Warnings (On);
+ pragma Unreferenced (Discard);
begin
return;
end;
diff --git a/gcc/ada/fmap.adb b/gcc/ada/fmap.adb
index 6770ee96ecb..0d5061dd18d 100644
--- a/gcc/ada/fmap.adb
+++ b/gcc/ada/fmap.adb
@@ -321,9 +321,10 @@ package body Fmap is
if (Last < First + 2) or else (SP (Last - 1) /= '%')
or else (SP (Last) /= 's' and then SP (Last) /= 'b')
then
- Write_Str ("warning: mapping file """);
- Write_Str (File_Name);
- Write_Line (""" is incorrectly formatted");
+ Write_Line
+ ("warning: mapping file """ & File_Name &
+ """ is incorrectly formatted");
+ Write_Line ("Line = """ & SP (First .. Last) & '"');
Empty_Tables;
return;
end if;
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 31b41d51470..31e32af0455 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -2483,36 +2483,17 @@ package body Freeze is
Error_Msg_Qual_Level := 0;
end if;
- -- Ada 2005 (AI-326): Check wrong use of tag incomplete
- -- types with unknown discriminants. For example:
-
- -- type T (<>) is tagged;
- -- procedure P (X : access T); -- ERROR
- -- procedure P (X : T); -- ERROR
-
if not From_With_Type (F_Type) then
if Is_Access_Type (F_Type) then
F_Type := Designated_Type (F_Type);
end if;
- if Ekind (F_Type) = E_Incomplete_Type
- and then Is_Tagged_Type (F_Type)
- and then not Is_Class_Wide_Type (F_Type)
- and then No (Full_View (F_Type))
- and then Unknown_Discriminants_Present
- (Parent (F_Type))
- and then No (Stored_Constraint (F_Type))
- then
- Error_Msg_N
- ("(Ada 2005): invalid use of unconstrained tagged"
- & " incomplete type", E);
-
-- If the formal is an anonymous_access_to_subprogram
-- freeze the subprogram type as well, to prevent
-- scope anomalies in gigi, because there is no other
-- clear point at which it could be frozen.
- elsif Is_Itype (Etype (Formal))
+ if Is_Itype (Etype (Formal))
and then Ekind (F_Type) = E_Subprogram_Type
then
Freeze_And_Append (F_Type, Loc, Result);
@@ -2522,7 +2503,7 @@ package body Freeze is
Next_Formal (Formal);
end loop;
- -- Case of function
+ -- Case of function: similar checks on return type.
if Ekind (E) = E_Function then
@@ -2594,36 +2575,17 @@ package body Freeze is
end if;
end if;
- if Is_Array_Type (Etype (E))
- and then not Is_Constrained (Etype (E))
+ if Is_Array_Type (R_Type)
+ and then not Is_Constrained (R_Type)
and then not Is_Imported (E)
and then Has_Foreign_Convention (E)
and then Warn_On_Export_Import
and then not Has_Warnings_Off (E)
- and then not Has_Warnings_Off (Etype (E))
+ and then not Has_Warnings_Off (R_Type)
then
Error_Msg_N
("?foreign convention function& should not " &
"return unconstrained array!", E);
-
- -- Ada 2005 (AI-326): Check wrong use of tagged
- -- incomplete type
-
- -- type T is tagged;
- -- function F (X : Boolean) return T; -- ERROR
-
- -- The type must be declared in the current scope for the
- -- use to be legal, and the full view must be available
- -- when the construct that mentions it is frozen.
-
- elsif Ekind (Etype (E)) = E_Incomplete_Type
- and then Is_Tagged_Type (Etype (E))
- and then No (Full_View (Etype (E)))
- and then not Is_Value_Type (Etype (E))
- then
- Error_Msg_N
- ("(Ada 2005): invalid use of tagged incomplete type",
- E);
end if;
end if;
end;
@@ -3510,62 +3472,36 @@ package body Freeze is
-- For access subprogram, freeze types of all formals, the return
-- type was already frozen, since it is the Etype of the function.
+ -- Formal types can be tagged Taft amendment types, but otherwise
+ -- they cannot be incomplete.
elsif Ekind (E) = E_Subprogram_Type then
Formal := First_Formal (E);
+
while Present (Formal) loop
+ if Ekind (Etype (Formal)) = E_Incomplete_Type
+ and then No (Full_View (Etype (Formal)))
+ and then not Is_Value_Type (Etype (Formal))
+ then
+ if Is_Tagged_Type (Etype (Formal)) then
+ null;
+ else
+ Error_Msg_NE
+ ("invalid use of incomplete type&", E, Etype (Formal));
+ end if;
+ end if;
+
Freeze_And_Append (Etype (Formal), Loc, Result);
Next_Formal (Formal);
end loop;
Freeze_Subprogram (E);
- -- Ada 2005 (AI-326): Check wrong use of tag incomplete type
-
- -- type T is tagged;
- -- type Acc is access function (X : T) return T; -- ERROR
-
- if Ekind (Etype (E)) = E_Incomplete_Type
- and then Is_Tagged_Type (Etype (E))
- and then No (Full_View (Etype (E)))
- and then not Is_Value_Type (Etype (E))
- then
- Error_Msg_N
- ("(Ada 2005): invalid use of tagged incomplete type", E);
- end if;
-
-- For access to a protected subprogram, freeze the equivalent type
-- (however this is not set if we are not generating code or if this
-- is an anonymous type used just for resolution).
elsif Is_Access_Protected_Subprogram_Type (E) then
-
- -- AI-326: Check wrong use of tagged incomplete types
-
- -- type T is tagged;
- -- type As3D is access protected
- -- function (X : Float) return T; -- ERROR
-
- declare
- Etyp : Entity_Id;
-
- begin
- Etyp := Etype (Directly_Designated_Type (E));
-
- if Is_Class_Wide_Type (Etyp) then
- Etyp := Etype (Etyp);
- end if;
-
- if Ekind (Etyp) = E_Incomplete_Type
- and then Is_Tagged_Type (Etyp)
- and then No (Full_View (Etyp))
- and then not Is_Value_Type (Etype (E))
- then
- Error_Msg_N
- ("(Ada 2005): invalid use of tagged incomplete type", E);
- end if;
- end;
-
if Present (Equivalent_Type (E)) then
Freeze_And_Append (Equivalent_Type (E), Loc, Result);
end if;
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index 8f16a117866..7109383555f 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -42,7 +42,10 @@ with Nlists; use Nlists;
with Opt; use Opt;
with Osint;
with Par;
+with Prep;
with Prepcomp;
+with Restrict; use Restrict;
+with Rident; use Rident;
with Rtsfind;
with Sprint;
with Scn; use Scn;
@@ -64,12 +67,12 @@ procedure Frontend is
-- Gather configuration pragmas
begin
- -- Carry out package initializations. These are initializations which
- -- might logically be performed at elaboration time, were it not for
- -- the fact that we may be doing things more than once in the big loop
- -- over files. Like elaboration, the order in which these calls are
- -- made is in some cases important. For example, Lib cannot be
- -- initialized until Namet, since it uses names table entries.
+ -- Carry out package initializations. These are initializations which might
+ -- logically be performed at elaboration time, were it not for the fact
+ -- that we may be doing things more than once in the big loop over files.
+ -- Like elaboration, the order in which these calls are made is in some
+ -- cases important. For example, Lib cannot be initialized before Namet,
+ -- since it uses names table entries.
Rtsfind.Initialize;
Atree.Initialize;
@@ -82,6 +85,7 @@ begin
Fname.UF.Initialize;
Checks.Initialize;
Sem_Warn.Initialize;
+ Prep.Initialize;
-- Create package Standard
@@ -275,6 +279,17 @@ begin
end;
end if;
+ -- If we have restriction No_Exception_Propagation, and we did not have an
+ -- explicit switch turning off Warn_On_Non_Local_Exception, then turn on
+ -- this warning by default if we have encountered an exception handler.
+
+ if Restriction_Active (No_Exception_Propagation)
+ and then not No_Warn_On_Non_Local_Exception
+ and then Exception_Handler_Encountered
+ then
+ Warn_On_Non_Local_Exception := True;
+ end if;
+
-- Now on to the semantics. Skip if in syntax only mode
if Operating_Mode /= Check_Syntax then
diff --git a/gcc/ada/g-byorma.adb b/gcc/ada/g-byorma.adb
index 7e355b041b5..27138b463f4 100755
--- a/gcc/ada/g-byorma.adb
+++ b/gcc/ada/g-byorma.adb
@@ -31,6 +31,8 @@
-- --
------------------------------------------------------------------------------
+pragma Compiler_Unit;
+
package body GNAT.Byte_Order_Mark is
--------------
diff --git a/gcc/ada/g-byorma.ads b/gcc/ada/g-byorma.ads
index 6016f755bcc..d01404e6eb0 100755
--- a/gcc/ada/g-byorma.ads
+++ b/gcc/ada/g-byorma.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2006-2007, AdaCore --
+-- Copyright (C) 2006-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -63,9 +63,7 @@
-- cases depend on the first character of the XML file being < so that the
-- encoding of this character can be recognized.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package GNAT.Byte_Order_Mark is
diff --git a/gcc/ada/g-calend.adb b/gcc/ada/g-calend.adb
index 9d3c33d3d35..8ccd4337b61 100644
--- a/gcc/ada/g-calend.adb
+++ b/gcc/ada/g-calend.adb
@@ -293,7 +293,23 @@ package body GNAT.Calendar is
------------------
function Week_In_Year (Date : Time) return Week_In_Year_Number is
- Year : Year_Number;
+ Year : Year_Number;
+ Week : Week_In_Year_Number;
+ pragma Unreferenced (Year);
+ begin
+ Year_Week_In_Year (Date, Year, Week);
+ return Week;
+ end Week_In_Year;
+
+ -----------------------
+ -- Year_Week_In_Year --
+ -----------------------
+
+ procedure Year_Week_In_Year
+ (Date : Time;
+ Year : out Year_Number;
+ Week : out Week_In_Year_Number)
+ is
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
@@ -381,14 +397,13 @@ package body GNAT.Calendar is
is
Last_Jan_1 : constant Day_Name :=
Jan_1_Day_Of_Week (Jan_1, Year, Last_Year => True);
+
begin
-- These two cases are illustrated in the table below
return
Last_Jan_1 = Thursday
- or else
- (Last_Jan_1 = Wednesday
- and then Is_Leap (Year - 1));
+ or else (Last_Jan_1 = Wednesday and then Is_Leap (Year - 1));
end Last_Year_Has_53_Weeks;
-- Start of processing for Week_In_Year
@@ -437,9 +452,7 @@ package body GNAT.Calendar is
-- when special casing the first week of January and the last week of
-- December.
- if Day = 1
- and then Month = 1
- then
+ if Day = 1 and then Month = 1 then
Jan_1 := Day_Of_Week (Date);
else
Jan_1 := Day_Of_Week (Time_Of (Year, 1, 1, 0.0));
@@ -461,19 +474,23 @@ package body GNAT.Calendar is
-- +-----+-----+-----+=====+-----+-----+-----+
if (Day = 1 and then Jan_1 in Friday .. Sunday)
- or else
+ or else
(Day = 2 and then Jan_1 in Friday .. Saturday)
- or else
+ or else
(Day = 3 and then Jan_1 = Friday)
then
if Last_Year_Has_53_Weeks (Jan_1, Year) then
- return 53;
+ Week := 53;
else
- return 52;
+ Week := 52;
end if;
- -- Special case 2: January 1, 2, 3, 4, 5 and 6 of the first week. In
- -- this scenario January 1 does not fall on a Monday.
+ -- January 1, 2 and 3 belong to the previous year
+
+ Year := Year - 1;
+ return;
+
+ -- Special case 2: January 1, 2, 3, 4, 5, 6 and 7 of the first week
-- +-----+-----+-----+=====+-----+-----+-----+
-- | Mon | Tue | Wed # Thu # Fri | Sat | Sun |
@@ -484,14 +501,19 @@ package body GNAT.Calendar is
-- +-----+-----+-----+-----+-----+-----+-----+
-- | 31 | 1 | 2 # 3 # 4 | 5 | 6 |
-- +-----+-----+-----+-----+-----+-----+-----+
+ -- | 1 | 2 | 3 # 4 # 5 | 6 | 7 |
+ -- +-----+-----+-----+=====+-----+-----+-----+
- elsif (Day <= 4 and then Jan_1 in Tuesday .. Thursday)
- or else
- (Day = 5 and then Jan_1 in Tuesday .. Wednesday)
- or else
- (Day = 6 and then Jan_1 = Tuesday)
+ elsif (Day <= 4 and then Jan_1 in Monday .. Thursday)
+ or else
+ (Day = 5 and then Jan_1 in Monday .. Wednesday)
+ or else
+ (Day = 6 and then Jan_1 in Monday .. Tuesday)
+ or else
+ (Day = 7 and then Jan_1 = Monday)
then
- return 1;
+ Week := 1;
+ return;
end if;
-- Special case 3: December 29, 30 and 31. These days may belong to
@@ -507,20 +529,20 @@ package body GNAT.Calendar is
-- | 31 | 1 | 2 # 3 # 4 | 5 | 6 |
-- +-----+-----+-----+=====+-----+-----+-----+
- elsif Month = 12
- and then Day > 28
- then
+ elsif Month = 12 and then Day > 28 then
declare
Next_Jan_1 : constant Day_Name :=
Jan_1_Day_Of_Week (Jan_1, Year, Next_Year => True);
begin
if (Day = 29 and then Next_Jan_1 = Thursday)
- or else
+ or else
(Day = 30 and then Next_Jan_1 in Wednesday .. Thursday)
- or else
+ or else
(Day = 31 and then Next_Jan_1 in Tuesday .. Thursday)
then
- return 1;
+ Year := Year + 1;
+ Week := 1;
+ return;
end if;
end;
end if;
@@ -541,7 +563,7 @@ package body GNAT.Calendar is
-- origin which falls on Monday.
Shift := 7 - Day_Name'Pos (Jan_1);
- return Start_Week + (Day_In_Year (Date) - Shift - 1) / 7;
- end Week_In_Year;
+ Week := Start_Week + (Day_In_Year (Date) - Shift - 1) / 7;
+ end Year_Week_In_Year;
end GNAT.Calendar;
diff --git a/gcc/ada/g-calend.ads b/gcc/ada/g-calend.ads
index 8bb2e6e7cc6..39ca20371a0 100644
--- a/gcc/ada/g-calend.ads
+++ b/gcc/ada/g-calend.ads
@@ -70,18 +70,9 @@ package GNAT.Calendar is
-- Return the day name
function Day_In_Year (Date : Ada.Calendar.Time) return Day_In_Year_Number;
- -- Returns the day number in the year. (1st January is day 1 and 31st
+ -- Return the day number in the year. (1st January is day 1 and 31st
-- December is day 365 or 366 for leap year).
- function Week_In_Year (Date : Ada.Calendar.Time) return Week_In_Year_Number;
- -- Returns the week number as defined in ISO 8601. A week always starts on
- -- a Monday and the first week of a particular year is the one containing
- -- the first Thursday. A year may have 53 weeks when January 1st is a
- -- Wednesday and the year is leap or January 1st is a Thursday. Note that
- -- the last days of December may belong to the first week on the next year
- -- and conversely, the first days of January may belong to the last week
- -- of the last year.
-
procedure Split
(Date : Ada.Calendar.Time;
Year : out Ada.Calendar.Year_Number;
@@ -102,7 +93,23 @@ package GNAT.Calendar is
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration := 0.0) return Ada.Calendar.Time;
- -- Returns an Ada.Calendar.Time data built from the date and time values
+ -- Return an Ada.Calendar.Time data built from the date and time values
+
+ function Week_In_Year (Date : Ada.Calendar.Time) return Week_In_Year_Number;
+ -- Return the week number as defined in ISO 8601. A week always starts on
+ -- a Monday and the first week of a particular year is the one containing
+ -- the first Thursday. A year may have 53 weeks when January 1st is a
+ -- Wednesday and the year is leap or January 1st is a Thursday. Note that
+ -- the last days of December may belong to the first week on the next year
+ -- and conversely, the first days of January may belong to the last week
+ -- of the last year.
+
+ procedure Year_Week_In_Year
+ (Date : Ada.Calendar.Time;
+ Year : out Ada.Calendar.Year_Number;
+ Week : out Week_In_Year_Number);
+ -- Return the week number as defined in ISO 8601 along with the year in
+ -- which the week occurs.
-- C timeval conversion
diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb
index 307f890750e..8ee4f427dfb 100644
--- a/gcc/ada/g-comlin.adb
+++ b/gcc/ada/g-comlin.adb
@@ -890,6 +890,7 @@ package body GNAT.Command_Line is
Parser.In_Expansion := False;
Parser.Switch_Character := Switch_Char;
Parser.Stop_At_First := Stop_At_First_Non_Switch;
+ Parser.Section := (others => 1);
-- If we are using sections, we have to preprocess the command line
-- to delimit them. A section can be repeated, so we just give each
@@ -1277,7 +1278,7 @@ package body GNAT.Command_Line is
if Separator (Parser) = ASCII.NUL then
Add_Switch
- (Cmd, Sw & Parameter (Parser), "");
+ (Cmd, Sw & Parameter (Parser), "", ASCII.NUL);
else
Add_Switch
(Cmd, Sw, Parameter (Parser), Separator (Parser));
@@ -2449,6 +2450,8 @@ package body GNAT.Command_Line is
Free (Config.Aliases);
Free (Config.Expansions);
Free (Config.Prefixes);
+ Free (Config.Sections);
+ Free (Config.Switches);
Unchecked_Free (Config);
end if;
end Free;
diff --git a/gcc/ada/g-dirope.adb b/gcc/ada/g-dirope.adb
index ad03db8c7b7..c7670ef558b 100644
--- a/gcc/ada/g-dirope.adb
+++ b/gcc/ada/g-dirope.adb
@@ -168,10 +168,6 @@ package body GNAT.Directory_Operations is
procedure Change_Dir (Dir_Name : Dir_Name_Str) is
C_Dir_Name : constant String := Dir_Name & ASCII.NUL;
-
- function chdir (Dir_Name : String) return Integer;
- pragma Import (C, chdir, "chdir");
-
begin
if chdir (C_Dir_Name) /= 0 then
raise Directory_Error;
@@ -743,9 +739,7 @@ package body GNAT.Directory_Operations is
-- Remove the directory only if it is empty
if not Recursive then
- rmdir (C_Dir_Name);
-
- if GNAT.OS_Lib.Is_Directory (Dir_Name) then
+ if rmdir (C_Dir_Name) /= 0 then
raise Directory_Error;
end if;
@@ -768,7 +762,6 @@ package body GNAT.Directory_Operations is
Str (1 .. Last) /= ".."
then
Remove_Dir (Str (1 .. Last), True);
- Remove_Dir (Str (1 .. Last));
end if;
else
diff --git a/gcc/ada/g-hesora.adb b/gcc/ada/g-hesora.adb
index cb54558a6c7..60f307bba8a 100644
--- a/gcc/ada/g-hesora.adb
+++ b/gcc/ada/g-hesora.adb
@@ -31,9 +31,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body GNAT.Heap_Sort_A is
diff --git a/gcc/ada/g-hesora.ads b/gcc/ada/g-hesora.ads
index bf60cafd9ef..11b89691968 100644
--- a/gcc/ada/g-hesora.ads
+++ b/gcc/ada/g-hesora.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1995-2007, AdaCore --
+-- Copyright (C) 1995-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -42,9 +42,7 @@
-- worst case and is in place with no additional storage required. See
-- the body for exact details of the algorithm used.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package GNAT.Heap_Sort_A is
pragma Preelaborate;
diff --git a/gcc/ada/g-htable.ads b/gcc/ada/g-htable.ads
index 5f7a27ccb75..a158d09f618 100644
--- a/gcc/ada/g-htable.ads
+++ b/gcc/ada/g-htable.ads
@@ -43,9 +43,7 @@
-- this facility is accessed from run time routines, but clients should
-- always access the version supplied via GNAT.HTable.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.HTable;
diff --git a/gcc/ada/g-moreex.adb b/gcc/ada/g-moreex.adb
index e86d378f1dc..ab3a3065524 100644
--- a/gcc/ada/g-moreex.adb
+++ b/gcc/ada/g-moreex.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2000-2006, AdaCore --
+-- Copyright (C) 2000-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -47,32 +47,17 @@ package body GNAT.Most_Recent_Exception is
use type Ada.Exceptions.Exception_Occurrence_Access;
begin
- pragma Warnings (Off);
- if EOA = null then
- return Ada.Exceptions.Null_Occurrence;
- else
- return EOA.all;
- end if;
- pragma Warnings (On);
-
- -- ???Note that both of the above return statements violate the Ada
- -- 2005 rule forbidding copying of limited objects (see RM-7.5(2.8/2)).
- -- When compiled with -gnatg, the compiler gives a warning instead of
- -- an error, so we can turn it off.
- -- To fix this, remove the pragmas Warnings above, and use the following
- -- code. We can't do that yet, because AI-318 is not yet implemented.
- --
- -- return Result : Ada.Exceptions.Exception_Occurrence do
- -- if EOA = null then
- -- Ada.Exceptions.Save_Occurrence
- -- (Target => Result,
- -- Source => Ada.Exceptions.Null_Occurrence);
- -- else
- -- Ada.Exceptions.Save_Occurrence
- -- (Target => Result,
- -- Source => EOA.all);
- -- end if;
- -- end return;
+ return Result : Ada.Exceptions.Exception_Occurrence do
+ if EOA = null then
+ Ada.Exceptions.Save_Occurrence
+ (Target => Result,
+ Source => Ada.Exceptions.Null_Occurrence);
+ else
+ Ada.Exceptions.Save_Occurrence
+ (Target => Result,
+ Source => EOA.all);
+ end if;
+ end return;
end Occurrence;
-----------------------
diff --git a/gcc/ada/g-pehage.adb b/gcc/ada/g-pehage.adb
index 129cecc7659..5abb04c2138 100644
--- a/gcc/ada/g-pehage.adb
+++ b/gcc/ada/g-pehage.adb
@@ -1146,9 +1146,10 @@ package body GNAT.Perfect_Hash_Generators is
-- words already there because a previous computation failed. We are
-- currently retrying and the reduced words have to be deallocated.
- for W in NK .. WT.Last loop
+ for W in Reduced (0) .. WT.Last loop
Free_Word (WT.Table (W));
end loop;
+
IT.Init;
-- Initialize of computation variables
diff --git a/gcc/ada/g-sercom-mingw.adb b/gcc/ada/g-sercom-mingw.adb
index abb32274e4c..03bd6aba191 100644
--- a/gcc/ada/g-sercom-mingw.adb
+++ b/gcc/ada/g-sercom-mingw.adb
@@ -106,7 +106,7 @@ package body GNAT.Serial_Communications is
Success := CloseHandle (HANDLE (Port.H.all));
end if;
- Port.H.all := CreateFile
+ Port.H.all := CreateFileA
(lpFileName => C_Name (C_Name'First)'Address,
dwDesiredAccess => GENERIC_READ or GENERIC_WRITE,
dwShareMode => 0,
diff --git a/gcc/ada/g-sercom.adb b/gcc/ada/g-sercom.adb
index c1b4b8e481b..a39d4dbbca4 100644
--- a/gcc/ada/g-sercom.adb
+++ b/gcc/ada/g-sercom.adb
@@ -67,7 +67,8 @@ package body GNAT.Serial_Communications is
procedure Open
(Port : out Serial_Port;
- Name : Port_Name) is
+ Name : Port_Name)
+ is
begin
Unimplemented;
end Open;
@@ -83,7 +84,8 @@ package body GNAT.Serial_Communications is
Stop_Bits : Stop_Bits_Number := One;
Parity : Parity_Check := None;
Block : Boolean := True;
- Timeout : Duration := 10.0) is
+ Timeout : Duration := 10.0)
+ is
begin
Unimplemented;
end Set;
@@ -95,7 +97,8 @@ package body GNAT.Serial_Communications is
overriding procedure Read
(Port : in out Serial_Port;
Buffer : out Stream_Element_Array;
- Last : out Stream_Element_Offset) is
+ Last : out Stream_Element_Offset)
+ is
begin
Unimplemented;
end Read;
@@ -106,7 +109,8 @@ package body GNAT.Serial_Communications is
overriding procedure Write
(Port : in out Serial_Port;
- Buffer : Stream_Element_Array) is
+ Buffer : Stream_Element_Array)
+ is
begin
Unimplemented;
end Write;
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index 92407cc188b..784d0626bad 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -228,6 +228,13 @@ package body GNAT.Sockets is
(Stream : in out Stream_Socket_Stream_Type;
Item : Ada.Streams.Stream_Element_Array);
+ procedure Stream_Write
+ (Socket : Socket_Type;
+ Item : Ada.Streams.Stream_Element_Array;
+ To : access Sock_Addr_Type);
+ -- Common implementation for the Write operation of Datagram_Socket_Stream_
+ -- Type and Stream_Socket_Stream_Type.
+
procedure Wait_On_Socket
(Socket : Socket_Type;
For_Read : Boolean;
@@ -1674,6 +1681,17 @@ package body GNAT.Sockets is
end case;
end if;
+ -- Special case: EAGAIN may be the same value as EWOULDBLOCK, so we
+ -- can't include it in the case statement below.
+
+ pragma Warnings (Off);
+ -- Condition "EAGAIN /= EWOULDBLOCK" is known at compile time
+
+ if EAGAIN /= EWOULDBLOCK and then Error_Value = EAGAIN then
+ return Resource_Temporarily_Unavailable;
+ end if;
+ pragma Warnings (On);
+
case Error_Value is
when ENOERROR => return Success;
when EACCES => return Permission_Denied;
@@ -1709,6 +1727,7 @@ package body GNAT.Sockets is
when ENOTSOCK => return Socket_Operation_On_Non_Socket;
when EOPNOTSUPP => return Operation_Not_Supported;
when EPFNOSUPPORT => return Protocol_Family_Not_Supported;
+ when EPIPE => return Broken_Pipe;
when EPROTONOSUPPORT => return Protocol_Not_Supported;
when EPROTOTYPE => return Protocol_Wrong_Type_For_Socket;
when ESHUTDOWN => return
@@ -1717,10 +1736,9 @@ package body GNAT.Sockets is
when ETIMEDOUT => return Connection_Timed_Out;
when ETOOMANYREFS => return Too_Many_References;
when EWOULDBLOCK => return Resource_Temporarily_Unavailable;
- when others => null;
- end case;
- return Cannot_Resolve_Error;
+ when others => return Cannot_Resolve_Error;
+ end case;
end Resolve_Error;
-----------------------
@@ -1801,21 +1819,24 @@ package body GNAT.Sockets is
Last : out Ada.Streams.Stream_Element_Offset;
Flags : Request_Flag_Type := No_Request_Flag)
is
- Res : C.int;
-
begin
- Res :=
- C_Send
- (C.int (Socket),
- Item'Address,
- Item'Length,
- Set_Forced_Flags (To_Int (Flags)));
+ Send_Socket (Socket, Item, Last, To => null, Flags => Flags);
+ end Send_Socket;
- if Res = Failure then
- Raise_Socket_Error (Socket_Errno);
- end if;
+ -----------------
+ -- Send_Socket --
+ -----------------
- Last := Item'First + Ada.Streams.Stream_Element_Offset (Res - 1);
+ procedure Send_Socket
+ (Socket : Socket_Type;
+ Item : Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset;
+ To : Sock_Addr_Type;
+ Flags : Request_Flag_Type := No_Request_Flag)
+ is
+ begin
+ Send_Socket
+ (Socket, Item, Last, To => To'Unrestricted_Access, Flags => Flags);
end Send_Socket;
-----------------
@@ -1826,26 +1847,36 @@ package body GNAT.Sockets is
(Socket : Socket_Type;
Item : Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset;
- To : Sock_Addr_Type;
+ To : access Sock_Addr_Type;
Flags : Request_Flag_Type := No_Request_Flag)
is
- Res : C.int;
- Sin : aliased Sockaddr_In;
- Len : constant C.int := Sin'Size / 8;
+ Res : C.int;
+
+ Sin : aliased Sockaddr_In;
+ C_To : Sockaddr_In_Access;
+ Len : C.int;
begin
- Set_Family (Sin.Sin_Family, To.Family);
- Set_Address (Sin'Unchecked_Access, To_In_Addr (To.Addr));
- Set_Port
- (Sin'Unchecked_Access,
- Short_To_Network (C.unsigned_short (To.Port)));
+ if To /= null then
+ Set_Family (Sin.Sin_Family, To.Family);
+ Set_Address (Sin'Unchecked_Access, To_In_Addr (To.Addr));
+ Set_Port
+ (Sin'Unchecked_Access,
+ Short_To_Network (C.unsigned_short (To.Port)));
+ C_To := Sin'Unchecked_Access;
+ Len := Sin'Size / 8;
+
+ else
+ C_To := null;
+ Len := 0;
+ end if;
Res := C_Sendto
(C.int (Socket),
Item'Address,
Item'Length,
Set_Forced_Flags (To_Int (Flags)),
- Sin'Unchecked_Access,
+ C_To,
Len);
if Res = Failure then
@@ -2094,6 +2125,43 @@ package body GNAT.Sockets is
return Stream_Access (S);
end Stream;
+ ------------------
+ -- Stream_Write --
+ ------------------
+
+ procedure Stream_Write
+ (Socket : Socket_Type;
+ Item : Ada.Streams.Stream_Element_Array;
+ To : access Sock_Addr_Type)
+ is
+ First : Ada.Streams.Stream_Element_Offset;
+ Index : Ada.Streams.Stream_Element_Offset;
+ Max : constant Ada.Streams.Stream_Element_Offset := Item'Last;
+
+ begin
+ First := Item'First;
+ Index := First - 1;
+ while First <= Max loop
+ Send_Socket (Socket, Item (First .. Max), Index, To);
+
+ -- Exit when all or zero data sent. Zero means that the socket has
+ -- been closed by peer.
+
+ exit when Index < First or else Index = Max;
+
+ First := Index + 1;
+ end loop;
+
+ -- For an empty array, we have First > Max, and hence Index >= Max (no
+ -- error, the loop above is never executed). After a succesful send,
+ -- Index = Max. The only remaining case, Index < Max, is therefore
+ -- always an actual send failure.
+
+ if Index < Max then
+ Raise_Socket_Error (Socket_Errno);
+ end if;
+ end Stream_Write;
+
----------
-- To_C --
----------
@@ -2315,31 +2383,8 @@ package body GNAT.Sockets is
(Stream : in out Datagram_Socket_Stream_Type;
Item : Ada.Streams.Stream_Element_Array)
is
- pragma Warnings (Off, Stream);
-
- First : Ada.Streams.Stream_Element_Offset := Item'First;
- Index : Ada.Streams.Stream_Element_Offset := First - 1;
- Max : constant Ada.Streams.Stream_Element_Offset := Item'Last;
-
begin
- loop
- Send_Socket
- (Stream.Socket,
- Item (First .. Max),
- Index,
- Stream.To);
-
- -- Exit when all or zero data sent. Zero means that the socket has
- -- been closed by peer.
-
- exit when Index < First or else Index = Max;
-
- First := Index + 1;
- end loop;
-
- if Index /= Max then
- raise Socket_Error;
- end if;
+ Stream_Write (Stream.Socket, Item, To => Stream.To'Unrestricted_Access);
end Write;
-----------
@@ -2350,27 +2395,8 @@ package body GNAT.Sockets is
(Stream : in out Stream_Socket_Stream_Type;
Item : Ada.Streams.Stream_Element_Array)
is
- pragma Warnings (Off, Stream);
-
- First : Ada.Streams.Stream_Element_Offset := Item'First;
- Index : Ada.Streams.Stream_Element_Offset := First - 1;
- Max : constant Ada.Streams.Stream_Element_Offset := Item'Last;
-
begin
- loop
- Send_Socket (Stream.Socket, Item (First .. Max), Index);
-
- -- Exit when all or zero data sent. Zero means that the socket has
- -- been closed by peer.
-
- exit when Index < First or else Index = Max;
-
- First := Index + 1;
- end loop;
-
- if Index /= Max then
- raise Socket_Error;
- end if;
+ Stream_Write (Stream.Socket, Item, To => null);
end Write;
Sockets_Library_Controller_Object : Sockets_Library_Controller;
diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads
index b730065cc69..f8dd6bfecfc 100644
--- a/gcc/ada/g-socket.ads
+++ b/gcc/ada/g-socket.ads
@@ -603,6 +603,9 @@ package GNAT.Sockets is
-- brackets and a string describing the error code.
-- The name of the enumeration constant documents the error condition
+ -- Note that on some platforms, a single error value is used for both
+ -- EWOULDBLOCK and EAGAIN. Both errors are therefore always reported as
+ -- Resource_Temporarily_Unavailable.
type Error_Type is
(Success,
@@ -644,6 +647,7 @@ package GNAT.Sockets is
Connection_Timed_Out,
Too_Many_References,
Resource_Temporarily_Unavailable,
+ Broken_Pipe,
Unknown_Host,
Host_Name_Lookup_Failure,
Non_Recoverable_Error,
@@ -917,8 +921,21 @@ package GNAT.Sockets is
(Socket : Socket_Type;
Item : Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset;
+ To : access Sock_Addr_Type;
Flags : Request_Flag_Type := No_Request_Flag);
- -- Transmit a message to another socket. Note that Last is set to
+ pragma Inline (Send_Socket);
+ -- Transmit a message over a socket. For a datagram socket, the address is
+ -- given by To.all. For a stream socket, To must be null. Flags
+ -- allows to control the transmission. Raises Socket_Error on error.
+ -- Note: this subprogram is inlined because it is also used to implement
+ -- the two variants below.
+
+ procedure Send_Socket
+ (Socket : Socket_Type;
+ Item : Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset;
+ Flags : Request_Flag_Type := No_Request_Flag);
+ -- Transmit a message over a socket. Note that Last is set to
-- Item'First-1 when socket has been closed by peer. This is not
-- considered an error and no exception is raised. Flags allows to control
-- the transmission. Raises Socket_Error on any other error condition.
@@ -929,8 +946,9 @@ package GNAT.Sockets is
Last : out Ada.Streams.Stream_Element_Offset;
To : Sock_Addr_Type;
Flags : Request_Flag_Type := No_Request_Flag);
- -- Transmit a message to another socket. The address is given by To. Flags
- -- allows to control the transmission. Raises Socket_Error on error.
+ -- Transmit a message over a datagram socket. The destination address is
+ -- To. Flags allows to control the transmission. Raises Socket_Error on
+ -- error.
procedure Send_Vector
(Socket : Socket_Type;
diff --git a/gcc/ada/g-socthi-mingw.adb b/gcc/ada/g-socthi-mingw.adb
index a85a2572d8f..c3a120f32a1 100644
--- a/gcc/ada/g-socthi-mingw.adb
+++ b/gcc/ada/g-socthi-mingw.adb
@@ -390,11 +390,13 @@ package body GNAT.Sockets.Thin is
begin
for J in Iovec'Range loop
- Res := C_Send
+ Res := C_Sendto
(Fd,
Iovec (J).Base.all'Address,
C.int (Iovec (J).Length),
- 0);
+ Flags => 0,
+ To => null,
+ Tolen => 0);
if Res < 0 then
return Res;
diff --git a/gcc/ada/g-socthi-mingw.ads b/gcc/ada/g-socthi-mingw.ads
index 408d789665c..ab4e7b0d051 100644
--- a/gcc/ada/g-socthi-mingw.ads
+++ b/gcc/ada/g-socthi-mingw.ads
@@ -153,12 +153,6 @@ package GNAT.Sockets.Thin is
Exceptfds : access Fd_Set;
Timeout : Timeval_Access) return C.int;
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
-
function C_Sendto
(S : C.int;
Msg : System.Address;
@@ -243,7 +237,6 @@ private
pragma Import (Stdcall, C_Listen, "listen");
pragma Import (Stdcall, C_Recv, "recv");
pragma Import (Stdcall, C_Recvfrom, "recvfrom");
- pragma Import (Stdcall, C_Send, "send");
pragma Import (Stdcall, C_Sendto, "sendto");
pragma Import (Stdcall, C_Setsockopt, "setsockopt");
pragma Import (Stdcall, C_Shutdown, "shutdown");
diff --git a/gcc/ada/g-socthi-vms.adb b/gcc/ada/g-socthi-vms.adb
index 389c256c1b8..8a410a44c40 100644
--- a/gcc/ada/g-socthi-vms.adb
+++ b/gcc/ada/g-socthi-vms.adb
@@ -92,13 +92,6 @@ package body GNAT.Sockets.Thin is
Fromlen : not null access C.int) return C.int;
pragma Import (C, Syscall_Recvfrom, "recvfrom");
- function Syscall_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
- pragma Import (C, Syscall_Send, "send");
-
function Syscall_Sendto
(S : C.int;
Msg : System.Address;
@@ -285,31 +278,6 @@ package body GNAT.Sockets.Thin is
return Res;
end C_Recvfrom;
- ------------
- -- C_Send --
- ------------
-
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int
- is
- Res : C.int;
-
- begin
- loop
- Res := Syscall_Send (S, Msg, Len, Flags);
- exit when SOSC.Thread_Blocking_IO
- or else Res /= Failure
- or else Non_Blocking_Socket (S)
- or else Errno /= SOSC.EWOULDBLOCK;
- delay Quantum;
- end loop;
-
- return Res;
- end C_Send;
-
--------------
-- C_Sendto --
--------------
@@ -500,11 +468,13 @@ package body GNAT.Sockets.Thin is
begin
for J in Iovec'Range loop
- Res := C_Send
+ Res := C_Sendto
(Fd,
Iovec (J).Base.all'Address,
Interfaces.C.int (Iovec (J).Length),
- SOSC.MSG_Forced_Flags);
+ SOSC.MSG_Forced_Flags,
+ To => null,
+ Tolen => 0);
if Res < 0 then
return Res;
diff --git a/gcc/ada/g-socthi-vms.ads b/gcc/ada/g-socthi-vms.ads
index dd317bfce9a..52a9d144b05 100644
--- a/gcc/ada/g-socthi-vms.ads
+++ b/gcc/ada/g-socthi-vms.ads
@@ -156,12 +156,6 @@ package GNAT.Sockets.Thin is
Exceptfds : access Fd_Set;
Timeout : Timeval_Access) return C.int;
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
-
function C_Sendto
(S : C.int;
Msg : System.Address;
diff --git a/gcc/ada/g-socthi-vxworks.adb b/gcc/ada/g-socthi-vxworks.adb
index 81a8d96eeed..d035b61f807 100644
--- a/gcc/ada/g-socthi-vxworks.adb
+++ b/gcc/ada/g-socthi-vxworks.adb
@@ -102,13 +102,6 @@ package body GNAT.Sockets.Thin is
Fromlen : not null access C.int) return C.int;
pragma Import (C, Syscall_Recvfrom, "recvfrom");
- function Syscall_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
- pragma Import (C, Syscall_Send, "send");
-
function Syscall_Sendto
(S : C.int;
Msg : System.Address;
@@ -298,31 +291,6 @@ package body GNAT.Sockets.Thin is
return Res;
end C_Recvfrom;
- ------------
- -- C_Send --
- ------------
-
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int
- is
- Res : C.int;
-
- begin
- loop
- Res := Syscall_Send (S, Msg, Len, Flags);
- exit when SOSC.Thread_Blocking_IO
- or else Res /= Failure
- or else Non_Blocking_Socket (S)
- or else Errno /= SOSC.EWOULDBLOCK;
- delay Quantum;
- end loop;
-
- return Res;
- end C_Send;
-
--------------
-- C_Sendto --
--------------
diff --git a/gcc/ada/g-socthi-vxworks.ads b/gcc/ada/g-socthi-vxworks.ads
index 06b75e339cb..df987d5adc9 100644
--- a/gcc/ada/g-socthi-vxworks.ads
+++ b/gcc/ada/g-socthi-vxworks.ads
@@ -154,12 +154,6 @@ package GNAT.Sockets.Thin is
Exceptfds : access Fd_Set;
Timeout : Timeval_Access) return C.int;
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
-
function C_Sendto
(S : C.int;
Msg : System.Address;
diff --git a/gcc/ada/g-socthi.adb b/gcc/ada/g-socthi.adb
index 1062354f9b5..fab5fb3ac9e 100644
--- a/gcc/ada/g-socthi.adb
+++ b/gcc/ada/g-socthi.adb
@@ -98,13 +98,6 @@ package body GNAT.Sockets.Thin is
Fromlen : not null access C.int) return C.int;
pragma Import (C, Syscall_Recvfrom, "recvfrom");
- function Syscall_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
- pragma Import (C, Syscall_Send, "send");
-
function Syscall_Sendto
(S : C.int;
Msg : System.Address;
@@ -303,31 +296,6 @@ package body GNAT.Sockets.Thin is
return Res;
end C_Recvfrom;
- ------------
- -- C_Send --
- ------------
-
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int
- is
- Res : C.int;
-
- begin
- loop
- Res := Syscall_Send (S, Msg, Len, Flags);
- exit when SOSC.Thread_Blocking_IO
- or else Res /= Failure
- or else Non_Blocking_Socket (S)
- or else Errno /= SOSC.EWOULDBLOCK;
- delay Quantum;
- end loop;
-
- return Res;
- end C_Send;
-
--------------
-- C_Sendto --
--------------
diff --git a/gcc/ada/g-socthi.ads b/gcc/ada/g-socthi.ads
index 8eae6c6e9bf..65660e3ce47 100644
--- a/gcc/ada/g-socthi.ads
+++ b/gcc/ada/g-socthi.ads
@@ -155,12 +155,6 @@ package GNAT.Sockets.Thin is
Exceptfds : access Fd_Set;
Timeout : Timeval_Access) return C.int;
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
-
function C_Sendto
(S : C.int;
Msg : System.Address;
diff --git a/gcc/ada/g-spchge.adb b/gcc/ada/g-spchge.adb
index 2e4c7c786fb..b1278a64811 100755
--- a/gcc/ada/g-spchge.adb
+++ b/gcc/ada/g-spchge.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2007, AdaCore --
+-- Copyright (C) 1998-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,9 +31,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body GNAT.Spelling_Checker_Generic is
diff --git a/gcc/ada/g-spchge.ads b/gcc/ada/g-spchge.ads
index 0a29c589a21..786213bf1ff 100755
--- a/gcc/ada/g-spchge.ads
+++ b/gcc/ada/g-spchge.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1998-2007, AdaCore --
+-- Copyright (C) 1998-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -39,9 +39,7 @@
-- codes for ASCII characters in the range 16#20#..16#7F# have their normal
-- expected encoding values (e.g. the Pos value 16#31# must be digit 1).
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package GNAT.Spelling_Checker_Generic is
pragma Pure;
diff --git a/gcc/ada/g-speche.adb b/gcc/ada/g-speche.adb
index 841eef8ddfe..cd66efee788 100644
--- a/gcc/ada/g-speche.adb
+++ b/gcc/ada/g-speche.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2007, AdaCore --
+-- Copyright (C) 1998-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,9 +31,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with GNAT.Spelling_Checker_Generic;
diff --git a/gcc/ada/g-speche.ads b/gcc/ada/g-speche.ads
index b0eba286a02..0f9b39a6242 100644
--- a/gcc/ada/g-speche.ads
+++ b/gcc/ada/g-speche.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1998-2007, AdaCore --
+-- Copyright (C) 1998-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -36,9 +36,7 @@
-- This package provides a utility routine for checking for bad spellings
-- for the case of String arguments.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package GNAT.Spelling_Checker is
pragma Pure;
diff --git a/gcc/ada/g-stsifd-sockets.adb b/gcc/ada/g-stsifd-sockets.adb
index 5fe43af4654..23fdb59af76 100644
--- a/gcc/ada/g-stsifd-sockets.adb
+++ b/gcc/ada/g-stsifd-sockets.adb
@@ -67,7 +67,8 @@ package body Signalling_Fds is
-- Address of listening socket
Res : C.int;
- -- Return status of system calls
+ pragma Warnings (Off, Res);
+ -- Return status of system calls (usually ignored, hence warnings off)
begin
Fds.all := (Read_End | Write_End => Failure);
@@ -153,9 +154,7 @@ package body Signalling_Fds is
pragma Assert (Res = Failure
and then
Socket_Errno = SOSC.EADDRINUSE);
- pragma Warnings (Off); -- useless assignment to "Res"
Res := C_Close (W_Sock);
- pragma Warnings (On);
W_Sock := Failure;
Res := C_Close (R_Sock);
R_Sock := Failure;
@@ -227,7 +226,11 @@ package body Signalling_Fds is
function Write (Wsig : C.int) return C.int is
Buf : aliased Character := ASCII.NUL;
begin
- return C_Send (Wsig, Buf'Address, 1, SOSC.MSG_Forced_Flags);
+ return C_Sendto
+ (Wsig, Buf'Address, 1,
+ Flags => SOSC.MSG_Forced_Flags,
+ To => null,
+ Tolen => 0);
end Write;
end Signalling_Fds;
diff --git a/gcc/ada/g-trasym-unimplemented.adb b/gcc/ada/g-trasym-unimplemented.adb
new file mode 100644
index 00000000000..5432eaf9dee
--- /dev/null
+++ b/gcc/ada/g-trasym-unimplemented.adb
@@ -0,0 +1,72 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- G N A T . T R A C E B A C K . S Y M B O L I C --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 1999-2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT 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 distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit 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 Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- Version used on unimplemented targets
+
+-- Run-time symbolic traceback is currently supported on the following
+-- targets:
+
+-- HP-UX
+-- IRIX
+-- GNU/Linux x86
+-- AIX
+-- Solaris sparc
+-- Tru64
+-- OpenVMS/Alpha
+-- Windows NT/XP/Vista
+
+-- This version is used on all other targets, it generates a warning at
+-- compile time if it is with'ed, and the bodies generate messages saying
+-- that the functions are not implemented.
+
+package body GNAT.Traceback.Symbolic is
+
+ ------------------------
+ -- Symbolic_Traceback --
+ ------------------------
+
+ function Symbolic_Traceback (Traceback : Tracebacks_Array) return String
+ is
+ pragma Unreferenced (Traceback);
+ begin
+ return "Symbolic_Traceback not implemented on this target";
+ end Symbolic_Traceback;
+
+ function Symbolic_Traceback (E : Exception_Occurrence) return String
+ is
+ pragma Unreferenced (E);
+ begin
+ return "Symbolic_Traceback not implemented on this target";
+ end Symbolic_Traceback;
+
+end GNAT.Traceback.Symbolic;
diff --git a/gcc/ada/g-trasym-unimplemented.ads b/gcc/ada/g-trasym-unimplemented.ads
new file mode 100644
index 00000000000..d03db88e263
--- /dev/null
+++ b/gcc/ada/g-trasym-unimplemented.ads
@@ -0,0 +1,66 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- G N A T . T R A C E B A C K . S Y M B O L I C --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 1999-2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT 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 distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit 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 Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- Version used on unimplemented targets
+
+-- Run-time symbolic traceback is currently supported on the following
+-- targets:
+
+-- HP-UX hppa and ia64
+-- IRIX
+-- GNU/Linux x86, x86_64, ia64
+-- AIX
+-- Solaris sparc and x86
+-- Tru64
+-- OpenVMS/Alpha
+-- Windows NT/XP/Vista
+
+-- This version is used on all other targets, it generates a warning at
+-- compile time if it is with'ed, and the bodies generate messages saying
+-- that the functions are not implemented.
+
+with Ada.Exceptions; use Ada.Exceptions;
+
+package GNAT.Traceback.Symbolic is
+ pragma Elaborate_Body;
+
+-- pragma Compile_Time_Warning
+-- (True, "symbolic traceback not implemented on this target");
+
+ function Symbolic_Traceback (Traceback : Tracebacks_Array) return String;
+ -- Build a string containing a symbolic traceback of the given call chain
+
+ function Symbolic_Traceback (E : Exception_Occurrence) return String;
+ -- Build string containing symbolic traceback of given exception occurrence
+
+end GNAT.Traceback.Symbolic;
diff --git a/gcc/ada/g-trasym-vms-alpha.adb b/gcc/ada/g-trasym-vms-alpha.adb
index b503441d34e..adfa8f83d4e 100644
--- a/gcc/ada/g-trasym-vms-alpha.adb
+++ b/gcc/ada/g-trasym-vms-alpha.adb
@@ -40,7 +40,7 @@ with System.Traceback_Entries;
package body GNAT.Traceback.Symbolic is
- pragma Warnings (Off);
+ pragma Warnings (Off); -- Needs comment ???
pragma Linker_Options ("--for-linker=sys$library:trace.exe");
use Interfaces.C;
diff --git a/gcc/ada/g-trasym-vms-ia64.adb b/gcc/ada/g-trasym-vms-ia64.adb
index 7e219540916..28dab4729bd 100644
--- a/gcc/ada/g-trasym-vms-ia64.adb
+++ b/gcc/ada/g-trasym-vms-ia64.adb
@@ -39,7 +39,7 @@ with System.Traceback_Entries;
package body GNAT.Traceback.Symbolic is
- pragma Warnings (Off);
+ pragma Warnings (Off); -- ??? needs comment
pragma Linker_Options ("--for-linker=sys$library:trace.exe");
use System;
diff --git a/gcc/ada/g-trasym.ads b/gcc/ada/g-trasym.ads
index fbcf9ca4a65..89362318e3e 100644
--- a/gcc/ada/g-trasym.ads
+++ b/gcc/ada/g-trasym.ads
@@ -35,11 +35,11 @@
-- This capability is currently supported on the following targets:
--- HP-UX
+-- HP-UX hppa and ia64
-- IRIX
--- GNU/Linux x86
+-- GNU/Linux x86, x86_64, ia64
-- AIX
--- Solaris sparc
+-- Solaris sparc and x86
-- Tru64
-- OpenVMS/Alpha
-- Windows NT/XP/Vista
diff --git a/gcc/ada/g-u3spch.adb b/gcc/ada/g-u3spch.adb
index 3e7ede843f2..febe0b43589 100755
--- a/gcc/ada/g-u3spch.adb
+++ b/gcc/ada/g-u3spch.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2007, AdaCore --
+-- Copyright (C) 1998-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,9 +31,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with GNAT.Spelling_Checker_Generic;
diff --git a/gcc/ada/g-u3spch.ads b/gcc/ada/g-u3spch.ads
index 90ab66d978f..773a253b064 100755
--- a/gcc/ada/g-u3spch.ads
+++ b/gcc/ada/g-u3spch.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1998-2007, AdaCore --
+-- Copyright (C) 1998-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -36,9 +36,7 @@
-- This package provides a utility routine for checking for bad spellings
-- for the case of System.WCh_Cnv.UTF_32_String arguments.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.WCh_Cnv;
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 3817d7b0133..349e2622664 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -149,6 +149,8 @@ GNAT_ADA_OBJS = ada/ada.o ada/a-charac.o ada/a-chlat1.o ada/a-except.o \
ada/s-except.o ada/s-exctab.o \
ada/s-secsta.o ada/s-strops.o ada/s-sopco3.o ada/s-sopco4.o ada/s-sopco5.o \
ada/s-traent.o ada/s-wchcnv.o ada/s-wchcon.o ada/s-wchjis.o \
+ ada/s-conca2.o ada/s-conca3.o ada/s-conca4.o ada/s-conca5.o \
+ ada/s-conca6.o ada/s-conca7.o ada/s-conca8.o ada/s-conca9.o \
ada/s-unstyp.o ada/scans.o ada/scng.o ada/scn.o ada/sdefault.o ada/sem.o \
ada/sem_aggr.o ada/sem_attr.o ada/sem_aux.o \
ada/sem_cat.o ada/sem_ch10.o ada/sem_ch11.o \
@@ -233,6 +235,14 @@ GNATBIND_OBJS = \
ada/s-assert.o \
ada/s-carun8.o \
ada/s-casuti.o \
+ ada/s-conca2.o \
+ ada/s-conca3.o \
+ ada/s-conca4.o \
+ ada/s-conca5.o \
+ ada/s-conca6.o \
+ ada/s-conca7.o \
+ ada/s-conca8.o \
+ ada/s-conca9.o \
ada/s-crc32.o \
ada/s-crtl.o \
ada/s-except.o \
@@ -1273,17 +1283,14 @@ ada/alloc.o : ada/alloc.ads ada/system.ads
ada/atree.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/elists.adb ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
- ada/interfac.ads ada/namet.ads ada/namet.adb ada/nlists.ads \
- ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb \
- ada/sinput.ads ada/snames.ads ada/stand.ads ada/system.ads \
- ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/hostparm.ads \
+ ada/namet.ads ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
+ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads \
+ ada/system.ads ada/s-exctab.ads ada/s-imenne.ads ada/s-memory.ads \
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
+ ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/back_end.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -1414,10 +1421,10 @@ ada/checks.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/comperr.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
ada/casing.ads ada/comperr.ads ada/comperr.adb ada/debug.ads \
- ada/einfo.ads ada/einfo.adb ada/elists.ads ada/err_vars.ads \
- ada/errout.ads ada/erroutc.ads ada/fname.ads ada/gnat.ads \
- ada/g-hesorg.ads ada/g-htable.ads ada/gnatvsn.ads ada/hostparm.ads \
- ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
+ ada/einfo.ads ada/einfo.adb ada/err_vars.ads ada/errout.ads \
+ ada/erroutc.ads ada/fname.ads ada/gnat.ads ada/g-hesorg.ads \
+ ada/g-htable.ads ada/gnatvsn.ads ada/hostparm.ads ada/lib.ads \
+ ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
ada/nlists.ads ada/nlists.adb ada/opt.ads ada/osint.ads ada/output.ads \
ada/output.adb ada/rident.ads ada/sdefault.ads ada/sinfo.ads \
ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
@@ -1468,10 +1475,9 @@ ada/debug.o : ada/debug.ads ada/debug.adb ada/system.ads
ada/debug_a.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
ada/casing.ads ada/debug.ads ada/debug_a.ads ada/debug_a.adb \
- ada/einfo.ads ada/elists.ads ada/gnat.ads ada/g-htable.ads \
- ada/hostparm.ads ada/namet.ads ada/nlists.ads ada/nlists.adb \
- ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/snames.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
+ ada/einfo.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb \
+ ada/sinput.ads ada/snames.ads ada/system.ads ada/s-exctab.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
@@ -1480,16 +1486,15 @@ ada/debug_a.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/einfo.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/namet.ads \
- ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads \
- ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/snames.adb \
- ada/stand.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
- ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
- ada/types.ads ada/uintp.ads ada/uintp.adb ada/unchconv.ads \
- ada/unchdeal.ads ada/urealp.ads
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/gnat.ads \
+ ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb \
+ ada/sinput.ads ada/snames.ads ada/snames.adb ada/stand.ads \
+ ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
+ ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
+ ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/elists.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/elists.ads \
@@ -1512,20 +1517,20 @@ ada/err_vars.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/errout.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
- ada/elists.ads ada/err_vars.ads ada/errout.ads ada/errout.adb \
- ada/erroutc.ads ada/fname.ads ada/gnat.ads ada/g-hesorg.ads \
- ada/g-htable.ads ada/gnatvsn.ads ada/hostparm.ads ada/lib.ads \
- ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
- ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads ada/scans.ads \
- ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput.adb \
- ada/snames.ads ada/stand.ads ada/stringt.ads ada/stylesw.ads \
- ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
- ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
- ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
- ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
+ ada/err_vars.ads ada/errout.ads ada/errout.adb ada/erroutc.ads \
+ ada/fname.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
+ ada/gnatvsn.ads ada/hostparm.ads ada/lib.ads ada/lib.adb \
+ ada/lib-list.adb ada/lib-sort.adb ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/opt.ads ada/output.ads ada/scans.ads ada/sinfo.ads \
+ ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
+ ada/stand.ads ada/stringt.ads ada/stylesw.ads ada/system.ads \
+ ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads \
+ ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
+ ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
+ ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads ada/widechar.ads
ada/erroutc.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/debug.ads \
@@ -1533,14 +1538,15 @@ ada/erroutc.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/namet.ads ada/opt.ads ada/output.ads ada/output.adb ada/rident.ads \
ada/sinput.ads ada/sinput.adb ada/snames.ads ada/system.ads \
ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
+ ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/targparm.ads ada/tree_io.ads ada/types.ads ada/uintp.ads \
ada/unchconv.ads ada/unchdeal.ads ada/widechar.ads
ada/eval_fat.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/eval_fat.ads \
ada/eval_fat.adb ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/opt.ads \
@@ -1677,11 +1683,11 @@ ada/exp_ch12.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/tbuild.ads ada/tbuild.adb \
- ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/types.ads \
+ ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads
ada/exp_ch13.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -1949,7 +1955,7 @@ ada/exp_code.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/exp_dbug.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/exp_dbug.ads ada/exp_dbug.adb ada/gnat.ads ada/g-htable.ads \
ada/hostparm.ads ada/interfac.ads ada/namet.ads ada/namet.adb \
ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \
@@ -2114,22 +2120,22 @@ ada/exp_pakd.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/exp_prag.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
ada/casing.ads ada/casing.adb ada/csets.ads ada/debug.ads ada/einfo.ads \
- ada/einfo.adb ada/elists.ads ada/err_vars.ads ada/errout.ads \
- ada/erroutc.ads ada/exp_ch11.ads ada/exp_prag.ads ada/exp_prag.adb \
- ada/exp_tss.ads ada/exp_util.ads ada/expander.ads ada/fname.ads \
- ada/fname-uf.ads ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
- ada/lib.ads ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads \
- ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \
- ada/restrict.adb ada/rident.ads ada/rtsfind.ads ada/sem.ads \
- ada/sem_res.ads ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb \
- ada/sinput.ads ada/sinput.adb ada/snames.ads ada/snames.adb \
- ada/stand.ads ada/stringt.ads ada/stringt.adb ada/system.ads \
- ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
- ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-soflin.ads \
- ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \
- ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/einfo.adb ada/err_vars.ads ada/errout.ads ada/erroutc.ads \
+ ada/exp_ch11.ads ada/exp_prag.ads ada/exp_prag.adb ada/exp_tss.ads \
+ ada/exp_util.ads ada/expander.ads ada/fname.ads ada/fname-uf.ads \
+ ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/lib.ads \
+ ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \
+ ada/opt.ads ada/output.ads ada/restrict.ads ada/restrict.adb \
+ ada/rident.ads ada/rtsfind.ads ada/sem.ads ada/sem_res.ads \
+ ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
+ ada/sinput.adb ada/snames.ads ada/snames.adb ada/stand.ads \
+ ada/stringt.ads ada/stringt.adb ada/system.ads ada/s-exctab.ads \
+ ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads \
+ ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \
+ ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/exp_sel.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
@@ -2142,15 +2148,15 @@ ada/exp_sel.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/tbuild.ads ada/tbuild.adb \
- ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/types.ads \
+ ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads
ada/exp_smem.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/exp_ch9.ads ada/exp_smem.ads ada/exp_smem.adb ada/exp_tss.ads \
ada/exp_util.ads ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \
@@ -2159,10 +2165,10 @@ ada/exp_smem.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/snames.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
- ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tbuild.ads ada/tree_io.ads ada/types.ads ada/uintp.ads \
- ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
+ ada/table.ads ada/table.adb ada/tbuild.ads ada/tree_io.ads \
+ ada/types.ads ada/uintp.ads ada/uintp.adb ada/unchconv.ads \
+ ada/unchdeal.ads ada/urealp.ads
ada/exp_strm.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -2175,11 +2181,11 @@ ada/exp_strm.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/tbuild.ads ada/tbuild.adb \
- ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/uintp.ads \
- ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \
+ ada/types.ads ada/uintp.ads ada/uintp.adb ada/unchconv.ads \
+ ada/unchdeal.ads ada/urealp.ads
ada/exp_tss.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -2229,7 +2235,7 @@ ada/exp_util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/exp_vfpt.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/exp_vfpt.ads ada/exp_vfpt.adb ada/gnat.ads ada/g-htable.ads \
ada/hostparm.ads ada/namet.ads ada/nlists.ads ada/nlists.adb \
ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads ada/rtsfind.ads \
@@ -2250,27 +2256,26 @@ ada/expander.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/exp_ch12.ads ada/exp_ch13.ads ada/exp_ch2.ads ada/exp_ch3.ads \
ada/exp_ch4.ads ada/exp_ch5.ads ada/exp_ch6.ads ada/exp_ch7.ads \
ada/exp_ch8.ads ada/exp_ch9.ads ada/exp_prag.ads ada/expander.ads \
- ada/expander.adb ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
- ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/opt.ads \
- ada/output.ads ada/rtsfind.ads ada/sem.ads ada/sem_ch8.ads \
- ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/snames.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
- ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
- ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
- ada/types.ads ada/uintp.ads ada/unchconv.ads ada/unchdeal.ads \
- ada/urealp.ads
+ ada/expander.adb ada/hostparm.ads ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads ada/rtsfind.ads \
+ ada/sem.ads ada/sem_ch8.ads ada/sem_util.ads ada/sinfo.ads \
+ ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/system.ads \
+ ada/s-exctab.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
+ ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/unchconv.ads \
+ ada/unchdeal.ads ada/urealp.ads
ada/fmap.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/fmap.ads ada/fmap.adb \
ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/namet.ads \
ada/opt.ads ada/osint.ads ada/output.ads ada/system.ads \
ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb ada/s-memory.ads \
- ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-stoele.ads \
- ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
- ada/types.ads ada/unchconv.ads ada/unchdeal.ads
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \
+ ada/unchdeal.ads
ada/fname-uf.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/debug.ads \
@@ -2279,10 +2284,10 @@ ada/fname-uf.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/namet.ads ada/opt.ads ada/osint.ads ada/output.ads ada/rident.ads \
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/targparm.ads ada/tree_io.ads ada/types.ads \
- ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/widechar.ads
+ ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
+ ada/tree_io.ads ada/types.ads ada/uname.ads ada/unchconv.ads \
+ ada/unchdeal.ads ada/widechar.ads
ada/fname.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/fname.ads \
@@ -2330,12 +2335,13 @@ ada/frontend.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_dbug.ads \
ada/fmap.ads ada/fname.ads ada/fname-uf.ads ada/frontend.ads \
- ada/frontend.adb ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
- ada/hostparm.ads ada/inline.ads ada/interfac.ads ada/lib.ads \
- ada/lib.adb ada/lib-list.adb ada/lib-load.ads ada/lib-sort.adb \
- ada/live.ads ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads \
- ada/nmake.adb ada/opt.ads ada/osint.ads ada/output.ads ada/par.ads \
- ada/prepcomp.ads ada/restrict.ads ada/rident.ads ada/rtsfind.ads \
+ ada/frontend.adb ada/gnat.ads ada/g-dyntab.ads ada/g-dyntab.adb \
+ ada/g-hesorg.ads ada/g-htable.ads ada/hostparm.ads ada/inline.ads \
+ ada/interfac.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
+ ada/lib-load.ads ada/lib-sort.adb ada/live.ads ada/namet.ads \
+ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \
+ ada/osint.ads ada/output.ads ada/par.ads ada/prep.ads ada/prepcomp.ads \
+ ada/restrict.ads ada/restrict.adb ada/rident.ads ada/rtsfind.ads \
ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \
ada/sem_aux.ads ada/sem_ch8.ads ada/sem_elab.ads ada/sem_prag.ads \
ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
@@ -2434,19 +2440,18 @@ ada/hostparm.o : ada/ada.ads ada/a-unccon.ads ada/hostparm.ads \
ada/impunit.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/fname.ads ada/fname-uf.ads ada/gnat.ads ada/g-hesorg.ads \
- ada/g-htable.ads ada/hostparm.ads ada/impunit.ads ada/impunit.adb \
- ada/interfac.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
- ada/lib-sort.adb ada/namet.ads ada/namet.adb ada/nlists.ads \
- ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb \
- ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \
- ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
- ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
- ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
- ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/fname.ads \
+ ada/fname-uf.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
+ ada/hostparm.ads ada/impunit.ads ada/impunit.adb ada/interfac.ads \
+ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
+ ada/namet.adb ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
+ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
+ ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
+ ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
+ ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
+ ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/inline.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
@@ -2486,23 +2491,22 @@ ada/interfac.o : ada/interfac.ads ada/system.ads
ada/itypes.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/itypes.ads \
- ada/itypes.adb ada/namet.ads ada/nlists.ads ada/nlists.adb \
- ada/nmake.ads ada/opt.ads ada/output.ads ada/rident.ads ada/sem.ads \
- ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/snames.ads ada/stand.ads ada/system.ads ada/s-exctab.ads \
- ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/targparm.ads ada/tree_io.ads ada/types.ads \
- ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \
- ada/urealp.ads
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/gnat.ads \
+ ada/g-htable.ads ada/hostparm.ads ada/itypes.ads ada/itypes.adb \
+ ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/opt.ads \
+ ada/output.ads ada/rident.ads ada/sem.ads ada/sem_util.ads \
+ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
+ ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
+ ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/krunch.o : ada/ada.ads ada/a-unccon.ads ada/hostparm.ads \
ada/krunch.ads ada/krunch.adb ada/system.ads ada/s-exctab.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-unstyp.ads \
- ada/types.ads ada/unchconv.ads ada/unchdeal.ads
+ ada/s-stalib.ads ada/s-unstyp.ads ada/types.ads ada/unchconv.ads \
+ ada/unchdeal.ads
ada/layout.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -2558,10 +2562,9 @@ ada/lib-util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/lib.ads ada/lib-util.ads ada/lib-util.adb ada/namet.ads ada/opt.ads \
ada/osint.ads ada/osint-c.ads ada/output.ads ada/system.ads \
ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \
- ada/unchdeal.ads
+ ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
+ ada/types.ads ada/unchconv.ads ada/unchdeal.ads
ada/lib-writ.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/ali.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -2601,41 +2604,40 @@ ada/lib-xref.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
+ ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
+ ada/types.ads ada/uintp.ads ada/uintp.adb ada/unchconv.ads \
+ ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/lib.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
ada/alloc.ads ada/atree.ads ada/atree.adb ada/casing.ads ada/debug.ads \
- ada/einfo.ads ada/einfo.adb ada/elists.ads ada/fname.ads ada/gnat.ads \
- ada/g-hesorg.ads ada/g-hesorg.adb ada/g-htable.ads ada/hostparm.ads \
- ada/interfac.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
- ada/lib-sort.adb ada/namet.ads ada/namet.adb ada/nlists.ads \
- ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb \
- ada/sinput.ads ada/sinput.adb ada/snames.ads ada/stand.ads \
- ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
- ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-secsta.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
- ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
- ada/urealp.ads ada/widechar.ads
+ ada/einfo.ads ada/einfo.adb ada/fname.ads ada/gnat.ads ada/g-hesorg.ads \
+ ada/g-hesorg.adb ada/g-htable.ads ada/hostparm.ads ada/interfac.ads \
+ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
+ ada/namet.adb ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
+ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput.adb \
+ ada/snames.ads ada/stand.ads ada/stringt.ads ada/system.ads \
+ ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads ada/s-stalib.ads \
+ ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/live.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/fname.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
- ada/hostparm.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
- ada/lib-sort.adb ada/live.ads ada/live.adb ada/namet.ads ada/nlists.ads \
- ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads \
- ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/snames.ads ada/stand.ads ada/stringt.ads ada/system.ads \
- ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
- ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
- ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/fname.ads \
+ ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads ada/hostparm.ads \
+ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/live.ads \
+ ada/live.adb ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads \
+ ada/opt.ads ada/output.ads ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb \
+ ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \
+ ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
+ ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
+ ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads
ada/namet-sp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/gnat.ads \
@@ -2659,27 +2661,26 @@ ada/namet.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/nlists.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/elists.ads ada/gnat.ads \
- ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
- ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb \
- ada/sinput.ads ada/snames.ads ada/system.ads ada/s-exctab.ads \
- ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tree_io.ads ada/types.ads ada/uintp.ads ada/unchconv.ads \
- ada/unchdeal.ads ada/urealp.ads
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/hostparm.ads \
+ ada/namet.ads ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
+ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads \
+ ada/system.ads ada/s-exctab.ads ada/s-imenne.ads ada/s-memory.ads \
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/nmake.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/elists.ads ada/gnat.ads \
- ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
- ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \
- ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
- ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/hostparm.ads \
+ ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \
+ ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
+ ada/snames.ads ada/stand.ads ada/system.ads ada/s-exctab.ads \
+ ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
+ ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
+ ada/types.ads ada/uintp.ads ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads
ada/opt.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
ada/debug.ads ada/gnatvsn.ads ada/hostparm.ads ada/opt.ads ada/opt.adb \
@@ -2724,10 +2725,13 @@ ada/osint.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/targparm.ads ada/tree_io.ads ada/types.ads ada/unchconv.ads \
ada/unchdeal.ads ada/widechar.ads
-ada/output.o : ada/ada.ads ada/a-unccon.ads ada/a-uncdea.ads \
- ada/hostparm.ads ada/output.ads ada/output.adb ada/system.ads \
- ada/s-exctab.ads ada/s-os_lib.ads ada/s-stalib.ads ada/s-string.ads \
- ada/s-unstyp.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads
+ada/output.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
+ ada/a-uncdea.ads ada/hostparm.ads ada/output.ads ada/output.adb \
+ ada/system.ads ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads \
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-soflin.ads ada/s-stache.ads \
+ ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/types.ads ada/unchconv.ads \
+ ada/unchdeal.ads
ada/par.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
ada/alloc.ads ada/atree.ads ada/atree.adb ada/casing.ads ada/csets.ads \
@@ -2794,24 +2798,23 @@ ada/prepcomp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/repinfo.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/fname.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
- ada/hostparm.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
- ada/lib-sort.adb ada/namet.ads ada/nlists.ads ada/nlists.adb \
- ada/opt.ads ada/output.ads ada/output.adb ada/repinfo.ads \
- ada/repinfo.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
- ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
- ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
- ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
- ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/fname.ads \
+ ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads ada/hostparm.ads \
+ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
+ ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads ada/output.adb \
+ ada/repinfo.ads ada/repinfo.adb ada/sinfo.ads ada/sinfo.adb \
+ ada/sinput.ads ada/sinput.adb ada/snames.ads ada/stand.ads \
+ ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
+ ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
+ ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
+ ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/restrict.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/fname.ads \
ada/fname-uf.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
ada/hostparm.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
@@ -2866,6 +2869,22 @@ ada/s-carun8.o : ada/ada.ads ada/a-unccon.ads ada/system.ads \
ada/s-casuti.o : ada/system.ads ada/s-casuti.ads ada/s-casuti.adb
+ada/s-conca2.o : ada/system.ads ada/s-conca2.ads ada/s-conca2.adb
+
+ada/s-conca3.o : ada/system.ads ada/s-conca3.ads ada/s-conca3.adb
+
+ada/s-conca4.o : ada/system.ads ada/s-conca4.ads ada/s-conca4.adb
+
+ada/s-conca5.o : ada/system.ads ada/s-conca5.ads ada/s-conca5.adb
+
+ada/s-conca6.o : ada/system.ads ada/s-conca6.ads ada/s-conca6.adb
+
+ada/s-conca7.o : ada/system.ads ada/s-conca7.ads ada/s-conca7.adb
+
+ada/s-conca8.o : ada/system.ads ada/s-conca8.ads ada/s-conca8.adb
+
+ada/s-conca9.o : ada/system.ads ada/s-conca9.ads ada/s-conca9.adb
+
ada/s-crc32.o : ada/interfac.ads ada/system.ads ada/s-crc32.ads \
ada/s-crc32.adb
@@ -2884,7 +2903,7 @@ ada/s-htable.o : ada/ada.ads ada/a-uncdea.ads ada/system.ads \
ada/s-htable.ads ada/s-htable.adb
ada/s-imenne.o : ada/ada.ads ada/a-unccon.ads ada/system.ads \
- ada/s-imenne.ads ada/s-imenne.adb ada/s-stoele.ads ada/s-stoele.adb
+ ada/s-imenne.ads ada/s-imenne.adb
ada/s-imgenu.o : ada/ada.ads ada/a-unccon.ads ada/system.ads \
ada/s-imgenu.ads ada/s-imgenu.adb ada/s-secsta.ads ada/s-stoele.ads \
@@ -2982,10 +3001,10 @@ ada/scans.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/scn.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
ada/alloc.ads ada/atree.ads ada/atree.adb ada/casing.ads ada/csets.ads \
- ada/debug.ads ada/einfo.ads ada/elists.ads ada/err_vars.ads \
- ada/errout.ads ada/erroutc.ads ada/gnat.ads ada/g-byorma.ads \
- ada/g-htable.ads ada/hostparm.ads ada/interfac.ads ada/namet.ads \
- ada/namet.adb ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
+ ada/debug.ads ada/einfo.ads ada/err_vars.ads ada/errout.ads \
+ ada/erroutc.ads ada/gnat.ads ada/g-byorma.ads ada/g-htable.ads \
+ ada/hostparm.ads ada/interfac.ads ada/namet.ads ada/namet.adb \
+ ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
ada/restrict.ads ada/rident.ads ada/scans.ads ada/scn.ads ada/scn.adb \
ada/scng.ads ada/scng.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
ada/sinput.adb ada/snames.ads ada/stringt.ads ada/stringt.adb \
@@ -3015,18 +3034,18 @@ ada/scng.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
ada/alloc.ads ada/atree.ads ada/atree.adb ada/casing.ads ada/debug.ads \
ada/debug_a.ads ada/debug_a.adb ada/einfo.ads ada/einfo.adb \
- ada/elists.ads ada/err_vars.ads ada/errout.ads ada/erroutc.ads \
- ada/exp_tss.ads ada/expander.ads ada/fname.ads ada/gnat.ads \
- ada/g-hesorg.ads ada/g-htable.ads ada/hlo.ads ada/hostparm.ads \
- ada/inline.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
- ada/lib-load.ads ada/lib-sort.adb ada/namet.ads ada/nlists.ads \
- ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads \
- ada/restrict.ads ada/rident.ads ada/sem.ads ada/sem.adb \
- ada/sem_attr.ads ada/sem_ch10.ads ada/sem_ch11.ads ada/sem_ch12.ads \
- ada/sem_ch13.ads ada/sem_ch2.ads ada/sem_ch2.adb ada/sem_ch3.ads \
- ada/sem_ch4.ads ada/sem_ch5.ads ada/sem_ch6.ads ada/sem_ch7.ads \
- ada/sem_ch8.ads ada/sem_ch9.ads ada/sem_prag.ads ada/sem_util.ads \
- ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
+ ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_tss.ads \
+ ada/expander.ads ada/fname.ads ada/gnat.ads ada/g-hesorg.ads \
+ ada/g-htable.ads ada/hlo.ads ada/hostparm.ads ada/inline.ads \
+ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-load.ads \
+ ada/lib-sort.adb ada/namet.ads ada/nlists.ads ada/nlists.adb \
+ ada/nmake.ads ada/opt.ads ada/output.ads ada/restrict.ads \
+ ada/rident.ads ada/sem.ads ada/sem.adb ada/sem_attr.ads \
+ ada/sem_ch10.ads ada/sem_ch11.ads ada/sem_ch12.ads ada/sem_ch13.ads \
+ ada/sem_ch2.ads ada/sem_ch2.adb ada/sem_ch3.ads ada/sem_ch4.ads \
+ ada/sem_ch5.ads ada/sem_ch6.ads ada/sem_ch7.ads ada/sem_ch8.ads \
+ ada/sem_ch9.ads ada/sem_prag.ads ada/sem_util.ads ada/sinfo.ads \
+ ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
ada/stringt.ads ada/system.ads ada/s-carun8.ads ada/s-exctab.ads \
ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
ada/s-parame.ads ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads \
@@ -3102,32 +3121,34 @@ ada/sem_attr.o : ada/ada.ads ada/a-charac.ads ada/a-chlat1.ads \
ada/sem_aux.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/namet.ads \
- ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
- ada/sem_aux.ads ada/sem_aux.adb ada/sinfo.ads ada/sinfo.adb \
- ada/sinput.ads ada/snames.ads ada/stand.ads ada/system.ads \
- ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
- ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/gnat.ads \
+ ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/opt.ads ada/output.ads ada/sem_aux.ads \
+ ada/sem_aux.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
+ ada/snames.ads ada/stand.ads ada/system.ads ada/s-exctab.ads \
+ ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/sem_case.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/gnat.ads \
ada/g-hesorg.ads ada/g-hesorg.adb ada/g-htable.ads ada/hostparm.ads \
- ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \
- ada/opt.ads ada/output.ads ada/sem.ads ada/sem_aux.ads ada/sem_case.ads \
- ada/sem_case.adb ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads \
- ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/snames.ads ada/stand.ads ada/system.ads ada/s-exctab.ads \
- ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tbuild.ads ada/tree_io.ads ada/types.ads ada/uintp.ads \
- ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/interfac.ads ada/namet.ads ada/namet.adb ada/nlists.ads \
+ ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \
+ ada/sem.ads ada/sem_aux.ads ada/sem_case.ads ada/sem_case.adb \
+ ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \
+ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
+ ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
+ ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/tbuild.ads ada/tree_io.ads ada/types.ads \
+ ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads ada/widechar.ads
ada/sem_cat.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -3188,22 +3209,22 @@ ada/sem_ch10.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem_ch11.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
ada/casing.ads ada/checks.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
- ada/elists.ads ada/err_vars.ads ada/errout.ads ada/erroutc.ads \
- ada/exp_code.ads ada/fname.ads ada/gnat.ads ada/g-htable.ads \
- ada/hostparm.ads ada/lib.ads ada/lib-xref.ads ada/namet.ads \
- ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \
- ada/output.ads ada/restrict.ads ada/rident.ads ada/rtsfind.ads \
- ada/sem.ads ada/sem_aux.ads ada/sem_ch11.ads ada/sem_ch11.adb \
- ada/sem_ch5.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads \
- ada/sem_util.ads ada/sem_warn.ads ada/sem_warn.adb ada/sinfo.ads \
- ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
- ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
- ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
- ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_code.ads \
+ ada/fname.ads ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
+ ada/lib.ads ada/lib-xref.ads ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \
+ ada/restrict.ads ada/rident.ads ada/rtsfind.ads ada/sem.ads \
+ ada/sem_aux.ads ada/sem_ch11.ads ada/sem_ch11.adb ada/sem_ch5.ads \
+ ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads ada/sem_util.ads \
+ ada/sem_warn.ads ada/sem_warn.adb ada/sinfo.ads ada/sinfo.adb \
+ ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \
+ ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
+ ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
+ ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
+ ada/types.ads ada/uintp.ads ada/uintp.adb ada/unchconv.ads \
+ ada/unchdeal.ads ada/urealp.ads
ada/sem_ch12.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -3264,17 +3285,16 @@ ada/sem_ch13.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem_ch2.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/elists.ads \
- ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/gnat.ads \
- ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
- ada/nlists.adb ada/opt.ads ada/output.ads ada/restrict.ads \
- ada/rident.ads ada/sem_ch2.ads ada/sem_ch2.adb ada/sem_ch8.ads \
- ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
- ada/system.ads ada/s-carun8.ads ada/s-exctab.ads ada/s-htable.ads \
- ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tree_io.ads ada/types.ads ada/types.adb ada/uintp.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/err_vars.ads \
+ ada/errout.ads ada/erroutc.ads ada/hostparm.ads ada/namet.ads \
+ ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
+ ada/restrict.ads ada/rident.ads ada/sem_ch2.ads ada/sem_ch2.adb \
+ ada/sem_ch8.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
+ ada/snames.ads ada/stand.ads ada/system.ads ada/s-carun8.ads \
+ ada/s-exctab.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-rident.ads ada/s-stalib.ads ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/tree_io.ads ada/types.ads ada/types.adb ada/uintp.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/sem_ch3.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
@@ -3382,32 +3402,33 @@ ada/sem_ch6.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/einfo.adb ada/elists.ads ada/elists.adb ada/err_vars.ads \
ada/errout.ads ada/erroutc.ads ada/exp_ch6.ads ada/exp_ch7.ads \
ada/exp_ch9.ads ada/exp_disp.ads ada/exp_tss.ads ada/exp_util.ads \
- ada/expander.ads ada/fname.ads ada/freeze.ads ada/get_targ.ads \
- ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads ada/hostparm.ads \
- ada/inline.ads ada/interfac.ads ada/itypes.ads ada/layout.ads \
- ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb \
- ada/lib-xref.ads ada/namet.ads ada/namet.adb ada/nlists.ads \
- ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \
- ada/restrict.ads ada/rident.ads ada/rtsfind.ads ada/scans.ads \
- ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_attr.ads \
- ada/sem_aux.ads ada/sem_cat.ads ada/sem_ch10.ads ada/sem_ch12.ads \
- ada/sem_ch3.ads ada/sem_ch4.ads ada/sem_ch5.ads ada/sem_ch6.ads \
- ada/sem_ch6.adb ada/sem_ch8.ads ada/sem_disp.ads ada/sem_dist.ads \
- ada/sem_elim.ads ada/sem_eval.ads ada/sem_mech.ads ada/sem_prag.ads \
- ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \
- ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinfo-cn.ads \
- ada/sinput.ads ada/sinput.adb ada/snames.ads ada/snames.adb \
- ada/stand.ads ada/stringt.ads ada/stringt.adb ada/style.ads \
- ada/styleg.ads ada/styleg.adb ada/stylesw.ads ada/system.ads \
- ada/s-carun8.ads ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads \
- ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \
- ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \
- ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
- ada/unchdeal.ads ada/urealp.ads ada/validsw.ads ada/widechar.ads
+ ada/expander.ads ada/fname.ads ada/fname-uf.ads ada/freeze.ads \
+ ada/get_targ.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
+ ada/hostparm.ads ada/inline.ads ada/interfac.ads ada/itypes.ads \
+ ada/layout.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
+ ada/lib-sort.adb ada/lib-xref.ads ada/namet.ads ada/namet.adb \
+ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \
+ ada/output.ads ada/restrict.ads ada/restrict.adb ada/rident.ads \
+ ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \
+ ada/sem.ads ada/sem_attr.ads ada/sem_aux.ads ada/sem_cat.ads \
+ ada/sem_ch10.ads ada/sem_ch12.ads ada/sem_ch3.ads ada/sem_ch4.ads \
+ ada/sem_ch5.ads ada/sem_ch6.ads ada/sem_ch6.adb ada/sem_ch8.ads \
+ ada/sem_disp.ads ada/sem_dist.ads ada/sem_elim.ads ada/sem_eval.ads \
+ ada/sem_mech.ads ada/sem_prag.ads ada/sem_res.ads ada/sem_type.ads \
+ ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads ada/sinfo.ads \
+ ada/sinfo.adb ada/sinfo-cn.ads ada/sinput.ads ada/sinput.adb \
+ ada/snames.ads ada/snames.adb ada/stand.ads ada/stringt.ads \
+ ada/stringt.adb ada/style.ads ada/styleg.ads ada/styleg.adb \
+ ada/stylesw.ads ada/system.ads ada/s-carun8.ads ada/s-crc32.ads \
+ ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \
+ ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
+ ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \
+ ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads \
+ ada/widechar.ads
ada/sem_ch7.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -3520,23 +3541,24 @@ ada/sem_disp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/restrict.ads ada/restrict.adb ada/rident.ads ada/rtsfind.ads \
ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \
ada/sem_attr.ads ada/sem_aux.ads ada/sem_ch6.ads ada/sem_ch7.ads \
- ada/sem_ch8.ads ada/sem_disp.ads ada/sem_disp.adb ada/sem_eval.ads \
- ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \
- ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
- ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \
- ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \
- ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \
- ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
- ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads ada/types.ads \
- ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
- ada/unchdeal.ads ada/urealp.ads ada/validsw.ads ada/widechar.ads
+ ada/sem_ch8.ads ada/sem_disp.ads ada/sem_disp.adb ada/sem_elim.ads \
+ ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \
+ ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
+ ada/snames.ads ada/stand.ads ada/stringt.ads ada/style.ads \
+ ada/styleg.ads ada/styleg.adb ada/stylesw.ads ada/system.ads \
+ ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
+ ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
+ ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \
+ ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads \
+ ada/widechar.ads
ada/sem_dist.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_dist.ads \
ada/exp_tss.ads ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \
@@ -3546,11 +3568,11 @@ ada/sem_dist.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \
ada/stringt.adb ada/system.ads ada/s-carun8.ads ada/s-exctab.ads \
ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/tbuild.ads ada/tree_io.ads \
- ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tbuild.ads ada/tree_io.ads ada/types.ads ada/types.adb \
+ ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads
ada/sem_elab.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -3583,7 +3605,7 @@ ada/sem_elab.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem_elim.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/gnat.ads \
ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
ada/nlists.adb ada/opt.ads ada/output.ads ada/sem_elim.ads \
@@ -3629,7 +3651,7 @@ ada/sem_eval.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem_intr.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/fname.ads \
ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads ada/hostparm.ads \
ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
@@ -3639,28 +3661,27 @@ ada/sem_intr.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/snames.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/targparm.ads ada/tree_io.ads ada/types.ads \
- ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
- ada/unchdeal.ads ada/urealp.ads
+ ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/sem_maps.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/namet.ads \
- ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
- ada/sem_maps.ads ada/sem_maps.adb ada/sinfo.ads ada/sinfo.adb \
- ada/sinput.ads ada/snames.ads ada/stand.ads ada/system.ads \
- ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
- ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/gnat.ads \
+ ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/opt.ads ada/output.ads ada/sem_maps.ads \
+ ada/sem_maps.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
+ ada/snames.ads ada/stand.ads ada/system.ads ada/s-exctab.ads \
+ ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/sem_mech.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/gnat.ads \
ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads ada/rident.ads \
@@ -3750,7 +3771,7 @@ ada/sem_res.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem_smem.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/gnat.ads \
ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
ada/nlists.adb ada/opt.ads ada/output.ads ada/sem_aux.ads \
@@ -3809,29 +3830,29 @@ ada/sem_util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/stringt.ads ada/stringt.adb ada/style.ads ada/styleg.ads \
ada/styleg.adb ada/stylesw.ads ada/system.ads ada/s-carun8.ads \
ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads \
- ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \
- ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \
- ada/types.adb ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/s-htable.adb ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \
+ ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
+ ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \
+ ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \
ada/widechar.ads
ada/sem_vfpt.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
ada/casing.ads ada/cstand.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
- ada/elists.ads ada/gnat.ads ada/g-htable.ads ada/hostparm.ads \
- ada/namet.ads ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
- ada/rident.ads ada/sem_vfpt.ads ada/sem_vfpt.adb ada/sinfo.ads \
- ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
- ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
- ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
- ada/tree_io.ads ada/ttypef.ads ada/types.ads ada/uintp.ads \
- ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
+ ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/namet.ads \
+ ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads ada/rident.ads \
+ ada/sem_vfpt.ads ada/sem_vfpt.adb ada/sinfo.ads ada/sinfo.adb \
+ ada/sinput.ads ada/snames.ads ada/stand.ads ada/system.ads \
+ ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
+ ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-stalib.ads \
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
+ ada/table.ads ada/table.adb ada/targparm.ads ada/tree_io.ads \
+ ada/ttypef.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads
ada/sem_warn.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
@@ -3861,11 +3882,10 @@ ada/sem_warn.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo-cn.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/elists.ads ada/gnat.ads \
- ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
- ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads \
- ada/sinfo-cn.ads ada/sinfo-cn.adb ada/sinput.ads ada/snames.ads \
- ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/hostparm.ads \
+ ada/namet.ads ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
+ ada/sinfo.ads ada/sinfo-cn.ads ada/sinfo-cn.adb ada/sinput.ads \
+ ada/snames.ads ada/system.ads ada/s-exctab.ads ada/s-imenne.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
@@ -3873,7 +3893,7 @@ ada/sinfo-cn.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/elists.ads ada/gnat.ads \
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/gnat.ads \
ada/g-htable.ads ada/hostparm.ads ada/namet.ads ada/nlists.ads \
ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb \
ada/sinput.ads ada/snames.ads ada/system.ads ada/s-exctab.ads \
@@ -3888,10 +3908,9 @@ ada/sinput-c.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/hostparm.ads ada/namet.ads ada/opt.ads ada/output.ads \
ada/sinput.ads ada/sinput-c.ads ada/sinput-c.adb ada/system.ads \
ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
- ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
- ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/unchconv.ads \
- ada/unchdeal.ads
+ ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
+ ada/types.ads ada/unchconv.ads ada/unchdeal.ads
ada/sinput-d.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/debug.ads \
@@ -3905,22 +3924,22 @@ ada/sinput-d.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinput-l.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads ada/elists.ads \
+ ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads \
ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/fname.ads \
ada/gnat.ads ada/g-dyntab.ads ada/g-dyntab.adb ada/g-hesorg.ads \
- ada/g-htable.ads ada/hostparm.ads ada/interfac.ads ada/namet.ads \
- ada/nlists.ads ada/nlists.adb ada/opt.ads ada/osint.ads ada/output.ads \
- ada/prep.ads ada/prepcomp.ads ada/scans.ads ada/scn.ads ada/scng.ads \
- ada/scng.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/sinput-l.ads ada/sinput-l.adb ada/snames.ads ada/stringt.ads \
- ada/style.ads ada/styleg.ads ada/styleg.adb ada/stylesw.ads \
- ada/system.ads ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads \
- ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
- ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads \
- ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
+ ada/hostparm.ads ada/interfac.ads ada/namet.ads ada/nlists.ads \
+ ada/nlists.adb ada/opt.ads ada/osint.ads ada/output.ads ada/prep.ads \
+ ada/prepcomp.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \
+ ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput-l.ads \
+ ada/sinput-l.adb ada/snames.ads ada/stringt.ads ada/style.ads \
+ ada/styleg.ads ada/styleg.adb ada/stylesw.ads ada/system.ads \
+ ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-soflin.ads \
+ ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads \
+ ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
+ ada/types.ads ada/uintp.ads ada/unchconv.ads ada/unchdeal.ads \
+ ada/urealp.ads ada/widechar.ads
ada/sinput.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/debug.ads \
@@ -3945,55 +3964,50 @@ ada/snames.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sprint.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
- ada/elists.ads ada/fname.ads ada/gnat.ads ada/g-hesorg.ads \
- ada/g-htable.ads ada/hostparm.ads ada/interfac.ads ada/lib.ads \
- ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
- ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/opt.ads \
- ada/output.ads ada/output.adb ada/rtsfind.ads ada/sem_util.ads \
- ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput.adb \
- ada/sinput-d.ads ada/snames.ads ada/sprint.ads ada/sprint.adb \
- ada/stand.ads ada/stringt.ads ada/stringt.adb ada/system.ads \
- ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
- ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads ada/s-stalib.ads \
- ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
- ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \
- ada/widechar.ads
+ ada/fname.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
+ ada/hostparm.ads ada/interfac.ads ada/lib.ads ada/lib.adb \
+ ada/lib-list.adb ada/lib-sort.adb ada/namet.ads ada/namet.adb \
+ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads \
+ ada/output.adb ada/rtsfind.ads ada/sem_util.ads ada/sinfo.ads \
+ ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/sinput-d.ads \
+ ada/snames.ads ada/sprint.ads ada/sprint.adb ada/stand.ads \
+ ada/stringt.ads ada/stringt.adb ada/system.ads ada/s-exctab.ads \
+ ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \
+ ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
+ ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \
+ ada/urealp.adb ada/widechar.ads
-ada/stand.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
- ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads \
- ada/namet.ads ada/opt.ads ada/output.ads ada/stand.ads ada/stand.adb \
- ada/system.ads ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tree_io.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads
+ada/stand.o : ada/ada.ads ada/a-unccon.ads ada/a-uncdea.ads ada/stand.ads \
+ ada/stand.adb ada/system.ads ada/s-exctab.ads ada/s-os_lib.ads \
+ ada/s-stalib.ads ada/s-string.ads ada/s-unstyp.ads ada/tree_io.ads \
+ ada/types.ads ada/unchconv.ads ada/unchdeal.ads
ada/stringt.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads \
ada/namet.ads ada/opt.ads ada/output.ads ada/stringt.ads \
ada/stringt.adb ada/system.ads ada/s-carun8.ads ada/s-exctab.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
- ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
- ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
- ada/tree_io.ads ada/types.ads ada/types.adb ada/unchconv.ads \
- ada/unchdeal.ads
+ ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
+ ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/types.adb \
+ ada/unchconv.ads ada/unchdeal.ads
ada/style.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads ada/elists.ads \
- ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/gnat.ads \
- ada/g-htable.ads ada/hostparm.ads ada/interfac.ads ada/namet.ads \
- ada/namet.adb ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads \
- ada/scans.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput.adb \
- ada/snames.ads ada/stand.ads ada/style.ads ada/style.adb ada/styleg.ads \
- ada/styleg.adb ada/stylesw.ads ada/system.ads ada/s-exctab.ads \
- ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
- ada/s-parame.ads ada/s-secsta.ads ada/s-stalib.ads ada/s-stoele.ads \
- ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
- ada/types.ads ada/uintp.ads ada/unchconv.ads ada/unchdeal.ads \
- ada/urealp.ads ada/widechar.ads
+ ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads \
+ ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/hostparm.ads \
+ ada/interfac.ads ada/namet.ads ada/namet.adb ada/nlists.ads \
+ ada/nlists.adb ada/opt.ads ada/output.ads ada/scans.ads ada/sinfo.ads \
+ ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
+ ada/stand.ads ada/style.ads ada/style.adb ada/styleg.ads ada/styleg.adb \
+ ada/stylesw.ads ada/system.ads ada/s-exctab.ads ada/s-imenne.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
+ ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+ ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+ ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
+ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/styleg.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/csets.ads \
@@ -4008,8 +4022,8 @@ ada/styleg.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/stylesw.o : ada/ada.ads ada/a-unccon.ads ada/a-uncdea.ads \
ada/debug.ads ada/hostparm.ads ada/opt.ads ada/stylesw.ads \
ada/stylesw.adb ada/system.ads ada/s-exctab.ads ada/s-stalib.ads \
- ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-unstyp.ads \
- ada/s-wchcon.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads
+ ada/s-string.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/types.ads \
+ ada/unchconv.ads ada/unchdeal.ads
ada/switch-b.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/gnatvsn.ads \
@@ -4124,7 +4138,8 @@ ada/treepr.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sem_mech.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
+ ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-soflin.ads \
+ ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
ada/table.ads ada/table.adb ada/tree_io.ads ada/treepr.ads \
ada/treepr.adb ada/treeprs.ads ada/types.ads ada/uintp.ads \
@@ -4163,18 +4178,18 @@ ada/uintp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/uname.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/atree.ads ada/atree.adb \
- ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
- ada/fname.ads ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads \
- ada/hostparm.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
- ada/lib-sort.adb ada/namet.ads ada/nlists.ads ada/nlists.adb \
- ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
- ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
- ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
- ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
- ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
- ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
- ada/uintp.adb ada/uname.ads ada/uname.adb ada/unchconv.ads \
- ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
+ ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb ada/fname.ads \
+ ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads ada/hostparm.ads \
+ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \
+ ada/nlists.ads ada/nlists.adb ada/opt.ads ada/output.ads ada/sinfo.ads \
+ ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
+ ada/stand.ads ada/stringt.ads ada/system.ads ada/s-exctab.ads \
+ ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
+ ada/s-parame.ads ada/s-stalib.ads ada/s-string.ads ada/s-traent.ads \
+ ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+ ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
+ ada/uname.adb ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \
+ ada/widechar.ads
ada/urealp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/gnat.ads \
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index a1405380198..ac0ae4c7880 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -374,7 +374,7 @@ PREFIX_REAL_OBJS = ../prefix.o \
../../libiberty/xexit.o
# By default, build socket support units. On platforms that do not support
-# sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
+# sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
# to LIBGNAT_TARGET_PAIRS.
GNATRTL_SOCKETS_OBJS = g-soccon$(objext) g-socket$(objext) g-socthi$(objext) \
@@ -403,7 +403,7 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
s-interr.adb<s-interr-hwint.adb \
s-intman.ads<s-intman-vxworks.ads \
s-intman.adb<s-intman-vxworks.adb \
- s-osinte.adb<s-osinte-vxworks-kernel.adb \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
s-osprim.adb<s-osprim-vxworks.adb \
s-parame.ads<s-parame-vxworks.ads \
@@ -419,6 +419,8 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-vxworks-m68k.ads
TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
@@ -447,6 +449,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
s-intman.ads<s-intman-vxworks.ads \
s-intman.adb<s-intman-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osprim.adb<s-osprim-vxworks.adb \
s-parame.ads<s-parame-vxworks.ads \
s-parame.adb<s-parame-vxworks.adb \
@@ -459,7 +462,9 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
- g-sttsne.ads<g-sttsne-locking.ads
+ g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb
TOOLS_TARGET_PAIRS=\
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
@@ -476,7 +481,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
- s-osinte.adb<s-osinte-vxworks.adb \
s-vxwext.ads<s-vxwext-rtp.ads \
s-vxwext.adb<s-vxwext-rtp.adb \
s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
@@ -491,6 +495,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
s-vxwext.ads<s-vxwext-kernel.ads \
+ s-vxwext.adb<s-vxwext-kernel.adb \
system.ads<system-vxworks-ppc-kernel.ads
else
LIBGNAT_TARGET_PAIRS += \
@@ -519,7 +524,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
s-interr.adb<s-interr-hwint.adb \
s-intman.ads<s-intman-vxworks.ads \
s-intman.adb<s-intman-vxworks.adb \
- s-osinte.adb<s-osinte-vxworks-kernel.adb \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
s-osprim.adb<s-osprim-vxworks.adb \
s-parame.ads<s-parame-ae653.ads \
@@ -527,12 +532,16 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
s-taprop.adb<s-taprop-vxworks.adb \
s-taspri.ads<s-taspri-vxworks.ads \
s-tpopsp.adb<s-tpopsp-vxworks.adb \
+ s-vxwext.adb<s-vxwext-noints.adb \
+ s-vxwext.ads<s-vxwext-vthreads.ads \
s-vxwork.ads<s-vxwork-ppc.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-vxworks-ppc-vthread.ads
TOOLS_TARGET_PAIRS=\
@@ -576,7 +585,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae,$(targ))),)
s-interr.adb<s-interr-hwint.adb \
s-intman.ads<s-intman-vxworks.ads \
s-intman.adb<s-intman-vxworks.adb \
- s-osinte.adb<s-osinte-vxworks-kernel.adb \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
s-osprim.adb<s-osprim-vxworks.adb \
s-parame.ads<s-parame-ae653.ads \
@@ -584,12 +593,16 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae,$(targ))),)
s-taspri.ads<s-taspri-vxworks.ads \
s-thread.adb<s-thread-ae653.adb \
s-tpopsp.adb<s-tpopsp-vxworks.adb \
+ s-vxwext.adb<s-vxwext-noints.adb \
+ s-vxwext.ads<s-vxwext-vthreads.ads \
s-vxwork.ads<s-vxwork-x86.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-vxworks-x86.ads
TOOLS_TARGET_PAIRS=\
@@ -624,7 +637,7 @@ ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
s-interr.adb<s-interr-hwint.adb \
s-intman.ads<s-intman-vxworks.ads \
s-intman.adb<s-intman-vxworks.adb \
- s-osinte.adb<s-osinte-vxworks-kernel.adb \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
s-osprim.adb<s-osprim-vxworks.adb \
s-parame.ads<s-parame-vxworks.ads \
@@ -640,6 +653,8 @@ ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-vxworks-sparcv9.ads \
TOOLS_TARGET_PAIRS=\
@@ -657,6 +672,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-vxworks.ads \
i-vxwork.ads<i-vxwork-x86.ads \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.ads<s-intman-vxworks.ads \
@@ -676,7 +692,9 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
- g-sttsne.ads<g-sttsne-locking.ads
+ g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb
TOOLS_TARGET_PAIRS=\
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
@@ -693,7 +711,6 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
- s-osinte.adb<s-osinte-vxworks.adb \
s-vxwext.ads<s-vxwext-rtp.ads \
s-vxwext.adb<s-vxwext-rtp.adb \
s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
@@ -703,11 +720,12 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
else
LIBGNAT_TARGET_PAIRS += \
s-interr.adb<s-interr-hwint.adb \
- s-tpopsp.adb<s-tpopsp-vxworks.adb
+ s-tpopsp.adb<s-tpopsp-vxworks.adb
ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
s-vxwext.ads<s-vxwext-kernel.ads \
+ s-vxwext.adb<s-vxwext-kernel.adb \
system.ads<system-vxworks-x86-kernel.ads
else
LIBGNAT_TARGET_PAIRS += \
@@ -731,7 +749,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
s-interr.adb<s-interr-hwint.adb \
s-intman.ads<s-intman-vxworks.ads \
s-intman.adb<s-intman-vxworks.adb \
- s-osinte.adb<s-osinte-vxworks-kernel.adb \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
s-osprim.adb<s-osprim-vxworks.adb \
s-parame.ads<s-parame-vxworks.ads \
@@ -747,6 +765,8 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-vxworks-arm.ads
TOOLS_TARGET_PAIRS=\
@@ -768,7 +788,7 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
s-interr.adb<s-interr-hwint.adb \
s-intman.ads<s-intman-vxworks.ads \
s-intman.adb<s-intman-vxworks.adb \
- s-osinte.adb<s-osinte-vxworks-kernel.adb \
+ s-osinte.adb<s-osinte-vxworks.adb \
s-osinte.ads<s-osinte-vxworks.ads \
s-osprim.adb<s-osprim-vxworks.adb \
s-parame.ads<s-parame-vxworks.ads \
@@ -784,6 +804,8 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
g-stsifd.adb<g-stsifd-sockets.adb \
g-sttsne.adb<g-sttsne-vxworks.adb \
g-sttsne.ads<g-sttsne-locking.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-vxworks-mips.ads
TOOLS_TARGET_PAIRS=\
@@ -915,11 +937,9 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
g-bytswa.adb<g-bytswa-x86.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
- s-osprim.adb<s-osprim-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
- g-sercom.adb<g-sercom-linux.adb \
- system.ads<system-linux-x86.ads
+ g-sercom.adb<g-sercom-linux.adb
ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
@@ -931,7 +951,9 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
a-rttiev.ads<a-rttiev-linux-marte.ads \
s-osinte.adb<s-osinte-linux-marte.adb \
s-osinte.ads<s-osinte-linux-marte.ads \
- s-taprop.adb<s-taprop-linux-marte.adb
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-linux-marte.adb \
+ system.ads<system-linux-x86.ads
EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
@@ -945,15 +967,19 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
s-osinte.ads<s-osinte-linux-xenomai.ads \
- s-taprop.adb<s-taprop-linux-xenomai.adb
+ s-osprim.adb<s-osprim-linux-xenomai.adb \
+ s-taprop.adb<s-taprop-linux-xenomai.adb \
+ system.ads<system-linux-x86-xenomai.ads
- EH_MECHANISM=
+ EH_MECHANISM=-gcc
else
LIBGNAT_TARGET_PAIRS += \
s-osinte.ads<s-osinte-linux.ads \
+ s-osprim.adb<s-osprim-posix.adb \
s-taprop.adb<s-taprop-linux.adb \
s-tasinf.ads<s-tasinf-linux.ads \
- s-tasinf.adb<s-tasinf-linux.adb
+ s-tasinf.adb<s-tasinf-linux.adb \
+ system.ads<system-linux-x86.ads
EH_MECHANISM=-gcc
endif
@@ -1041,7 +1067,9 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
s-tasinf.ads<s-tasinf-linux.ads \
s-tasinf.adb<s-tasinf-linux.adb \
s-taspri.ads<s-taspri-posix-noaltstack.ads \
- s-tpopsp.adb<s-tpopsp-posix-foreign.adb
+ s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb
LIBGNAT_TARGET_PAIRS_32 = \
system.ads<system-linux-s390.ads
@@ -1216,6 +1244,8 @@ ifeq ($(strip $(filter-out lynxos,$(osys))),)
s-taprop.adb<s-taprop-lynxos.adb \
s-taspri.ads<s-taspri-lynxos.ads \
s-tpopsp.adb<s-tpopsp-lynxos.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-lynxos-x86.ads
PREFIX_OBJS=$(PREFIX_REAL_OBJS)
@@ -1233,6 +1263,8 @@ ifeq ($(strip $(filter-out lynxos,$(osys))),)
s-taprop.adb<s-taprop-lynxos.adb \
s-taspri.ads<s-taspri-lynxos.ads \
s-tpopsp.adb<s-tpopsp-lynxos.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-lynxos-ppc.ads
endif
endif
@@ -1251,7 +1283,9 @@ ifeq ($(strip $(filter-out rtems%,$(osys))),)
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-rtems.adb \
s-stchop.adb<s-stchop-rtems.adb \
- s-interr.adb<s-interr-hwint.adb
+ s-interr.adb<s-interr-hwint.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb
endif
ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
@@ -1302,6 +1336,8 @@ ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
s-osinte.adb<s-osinte-vms-ia64.adb \
s-osinte.ads<s-osinte-vms-ia64.ads \
s-vaflop.adb<s-vaflop-vms-ia64.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-vms-ia64.ads
LIBGNAT_TARGET_PAIRS_AUX2 = \
@@ -1361,6 +1397,7 @@ endif
s-osprim.adb<s-osprim-vms.adb \
s-osprim.ads<s-osprim-vms.ads \
s-taprop.adb<s-taprop-vms.adb \
+ s-tasdeb.adb<s-tasdeb-vms.adb \
s-taspri.ads<s-taspri-vms.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
s-tpopde.adb<s-tpopde-vms.adb \
@@ -1600,6 +1637,8 @@ ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
s-tpopsp.adb<s-tpopsp-posix-foreign.adb
LIBGNAT_TARGET_PAIRS_32 = \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-linux-sparc.ads
LIBGNAT_TARGET_PAIRS_64 = \
@@ -1640,6 +1679,8 @@ ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
s-tasinf.adb<s-tasinf-linux.adb \
s-taspri.ads<s-taspri-posix-noaltstack.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-linux-hppa.ads
TOOLS_TARGET_PAIRS = \
@@ -1731,6 +1772,8 @@ ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
s-tasinf.adb<s-tasinf-linux.adb \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
s-taspri.ads<s-taspri-posix-noaltstack.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-linux-alpha.ads
TOOLS_TARGET_PAIRS = \
@@ -1790,6 +1833,8 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
a-numaux.ads<a-numaux-x86.ads \
a-numaux.adb<a-numaux-x86.adb
ifeq ($(strip $(MULTISUBDIR)),/x86_64)
@@ -1814,6 +1859,8 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
a-numaux.ads<a-numaux-x86.ads \
a-numaux.adb<a-numaux-x86.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-darwin-x86_64.ads
endif
@@ -1830,6 +1877,8 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
a-numaux.ads<a-numaux-darwin.ads \
a-numaux.adb<a-numaux-darwin.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
system.ads<system-darwin-ppc.ads
endif
@@ -2236,11 +2285,13 @@ gnatlib-shared-darwin:
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
$(SO_OPTS) \
+ -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(MISCLIB) -lm
cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \
$(SO_OPTS) \
+ -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
libgnat$(soext)
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index b5d1205f5ee..cbb892933f1 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -91,8 +91,6 @@ static const char *gnat_dwarf_name (tree, int);
static tree gnat_return_tree (tree);
static int gnat_eh_type_covers (tree, tree);
static void gnat_parse_file (int);
-static rtx gnat_expand_expr (tree, rtx, enum machine_mode, int,
- rtx *);
static void internal_error_function (const char *, va_list *);
static tree gnat_type_max_size (const_tree);
@@ -124,8 +122,6 @@ static tree gnat_type_max_size (const_tree);
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL gnat_finish_incomplete_decl
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET gnat_get_alias_set
-#undef LANG_HOOKS_EXPAND_EXPR
-#define LANG_HOOKS_EXPAND_EXPR gnat_expand_expr
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE gnat_mark_addressable
#undef LANG_HOOKS_PRINT_DECL
@@ -612,45 +608,6 @@ gnat_printable_name (tree decl, int verbosity)
return ada_name;
}
-/* Expands GNAT-specific GCC tree nodes. The only ones we support
- here are and NULL_EXPR. */
-
-static rtx
-gnat_expand_expr (tree exp, rtx target, enum machine_mode tmode,
- int modifier, rtx *alt_rtl)
-{
- tree type = TREE_TYPE (exp);
- tree new;
-
- /* Update EXP to be the new expression to expand. */
- switch (TREE_CODE (exp))
- {
-#if 0
- case ALLOCATE_EXPR:
- return
- allocate_dynamic_stack_space
- (expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, TYPE_MODE (sizetype),
- EXPAND_NORMAL),
- NULL_RTX, tree_low_cst (TREE_OPERAND (exp, 1), 1));
-#endif
-
- case UNCONSTRAINED_ARRAY_REF:
- /* If we are evaluating just for side-effects, just evaluate our
- operand. Otherwise, abort since this code should never appear
- in a tree to be evaluated (objects aren't unconstrained). */
- if (target == const0_rtx || TREE_CODE (type) == VOID_TYPE)
- return expand_expr (TREE_OPERAND (exp, 0), const0_rtx,
- VOIDmode, modifier);
-
- /* ... fall through ... */
-
- default:
- gcc_unreachable ();
- }
-
- return expand_expr_real (new, target, tmode, modifier, alt_rtl);
-}
-
/* Do nothing (return the tree node passed). */
static tree
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 981b91310f9..0b46b56a89e 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -544,21 +544,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
= build_qualified_type (TREE_TYPE (raise_nodefer_decl),
TYPE_QUAL_VOLATILE);
- long_long_float_type
- = gnat_to_gnu_entity (Base_Type (standard_long_long_float), NULL_TREE, 0);
-
- if (TREE_CODE (TREE_TYPE (long_long_float_type)) == INTEGER_TYPE)
- {
- /* In this case, the builtin floating point types are VAX float,
- so make up a type for use. */
- longest_float_type_node = make_node (REAL_TYPE);
- TYPE_PRECISION (longest_float_type_node) = LONG_DOUBLE_TYPE_SIZE;
- layout_type (longest_float_type_node);
- record_builtin_type ("longest float type", longest_float_type_node);
- }
- else
- longest_float_type_node = TREE_TYPE (long_long_float_type);
-
/* Build the special descriptor type and its null node if needed. */
if (TARGET_VTABLE_USES_DESCRIPTORS)
{
@@ -577,10 +562,26 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
null_list = tree_cons (field, null_node, null_list);
}
- finish_record_type (fdesc_type_node, nreverse (field_list), 0, false);
+ finish_record_type (fdesc_type_node, nreverse (field_list), 0, true);
+ record_builtin_type ("descriptor", fdesc_type_node);
null_fdesc_node = gnat_build_constructor (fdesc_type_node, null_list);
}
+ long_long_float_type
+ = gnat_to_gnu_entity (Base_Type (standard_long_long_float), NULL_TREE, 0);
+
+ if (TREE_CODE (TREE_TYPE (long_long_float_type)) == INTEGER_TYPE)
+ {
+ /* In this case, the builtin floating point types are VAX float,
+ so make up a type for use. */
+ longest_float_type_node = make_node (REAL_TYPE);
+ TYPE_PRECISION (longest_float_type_node) = LONG_DOUBLE_TYPE_SIZE;
+ layout_type (longest_float_type_node);
+ record_builtin_type ("longest float type", longest_float_type_node);
+ }
+ else
+ longest_float_type_node = TREE_TYPE (long_long_float_type);
+
/* Dummy objects to materialize "others" and "all others" in the exception
tables. These are exported by a-exexpr.adb, so see this unit for the
types to use. */
@@ -2510,12 +2511,19 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target)
gnat_formal);
}
- /* Remove any unpadding from the object and reset the copy. */
- if (TREE_CODE (gnu_name) == COMPONENT_REF
- && ((TREE_CODE (TREE_TYPE (TREE_OPERAND (gnu_name, 0)))
- == RECORD_TYPE)
- && (TYPE_IS_PADDING_P
- (TREE_TYPE (TREE_OPERAND (gnu_name, 0))))))
+ /* If the actual type of the object is already the nominal type,
+ we have nothing to do, except if the size is self-referential
+ in which case we'll remove the unpadding below. */
+ if (TREE_TYPE (gnu_name) == gnu_name_type
+ && !CONTAINS_PLACEHOLDER_P (TYPE_SIZE (gnu_name_type)))
+ ;
+
+ /* Otherwise remove unpadding from the object and reset the copy. */
+ else if (TREE_CODE (gnu_name) == COMPONENT_REF
+ && ((TREE_CODE (TREE_TYPE (TREE_OPERAND (gnu_name, 0)))
+ == RECORD_TYPE)
+ && (TYPE_IS_PADDING_P
+ (TREE_TYPE (TREE_OPERAND (gnu_name, 0))))))
gnu_name = gnu_copy = TREE_OPERAND (gnu_name, 0);
/* Otherwise convert to the nominal type of the object if it's
@@ -2528,7 +2536,7 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target)
else if (TREE_CODE (gnu_name_type) == RECORD_TYPE
&& (TYPE_JUSTIFIED_MODULAR_P (gnu_name_type)
|| smaller_packable_type_p (TREE_TYPE (gnu_name),
- gnu_name_type)))
+ gnu_name_type)))
gnu_name = convert (gnu_name_type, gnu_name);
/* Make a SAVE_EXPR to both properly account for potential side
@@ -6316,7 +6324,7 @@ build_binary_op_trapv (enum tree_code code, tree gnu_type, tree left,
int needed_precision = precision * 2;
if (code == MULT_EXPR && precision == 64)
- {
+ {
tree int_64 = gnat_type_for_size (64, 0);
return convert (gnu_type, build_call_2_expr (mulv64_decl,
@@ -6325,7 +6333,7 @@ build_binary_op_trapv (enum tree_code code, tree gnu_type, tree left,
}
else if (needed_precision <= BITS_PER_WORD
- || (code == MULT_EXPR
+ || (code == MULT_EXPR
&& needed_precision <= LONG_LONG_TYPE_SIZE))
{
tree wide_type = gnat_type_for_size (needed_precision, 0);
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index a59fc30d1ca..3d495ce3c8b 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -339,6 +339,12 @@ begin
List_Representation_Info_Mechanisms := True;
end if;
+ -- Force Target_Strict_Alignment true if debug flag -gnatd.a is set
+
+ if Debug_Flag_Dot_A then
+ Ttypes.Target_Strict_Alignment := True;
+ end if;
+
-- Disable static allocation of dispatch tables if -gnatd.t or if layout
-- is enabled. The front end's layout phase currently treats types that
-- have discriminant-dependent arrays as not being static even when a
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index adb319341f4..322e6fe71ce 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -1041,7 +1041,15 @@ value, and the loop above will be optimized away.
The use of @code{Assume_No_Invalid_Values (On)} is appropriate if
you know your code is free of uninitialized variables and other
possible sources of invalid representations, and may result in
-more efficient code.
+more efficient code. A program that accesses an invalid representation
+with this pragma in effect is erroneous, so no guarantees can be made
+about its behavior.
+
+It is peculiar though permissible to use this pragma in conjunction
+with validity checking (-gnatVa). In such cases, accessing invalid
+values will generally give an exception, though formally the program
+is erroneous so there are no guarantees that this will always be the
+case, and it is recommended that these two options not be used together.
@node Pragma Ast_Entry
@unnumberedsec Pragma Ast_Entry
@@ -5189,9 +5197,9 @@ also be used as a configuration pragma.
The fourth form, with an On|Off parameter and a string, is used to
control individual messages, based on their text. The string argument
is a pattern that is used to match against the text of individual
-warning messages (not including the initial "warnings: " tag).
+warning messages (not including the initial "warning: " tag).
-The pattern may contain asterisks which match zero or more characters in
+The pattern may contain asterisks, which match zero or more characters in
the message. For example, you can use
@code{pragma Warnings (Off, "*bits of*unused")} to suppress the warning
message @code{warning: 960 bits of "a" unused}. No other regular
@@ -8602,6 +8610,12 @@ This restriction does not forbid dependences on the package
as long as no actual stream objects are created and no
stream attributes are used.
+Note that the use of restriction allows optimization of tagged types,
+since they do not need to worry about dispatching stream operations.
+To take maximum advantage of this space-saving optimization, any
+unit declaring a tagged type should be compiled with the restriction,
+though this is not required.
+
@item No_Task_Attributes_Package
@findex No_Task_Attributes_Package
This restriction ensures at compile time that there are no implicit or
@@ -13083,9 +13097,19 @@ string, the filename must be a standard 8bits string.
@end itemize
In the absence of a @samp{encoding=@var{xxx}} form parameter, the
-value UTF-8 is used. This encoding form parameter is only supported on
-the Windows platform. On the other Operating Systems the runtime is
-supporting UTF-8 natively.
+encoding is controlled by the @samp{GNAT_CODE_PAGE} environment
+variable. And if not set @samp{utf8} is assumed.
+
+@table @samp
+@item CP_ACP
+The current system Windows ANSI code page.
+@item CP_UTF8
+UTF-8 encoding
+@end table
+
+This encoding form parameter is only supported on the Windows
+platform. On the other Operating Systems the run-time is supporting
+UTF-8 natively.
@node Open Modes
@section Open Modes
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index f48a55fdf9d..70022f30c6e 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -187,6 +187,7 @@ AdaCore@*
* Stack Related Facilities::
* Verifying Properties Using gnatcheck::
* Creating Sample Bodies Using gnatstub::
+* Generating Ada Bindings for C and C++ headers::
* Other Utility Programs::
* Running and Debugging Ada Programs::
@ifclear vms
@@ -846,6 +847,10 @@ a utility that checks Ada code against a set of rules.
a utility that generates empty but compilable bodies for library units.
@item
+@ref{Generating Ada Bindings for C and C++ headers}, describes how to
+generate automatically Ada bindings from C and C++ headers.
+
+@item
@ref{Other Utility Programs}, discusses several other GNAT utilities,
including @code{gnathtml}.
@@ -10702,6 +10707,11 @@ system, you can set up a procedure where you use @command{gnatchop} each
time you compile, regarding the source files that it writes as temporary
files that you throw away.
+Note that if your file containing multiple units starts with a byte order
+mark (BOM) specifying UTF-8 encoding, then the files generated by gnatchop
+will each start with a copy of this BOM, meaning that they can be compiled
+automatically in UTF-8 mode without needing to specify an explicit encoding.
+
@node Operating gnatchop in Compilation Mode
@section Operating gnatchop in Compilation Mode
@@ -19703,7 +19713,8 @@ Debug Pool info:
The @code{gnatmem} utility monitors dynamic allocation and
deallocation activity in a program, and displays information about
incorrect deallocations and possible sources of memory leaks.
-It provides three type of information:
+It is designed to work in association with a static runtime library
+only and in this context provides three types of information:
@itemize @bullet
@item
General information concerning memory management, such as the total
@@ -22241,6 +22252,148 @@ Verbose mode: generate version information.
@end table
+@c *********************************
+@node Generating Ada Bindings for C and C++ headers
+@chapter Generating Ada Bindings for C and C++ headers
+@findex binding
+
+@noindent
+GNAT now comes with a new experimental binding generator for C and C++
+headers which is intended to do 95% of the tedious work of generating
+Ada specs from C or C++ header files. Note that this still is a work in
+progress, not designed to generate 100% correct Ada specs.
+
+The code generated is using the Ada 2005 syntax, which makes it
+easier to interface with other languages than previous versions of Ada.
+
+@menu
+* Running the binding generator::
+* Generating bindings for C++ headers::
+* Switches::
+@end menu
+
+@node Running the binding generator
+@section Running the binding generator
+
+@noindent
+The binding generator is part of the @command{gcc} compiler and can be
+invoked via the @option{-fdump-ada-spec} switch, which will generate Ada
+spec files for the header files specified on the command line, and all
+header files needed by these files transitivitely. For example:
+
+@smallexample
+$ g++ -c -fdump-ada-spec -C /usr/include/time.h
+$ gcc -c -gnat05 *.ads
+@end smallexample
+
+will generate, under GNU/Linux, the following files: @file{time_h.ads},
+@file{bits_time_h.ads}, @file{stddef_h.ads}, @file{bits_types_h.ads} which
+correspond to the files @file{/usr/include/time.h},
+@file{/usr/include/bits/time.h}, etc@dots{}, and will then compile in Ada 2005
+mode these Ada specs.
+
+The @code{-C} switch tells @command{gcc} to extract comments from headers,
+and will attempt to generate corresponding Ada comments.
+
+If you want to generate a single Ada file and not the transitive closure, you
+can use instead the @option{-fdump-ada-spec-slim} switch.
+
+Note that we recommend when possible to use the @command{g++} driver to
+generate bindings, even for most C headers, since this will in general
+generate better Ada specs. For generating bindings for C++ headers, it is
+mandatory to use the @command{g++} command, or @command{gcc -x c++} which
+is equivalent in this case. If @command{g++} cannot work on your C headers
+because of incompatibilities between C and C++, then you can fallback to
+@command{gcc} instead.
+
+For an example of better bindings generated from the C++ front-end,
+the name of the parameters (when available) are actually ignored by the C
+front-end. Consider the following C header:
+
+@smallexample
+extern void foo (int variable);
+@end smallexample
+
+with the C front-end, @code{variable} is ignored, and the above is handled as:
+
+@smallexample
+extern void foo (int);
+@end smallexample
+
+generating a generic:
+
+@smallexample
+procedure foo (param1 : int);
+@end smallexample
+
+with the C++ front-end, the name is available, and we generate:
+
+@smallexample
+procedure foo (variable : int);
+@end smallexample
+
+In some cases, the generated bindings will be more complete or more meaningful
+when defining some macros, which you can do via the @option{-D} switch. This
+is for example the case with @file{Xlib.h} under GNU/Linux:
+
+@smallexample
+g++ -c -fdump-ada-spec -DXLIB_ILLEGAL_ACCESS -C /usr/include/X11/Xlib.h
+@end smallexample
+
+The above will generate more complete bindings than a straight call without
+the @option{-DXLIB_ILLEGAL_ACCESS} switch.
+
+In other cases, it is not possible to parse a header file in a stand alone
+manner, because other include files need to be included first. In this
+case, the solution is to create a small header file including the needed
+@code{#include} and possible @code{#define} directives. For example, to
+generate Ada bindings for @file{readline/readline.h}, you need to first
+include @file{stdio.h}, so you can create a file with the following two
+lines in e.g. @file{readline1.h}:
+
+@smallexample
+#include <stdio.h>
+#include <readline/readline.h>
+@end smallexample
+
+and then generate Ada bindings from this file:
+
+@smallexample
+$ g++ -c -fdump-ada-spec readline1.h
+@end smallexample
+
+@node Generating bindings for C++ headers
+@section Generating bindings for C++ headers
+
+@noindent
+Generating bindings for C++ headers is done using the same options, always
+with the @command{g++} compiler.
+
+In this mode, C++ classes will be mapped to Ada tagged types, constructors
+will be mapped using the @code{CPP_Constructor} pragma, and when possible,
+multiple inheritance of abstract classes will be mapped to Ada interfaces
+(@xref{Interfacing to C++,,,gnat_rm, GNAT Reference Manual}, for additional
+information on interfacing to C++).
+
+@node Switches
+@section Switches
+
+@table @option
+@item -fdump-ada-spec
+@cindex @option{-fdump-ada-spec} (@command{gcc})
+Generate Ada spec files for the given header files transitively (including
+all header files that these headers depend upon).
+
+@item -fdump-ada-spec-slim
+@cindex @option{-fdump-ada-spec-slim} (@command{gcc})
+Generate Ada spec files for the header files specified on the command line
+only.
+
+@item -C
+@cindex @option{-C} (@command{gcc})
+Extract comments from headers and generate Ada comments in the Ada spec files.
+@end table
+
@node Other Utility Programs
@chapter Other Utility Programs
diff --git a/gcc/ada/gnatchop.adb b/gcc/ada/gnatchop.adb
index 83ccf994f28..ec32c073d56 100644
--- a/gcc/ada/gnatchop.adb
+++ b/gcc/ada/gnatchop.adb
@@ -30,13 +30,14 @@ with Ada.Streams.Stream_IO; use Ada.Streams;
with Ada.Text_IO; use Ada.Text_IO;
with System.CRTL; use System; use System.CRTL;
+with GNAT.Byte_Order_Mark; use GNAT.Byte_Order_Mark;
with GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with GNAT.Heap_Sort_G;
with GNAT.Table;
with Hostparm;
-with Switch; use Switch;
+with Switch; use Switch;
with Types;
procedure Gnatchop is
@@ -67,6 +68,9 @@ procedure Gnatchop is
-- but properly treated if present. Not generated in output files except
-- as a result of copying input file.
+ BOM_Length : Natural := 0;
+ -- Reset to non-zero value if BOM detected at start of file
+
--------------------
-- File arguments --
--------------------
@@ -303,7 +307,7 @@ procedure Gnatchop is
function Get_Config_Pragmas
(Input : File_Num;
- U : Unit_Num) return String_Access;
+ U : Unit_Num) return String_Access;
-- Call to read configuration pragmas from given unit entry, and
-- return a buffer containing the pragmas to be appended to
-- following units. Input is the file number for the chop file and
@@ -323,11 +327,15 @@ procedure Gnatchop is
-- of line sequence to be written at the end of the pragma.
procedure Write_Unit
- (Source : not null access String;
- Num : Unit_Num;
- TS_Time : OS_Time;
- Success : out Boolean);
- -- Write one compilation unit of the source to file
+ (Source : not null access String;
+ Num : Unit_Num;
+ TS_Time : OS_Time;
+ Write_BOM : Boolean;
+ Success : out Boolean);
+ -- Write one compilation unit of the source to file. Source is the pointer
+ -- to the input string, Num is the unit number, TS_Time is the timestamp,
+ -- Write_BOM is set True to write a UTF-8 BOM at the start of the file.
+ -- Success is set True unless the write attempt fails.
---------
-- dup --
@@ -419,8 +427,7 @@ procedure Gnatchop is
function Get_Config_Pragmas
(Input : File_Num;
- U : Unit_Num)
- return String_Access
+ U : Unit_Num) return String_Access
is
Info : Unit_Info renames Unit.Table (U);
FD : File_Descriptor;
@@ -464,8 +471,7 @@ procedure Gnatchop is
function Get_EOL
(Source : not null access String;
- Start : Positive)
- return EOL_String
+ Start : Positive) return EOL_String
is
Ptr : Positive := Start;
First : Positive;
@@ -1428,6 +1434,10 @@ procedure Gnatchop is
Success : Boolean;
TS_Time : OS_Time;
+ BOM_Present : Boolean;
+ BOM : BOM_Kind;
+ -- Record presence of UTF8 BOM in input
+
begin
FD := Open_Read (Name'Address, Binary);
TS_Time := File_Time_Stamp (FD);
@@ -1449,11 +1459,21 @@ procedure Gnatchop is
Put_Line ("splitting " & File.Table (Input).Name.all & " into:");
end if;
+ -- Test for presence of BOM
+
+ Read_BOM (Buffer.all, BOM_Length, BOM, False);
+ BOM_Present := BOM /= Unknown;
+
-- Only chop those units that come from this file
- for Num in 1 .. Unit.Last loop
- if Unit.Table (Num).Chop_File = Input then
- Write_Unit (Buffer, Num, TS_Time, Success);
+ for Unit_Number in 1 .. Unit.Last loop
+ if Unit.Table (Unit_Number).Chop_File = Input then
+ Write_Unit
+ (Source => Buffer,
+ Num => Unit_Number,
+ TS_Time => TS_Time,
+ Write_BOM => BOM_Present and then Unit_Number /= 1,
+ Success => Success);
exit when not Success;
end if;
end loop;
@@ -1615,10 +1635,11 @@ procedure Gnatchop is
----------------
procedure Write_Unit
- (Source : not null access String;
- Num : Unit_Num;
- TS_Time : OS_Time;
- Success : out Boolean)
+ (Source : not null access String;
+ Num : Unit_Num;
+ TS_Time : OS_Time;
+ Write_BOM : Boolean;
+ Success : out Boolean)
is
procedure OS_Filename
@@ -1643,12 +1664,10 @@ procedure Gnatchop is
W_Name : aliased constant Wide_String := To_Wide_String (Name);
EOL : constant EOL_String :=
Get_EOL (Source, Source'First + Info.Offset);
-
OS_Name : aliased String (1 .. Name'Length * 2);
O_Length : aliased Natural := OS_Name'Length;
Encoding : aliased String (1 .. 64);
E_Length : aliased Natural := Encoding'Length;
-
Length : File_Offset;
begin
@@ -1699,6 +1718,14 @@ procedure Gnatchop is
Length := Info.Length;
end if;
+ -- Write BOM if required
+
+ if Write_BOM then
+ String'Write
+ (Stream_IO.Stream (File),
+ Source.all (Source'First .. Source'First + BOM_Length - 1));
+ end if;
+
-- Prepend configuration pragmas if necessary
if Success and then Info.Bufferg /= null then
diff --git a/gcc/ada/gprep.adb b/gcc/ada/gprep.adb
index c4cf14ba93c..ec56bcc171f 100644
--- a/gcc/ada/gprep.adb
+++ b/gcc/ada/gprep.adb
@@ -167,10 +167,11 @@ package body GPrep is
Namet.Initialize;
Snames.Initialize;
Stringt.Initialize;
+ Prep.Initialize;
-- Initialize the preprocessor
- Prep.Initialize
+ Prep.Setup_Hooks
(Error_Msg => Errutil.Error_Msg'Access,
Scan => Scanner.Scan'Access,
Set_Ignore_Errors => Errutil.Set_Ignore_Errors'Access,
diff --git a/gcc/ada/i-cstrin.ads b/gcc/ada/i-cstrin.ads
index 1d956a6059a..7bfee8f2c6d 100644
--- a/gcc/ada/i-cstrin.ads
+++ b/gcc/ada/i-cstrin.ads
@@ -38,14 +38,10 @@ package Interfaces.C.Strings is
type char_array_access is access all char_array;
- pragma Warnings (Off);
pragma No_Strict_Aliasing (char_array_access);
- pragma Warnings (On);
-- Since this type is used for external interfacing, with the pointer
-- coming from who knows where, it seems a good idea to turn off any
- -- strict aliasing assumptions for this type. We turn off warnings for
- -- this pragma to deal with being compiled with an earlier GNAT version
- -- that does not recognize this pragma.
+ -- strict aliasing assumptions for this type.
type chars_ptr is private;
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 8476daca115..59aabf2466c 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -53,7 +53,7 @@
#include "tsystem.h"
#include <sys/stat.h>
-/* We don't have libiberty, so us malloc. */
+/* We don't have libiberty, so use malloc. */
#define xmalloc(S) malloc (S)
#else
#include "config.h"
@@ -1964,7 +1964,6 @@ __gnat_init_float (void)
checking is not used. */
void (*__gnat_set_stack_limit_hook)(void) = (void (*)(void))0;
-
/******************/
/* NetBSD Section */
/******************/
@@ -2098,9 +2097,43 @@ __gnat_install_handler(void)
#elif defined(__APPLE__)
#include <signal.h>
+#include <mach/mach_vm.h>
+#include <mach/vm_statistics.h>
+
+/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size. */
+char __gnat_alternate_stack[64 * 1024]; /* 2 * MINSIGSTKSZ */
static void __gnat_error_handler (int sig, siginfo_t * si, void * uc);
+/* Defined in xnu unix_signal.c */
+#define UC_RESET_ALT_STACK 0x80000000
+extern int sigreturn (void *uc, int flavour);
+
+/* Return true if ADDR is within a stack guard area. */
+static int
+__gnat_is_stack_guard (mach_vm_address_t addr)
+{
+ kern_return_t kret;
+ vm_region_submap_info_data_64_t info;
+ mach_vm_address_t start;
+ mach_vm_size_t size;
+ natural_t depth;
+ mach_msg_type_number_t count;
+
+ count = VM_REGION_SUBMAP_INFO_COUNT_64;
+ start = addr;
+ size = -1;
+ depth = 9999;
+ kret = mach_vm_region_recurse (mach_task_self (), &start, &size, &depth,
+ (vm_region_recurse_info_t) &info, &count);
+ if (kret == KERN_SUCCESS
+ && addr >= start && addr < (start + size)
+ && info.protection == VM_PROT_NONE
+ && info.user_tag == VM_MEMORY_STACK)
+ return 1;
+ return 0;
+}
+
static void
__gnat_error_handler (int sig, siginfo_t * si, void * uc)
{
@@ -2110,14 +2143,20 @@ __gnat_error_handler (int sig, siginfo_t * si, void * uc)
switch (sig)
{
case SIGSEGV:
- /* FIXME: we need to detect the case of a *real* SIGSEGV. */
- exception = &storage_error;
- msg = "stack overflow or erroneous memory access";
- break;
-
case SIGBUS:
- exception = &constraint_error;
- msg = "SIGBUS";
+ if (__gnat_is_stack_guard ((unsigned long)si->si_addr))
+ {
+ exception = &storage_error;
+ msg = "stack overflow";
+ }
+ else
+ {
+ exception = &constraint_error;
+ msg = "erroneous memory access";
+ }
+ /* Reset the use of alt stack, so that the alt stack will be used
+ for the next signal delivery. */
+ sigreturn (NULL, UC_RESET_ALT_STACK);
break;
case SIGFPE:
@@ -2140,7 +2179,16 @@ __gnat_install_handler (void)
/* Set up signal handler to map synchronous signals to appropriate
exceptions. Make sure that the handler isn't interrupted by another
- signal that might cause a scheduling event! */
+ signal that might cause a scheduling event! Also setup an alternate
+ stack region for the handler execution so that stack overflows can be
+ handled properly, avoiding a SEGV generation from stack usage by the
+ handler itself (and it is required by Darwin). */
+
+ stack_t stack;
+ stack.ss_sp = __gnat_alternate_stack;
+ stack.ss_size = sizeof (__gnat_alternate_stack);
+ stack.ss_flags = 0;
+ sigaltstack (&stack, NULL);
act.sa_flags = SA_NODEFER | SA_RESTART | SA_SIGINFO;
act.sa_sigaction = __gnat_error_handler;
@@ -2153,6 +2201,8 @@ __gnat_install_handler (void)
sigaction (SIGFPE, &act, NULL);
if (__gnat_get_interrupt_state (SIGILL) != 's')
sigaction (SIGILL, &act, NULL);
+
+ act.sa_flags |= SA_ONSTACK;
if (__gnat_get_interrupt_state (SIGSEGV) != 's')
sigaction (SIGSEGV, &act, NULL);
if (__gnat_get_interrupt_state (SIGBUS) != 's')
@@ -2194,7 +2244,7 @@ __gnat_install_handler (void)
void
__gnat_init_float (void)
{
-#if defined (__i386__) || defined (i386)
+#if defined (__i386__) || defined (i386) || defined (__x86_64)
/* This is used to properly initialize the FPU on an x86 for each
process thread. */
diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c
index dbaf80f6ee6..f5acbe6593a 100644
--- a/gcc/ada/initialize.c
+++ b/gcc/ada/initialize.c
@@ -43,6 +43,9 @@
#ifdef IN_RTS
#include "tconfig.h"
#include "tsystem.h"
+/* We don't have libiberty, so use malloc. */
+#define xmalloc(S) malloc (S)
+#define xrealloc(V,S) realloc (V,S)
#else
#include "config.h"
#include "system.h"
@@ -55,17 +58,44 @@
/******************************************/
#if defined (__MINGW32__)
+#include "mingw32.h"
#include <windows.h>
extern void __gnat_init_float (void);
extern void __gnat_install_SEH_handler (void *);
+extern int gnat_argc;
+extern char **gnat_argv;
+
#ifndef RTX
/* Do not define for RTX since it is only used for creating child processes
which is not supported in RTX. */
extern void __gnat_plist_init (void);
#endif
+#ifdef GNAT_UNICODE_SUPPORT
+
+#define EXPAND_ARGV_RATE 128
+
+static void
+append_arg (int *index, LPWSTR value, char ***argv, int *last)
+{
+ int size;
+
+ if (*last <= *index)
+ {
+ *last += EXPAND_ARGV_RATE;
+ *argv = (char **) xrealloc (*argv, (*last) * sizeof (char *));
+ }
+
+ size = WS2SC (NULL, value, 0);
+ (*argv)[*index] = (char *) xmalloc (size + 1);
+ WS2SC ((*argv)[*index], value, size);
+
+ (*index)++;
+}
+#endif
+
void
__gnat_initialize (void *eh)
{
@@ -75,6 +105,85 @@ __gnat_initialize (void *eh)
given that we have set Max_Digits etc with this in mind */
__gnat_init_float ();
+#ifdef GNAT_UNICODE_SUPPORT
+ /* Set current code page for filenames handling. */
+ {
+ char *codepage = getenv ("GNAT_CODE_PAGE");
+
+ /* Default code page is UTF-8. */
+ CurrentCodePage = CP_UTF8;
+
+ if (codepage != NULL)
+ if (strcmp (codepage, "CP_ACP") == 0)
+ CurrentCodePage = CP_ACP;
+ else if (strcmp (codepage, "CP_UTF8") == 0)
+ CurrentCodePage = CP_UTF8;
+ }
+
+ /* Adjust gnat_argv to support Unicode characters. */
+ {
+ LPWSTR *wargv;
+ int wargc;
+ int k;
+ int last;
+ int argc_expanded = 0;
+ TCHAR result [MAX_PATH];
+
+ wargv = CommandLineToArgvW (GetCommandLineW(), &wargc);
+
+ if (wargv != NULL)
+ {
+ /* Set gnat_argv with arguments encoded in UTF-8. */
+ last = wargc + 1;
+ gnat_argv = (char **) xmalloc ((last) * sizeof (char *));
+
+ /* argv[0] is the executable full path-name. */
+
+ SearchPath (NULL, wargv[0], _T(".exe"), MAX_PATH, result, NULL);
+ append_arg (&argc_expanded, result, &gnat_argv, &last);
+
+ for (k=1; k<wargc; k++)
+ {
+ /* Check for wildcard expansion. */
+ if (_tcsstr (wargv[k], _T("?")) != 0 ||
+ _tcsstr (wargv[k], _T("*")) != 0)
+ {
+ /* Wilcards are present, append all corresponding matches. */
+ WIN32_FIND_DATA FileData;
+ HANDLE hDir = FindFirstFile (wargv[k], &FileData);
+
+ if (hDir == INVALID_HANDLE_VALUE)
+ {
+ /* No match, append arg as-is. */
+ append_arg (&argc_expanded, wargv[k], &gnat_argv, &last);
+ }
+ else
+ {
+ /* Append first match and all remaining ones. */
+
+ do {
+ append_arg (&argc_expanded,
+ FileData.cFileName, &gnat_argv, &last);
+ } while (FindNextFile (hDir, &FileData));
+
+ FindClose (hDir);
+ }
+ }
+ else
+ {
+ /* No wildcard. Store parameter as-is. */
+ append_arg (&argc_expanded, wargv[k], &gnat_argv, &last);
+ }
+ }
+
+ LocalFree (wargv);
+ gnat_argc = argc_expanded;
+ gnat_argv = (char **) xrealloc
+ (gnat_argv, argc_expanded * sizeof (char *));
+ }
+ }
+#endif
+
/* Note that we do not activate this for the compiler itself to avoid a
bootstrap path problem. Older version of gnatbind will generate a call
to __gnat_initialize() without argument. Therefore we cannot use eh in
diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb
index 1ceb389d553..508b2e871ad 100644
--- a/gcc/ada/lib-load.adb
+++ b/gcc/ada/lib-load.adb
@@ -169,14 +169,14 @@ package body Lib.Load is
Chars => Chars (Selector_Name (Name (With_Node))));
Du_Name :=
Make_Defining_Program_Unit_Name (No_Location,
- Name => New_Copy_Tree (Prefix (Name (With_Node))),
+ Name => Copy_Separate_Tree (Prefix (Name (With_Node))),
Defining_Identifier => Cunit_Entity);
Set_Is_Child_Unit (Cunit_Entity);
End_Lab :=
Make_Designator (No_Location,
- Name => New_Copy_Tree (Prefix (Name (With_Node))),
+ Name => Copy_Separate_Tree (Prefix (Name (With_Node))),
Identifier => New_Occurrence_Of (Cunit_Entity, No_Location));
end if;
@@ -714,12 +714,12 @@ package body Lib.Load is
-- it may very likely be the case that there is also pragma
-- Restriction forbidding its usage. This is typically the
-- case when building a configurable run time, where the
- -- usage of certain run-time units is restricted by
- -- means of both the corresponding pragma Restriction (such
- -- as No_Calendar), and by not including the unit. Hence,
- -- we check whether this predefined unit is forbidden, so
- -- that the message about the restriction violation is
- -- generated, if needed.
+ -- usage of certain run-time units is restricted by means
+ -- of both the corresponding pragma Restriction (such as
+ -- No_Calendar), and by not including the unit. Hence, we
+ -- check whether this predefined unit is forbidden, so that
+ -- the message about the restriction violation is generated,
+ -- if needed.
Check_Restricted_Unit (Load_Name, Error_Node);
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 3e36d0c84ed..fac48642569 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -564,6 +564,15 @@ package body Lib.Xref is
Set_Referenced_As_LHS (E, False);
end if;
+ -- Don't count a recursive reference within a subprogram as a
+ -- reference (that allows detection of a recursive subprogram
+ -- whose only references are recursive calls as unreferenced).
+
+ elsif Is_Subprogram (E)
+ and then E = Nearest_Dynamic_Scope (Current_Scope)
+ then
+ null;
+
-- Any other occurrence counts as referencing the entity
elsif OK_To_Set_Referenced then
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
index 5d8ab86996a..5dd2c80d901 100644
--- a/gcc/ada/link.c
+++ b/gcc/ada/link.c
@@ -152,6 +152,15 @@ unsigned char __gnat_objlist_file_supported = 1;
unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a";
+#elif defined (__APPLE__)
+const char *__gnat_object_file_option = "-Wl,-filelist,";
+const char *__gnat_run_path_option = "-Wl,-rpath,";
+char __gnat_shared_libgnat_default = STATIC;
+int __gnat_link_max = 262144;
+unsigned char __gnat_objlist_file_supported = 1;
+unsigned char __gnat_using_gnu_linker = 0;
+const char *__gnat_object_library_extension = ".a";
+
#elif defined (linux) || defined(__GLIBC__)
const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = "-Wl,-rpath,";
diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h
index 46e271dcbca..2c52920da69 100644
--- a/gcc/ada/mingw32.h
+++ b/gcc/ada/mingw32.h
@@ -62,6 +62,7 @@
#endif
#include <tchar.h>
+#include <windows.h>
/* After including this file it is possible to use the character t as prefix
to routines. If GNAT_UNICODE_SUPPORT is defined then the unicode enabled
@@ -71,15 +72,29 @@
the proper translations using the UTF-8 encoding. */
#ifdef GNAT_UNICODE_SUPPORT
+
+extern UINT CurrentCodePage;
+
+/* Macros to convert to/from the code page speficied in CurrentCodePage. */
+#define S2WSC(wstr,str,len) \
+ MultiByteToWideChar (CurrentCodePage,0,str,-1,wstr,len)
+#define WS2SC(str,wstr,len) \
+ WideCharToMultiByte (CurrentCodePage,0,wstr,-1,str,len,NULL,NULL)
+
+/* Macros to convert to/from UTF-8 code page. */
#define S2WSU(wstr,str,len) \
MultiByteToWideChar (CP_UTF8,0,str,-1,wstr,len)
#define WS2SU(str,wstr,len) \
WideCharToMultiByte (CP_UTF8,0,wstr,-1,str,len,NULL,NULL)
+
+/* Macros to convert to/from Windows default code page. */
#define S2WS(wstr,str,len) \
MultiByteToWideChar (CP_ACP,0,str,-1,wstr,len)
#define WS2S(str,wstr,len) \
WideCharToMultiByte (CP_ACP,0,wstr,-1,str,len,NULL,NULL)
#else
+#define S2WSC(wstr,str,len) strncpy(wstr,str,len)
+#define WS2SC(str,wstr,len) strncpy(str,wstr,len)
#define S2WSU(wstr,str,len) strncpy(wstr,str,len)
#define WS2SU(str,wstr,len) strncpy(str,wstr,len)
#define S2WS(wstr,str,len) strncpy(wstr,str,len)
diff --git a/gcc/ada/mkdir.c b/gcc/ada/mkdir.c
index cd458c5266d..debd8067779 100644
--- a/gcc/ada/mkdir.c
+++ b/gcc/ada/mkdir.c
@@ -65,7 +65,7 @@ __gnat_mkdir (char *dir_name)
#elif defined (__MINGW32__)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];
- S2WSU (wname, dir_name, GNAT_MAX_PATH_LEN + 2);
+ S2WSC (wname, dir_name, GNAT_MAX_PATH_LEN + 2);
return _tmkdir (wname);
#else
return mkdir (dir_name, S_IRWXU | S_IRWXG | S_IRWXO);
diff --git a/gcc/ada/namet-sp.adb b/gcc/ada/namet-sp.adb
index e2deda941fa..30f85f52c02 100755
--- a/gcc/ada/namet-sp.adb
+++ b/gcc/ada/namet-sp.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -186,9 +186,18 @@ package body Namet.Sp is
begin
Get_Name_String_UTF_32 (Found, FB, FBL);
Get_Name_String_UTF_32 (Expect, EB, EBL);
- return
- GNAT.UTF_32_Spelling_Checker.Is_Bad_Spelling_Of
- (FB (1 .. FBL), EB (1 .. EBL));
+
+ -- For an exact match, return False, otherwise check bad spelling. We
+ -- need this special test because the library routine returns True for
+ -- an exact match.
+
+ if FB (1 .. FBL) = EB (1 .. EBL) then
+ return False;
+ else
+ return
+ GNAT.UTF_32_Spelling_Checker.Is_Bad_Spelling_Of
+ (FB (1 .. FBL), EB (1 .. EBL));
+ end if;
end Is_Bad_Spelling_Of;
end Namet.Sp;
diff --git a/gcc/ada/namet-sp.ads b/gcc/ada/namet-sp.ads
index d1de142eacd..15d41a07b05 100755
--- a/gcc/ada/namet-sp.ads
+++ b/gcc/ada/namet-sp.ads
@@ -40,6 +40,7 @@ package Namet.Sp is
function Is_Bad_Spelling_Of (Found, Expect : Name_Id) return Boolean;
-- Compares two identifier names from the names table, and returns True if
-- Found is a plausible misspelling of Expect. This function properly deals
- -- with wide and wide wide character encodings in the input names.
+ -- with wide and wide wide character encodings in the input names. Note
+ -- that an exact match in the names results in False being returned.
end Namet.Sp;
diff --git a/gcc/ada/nlists.adb b/gcc/ada/nlists.adb
index 7a2b4b4a103..09bd85a8439 100644
--- a/gcc/ada/nlists.adb
+++ b/gcc/ada/nlists.adb
@@ -745,31 +745,6 @@ package body Nlists is
end if;
end New_Copy_List_Original;
- ------------------------
- -- New_Copy_List_Tree --
- ------------------------
-
- function New_Copy_List_Tree (List : List_Id) return List_Id is
- NL : List_Id;
- E : Node_Id;
-
- begin
- if List = No_List then
- return No_List;
-
- else
- NL := New_List;
- E := First (List);
-
- while Present (E) loop
- Append (New_Copy_Tree (E), NL);
- E := Next (E);
- end loop;
-
- return NL;
- end if;
- end New_Copy_List_Tree;
-
--------------
-- New_List --
--------------
diff --git a/gcc/ada/nlists.ads b/gcc/ada/nlists.ads
index 5a6b94f9d06..3753936df10 100644
--- a/gcc/ada/nlists.ads
+++ b/gcc/ada/nlists.ads
@@ -108,13 +108,6 @@ package Nlists is
function New_Copy_List_Original (List : List_Id) return List_Id;
-- Same as New_Copy_List but copies only nodes coming from source
- function New_Copy_List_Tree (List : List_Id) return List_Id;
- -- Similar to New_Copy_List, except that the copies are done using the
- -- Atree.New_Copy_Tree function, which means that a full recursive copy
- -- of the subtrees in the list is performed, setting proper parents. As
- -- for New_Copy_Tree, it is illegal to attempt to copy extended nodes
- -- (entities) either directly or indirectly using this function.
-
function First (List : List_Id) return Node_Id;
pragma Inline (First);
-- Obtains the first element of the given node list or, if the node list
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 71bcb19871b..57ddd06ce28 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -415,6 +415,12 @@ package Opt is
-- to make a single long message, and then this message is split up into
-- multiple lines not exceeding the specified length. Set by -gnatj=nn.
+ Exception_Handler_Encountered : Boolean := False;
+ -- GNAT
+ -- This flag is set true if the parser encounters an exception handler.
+ -- It is used to set Warn_On_Exception_Propagation True if the restriction
+ -- No_Exception_Propagation is set.
+
Exception_Locations_Suppressed : Boolean := False;
-- GNAT
-- This flag is set True if a Suppress_Exception_Locations configuration
@@ -902,13 +908,20 @@ package Opt is
Optimization_Level : Int;
pragma Import (C, Optimization_Level, "optimize");
-- Constant reflecting the optimization level (0,1,2,3 for -O0,-O1,-O2,-O3)
+ -- See jmissing.c and aamissing.c for definitions for dotnet/jgnat and
+ -- GNAAMP back ends.
+
+ Optimize_Size : Int;
+ pragma Import (C, Optimize_Size, "optimize_size");
+ -- Constant reflecting setting of -Os (optimize for size). Set to nonzero
+ -- in -Os mode and set to zero otherwise. See jmissing.c and aamissing.c
+ -- for definitions of "optimize_size" for dotnet/jgnat and GNAAMP backends
Output_File_Name_Present : Boolean := False;
-- GNATBIND, GNAT, GNATMAKE, GPRMAKE
- -- Set to True when the output C file name is given with option -o
- -- for GNATBIND, when the object file name is given with option
- -- -gnatO for GNAT or when the executable is given with option -o
- -- for GNATMAKE or GPRMAKE.
+ -- Set to True when the output C file name is given with option -o for
+ -- GNATBIND, when the object file name is given with option -gnatO for GNAT
+ -- or when the executable is given with option -o for GNATMAKE or GPRMAKE.
Output_Linker_Option_List : Boolean := False;
-- GNATBIND
@@ -1309,7 +1322,15 @@ package Opt is
-- Set to True to generate warnings for non-local exception raises and also
-- handlers that can never handle a local raise. This warning is only ever
-- generated if pragma Restrictions (No_Exception_Propagation) is set. The
- -- default is not to generate the warnings even if the restriction is set.
+ -- default is not to generate the warnings except that if the source has
+ -- at least one exception handler, and this restriction is set, and the
+ -- warning was not explicitly turned off, then it is turned on by default.
+
+ No_Warn_On_Non_Local_Exception : Boolean := False;
+ -- GNAT
+ -- This is set to True if the above warning is explicitly suppressed. We
+ -- use this to avoid turning it on by default when No_Exception_Propagation
+ -- restriction is set and an exception handler is present.
Warn_On_Obsolescent_Feature : Boolean := False;
-- GNAT
diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
index 0363f5e27eb..c847f5e5724 100644
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.adb
@@ -300,7 +300,7 @@ package body Osint is
Status : Boolean;
pragma Warnings (Off, Status);
- -- For the call to Close
+ -- For the call to Close where status is ignored
begin
File_FD := Open_Read (Buffer'Address, Binary);
diff --git a/gcc/ada/output.adb b/gcc/ada/output.adb
index b33a74db091..5208daf22e4 100644
--- a/gcc/ada/output.adb
+++ b/gcc/ada/output.adb
@@ -40,6 +40,17 @@ package body Output is
-- Record argument to last call to Set_Special_Output. If this is
-- non-null, then we are in special output mode.
+ Indentation_Amount : constant Positive := 3;
+ -- Number of spaces to output for each indentation level
+
+ Indentation_Limit : constant Positive := 40;
+ -- Indentation beyond this number of spaces wraps around
+ pragma Assert (Indentation_Limit < Buffer_Max / 2);
+ -- Make sure this is substantially shorter than the line length
+
+ Cur_Indentation : Natural := 0;
+ -- Number of spaces to indent each line
+
-----------------------
-- Local_Subprograms --
-----------------------
@@ -70,36 +81,73 @@ package body Output is
------------------
procedure Flush_Buffer is
- Len : constant Natural := Next_Col - 1;
+ Write_Error : exception;
+ -- Raised if Write fails
- begin
- if Len /= 0 then
+ ------------------
+ -- Write_Buffer --
+ ------------------
+ procedure Write_Buffer (Buf : String);
+ -- Write out Buf, either using Special_Output_Proc, or the normal way
+ -- using Write. Raise Write_Error if Write fails (presumably due to disk
+ -- full). Write_Error is not used in the case of Special_Output_Proc.
+
+ procedure Write_Buffer (Buf : String) is
+ begin
-- If Special_Output_Proc has been set, then use it
if Special_Output_Proc /= null then
- Special_Output_Proc.all (Buffer (1 .. Len));
+ Special_Output_Proc.all (Buf);
-- If output is not set, then output to either standard output
-- or standard error.
- elsif Len /= Write (Current_FD, Buffer'Address, Len) then
+ elsif Write (Current_FD, Buf'Address, Buf'Length) /= Buf'Length then
+ raise Write_Error;
- -- If there are errors with standard error, just quit
+ end if;
+ end Write_Buffer;
- if Current_FD = Standerr then
- OS_Exit (2);
+ Len : constant Natural := Next_Col - 1;
- -- Otherwise, set the output to standard error before
- -- reporting a failure and quitting.
+ begin
+ if Len /= 0 then
+ begin
+ -- If there's no indentation, or if the line is too long with
+ -- indentation, just write the buffer.
+
+ if Cur_Indentation = 0
+ or else Cur_Indentation + Len > Buffer_Max
+ then
+ Write_Buffer (Buffer (1 .. Len));
+
+ -- Otherwise, construct a new buffer with preceding spaces, and
+ -- write that.
else
- Current_FD := Standerr;
- Next_Col := 1;
- Write_Line ("fatal error: disk full");
- OS_Exit (2);
+ declare
+ Indented_Buffer : constant String
+ := (1 .. Cur_Indentation => ' ') & Buffer (1 .. Len);
+ begin
+ Write_Buffer (Indented_Buffer);
+ end;
end if;
- end if;
+
+ exception
+ when Write_Error =>
+ -- If there are errors with standard error, just quit.
+ -- Otherwise, set the output to standard error before reporting
+ -- a failure and quitting.
+
+ if Current_FD /= Standerr then
+ Current_FD := Standerr;
+ Next_Col := 1;
+ Write_Line ("fatal error: disk full");
+ end if;
+
+ OS_Exit (2);
+ end;
-- Buffer is now empty
@@ -107,6 +155,27 @@ package body Output is
end if;
end Flush_Buffer;
+ ------------
+ -- Indent --
+ ------------
+
+ procedure Indent is
+ begin
+ Cur_Indentation :=
+ (Cur_Indentation + Indentation_Amount) mod Indentation_Limit;
+ -- The "mod" is to wrap around in case there's too much indentation.
+ end Indent;
+
+ -------------
+ -- Outdent --
+ -------------
+
+ procedure Outdent is
+ begin
+ Cur_Indentation :=
+ (Cur_Indentation - Indentation_Amount) mod Indentation_Limit;
+ end Outdent;
+
---------------------------
-- Restore_Output_Buffer --
---------------------------
@@ -114,6 +183,7 @@ package body Output is
procedure Restore_Output_Buffer (S : Saved_Output_Buffer) is
begin
Next_Col := S.Next_Col;
+ Cur_Indentation := S.Cur_Indentation;
Buffer (1 .. Next_Col - 1) := S.Buffer (1 .. Next_Col - 1);
end Restore_Output_Buffer;
@@ -126,7 +196,9 @@ package body Output is
begin
S.Buffer (1 .. Next_Col - 1) := Buffer (1 .. Next_Col - 1);
S.Next_Col := Next_Col;
+ S.Cur_Indentation := Cur_Indentation;
Next_Col := 1;
+ Cur_Indentation := 0;
return S;
end Save_Output_Buffer;
@@ -147,7 +219,6 @@ package body Output is
begin
if Special_Output_Proc = null then
Flush_Buffer;
- Next_Col := 1;
end if;
Current_FD := Standerr;
@@ -161,7 +232,6 @@ package body Output is
begin
if Special_Output_Proc = null then
Flush_Buffer;
- Next_Col := 1;
end if;
Current_FD := Standout;
diff --git a/gcc/ada/output.ads b/gcc/ada/output.ads
index 559112cc94f..2bb38fc8fa4 100644
--- a/gcc/ada/output.ads
+++ b/gcc/ada/output.ads
@@ -81,9 +81,17 @@ package Output is
-- has been cancelled. Output to standard output is the default mode
-- before any call to either of the Set procedures.
+ procedure Indent;
+ -- Increases the current indentation level. Whenever a line is written
+ -- (triggered by Eol), an appropriate amount of whitespace is added to the
+ -- beginning of the line, wrapping around if it gets to long.
+
+ procedure Outdent;
+ -- Decreases the current indentation level.
+
procedure Write_Char (C : Character);
- -- Write one character to the standard output file. Note that the
- -- character should not be LF or CR (use Write_Eol for end of line)
+ -- Write one character to the standard output file. If the character is LF,
+ -- this is equivalent to Write_Eol.
procedure Write_Erase_Char (C : Character);
-- If last character in buffer matches C, erase it, otherwise no effect
@@ -177,7 +185,7 @@ private
-- subprograms defined in this package, and cannot be directly modified or
-- accessed by a client.
- Buffer : String (1 .. Buffer_Max + 1);
+ Buffer : String (1 .. Buffer_Max + 1) := (others => '*');
for Buffer'Alignment use 4;
-- Buffer used to build output line. We do line buffering because it
-- is needed for the support of the debug-generated-code option (-gnatD).
@@ -194,6 +202,7 @@ private
type Saved_Output_Buffer is record
Buffer : String (1 .. Buffer_Max + 1);
Next_Col : Positive;
+ Cur_Indentation : Natural;
end record;
end Output;
diff --git a/gcc/ada/par-ch11.adb b/gcc/ada/par-ch11.adb
index 412456e1a7e..14129bc6230 100644
--- a/gcc/ada/par-ch11.adb
+++ b/gcc/ada/par-ch11.adb
@@ -92,6 +92,7 @@ package body Ch11 is
Choice_Param_Node : Node_Id;
begin
+ Exception_Handler_Encountered := True;
Handler_Node := New_Node (N_Exception_Handler, Token_Ptr);
Set_Local_Raise_Statements (Handler_Node, No_Elist);
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb
index a7e6fb65c28..b90e0840652 100644
--- a/gcc/ada/par-ch3.adb
+++ b/gcc/ada/par-ch3.adb
@@ -763,7 +763,16 @@ package body Ch3 is
Typedef_Node := P_Derived_Type_Def_Or_Private_Ext_Decl;
if Saved_Token = Tok_Synchronized then
- Set_Synchronized_Present (Typedef_Node);
+ if Nkind (Typedef_Node) =
+ N_Derived_Type_Definition
+ then
+ Error_Msg_N
+ ("SYNCHRONIZED not allowed for record extension",
+ Typedef_Node);
+ else
+ Set_Synchronized_Present (Typedef_Node);
+ end if;
+
else
Error_Msg_SC ("invalid kind of private extension");
end if;
diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb
index 188893a4b28..d91b2d9f15d 100644
--- a/gcc/ada/par-ch6.adb
+++ b/gcc/ada/par-ch6.adb
@@ -215,14 +215,18 @@ package body Ch6 is
-- already been given, so no need to give another message here.
-- An overriding indicator is allowed for subprogram declarations,
- -- bodies, renamings, stubs, and instantiations.
+ -- bodies, renamings, stubs, and instantiations. The test against
+ -- Pf_Decl_Pbod is added to account for the case of subprograms
+ -- declared in a protected type, where only subprogram declarations
+ -- and bodies can occur.
- if Pf_Flags /= Pf_Decl_Gins_Pbod_Rnam_Stub then
+ if Pf_Flags /= Pf_Decl_Gins_Pbod_Rnam_Stub
+ and then
+ Pf_Flags /= Pf_Decl_Pbod
+ then
Error_Msg_SC ("overriding indicator not allowed here!");
- elsif Token /= Tok_Function
- and then Token /= Tok_Procedure
- then
+ elsif Token /= Tok_Function and then Token /= Tok_Procedure then
Error_Msg_SC ("FUNCTION or PROCEDURE expected!");
end if;
end if;
diff --git a/gcc/ada/par-ch9.adb b/gcc/ada/par-ch9.adb
index fcf2d3c69b4..d5c3549f23d 100644
--- a/gcc/ada/par-ch9.adb
+++ b/gcc/ada/par-ch9.adb
@@ -736,9 +736,16 @@ package body Ch9 is
if Token = Tok_Entry or else Bad_Spelling_Of (Tok_Entry) then
Append (P_Entry_Body, Item_List);
+ -- If the operation starts with procedure, function, or an overriding
+ -- indicator ("overriding" or "not overriding"), parse a subprogram.
+
elsif Token = Tok_Function or else Bad_Spelling_Of (Tok_Function)
or else
Token = Tok_Procedure or else Bad_Spelling_Of (Tok_Procedure)
+ or else
+ Token = Tok_Overriding or else Bad_Spelling_Of (Tok_Overriding)
+ or else
+ Token = Tok_Not or else Bad_Spelling_Of (Tok_Not)
then
Append (P_Subprogram (Pf_Decl_Pbod), Item_List);
diff --git a/gcc/ada/prep.adb b/gcc/ada/prep.adb
index 810669917f3..52328b236bb 100644
--- a/gcc/ada/prep.adb
+++ b/gcc/ada/prep.adb
@@ -119,9 +119,6 @@ package body Prep is
String_False : String_Id;
-- "false", as a string_id
- Name_Defined : Name_Id;
- -- defined, as a name_id
-
---------------
-- Behaviour --
---------------
@@ -691,13 +688,7 @@ package body Prep is
-- Initialize --
----------------
- procedure Initialize
- (Error_Msg : Error_Msg_Proc;
- Scan : Scan_Proc;
- Set_Ignore_Errors : Set_Ignore_Errors_Proc;
- Put_Char : Put_Char_Proc;
- New_EOL : New_EOL_Proc)
- is
+ procedure Initialize is
begin
if not Already_Initialized then
Start_String;
@@ -707,22 +698,12 @@ package body Prep is
Start_String;
Empty_String := End_String;
- Name_Len := 7;
- Name_Buffer (1 .. Name_Len) := "defined";
- Name_Defined := Name_Find;
-
Start_String;
Store_String_Chars ("False");
String_False := End_String;
Already_Initialized := True;
end if;
-
- Prep.Error_Msg := Error_Msg;
- Prep.Scan := Scan;
- Prep.Set_Ignore_Errors := Set_Ignore_Errors;
- Prep.Put_Char := Put_Char;
- Prep.New_EOL := New_EOL;
end Initialize;
------------------
@@ -1470,4 +1451,25 @@ package body Prep is
Source_Modified := No_Error_Found and Modified;
end Preprocess;
+ -----------------
+ -- Setup_Hooks --
+ -----------------
+
+ procedure Setup_Hooks
+ (Error_Msg : Error_Msg_Proc;
+ Scan : Scan_Proc;
+ Set_Ignore_Errors : Set_Ignore_Errors_Proc;
+ Put_Char : Put_Char_Proc;
+ New_EOL : New_EOL_Proc)
+ is
+ begin
+ pragma Assert (Already_Initialized);
+
+ Prep.Error_Msg := Error_Msg;
+ Prep.Scan := Scan;
+ Prep.Set_Ignore_Errors := Set_Ignore_Errors;
+ Prep.Put_Char := Put_Char;
+ Prep.New_EOL := New_EOL;
+ end Setup_Hooks;
+
end Prep;
diff --git a/gcc/ada/prep.ads b/gcc/ada/prep.ads
index 0f595e64dfb..801167ee5fb 100644
--- a/gcc/ada/prep.ads
+++ b/gcc/ada/prep.ads
@@ -95,12 +95,16 @@ package Prep is
type New_EOL_Proc is access procedure;
- procedure Initialize
+ procedure Initialize;
+ -- Initialize the preprocessor's global structures
+
+ procedure Setup_Hooks
(Error_Msg : Error_Msg_Proc;
Scan : Scan_Proc;
Set_Ignore_Errors : Set_Ignore_Errors_Proc;
Put_Char : Put_Char_Proc;
New_EOL : New_EOL_Proc);
+ -- Set the i/o hooks used by the preprocessor
procedure Parse_Def_File;
-- Parse the definition file. The definition file must have already been
diff --git a/gcc/ada/prepcomp.adb b/gcc/ada/prepcomp.adb
index 981da86eac2..18c2686e491 100644
--- a/gcc/ada/prepcomp.adb
+++ b/gcc/ada/prepcomp.adb
@@ -45,8 +45,11 @@ package body Prepcomp is
Source_Index_Of_Preproc_Data_File : Source_File_Index := No_Source_File;
- -- The following variable should be a constant, but this is not
- -- possible. Warnings are Off because it is never assigned a value.
+ -- The following variable should be a constant, but this is not possible
+ -- because its type GNAT.Dynamic_Tables.Instance has a component P of
+ -- unitialized private type GNAT.Dynamic_Tables.Table_Private and there
+ -- are no exported values for this private type. Warnings are Off because
+ -- it is never assigned a value.
pragma Warnings (Off);
No_Mapping : Prep.Symbol_Table.Instance;
@@ -122,8 +125,7 @@ package body Prepcomp is
-- Table to store the dependencies on preprocessing files
procedure Add_Command_Line_Symbols;
- -- Add the command line symbol definitions, if any, to the
- -- Prep.Mapping table.
+ -- Add the command line symbol definitions, if any, to Prep.Mapping table
procedure Skip_To_End_Of_Line;
-- Ignore errors and scan up to the next end of line or the end of file
@@ -663,7 +665,7 @@ package body Prepcomp is
-- Initialize the preprocessor and set the characteristics of the
-- scanner for a definition file.
- Prep.Initialize
+ Prep.Setup_Hooks
(Error_Msg => Errout.Error_Msg'Access,
Scan => Scn.Scanner.Scan'Access,
Set_Ignore_Errors => Errout.Set_Ignore_Errors'Access,
@@ -742,7 +744,7 @@ package body Prepcomp is
Check_Command_Line_Symbol_Definition
(Definition => Symbol_Definitions (Index).all,
- Data => Symbol_Data);
+ Data => Symbol_Data);
Found := False;
-- If there is already a definition for this symbol, replace the old
diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb
index 7e30de68762..81a611f7800 100644
--- a/gcc/ada/prj-attr.adb
+++ b/gcc/ada/prj-attr.adb
@@ -116,6 +116,7 @@ package body Prj.Attr is
"Satoolchain_description#" &
"Saobject_generated#" &
"Saobjects_linked#" &
+ "SVtarget#" &
-- Configuration - Libraries
@@ -140,6 +141,7 @@ package body Prj.Attr is
"LVshared_library_minimum_switches#" &
"LVlibrary_version_switches#" &
"Saruntime_library_dir#" &
+ "Saruntime_source_dir#" &
-- package Naming
@@ -172,6 +174,7 @@ package body Prj.Attr is
"Larequired_switches#" &
"Lapic_option#" &
"Sapath_syntax#" &
+ "Saobject_file_suffix#" &
-- Configuration - Mapping files
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 8a9a09b8e30..e9bc518de69 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -646,7 +646,8 @@ package body Prj.Nmsc is
Src_Data.Naming_Exception := Naming_Exception;
if Src_Data.Compiled and then Src_Data.Object_Exists then
- Src_Data.Object := Object_Name (File_Name);
+ Src_Data.Object :=
+ Object_Name (File_Name, Config.Object_File_Suffix);
Src_Data.Dep_Name :=
Dependency_Name (File_Name, Src_Data.Dependency);
Src_Data.Switches := Switches_Name (File_Name);
@@ -746,8 +747,8 @@ package body Prj.Nmsc is
if Data.Qualifier = Dry and then Data.Source_Dirs /= Nil_String then
Error_Msg
(Project, In_Tree,
- "an abstract project need to have no language, no sources or no " &
- "source directories",
+ "an abstract project needs to have no language, no sources " &
+ "or no source directories",
Data.Location);
end if;
@@ -1541,6 +1542,19 @@ package body Prj.Nmsc is
Element.Value.Location);
end;
+ when Name_Object_File_Suffix =>
+ if Get_Name_String (Element.Value.Value) = "" then
+ Error_Msg
+ (Project, In_Tree,
+ "object file suffix cannot be empty",
+ Element.Value.Location);
+
+ else
+ In_Tree.Languages_Data.Table
+ (Lang_Index).Config.Object_File_Suffix :=
+ Element.Value.Value;
+ end if;
+
when Name_Pic_Option =>
-- Attribute Compiler_Pic_Option (<language>)
@@ -1963,7 +1977,13 @@ package body Prj.Nmsc is
In_Tree.Variable_Elements.Table (Attribute_Id);
if not Attribute.Value.Default then
- if Attribute.Name = Name_Library_Builder then
+ if Attribute.Name = Name_Target then
+
+ -- Attribute Target: the target specified
+
+ Data.Config.Target := Attribute.Value.Value;
+
+ elsif Attribute.Name = Name_Library_Builder then
-- Attribute Library_Builder: the application to invoke
-- to build libraries.
@@ -2290,6 +2310,14 @@ package body Prj.Nmsc is
(Lang_Index).Config.Runtime_Library_Dir :=
Element.Value.Value;
+ when Name_Runtime_Source_Dir =>
+
+ -- Attribute Runtime_Library_Dir (<language>)
+
+ In_Tree.Languages_Data.Table
+ (Lang_Index).Config.Runtime_Source_Dir :=
+ Element.Value.Value;
+
when Name_Object_Generated =>
declare
pragma Unsuppress (All_Checks);
@@ -2615,7 +2643,7 @@ package body Prj.Nmsc is
(Src_Data.Other_Part).In_Interfaces := True;
In_Tree.Sources.Table
(Src_Data.Other_Part).Declared_In_Interfaces :=
- True;
+ True;
end if;
if Current_Verbosity = High then
@@ -2646,8 +2674,8 @@ package body Prj.Nmsc is
Error_Msg
(Project,
In_Tree,
- "{ cannot be an interface of project %% " &
- "as it is not one of its sources",
+ "{ cannot be an interface of project %% "
+ & "as it is not one of its sources",
Element.Location);
end if;
@@ -5347,7 +5375,7 @@ package body Prj.Nmsc is
then
Error_Msg
(Project, In_Tree,
- "a reference symbol file need to be defined",
+ "a reference symbol file needs to be defined",
Lib_Symbol_Policy.Location);
end if;
@@ -5790,6 +5818,10 @@ package body Prj.Nmsc is
Last_Source_Dir : String_List_Id := Nil_String;
+ Languages : constant Variable_Value :=
+ Prj.Util.Value_Of
+ (Name_Languages, Data.Decl.Attributes, In_Tree);
+
procedure Find_Source_Dirs
(From : File_Name_Type;
Location : Source_Ptr;
@@ -6209,154 +6241,25 @@ package body Prj.Nmsc is
Write_Line ("Starting to look for directories");
end if;
- -- We set the object directory to its default. It may be set to nil, if
- -- there is no sources in the project.
-
- Data.Object_Directory := Data.Directory;
+ -- Set the object directory to its default which may be nil, if there
+ -- is no sources in the project.
- -- Look for the source directories
-
- if Current_Verbosity = High then
- Write_Line ("Starting to look for source directories");
- end if;
-
- pragma Assert (Source_Dirs.Kind = List, "Source_Dirs is not a list");
-
- if (not Source_Files.Default) and then
- Source_Files.Values = Nil_String
+ if (((not Source_Files.Default)
+ and then Source_Files.Values = Nil_String)
+ or else
+ ((not Source_Dirs.Default) and then Source_Dirs.Values = Nil_String)
+ or else
+ ((not Languages.Default) and then Languages.Values = Nil_String))
+ and then Data.Extends = No_Project
then
- Data.Source_Dirs := Nil_String;
-
- if Data.Qualifier = Standard then
- Error_Msg
- (Project,
- In_Tree,
- "a standard project cannot have no sources",
- Source_Files.Location);
- end if;
-
- if Data.Extends = No_Project
- and then Data.Object_Directory = Data.Directory
- then
- Data.Object_Directory := No_Path_Information;
- end if;
-
- elsif Source_Dirs.Default then
-
- -- No Source_Dirs specified: the single source directory is the one
- -- containing the project file
-
- String_Element_Table.Increment_Last
- (In_Tree.String_Elements);
- Data.Source_Dirs := String_Element_Table.Last
- (In_Tree.String_Elements);
- In_Tree.String_Elements.Table (Data.Source_Dirs) :=
- (Value => Name_Id (Data.Directory.Name),
- Display_Value => Name_Id (Data.Directory.Display_Name),
- Location => No_Location,
- Flag => False,
- Next => Nil_String,
- Index => 0);
-
- if Current_Verbosity = High then
- Write_Line ("Single source directory:");
- Write_Str (" """);
- Write_Str (Get_Name_String (Data.Directory.Display_Name));
- Write_Line ("""");
- end if;
-
- elsif Source_Dirs.Values = Nil_String then
- if Data.Qualifier = Standard then
- Error_Msg
- (Project,
- In_Tree,
- "a standard project cannot have no source directories",
- Source_Dirs.Location);
- end if;
-
- -- If Source_Dirs is an empty string list, this means that this
- -- project contains no source. For projects that don't extend other
- -- projects, this also means that there is no need for an object
- -- directory, if not specified.
-
- if Data.Extends = No_Project
- and then Data.Object_Directory = Data.Directory
- then
- Data.Object_Directory := No_Path_Information;
- end if;
-
- Data.Source_Dirs := Nil_String;
+ Data.Object_Directory := No_Path_Information;
else
- declare
- Source_Dir : String_List_Id;
- Element : String_Element;
-
- begin
- -- Process the source directories for each element of the list
-
- Source_Dir := Source_Dirs.Values;
- while Source_Dir /= Nil_String loop
- Element := In_Tree.String_Elements.Table (Source_Dir);
- Find_Source_Dirs
- (File_Name_Type (Element.Value), Element.Location);
- Source_Dir := Element.Next;
- end loop;
- end;
+ Data.Object_Directory := Data.Directory;
end if;
- if not Excluded_Source_Dirs.Default
- and then Excluded_Source_Dirs.Values /= Nil_String
- then
- declare
- Source_Dir : String_List_Id;
- Element : String_Element;
-
- begin
- -- Process the source directories for each element of the list
-
- Source_Dir := Excluded_Source_Dirs.Values;
- while Source_Dir /= Nil_String loop
- Element := In_Tree.String_Elements.Table (Source_Dir);
- Find_Source_Dirs
- (File_Name_Type (Element.Value),
- Element.Location,
- Removed => True);
- Source_Dir := Element.Next;
- end loop;
- end;
- end if;
-
- if Current_Verbosity = High then
- Write_Line ("Putting source directories in canonical cases");
- end if;
-
- declare
- Current : String_List_Id := Data.Source_Dirs;
- Element : String_Element;
-
- begin
- while Current /= Nil_String loop
- Element := In_Tree.String_Elements.Table (Current);
- if Element.Value /= No_Name then
- if not Osint.File_Names_Case_Sensitive then
- Get_Name_String (Element.Value);
- Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len));
- Element.Value := Name_Find;
- end if;
-
- In_Tree.String_Elements.Table (Current) := Element;
- end if;
-
- Current := Element.Next;
- end loop;
- end;
-
-- Check the object directory
- pragma Assert (Object_Dir.Kind = Single,
- "Object_Dir is not a single string");
-
if Object_Dir.Value /= Empty_String then
Get_Name_String (Object_Dir.Value);
@@ -6444,9 +6347,6 @@ package body Prj.Nmsc is
-- Check the exec directory
- pragma Assert (Exec_Dir.Kind = Single,
- "Exec_Dir is not a single string");
-
-- We set the object directory to its default
Data.Exec_Directory := Data.Object_Directory;
@@ -6494,6 +6394,127 @@ package body Prj.Nmsc is
Write_Line ("""");
end if;
end if;
+
+ -- Look for the source directories
+
+ if Current_Verbosity = High then
+ Write_Line ("Starting to look for source directories");
+ end if;
+
+ pragma Assert (Source_Dirs.Kind = List, "Source_Dirs is not a list");
+
+ if (not Source_Files.Default) and then
+ Source_Files.Values = Nil_String
+ then
+ Data.Source_Dirs := Nil_String;
+
+ if Data.Qualifier = Standard then
+ Error_Msg
+ (Project,
+ In_Tree,
+ "a standard project cannot have no sources",
+ Source_Files.Location);
+ end if;
+
+ elsif Source_Dirs.Default then
+
+ -- No Source_Dirs specified: the single source directory is the one
+ -- containing the project file
+
+ String_Element_Table.Increment_Last
+ (In_Tree.String_Elements);
+ Data.Source_Dirs := String_Element_Table.Last
+ (In_Tree.String_Elements);
+ In_Tree.String_Elements.Table (Data.Source_Dirs) :=
+ (Value => Name_Id (Data.Directory.Name),
+ Display_Value => Name_Id (Data.Directory.Display_Name),
+ Location => No_Location,
+ Flag => False,
+ Next => Nil_String,
+ Index => 0);
+
+ if Current_Verbosity = High then
+ Write_Line ("Single source directory:");
+ Write_Str (" """);
+ Write_Str (Get_Name_String (Data.Directory.Display_Name));
+ Write_Line ("""");
+ end if;
+
+ elsif Source_Dirs.Values = Nil_String then
+ if Data.Qualifier = Standard then
+ Error_Msg
+ (Project,
+ In_Tree,
+ "a standard project cannot have no source directories",
+ Source_Dirs.Location);
+ end if;
+
+ Data.Source_Dirs := Nil_String;
+
+ else
+ declare
+ Source_Dir : String_List_Id;
+ Element : String_Element;
+
+ begin
+ -- Process the source directories for each element of the list
+
+ Source_Dir := Source_Dirs.Values;
+ while Source_Dir /= Nil_String loop
+ Element := In_Tree.String_Elements.Table (Source_Dir);
+ Find_Source_Dirs
+ (File_Name_Type (Element.Value), Element.Location);
+ Source_Dir := Element.Next;
+ end loop;
+ end;
+ end if;
+
+ if not Excluded_Source_Dirs.Default
+ and then Excluded_Source_Dirs.Values /= Nil_String
+ then
+ declare
+ Source_Dir : String_List_Id;
+ Element : String_Element;
+
+ begin
+ -- Process the source directories for each element of the list
+
+ Source_Dir := Excluded_Source_Dirs.Values;
+ while Source_Dir /= Nil_String loop
+ Element := In_Tree.String_Elements.Table (Source_Dir);
+ Find_Source_Dirs
+ (File_Name_Type (Element.Value),
+ Element.Location,
+ Removed => True);
+ Source_Dir := Element.Next;
+ end loop;
+ end;
+ end if;
+
+ if Current_Verbosity = High then
+ Write_Line ("Putting source directories in canonical cases");
+ end if;
+
+ declare
+ Current : String_List_Id := Data.Source_Dirs;
+ Element : String_Element;
+
+ begin
+ while Current /= Nil_String loop
+ Element := In_Tree.String_Elements.Table (Current);
+ if Element.Value /= No_Name then
+ if not Osint.File_Names_Case_Sensitive then
+ Get_Name_String (Element.Value);
+ Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len));
+ Element.Value := Name_Find;
+ end if;
+
+ In_Tree.String_Elements.Table (Current) := Element;
+ end if;
+
+ Current := Element.Next;
+ end loop;
+ end;
end Get_Directories;
---------------
@@ -7724,7 +7745,7 @@ package body Prj.Nmsc is
Config : Language_Config;
Lang : Name_List_Index := Data.Languages;
Header_File : Boolean := False;
- First_Language : Language_Index;
+ First_Language : Language_Index := No_Language_Index;
OK : Boolean;
Last_Spec : Natural;
@@ -7732,8 +7753,15 @@ package body Prj.Nmsc is
Last_Sep : Natural;
begin
- Unit := No_Name;
- Alternate_Languages := No_Alternate_Language;
+ -- Default values
+
+ Alternate_Languages := No_Alternate_Language;
+ Language := No_Language_Index;
+ Language_Name := No_Name;
+ Display_Language_Name := No_Name;
+ Unit := No_Name;
+ Lang_Kind := File_Based;
+ Kind := Spec;
while Lang /= No_Name_List loop
Language_Name := In_Tree.Name_Lists.Table (Lang).Name;
@@ -8827,8 +8855,13 @@ package body Prj.Nmsc is
if Result = null then
return "";
else
- Canonical_Case_File_Name (Result.all);
- return Result.all;
+ declare
+ R : String := Result.all;
+ begin
+ Free (Result);
+ Canonical_Case_File_Name (R);
+ return R;
+ end;
end if;
end Path_Name_Of;
diff --git a/gcc/ada/prj-part.adb b/gcc/ada/prj-part.adb
index ad4c7ea7f3d..77a98bc1f34 100644
--- a/gcc/ada/prj-part.adb
+++ b/gcc/ada/prj-part.adb
@@ -1738,7 +1738,7 @@ package body Prj.Part is
-- And restore the comment state that was saved
- Tree.Restore (Project_Comment_State);
+ Tree.Restore_And_Free (Project_Comment_State);
end Parse_Single_Project;
-----------------------
diff --git a/gcc/ada/prj-tree.adb b/gcc/ada/prj-tree.adb
index 0f9f5de986f..e9bc4a38853 100644
--- a/gcc/ada/prj-tree.adb
+++ b/gcc/ada/prj-tree.adb
@@ -23,6 +23,7 @@
-- --
------------------------------------------------------------------------------
+with Ada.Unchecked_Deallocation;
with Prj.Err;
package body Prj.Tree is
@@ -984,6 +985,21 @@ package body Prj.Tree is
Projects_Htable.Reset (Tree.Projects_HT);
end Initialize;
+ ----------
+ -- Free --
+ ----------
+
+ procedure Free (Prj : in out Project_Node_Tree_Ref) is
+ procedure Unchecked_Free is new Ada.Unchecked_Deallocation
+ (Project_Node_Tree_Data, Project_Node_Tree_Ref);
+ begin
+ if Prj /= null then
+ Project_Node_Table.Free (Prj.Project_Nodes);
+ Projects_Htable.Reset (Prj.Projects_HT);
+ Unchecked_Free (Prj);
+ end if;
+ end Free;
+
-------------------------------
-- Is_Followed_By_Empty_Line --
-------------------------------
@@ -1486,11 +1502,14 @@ package body Prj.Tree is
Comments.Set_Last (0);
end Reset_State;
- -------------
- -- Restore --
- -------------
+ ----------------------
+ -- Restore_And_Free --
+ ----------------------
+
+ procedure Restore_And_Free (S : in out Comment_State) is
+ procedure Unchecked_Free is new
+ Ada.Unchecked_Deallocation (Comment_Array, Comments_Ptr);
- procedure Restore (S : Comment_State) is
begin
End_Of_Line_Node := S.End_Of_Line_Node;
Previous_Line_Node := S.Previous_Line_Node;
@@ -1504,7 +1523,9 @@ package body Prj.Tree is
Comments.Increment_Last;
Comments.Table (Comments.Last) := S.Comments (J);
end loop;
- end Restore;
+
+ Unchecked_Free (S.Comments);
+ end Restore_And_Free;
----------
-- Save --
diff --git a/gcc/ada/prj-tree.ads b/gcc/ada/prj-tree.ads
index 94526660e20..57fe531dc3d 100644
--- a/gcc/ada/prj-tree.ads
+++ b/gcc/ada/prj-tree.ads
@@ -131,9 +131,9 @@ package Prj.Tree is
-- Save in variable S the comment state. Called before scanning a new
-- project file.
- procedure Restore (S : Comment_State);
+ procedure Restore_And_Free (S : in out Comment_State);
-- Restore the comment state to a previously saved value. Called after
- -- scanning a project file.
+ -- scanning a project file. Frees the memory occupied by S
procedure Reset_State;
-- Set the comment state to its initial value. Called before scanning a
@@ -1300,6 +1300,9 @@ package Prj.Tree is
end record;
-- The data for a project node tree
+ procedure Free (Prj : in out Project_Node_Tree_Ref);
+ -- Free memory used by Prj
+
private
type Comment_Array is array (Positive range <>) of Comment_Data;
type Comments_Ptr is access Comment_Array;
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index ca804d9b0a8..d8f368d3996 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -24,6 +24,7 @@
------------------------------------------------------------------------------
with Ada.Characters.Handling; use Ada.Characters.Handling;
+with Ada.Unchecked_Deallocation;
with Debug;
with Output; use Output;
@@ -160,6 +161,9 @@ package body Prj is
-- Table to store the path name of all the created temporary files, so that
-- they can be deleted at the end, or when the program is interrupted.
+ procedure Free (Project : in out Project_Data);
+ -- Free memory allocated for Project
+
-------------------
-- Add_To_Buffer --
-------------------
@@ -705,11 +709,18 @@ package body Prj is
-----------------
function Object_Name
- (Source_File_Name : File_Name_Type)
+ (Source_File_Name : File_Name_Type;
+ Object_File_Suffix : Name_Id := No_Name)
return File_Name_Type
is
begin
- return Extend_Name (Source_File_Name, Object_Suffix);
+ if Object_File_Suffix = No_Name then
+ return Extend_Name
+ (Source_File_Name, Object_Suffix);
+ else
+ return Extend_Name
+ (Source_File_Name, Get_Name_String (Object_File_Suffix));
+ end if;
end Object_Name;
----------------------
@@ -826,17 +837,71 @@ package body Prj is
end if;
end Register_Default_Naming_Scheme;
+ ----------
+ -- Free --
+ ----------
+
+ procedure Free (Project : in out Project_Data) is
+ begin
+ Free (Project.Dir_Path);
+ Free (Project.Include_Path);
+ Free (Project.Ada_Include_Path);
+ Free (Project.Objects_Path);
+ Free (Project.Ada_Objects_Path);
+ end Free;
+
+ ----------
+ -- Free --
+ ----------
+
+ procedure Free (Tree : in out Project_Tree_Ref) is
+ procedure Unchecked_Free is new Ada.Unchecked_Deallocation
+ (Project_Tree_Data, Project_Tree_Ref);
+ begin
+ if Tree /= null then
+ Language_Data_Table.Free (Tree.Languages_Data);
+ Name_List_Table.Free (Tree.Name_Lists);
+ String_Element_Table.Free (Tree.String_Elements);
+ Variable_Element_Table.Free (Tree.Variable_Elements);
+ Array_Element_Table.Free (Tree.Array_Elements);
+ Array_Table.Free (Tree.Arrays);
+ Package_Table.Free (Tree.Packages);
+ Project_List_Table.Free (Tree.Project_Lists);
+ Source_Data_Table.Free (Tree.Sources);
+ Alternate_Language_Table.Free (Tree.Alt_Langs);
+ Unit_Table.Free (Tree.Units);
+ Units_Htable.Reset (Tree.Units_HT);
+ Files_Htable.Reset (Tree.Files_HT);
+ Source_Paths_Htable.Reset (Tree.Source_Paths_HT);
+ Unit_Sources_Htable.Reset (Tree.Unit_Sources_HT);
+
+ for P in Project_Table.First ..
+ Project_Table.Last (Tree.Projects)
+ loop
+ Free (Tree.Projects.Table (P));
+ end loop;
+
+ Project_Table.Free (Tree.Projects);
+
+ -- Private part
+
+ Naming_Table.Free (Tree.Private_Part.Namings);
+ Path_File_Table.Free (Tree.Private_Part.Path_Files);
+ Source_Path_Table.Free (Tree.Private_Part.Source_Paths);
+ Object_Path_Table.Free (Tree.Private_Part.Object_Paths);
+
+ -- Naming data (nothing to free ?)
+ null;
+
+ Unchecked_Free (Tree);
+ end if;
+ end Free;
+
-----------
-- Reset --
-----------
procedure Reset (Tree : Project_Tree_Ref) is
-
- -- Def_Lang : constant Name_Node :=
- -- (Name => Name_Ada,
- -- Next => No_Name_List);
- -- Why is the above commented out ???
-
begin
Prj.Env.Initialize;
@@ -850,7 +915,6 @@ package body Prj is
Array_Table.Init (Tree.Arrays);
Package_Table.Init (Tree.Packages);
Project_List_Table.Init (Tree.Project_Lists);
- Project_Table.Init (Tree.Projects);
Source_Data_Table.Init (Tree.Sources);
Alternate_Language_Table.Init (Tree.Alt_Langs);
Unit_Table.Init (Tree.Units);
@@ -859,6 +923,16 @@ package body Prj is
Source_Paths_Htable.Reset (Tree.Source_Paths_HT);
Unit_Sources_Htable.Reset (Tree.Unit_Sources_HT);
+ if not Project_Table."=" (Tree.Projects.Table, null) then
+ for P in Project_Table.First ..
+ Project_Table.Last (Tree.Projects)
+ loop
+ Free (Tree.Projects.Table (P));
+ end loop;
+ end if;
+
+ Project_Table.Init (Tree.Projects);
+
-- Private part table
Naming_Table.Init (Tree.Private_Part.Namings);
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index adc57472329..aa8d88f7571 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -116,6 +116,9 @@ package Prj is
No_Project_Tree : constant Project_Tree_Ref;
+ procedure Free (Tree : in out Project_Tree_Ref);
+ -- Free memory associated with the tree
+
function Default_Ada_Spec_Suffix return File_Name_Type;
pragma Inline (Default_Ada_Spec_Suffix);
-- The name for the standard GNAT suffix for Ada spec source file name
@@ -438,6 +441,8 @@ package Prj is
-- Value may be Canonical (Unix style) or Host (host syntax, for example
-- on VMS for DEC C).
+ Object_File_Suffix : Name_Id := No_Name;
+
Compilation_PIC_Option : Name_List_Index := No_Name_List;
-- The option(s) to compile a source in Position Independent Code for
-- shared libraries. Specified in the configuration. When not specified,
@@ -453,6 +458,9 @@ package Prj is
Runtime_Library_Dir : Name_Id := No_Name;
-- Path name of the runtime library directory, if any
+ Runtime_Source_Dir : Name_Id := No_Name;
+ -- Path name of the runtime source directory, if any
+
Mapping_File_Switches : Name_List_Index := No_Name_List;
-- The option(s) to provide a mapping file to the compiler. Specified in
-- the configuration. When value is No_Name_List, there is no mapping
@@ -551,10 +559,12 @@ package Prj is
Compiler_Driver_Path => null,
Compiler_Required_Switches => No_Name_List,
Path_Syntax => Canonical,
+ Object_File_Suffix => No_Name,
Compilation_PIC_Option => No_Name_List,
Object_Generated => True,
Objects_Linked => True,
Runtime_Library_Dir => No_Name,
+ Runtime_Source_Dir => No_Name,
Mapping_File_Switches => No_Name_List,
Mapping_Spec_Suffix => No_File,
Mapping_Body_Suffix => No_File,
@@ -987,6 +997,9 @@ package Prj is
-- The format of the different response files
type Project_Configuration is record
+ Target : Name_Id := No_Name;
+ -- The target of the configuration, when specified
+
Run_Path_Option : Name_List_Index := No_Name_List;
-- The option to use when linking to specify the path where to look for
-- libraries.
@@ -1096,7 +1109,8 @@ package Prj is
end record;
Default_Project_Config : constant Project_Configuration :=
- (Run_Path_Option => No_Name_List,
+ (Target => No_Name,
+ Run_Path_Option => No_Name_List,
Executable_Suffix => No_Name,
Linker => No_Path,
Map_File_Option => No_Name,
@@ -1557,7 +1571,8 @@ package Prj is
-- Replace the extension of File with With_Suffix
function Object_Name
- (Source_File_Name : File_Name_Type) return File_Name_Type;
+ (Source_File_Name : File_Name_Type;
+ Object_File_Suffix : Name_Id := No_Name) return File_Name_Type;
-- Returns the object file name corresponding to a source file name
function Dependency_Name
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb
index 99a20afcad9..a57ac4c66ee 100644
--- a/gcc/ada/restrict.adb
+++ b/gcc/ada/restrict.adb
@@ -154,10 +154,7 @@ package body Restrict is
-- Strip extension and pad to eight characters
Name_Len := Name_Len - 4;
- while Name_Len < 8 loop
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := ' ';
- end loop;
+ Add_Str_To_Name_Buffer ((Name_Len + 1 .. 8 => ' '));
-- If predefined unit, check the list of restricted units
@@ -319,6 +316,15 @@ package body Restrict is
DU : Node_Id;
begin
+ -- Ignore call if node U is not in the main source unit. This avoids
+ -- cascaded errors, e.g. when Ada.Containers units with other units.
+
+ if not In_Extended_Main_Source_Unit (U) then
+ return;
+ end if;
+
+ -- Loop through entries in No_Dependence table to check each one in turn
+
for J in No_Dependence.First .. No_Dependence.Last loop
DU := No_Dependence.Table (J).Unit;
diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb
index ebd850191f6..9944bbf713b 100644
--- a/gcc/ada/rtsfind.adb
+++ b/gcc/ada/rtsfind.adb
@@ -79,11 +79,16 @@ package body Rtsfind is
-- the latter case it is critical to make a call to Set_RTU_Loaded to
-- ensure that the entry in this table reflects the load.
+ -- Withed is True if an implicit with_clause has been added from some unit
+ -- other than the main unit to this unit. Withed_By_Main is the same,
+ -- except from the main unit.
+
type RT_Unit_Table_Record is record
- Entity : Entity_Id;
- Uname : Unit_Name_Type;
- Unum : Unit_Number_Type;
- Withed : Boolean;
+ Entity : Entity_Id;
+ Uname : Unit_Name_Type;
+ Unum : Unit_Number_Type;
+ Withed : Boolean;
+ Withed_By_Main : Boolean;
end record;
RT_Unit_Table : array (RTU_Id) of RT_Unit_Table_Record;
@@ -106,22 +111,19 @@ package body Rtsfind is
RE_Table : array (RE_Id) of Entity_Id;
- --------------------------
- -- Generation of WITH's --
- --------------------------
+ --------------------------------
+ -- Generation of with_clauses --
+ --------------------------------
-- When a unit is implicitly loaded as a result of a call to RTE, it is
- -- necessary to create an implicit WITH to ensure that the object is
- -- correctly loaded by the binder. We originally added such WITH clauses
- -- only if the extended main unit required them, and added them only to the
- -- extended main unit. They are currently added to whatever unit first
- -- needs them, which is not necessarily the main unit. This works because
- -- if the main unit requires some runtime unit also required by some other
- -- unit, the other unit's implicit WITH will force a correct elaboration
- -- order. This method is necessary for SofCheck Inspector.
-
- -- The flag Withed in the unit table record is initially set to False. It
- -- is set True if a WITH has been generated for the corresponding unit.
+ -- necessary to create one or two implicit with_clauses. We add such
+ -- with_clauses to the extended main unit if needed, and also to whatever
+ -- unit first needs them, which is not necessarily the main unit. The
+ -- former ensures that the object is correctly loaded by the binder. The
+ -- latter is necessary for SofCheck Inspector.
+
+ -- The flags Withed and Withed_By_Main in the unit table record are used to
+ -- avoid duplicates.
-----------------------
-- Local Subprograms --
@@ -178,6 +180,10 @@ package body Rtsfind is
-- If the unit is a child unit, build fully qualified name for use in
-- With_Clause.
+ procedure Maybe_Add_With (E : RE_Id; U : in out RT_Unit_Table_Record);
+ -- If necessary, add an implicit with_clause from the current unit to the
+ -- one represented by E and U.
+
procedure Output_Entity_Name (Id : RE_Id; Msg : String);
-- Output continuation error message giving qualified name of entity
-- corresponding to Id, appending the string given by Msg. This call
@@ -661,8 +667,9 @@ package body Rtsfind is
-- Otherwise we need to load the unit, First build unit name
-- from the enumeration literal name in type RTU_Id.
- U.Uname := Get_Unit_Name (U_Id);
- U.Withed := False;
+ U.Uname := Get_Unit_Name (U_Id);
+ U.Withed := False;
+ U.Withed_By_Main := False;
-- Now do the load call, note that setting Error_Node to Empty is
-- a signal to Load_Unit that we will regard a failure to find the
@@ -721,7 +728,7 @@ package body Rtsfind is
if not Analyzed (Cunit (U.Unum)) then
- -- If the unit is already loaded through a limited_with clause,
+ -- If the unit is already loaded through a limited_with_clause,
-- the relevant entities must already be available. We do not
-- want to load and analyze the unit because this would create
-- a real semantic dependence when the purpose of the limited_with
@@ -784,7 +791,66 @@ package body Rtsfind is
return Nam;
end Make_Unit_Name;
- -----------------------
+ --------------------
+ -- Maybe_Add_With --
+ --------------------
+
+ procedure Maybe_Add_With (E : RE_Id; U : in out RT_Unit_Table_Record) is
+ Is_Main : constant Boolean :=
+ In_Extended_Main_Code_Unit (Cunit_Entity (Current_Sem_Unit));
+
+ begin
+ -- We do not need to generate a with_clause for a call issued from
+ -- RTE_Component_Available.
+
+ if RTE_Available_Call then
+ return;
+ end if;
+
+ -- If the current unit is the main one, add the with_clause unless it's
+ -- already been done.
+
+ if Is_Main then
+ if U.Withed_By_Main then
+ return;
+ else
+ U.Withed_By_Main := True;
+ end if;
+
+ -- If the current unit is not the main one, add the with_clause unless
+ -- it's already been done for some non-main unit.
+
+ else
+ if U.Withed then
+ return;
+ else
+ U.Withed := True;
+ end if;
+ end if;
+
+ -- Here if we've decided to add the with_clause
+
+ declare
+ LibUnit : constant Node_Id := Unit (Cunit (U.Unum));
+ Withn : constant Node_Id :=
+ Make_With_Clause (Standard_Location,
+ Name =>
+ Make_Unit_Name
+ (E, Defining_Unit_Name (Specification (LibUnit))));
+
+ begin
+ Set_Library_Unit (Withn, Cunit (U.Unum));
+ Set_Corresponding_Spec (Withn, U.Entity);
+ Set_First_Name (Withn, True);
+ Set_Implicit_With (Withn, True);
+
+ Mark_Rewrite_Insertion (Withn);
+ Append (Withn, Context_Items (Cunit (Current_Sem_Unit)));
+ Check_Restriction_No_Dependence (Name (Withn), Current_Error_Node);
+ end;
+ end Maybe_Add_With;
+
+ ------------------------
-- Output_Entity_Name --
------------------------
@@ -1063,36 +1129,8 @@ package body Rtsfind is
end if;
end if;
- -- See if we have to generate a WITH for this entity. We generate a WITH
- -- if we have not already added the with. The WITH is added to the
- -- appropriate unit (the current one). We do not need to generate a WITH
- -- for a call issued from RTE_Available.
-
<<Found>>
- if not U.Withed and then not RTE_Available_Call then
- U.Withed := True;
-
- declare
- Withn : Node_Id;
- Lib_Unit : Node_Id;
-
- begin
- Lib_Unit := Unit (Cunit (U.Unum));
- Withn :=
- Make_With_Clause (Standard_Location,
- Name =>
- Make_Unit_Name
- (E, Defining_Unit_Name (Specification (Lib_Unit))));
- Set_Library_Unit (Withn, Cunit (U.Unum));
- Set_Corresponding_Spec (Withn, U.Entity);
- Set_First_Name (Withn, True);
- Set_Implicit_With (Withn, True);
-
- Mark_Rewrite_Insertion (Withn);
- Append (Withn, Context_Items (Cunit (Current_Sem_Unit)));
- Check_Restriction_No_Dependence (Name (Withn), Current_Error_Node);
- end;
- end if;
+ Maybe_Add_With (E, U);
Front_End_Inlining := Save_Front_End_Inlining;
return Check_CRT (E, RE_Table (E));
@@ -1197,39 +1235,7 @@ package body Rtsfind is
-- If we didn't find the entity we want, something is wrong. The
-- appropriate action will be taken by Check_CRT when we exit.
- -- Generate a with-clause if the current unit is part of the extended
- -- main code unit, and if we have not already added the with. The clause
- -- is added to the appropriate unit (the current one). We do not need to
- -- generate it for a call issued from RTE_Component_Available.
-
- if (not U.Withed)
- and then
- In_Extended_Main_Code_Unit (Cunit_Entity (Current_Sem_Unit))
- and then not RTE_Available_Call
- then
- U.Withed := True;
-
- declare
- Withn : Node_Id;
- Lib_Unit : Node_Id;
-
- begin
- Lib_Unit := Unit (Cunit (U.Unum));
- Withn :=
- Make_With_Clause (Standard_Location,
- Name =>
- Make_Unit_Name
- (E, Defining_Unit_Name (Specification (Lib_Unit))));
- Set_Library_Unit (Withn, Cunit (U.Unum));
- Set_Corresponding_Spec (Withn, U.Entity);
- Set_First_Name (Withn, True);
- Set_Implicit_With (Withn, True);
-
- Mark_Rewrite_Insertion (Withn);
- Append (Withn, Context_Items (Cunit (Current_Sem_Unit)));
- Check_Restriction_No_Dependence (Name (Withn), Current_Error_Node);
- end;
- end if;
+ Maybe_Add_With (E, U);
Front_End_Inlining := Save_Front_End_Inlining;
return Check_CRT (E, Found_E);
@@ -1334,10 +1340,11 @@ package body Rtsfind is
-- If entry is not set, set it now
if No (U.Entity) then
- U.Entity := E;
- U.Uname := Get_Unit_Name (U_Id);
- U.Unum := Unum;
- U.Withed := False;
+ U := (Entity => E,
+ Uname => Get_Unit_Name (U_Id),
+ Unum => Unum,
+ Withed => False,
+ Withed_By_Main => False);
end if;
return;
diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads
index 7b8422e77da..f3dd1765634 100644
--- a/gcc/ada/rtsfind.ads
+++ b/gcc/ada/rtsfind.ads
@@ -36,37 +36,36 @@ package Rtsfind is
-- Runtime Unit Table --
------------------------
- -- The following type includes an enumeration entry for each runtime
- -- unit. The enumeration literal represents the fully qualified
- -- name of the unit, as follows:
+ -- The following type includes an enumeration entry for each runtime unit.
+ -- The enumeration literal represents the fully qualified name of the unit,
+ -- as follows:
- -- Names of the form Ada_xxx are first level children of Ada, whose
- -- name is Ada.xxx. For example, the name Ada_Tags refers to package
- -- Ada.Tags.
+ -- Names of the form Ada_xxx are first level children of Ada, whose name
+ -- is Ada.xxx. For example, the name Ada_Tags refers to package Ada.Tags.
- -- Names of the form Ada_Calendar_xxx are second level children
- -- of Ada.Calendar. This is part of a temporary implementation of
- -- delays; eventually, packages implementing delays will be found
- -- relative to the package that declares the time type.
+ -- Names of the form Ada_Calendar_xxx are second level children of
+ -- Ada.Calendar. This is part of a temporary implementation of delays;
+ -- eventually, packages implementing delays will be found relative to
+ -- the package that declares the time type.
- -- Names of the form Ada_Finalization_xxx are second level children
- -- of Ada.Finalization.
+ -- Names of the form Ada_Finalization_xxx are second level children of
+ -- Ada.Finalization.
- -- Names of the form Ada_Interrupts_xxx are second level children
- -- of Ada.Interrupts. This is needed for Ada.Interrupts.Names which
- -- is used by pragma Interrupt_State.
+ -- Names of the form Ada_Interrupts_xxx are second level children of
+ -- Ada.Interrupts. This is needed for Ada.Interrupts.Names which is used
+ -- by pragma Interrupt_State.
- -- Names of the form Ada_Real_Time_xxx are second level children
- -- of Ada.Real_Time.
+ -- Names of the form Ada_Real_Time_xxx are second level children of
+ -- Ada.Real_Time.
-- Names of the form Ada_Streams_xxx are second level children
-- of Ada.Streams.
- -- Names of the form Ada_Text_IO_xxx are second level children
- -- of Ada.Text_IO.
+ -- Names of the form Ada_Text_IO_xxx are second level children of
+ -- Ada.Text_IO.
- -- Names of the form Ada_Wide_Text_IO_xxx are second level children
- -- of Ada.Wide_Text_IO.
+ -- Names of the form Ada_Wide_Text_IO_xxx are second level children of
+ -- Ada.Wide_Text_IO.
-- Names of the form Ada_Wide_Wide_Text_IO_xxx are second level children
-- of Ada.Wide_Wide_Text_IO.
@@ -88,22 +87,22 @@ package Rtsfind is
-- Other names stand for themselves (e.g. System for package System)
-- This list can contain both subprogram and package unit names. For
- -- packages, the accessible entities in the package are separately
- -- listed in the package entity table. The units must be either library
- -- level package declarations, or library level subprogram declarations.
- -- Generic units, library level instantiations and subprogram bodies
- -- acting as specs may not be referenced (all these cases could be added
- -- at the expense of additional complexity in the body of Rtsfind, but
- -- it doesn't seem worthwhile, since the implementation controls the
- -- set of units that are referenced, and this restriction is easily met.
-
- -- IMPORTANT NOTE: the specs of packages and procedures with'ed using
- -- this mechanism may not contain use clauses. This is because these
- -- subprograms are compiled in the current visibility environment, and
- -- it would be too much trouble to establish a clean environment for the
- -- compilation. The presence of extraneous visible stuff has no effect
- -- on the compilation except in the presence of use clauses (which might
- -- result in unexpected ambiguities).
+ -- packages, the accessible entities in the package are separately listed
+ -- in the package entity table. The units must be either library level
+ -- package declarations, or library level subprogram declarations. Generic
+ -- units, library level instantiations and subprogram bodies acting as
+ -- specs may not be referenced (all these cases could be added at the
+ -- expense of additional complexity in the body of Rtsfind, but it doesn't
+ -- seem worthwhile, since the implementation controls the set of units that
+ -- are referenced, and this restriction is easily met.
+
+ -- IMPORTANT NOTE: the specs of packages and procedures with'ed using this
+ -- mechanism may not contain use clauses. This is because these subprograms
+ -- are compiled in the current visibility environment, and it would be too
+ -- much trouble to establish a clean environment for the compilation. The
+ -- presence of extraneous visible stuff has no effect on the compilation
+ -- except in the presence of use clauses (which might result in unexpected
+ -- ambiguities).
type RTU_Id is (
-- Runtime packages, for list of accessible entities in each
@@ -208,6 +207,14 @@ package Rtsfind is
System_Compare_Array_Unsigned_32,
System_Compare_Array_Unsigned_64,
System_Compare_Array_Unsigned_8,
+ System_Concat_2,
+ System_Concat_3,
+ System_Concat_4,
+ System_Concat_5,
+ System_Concat_6,
+ System_Concat_7,
+ System_Concat_8,
+ System_Concat_9,
System_DSA_Services,
System_DSA_Types,
System_Exception_Table,
@@ -689,6 +696,15 @@ package Rtsfind is
RE_Compare_Array_U64, -- System.Compare_Array_Unsigned_16
+ RE_Str_Concat_2, -- System.Concat_2
+ RE_Str_Concat_3, -- System.Concat_3
+ RE_Str_Concat_4, -- System.Concat_4
+ RE_Str_Concat_5, -- System.Concat_5
+ RE_Str_Concat_6, -- System.Concat_6
+ RE_Str_Concat_7, -- System.Concat_7
+ RE_Str_Concat_8, -- System.Concat_8
+ RE_Str_Concat_9, -- System.Concat_9
+
RE_Get_Active_Partition_Id, -- System.DSA_Services
RE_Get_Local_Partition_Id, -- System.DSA_Services
RE_Get_Passive_Partition_Id, -- System.DSA_Services
@@ -1135,6 +1151,7 @@ package Rtsfind is
RE_Request_Arguments, -- System.Partition_Interface
RE_Request_Set_Out, -- System.Partition_Interface
RE_Request_Raise_Occurrence, -- System.Partition_Interface
+ RE_Request_Destroy, -- System.Partition_Interface
RE_Nil_Exc_List, -- System.Partition_Interface
RE_Servant, -- System.Partition_Interface
RE_Move_Any_Value, -- System.Partition_Interface
@@ -1832,6 +1849,15 @@ package Rtsfind is
RE_Compare_Array_U64 => System_Compare_Array_Unsigned_64,
+ RE_Str_Concat_2 => System_Concat_2,
+ RE_Str_Concat_3 => System_Concat_3,
+ RE_Str_Concat_4 => System_Concat_4,
+ RE_Str_Concat_5 => System_Concat_5,
+ RE_Str_Concat_6 => System_Concat_6,
+ RE_Str_Concat_7 => System_Concat_7,
+ RE_Str_Concat_8 => System_Concat_8,
+ RE_Str_Concat_9 => System_Concat_9,
+
RE_Get_Active_Partition_Id => System_DSA_Services,
RE_Get_Local_Partition_Id => System_DSA_Services,
RE_Get_Passive_Partition_Id => System_DSA_Services,
@@ -2269,6 +2295,7 @@ package Rtsfind is
RE_Request_Arguments => System_Partition_Interface,
RE_Request_Set_Out => System_Partition_Interface,
RE_Request_Raise_Occurrence => System_Partition_Interface,
+ RE_Request_Destroy => System_Partition_Interface,
RE_Nil_Exc_List => System_Partition_Interface,
RE_Servant => System_Partition_Interface,
RE_Move_Any_Value => System_Partition_Interface,
diff --git a/gcc/ada/s-addope.adb b/gcc/ada/s-addope.adb
index 715e2b2e1db..2c957584da4 100644
--- a/gcc/ada/s-addope.adb
+++ b/gcc/ada/s-addope.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Conversion;
diff --git a/gcc/ada/s-addope.ads b/gcc/ada/s-addope.ads
index 1b53feae08e..2d3f5894681 100644
--- a/gcc/ada/s-addope.ads
+++ b/gcc/ada/s-addope.ads
@@ -40,9 +40,7 @@
-- inappropriate use by applications programs). In addition, the logical
-- operations may not be available if type Address is a signed integer.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Address_Operations is
pragma Pure;
diff --git a/gcc/ada/s-assert.adb b/gcc/ada/s-assert.adb
index 178166cdf1f..030ec17192e 100644
--- a/gcc/ada/s-assert.adb
+++ b/gcc/ada/s-assert.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Exceptions;
with System.Exceptions;
diff --git a/gcc/ada/s-assert.ads b/gcc/ada/s-assert.ads
index 525fdad49e1..433e276c600 100644
--- a/gcc/ada/s-assert.ads
+++ b/gcc/ada/s-assert.ads
@@ -34,9 +34,7 @@
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Assertions is
diff --git a/gcc/ada/s-asthan-vms-alpha.adb b/gcc/ada/s-asthan-vms-alpha.adb
index 70f3cd8c979..2e04081f410 100644
--- a/gcc/ada/s-asthan-vms-alpha.adb
+++ b/gcc/ada/s-asthan-vms-alpha.adb
@@ -133,9 +133,6 @@ package body System.AST_Handling is
type Descriptor_Type is new SSE.Storage_Array (1 .. 48);
for Descriptor_Type'Alignment use Standard'Maximum_Alignment;
- pragma Warnings (Off, Descriptor_Type);
- -- Suppress harmless warnings about alignment.
- -- Should explain why this warning is harmless ???
type Descriptor_Ref is access all Descriptor_Type;
@@ -459,12 +456,18 @@ package body System.AST_Handling is
Process_AST_Ptr : constant AST_Handler := Process_AST'Access;
-- Reference to standard procedure descriptor for Process_AST
+ pragma Warnings (Off, "*alignment*");
+ -- Suppress harmless warnings about alignment.
+ -- Should explain why this warning is harmless ???
+
function To_Descriptor_Ref is new Ada.Unchecked_Conversion
(AST_Handler, Descriptor_Ref);
Original_Descriptor_Ref : constant Descriptor_Ref :=
To_Descriptor_Ref (Process_AST_Ptr);
+ pragma Warnings (On, "*alignment*");
+
begin
if ATID.Is_Terminated (Taskid) then
raise Program_Error;
diff --git a/gcc/ada/s-auxdec-vms_64.ads b/gcc/ada/s-auxdec-vms_64.ads
index 6015a9fd421..e9d87627f5f 100644
--- a/gcc/ada/s-auxdec-vms_64.ads
+++ b/gcc/ada/s-auxdec-vms_64.ads
@@ -115,6 +115,7 @@ package System.Aux_DEC is
-- Floating point type declarations for VAX floating point data types
pragma Warnings (Off);
+ -- ??? needs comment
type F_Float is digits 6;
pragma Float_Representation (VAX_Float, F_Float);
diff --git a/gcc/ada/s-auxdec.ads b/gcc/ada/s-auxdec.ads
index 6104be8c110..a709956b60b 100644
--- a/gcc/ada/s-auxdec.ads
+++ b/gcc/ada/s-auxdec.ads
@@ -105,6 +105,7 @@ package System.Aux_DEC is
-- Floating point type declarations for VAX floating point data types
pragma Warnings (Off);
+ -- ??? needs comment
type F_Float is digits 6;
pragma Float_Representation (VAX_Float, F_Float);
diff --git a/gcc/ada/s-carun8.adb b/gcc/ada/s-carun8.adb
index b4733c2aa09..450e0476504 100644
--- a/gcc/ada/s-carun8.adb
+++ b/gcc/ada/s-carun8.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Address_Operations; use System.Address_Operations;
diff --git a/gcc/ada/s-carun8.ads b/gcc/ada/s-carun8.ads
index 7866126db84..aa0d4e0f740 100644
--- a/gcc/ada/s-carun8.ads
+++ b/gcc/ada/s-carun8.ads
@@ -32,9 +32,7 @@
-- This package contains functions for runtime comparisons on arrays whose
-- elements are 8-bit discrete type values to be treated as unsigned.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Compare_Array_Unsigned_8 is
diff --git a/gcc/ada/s-casuti.adb b/gcc/ada/s-casuti.adb
index 807024e7631..8517db7c092 100644
--- a/gcc/ada/s-casuti.adb
+++ b/gcc/ada/s-casuti.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1995-2007, AdaCore --
+-- Copyright (C) 1995-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,9 +31,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Case_Util is
diff --git a/gcc/ada/s-casuti.ads b/gcc/ada/s-casuti.ads
index 1a091628c2e..84b92f6e6bc 100644
--- a/gcc/ada/s-casuti.ads
+++ b/gcc/ada/s-casuti.ads
@@ -37,9 +37,7 @@
-- Note that all the routines in this package are available to the user
-- via GNAT.Case_Util, which imports all the entities from this package.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Case_Util is
pragma Pure;
diff --git a/gcc/ada/s-conca2.adb b/gcc/ada/s-conca2.adb
new file mode 100644
index 00000000000..1764575737c
--- /dev/null
+++ b/gcc/ada/s-conca2.adb
@@ -0,0 +1,55 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 2 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_2 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_2 --
+ ------------------
+
+ procedure Str_Concat_2 (R : out String; S1, S2 : String) is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S2;
+ end Str_Concat_2;
+
+end System.Concat_2;
diff --git a/gcc/ada/s-conca2.ads b/gcc/ada/s-conca2.ads
new file mode 100644
index 00000000000..b0fa85956af
--- /dev/null
+++ b/gcc/ada/s-conca2.ads
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 2 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of two string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_2 is
+
+ procedure Str_Concat_2 (R : out String; S1, S2 : String);
+ -- Performs the operation R := S1 & S2. The bounds of R are known to be
+ -- correct, so no bounds checks are required, and it is known that none
+ -- of the input operands overlaps R. No assumptions can be made about
+ -- the lower bounds of any of the operands.
+
+end System.Concat_2;
diff --git a/gcc/ada/s-conca3.adb b/gcc/ada/s-conca3.adb
new file mode 100644
index 00000000000..daa4ec7c9f8
--- /dev/null
+++ b/gcc/ada/s-conca3.adb
@@ -0,0 +1,59 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 3 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_3 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_3 --
+ ------------------
+
+ procedure Str_Concat_3 (R : out String; S1, S2, S3 : String) is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := F + S2'Length - 1;
+ R (F .. L) := S2;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S3;
+ end Str_Concat_3;
+
+end System.Concat_3;
diff --git a/gcc/ada/s-conca3.ads b/gcc/ada/s-conca3.ads
new file mode 100644
index 00000000000..41c7d978ecb
--- /dev/null
+++ b/gcc/ada/s-conca3.ads
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 3 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of three string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_3 is
+
+ procedure Str_Concat_3 (R : out String; S1, S2, S3 : String);
+ -- Performs the operation R := S1 & S2 & S3. The bounds of R are known to
+ -- be correct, so no bounds checks are required, and it is known that none
+ -- of the input operands overlaps R. No assumptions can be made about
+ -- the lower bounds of any of the operands.
+
+end System.Concat_3;
diff --git a/gcc/ada/s-conca4.adb b/gcc/ada/s-conca4.adb
new file mode 100644
index 00000000000..455c5be3e76
--- /dev/null
+++ b/gcc/ada/s-conca4.adb
@@ -0,0 +1,63 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 4 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_4 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_4 --
+ ------------------
+
+ procedure Str_Concat_4 (R : out String; S1, S2, S3, S4 : String) is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := F + S2'Length - 1;
+ R (F .. L) := S2;
+
+ F := L + 1;
+ L := F + S3'Length - 1;
+ R (F .. L) := S3;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S4;
+ end Str_Concat_4;
+
+end System.Concat_4;
diff --git a/gcc/ada/s-conca4.ads b/gcc/ada/s-conca4.ads
new file mode 100644
index 00000000000..a6d530c81e6
--- /dev/null
+++ b/gcc/ada/s-conca4.ads
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 4 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of four string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_4 is
+
+ procedure Str_Concat_4 (R : out String; S1, S2, S3, S4 : String);
+ -- Performs the operation R := S1 & S2 & S3 & S4. The bounds of R are known
+ -- to be correct, so no bounds checks are required, and it is known that
+ -- none of the input operands overlaps R. No assumptions can be made about
+ -- the lower bounds of any of the operands.
+
+end System.Concat_4;
diff --git a/gcc/ada/s-conca5.adb b/gcc/ada/s-conca5.adb
new file mode 100644
index 00000000000..e463255a5bb
--- /dev/null
+++ b/gcc/ada/s-conca5.adb
@@ -0,0 +1,67 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 5 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_5 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_5 --
+ ------------------
+
+ procedure Str_Concat_5 (R : out String; S1, S2, S3, S4, S5 : String) is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := F + S2'Length - 1;
+ R (F .. L) := S2;
+
+ F := L + 1;
+ L := F + S3'Length - 1;
+ R (F .. L) := S3;
+
+ F := L + 1;
+ L := F + S4'Length - 1;
+ R (F .. L) := S4;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S5;
+ end Str_Concat_5;
+
+end System.Concat_5;
diff --git a/gcc/ada/s-conca5.ads b/gcc/ada/s-conca5.ads
new file mode 100644
index 00000000000..445b2137866
--- /dev/null
+++ b/gcc/ada/s-conca5.ads
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 5 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of five string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_5 is
+
+ procedure Str_Concat_5 (R : out String; S1, S2, S3, S4, S5 : String);
+ -- Performs the operation R := S1 & S2 & S3 & S4 & S5. The bounds of R are
+ -- known to be correct, so no bounds checks are required, and it is known
+ -- that none of the input operands overlaps R. No assumptions can be made
+ -- about the lower bounds of any of the operands.
+
+end System.Concat_5;
diff --git a/gcc/ada/s-conca6.adb b/gcc/ada/s-conca6.adb
new file mode 100644
index 00000000000..a0bd3838fe1
--- /dev/null
+++ b/gcc/ada/s-conca6.adb
@@ -0,0 +1,71 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 6 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_6 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_6 --
+ ------------------
+
+ procedure Str_Concat_6 (R : out String; S1, S2, S3, S4, S5, S6 : String) is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := F + S2'Length - 1;
+ R (F .. L) := S2;
+
+ F := L + 1;
+ L := F + S3'Length - 1;
+ R (F .. L) := S3;
+
+ F := L + 1;
+ L := F + S4'Length - 1;
+ R (F .. L) := S4;
+
+ F := L + 1;
+ L := F + S5'Length - 1;
+ R (F .. L) := S5;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S6;
+ end Str_Concat_6;
+
+end System.Concat_6;
diff --git a/gcc/ada/s-conca6.ads b/gcc/ada/s-conca6.ads
new file mode 100644
index 00000000000..f78f932f1f0
--- /dev/null
+++ b/gcc/ada/s-conca6.ads
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 6 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of six string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_6 is
+
+ procedure Str_Concat_6 (R : out String; S1, S2, S3, S4, S5, S6 : String);
+ -- Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6. The bounds of
+ -- R are known to be correct, so no bounds checks are required, and it is
+ -- known that none of the input operands overlaps R. No assumptions can be
+ -- made about the lower bounds of any of the operands.
+
+end System.Concat_6;
diff --git a/gcc/ada/s-conca7.adb b/gcc/ada/s-conca7.adb
new file mode 100644
index 00000000000..c014a47a9eb
--- /dev/null
+++ b/gcc/ada/s-conca7.adb
@@ -0,0 +1,78 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 7 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_7 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_7 --
+ ------------------
+
+ procedure Str_Concat_7
+ (R : out String;
+ S1, S2, S3, S4, S5, S6, S7 : String)
+ is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := F + S2'Length - 1;
+ R (F .. L) := S2;
+
+ F := L + 1;
+ L := F + S3'Length - 1;
+ R (F .. L) := S3;
+
+ F := L + 1;
+ L := F + S4'Length - 1;
+ R (F .. L) := S4;
+
+ F := L + 1;
+ L := F + S5'Length - 1;
+ R (F .. L) := S5;
+
+ F := L + 1;
+ L := F + S6'Length - 1;
+ R (F .. L) := S6;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S7;
+ end Str_Concat_7;
+
+end System.Concat_7;
diff --git a/gcc/ada/s-conca7.ads b/gcc/ada/s-conca7.ads
new file mode 100644
index 00000000000..31d5da1888b
--- /dev/null
+++ b/gcc/ada/s-conca7.ads
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 7 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of seven string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_7 is
+
+ procedure Str_Concat_7
+ (R : out String;
+ S1, S2, S3, S4, S5, S6, S7 : String);
+ -- Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6 & S7. The bounds
+ -- of R are known to be correct, so no bounds checks are required, and it
+ -- is known that none of the input operands overlaps R. No assumptions can
+ -- be made about the lower bounds of any of the operands.
+
+end System.Concat_7;
diff --git a/gcc/ada/s-conca8.adb b/gcc/ada/s-conca8.adb
new file mode 100644
index 00000000000..3814f5721ab
--- /dev/null
+++ b/gcc/ada/s-conca8.adb
@@ -0,0 +1,82 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 8 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_8 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_8 --
+ ------------------
+
+ procedure Str_Concat_8
+ (R : out String;
+ S1, S2, S3, S4, S5, S6, S7, S8 : String)
+ is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := F + S2'Length - 1;
+ R (F .. L) := S2;
+
+ F := L + 1;
+ L := F + S3'Length - 1;
+ R (F .. L) := S3;
+
+ F := L + 1;
+ L := F + S4'Length - 1;
+ R (F .. L) := S4;
+
+ F := L + 1;
+ L := F + S5'Length - 1;
+ R (F .. L) := S5;
+
+ F := L + 1;
+ L := F + S6'Length - 1;
+ R (F .. L) := S6;
+
+ F := L + 1;
+ L := F + S7'Length - 1;
+ R (F .. L) := S7;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S8;
+ end Str_Concat_8;
+
+end System.Concat_8;
diff --git a/gcc/ada/s-conca8.ads b/gcc/ada/s-conca8.ads
new file mode 100644
index 00000000000..0d93b243010
--- /dev/null
+++ b/gcc/ada/s-conca8.ads
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 8 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of eight string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_8 is
+
+ procedure Str_Concat_8
+ (R : out String;
+ S1, S2, S3, S4, S5, S6, S7, S8 : String);
+ -- Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8. The
+ -- bounds of R are known to be correct, so no bounds checks are required,
+ -- and it is known that none of the input operands overlaps R. No
+ -- assumptions can be made about the lower bounds of any of the operands.
+
+end System.Concat_8;
diff --git a/gcc/ada/s-conca9.adb b/gcc/ada/s-conca9.adb
new file mode 100644
index 00000000000..a575801271c
--- /dev/null
+++ b/gcc/ada/s-conca9.adb
@@ -0,0 +1,86 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 9 --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma Compiler_Unit;
+
+package body System.Concat_9 is
+
+ pragma Suppress (All_Checks);
+
+ ------------------
+ -- Str_Concat_9 --
+ ------------------
+
+ procedure Str_Concat_9
+ (R : out String;
+ S1, S2, S3, S4, S5, S6, S7, S8, S9 : String)
+ is
+ F, L : Natural;
+
+ begin
+ F := R'First;
+ L := F + S1'Length - 1;
+ R (F .. L) := S1;
+
+ F := L + 1;
+ L := F + S2'Length - 1;
+ R (F .. L) := S2;
+
+ F := L + 1;
+ L := F + S3'Length - 1;
+ R (F .. L) := S3;
+
+ F := L + 1;
+ L := F + S4'Length - 1;
+ R (F .. L) := S4;
+
+ F := L + 1;
+ L := F + S5'Length - 1;
+ R (F .. L) := S5;
+
+ F := L + 1;
+ L := F + S6'Length - 1;
+ R (F .. L) := S6;
+
+ F := L + 1;
+ L := F + S7'Length - 1;
+ R (F .. L) := S7;
+
+ F := L + 1;
+ L := F + S8'Length - 1;
+ R (F .. L) := S8;
+
+ F := L + 1;
+ L := R'Last;
+ R (F .. L) := S9;
+ end Str_Concat_9;
+
+end System.Concat_9;
diff --git a/gcc/ada/s-conca9.ads b/gcc/ada/s-conca9.ads
new file mode 100644
index 00000000000..31b1263df81
--- /dev/null
+++ b/gcc/ada/s-conca9.ads
@@ -0,0 +1,47 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . C O N C A T _ 9 --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package contains a procedure for runtime concatenation of eight string
+-- operands. It is used when we want to save space in the generated code.
+
+pragma Compiler_Unit;
+
+package System.Concat_9 is
+
+ procedure Str_Concat_9
+ (R : out String;
+ S1, S2, S3, S4, S5, S6, S7, S8, S9 : String);
+ -- Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9.
+ -- The bounds of R are known to be correct, so no bounds checks are
+ -- required, and it is known that none of the input operands overlaps R. No
+ -- assumptions can be made about the lower bounds of any of the operands.
+
+end System.Concat_9;
diff --git a/gcc/ada/s-crc32.adb b/gcc/ada/s-crc32.adb
index 4061268cf67..1687adc50c1 100644
--- a/gcc/ada/s-crc32.adb
+++ b/gcc/ada/s-crc32.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.CRC32 is
diff --git a/gcc/ada/s-crc32.ads b/gcc/ada/s-crc32.ads
index ec410c35f5a..b450c8cd387 100644
--- a/gcc/ada/s-crc32.ads
+++ b/gcc/ada/s-crc32.ads
@@ -54,9 +54,7 @@
-- "Computation of Cyclic Redundancy Checks via Table Look-Up", Communications
-- of the ACM, Vol. 31 No. 8, pp.1008-1013 Aug. 1988. Sarwate, D.V.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Interfaces;
diff --git a/gcc/ada/s-crtl.ads b/gcc/ada/s-crtl.ads
index e7d6055d890..5a9902dd657 100644
--- a/gcc/ada/s-crtl.ads
+++ b/gcc/ada/s-crtl.ads
@@ -55,8 +55,8 @@ package System.CRTL is
type size_t is mod 2 ** Standard'Address_Size;
- type Filename_Encoding is (UTF8, ASCII_8bits);
- for Filename_Encoding use (UTF8 => 0, ASCII_8bits => 1);
+ type Filename_Encoding is (UTF8, ASCII_8bits, Unspecified);
+ for Filename_Encoding use (UTF8 => 0, ASCII_8bits => 1, Unspecified => 2);
pragma Convention (C, Filename_Encoding);
-- Describes the filename's encoding
@@ -90,7 +90,7 @@ package System.CRTL is
function fopen
(filename : chars;
mode : chars;
- encoding : Filename_Encoding := UTF8) return FILEs;
+ encoding : Filename_Encoding := Unspecified) return FILEs;
pragma Import (C, fopen, "__gnat_fopen");
function fputc (C : int; stream : FILEs) return int;
@@ -106,7 +106,7 @@ package System.CRTL is
(filename : chars;
mode : chars;
stream : FILEs;
- encoding : Filename_Encoding := UTF8) return FILEs;
+ encoding : Filename_Encoding := Unspecified) return FILEs;
pragma Import (C, freopen, "__gnat_freopen");
function fseek
@@ -164,8 +164,11 @@ package System.CRTL is
procedure rewind (stream : FILEs);
pragma Import (C, rewind, "rewind");
- procedure rmdir (dir_name : String);
- pragma Import (C, rmdir, "rmdir");
+ function rmdir (dir_name : String) return int;
+ pragma Import (C, rmdir, "__gnat_rmdir");
+
+ function chdir (dir_name : String) return int;
+ pragma Import (C, chdir, "__gnat_chdir");
function setvbuf
(stream : FILEs;
@@ -185,7 +188,7 @@ package System.CRTL is
pragma Import (C, ungetc, "ungetc");
function unlink (filename : chars) return int;
- pragma Import (C, unlink, "unlink");
+ pragma Import (C, unlink, "__gnat_unlink");
function open (filename : chars; oflag : int) return int;
pragma Import (C, open, "open");
diff --git a/gcc/ada/s-except.adb b/gcc/ada/s-except.adb
index 67cf1426ea0..3d04b4b1494 100755
--- a/gcc/ada/s-except.adb
+++ b/gcc/ada/s-except.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Exceptions is
diff --git a/gcc/ada/s-except.ads b/gcc/ada/s-except.ads
index 2bec61a6910..10232978260 100644
--- a/gcc/ada/s-except.ads
+++ b/gcc/ada/s-except.ads
@@ -33,17 +33,13 @@
-- It should be compiled without optimization to let debuggers inspect
-- parameter values reliably from breakpoints on the routines.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Standard_Library;
package System.Exceptions is
- pragma Warnings (Off);
pragma Preelaborate_05;
- pragma Warnings (On);
-- To let Ada.Exceptions "with" us and let us "with" Standard_Library
package SSL renames System.Standard_Library;
diff --git a/gcc/ada/s-exctab.adb b/gcc/ada/s-exctab.adb
index ddf1dfa65d1..5f2228ceb1a 100644
--- a/gcc/ada/s-exctab.adb
+++ b/gcc/ada/s-exctab.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.HTable;
with System.Soft_Links; use System.Soft_Links;
diff --git a/gcc/ada/s-exctab.ads b/gcc/ada/s-exctab.ads
index ab530f9c2a0..c9fe6980b10 100644
--- a/gcc/ada/s-exctab.ads
+++ b/gcc/ada/s-exctab.ads
@@ -33,9 +33,7 @@
-- registered exception names, for the implementation of the mapping
-- of names to exceptions (used for exception streams and attributes)
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Standard_Library;
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb
index 15c70f97d80..b3084775ff1 100644
--- a/gcc/ada/s-fileio.adb
+++ b/gcc/ada/s-fileio.adb
@@ -809,7 +809,7 @@ package body System.File_IO is
Form_Parameter (Formstr, "encoding", V1, V2);
if V1 = 0 then
- Encoding := System.CRTL.UTF8;
+ Encoding := System.CRTL.Unspecified;
elsif Formstr (V1 .. V2) = "utf8" then
Encoding := System.CRTL.UTF8;
diff --git a/gcc/ada/s-htable.adb b/gcc/ada/s-htable.adb
index 9dbb7f98420..7eea674617a 100644
--- a/gcc/ada/s-htable.adb
+++ b/gcc/ada/s-htable.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1995-2007, AdaCore --
+-- Copyright (C) 1995-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,9 +31,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Deallocation;
diff --git a/gcc/ada/s-htable.ads b/gcc/ada/s-htable.ads
index e036288bc4b..bc416abd730 100644
--- a/gcc/ada/s-htable.ads
+++ b/gcc/ada/s-htable.ads
@@ -39,9 +39,7 @@
-- The Static_HTable package provides a more complex interface that allows
-- complete control over allocation.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.HTable is
pragma Preelaborate;
diff --git a/gcc/ada/s-imenne.adb b/gcc/ada/s-imenne.adb
index c5ee51946c5..37ef4a7e65d 100644
--- a/gcc/ada/s-imenne.adb
+++ b/gcc/ada/s-imenne.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Conversion;
diff --git a/gcc/ada/s-imenne.ads b/gcc/ada/s-imenne.ads
index 7cc432b2328..a76883d6f4d 100644
--- a/gcc/ada/s-imenne.ads
+++ b/gcc/ada/s-imenne.ads
@@ -40,9 +40,7 @@
-- for bootstrapping with older versions of the compiler which expect to find
-- functions in this package.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Img_Enum_New is
pragma Pure;
diff --git a/gcc/ada/s-imgenu.adb b/gcc/ada/s-imgenu.adb
index 6019a0d0692..99c6acfa97e 100644
--- a/gcc/ada/s-imgenu.adb
+++ b/gcc/ada/s-imgenu.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Conversion;
diff --git a/gcc/ada/s-imgenu.ads b/gcc/ada/s-imgenu.ads
index 7d9261c926e..24afb3a3ad2 100644
--- a/gcc/ada/s-imgenu.ads
+++ b/gcc/ada/s-imgenu.ads
@@ -41,9 +41,7 @@
-- these functions. The new compiler will search for procedures in the new
-- version of the unit.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Img_Enum is
pragma Pure;
diff --git a/gcc/ada/s-intman-susv3.adb b/gcc/ada/s-intman-susv3.adb
new file mode 100644
index 00000000000..864d7e1d2dd
--- /dev/null
+++ b/gcc/ada/s-intman-susv3.adb
@@ -0,0 +1,170 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- --
+-- GNARL is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNARL was developed by the GNARL team at Florida State University. --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the SuSV3 threads version of this package
+
+-- Make a careful study of all signals available under the OS, to see which
+-- need to be reserved, kept always unmasked, or kept always unmasked. Be on
+-- the lookout for special signals that may be used by the thread library.
+
+-- Since this is a multi target file, the signal <-> exception mapping
+-- is simple minded. If you need a more precise and target specific
+-- signal handling, create a new s-intman.adb that will fit your needs.
+
+-- This file assumes that:
+
+-- SIGINT exists and will be kept unmasked unless the pragma
+-- Unreserve_All_Interrupts is specified anywhere in the application.
+
+-- System.OS_Interface contains the following:
+-- SIGADAABORT: the signal that will be used to abort tasks.
+-- Unmasked: the OS specific set of signals that should be unmasked in
+-- all the threads. SIGADAABORT is unmasked by
+-- default
+-- Reserved: the OS specific set of signals that are reserved.
+
+package body System.Interrupt_Management is
+
+ use Interfaces.C;
+ use System.OS_Interface;
+
+ Unreserve_All_Interrupts : Interfaces.C.int;
+ pragma Import
+ (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
+
+ -----------------------
+ -- Local Subprograms --
+ -----------------------
+
+ function State (Int : Interrupt_ID) return Character;
+ pragma Import (C, State, "__gnat_get_interrupt_state");
+ -- Get interrupt state. Defined in init.c The input argument is the
+ -- interrupt number, and the result is one of the following:
+
+ User : constant Character := 'u';
+ Runtime : constant Character := 'r';
+ Default : constant Character := 's';
+ -- 'n' this interrupt not set by any Interrupt_State pragma
+ -- 'u' Interrupt_State pragma set state to User
+ -- 'r' Interrupt_State pragma set state to Runtime
+ -- 's' Interrupt_State pragma set state to System (use "default"
+ -- system handler)
+
+ ----------------
+ -- Initialize --
+ ----------------
+
+ Initialized : Boolean := False;
+
+ procedure Initialize is
+ begin
+ if Initialized then
+ return;
+ end if;
+
+ Initialized := True;
+
+ -- Need to call pthread_init very early because it is doing signal
+ -- initializations.
+
+ pthread_init;
+
+ Abort_Task_Interrupt := SIGADAABORT;
+
+ pragma Assert (Keep_Unmasked = (Interrupt_ID'Range => False));
+ pragma Assert (Reserve = (Interrupt_ID'Range => False));
+
+ -- Process state of exception signals
+
+ for J in Exception_Signals'Range loop
+ declare
+ Sig : constant Signal := Exception_Signals (J);
+ Id : constant Interrupt_ID := Interrupt_ID (Sig);
+ begin
+ if State (Id) /= User then
+ Keep_Unmasked (Id) := True;
+ Reserve (Id) := True;
+ end if;
+ end;
+ end loop;
+
+ if State (Abort_Task_Interrupt) /= User then
+ Keep_Unmasked (Abort_Task_Interrupt) := True;
+ Reserve (Abort_Task_Interrupt) := True;
+ end if;
+
+ -- Set SIGINT to unmasked state as long as it is not in "User" state.
+ -- Check for Unreserve_All_Interrupts last.
+
+ if State (SIGINT) /= User then
+ Keep_Unmasked (SIGINT) := True;
+ Reserve (SIGINT) := True;
+ end if;
+
+ -- Check all signals for state that requires keeping them unmasked and
+ -- reserved.
+
+ for J in Interrupt_ID'Range loop
+ if State (J) = Default or else State (J) = Runtime then
+ Keep_Unmasked (J) := True;
+ Reserve (J) := True;
+ end if;
+ end loop;
+
+ -- Add the set of signals that must always be unmasked for this target
+
+ for J in Unmasked'Range loop
+ Keep_Unmasked (Interrupt_ID (Unmasked (J))) := True;
+ Reserve (Interrupt_ID (Unmasked (J))) := True;
+ end loop;
+
+ -- Add target-specific reserved signals
+
+ for J in Reserved'Range loop
+ Reserve (Interrupt_ID (Reserved (J))) := True;
+ end loop;
+
+ -- Process pragma Unreserve_All_Interrupts. This overrides any settings
+ -- due to pragma Interrupt_State:
+
+ if Unreserve_All_Interrupts /= 0 then
+ Keep_Unmasked (SIGINT) := False;
+ Reserve (SIGINT) := False;
+ end if;
+
+ -- We do not really have Signal 0. We just use this value to identify
+ -- non-existent signals (see s-intnam.ads). Therefore, Signal should not
+ -- be used in all signal related operations hence mark it as reserved.
+
+ Reserve (0) := True;
+ end Initialize;
+
+end System.Interrupt_Management;
diff --git a/gcc/ada/s-mastop.adb b/gcc/ada/s-mastop.adb
index 8347ca432e5..fba5bb133cf 100644
--- a/gcc/ada/s-mastop.adb
+++ b/gcc/ada/s-mastop.adb
@@ -33,9 +33,7 @@
-- This dummy version of System.Machine_State_Operations is used
-- on targets for which zero cost exception handling is not implemented.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Machine_State_Operations is
diff --git a/gcc/ada/s-mastop.ads b/gcc/ada/s-mastop.ads
index 4ba5fd1581c..74ff217c693 100644
--- a/gcc/ada/s-mastop.ads
+++ b/gcc/ada/s-mastop.ads
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
diff --git a/gcc/ada/s-memory.adb b/gcc/ada/s-memory.adb
index 3c199a3f893..3fb1cda9bcb 100644
--- a/gcc/ada/s-memory.adb
+++ b/gcc/ada/s-memory.adb
@@ -41,9 +41,7 @@
-- you can remove the calls to Abort_Defer.all and Abort_Undefer.all from
-- this unit.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Exceptions;
with System.Soft_Links;
diff --git a/gcc/ada/s-memory.ads b/gcc/ada/s-memory.ads
index aa510093100..4af600205ad 100644
--- a/gcc/ada/s-memory.ads
+++ b/gcc/ada/s-memory.ads
@@ -40,9 +40,7 @@
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Memory is
pragma Elaborate_Body;
diff --git a/gcc/ada/s-os_lib.adb b/gcc/ada/s-os_lib.adb
index 0e1c6c756b8..163cfbf9230 100755
--- a/gcc/ada/s-os_lib.adb
+++ b/gcc/ada/s-os_lib.adb
@@ -31,9 +31,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Case_Util;
with System.CRTL;
@@ -846,12 +844,8 @@ package body System.OS_Lib is
procedure Delete_File (Name : Address; Success : out Boolean) is
R : Integer;
-
- function unlink (A : Address) return Integer;
- pragma Import (C, unlink, "unlink");
-
begin
- R := unlink (Name);
+ R := System.CRTL.unlink (Name);
Success := (R = 0);
end Delete_File;
@@ -2246,7 +2240,7 @@ package body System.OS_Lib is
Success : out Boolean)
is
function rename (From, To : Address) return Integer;
- pragma Import (C, rename, "rename");
+ pragma Import (C, rename, "__gnat_rename");
R : Integer;
begin
R := rename (Old_Name, New_Name);
diff --git a/gcc/ada/s-os_lib.ads b/gcc/ada/s-os_lib.ads
index 5430ff00c7e..2abce23732e 100755
--- a/gcc/ada/s-os_lib.ads
+++ b/gcc/ada/s-os_lib.ads
@@ -48,9 +48,7 @@
-- be used by other predefined packages. User access to this package is via
-- a renaming of this package in GNAT.OS_Lib (file g-os_lib.ads).
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System;
with System.Strings;
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index 958b11e938b..e6e18491542 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -451,6 +451,11 @@ CND(ENOTSOCK, "Operation on non socket")
#endif
CND(EOPNOTSUPP, "Operation not supported")
+#ifndef EPIPE
+# define EPIPE -1
+#endif
+CND(EPIPE, "Broken pipe")
+
#ifndef EPFNOSUPPORT
# define EPFNOSUPPORT -1
#endif
diff --git a/gcc/ada/s-osinte-darwin.ads b/gcc/ada/s-osinte-darwin.ads
index f8c67117c79..27a7860522f 100644
--- a/gcc/ada/s-osinte-darwin.ads
+++ b/gcc/ada/s-osinte-darwin.ads
@@ -117,10 +117,15 @@ package System.OS_Interface is
type Signal_Set is array (Natural range <>) of Signal;
Unmasked : constant Signal_Set :=
- (SIGTTIN, SIGTTOU, SIGSTOP, SIGTSTP);
+ (SIGTTIN, SIGTTOU, SIGSTOP, SIGTSTP);
Reserved : constant Signal_Set :=
- (SIGKILL, SIGSTOP);
+ (SIGKILL, SIGSTOP);
+
+ Exception_Signals : constant Signal_Set :=
+ (SIGFPE, SIGILL, SIGSEGV, SIGBUS);
+ -- These signals (when runtime or system) will be caught and converted
+ -- into an Ada exception.
type sigset_t is private;
@@ -279,10 +284,11 @@ package System.OS_Interface is
pragma Import (C, sigaltstack, "sigaltstack");
Alternate_Stack : aliased System.Address;
- -- This is a dummy definition, never used (Alternate_Stack_Size is null)
+ pragma Import (C, Alternate_Stack, "__gnat_alternate_stack");
+ -- The alternate signal stack for stack overflows
- Alternate_Stack_Size : constant := 0;
- -- No alternate signal stack is used on this platform
+ Alternate_Stack_Size : constant := 64 * 1024;
+ -- This must be in keeping with init.c:__gnat_alternate_stack
Stack_Base_Available : constant Boolean := False;
-- Indicates whether the stack base is available on this target. This
diff --git a/gcc/ada/s-osinte-linux.ads b/gcc/ada/s-osinte-linux.ads
index bbaa0b4282e..a663aa8de9b 100644
--- a/gcc/ada/s-osinte-linux.ads
+++ b/gcc/ada/s-osinte-linux.ads
@@ -464,6 +464,9 @@ package System.OS_Interface is
function pthread_self return pthread_t;
pragma Import (C, pthread_self, "pthread_self");
+ function lwp_self return System.Address;
+ pragma Import (C, lwp_self, "__gnat_lwp_self");
+
--------------------------
-- POSIX.1c Section 17 --
--------------------------
diff --git a/gcc/ada/s-osinte-vxworks-kernel.adb b/gcc/ada/s-osinte-vxworks-kernel.adb
deleted file mode 100644
index 6512396aff7..00000000000
--- a/gcc/ada/s-osinte-vxworks-kernel.adb
+++ /dev/null
@@ -1,249 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
--- --
--- S Y S T E M . O S _ I N T E R F A C E --
--- --
--- B o d y --
--- --
--- Copyright (C) 1997-2009, Free Software Foundation, Inc. --
--- --
--- GNARL is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. --
--- --
--- As a special exception under Section 7 of GPL version 3, you are granted --
--- additional permissions described in the GCC Runtime Library Exception, --
--- version 3.1, as published by the Free Software Foundation. --
--- --
--- You should have received a copy of the GNU General Public License and --
--- a copy of the GCC Runtime Library Exception along with this program; --
--- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
--- <http://www.gnu.org/licenses/>. --
--- --
--- GNARL was developed by the GNARL team at Florida State University. --
--- Extensive contributions were provided by Ada Core Technologies, Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This is the VxWorks version
-
--- This package encapsulates all direct interfaces to OS services that are
--- needed by children of System.
-
-pragma Polling (Off);
--- Turn off polling, we do not want ATC polling to take place during tasking
--- operations. It causes infinite loops and other problems.
-
-package body System.OS_Interface is
-
- use type Interfaces.C.int;
-
- Low_Priority : constant := 255;
- -- VxWorks native (default) lowest scheduling priority
-
- ----------
- -- kill --
- ----------
-
- function kill (pid : t_id; sig : Signal) return int is
- begin
- return System.VxWorks.Ext.kill (pid, int (sig));
- end kill;
-
- -------------
- -- sigwait --
- -------------
-
- function sigwait
- (set : access sigset_t;
- sig : access Signal) return int
- is
- Result : int;
-
- function sigwaitinfo
- (set : access sigset_t; sigvalue : System.Address) return int;
- pragma Import (C, sigwaitinfo, "sigwaitinfo");
-
- begin
- Result := sigwaitinfo (set, System.Null_Address);
-
- if Result /= -1 then
- sig.all := Signal (Result);
- return 0;
- else
- sig.all := 0;
- return errno;
- end if;
- end sigwait;
-
- -----------------
- -- To_Duration --
- -----------------
-
- function To_Duration (TS : timespec) return Duration is
- begin
- return Duration (TS.ts_sec) + Duration (TS.ts_nsec) / 10#1#E9;
- end To_Duration;
-
- -----------------
- -- To_Timespec --
- -----------------
-
- function To_Timespec (D : Duration) return timespec is
- S : time_t;
- F : Duration;
-
- begin
- S := time_t (Long_Long_Integer (D));
- F := D - Duration (S);
-
- -- If F is negative due to a round-up, adjust for positive F value
-
- if F < 0.0 then
- S := S - 1;
- F := F + 1.0;
- end if;
-
- return timespec'(ts_sec => S,
- ts_nsec => long (Long_Long_Integer (F * 10#1#E9)));
- end To_Timespec;
-
- -------------------------
- -- To_VxWorks_Priority --
- -------------------------
-
- function To_VxWorks_Priority (Priority : int) return int is
- begin
- return Low_Priority - Priority;
- end To_VxWorks_Priority;
-
- --------------------
- -- To_Clock_Ticks --
- --------------------
-
- -- ??? - For now, we'll always get the system clock rate since it is
- -- allowed to be changed during run-time in VxWorks. A better method would
- -- be to provide an operation to set it that so we can always know its
- -- value.
-
- -- Another thing we should probably allow for is a resultant tick count
- -- greater than int'Last. This should probably be a procedure with two
- -- output parameters, one in the range 0 .. int'Last, and another
- -- representing the overflow count.
-
- function To_Clock_Ticks (D : Duration) return int is
- Ticks : Long_Long_Integer;
- Rate_Duration : Duration;
- Ticks_Duration : Duration;
-
- begin
- if D < 0.0 then
- return -1;
- end if;
-
- -- Ensure that the duration can be converted to ticks
- -- at the current clock tick rate without overflowing.
-
- Rate_Duration := Duration (sysClkRateGet);
-
- if D > (Duration'Last / Rate_Duration) then
- Ticks := Long_Long_Integer (int'Last);
- else
- Ticks_Duration := D * Rate_Duration;
- Ticks := Long_Long_Integer (Ticks_Duration);
-
- if Ticks_Duration > Duration (Ticks) then
- Ticks := Ticks + 1;
- end if;
-
- if Ticks > Long_Long_Integer (int'Last) then
- Ticks := Long_Long_Integer (int'Last);
- end if;
- end if;
-
- return int (Ticks);
- end To_Clock_Ticks;
-
- -----------------------------
- -- Binary_Semaphore_Create --
- -----------------------------
-
- function Binary_Semaphore_Create return Binary_Semaphore_Id is
- begin
- return Binary_Semaphore_Id (semBCreate (SEM_Q_FIFO, SEM_EMPTY));
- end Binary_Semaphore_Create;
-
- -----------------------------
- -- Binary_Semaphore_Delete --
- -----------------------------
-
- function Binary_Semaphore_Delete (ID : Binary_Semaphore_Id) return int is
- begin
- return semDelete (SEM_ID (ID));
- end Binary_Semaphore_Delete;
-
- -----------------------------
- -- Binary_Semaphore_Obtain --
- -----------------------------
-
- function Binary_Semaphore_Obtain (ID : Binary_Semaphore_Id) return int is
- begin
- return semTake (SEM_ID (ID), WAIT_FOREVER);
- end Binary_Semaphore_Obtain;
-
- ------------------------------
- -- Binary_Semaphore_Release --
- ------------------------------
-
- function Binary_Semaphore_Release (ID : Binary_Semaphore_Id) return int is
- begin
- return semGive (SEM_ID (ID));
- end Binary_Semaphore_Release;
-
- ----------------------------
- -- Binary_Semaphore_Flush --
- ----------------------------
-
- function Binary_Semaphore_Flush (ID : Binary_Semaphore_Id) return int is
- begin
- return semFlush (SEM_ID (ID));
- end Binary_Semaphore_Flush;
-
- -----------------------
- -- Interrupt_Connect --
- -----------------------
-
- function Interrupt_Connect
- (Vector : Interrupt_Vector;
- Handler : Interrupt_Handler;
- Parameter : System.Address := System.Null_Address) return int
- is
- function intConnect
- (vector : Interrupt_Vector;
- handler : Interrupt_Handler;
- parameter : System.Address) return int;
- pragma Import (C, intConnect, "intConnect");
-
- begin
- return intConnect (Vector, Handler, Parameter);
- end Interrupt_Connect;
-
- --------------------------------
- -- Interrupt_Number_To_Vector --
- --------------------------------
-
- function Interrupt_Number_To_Vector
- (intNum : int) return Interrupt_Vector
- is
- function INUM_TO_IVEC (intNum : int) return Interrupt_Vector;
- pragma Import (C, INUM_TO_IVEC, "__gnat_inum_to_ivec");
-
- begin
- return INUM_TO_IVEC (intNum);
- end Interrupt_Number_To_Vector;
-
-end System.OS_Interface;
diff --git a/gcc/ada/s-osinte-vxworks.adb b/gcc/ada/s-osinte-vxworks.adb
index bc58dca76a5..c53cce259f7 100644
--- a/gcc/ada/s-osinte-vxworks.adb
+++ b/gcc/ada/s-osinte-vxworks.adb
@@ -45,15 +45,6 @@ package body System.OS_Interface is
Low_Priority : constant := 255;
-- VxWorks native (default) lowest scheduling priority
- ----------
- -- kill --
- ----------
-
- function kill (pid : t_id; sig : Signal) return int is
- begin
- return System.VxWorks.Ext.kill (pid, int (sig));
- end kill;
-
-------------
-- sigwait --
-------------
@@ -73,7 +64,7 @@ package body System.OS_Interface is
if Result /= -1 then
sig.all := Signal (Result);
- return 0;
+ return OK;
else
sig.all := 0;
return errno;
@@ -142,7 +133,7 @@ package body System.OS_Interface is
begin
if D < 0.0 then
- return -1;
+ return ERROR;
end if;
-- Ensure that the duration can be converted to ticks
@@ -213,6 +204,15 @@ package body System.OS_Interface is
return semFlush (SEM_ID (ID));
end Binary_Semaphore_Flush;
+ ----------
+ -- kill --
+ ----------
+
+ function kill (pid : t_id; sig : Signal) return int is
+ begin
+ return System.VxWorks.Ext.kill (pid, int (sig));
+ end kill;
+
-----------------------
-- Interrupt_Connect --
-----------------------
@@ -220,11 +220,13 @@ package body System.OS_Interface is
function Interrupt_Connect
(Vector : Interrupt_Vector;
Handler : Interrupt_Handler;
- Parameter : System.Address := System.Null_Address) return int
- is
- pragma Unreferenced (Vector, Handler, Parameter);
+ Parameter : System.Address := System.Null_Address) return int is
begin
- return 0;
+ return
+ System.VxWorks.Ext.Interrupt_Connect
+ (System.VxWorks.Ext.Interrupt_Vector (Vector),
+ System.VxWorks.Ext.Interrupt_Handler (Handler),
+ Parameter);
end Interrupt_Connect;
--------------------------------
@@ -234,7 +236,8 @@ package body System.OS_Interface is
function Interrupt_Number_To_Vector
(intNum : int) return Interrupt_Vector is
begin
- return Interrupt_Vector (intNum);
+ return Interrupt_Vector
+ (System.VxWorks.Ext.Interrupt_Number_To_Vector (intNum));
end Interrupt_Number_To_Vector;
end System.OS_Interface;
diff --git a/gcc/ada/s-osinte-vxworks.ads b/gcc/ada/s-osinte-vxworks.ads
index 532bded849d..c295b19b0b4 100644
--- a/gcc/ada/s-osinte-vxworks.ads
+++ b/gcc/ada/s-osinte-vxworks.ads
@@ -32,7 +32,7 @@
-- --
------------------------------------------------------------------------------
--- This is the VxWorks 5.x and 6.x version of this package
+-- This is the VxWorks version of this package
-- This package encapsulates all direct interfaces to OS services
-- that are needed by the tasking run-time (libgnarl).
@@ -72,7 +72,7 @@ package System.OS_Interface is
FUNC_ERR : constant := -1;
----------------------------
- -- Signals and Interrupts --
+ -- Signals and interrupts --
----------------------------
NSIG : constant := 64;
@@ -304,6 +304,8 @@ package System.OS_Interface is
pragma Import (C, sysClkRateGet, "sysClkRateGet");
-- VxWorks 5.x specific functions
+ -- Must not be called from run-time for versions that do not support
+ -- taskVarLib: eg VxWorks 6 RTPs
function taskVarAdd
(tid : t_id; pVar : access System.Address) return int;
@@ -325,6 +327,8 @@ package System.OS_Interface is
pragma Import (C, taskVarGet, "taskVarGet");
-- VxWorks 6.x specific functions
+ -- Can only be called from the VxWorks 6 run-time libary that supports
+ -- tlsLib, and not by the VxWorks 6.6 SMP library
function tlsKeyCreate return int;
pragma Import (C, tlsKeyCreate, "tlsKeyCreate");
@@ -364,8 +368,8 @@ package System.OS_Interface is
function Set_Time_Slice (ticks : int) return int
renames System.VxWorks.Ext.Set_Time_Slice;
- -- Calls kernelTimeSlice under VxWorks 5.x
- -- Do nothing under VxWorks 6.x
+ -- Calls kernelTimeSlice under VxWorks 5.x, VxWorks 653, or in VxWorks 6
+ -- kernel apps. Returns ERROR for RTPs, VxWorks 5 /CERT
function taskPriorityGet (tid : t_id; pPriority : access int) return int;
pragma Import (C, taskPriorityGet, "taskPriorityGet");
@@ -433,7 +437,7 @@ package System.OS_Interface is
-- Release all threads blocked on the semaphore
------------------------------------------------------------
- -- Binary Semaphore Wrapper to Support Interrupt Tasks --
+ -- Binary Semaphore Wrapper to Support interrupt Tasks --
------------------------------------------------------------
type Binary_Semaphore_Id is new Long_Integer;
@@ -468,7 +472,7 @@ package System.OS_Interface is
Parameter : System.Address := System.Null_Address) return int;
pragma Inline (Interrupt_Connect);
-- Use this to set up an user handler. The routine installs a
- -- a user handler which is invoked after RTEMS has saved enough
+ -- a user handler which is invoked after the OS has saved enough
-- context for a high-level language routine to be safely invoked.
function Interrupt_Number_To_Vector (intNum : int) return Interrupt_Vector;
diff --git a/gcc/ada/s-osprim-darwin.adb b/gcc/ada/s-osprim-darwin.adb
index 2425cf6e6d0..d47c608a74e 100644
--- a/gcc/ada/s-osprim-darwin.adb
+++ b/gcc/ada/s-osprim-darwin.adb
@@ -78,6 +78,14 @@ package body System.OS_Primitives is
pragma Unreferenced (Result);
begin
+ -- The return codes for gettimeofday are as follows (from man pages):
+ -- EPERM settimeofday is called by someone other than the superuser
+ -- EINVAL Timezone (or something else) is invalid
+ -- EFAULT One of tv or tz pointed outside accessible address space
+
+ -- None of these codes signal a potential clock skew, hence the return
+ -- value is never checked.
+
Result := gettimeofday (TV'Access, null);
return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6;
end Clock;
diff --git a/gcc/ada/s-osprim-posix.adb b/gcc/ada/s-osprim-posix.adb
index 7042830d36e..c02ad98380c 100644
--- a/gcc/ada/s-osprim-posix.adb
+++ b/gcc/ada/s-osprim-posix.adb
@@ -78,6 +78,14 @@ package body System.OS_Primitives is
pragma Unreferenced (Result);
begin
+ -- The return codes for gettimeofday are as follows (from man pages):
+ -- EPERM settimeofday is called by someone other than the superuser
+ -- EINVAL Timezone (or something else) is invalid
+ -- EFAULT One of tv or tz pointed outside accessible address space
+
+ -- None of these codes signal a potential clock skew, hence the return
+ -- value is never checked.
+
Result := gettimeofday (TV'Access, null);
return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6;
end Clock;
diff --git a/gcc/ada/s-purexc.ads b/gcc/ada/s-purexc.ads
index 400c730f952..a327f48bf0a 100644
--- a/gcc/ada/s-purexc.ads
+++ b/gcc/ada/s-purexc.ads
@@ -33,9 +33,7 @@
-- an exception message. It can be used from Pure units. This unit is for
-- internal use only, it is not generally available to applications.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Pure_Exceptions is
pragma Pure;
diff --git a/gcc/ada/s-scaval.adb b/gcc/ada/s-scaval.adb
index e222cc52f60..415763c3e6b 100644
--- a/gcc/ada/s-scaval.adb
+++ b/gcc/ada/s-scaval.adb
@@ -71,7 +71,7 @@ package body System.Scalar_Values is
-- On other targets the type is 8 bytes, and type Byte8 is used for
-- values that are then converted to ByteLF.
- pragma Warnings (Off);
+ pragma Warnings (Off); -- why ???
function To_ByteLF is new Ada.Unchecked_Conversion (Byte8, ByteLF);
pragma Warnings (On);
diff --git a/gcc/ada/s-secsta.adb b/gcc/ada/s-secsta.adb
index 9f265fddb55..16e9fa0c9fb 100644
--- a/gcc/ada/s-secsta.adb
+++ b/gcc/ada/s-secsta.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Soft_Links;
with System.Parameters;
diff --git a/gcc/ada/s-secsta.ads b/gcc/ada/s-secsta.ads
index 3143dbd0857..bfbab33e37f 100644
--- a/gcc/ada/s-secsta.ads
+++ b/gcc/ada/s-secsta.ads
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Storage_Elements;
diff --git a/gcc/ada/s-soflin.adb b/gcc/ada/s-soflin.adb
index 5d144411bd8..4ae51f39f7f 100644
--- a/gcc/ada/s-soflin.adb
+++ b/gcc/ada/s-soflin.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get an
@@ -309,7 +307,7 @@ package body System.Soft_Links is
-------------------------
procedure Task_Termination_NT (Excep : EO) is
- pragma Warnings (Off, Excep);
+ pragma Unreferenced (Excep);
begin
null;
end Task_Termination_NT;
diff --git a/gcc/ada/s-soflin.ads b/gcc/ada/s-soflin.ads
index 2c947c9af70..6c868cd6ced 100644
--- a/gcc/ada/s-soflin.ads
+++ b/gcc/ada/s-soflin.ads
@@ -37,11 +37,6 @@
-- initialized to non-tasking versions, and then if the tasking support is
-- initialized, they are set to the real tasking versions.
-pragma Warnings (Off);
--- When compiling this package with older compilers, there are many warnings,
--- so we suppress them throughout most of this file. Pragmas Compiler_Unit,
--- Preelaborate_05, and Favor_Top_Level are not supported by older compilers.
-
pragma Compiler_Unit;
with Ada.Exceptions;
@@ -130,7 +125,6 @@ package System.Soft_Links is
Len : Natural)
return String;
pragma Favor_Top_Level (Traceback_Decorator_Wrapper_Call);
- pragma Warnings (On);
-- Declarations for the no tasking versions of the required routines
@@ -312,35 +306,35 @@ package System.Soft_Links is
------------------------
-- Here we define a single type that encapsulates the various task
- -- specific data. This type is used to store the necessary data into
- -- the Task_Control_Block or into a global variable in the non tasking
- -- case.
+ -- specific data. This type is used to store the necessary data into the
+ -- Task_Control_Block or into a global variable in the non tasking case.
type TSD is record
Pri_Stack_Info : aliased Stack_Checking.Stack_Info;
- -- Information on stack (Base/Limit/Size) that is used
- -- by System.Stack_Checking. If this TSD does not belong to
- -- the environment task, the Size field must be initialized
- -- to the tasks requested stack size before the task can do
- -- its first stack check.
+ -- Information on stack (Base/Limit/Size) used by System.Stack_Checking.
+ -- If this TSD does not belong to the environment task, the Size field
+ -- must be initialized to the tasks requested stack size before the task
+ -- can do its first stack check.
pragma Warnings (Off);
+ -- Needed because we are giving a non-static default to an object in
+ -- a preelaborated unit, which is formally not permitted, but OK here.
+
Jmpbuf_Address : System.Address := System.Null_Address;
- -- Address of jump buffer used to store the address of the
- -- current longjmp/setjmp buffer for exception management.
- -- These buffers are threaded into a stack, and the address
- -- here is the top of the stack. A null address means that
- -- no exception handler is currently active.
+ -- Address of jump buffer used to store the address of the current
+ -- longjmp/setjmp buffer for exception management. These buffers are
+ -- threaded into a stack, and the address here is the top of the stack.
+ -- A null address means that no exception handler is currently active.
Sec_Stack_Addr : System.Address := System.Null_Address;
pragma Warnings (On);
-- Address of currently allocated secondary stack
Current_Excep : aliased EO;
- -- Exception occurrence that contains the information for the
- -- current exception. Note that any exception in the same task
- -- destroys this information, so the data in this variable must
- -- be copied out before another exception can occur.
+ -- Exception occurrence that contains the information for the current
+ -- exception. Note that any exception in the same task destroys this
+ -- information, so the data in this variable must be copied out before
+ -- another exception can occur.
--
-- Also act as a list of the active exceptions in the case of the GCC
-- exception mechanism, organized as a stack with the most recent first.
diff --git a/gcc/ada/s-sopco3.adb b/gcc/ada/s-sopco3.adb
index 7fef7e25e84..5e7b6bbcc91 100644
--- a/gcc/ada/s-sopco3.adb
+++ b/gcc/ada/s-sopco3.adb
@@ -33,9 +33,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops_Concat_3 is
diff --git a/gcc/ada/s-sopco3.ads b/gcc/ada/s-sopco3.ads
index d00942ea4d0..68b1066c60a 100644
--- a/gcc/ada/s-sopco3.ads
+++ b/gcc/ada/s-sopco3.ads
@@ -35,9 +35,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops_Concat_3 is
pragma Pure;
diff --git a/gcc/ada/s-sopco4.adb b/gcc/ada/s-sopco4.adb
index a31d29f4a28..4bfbcc31ccd 100644
--- a/gcc/ada/s-sopco4.adb
+++ b/gcc/ada/s-sopco4.adb
@@ -33,9 +33,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops_Concat_4 is
diff --git a/gcc/ada/s-sopco4.ads b/gcc/ada/s-sopco4.ads
index eca94b43276..e198bbae81c 100644
--- a/gcc/ada/s-sopco4.ads
+++ b/gcc/ada/s-sopco4.ads
@@ -35,9 +35,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops_Concat_4 is
pragma Pure;
diff --git a/gcc/ada/s-sopco5.adb b/gcc/ada/s-sopco5.adb
index c31dc135ad7..8467028c6ba 100644
--- a/gcc/ada/s-sopco5.adb
+++ b/gcc/ada/s-sopco5.adb
@@ -33,9 +33,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops_Concat_5 is
diff --git a/gcc/ada/s-sopco5.ads b/gcc/ada/s-sopco5.ads
index 7d66a60c93c..3491bb9ad96 100644
--- a/gcc/ada/s-sopco5.ads
+++ b/gcc/ada/s-sopco5.ads
@@ -35,9 +35,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops_Concat_5 is
pragma Pure;
diff --git a/gcc/ada/s-stache.adb b/gcc/ada/s-stache.adb
index a3d6598d895..ffad2054481 100644
--- a/gcc/ada/s-stache.adb
+++ b/gcc/ada/s-stache.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
-- As noted in the spec, this dummy body is present because otherwise we
-- have bootstrapping path problems (there used to be a real body).
diff --git a/gcc/ada/s-stache.ads b/gcc/ada/s-stache.ads
index d2270e034cf..878b8a5270c 100644
--- a/gcc/ada/s-stache.ads
+++ b/gcc/ada/s-stache.ads
@@ -35,9 +35,7 @@
-- This package defines basic types and objects. Operations related to
-- stack checking can be found in package System.Stack_Checking.Operations.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Storage_Elements;
diff --git a/gcc/ada/s-stalib.adb b/gcc/ada/s-stalib.adb
index 8730b46aac2..ffea8d008cd 100644
--- a/gcc/ada/s-stalib.adb
+++ b/gcc/ada/s-stalib.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
-- The purpose of this body is simply to ensure that the two with'ed units
-- are properly included in the link. They are not with'ed from the spec
@@ -43,7 +41,8 @@ pragma Polling (Off);
-- elaboration circularities with Ada.Exceptions if polling is on.
pragma Warnings (Off);
--- Kill warnings from unused withs
+-- Kill warnings from unused withs. These unused with's are here to make
+-- sure the relevant units are loaded and properly elaborated.
with System.Soft_Links;
-- Referenced directly from generated code using external symbols so it
diff --git a/gcc/ada/s-stalib.ads b/gcc/ada/s-stalib.ads
index be0f0ad69f4..fb58642d01e 100644
--- a/gcc/ada/s-stalib.ads
+++ b/gcc/ada/s-stalib.ads
@@ -44,9 +44,7 @@
-- package and the packages it references are included in all Ada programs,
-- together with the included data.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
diff --git a/gcc/ada/s-stoele.adb b/gcc/ada/s-stoele.adb
index 4f9a05f7b41..0bab843c138 100644
--- a/gcc/ada/s-stoele.adb
+++ b/gcc/ada/s-stoele.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Conversion;
diff --git a/gcc/ada/s-stoele.ads b/gcc/ada/s-stoele.ads
index 275728b78a7..af60beb5518 100644
--- a/gcc/ada/s-stoele.ads
+++ b/gcc/ada/s-stoele.ads
@@ -37,9 +37,7 @@
-- extra declarations that can be introduced into System using Extend_System.
-- It is a good idea to avoid use clauses for this package!
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Storage_Elements is
pragma Pure;
@@ -66,12 +64,8 @@ package System.Storage_Elements is
type Storage_Element is mod 2 ** Storage_Unit;
for Storage_Element'Size use Storage_Unit;
- pragma Warnings (Off);
pragma Universal_Aliasing (Storage_Element);
- pragma Warnings (On);
- -- This type is used by the expansion to implement aggregate copy.
- -- We turn off warnings for this pragma to deal with being compiled
- -- with an earlier GNAT version that does not recognize this pragma.
+ -- This type is used by the expander to implement aggregate copy
type Storage_Array is
array (Storage_Offset range <>) of aliased Storage_Element;
diff --git a/gcc/ada/s-strcom.adb b/gcc/ada/s-strcom.adb
index acd1ac4e0ea..37ccc61380a 100644
--- a/gcc/ada/s-strcom.adb
+++ b/gcc/ada/s-strcom.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Conversion;
diff --git a/gcc/ada/s-strcom.ads b/gcc/ada/s-strcom.ads
index 644667e9991..6d1a303c560 100644
--- a/gcc/ada/s-strcom.ads
+++ b/gcc/ada/s-strcom.ads
@@ -31,9 +31,7 @@
-- This package contains functions for runtime comparisons on strings
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Compare is
diff --git a/gcc/ada/s-string.adb b/gcc/ada/s-string.adb
index 24c4e31c42e..e1799eb4545 100755
--- a/gcc/ada/s-string.adb
+++ b/gcc/ada/s-string.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Strings is
diff --git a/gcc/ada/s-string.ads b/gcc/ada/s-string.ads
index 5273eb4e4bf..79ec1127298 100755
--- a/gcc/ada/s-string.ads
+++ b/gcc/ada/s-string.ads
@@ -35,9 +35,7 @@
-- be used by other predefined packages. User access to this package is via
-- a renaming of this package in GNAT.String (file g-string.ads).
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Deallocation;
diff --git a/gcc/ada/s-strops.adb b/gcc/ada/s-strops.adb
index 4e1a999b46a..44a6a76bf15 100644
--- a/gcc/ada/s-strops.adb
+++ b/gcc/ada/s-strops.adb
@@ -33,9 +33,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops is
diff --git a/gcc/ada/s-strops.ads b/gcc/ada/s-strops.ads
index 5f59fde37c5..54ac74578a6 100644
--- a/gcc/ada/s-strops.ads
+++ b/gcc/ada/s-strops.ads
@@ -36,9 +36,7 @@
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops is
pragma Pure;
diff --git a/gcc/ada/s-ststop.adb b/gcc/ada/s-ststop.adb
index cff6179a7f3..25f3bcd23c7 100644
--- a/gcc/ada/s-ststop.adb
+++ b/gcc/ada/s-ststop.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Streams; use Ada.Streams;
with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
diff --git a/gcc/ada/s-ststop.ads b/gcc/ada/s-ststop.ads
index 0b932f94087..db7059069b7 100644
--- a/gcc/ada/s-ststop.ads
+++ b/gcc/ada/s-ststop.ads
@@ -46,9 +46,7 @@
-- or
-- String_Output_Blk_IO (Some_Stream, Some_String);
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Streams;
diff --git a/gcc/ada/s-taprop-hpux-dce.adb b/gcc/ada/s-taprop-hpux-dce.adb
index 21b393c6769..07fcc9cb20d 100644
--- a/gcc/ada/s-taprop-hpux-dce.adb
+++ b/gcc/ada/s-taprop-hpux-dce.adb
@@ -714,18 +714,6 @@ package body System.Task_Primitives.Operations is
begin
Self_ID.Common.LL.Thread := pthread_self;
Specific.Set (Self_ID);
-
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
end Enter_Task;
--------------
@@ -1080,7 +1068,16 @@ package body System.Task_Primitives.Operations is
S.State := False;
else
S.Waiting := True;
- Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+
+ loop
+ -- loop in case pthread_cond_wait returns earlier than
+ -- expected (e.g. in case of EINTR caused by a signal).
+
+ Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+ pragma Assert (Result = 0 or else Result = EINTR);
+
+ exit when not S.Waiting;
+ end loop;
end if;
Result := pthread_mutex_unlock (S.L'Access);
@@ -1230,6 +1227,12 @@ package body System.Task_Primitives.Operations is
Specific.Initialize (Environment_Task);
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
-- Install the abort-signal handler
diff --git a/gcc/ada/s-taprop-irix.adb b/gcc/ada/s-taprop-irix.adb
index e86badb118b..59297e941ff 100644
--- a/gcc/ada/s-taprop-irix.adb
+++ b/gcc/ada/s-taprop-irix.adb
@@ -709,18 +709,6 @@ package body System.Task_Primitives.Operations is
(To_Int (Self_ID.Common.Task_Info.Runon_CPU));
pragma Assert (Result = 0);
end if;
-
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
end Enter_Task;
--------------
@@ -1165,7 +1153,16 @@ package body System.Task_Primitives.Operations is
S.State := False;
else
S.Waiting := True;
- Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+
+ loop
+ -- loop in case pthread_cond_wait returns earlier than
+ -- expected (e.g. in case of EINTR caused by a signal).
+
+ Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+ pragma Assert (Result = 0 or else Result = EINTR);
+
+ exit when not S.Waiting;
+ end loop;
end if;
Result := pthread_mutex_unlock (S.L'Access);
@@ -1315,6 +1312,12 @@ package body System.Task_Primitives.Operations is
Specific.Initialize (Environment_Task);
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
-- Prepare the set of signals that should unblocked in all tasks
diff --git a/gcc/ada/s-taprop-linux.adb b/gcc/ada/s-taprop-linux.adb
index 08bbac10f40..b9c3c5e6ae9 100644
--- a/gcc/ada/s-taprop-linux.adb
+++ b/gcc/ada/s-taprop-linux.adb
@@ -701,21 +701,10 @@ package body System.Task_Primitives.Operations is
end if;
Self_ID.Common.LL.Thread := pthread_self;
+ Self_ID.Common.LL.LWP := lwp_self;
Specific.Set (Self_ID);
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
-
if Use_Alternate_Stack then
declare
Stack : aliased stack_t;
@@ -1094,7 +1083,19 @@ package body System.Task_Primitives.Operations is
S.State := False;
else
S.Waiting := True;
- Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+
+ loop
+ -- loop in case pthread_cond_wait returns earlier than
+ -- expected (e.g. in case of EINTR caused by a signal).
+ -- This should not happen on current implementation of pthread
+ -- under Linux, but POSIX does not guarantee it, so this may
+ -- change in the future.
+
+ Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+ pragma Assert (Result = 0 or else Result = EINTR);
+
+ exit when not S.Waiting;
+ end loop;
end if;
Result := pthread_mutex_unlock (S.L'Access);
@@ -1255,6 +1256,12 @@ package body System.Task_Primitives.Operations is
Alternate_Stack'Address;
end if;
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
-- Install the abort-signal handler
diff --git a/gcc/ada/s-taprop-mingw.adb b/gcc/ada/s-taprop-mingw.adb
index 89e7dc13811..cb51841a54d 100644
--- a/gcc/ada/s-taprop-mingw.adb
+++ b/gcc/ada/s-taprop-mingw.adb
@@ -807,18 +807,6 @@ package body System.Task_Primitives.Operations is
end if;
Self_ID.Common.LL.Thread_Id := GetCurrentThreadId;
-
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
end Enter_Task;
--------------
@@ -1081,6 +1069,13 @@ package body System.Task_Primitives.Operations is
Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level);
Environment_Task.Common.LL.Thread := GetCurrentThread;
+
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
end Initialize;
diff --git a/gcc/ada/s-taprop-posix.adb b/gcc/ada/s-taprop-posix.adb
index 64bf28f2670..c8894d64929 100644
--- a/gcc/ada/s-taprop-posix.adb
+++ b/gcc/ada/s-taprop-posix.adb
@@ -788,18 +788,6 @@ package body System.Task_Primitives.Operations is
Specific.Set (Self_ID);
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
-
if Use_Alternate_Stack then
declare
Stack : aliased stack_t;
@@ -1269,7 +1257,16 @@ package body System.Task_Primitives.Operations is
S.State := False;
else
S.Waiting := True;
- Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+
+ loop
+ -- loop in case pthread_cond_wait returns earlier than
+ -- expected (e.g. in case of EINTR caused by a signal).
+
+ Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+ pragma Assert (Result = 0 or else Result = EINTR);
+
+ exit when not S.Waiting;
+ end loop;
end if;
Result := pthread_mutex_unlock (S.L'Access);
@@ -1435,6 +1432,12 @@ package body System.Task_Primitives.Operations is
Alternate_Stack'Address;
end if;
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
-- Install the abort-signal handler
diff --git a/gcc/ada/s-taprop-solaris.adb b/gcc/ada/s-taprop-solaris.adb
index 16da81c446a..bd2470057e3 100644
--- a/gcc/ada/s-taprop-solaris.adb
+++ b/gcc/ada/s-taprop-solaris.adb
@@ -479,6 +479,12 @@ package body System.Task_Primitives.Operations is
Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level);
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
-- Install the abort-signal handler
@@ -900,18 +906,6 @@ package body System.Task_Primitives.Operations is
-- We need the above code even if we do direct fetch of Task_Id in Self
-- for the main task on Sun, x86 Solaris and for gcc 2.7.2.
-
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
end Enter_Task;
--------------
@@ -1824,7 +1818,16 @@ package body System.Task_Primitives.Operations is
S.State := False;
else
S.Waiting := True;
- Result := cond_wait (S.CV'Access, S.L'Access);
+
+ loop
+ -- loop in case pthread_cond_wait returns earlier than
+ -- expected (e.g. in case of EINTR caused by a signal).
+
+ Result := cond_wait (S.CV'Access, S.L'Access);
+ pragma Assert (Result = 0 or else Result = EINTR);
+
+ exit when not S.Waiting;
+ end loop;
end if;
Result := mutex_unlock (S.L'Access);
diff --git a/gcc/ada/s-taprop-tru64.adb b/gcc/ada/s-taprop-tru64.adb
index ce4195b8029..20b0bbc04ad 100644
--- a/gcc/ada/s-taprop-tru64.adb
+++ b/gcc/ada/s-taprop-tru64.adb
@@ -707,19 +707,8 @@ package body System.Task_Primitives.Operations is
begin
Hide_Unhide_Yellow_Zone (Hide => True);
Self_ID.Common.LL.Thread := pthread_self;
- Specific.Set (Self_ID);
-
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
- Unlock_RTS;
+ Specific.Set (Self_ID);
end Enter_Task;
--------------
@@ -1181,7 +1170,16 @@ package body System.Task_Primitives.Operations is
S.State := False;
else
S.Waiting := True;
- Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+
+ loop
+ -- loop in case pthread_cond_wait returns earlier than
+ -- expected (e.g. in case of EINTR caused by a signal).
+
+ Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+ pragma Assert (Result = 0 or else Result = EINTR);
+
+ exit when not S.Waiting;
+ end loop;
end if;
Result := pthread_mutex_unlock (S.L'Access);
@@ -1343,6 +1341,12 @@ package body System.Task_Primitives.Operations is
Specific.Initialize (Environment_Task);
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
-- Install the abort-signal handler
diff --git a/gcc/ada/s-taprop-vms.adb b/gcc/ada/s-taprop-vms.adb
index 4a36f8b1254..0d0dd08699e 100644
--- a/gcc/ada/s-taprop-vms.adb
+++ b/gcc/ada/s-taprop-vms.adb
@@ -689,20 +689,7 @@ package body System.Task_Primitives.Operations is
procedure Enter_Task (Self_ID : Task_Id) is
begin
Self_ID.Common.LL.Thread := pthread_self;
-
Specific.Set (Self_ID);
-
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
end Enter_Task;
--------------
@@ -1117,7 +1104,16 @@ package body System.Task_Primitives.Operations is
S.State := False;
else
S.Waiting := True;
- Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+
+ loop
+ -- loop in case pthread_cond_wait returns earlier than
+ -- expected (e.g. in case of EINTR caused by a signal).
+
+ Result := pthread_cond_wait (S.CV'Access, S.L'Access);
+ pragma Assert (Result = 0 or else Result = EINTR);
+
+ exit when not S.Waiting;
+ end loop;
end if;
Result := pthread_mutex_unlock (S.L'Access);
@@ -1238,6 +1234,25 @@ package body System.Task_Primitives.Operations is
----------------
procedure Initialize (Environment_Task : Task_Id) is
+
+ -- The DEC Ada facility code defined in Starlet
+ Ada_Facility : constant := 49;
+
+ function DBGEXT (Control_Block : System.Address)
+ return System.Aux_DEC.Unsigned_Word;
+ -- DBGEXT is imported from s-tasdeb.adb and its parameter re-typed
+ -- as Address to avoid having a VMS specific s-tasdeb.ads.
+ pragma Interface (C, DBGEXT);
+ pragma Import_Function (DBGEXT, "GNAT$DBGEXT");
+
+ type Facility_Type is range 0 .. 65535;
+
+ procedure Debug_Register
+ (ADBGEXT : System.Address;
+ ATCB_Key : pthread_key_t;
+ Facility : Facility_Type;
+ Std_Prolog : Integer);
+ pragma Import (C, Debug_Register, "CMA$DEBUG_REGISTER");
begin
Environment_Task_Id := Environment_Task;
@@ -1249,6 +1264,21 @@ package body System.Task_Primitives.Operations is
Specific.Initialize (Environment_Task);
+ -- Pass the context key on to CMA along with the other parameters
+ Debug_Register
+ (
+ DBGEXT'Address, -- Our DEBUG handling entry point
+ ATCB_Key, -- CMA context key for our Ada TCB's
+ Ada_Facility, -- Out facility code
+ 0 -- False, we don't have the std TCB prolog
+ );
+
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
end Initialize;
diff --git a/gcc/ada/s-taprop-vxworks.adb b/gcc/ada/s-taprop-vxworks.adb
index 40ded21b2ac..7f823ac0c45 100644
--- a/gcc/ada/s-taprop-vxworks.adb
+++ b/gcc/ada/s-taprop-vxworks.adb
@@ -833,18 +833,6 @@ package body System.Task_Primitives.Operations is
Install_Signal_Handlers;
- Lock_RTS;
-
- for J in Known_Tasks'Range loop
- if Known_Tasks (J) = null then
- Known_Tasks (J) := Self_ID;
- Self_ID.Known_Tasks_Index := J;
- exit;
- end if;
- end loop;
-
- Unlock_RTS;
-
-- If stack checking is enabled, set the stack limit for this task
if Set_Stack_Limit_Hook /= null then
@@ -1395,6 +1383,12 @@ package body System.Task_Primitives.Operations is
Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level);
+ -- Make environment task known here because it doesn't go through
+ -- Activate_Tasks, which does it for all other tasks.
+
+ Known_Tasks (Known_Tasks'First) := Environment_Task;
+ Environment_Task.Known_Tasks_Index := Known_Tasks'First;
+
Enter_Task (Environment_Task);
end Initialize;
diff --git a/gcc/ada/s-tasdeb.adb b/gcc/ada/s-tasdeb.adb
index 77d5478c528..9fb0cd6e798 100644
--- a/gcc/ada/s-tasdeb.adb
+++ b/gcc/ada/s-tasdeb.adb
@@ -246,6 +246,18 @@ package body System.Tasking.Debug is
STPO.Self.User_State := Value;
end Set_User_State;
+ ------------------------
+ -- Signal_Debug_Event --
+ ------------------------
+
+ procedure Signal_Debug_Event
+ (Event_Kind : Event_Kind_Type;
+ Task_Value : Task_Id)
+ is
+ begin
+ null;
+ end Signal_Debug_Event;
+
--------------------
-- Stop_All_Tasks --
--------------------
diff --git a/gcc/ada/s-tasdeb.ads b/gcc/ada/s-tasdeb.ads
index 1314e64753c..806fe0ee7b6 100644
--- a/gcc/ada/s-tasdeb.ads
+++ b/gcc/ada/s-tasdeb.ads
@@ -69,6 +69,26 @@ package System.Tasking.Debug is
-- Global array of tasks read by gdb, and updated by Create_Task and
-- Finalize_TCB
+ Debug_Event_Activating : constant := 1;
+ Debug_Event_Run : constant := 2;
+ Debug_Event_Suspended : constant := 3;
+ Debug_Event_Preempted : constant := 4;
+ Debug_Event_Terminated : constant := 5;
+ Debug_Event_Abort_Terminated : constant := 6;
+ Debug_Event_Exception_Terminated : constant := 7;
+ Debug_Event_Rendezvous_Exception : constant := 8;
+ Debug_Event_Handled : constant := 9;
+ Debug_Event_Dependents_Exception : constant := 10;
+ Debug_Event_Handled_Others : constant := 11;
+
+ subtype Event_Kind_Type is Positive range 1 .. 11;
+ -- Event kinds currently defined for debugging, used globally
+ -- below and on a per taak basis.
+
+ procedure Signal_Debug_Event
+ (Event_Kind : Event_Kind_Type;
+ Task_Value : Task_Id);
+
----------------------------------
-- VxWorks specific GDB support --
----------------------------------
diff --git a/gcc/ada/s-tasini.adb b/gcc/ada/s-tasini.adb
index 57d7dc60b63..0a97fb09a25 100644
--- a/gcc/ada/s-tasini.adb
+++ b/gcc/ada/s-tasini.adb
@@ -57,9 +57,9 @@ package body System.Tasking.Initialization is
use Task_Primitives.Operations;
Global_Task_Lock : aliased System.Task_Primitives.RTS_Lock;
- -- This is a global lock; it is used to execute in mutual exclusion
- -- from all other tasks. It is only used by Task_Lock,
- -- Task_Unlock, and Final_Task_Unlock.
+ -- This is a global lock; it is used to execute in mutual exclusion from
+ -- all other tasks. It is only used by Task_Lock, Task_Unlock, and
+ -- Final_Task_Unlock.
----------------------------------------------------------------------
-- Tasking versions of some services needed by non-tasking programs --
@@ -103,11 +103,10 @@ package body System.Tasking.Initialization is
----------------------------
procedure Init_RTS;
- -- This procedure completes the initialization of the GNARL. The first
- -- part of the initialization is done in the body of System.Tasking.
- -- It consists of initializing global locks, and installing tasking
- -- versions of certain operations used by the compiler. Init_RTS is called
- -- during elaboration.
+ -- This procedure completes the initialization of the GNARL. The first part
+ -- of the initialization is done in the body of System.Tasking. It consists
+ -- of initializing global locks, and installing tasking versions of certain
+ -- operations used by the compiler. Init_RTS is called during elaboration.
--------------------------
-- Change_Base_Priority --
@@ -130,7 +129,8 @@ package body System.Tasking.Initialization is
function Check_Abort_Status return Integer is
Self_ID : constant Task_Id := Self;
begin
- if Self_ID /= null and then Self_ID.Deferral_Level = 0
+ if Self_ID /= null
+ and then Self_ID.Deferral_Level = 0
and then Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level
then
return 1;
@@ -271,6 +271,7 @@ package body System.Tasking.Initialization is
pragma Assert (not Self_ID.ATC_Hack);
elsif Self_ID.ATC_Hack then
+
-- The solution really belongs in the Abort_Signal handler
-- for async. entry calls. The present hack is very
-- fragile. It relies that the very next point after
@@ -296,13 +297,14 @@ package body System.Tasking.Initialization is
-- Final_Task_Unlock --
-----------------------
- -- This version is only for use in Terminate_Task, when the task
- -- is relinquishing further rights to its own ATCB.
- -- There is a very interesting potential race condition there, where
- -- the old task may run concurrently with a new task that is allocated
- -- the old tasks (now reused) ATCB. The critical thing here is to
- -- not make any reference to the ATCB after the lock is released.
- -- See also comments on Terminate_Task and Unlock.
+ -- This version is only for use in Terminate_Task, when the task is
+ -- relinquishing further rights to its own ATCB.
+
+ -- There is a very interesting potential race condition there, where the
+ -- old task may run concurrently with a new task that is allocated the old
+ -- tasks (now reused) ATCB. The critical thing here is to not make any
+ -- reference to the ATCB after the lock is released. See also comments on
+ -- Terminate_Task and Unlock.
procedure Final_Task_Unlock (Self_ID : Task_Id) is
begin
@@ -334,16 +336,17 @@ package body System.Tasking.Initialization is
Self_Id.Awake_Count := 1;
Self_Id.Alive_Count := 1;
- Self_Id.Master_Within := Library_Task_Level;
- -- Normally, a task starts out with internal master nesting level
- -- one larger than external master nesting level. It is incremented
- -- to one by Enter_Master, which is called in the task body only if
- -- the compiler thinks the task may have dependent tasks. There is no
+ -- Normally, a task starts out with internal master nesting level one
+ -- larger than external master nesting level. It is incremented to one
+ -- by Enter_Master, which is called in the task body only if the
+ -- compiler thinks the task may have dependent tasks. There is no
-- corresponding call to Enter_Master for the environment task, so we
- -- would need to increment it to 2 here. Instead, we set it to 3.
- -- By doing this we reserve the level 2 for server tasks of the runtime
+ -- would need to increment it to 2 here. Instead, we set it to 3. By
+ -- doing this we reserve the level 2 for server tasks of the runtime
-- system. The environment task does not need to wait for these server
+ Self_Id.Master_Within := Library_Task_Level;
+
-- Initialize lock used to implement mutual exclusion between all tasks
Initialize_Lock (Global_Task_Lock'Access, STPO.Global_Task_Level);
@@ -368,8 +371,8 @@ package body System.Tasking.Initialization is
SSL.Tasking.Init_Tasking_Soft_Links;
- -- Abort is deferred in a new ATCB, so we need to undefer abort
- -- at this stage to make the environment task abortable.
+ -- Abort is deferred in a new ATCB, so we need to undefer abort at this
+ -- stage to make the environment task abortable.
Undefer_Abort (Environment_Task);
end Init_RTS;
@@ -381,40 +384,37 @@ package body System.Tasking.Initialization is
-- Abort a task to the specified ATC nesting level.
-- Call this only with T locked.
- -- An earlier version of this code contained a call to Wakeup. That
- -- should not be necessary here, if Abort_Task is implemented correctly,
- -- since Abort_Task should include the effect of Wakeup. However, the
- -- above call was in earlier versions of this file, and at least for
- -- some targets Abort_Task has not been doing Wakeup. It should not
- -- hurt to uncomment the above call, until the error is corrected for
- -- all targets.
+ -- An earlier version of this code contained a call to Wakeup. That should
+ -- not be necessary here, if Abort_Task is implemented correctly, since
+ -- Abort_Task should include the effect of Wakeup. However, the above call
+ -- was in earlier versions of this file, and at least for some targets
+ -- Abort_Task has not been doing Wakeup. It should not hurt to uncomment
+ -- the above call, until the error is corrected for all targets.
-- See extended comments in package body System.Tasking.Abort for the
-- overall design of the implementation of task abort.
-- ??? there is no such package ???
- -- If the task is sleeping it will be in an abort-deferred region, and
- -- will not have Abort_Signal raised by Abort_Task. Such an "abort
- -- deferral" is just to protect the RTS internals, and not necessarily
- -- required to enforce Ada semantics. Abort_Task should wake the task up
- -- and let it decide if it wants to complete the aborted construct
- -- immediately.
+ -- If the task is sleeping it will be in an abort-deferred region, and will
+ -- not have Abort_Signal raised by Abort_Task. Such an "abort deferral" is
+ -- just to protect the RTS internals, and not necessarily required to
+ -- enforce Ada semantics. Abort_Task should wake the task up and let it
+ -- decide if it wants to complete the aborted construct immediately.
-- Note that the effect of the low-level Abort_Task is not persistent.
-- If the target task is not blocked, this wakeup will be missed.
-- We don't bother calling Abort_Task if this task is aborting itself,
- -- since we are inside the RTS and have abort deferred. Similarly, We
- -- don't bother to call Abort_Task if T is terminated, since there is
- -- no need to abort a terminated task, and it could be dangerous to try
- -- if the task has stopped executing.
-
- -- Note that an earlier version of this code had some false reasoning
- -- about being able to reliably wake up a task that had suspended on
- -- a blocking system call that does not atomically release the task's
- -- lock (e.g., UNIX nanosleep, which we once thought could be used to
- -- implement delays). That still left the possibility of missed
- -- wakeups.
+ -- since we are inside the RTS and have abort deferred. Similarly, We don't
+ -- bother to call Abort_Task if T is terminated, since there is no need to
+ -- abort a terminated task, and it could be dangerous to try if the task
+ -- has stopped executing.
+
+ -- Note that an earlier version of this code had some false reasoning about
+ -- being able to reliably wake up a task that had suspended on a blocking
+ -- system call that does not atomically release the task's lock (e.g., UNIX
+ -- nanosleep, which we once thought could be used to implement delays).
+ -- That still left the possibility of missed wakeups.
-- We cannot safely call Vulnerable_Complete_Activation here, since that
-- requires locking Self_ID.Parent. The anti-deadlock lock ordering rules
@@ -436,7 +436,8 @@ package body System.Tasking.Initialization is
pragma Assert (False);
null;
- when Runnable =>
+ when Activating | Runnable =>
+
-- This is needed to cancel an asynchronous protected entry
-- call during a requeue with abort.
@@ -454,7 +455,7 @@ package body System.Tasking.Initialization is
AST_Server_Sleep =>
Wakeup (T, T.Common.State);
- when Acceptor_Sleep =>
+ when Acceptor_Sleep | Acceptor_Delay_Sleep =>
T.Open_Accepts := null;
Wakeup (T, T.Common.State);
@@ -488,13 +489,17 @@ package body System.Tasking.Initialization is
-- value will not be set to False except with T also locked,
-- inside Exit_One_ATC_Level, so we should not miss wakeups.
- if T.Common.State = Acceptor_Sleep then
+ if T.Common.State = Acceptor_Sleep
+ or else
+ T.Common.State = Acceptor_Delay_Sleep
+ then
T.Open_Accepts := null;
end if;
elsif T /= Self_ID and then
(T.Common.State = Runnable
- or else T.Common.State = Interrupt_Server_Blocked_On_Event_Flag)
+ or else T.Common.State = Interrupt_Server_Blocked_On_Event_Flag)
+
-- The task is blocked on a system call waiting for the
-- completion event. In this case Abort_Task may need to take
-- special action in order to succeed. Example system: VMS.
@@ -519,7 +524,6 @@ package body System.Tasking.Initialization is
Previous := Null_Task;
C := All_Tasks_List;
-
while C /= Null_Task loop
if C = T then
if Previous = Null_Task then
@@ -565,7 +569,6 @@ package body System.Tasking.Initialization is
function Task_Name return String is
Self_Id : constant Task_Id := STPO.Self;
-
begin
return Self_Id.Common.Task_Image (1 .. Self_Id.Common.Task_Image_Len);
end Task_Name;
@@ -776,6 +779,7 @@ package body System.Tasking.Initialization is
New_State : Entry_Call_State)
is
Caller : constant Task_Id := Entry_Call.Self;
+
begin
pragma Debug (Debug.Trace
(Self_ID, "Wakeup_Entry_Caller", 'E', Caller));
@@ -787,8 +791,8 @@ package body System.Tasking.Initialization is
if Entry_Call.Mode = Asynchronous_Call then
- -- Abort the caller in his abortable part,
- -- but do so only if call has been queued abortably
+ -- Abort the caller in his abortable part, but do so only if call has
+ -- been queued abortably.
if Entry_Call.State >= Was_Abortable or else New_State = Done then
Locked_Abort_To_Level (Self_ID, Caller, Entry_Call.Level - 1);
@@ -804,9 +808,9 @@ package body System.Tasking.Initialization is
-----------------------
-- These are dummies for subprograms that are only needed by certain
- -- optional run-time system packages. If they are needed, the soft
- -- links will be redirected to the real subprogram by elaboration of
- -- the subprogram body where the real subprogram is declared.
+ -- optional run-time system packages. If they are needed, the soft links
+ -- will be redirected to the real subprogram by elaboration of the
+ -- subprogram body where the real subprogram is declared.
procedure Finalize_Attributes (T : Task_Id) is
pragma Unreferenced (T);
diff --git a/gcc/ada/s-taskin.adb b/gcc/ada/s-taskin.adb
index 10ad198bfa2..ba5ef095345 100644
--- a/gcc/ada/s-taskin.adb
+++ b/gcc/ada/s-taskin.adb
@@ -62,9 +62,9 @@ package body System.Tasking is
function Detect_Blocking return Boolean is
GL_Detect_Blocking : Integer;
pragma Import (C, GL_Detect_Blocking, "__gl_detect_blocking");
- -- Global variable exported by the binder generated file.
- -- A value equal to 1 indicates that pragma Detect_Blocking is active,
- -- while 0 is used for the pragma not being present.
+ -- Global variable exported by the binder generated file. A value equal
+ -- to 1 indicates that pragma Detect_Blocking is active, while 0 is used
+ -- for the pragma not being present.
begin
return GL_Detect_Blocking = 1;
@@ -101,7 +101,8 @@ package body System.Tasking is
Task_Info : System.Task_Info.Task_Info_Type;
Stack_Size : System.Parameters.Size_Type;
T : Task_Id;
- Success : out Boolean) is
+ Success : out Boolean)
+ is
begin
T.Common.State := Unactivated;
@@ -113,29 +114,33 @@ package body System.Tasking is
return;
end if;
- T.Common.Parent := Parent;
- T.Common.Base_Priority := Base_Priority;
- T.Common.Current_Priority := 0;
+ -- Wouldn't the following be better done using an assignment of an
+ -- aggregate so that we could be sure no components were forgotten???
+
+ T.Common.Parent := Parent;
+ T.Common.Base_Priority := Base_Priority;
+ T.Common.Current_Priority := 0;
T.Common.Protected_Action_Nesting := 0;
- T.Common.Call := null;
- T.Common.Task_Arg := Task_Arg;
- T.Common.Task_Entry_Point := Task_Entry_Point;
- T.Common.Activator := Self_ID;
- T.Common.Wait_Count := 0;
- T.Common.Elaborated := Elaborated;
- T.Common.Activation_Failed := False;
- T.Common.Task_Info := Task_Info;
+ T.Common.Call := null;
+ T.Common.Task_Arg := Task_Arg;
+ T.Common.Task_Entry_Point := Task_Entry_Point;
+ T.Common.Activator := Self_ID;
+ T.Common.Wait_Count := 0;
+ T.Common.Elaborated := Elaborated;
+ T.Common.Activation_Failed := False;
+ T.Common.Task_Info := Task_Info;
T.Common.Global_Task_Lock_Nesting := 0;
- T.Common.Fall_Back_Handler := null;
- T.Common.Specific_Handler := null;
+ T.Common.Fall_Back_Handler := null;
+ T.Common.Specific_Handler := null;
+ T.Common.Debug_Events := (others => False);
if T.Common.Parent = null then
- -- For the environment task, the adjusted stack size is
- -- meaningless. For example, an unspecified Stack_Size means
- -- that the stack size is determined by the environment, or
- -- can grow dynamically. The Stack_Checking algorithm
- -- therefore needs to use the requested size, or 0 in
- -- case of an unknown size.
+
+ -- For the environment task, the adjusted stack size is meaningless.
+ -- For example, an unspecified Stack_Size means that the stack size
+ -- is determined by the environment, or can grow dynamically. The
+ -- Stack_Checking algorithm therefore needs to use the requested
+ -- size, or 0 in case of an unknown size.
T.Common.Compiler_Data.Pri_Stack_Info.Size :=
Storage_Elements.Storage_Offset (Stack_Size);
@@ -161,9 +166,9 @@ package body System.Tasking is
Main_Priority : Integer;
pragma Import (C, Main_Priority, "__gl_main_priority");
- -- Priority for main task. Note that this is of type Integer, not
- -- Priority, because we use the value -1 to indicate the default
- -- main priority, and that is of course not in Priority'range.
+ -- Priority for main task. Note that this is of type Integer, not Priority,
+ -- because we use the value -1 to indicate the default main priority, and
+ -- that is of course not in Priority'range.
Initialized : Boolean := False;
-- Used to prevent multiple calls to Initialize
diff --git a/gcc/ada/s-taskin.ads b/gcc/ada/s-taskin.ads
index 1041c039e50..5012abec555 100644
--- a/gcc/ada/s-taskin.ads
+++ b/gcc/ada/s-taskin.ads
@@ -128,18 +128,19 @@ package System.Tasking is
type Task_States is
(Unactivated,
- -- Task has been created but has not been activated.
+ -- TCB initialized but not task has not been created.
-- It cannot be executing.
+-- Activating,
+-- -- ??? Temporarily at end of list for GDB compatibility
+-- -- Task has been created and is being made Runnable.
+
-- Active states
-- For all states from here down, the task has been activated.
-- For all states from here down, except for Terminated, the task
-- may be executing.
-- Activator = null iff it has not yet completed activating.
- -- For all states from here down,
- -- the task has been activated, and may be executing.
-
Runnable,
-- Task is not blocked for any reason known to Ada.
-- (It may be waiting for a mutex, though.)
@@ -154,7 +155,11 @@ package System.Tasking is
-- Task is waiting for created tasks to complete activation
Acceptor_Sleep,
- -- Task is waiting on an accept or selective wait statement
+ -- Task is waiting on an accept or select with terminate
+
+-- Acceptor_Delay_Sleep,
+-- -- ??? Temporarily at end of list for GDB compatibility
+-- -- Task is waiting on an selective wait statement
Entry_Caller_Sleep,
-- Task is waiting on an entry call
@@ -190,9 +195,15 @@ package System.Tasking is
Asynchronous_Hold,
-- The task has been held by Asynchronous_Task_Control.Hold_Task
- Interrupt_Server_Blocked_On_Event_Flag
+ Interrupt_Server_Blocked_On_Event_Flag,
-- The task has been blocked on a system call waiting for a
-- completion event/signal to occur.
+
+ Activating,
+ -- Task has been created and is being made Runnable.
+
+ Acceptor_Delay_Sleep
+ -- Task is waiting on an selective wait statement
);
type Call_Modes is
@@ -389,6 +400,15 @@ package System.Tasking is
-- is in general a non-static value that can depend on discriminants
-- of the task.
+ type Bit_Array is array (Integer range <>) of Boolean;
+ pragma Pack (Bit_Array);
+
+ subtype Debug_Event_Array is Bit_Array (1 .. 16);
+
+ Global_Task_Debug_Event_Set : Boolean := False;
+ -- Set True when running under debugger control and a task debug
+ -- event signal has been requested.
+
----------------------------------------------
-- Ada_Task_Control_Block (ATCB) definition --
----------------------------------------------
@@ -608,6 +628,10 @@ package System.Tasking is
-- any of its dependent tasks.
--
-- Protection: Self.L
+
+ Debug_Events : Debug_Event_Array;
+ -- Word length array of per task debug events, of which 11 kinds are
+ -- currently defined in System.Tasking.Debugging package.
end record;
---------------------------------------
diff --git a/gcc/ada/s-tasren.adb b/gcc/ada/s-tasren.adb
index bf5fd85dfb8..38f179d0e2e 100644
--- a/gcc/ada/s-tasren.adb
+++ b/gcc/ada/s-tasren.adb
@@ -1525,7 +1525,7 @@ package body System.Tasking.Rendezvous is
-- Wait for a normal call and a pending action until the
-- Wakeup_Time is reached.
- Self_Id.Common.State := Acceptor_Sleep;
+ Self_Id.Common.State := Acceptor_Delay_Sleep;
-- Try to remove calls to Sleep in the loop below by letting the
-- caller a chance of getting ready immediately, using Unlock
@@ -1557,7 +1557,7 @@ package body System.Tasking.Rendezvous is
exit when Self_Id.Open_Accepts = null;
if Timedout then
- Sleep (Self_Id, Acceptor_Sleep);
+ Sleep (Self_Id, Acceptor_Delay_Sleep);
else
if Parameters.Runtime_Traces then
Send_Trace_Info (WT_Select,
@@ -1567,7 +1567,7 @@ package body System.Tasking.Rendezvous is
end if;
STPO.Timed_Sleep (Self_Id, Timeout, Mode,
- Acceptor_Sleep, Timedout, Yielded);
+ Acceptor_Delay_Sleep, Timedout, Yielded);
end if;
if Timedout then
@@ -1613,9 +1613,9 @@ package body System.Tasking.Rendezvous is
-- 3) Spurious wakeup
Self_Id.Open_Accepts := null;
- Self_Id.Common.State := Acceptor_Sleep;
+ Self_Id.Common.State := Acceptor_Delay_Sleep;
- STPO.Timed_Sleep (Self_Id, Timeout, Mode, Acceptor_Sleep,
+ STPO.Timed_Sleep (Self_Id, Timeout, Mode, Acceptor_Delay_Sleep,
Timedout, Yielded);
Self_Id.Common.State := Runnable;
diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb
index eaa6ff0b430..84281cf827f 100644
--- a/gcc/ada/s-tassta.adb
+++ b/gcc/ada/s-tassta.adb
@@ -300,7 +300,7 @@ package body System.Tasking.Stages is
-- racing ahead.
if Success then
- C.Common.State := Runnable;
+ C.Common.State := Activating;
C.Awake_Count := 1;
C.Alive_Count := 1;
P.Awake_Count := P.Awake_Count + 1;
@@ -313,6 +313,21 @@ package body System.Tasking.Stages is
P.Common.Wait_Count := P.Common.Wait_Count + 1;
end if;
+ for J in System.Tasking.Debug.Known_Tasks'Range loop
+ if System.Tasking.Debug.Known_Tasks (J) = null then
+ System.Tasking.Debug.Known_Tasks (J) := C;
+ C.Known_Tasks_Index := J;
+ exit;
+ end if;
+ end loop;
+
+ if Global_Task_Debug_Event_Set then
+ Debug.Signal_Debug_Event
+ (Debug.Debug_Event_Activating, C);
+ end if;
+
+ C.Common.State := Runnable;
+
Unlock (C);
Unlock (P);
@@ -923,7 +938,7 @@ package body System.Tasking.Stages is
Initialization.Undefer_Abort (Self_ID);
end Move_Activation_Chain;
- -- Compiler interface only. Do not call from within the RTS.
+ -- Compiler interface only. Do not call from within the RTS
--------------------
-- Set_Entry_Name --
@@ -1096,8 +1111,7 @@ package body System.Tasking.Stages is
Stack_Guard (Self_ID, True);
-- Initialize low-level TCB components, that cannot be initialized by
- -- the creator. Enter_Task sets Self_ID.Known_Tasks_Index and also
- -- Self_ID.LL.Thread
+ -- the creator. Enter_Task sets Self_ID.LL.Thread
Enter_Task (Self_ID);
@@ -1130,6 +1144,11 @@ package body System.Tasking.Stages is
Self_ID.Deferral_Level := 0;
end if;
+ if Global_Task_Debug_Event_Set then
+ Debug.Signal_Debug_Event
+ (Debug.Debug_Event_Run, Self_ID);
+ end if;
+
begin
-- We are separating the following portion of the code in order to
-- place the exception handlers in a different block. In this way,
@@ -1168,8 +1187,18 @@ package body System.Tasking.Stages is
if Self_ID.Terminate_Alternative then
Cause := Normal;
+
+ if Global_Task_Debug_Event_Set then
+ Debug.Signal_Debug_Event
+ (Debug.Debug_Event_Terminated, Self_ID);
+ end if;
else
Cause := Abnormal;
+
+ if Global_Task_Debug_Event_Set then
+ Debug.Signal_Debug_Event
+ (Debug.Debug_Event_Abort_Terminated, Self_ID);
+ end if;
end if;
when others =>
-- ??? Using an E : others here causes CD2C11A to fail on Tru64
@@ -1194,7 +1223,13 @@ package body System.Tasking.Stages is
-- procedure, as well as the associated Exception_Occurrence.
Cause := Unhandled_Exception;
+
Save_Occurrence (EO, SSL.Get_Current_Excep.all.all);
+
+ if Global_Task_Debug_Event_Set then
+ Debug.Signal_Debug_Event
+ (Debug.Debug_Event_Exception_Terminated, Self_ID);
+ end if;
end;
-- Look for a task termination handler. This code is for all tasks but
@@ -1388,6 +1423,9 @@ package body System.Tasking.Stages is
-- unwound. The common notification routine has been called at the
-- raise point already.
+ -- Lock to prevent unsynchronized output
+
+ Initialization.Task_Lock (Self_Id);
To_Stderr ("task ");
if Self_Id.Common.Task_Image_Len /= 0 then
@@ -1400,6 +1438,7 @@ package body System.Tasking.Stages is
To_Stderr (" terminated by unhandled exception");
To_Stderr ((1 => ASCII.LF));
To_Stderr (Tailored_Exception_Information (Excep.all));
+ Initialization.Task_Unlock (Self_Id);
end Trace_Unhandled_Exception_In_Task;
------------------------------------
diff --git a/gcc/ada/s-traceb.adb b/gcc/ada/s-traceb.adb
index 420030c6dbb..d4de95d7e05 100644
--- a/gcc/ada/s-traceb.adb
+++ b/gcc/ada/s-traceb.adb
@@ -34,9 +34,7 @@
-- Note: this unit must be compiled using -fno-optimize-sibling-calls.
-- See comment below in body of Call_Chain for details on the reason.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Traceback is
diff --git a/gcc/ada/s-traceb.ads b/gcc/ada/s-traceb.ads
index 79a5f970053..0119b700a44 100644
--- a/gcc/ada/s-traceb.ads
+++ b/gcc/ada/s-traceb.ads
@@ -29,14 +29,11 @@
-- --
------------------------------------------------------------------------------
--- This package provides a method for generating a traceback of the
--- current execution location. The traceback shows the locations of
--- calls in the call chain, up to either the top or a designated
--- number of levels.
+-- This package provides a method for generating a traceback of the current
+-- execution location. The traceback shows the locations of calls in the call
+-- chain, up to either the top or a designated number of levels.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
@@ -61,12 +58,11 @@ package System.Traceback is
-- Traceback is the address of an array of addresses where the
-- result will be stored.
--
- -- Max_Len is the length of the Traceback array. If the call chain
- -- is longer than this, then additional entries are discarded, and
- -- the traceback is missing some of the highest level entries.
+ -- Max_Len is the length of the Traceback array. If the call chain is
+ -- longer than this, then additional entries are discarded, and the
+ -- traceback is missing some of the highest level entries.
--
- -- Len is the returned actual number of addresses stored
- -- in the Traceback array.
+ -- Len is the returned number of addresses stored in the Traceback array
--
-- Exclude_Min/Exclude_Max, if non null, provide a range of addresses
-- to ignore from the computation of the traceback.
@@ -77,9 +73,9 @@ package System.Traceback is
-- this procedure, 2 means 1 + exclude the frame for this procedure's
-- caller, ...
--
- -- On return, the Traceback array is filled in, and Len indicates
- -- the number of stored entries. The first entry is the most recent
- -- call, and the last entry is the highest level call.
+ -- On return, the Traceback array is filled in, and Len indicates the
+ -- number of stored entries. The first entry is the most recent call,
+ -- and the last entry is the highest level call.
function C_Call_Chain
(Traceback : System.Address;
diff --git a/gcc/ada/s-traent.adb b/gcc/ada/s-traent.adb
index 80af8be9964..343d30c8906 100644
--- a/gcc/ada/s-traent.adb
+++ b/gcc/ada/s-traent.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Traceback_Entries is
diff --git a/gcc/ada/s-traent.ads b/gcc/ada/s-traent.ads
index b353de128f9..cf24e0db52a 100644
--- a/gcc/ada/s-traent.ads
+++ b/gcc/ada/s-traent.ads
@@ -38,9 +38,7 @@
-- version of the package, an entry is a mere code location representing the
-- address of a call instruction part of the call-chain.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Traceback_Entries is
pragma Preelaborate;
diff --git a/gcc/ada/s-utf_32.adb b/gcc/ada/s-utf_32.adb
index 712eb2c63b7..263f13efd9b 100755
--- a/gcc/ada/s-utf_32.adb
+++ b/gcc/ada/s-utf_32.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Style_Checks (Off);
-- Allow long lines in this unit
diff --git a/gcc/ada/s-utf_32.ads b/gcc/ada/s-utf_32.ads
index 5217e8bf3ac..41ed6d7927c 100755
--- a/gcc/ada/s-utf_32.ads
+++ b/gcc/ada/s-utf_32.ads
@@ -41,9 +41,7 @@
-- the same services. The reason this package is in System is so that it can
-- with'ed by other packages in the Ada and System hierarchies.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.UTF_32 is
diff --git a/gcc/ada/s-vxwext-kernel.adb b/gcc/ada/s-vxwext-kernel.adb
new file mode 100644
index 00000000000..733772bdf8a
--- /dev/null
+++ b/gcc/ada/s-vxwext-kernel.adb
@@ -0,0 +1,55 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . V X W O R K S . E X T --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008-2009, Free Software Foundation, Inc. --
+-- --
+-- GNARL is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package provides vxworks specific support functions needed
+-- by System.OS_Interface.
+
+-- This is the VxWorks <= 6.5 kernel version of this package
+-- Also works for 6.6 uniprocessor
+
+package body System.VxWorks.Ext is
+
+ --------------
+ -- Int_Lock --
+ --------------
+
+ function intLock return int;
+ pragma Import (C, intLock, "intLock");
+
+ function Int_Lock return int renames intLock;
+
+ ----------------
+ -- Int_Unlock --
+ ----------------
+
+ function intUnlock return int;
+ pragma Import (C, intUnlock, "intUnlock");
+
+ function Int_Unlock return int renames intUnlock;
+
+end System.VxWorks.Ext;
diff --git a/gcc/ada/s-vxwext-kernel.ads b/gcc/ada/s-vxwext-kernel.ads
index a9d3d5539c6..423acab2ba9 100644
--- a/gcc/ada/s-vxwext-kernel.ads
+++ b/gcc/ada/s-vxwext-kernel.ads
@@ -39,25 +39,40 @@ package System.VxWorks.Ext is
type t_id is new Long_Integer;
subtype int is Interfaces.C.int;
- function Task_Cont (tid : t_id) return int;
- pragma Import (C, Task_Cont, "taskCont");
+ type Interrupt_Handler is access procedure (parameter : System.Address);
+ pragma Convention (C, Interrupt_Handler);
- function Task_Stop (tid : t_id) return int;
- pragma Import (C, Task_Stop, "taskStop");
+ type Interrupt_Vector is new System.Address;
function Int_Lock return int;
- pragma Import (C, Int_Lock, "intLock");
+ pragma Convention (C, Int_Lock);
function Int_Unlock return int;
- pragma Import (C, Int_Unlock, "intUnlock");
+ pragma Convention (C, Int_Unlock);
+
+ function Interrupt_Connect
+ (Vector : Interrupt_Vector;
+ Handler : Interrupt_Handler;
+ Parameter : System.Address := System.Null_Address) return int;
+ pragma Import (C, Interrupt_Connect, "intConnect");
+
+ function Interrupt_Number_To_Vector
+ (intNum : int) return Interrupt_Vector;
+ pragma Import (C, Interrupt_Number_To_Vector, "__gnat_inum_to_ivec");
+
+ function Task_Cont (tid : t_id) return int;
+ pragma Import (C, Task_Cont, "taskCont");
+
+ function Task_Stop (tid : t_id) return int;
+ pragma Import (C, Task_Stop, "taskStop");
function kill (pid : t_id; sig : int) return int;
pragma Import (C, kill, "kill");
- function Set_Time_Slice (ticks : int) return int;
- pragma Import (C, Set_Time_Slice, "kernelTimeSlice");
-
function getpid return t_id;
pragma Import (C, getpid, "taskIdSelf");
+ function Set_Time_Slice (ticks : int) return int;
+ pragma Import (C, Set_Time_Slice, "kernelTimeSlice");
+
end System.VxWorks.Ext;
diff --git a/gcc/ada/s-vxwext-rtp.adb b/gcc/ada/s-vxwext-rtp.adb
index 74ff505f096..809ee91f006 100644
--- a/gcc/ada/s-vxwext-rtp.adb
+++ b/gcc/ada/s-vxwext-rtp.adb
@@ -26,40 +26,57 @@
-- --
------------------------------------------------------------------------------
--- This is the VxWorks 6 rtp version of this package
+-- This package provides vxworks specific support functions needed
+-- by System.OS_Interface.
+
+-- This is the VxWorks 6 RTP version of this package
package body System.VxWorks.Ext is
- function Task_Cont (tid : t_id) return int is
- pragma Unreferenced (tid);
- begin
- -- Operation not allowed in an RTP
- return 0;
- end Task_Cont;
+ ERROR : constant := -1;
- function Task_Stop (tid : t_id) return int is
- pragma Unreferenced (tid);
- begin
- -- Operation not allowed in an RTP
- return 0;
- end Task_Stop;
+ --------------
+ -- Int_Lock --
+ --------------
function Int_Lock return int is
begin
- -- Operation not allowed in an RTP
- return 0;
+ return ERROR;
end Int_Lock;
+ ----------------
+ -- Int_Unlock --
+ ----------------
+
function Int_Unlock return int is
begin
- -- Operation not allowed in an RTP
- return 0;
+ return ERROR;
end Int_Unlock;
+ --------------------
+ -- Set_Time_Slice --
+ --------------------
+
function Set_Time_Slice (ticks : int) return int is
pragma Unreferenced (ticks);
begin
- return 0;
+ return ERROR;
end Set_Time_Slice;
+ function Interrupt_Connect
+ (Vector : Interrupt_Vector;
+ Handler : Interrupt_Handler;
+ Parameter : System.Address := System.Null_Address) return int is
+ pragma Unreferenced (Vector, Handler, Parameter);
+ begin
+ return ERROR;
+ end Interrupt_Connect;
+
+ function Interrupt_Number_To_Vector
+ (intNum : int) return Interrupt_Vector is
+ pragma Unreferenced (intNum);
+ begin
+ return 0;
+ end Interrupt_Number_To_Vector;
+
end System.VxWorks.Ext;
diff --git a/gcc/ada/s-vxwext-rtp.ads b/gcc/ada/s-vxwext-rtp.ads
index bba9cbcf957..8d094412c6d 100644
--- a/gcc/ada/s-vxwext-rtp.ads
+++ b/gcc/ada/s-vxwext-rtp.ads
@@ -29,7 +29,7 @@
-- This package provides vxworks specific support functions needed
-- by System.OS_Interface.
--- This is the VxWorks 6 rtp version of this package
+-- This is the VxWorks 6 RTP version of this package
with Interfaces.C;
@@ -39,11 +39,10 @@ package System.VxWorks.Ext is
type t_id is new Long_Integer;
subtype int is Interfaces.C.int;
- function Task_Cont (tid : t_id) return int;
- pragma Inline (Task_Cont);
+ type Interrupt_Handler is access procedure (parameter : System.Address);
+ pragma Convention (C, Interrupt_Handler);
- function Task_Stop (tid : t_id) return int;
- pragma Inline (Task_Stop);
+ type Interrupt_Vector is new System.Address;
function Int_Lock return int;
pragma Inline (Int_Lock);
@@ -51,13 +50,29 @@ package System.VxWorks.Ext is
function Int_Unlock return int;
pragma Inline (Int_Unlock);
+ function Interrupt_Connect
+ (Vector : Interrupt_Vector;
+ Handler : Interrupt_Handler;
+ Parameter : System.Address := System.Null_Address) return int;
+ pragma Convention (C, Interrupt_Connect);
+
+ function Interrupt_Number_To_Vector
+ (intNum : int) return Interrupt_Vector;
+ pragma Convention (C, Interrupt_Number_To_Vector);
+
+ function Task_Cont (tid : t_id) return int;
+ pragma Import (C, Task_Cont, "taskResume");
+
+ function Task_Stop (tid : t_id) return int;
+ pragma Import (C, Task_Stop, "taskSuspend");
+
function kill (pid : t_id; sig : int) return int;
pragma Import (C, kill, "taskKill");
- function Set_Time_Slice (ticks : int) return int;
- pragma Inline (Set_Time_Slice);
-
function getpid return t_id;
pragma Import (C, getpid, "getpid");
+ function Set_Time_Slice (ticks : int) return int;
+ pragma Inline (Set_Time_Slice);
+
end System.VxWorks.Ext;
diff --git a/gcc/ada/s-vxwext.ads b/gcc/ada/s-vxwext.ads
index a06de26612e..dc23cd26d07 100644
--- a/gcc/ada/s-vxwext.ads
+++ b/gcc/ada/s-vxwext.ads
@@ -39,11 +39,10 @@ package System.VxWorks.Ext is
type t_id is new Long_Integer;
subtype int is Interfaces.C.int;
- function Task_Cont (tid : t_id) return int;
- pragma Import (C, Task_Cont, "taskResume");
+ type Interrupt_Handler is access procedure (parameter : System.Address);
+ pragma Convention (C, Interrupt_Handler);
- function Task_Stop (tid : t_id) return int;
- pragma Import (C, Task_Stop, "taskSuspend");
+ type Interrupt_Vector is new System.Address;
function Int_Lock return int;
pragma Import (C, Int_Lock, "intLock");
@@ -51,13 +50,29 @@ package System.VxWorks.Ext is
function Int_Unlock return int;
pragma Import (C, Int_Unlock, "intUnlock");
+ function Interrupt_Connect
+ (Vector : Interrupt_Vector;
+ Handler : Interrupt_Handler;
+ Parameter : System.Address := System.Null_Address) return int;
+ pragma Import (C, Interrupt_Connect, "intConnect");
+
+ function Interrupt_Number_To_Vector
+ (intNum : int) return Interrupt_Vector;
+ pragma Import (C, Interrupt_Number_To_Vector, "__gnat_inum_to_ivec");
+
+ function Task_Cont (tid : t_id) return int;
+ pragma Import (C, Task_Cont, "taskResume");
+
+ function Task_Stop (tid : t_id) return int;
+ pragma Import (C, Task_Stop, "taskSuspend");
+
function kill (pid : t_id; sig : int) return int;
pragma Import (C, kill, "kill");
- function Set_Time_Slice (ticks : int) return int;
- pragma Import (C, Set_Time_Slice, "kernelTimeSlice");
-
function getpid return t_id;
pragma Import (C, getpid, "taskIdSelf");
+ function Set_Time_Slice (ticks : int) return int;
+ pragma Import (C, Set_Time_Slice, "kernelTimeSlice");
+
end System.VxWorks.Ext;
diff --git a/gcc/ada/s-wchcnv.adb b/gcc/ada/s-wchcnv.adb
index 05526094548..bb806f08aa5 100644
--- a/gcc/ada/s-wchcnv.adb
+++ b/gcc/ada/s-wchcnv.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Interfaces; use Interfaces;
with System.WCh_Con; use System.WCh_Con;
diff --git a/gcc/ada/s-wchcnv.ads b/gcc/ada/s-wchcnv.ads
index 6b7abe56103..887e2198cb7 100644
--- a/gcc/ada/s-wchcnv.ads
+++ b/gcc/ada/s-wchcnv.ads
@@ -43,9 +43,7 @@
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.WCh_Con;
diff --git a/gcc/ada/s-wchcon.adb b/gcc/ada/s-wchcon.adb
index 57fb73d3efa..45585d9f744 100755
--- a/gcc/ada/s-wchcon.adb
+++ b/gcc/ada/s-wchcon.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.WCh_Con is
diff --git a/gcc/ada/s-wchcon.ads b/gcc/ada/s-wchcon.ads
index 68d9a122095..1a370698c08 100644
--- a/gcc/ada/s-wchcon.ads
+++ b/gcc/ada/s-wchcon.ads
@@ -36,9 +36,7 @@
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.WCh_Con is
pragma Pure;
diff --git a/gcc/ada/s-wchjis.adb b/gcc/ada/s-wchjis.adb
index c4604af0e2b..a005ec68d9b 100644
--- a/gcc/ada/s-wchjis.adb
+++ b/gcc/ada/s-wchjis.adb
@@ -29,9 +29,7 @@
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.WCh_JIS is
diff --git a/gcc/ada/s-wchjis.ads b/gcc/ada/s-wchjis.ads
index f66cdcb18a8..b91839704c2 100644
--- a/gcc/ada/s-wchjis.ads
+++ b/gcc/ada/s-wchjis.ads
@@ -32,9 +32,7 @@
-- This package contains routines used for converting between internal
-- JIS codes and the two external forms we support (EUC and Shift-JIS)
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.WCh_JIS is
pragma Pure;
diff --git a/gcc/ada/s-win32.ads b/gcc/ada/s-win32.ads
index f8856fb3bfa..35975919edd 100644
--- a/gcc/ada/s-win32.ads
+++ b/gcc/ada/s-win32.ads
@@ -82,51 +82,53 @@ package System.Win32 is
-- Files --
-----------
- GENERIC_READ : constant := 16#80000000#;
- GENERIC_WRITE : constant := 16#40000000#;
-
- CREATE_NEW : constant := 1;
- CREATE_ALWAYS : constant := 2;
- OPEN_EXISTING : constant := 3;
- OPEN_ALWAYS : constant := 4;
- TRUNCATE_EXISTING : constant := 5;
-
- FILE_SHARE_DELETE : constant := 16#00000004#;
- FILE_SHARE_READ : constant := 16#00000001#;
- FILE_SHARE_WRITE : constant := 16#00000002#;
-
- FILE_BEGIN : constant := 0;
- FILE_CURRENT : constant := 1;
- FILE_END : constant := 2;
-
- PAGE_NOACCESS : constant := 16#0001#;
- PAGE_READONLY : constant := 16#0002#;
- PAGE_READWRITE : constant := 16#0004#;
- PAGE_WRITECOPY : constant := 16#0008#;
- PAGE_EXECUTE : constant := 16#0010#;
-
- FILE_MAP_ALL_ACCESS : constant := 16#F001f#;
- FILE_MAP_READ : constant := 4;
- FILE_MAP_WRITE : constant := 2;
- FILE_MAP_COPY : constant := 1;
-
- FILE_ADD_FILE : constant := 16#0002#;
- FILE_ADD_SUBDIRECTORY : constant := 16#0004#;
- FILE_APPEND_DATA : constant := 16#0004#;
- FILE_CREATE_PIPE_INSTANCE : constant := 16#0004#;
- FILE_DELETE_CHILD : constant := 16#0040#;
- FILE_EXECUTE : constant := 16#0020#;
- FILE_LIST_DIRECTORY : constant := 16#0001#;
- FILE_READ_ATTRIBUTES : constant := 16#0080#;
- FILE_READ_DATA : constant := 16#0001#;
- FILE_READ_EA : constant := 16#0008#;
- FILE_TRAVERSE : constant := 16#0020#;
- FILE_WRITE_ATTRIBUTES : constant := 16#0100#;
- FILE_WRITE_DATA : constant := 16#0002#;
- FILE_WRITE_EA : constant := 16#0010#;
- STANDARD_RIGHTS_READ : constant := 16#20000#;
- STANDARD_RIGHTS_WRITE : constant := 16#20000#;
- SYNCHRONIZE : constant := 16#100000#;
+ CP_UTF8 : constant := 65001;
+
+ GENERIC_READ : constant := 16#80000000#;
+ GENERIC_WRITE : constant := 16#40000000#;
+
+ CREATE_NEW : constant := 1;
+ CREATE_ALWAYS : constant := 2;
+ OPEN_EXISTING : constant := 3;
+ OPEN_ALWAYS : constant := 4;
+ TRUNCATE_EXISTING : constant := 5;
+
+ FILE_SHARE_DELETE : constant := 16#00000004#;
+ FILE_SHARE_READ : constant := 16#00000001#;
+ FILE_SHARE_WRITE : constant := 16#00000002#;
+
+ FILE_BEGIN : constant := 0;
+ FILE_CURRENT : constant := 1;
+ FILE_END : constant := 2;
+
+ PAGE_NOACCESS : constant := 16#0001#;
+ PAGE_READONLY : constant := 16#0002#;
+ PAGE_READWRITE : constant := 16#0004#;
+ PAGE_WRITECOPY : constant := 16#0008#;
+ PAGE_EXECUTE : constant := 16#0010#;
+
+ FILE_MAP_ALL_ACCESS : constant := 16#F001f#;
+ FILE_MAP_READ : constant := 4;
+ FILE_MAP_WRITE : constant := 2;
+ FILE_MAP_COPY : constant := 1;
+
+ FILE_ADD_FILE : constant := 16#0002#;
+ FILE_ADD_SUBDIRECTORY : constant := 16#0004#;
+ FILE_APPEND_DATA : constant := 16#0004#;
+ FILE_CREATE_PIPE_INSTANCE : constant := 16#0004#;
+ FILE_DELETE_CHILD : constant := 16#0040#;
+ FILE_EXECUTE : constant := 16#0020#;
+ FILE_LIST_DIRECTORY : constant := 16#0001#;
+ FILE_READ_ATTRIBUTES : constant := 16#0080#;
+ FILE_READ_DATA : constant := 16#0001#;
+ FILE_READ_EA : constant := 16#0008#;
+ FILE_TRAVERSE : constant := 16#0020#;
+ FILE_WRITE_ATTRIBUTES : constant := 16#0100#;
+ FILE_WRITE_DATA : constant := 16#0002#;
+ FILE_WRITE_EA : constant := 16#0010#;
+ STANDARD_RIGHTS_READ : constant := 16#20000#;
+ STANDARD_RIGHTS_WRITE : constant := 16#20000#;
+ SYNCHRONIZE : constant := 16#100000#;
FILE_ATTRIBUTE_READONLY : constant := 16#00000001#;
FILE_ATTRIBUTE_HIDDEN : constant := 16#00000002#;
@@ -159,6 +161,16 @@ package System.Win32 is
bInheritHandle : BOOL;
end record;
+ function CreateFileA
+ (lpFileName : Address;
+ dwDesiredAccess : DWORD;
+ dwShareMode : DWORD;
+ lpSecurityAttributes : access SECURITY_ATTRIBUTES;
+ dwCreationDisposition : DWORD;
+ dwFlagsAndAttributes : DWORD;
+ hTemplateFile : HANDLE) return HANDLE;
+ pragma Import (Stdcall, CreateFileA, "CreateFileA");
+
function CreateFile
(lpFileName : Address;
dwDesiredAccess : DWORD;
@@ -167,7 +179,7 @@ package System.Win32 is
dwCreationDisposition : DWORD;
dwFlagsAndAttributes : DWORD;
hTemplateFile : HANDLE) return HANDLE;
- pragma Import (Stdcall, CreateFile, "CreateFileA");
+ pragma Import (Stdcall, CreateFile, "CreateFileW");
function GetFileSize
(hFile : HANDLE;
@@ -220,6 +232,15 @@ package System.Win32 is
function UnmapViewOfFile (lpBaseAddress : System.Address) return BOOL;
pragma Import (Stdcall, UnmapViewOfFile, "UnmapViewOfFile");
+ function MultiByteToWideChar
+ (CodePage : WORD;
+ dwFlags : DWORD;
+ lpMultiByteStr : System.Address;
+ cchMultiByte : WORD;
+ lpWideCharStr : System.Address;
+ cchWideChar : WORD) return BOOL;
+ pragma Import (Stdcall, MultiByteToWideChar, "MultiByteToWideChar");
+
------------------------
-- System Information --
------------------------
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 2bf6143d9f0..38f45a85059 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -1557,7 +1557,17 @@ package body Sem_Attr is
-- Check restriction violations
- Check_Restriction (No_Streams, P);
+ -- First check the No_Streams restriction, which prohibits the use
+ -- of explicit stream attributes in the source program. We do not
+ -- prevent the occurrence of stream attributes in generated code,
+ -- for instance those generated implicitly for dispatching purposes.
+
+ if Comes_From_Source (N) then
+ Check_Restriction (No_Streams, P);
+ end if;
+
+ -- Check special case of Exception_Id and Exception_Occurrence which
+ -- are not allowed for restriction No_Exception_Regstriation.
if Is_RTE (P_Type, RE_Exception_Id)
or else
@@ -2049,6 +2059,23 @@ package body Sem_Attr is
Error_Attr_P
("prefix of % attribute cannot be Inline_Always" &
" subprogram");
+
+ -- It is illegal to apply 'Address to an intrinsic
+ -- subprogram. This is now formalized in AI05-0095.
+ -- In an instance, an attempt to obtain 'Address of an
+ -- intrinsic subprogram (e.g the renaming of a predefined
+ -- operator that is an actual) raises Program_Error.
+
+ elsif Convention (Ent) = Convention_Intrinsic then
+ if In_Instance then
+ Rewrite (N,
+ Make_Raise_Program_Error (Loc,
+ Reason => PE_Address_Of_Intrinsic));
+
+ else
+ Error_Msg_N
+ ("cannot take Address of intrinsic subprogram", N);
+ end if;
end if;
elsif Is_Object (Ent)
diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb
index 7afd0d3f718..5de995d984b 100644
--- a/gcc/ada/sem_case.adb
+++ b/gcc/ada/sem_case.adb
@@ -313,26 +313,11 @@ package body Sem_Case is
-- the pos value passed as an argument to Choice_Image.
Get_Name_String (Chars (First_Subtype (Ctype)));
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := ''';
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := 'v';
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := 'a';
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := 'l';
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := '(';
+ Add_Str_To_Name_Buffer ("'val(");
UI_Image (Value);
-
- for J in 1 .. UI_Image_Length loop
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := UI_Image_Buffer (J);
- end loop;
-
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := ')';
+ Add_Str_To_Name_Buffer (UI_Image_Buffer (1 .. UI_Image_Length));
+ Add_Char_To_Name_Buffer (')');
return Name_Find;
end Choice_Image;
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index a5a25fd8a79..b72c1d291cb 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -2405,6 +2405,8 @@ package body Sem_Ch10 is
Set_Entity_With_Style_Check (Name (N), E_Name);
Generate_Reference (E_Name, Name (N), 'w', Set_Ref => False);
+ -- Generate references and check No_Dependence restriction for parents
+
if Is_Child_Unit (E_Name) then
Pref := Prefix (Name (N));
Par_Name := Scope (E_Name);
@@ -2413,6 +2415,7 @@ package body Sem_Ch10 is
Set_Entity_With_Style_Check (Pref, Par_Name);
Generate_Reference (Par_Name, Pref);
+ Check_Restriction_No_Dependence (Pref, N);
Pref := Prefix (Pref);
-- If E_Name is the dummy entity for a nonexistent unit, its scope
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index b8e5d888355..8902d0d546b 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -681,6 +681,19 @@ package body Sem_Ch12 is
-- this field overlaps Entity, which is fine, because the whole point is
-- that we don't need or want the normal Entity field in this situation.
+ procedure Map_Formal_Package_Entities (Form : Entity_Id; Act : Entity_Id);
+ -- Within the generic part, entities in the formal package are
+ -- visible. To validate subsequent type declarations, indicate
+ -- the correspondence between the entities in the analyzed formal,
+ -- and the entities in the actual package. There are three packages
+ -- involved in the instantiation of a formal package: the parent
+ -- generic P1 which appears in the generic declaration, the fake
+ -- instantiation P2 which appears in the analyzed generic, and whose
+ -- visible entities may be used in subsequent formals, and the actual
+ -- P3 in the instance. To validate subsequent formals, me indicate
+ -- that the entities in P2 are mapped into those of P3. The mapping of
+ -- entities has to be done recursively for nested packages.
+
procedure Move_Freeze_Nodes
(Out_Of : Entity_Id;
After : Node_Id;
@@ -2952,11 +2965,37 @@ package body Sem_Ch12 is
Init_Env;
Env_Installed := True;
+
+ -- Reset renaming map for formal types. The mapping is established
+ -- when analyzing the generic associations, but some mappings are
+ -- inherited from formal packages of parent units, and these are
+ -- constructed when the parents are installed.
+
+ Generic_Renamings.Set_Last (0);
+ Generic_Renamings_HTable.Reset;
+
Check_Generic_Child_Unit (Gen_Id, Parent_Installed);
Gen_Unit := Entity (Gen_Id);
-- Verify that it is the name of a generic package
+ -- A visibility glitch: if the instance is a child unit and the generic
+ -- is the generic unit of a parent instance (i.e. both the parent and
+ -- the child units are instances of the same package) the name now
+ -- denotes the renaming within the parent, not the intended generic
+ -- unit. See if there is a homonym that is the desired generic. The
+ -- renaming declaration must be visible inside the instance of the
+ -- child, but not when analyzing the name in the instantiation itself.
+
+ if Ekind (Gen_Unit) = E_Package
+ and then Present (Renamed_Entity (Gen_Unit))
+ and then In_Open_Scopes (Renamed_Entity (Gen_Unit))
+ and then Is_Generic_Instance (Renamed_Entity (Gen_Unit))
+ and then Present (Homonym (Gen_Unit))
+ then
+ Gen_Unit := Homonym (Gen_Unit);
+ end if;
+
if Etype (Gen_Unit) = Any_Type then
Restore_Env;
return;
@@ -3036,9 +3075,6 @@ package body Sem_Ch12 is
-- validate an actual package, the instantiation environment is that
-- of the enclosing instance.
- Generic_Renamings.Set_Last (0);
- Generic_Renamings_HTable.Reset;
-
Create_Instantiation_Source (N, Gen_Unit, False, S_Adjustment);
-- Copy original generic tree, to produce text for instantiation
@@ -6145,6 +6181,7 @@ package body Sem_Ch12 is
function Is_Actual_Of_Previous_Formal (P : Entity_Id) return Boolean;
-- The package in question may be an actual for a previous formal
-- package P of the current instance, so examine its actuals as well.
+ -- This must be recursive over other formal packages.
----------------------------------
-- Is_Actual_Of_Previous_Formal --
@@ -6154,7 +6191,7 @@ package body Sem_Ch12 is
E1 : Entity_Id;
begin
- E1 := First_Entity (E);
+ E1 := First_Entity (P);
while Present (E1) and then E1 /= Instance loop
if Ekind (E1) = E_Package
and then Nkind (Parent (E1)) = N_Package_Renaming_Declaration
@@ -6162,8 +6199,13 @@ package body Sem_Ch12 is
if Renamed_Object (E1) = Pack then
return True;
- elsif Renamed_Object (E1) = P then
+ elsif E1 = P
+ or else Renamed_Object (E1) = P
+ then
return False;
+
+ elsif Is_Actual_Of_Previous_Formal (E1) then
+ return True;
end if;
end if;
@@ -7112,10 +7154,21 @@ package body Sem_Ch12 is
-----------------------------
procedure Install_Formal_Packages (Par : Entity_Id) is
- E : Entity_Id;
+ E : Entity_Id;
+ Gen : Entity_Id;
+ Gen_E : Entity_Id := Empty;
begin
E := First_Entity (Par);
+
+ -- In we are installing an instance parent, locate the formal packages
+ -- of its generic parent.
+
+ if Is_Generic_Instance (Par) then
+ Gen := Generic_Parent (Specification (Unit_Declaration_Node (Par)));
+ Gen_E := First_Entity (Gen);
+ end if;
+
while Present (E) loop
if Ekind (E) = E_Package
and then Nkind (Parent (E)) = N_Package_Renaming_Declaration
@@ -7136,10 +7189,26 @@ package body Sem_Ch12 is
then
Check_Generic_Actuals (Renamed_Object (E), True);
Set_Is_Hidden (E, False);
+
+ -- Find formal package in generic unit that corresponds to
+ -- (instance of) formal package in instance.
+
+ while Present (Gen_E)
+ and then Chars (Gen_E) /= Chars (E)
+ loop
+ Next_Entity (Gen_E);
+ end loop;
+
+ if Present (Gen_E) then
+ Map_Formal_Package_Entities (Gen_E, E);
+ end if;
end if;
end if;
Next_Entity (E);
+ if Present (Gen_E) then
+ Next_Entity (Gen_E);
+ end if;
end loop;
end Install_Formal_Packages;
@@ -7374,19 +7443,6 @@ package body Sem_Ch12 is
-- original generic ancestor. In that case, we recognize that the
-- ultimate ancestor is the same by examining names and scopes.
- procedure Map_Entities (Form : Entity_Id; Act : Entity_Id);
- -- Within the generic part, entities in the formal package are
- -- visible. To validate subsequent type declarations, indicate
- -- the correspondence between the entities in the analyzed formal,
- -- and the entities in the actual package. There are three packages
- -- involved in the instantiation of a formal package: the parent
- -- generic P1 which appears in the generic declaration, the fake
- -- instantiation P2 which appears in the analyzed generic, and whose
- -- visible entities may be used in subsequent formals, and the actual
- -- P3 in the instance. To validate subsequent formals, me indicate
- -- that the entities in P2 are mapped into those of P3. The mapping of
- -- entities has to be done recursively for nested packages.
-
procedure Process_Nested_Formal (Formal : Entity_Id);
-- If the current formal is declared with a box, its own formals are
-- visible in the instance, as they were in the generic, and their
@@ -7567,65 +7623,6 @@ package body Sem_Ch12 is
end if;
end Is_Instance_Of;
- ------------------
- -- Map_Entities --
- ------------------
-
- procedure Map_Entities (Form : Entity_Id; Act : Entity_Id) is
- E1 : Entity_Id;
- E2 : Entity_Id;
-
- begin
- Set_Instance_Of (Form, Act);
-
- -- Traverse formal and actual package to map the corresponding
- -- entities. We skip over internal entities that may be generated
- -- during semantic analysis, and find the matching entities by
- -- name, given that they must appear in the same order.
-
- E1 := First_Entity (Form);
- E2 := First_Entity (Act);
- while Present (E1)
- and then E1 /= First_Private_Entity (Form)
- loop
- -- Could this test be a single condition???
- -- Seems like it could, and isn't FPE (Form) a constant anyway???
-
- if not Is_Internal (E1)
- and then Present (Parent (E1))
- and then not Is_Class_Wide_Type (E1)
- and then not Is_Internal_Name (Chars (E1))
- then
- while Present (E2)
- and then Chars (E2) /= Chars (E1)
- loop
- Next_Entity (E2);
- end loop;
-
- if No (E2) then
- exit;
- else
- Set_Instance_Of (E1, E2);
-
- if Is_Type (E1)
- and then Is_Tagged_Type (E2)
- then
- Set_Instance_Of
- (Class_Wide_Type (E1), Class_Wide_Type (E2));
- end if;
-
- if Ekind (E1) = E_Package
- and then No (Renamed_Object (E1))
- then
- Map_Entities (E1, E2);
- end if;
- end if;
- end if;
-
- Next_Entity (E1);
- end loop;
- end Map_Entities;
-
---------------------------
-- Process_Nested_Formal --
---------------------------
@@ -7711,7 +7708,7 @@ package body Sem_Ch12 is
end if;
Set_Instance_Of (Defining_Identifier (Formal), Actual_Pack);
- Map_Entities (Formal_Pack, Actual_Pack);
+ Map_Formal_Package_Entities (Formal_Pack, Actual_Pack);
Nod :=
Make_Package_Renaming_Declaration (Loc,
@@ -8355,7 +8352,7 @@ package body Sem_Ch12 is
"with volatile actual", Actual);
end if;
- -- OUT not present
+ -- formal in-parameter
else
-- The instantiation of a generic formal in-parameter is constant
@@ -8403,11 +8400,15 @@ package body Sem_Ch12 is
end if;
declare
- Typ : constant Entity_Id :=
- Get_Instance_Of
- (Etype (Defining_Identifier (Analyzed_Formal)));
+ Formal_Object : constant Entity_Id :=
+ Defining_Identifier (Analyzed_Formal);
+ Formal_Type : constant Entity_Id := Etype (Formal_Object);
+
+ Typ : Entity_Id;
begin
+ Typ := Get_Instance_Of (Formal_Type);
+
Freeze_Before (Instantiation_Node, Typ);
-- If the actual is an aggregate, perform name resolution on
@@ -10699,6 +10700,70 @@ package body Sem_Ch12 is
end if;
end Load_Parent_Of_Generic;
+ ---------------------------------
+ -- Map_Formal_Package_Entities --
+ ---------------------------------
+
+ procedure Map_Formal_Package_Entities (Form : Entity_Id; Act : Entity_Id) is
+ E1 : Entity_Id;
+ E2 : Entity_Id;
+
+ begin
+ Set_Instance_Of (Form, Act);
+
+ -- Traverse formal and actual package to map the corresponding entities.
+ -- We skip over internal entities that may be generated during semantic
+ -- analysis, and find the matching entities by name, given that they
+ -- must appear in the same order.
+
+ E1 := First_Entity (Form);
+ E2 := First_Entity (Act);
+ while Present (E1)
+ and then E1 /= First_Private_Entity (Form)
+ loop
+ -- Could this test be a single condition???
+ -- Seems like it could, and isn't FPE (Form) a constant anyway???
+
+ if not Is_Internal (E1)
+ and then Present (Parent (E1))
+ and then not Is_Class_Wide_Type (E1)
+ and then not Is_Internal_Name (Chars (E1))
+ then
+ while Present (E2)
+ and then Chars (E2) /= Chars (E1)
+ loop
+ Next_Entity (E2);
+ end loop;
+
+ if No (E2) then
+ exit;
+ else
+ Set_Instance_Of (E1, E2);
+
+ if Is_Type (E1)
+ and then Is_Tagged_Type (E2)
+ then
+ Set_Instance_Of
+ (Class_Wide_Type (E1), Class_Wide_Type (E2));
+ end if;
+
+ if Is_Constrained (E1) then
+ Set_Instance_Of
+ (Base_Type (E1), Base_Type (E2));
+ end if;
+
+ if Ekind (E1) = E_Package
+ and then No (Renamed_Object (E1))
+ then
+ Map_Formal_Package_Entities (E1, E2);
+ end if;
+ end if;
+ end if;
+
+ Next_Entity (E1);
+ end loop;
+ end Map_Formal_Package_Entities;
+
-----------------------
-- Move_Freeze_Nodes --
-----------------------
@@ -10714,8 +10779,8 @@ package body Sem_Ch12 is
Spec : Node_Id;
function Is_Outer_Type (T : Entity_Id) return Boolean;
- -- Check whether entity is declared in a scope external to that
- -- of the generic unit.
+ -- Check whether entity is declared in a scope external to that of the
+ -- generic unit.
-------------------
-- Is_Outer_Type --
@@ -10823,8 +10888,32 @@ package body Sem_Ch12 is
Act : Node_Id;
Errs : constant Int := Serious_Errors_Detected;
+ Cur : Entity_Id := Empty;
+ -- Current homograph of the instance name
+
+ Vis : Boolean;
+ -- Saved visibility status of the current homograph
+
begin
Assoc := First (Generic_Associations (N));
+
+ -- If the instance is a child unit, its name may hide an outer homonym,
+ -- so make it invisible to perform name resolution on the actuals.
+
+ if Nkind (Defining_Unit_Name (N)) = N_Defining_Program_Unit_Name
+ and then Present
+ (Current_Entity (Defining_Identifier (Defining_Unit_Name (N))))
+ then
+ Cur := Current_Entity (Defining_Identifier (Defining_Unit_Name (N)));
+
+ if Is_Compilation_Unit (Cur) then
+ Vis := Is_Immediately_Visible (Cur);
+ Set_Is_Immediately_Visible (Cur, False);
+ else
+ Cur := Empty;
+ end if;
+ end if;
+
while Present (Assoc) loop
if Nkind (Assoc) /= N_Others_Choice then
Act := Explicit_Generic_Actual_Parameter (Assoc);
@@ -10859,8 +10948,8 @@ package body Sem_Ch12 is
if Nkind (Expr) = N_Subtype_Indication then
Analyze (Subtype_Mark (Expr));
- -- Analyze separately each discriminant constraint,
- -- when given with a named association.
+ -- Analyze separately each discriminant constraint, when
+ -- given with a named association.
declare
Constr : Node_Id;
@@ -10902,12 +10991,26 @@ package body Sem_Ch12 is
Set_Is_Instantiated (Entity (Name (N)));
end if;
+ if Present (Cur) then
+
+ -- For the case of a child instance hiding an outer homonym,
+ -- provide additional warning which might explain the error.
+
+ Set_Is_Immediately_Visible (Cur, Vis);
+ Error_Msg_NE ("& hides outer unit with the same name?",
+ N, Defining_Unit_Name (N));
+ end if;
+
Abandon_Instantiation (Act);
end if;
end if;
Next (Assoc);
end loop;
+
+ if Present (Cur) then
+ Set_Is_Immediately_Visible (Cur, Vis);
+ end if;
end Preanalyze_Actuals;
-------------------
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 47ffb42384f..b5a3c6bdbfa 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -121,10 +121,14 @@ package body Sem_Ch13 is
-- processing is to take advantage of back-annotations of size and
-- alignment values performed by the back end.
+ -- Note: the reason we store a Source_Ptr value instead of a Node_Id
+ -- is that by the time Validate_Unchecked_Conversions is called, Sprint
+ -- will already have modified all Sloc values if the -gnatD option is set.
+
type UC_Entry is record
- Enode : Node_Id; -- node used for posting warnings
- Source : Entity_Id; -- source type for unchecked conversion
- Target : Entity_Id; -- target type for unchecked conversion
+ Eloc : Source_Ptr; -- node used for posting warnings
+ Source : Entity_Id; -- source type for unchecked conversion
+ Target : Entity_Id; -- target type for unchecked conversion
end record;
package Unchecked_Conversions is new Table.Table (
@@ -4398,7 +4402,7 @@ package body Sem_Ch13 is
if Warn_On_Unchecked_Conversion then
Unchecked_Conversions.Append
(New_Val => UC_Entry'
- (Enode => N,
+ (Eloc => Sloc (N),
Source => Source,
Target => Target));
@@ -4455,9 +4459,9 @@ package body Sem_Ch13 is
declare
T : UC_Entry renames Unchecked_Conversions.Table (N);
- Enode : constant Node_Id := T.Enode;
- Source : constant Entity_Id := T.Source;
- Target : constant Entity_Id := T.Target;
+ Eloc : constant Source_Ptr := T.Eloc;
+ Source : constant Entity_Id := T.Source;
+ Target : constant Entity_Id := T.Target;
Source_Siz : Uint;
Target_Siz : Uint;
@@ -4472,22 +4476,29 @@ package body Sem_Ch13 is
if Serious_Errors_Detected = 0
and then Known_Static_RM_Size (Source)
and then Known_Static_RM_Size (Target)
+
+ -- Don't do the check if warnings off for either type, note the
+ -- deliberate use of OR here instead of OR ELSE to get the flag
+ -- Warnings_Off_Used set for both types if appropriate.
+
+ and then not (Has_Warnings_Off (Source)
+ or
+ Has_Warnings_Off (Target))
then
Source_Siz := RM_Size (Source);
Target_Siz := RM_Size (Target);
if Source_Siz /= Target_Siz then
- Error_Msg_N
+ Error_Msg
("?types for unchecked conversion have different sizes!",
- Enode);
+ Eloc);
if All_Errors_Mode then
Error_Msg_Name_1 := Chars (Source);
Error_Msg_Uint_1 := Source_Siz;
Error_Msg_Name_2 := Chars (Target);
Error_Msg_Uint_2 := Target_Siz;
- Error_Msg_N
- ("\size of % is ^, size of % is ^?", Enode);
+ Error_Msg ("\size of % is ^, size of % is ^?", Eloc);
Error_Msg_Uint_1 := UI_Abs (Source_Siz - Target_Siz);
@@ -4495,46 +4506,46 @@ package body Sem_Ch13 is
and then Is_Discrete_Type (Target)
then
if Source_Siz > Target_Siz then
- Error_Msg_N
+ Error_Msg
("\?^ high order bits of source will be ignored!",
- Enode);
+ Eloc);
elsif Is_Unsigned_Type (Source) then
- Error_Msg_N
+ Error_Msg
("\?source will be extended with ^ high order " &
- "zero bits?!", Enode);
+ "zero bits?!", Eloc);
else
- Error_Msg_N
+ Error_Msg
("\?source will be extended with ^ high order " &
"sign bits!",
- Enode);
+ Eloc);
end if;
elsif Source_Siz < Target_Siz then
if Is_Discrete_Type (Target) then
if Bytes_Big_Endian then
- Error_Msg_N
+ Error_Msg
("\?target value will include ^ undefined " &
"low order bits!",
- Enode);
+ Eloc);
else
- Error_Msg_N
+ Error_Msg
("\?target value will include ^ undefined " &
"high order bits!",
- Enode);
+ Eloc);
end if;
else
- Error_Msg_N
+ Error_Msg
("\?^ trailing bits of target value will be " &
- "undefined!", Enode);
+ "undefined!", Eloc);
end if;
else pragma Assert (Source_Siz > Target_Siz);
- Error_Msg_N
+ Error_Msg
("\?^ trailing bits of source will be ignored!",
- Enode);
+ Eloc);
end if;
end if;
end if;
@@ -4565,19 +4576,31 @@ package body Sem_Ch13 is
begin
if Source_Align < Target_Align
and then not Is_Tagged_Type (D_Source)
+
+ -- Suppress warning if warnings suppressed on either
+ -- type or either designated type. Note the use of
+ -- OR here instead of OR ELSE. That is intentional,
+ -- we would like to set flag Warnings_Off_Used in
+ -- all types for which warnings are suppressed.
+
+ and then not (Has_Warnings_Off (D_Source)
+ or
+ Has_Warnings_Off (D_Target)
+ or
+ Has_Warnings_Off (Source)
+ or
+ Has_Warnings_Off (Target))
then
Error_Msg_Uint_1 := Target_Align;
Error_Msg_Uint_2 := Source_Align;
+ Error_Msg_Node_1 := D_Target;
Error_Msg_Node_2 := D_Source;
- Error_Msg_NE
+ Error_Msg
("?alignment of & (^) is stricter than " &
- "alignment of & (^)!", Enode, D_Target);
-
- if All_Errors_Mode then
- Error_Msg_N
- ("\?resulting access value may have invalid " &
- "alignment!", Enode);
- end if;
+ "alignment of & (^)!", Eloc);
+ Error_Msg
+ ("\?resulting access value may have invalid " &
+ "alignment!", Eloc);
end if;
end;
end if;
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 8f3c75ef70e..e80c6626a3b 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -993,9 +993,9 @@ package body Sem_Ch3 is
is
procedure Check_For_Premature_Usage (Def : Node_Id);
- -- Check that type T_Name is not used, directly or recursively,
- -- as a parameter or a return type in Def. Def is either a subtype,
- -- an access_definition, or an access_to_subprogram_definition.
+ -- Check that type T_Name is not used, directly or recursively, as a
+ -- parameter or a return type in Def. Def is either a subtype, an
+ -- access_definition, or an access_to_subprogram_definition.
-------------------------------
-- Check_For_Premature_Usage --
@@ -1135,7 +1135,27 @@ package body Sem_Ch3 is
(T => Typ,
Related_Nod => T_Def,
Scope_Id => Current_Scope));
+
else
+ if From_With_Type (Typ) then
+ Error_Msg_NE
+ ("illegal use of incomplete type&",
+ Result_Definition (T_Def), Typ);
+
+ elsif Ekind (Current_Scope) = E_Package
+ and then In_Private_Part (Current_Scope)
+ then
+ if Ekind (Typ) = E_Incomplete_Type then
+ Append_Elmt (Desig_Type, Private_Dependents (Typ));
+
+ elsif Is_Class_Wide_Type (Typ)
+ and then Ekind (Etype (Typ)) = E_Incomplete_Type
+ then
+ Append_Elmt
+ (Desig_Type, Private_Dependents (Etype (Typ)));
+ end if;
+ end if;
+
Set_Etype (Desig_Type, Typ);
end if;
end;
@@ -3326,6 +3346,21 @@ package body Sem_Ch3 is
end if;
end if;
+ -- A consequence of 3.9.4 (6/2) and 7.3 (7.2/2) is that a private
+ -- extension with a synchronized parent must be explicitly declared
+ -- synchronized, because the full view will be a synchronized type.
+ -- This must be checked before the check for limited types below,
+ -- to ensure that types declared limited are not allowed to extend
+ -- synchronized interfaces.
+
+ elsif Is_Interface (Parent_Type)
+ and then Is_Synchronized_Interface (Parent_Type)
+ and then not Synchronized_Present (N)
+ then
+ Error_Msg_NE
+ ("private extension of& must be explicitly synchronized",
+ N, Parent_Type);
+
elsif Limited_Present (N) then
Set_Is_Limited_Record (T);
@@ -3337,18 +3372,6 @@ package body Sem_Ch3 is
Error_Msg_NE ("parent type& of limited extension must be limited",
N, Parent_Type);
end if;
-
- -- A consequence of 3.9.4 (6/2) and 7.3 (2.2/2) is that a private
- -- extension with a synchronized parent must be explicitly declared
- -- synchronized, because the full view will be a synchronized type.
-
- elsif Is_Interface (Parent_Type)
- and then Is_Synchronized_Interface (Parent_Type)
- and then not Synchronized_Present (N)
- then
- Error_Msg_NE
- ("private extension of& must be explicitly synchronized",
- N, Parent_Type);
end if;
end Analyze_Private_Extension_Declaration;
@@ -3583,11 +3606,13 @@ package body Sem_Ch3 is
-- A Pure library_item must not contain the declaration of a
-- named access type, except within a subprogram, generic
- -- subprogram, task unit, or protected unit (RM 10.2.1(16)).
+ -- subprogram, task unit, or protected unit, or if it has
+ -- a specified Storage_Size of zero (RM05-10.2.1(15.4-15.5)).
if Comes_From_Source (Id)
and then In_Pure_Unit
and then not In_Subprogram_Task_Protected_Unit
+ and then not No_Pool_Assigned (Id)
then
Error_Msg_N
("named access types not allowed in pure unit", N);
@@ -4009,7 +4034,12 @@ package body Sem_Ch3 is
-- subtype. Freeze_Entity will use this preallocated freeze node when
-- it freezes the entity.
- if B /= T then
+ -- This does not apply if the base type is a generic type, whose
+ -- declaration is independent of the current derived definition.
+
+ if B /= T
+ and then not Is_Generic_Type (B)
+ then
Ensure_Freeze_Node (B);
Set_First_Subtype_Link (Freeze_Node (B), T);
end if;
@@ -5030,22 +5060,35 @@ package body Sem_Ch3 is
Hi : Node_Id;
begin
- Lo :=
- Make_Attribute_Reference (Loc,
- Attribute_Name => Name_First,
- Prefix => New_Reference_To (Derived_Type, Loc));
- Set_Etype (Lo, Derived_Type);
+ if Nkind (Indic) /= N_Subtype_Indication then
+ Lo :=
+ Make_Attribute_Reference (Loc,
+ Attribute_Name => Name_First,
+ Prefix => New_Reference_To (Derived_Type, Loc));
+ Set_Etype (Lo, Derived_Type);
+
+ Hi :=
+ Make_Attribute_Reference (Loc,
+ Attribute_Name => Name_Last,
+ Prefix => New_Reference_To (Derived_Type, Loc));
+ Set_Etype (Hi, Derived_Type);
+
+ Set_Scalar_Range (Derived_Type,
+ Make_Range (Loc,
+ Low_Bound => Lo,
+ High_Bound => Hi));
+ else
- Hi :=
- Make_Attribute_Reference (Loc,
- Attribute_Name => Name_Last,
- Prefix => New_Reference_To (Derived_Type, Loc));
- Set_Etype (Hi, Derived_Type);
-
- Set_Scalar_Range (Derived_Type,
- Make_Range (Loc,
- Low_Bound => Lo,
- High_Bound => Hi));
+ -- Analyze subtype indication and verify compatibility
+ -- with parent type.
+
+ if Base_Type (Process_Subtype (Indic, N)) /=
+ Base_Type (Parent_Type)
+ then
+ Error_Msg_N
+ ("illegal constraint for formal discrete type", N);
+ end if;
+ end if;
end;
else
@@ -5437,6 +5480,7 @@ package body Sem_Ch3 is
Is_Completion : Boolean;
Derive_Subps : Boolean := True)
is
+ Loc : constant Source_Ptr := Sloc (N);
Der_Base : Entity_Id;
Discr : Entity_Id;
Full_Decl : Node_Id := Empty;
@@ -5479,8 +5523,70 @@ package body Sem_Ch3 is
begin
if Is_Tagged_Type (Parent_Type) then
- Build_Derived_Record_Type
- (N, Parent_Type, Derived_Type, Derive_Subps);
+
+ -- A type extension of a type with unknown discriminants is an
+ -- indefinite type that the back-end cannot handle directly.
+ -- We treat it as a private type, and build a completion that is
+ -- derived from the full view of the parent, and hopefully has
+ -- known discriminants. The implementation of more complex chains
+ -- of derivation with unknown discriminants is left to the more
+ -- enterprising reader.
+
+ if Has_Unknown_Discriminants (Parent_Type)
+ and then Present (Full_View (Parent_Type))
+ and then not In_Open_Scopes (Par_Scope)
+ and then not Is_Completion
+ and then Expander_Active
+ then
+ declare
+ Full_Der : constant Entity_Id :=
+ Make_Defining_Identifier (Loc,
+ Chars => New_Internal_Name ('T'));
+ Decl : Node_Id;
+ New_Ext : constant Node_Id :=
+ Copy_Separate_Tree
+ (Record_Extension_Part (Type_Definition (N)));
+
+ begin
+ Build_Derived_Record_Type
+ (N, Parent_Type, Derived_Type, Derive_Subps);
+
+ -- Build anonymous completion, as a derivation from the full
+ -- view of the parent.
+
+ Decl :=
+ Make_Full_Type_Declaration (Loc,
+ Defining_Identifier => Full_Der,
+ Type_Definition =>
+ Make_Derived_Type_Definition (Loc,
+ Subtype_Indication =>
+ New_Copy_Tree
+ (Subtype_Indication (Type_Definition (N))),
+ Record_Extension_Part => New_Ext));
+ Set_Has_Private_Declaration (Full_Der);
+ Set_Has_Private_Declaration (Derived_Type);
+
+ Install_Private_Declarations (Par_Scope);
+ Install_Visible_Declarations (Par_Scope);
+ Insert_Before (N, Decl);
+ Analyze (Decl);
+ Uninstall_Declarations (Par_Scope);
+
+ -- Freeze the underlying record view, to prevent generation
+ -- of useless dispatching information, which is simply shared
+ -- with the real derived type.
+
+ Set_Is_Frozen (Full_Der);
+ Set_Underlying_Record_View (Derived_Type, Full_Der);
+ end;
+
+ -- if discriminants are known, build derived record
+
+ else
+ Build_Derived_Record_Type
+ (N, Parent_Type, Derived_Type, Derive_Subps);
+ end if;
+
return;
elsif Has_Discriminants (Parent_Type) then
@@ -5513,8 +5619,8 @@ package body Sem_Ch3 is
Build_Underlying_Full_View (N, Derived_Type, Parent_Type);
elsif Is_Constrained (Full_View (Parent_Type)) then
- Set_Underlying_Full_View (Derived_Type,
- Full_View (Parent_Type));
+ Set_Underlying_Full_View
+ (Derived_Type, Full_View (Parent_Type));
end if;
else
@@ -7227,10 +7333,11 @@ package body Sem_Ch3 is
Set_Etype (Derived_Type, Parent_Base);
Set_Has_Task (Derived_Type, Has_Task (Parent_Base));
- Set_Size_Info (Derived_Type, Parent_Type);
- Set_RM_Size (Derived_Type, RM_Size (Parent_Type));
- Set_Convention (Derived_Type, Convention (Parent_Type));
- Set_Is_Controlled (Derived_Type, Is_Controlled (Parent_Type));
+ Set_Size_Info (Derived_Type, Parent_Type);
+ Set_RM_Size (Derived_Type, RM_Size (Parent_Type));
+ Set_Convention (Derived_Type, Convention (Parent_Type));
+ Set_Is_Controlled (Derived_Type, Is_Controlled (Parent_Type));
+ Set_Is_Tagged_Type (Derived_Type, Is_Tagged_Type (Parent_Type));
-- The derived type inherits the representation clauses of the parent.
-- However, for a private type that is completed by a derivation, there
@@ -8712,6 +8819,33 @@ package body Sem_Ch3 is
Is_Protected := True;
end if;
+ if Is_Synchronized_Interface (Iface_Id) then
+
+ -- A consequence of 3.9.4 (6/2) and 7.3 (7.2/2) is that a private
+ -- extension derived from a synchronized interface must explicitly
+ -- be declared synchronized, because the full view will be a
+ -- synchronized type.
+
+ if Nkind (N) = N_Private_Extension_Declaration then
+ if not Synchronized_Present (N) then
+ Error_Msg_NE
+ ("private extension of& must be explicitly synchronized",
+ N, Iface_Id);
+ end if;
+
+ -- However, by 3.9.4(16/2), a full type that is a record extension
+ -- is never allowed to derive from a synchronized interface (note
+ -- that interfaces must be excluded from this check, because those
+ -- are represented by derived type definitions in some cases).
+
+ elsif Nkind (Type_Definition (N)) = N_Derived_Type_Definition
+ and then not Interface_Present (Type_Definition (N))
+ then
+ Error_Msg_N ("record extension cannot derive from synchronized"
+ & " interface", Error_Node);
+ end if;
+ end if;
+
-- Check that the characteristics of the progenitor are compatible
-- with the explicit qualifier in the declaration.
-- The check only applies to qualifiers that come from source.
@@ -13472,6 +13606,9 @@ package body Sem_Ch3 is
Error_Msg_NE (
"full declaration of } must be a record extension",
Prev, Id);
+
+ -- Set some attributes to produce a usable full view
+
Set_Is_Tagged_Type (Id);
Set_Primitive_Operations (Id, New_Elmt_List);
end if;
@@ -16819,6 +16956,10 @@ package body Sem_Ch3 is
E_Incomplete_Type =>
Constrain_Discriminated_Type (Def_Id, S, Related_Nod);
+ if Ekind (Def_Id) = E_Incomplete_Type then
+ Set_Private_Dependents (Def_Id, New_Elmt_List);
+ end if;
+
when Private_Kind =>
Constrain_Discriminated_Type (Def_Id, S, Related_Nod);
Set_Private_Dependents (Def_Id, New_Elmt_List);
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index e9a20c5a70d..e572f56905b 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -127,10 +127,10 @@ package body Sem_Ch4 is
procedure Check_Misspelled_Selector
(Prefix : Entity_Id;
Sel : Node_Id);
- -- Give possible misspelling diagnostic if Sel is likely to be
- -- a misspelling of one of the selectors of the Prefix.
- -- This is called by Analyze_Selected_Component after producing
- -- an invalid selector error message.
+ -- Give possible misspelling diagnostic if Sel is likely to be a mis-
+ -- spelling of one of the selectors of the Prefix. This is called by
+ -- Analyze_Selected_Component after producing an invalid selector error
+ -- message.
function Defined_In_Scope (T : Entity_Id; S : Entity_Id) return Boolean;
-- Verify that type T is declared in scope S. Used to find interpretations
@@ -4697,17 +4697,19 @@ package body Sem_Ch4 is
Scop : Entity_Id := Empty;
procedure Try_One_Interp (T1 : Entity_Id);
- -- The context of the operator plays no role in resolving the
- -- arguments, so that if there is more than one interpretation
- -- of the operands that is compatible with equality, the construct
- -- is ambiguous and an error can be emitted now, after trying to
- -- disambiguate, i.e. applying preference rules.
+ -- The context of the equality operator plays no role in resolving the
+ -- arguments, so that if there is more than one interpretation of the
+ -- operands that is compatible with equality, the construct is ambiguous
+ -- and an error can be emitted now, after trying to disambiguate, i.e.
+ -- applying preference rules.
--------------------
-- Try_One_Interp --
--------------------
procedure Try_One_Interp (T1 : Entity_Id) is
+ Bas : constant Entity_Id := Base_Type (T1);
+
begin
-- If the operator is an expanded name, then the type of the operand
-- must be defined in the corresponding scope. If the type is
@@ -4725,7 +4727,7 @@ package body Sem_Ch4 is
or else T1 = Any_String
or else T1 = Any_Composite
or else (Ekind (T1) = E_Access_Subprogram_Type
- and then not Comes_From_Source (T1))
+ and then not Comes_From_Source (T1))
then
null;
@@ -4739,6 +4741,32 @@ package body Sem_Ch4 is
return;
end if;
+
+ -- If we have infix notation, the operator must be usable.
+ -- Within an instance, if the type is already established we
+ -- know it is correct.
+ -- In Ada 2005, the equality on anonymous access types is declared
+ -- in Standard, and is always visible.
+
+ elsif In_Open_Scopes (Scope (Bas))
+ or else Is_Potentially_Use_Visible (Bas)
+ or else In_Use (Bas)
+ or else (In_Use (Scope (Bas))
+ and then not Is_Hidden (Bas))
+ or else (In_Instance
+ and then First_Subtype (T1) = First_Subtype (Etype (R)))
+ or else Ekind (T1) = E_Anonymous_Access_Type
+ then
+ null;
+
+ else
+ -- Save candidate type for subsquent error message, if any
+
+ if not Is_Limited_Type (T1) then
+ Candidate_Type := T1;
+ end if;
+
+ return;
end if;
-- Ada 2005 (AI-230): Keep restriction imposed by Ada 83 and 95:
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 6a387d6fc31..5cf092c9917 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -2031,7 +2031,13 @@ package body Sem_Ch5 is
Process_End_Label (Loop_Statement, 'e', Ent);
End_Scope;
Kill_Current_Values;
- Check_Infinite_Loop_Warning (N);
+
+ -- Check for infinite loop. We skip this check for generated code, since
+ -- it justs waste time and makes debugging the routine called harder.
+
+ if Comes_From_Source (N) then
+ Check_Infinite_Loop_Warning (N);
+ end if;
-- Code after loop is unreachable if the loop has no WHILE or FOR
-- and contains no EXIT statements within the body of the loop.
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index c206c4b3eba..c51f8435fd4 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -47,6 +47,8 @@ with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
with Output; use Output;
+with Restrict; use Restrict;
+with Rident; use Rident;
with Rtsfind; use Rtsfind;
with Sem; use Sem;
with Sem_Aux; use Sem_Aux;
@@ -107,6 +109,9 @@ package body Sem_Ch6 is
-- specification, in a context where the formals are visible and hide
-- outer homographs.
+ procedure Analyze_Subprogram_Body_Helper (N : Node_Id);
+ -- Does all the real work of Analyze_Subprogram_Body
+
procedure Analyze_Generic_Subprogram_Body (N : Node_Id; Gen_Id : Entity_Id);
-- Analyze a generic subprogram body. N is the body to be analyzed, and
-- Gen_Id is the defining entity Id for the corresponding spec.
@@ -1326,8 +1331,8 @@ package body Sem_Ch6 is
and then
Ekind (Root_Type (Typ)) = E_Incomplete_Type)
then
- Error_Msg_N
- ("invalid use of incomplete type", Result_Definition (N));
+ Error_Msg_NE
+ ("invalid use of incomplete type&", Designator, Typ);
end if;
end if;
@@ -1342,12 +1347,48 @@ package body Sem_Ch6 is
-- Analyze_Subprogram_Body --
-----------------------------
+ procedure Analyze_Subprogram_Body (N : Node_Id) is
+ Loc : constant Source_Ptr := Sloc (N);
+ Body_Spec : constant Node_Id := Specification (N);
+ Body_Id : constant Entity_Id := Defining_Entity (Body_Spec);
+
+ begin
+ if Debug_Flag_C then
+ Write_Str ("==> subprogram body ");
+ Write_Name (Chars (Body_Id));
+ Write_Str (" from ");
+ Write_Location (Loc);
+ Write_Eol;
+ Indent;
+ end if;
+
+ Trace_Scope (N, Body_Id, " Analyze subprogram: ");
+
+ -- The real work is split out into the helper, so it can do "return;"
+ -- without skipping the debug output:
+
+ Analyze_Subprogram_Body_Helper (N);
+
+ if Debug_Flag_C then
+ Outdent;
+ Write_Str ("<== subprogram body ");
+ Write_Name (Chars (Body_Id));
+ Write_Str (" from ");
+ Write_Location (Loc);
+ Write_Eol;
+ end if;
+ end Analyze_Subprogram_Body;
+
+ ------------------------------------
+ -- Analyze_Subprogram_Body_Helper --
+ ------------------------------------
+
-- This procedure is called for regular subprogram bodies, generic bodies,
-- and for subprogram stubs of both kinds. In the case of stubs, only the
-- specification matters, and is used to create a proper declaration for
-- the subprogram, or to perform conformance checks.
- procedure Analyze_Subprogram_Body (N : Node_Id) is
+ procedure Analyze_Subprogram_Body_Helper (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Body_Deleted : constant Boolean := False;
Body_Spec : constant Node_Id := Specification (N);
@@ -1446,6 +1487,11 @@ package body Sem_Ch6 is
and then
Is_Limited_Record (Designated_Type (Etype (Scop)))))
and then Expander_Active
+
+ -- Avoid cases with no tasking support
+
+ and then RTE_Available (RE_Current_Master)
+ and then not Restriction_Active (No_Task_Hierarchy)
then
Decl :=
Make_Object_Declaration (Loc,
@@ -1766,10 +1812,12 @@ package body Sem_Ch6 is
("subprogram & overrides predefined operator ",
Body_Spec, Spec_Id);
- -- If this is not a primitive operation the overriding indicator
- -- is altogether illegal.
+ -- If this is not a primitive operation or protected subprogram,
+ -- then the overriding indicator is altogether illegal.
- elsif not Is_Primitive (Spec_Id) then
+ elsif not Is_Primitive (Spec_Id)
+ and then Ekind (Scope (Spec_Id)) /= E_Protected_Type
+ then
Error_Msg_N ("overriding indicator only allowed " &
"if subprogram is primitive",
Body_Spec);
@@ -1783,19 +1831,9 @@ package body Sem_Ch6 is
end if;
end Verify_Overriding_Indicator;
- -- Start of processing for Analyze_Subprogram_Body
+ -- Start of processing for Analyze_Subprogram_Body_Helper
begin
- if Debug_Flag_C then
- Write_Str ("==== Compiling subprogram body ");
- Write_Name (Chars (Body_Id));
- Write_Str (" from ");
- Write_Location (Loc);
- Write_Eol;
- end if;
-
- Trace_Scope (N, Body_Id, " Analyze subprogram: ");
-
-- Generic subprograms are handled separately. They always have a
-- generic specification. Determine whether current scope has a
-- previous declaration.
@@ -2556,7 +2594,7 @@ package body Sem_Ch6 is
Check_References (Body_Id);
end if;
end;
- end Analyze_Subprogram_Body;
+ end Analyze_Subprogram_Body_Helper;
------------------------------------
-- Analyze_Subprogram_Declaration --
@@ -2570,6 +2608,15 @@ package body Sem_Ch6 is
-- Start of processing for Analyze_Subprogram_Declaration
begin
+ if Debug_Flag_C then
+ Write_Str ("==> subprogram spec ");
+ Write_Name (Chars (Designator));
+ Write_Str (" from ");
+ Write_Location (Sloc (N));
+ Write_Eol;
+ Indent;
+ end if;
+
Generate_Definition (Designator);
-- Check for RCI unit subprogram declarations for illegal inlined
@@ -2583,14 +2630,6 @@ package body Sem_Ch6 is
Defining_Entity (N),
" Analyze subprogram spec: ");
- if Debug_Flag_C then
- Write_Str ("==== Compiling subprogram spec ");
- Write_Name (Chars (Designator));
- Write_Str (" from ");
- Write_Location (Sloc (N));
- Write_Eol;
- end if;
-
New_Overloaded_Entity (Designator);
Check_Delayed_Subprogram (Designator);
@@ -2710,6 +2749,15 @@ package body Sem_Ch6 is
("protected operation cannot be a null procedure", N);
end if;
end if;
+
+ if Debug_Flag_C then
+ Outdent;
+ Write_Str ("<== subprogram spec ");
+ Write_Name (Chars (Designator));
+ Write_Str (" from ");
+ Write_Location (Sloc (N));
+ Write_Eol;
+ end if;
end Analyze_Subprogram_Declaration;
--------------------------------------
@@ -3954,9 +4002,9 @@ package body Sem_Ch6 is
procedure Possible_Freeze (T : Entity_Id);
-- T is the type of either a formal parameter or of the return type.
-- If T is not yet frozen and needs a delayed freeze, then the
- -- subprogram itself must be delayed. If T is the limited view of
- -- of an incomplete type the subprogram must be frozen as well,
- -- because T may depend on local types that have not been frozen yet.
+ -- subprogram itself must be delayed. If T is the limited view of an
+ -- incomplete type the subprogram must be frozen as well, because
+ -- T may depend on local types that have not been frozen yet.
---------------------
-- Possible_Freeze --
@@ -3964,9 +4012,7 @@ package body Sem_Ch6 is
procedure Possible_Freeze (T : Entity_Id) is
begin
- if Has_Delayed_Freeze (T)
- and then not Is_Frozen (T)
- then
+ if Has_Delayed_Freeze (T) and then not Is_Frozen (T) then
Set_Has_Delayed_Freeze (Designator);
elsif Is_Access_Type (T)
@@ -3975,11 +4021,10 @@ package body Sem_Ch6 is
then
Set_Has_Delayed_Freeze (Designator);
- elsif Ekind (T) = E_Incomplete_Type
- and then From_With_Type (T)
- then
+ elsif Ekind (T) = E_Incomplete_Type and then From_With_Type (T) then
Set_Has_Delayed_Freeze (Designator);
end if;
+
end Possible_Freeze;
-- Start of processing for Check_Delayed_Subprogram
@@ -4284,14 +4329,15 @@ package body Sem_Ch6 is
Set_Is_Overriding_Operation (Subp);
end if;
- -- If primitive flag is set, operation is overriding at the
- -- point of its declaration, so warn if necessary. Otherwise
- -- it may have been declared before the operation it overrides
- -- and no check is required.
+ -- If primitive flag is set or this is a protected operation, then
+ -- the operation is overriding at the point of its declaration, so
+ -- warn if necessary. Otherwise it may have been declared before the
+ -- operation it overrides and no check is required.
if Style_Check
- and then not Must_Override (Spec)
- and then Is_Primitive
+ and then not Must_Override (Spec)
+ and then (Is_Primitive
+ or else Ekind (Scope (Subp)) = E_Protected_Type)
then
Style.Missing_Overriding (Decl, Subp);
end if;
@@ -4309,7 +4355,13 @@ package body Sem_Ch6 is
elsif Nkind (Subp) = N_Defining_Operator_Symbol then
if Must_Not_Override (Spec) then
- if not Is_Primitive then
+
+ -- If this is not a primitive operation or protected subprogram,
+ -- then "not overriding" is illegal.
+
+ if not Is_Primitive
+ and then Ekind (Scope (Subp)) /= E_Protected_Type
+ then
Error_Msg_N
("overriding indicator only allowed "
& "if subprogram is primitive", Subp);
@@ -7706,10 +7758,28 @@ package body Sem_Ch6 is
(Is_Class_Wide_Type (Formal_Type)
and then Is_Incomplete_Type (Root_Type (Formal_Type)))
then
- -- Ada 2005 (AI-326): Tagged incomplete types allowed
+ -- Ada 2005 (AI-326): Tagged incomplete types allowed in
+ -- primitive operations, as long as their completion is
+ -- in the same declarative part. If in the private part
+ -- this means that the type cannot be a Taft-amendment type.
+ -- Check is done on package exit. For access to subprograms,
+ -- the use is legal for Taft-amendment types.
if Is_Tagged_Type (Formal_Type) then
- null;
+ if Ekind (Scope (Current_Scope)) = E_Package
+ and then In_Private_Part (Scope (Current_Scope))
+ and then not From_With_Type (Formal_Type)
+ and then not Is_Class_Wide_Type (Formal_Type)
+ then
+ if not Nkind_In
+ (Parent (T), N_Access_Function_Definition,
+ N_Access_Procedure_Definition)
+ then
+ Append_Elmt
+ (Current_Scope,
+ Private_Dependents (Base_Type (Formal_Type)));
+ end if;
+ end if;
-- Special handling of Value_Type for CIL case
@@ -7719,15 +7789,13 @@ package body Sem_Ch6 is
elsif not Nkind_In (Parent (T), N_Access_Function_Definition,
N_Access_Procedure_Definition)
then
- Error_Msg_N ("invalid use of incomplete type", Param_Spec);
-
- -- An incomplete type that is not tagged is allowed in an
- -- access-to-subprogram type only if it is a local declaration
- -- with a forthcoming completion (3.10.1 (9.2/2)).
+ Error_Msg_NE
+ ("invalid use of incomplete type&",
+ Param_Spec, Formal_Type);
- elsif Scope (Formal_Type) /= Scope (Current_Scope) then
- Error_Msg_N
- ("invalid use of limited view of type", Param_Spec);
+ -- Further checks on the legality of incomplete types
+ -- in formal parts must be delayed until the freeze point
+ -- of the enclosing subprogram or access to subprogram.
end if;
elsif Ekind (Formal_Type) = E_Void then
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
index 7b9edd48e28..e344a5802db 100644
--- a/gcc/ada/sem_ch7.adb
+++ b/gcc/ada/sem_ch7.adb
@@ -25,8 +25,8 @@
-- This package contains the routines to process package specifications and
-- bodies. The most important semantic aspects of package processing are the
--- handling of private and full declarations, and the construction of
--- dispatch tables for tagged types.
+-- handling of private and full declarations, and the construction of dispatch
+-- tables for tagged types.
with Atree; use Atree;
with Debug; use Debug;
@@ -90,6 +90,9 @@ package body Sem_Ch7 is
-- Local Subprograms --
-----------------------
+ procedure Analyze_Package_Body_Helper (N : Node_Id);
+ -- Does all the real work of Analyze_Package_Body
+
procedure Check_Anonymous_Access_Types
(Spec_Id : Entity_Id;
P_Body : Node_Id);
@@ -102,9 +105,9 @@ package body Sem_Ch7 is
-- before other body declarations.
procedure Install_Package_Entity (Id : Entity_Id);
- -- Supporting procedure for Install_{Visible,Private}_Declarations.
- -- Places one entity on its visibility chain, and recurses on the visible
- -- part if the entity is an inner package.
+ -- Supporting procedure for Install_{Visible,Private}_Declarations. Places
+ -- one entity on its visibility chain, and recurses on the visible part if
+ -- the entity is an inner package.
function Is_Private_Base_Type (E : Entity_Id) return Boolean;
-- True for a private type that is not a subtype
@@ -135,7 +138,38 @@ package body Sem_Ch7 is
--------------------------
procedure Analyze_Package_Body (N : Node_Id) is
- Loc : constant Source_Ptr := Sloc (N);
+ Loc : constant Source_Ptr := Sloc (N);
+
+ begin
+ if Debug_Flag_C then
+ Write_Str ("==> package body ");
+ Write_Name (Chars (Defining_Entity (N)));
+ Write_Str (" from ");
+ Write_Location (Loc);
+ Write_Eol;
+ Indent;
+ end if;
+
+ -- The real work is split out into the helper, so it can do "return;"
+ -- without skipping the debug output.
+
+ Analyze_Package_Body_Helper (N);
+
+ if Debug_Flag_C then
+ Outdent;
+ Write_Str ("<== package body ");
+ Write_Name (Chars (Defining_Entity (N)));
+ Write_Str (" from ");
+ Write_Location (Loc);
+ Write_Eol;
+ end if;
+ end Analyze_Package_Body;
+
+ ---------------------------------
+ -- Analyze_Package_Body_Helper --
+ ---------------------------------
+
+ procedure Analyze_Package_Body_Helper (N : Node_Id) is
HSS : Node_Id;
Body_Id : Entity_Id;
Spec_Id : Entity_Id;
@@ -144,10 +178,10 @@ package body Sem_Ch7 is
Pack_Decl : Node_Id;
procedure Install_Composite_Operations (P : Entity_Id);
- -- Composite types declared in the current scope may depend on
- -- types that were private at the point of declaration, and whose
- -- full view is now in scope. Indicate that the corresponding
- -- operations on the composite type are available.
+ -- Composite types declared in the current scope may depend on types
+ -- that were private at the point of declaration, and whose full view
+ -- is now in scope. Indicate that the corresponding operations on the
+ -- composite type are available.
----------------------------------
-- Install_Composite_Operations --
@@ -172,33 +206,25 @@ package body Sem_Ch7 is
end loop;
end Install_Composite_Operations;
- -- Start of processing for Analyze_Package_Body
+ -- Start of processing for Analyze_Package_Body_Helper
begin
- -- Find corresponding package specification, and establish the
- -- current scope. The visible defining entity for the package is the
- -- defining occurrence in the spec. On exit from the package body, all
- -- body declarations are attached to the defining entity for the body,
- -- but the later is never used for name resolution. In this fashion
- -- there is only one visible entity that denotes the package.
-
- if Debug_Flag_C then
- Write_Str ("==== Compiling package body ");
- Write_Name (Chars (Defining_Entity (N)));
- Write_Str (" from ");
- Write_Location (Loc);
- Write_Eol;
- end if;
+ -- Find corresponding package specification, and establish the current
+ -- scope. The visible defining entity for the package is the defining
+ -- occurrence in the spec. On exit from the package body, all body
+ -- declarations are attached to the defining entity for the body, but
+ -- the later is never used for name resolution. In this fashion there
+ -- is only one visible entity that denotes the package.
- -- Set Body_Id. Note that this Will be reset to point to the
- -- generic copy later on in the generic case.
+ -- Set Body_Id. Note that this Will be reset to point to the generic
+ -- copy later on in the generic case.
Body_Id := Defining_Entity (N);
if Present (Corresponding_Spec (N)) then
- -- Body is body of package instantiation. Corresponding spec
- -- has already been set.
+ -- Body is body of package instantiation. Corresponding spec has
+ -- already been set.
Spec_Id := Corresponding_Spec (N);
Pack_Decl := Unit_Declaration_Node (Spec_Id);
@@ -257,8 +283,8 @@ package body Sem_Ch7 is
if Ekind (Spec_Id) = E_Generic_Package then
- -- Disable expansion and perform semantic analysis on copy.
- -- The unannotated body will be used in all instantiations.
+ -- Disable expansion and perform semantic analysis on copy. The
+ -- unannotated body will be used in all instantiations.
Body_Id := Defining_Entity (N);
Set_Ekind (Body_Id, E_Package_Body);
@@ -270,23 +296,23 @@ package body Sem_Ch7 is
New_N := Copy_Generic_Node (N, Empty, Instantiating => False);
Rewrite (N, New_N);
- -- Update Body_Id to point to the copied node for the remainder
- -- of the processing.
+ -- Update Body_Id to point to the copied node for the remainder of
+ -- the processing.
Body_Id := Defining_Entity (N);
Start_Generic;
end if;
-- The Body_Id is that of the copied node in the generic case, the
- -- current node otherwise. Note that N was rewritten above, so we
- -- must be sure to get the latest Body_Id value.
+ -- current node otherwise. Note that N was rewritten above, so we must
+ -- be sure to get the latest Body_Id value.
Set_Ekind (Body_Id, E_Package_Body);
Set_Body_Entity (Spec_Id, Body_Id);
Set_Spec_Entity (Body_Id, Spec_Id);
- -- Defining name for the package body is not a visible entity: Only
- -- the defining name for the declaration is visible.
+ -- Defining name for the package body is not a visible entity: Only the
+ -- defining name for the declaration is visible.
Set_Etype (Body_Id, Standard_Void_Type);
Set_Scope (Body_Id, Scope (Spec_Id));
@@ -340,7 +366,7 @@ package body Sem_Ch7 is
Inspect_Deferred_Constant_Completion (Declarations (N));
end if;
- -- Analyze_Declarations has caused freezing of all types; now generate
+ -- Analyze_Declarations has caused freezing of all types. Now generate
-- bodies for RACW primitives and stream attributes, if any.
if Ekind (Spec_Id) = E_Package and then Has_RACW (Spec_Id) then
@@ -416,9 +442,8 @@ package body Sem_Ch7 is
Set_Is_Potentially_Use_Visible (E, False);
Set_Is_Hidden (E);
- -- Child units may appear on the entity list (for example if
- -- they appear in the context of a subunit) but they are not
- -- body entities.
+ -- Child units may appear on the entity list (e.g. if they appear
+ -- in the context of a subunit) but they are not body entities.
if not Is_Child_Unit (E) then
Set_Is_Package_Body_Entity (E);
@@ -444,9 +469,9 @@ package body Sem_Ch7 is
-- following loop runs backwards from the end of the entities of the
-- package body making these entities invisible until we reach a
-- referencer, i.e. a declaration that could reference a previous
- -- declaration, a generic body or an inlined body, or a stub (which
- -- may contain either of these). This is of course an approximation,
- -- but it is conservative and definitely correct.
+ -- declaration, a generic body or an inlined body, or a stub (which may
+ -- contain either of these). This is of course an approximation, but it
+ -- is conservative and definitely correct.
-- We only do this at the outer (library) level non-generic packages.
-- The reason is simply to cut down on the number of external symbols
@@ -464,16 +489,15 @@ package body Sem_Ch7 is
Outer : Boolean)
return Boolean;
-- Traverse the given list of declarations in reverse order.
- -- Return True as soon as a referencer is reached. Return
- -- False if none is found. The Outer parameter is True for
- -- the outer level call, and False for inner level calls for
- -- nested packages. If Outer is True, then any entities up
- -- to the point of hitting a referencer get their Is_Public
- -- flag cleared, so that the entities will be treated as
- -- static entities in the C sense, and need not have fully
- -- qualified names. For inner levels, we need all names to
- -- be fully qualified to deal with the same name appearing
- -- in parallel packages (right now this is tied to their
+ -- Return True as soon as a referencer is reached. Return False if
+ -- none is found. The Outer parameter is True for the outer level
+ -- call, and False for inner level calls for nested packages. If
+ -- Outer is True, then any entities up to the point of hitting a
+ -- referencer get their Is_Public flag cleared, so that the
+ -- entities will be treated as static entities in the C sense, and
+ -- need not have fully qualified names. For inner levels, we need
+ -- all names to be fully qualified to deal with the same name
+ -- appearing in parallel packages (right now this is tied to their
-- being external).
--------------------
@@ -512,10 +536,10 @@ package body Sem_Ch7 is
-- Note that we test Has_Pragma_Inline here rather
-- than Is_Inlined. We are compiling this for a
- -- client, and it is the client who will decide
- -- if actual inlining should occur, so we need to
- -- assume that the procedure could be inlined for
- -- the purpose of accessing global entities.
+ -- client, and it is the client who will decide if
+ -- actual inlining should occur, so we need to assume
+ -- that the procedure could be inlined for the purpose
+ -- of accessing global entities.
if Has_Pragma_Inline (E) then
return True;
@@ -542,20 +566,19 @@ package body Sem_Ch7 is
then
E := Corresponding_Spec (D);
- -- Generic package body is a referencer. It would
- -- seem that we only have to consider generics that
- -- can be exported, i.e. where the corresponding spec
- -- is the spec of the current package, but because of
- -- nested instantiations, a fully private generic
- -- body may export other private body entities.
+ -- Generic package body is a referencer. It would seem
+ -- that we only have to consider generics that can be
+ -- exported, i.e. where the corresponding spec is the
+ -- spec of the current package, but because of nested
+ -- instantiations, a fully private generic body may
+ -- export other private body entities.
if Is_Generic_Unit (E) then
return True;
- -- For non-generic package body, recurse into body
- -- unless this is an instance, we ignore instances
- -- since they cannot have references that affect
- -- outer entities.
+ -- For non-generic package body, recurse into body unless
+ -- this is an instance, we ignore instances since they
+ -- cannot have references that affect outer entities.
elsif not Is_Generic_Instance (E) then
if Has_Referencer
@@ -583,10 +606,10 @@ package body Sem_Ch7 is
end if;
end if;
- -- Objects and exceptions need not be public if we have
- -- not encountered a referencer so far. We only reset
- -- the flag for outer level entities that are not
- -- imported/exported, and which have no interface name.
+ -- Objects and exceptions need not be public if we have not
+ -- encountered a referencer so far. We only reset the flag
+ -- for outer level entities that are not imported/exported,
+ -- and which have no interface name.
elsif Nkind_In (K, N_Object_Declaration,
N_Exception_Declaration,
@@ -623,10 +646,10 @@ package body Sem_Ch7 is
end if;
-- If expander is not active, then here is where we turn off the
- -- In_Package_Body flag, otherwise it is turned off at the end of
- -- the corresponding expansion routine. If this is an instance body,
- -- we need to qualify names of local entities, because the body may
- -- have been compiled as a preliminary to another instantiation.
+ -- In_Package_Body flag, otherwise it is turned off at the end of the
+ -- corresponding expansion routine. If this is an instance body, we need
+ -- to qualify names of local entities, because the body may have been
+ -- compiled as a preliminary to another instantiation.
if not Expander_Active then
Set_In_Package_Body (Spec_Id, False);
@@ -637,7 +660,7 @@ package body Sem_Ch7 is
Qualify_Entity_Names (N);
end if;
end if;
- end Analyze_Package_Body;
+ end Analyze_Package_Body_Helper;
---------------------------------
-- Analyze_Package_Declaration --
@@ -667,6 +690,15 @@ package body Sem_Ch7 is
return;
end if;
+ if Debug_Flag_C then
+ Write_Str ("==> package spec ");
+ Write_Name (Chars (Id));
+ Write_Str (" from ");
+ Write_Location (Sloc (N));
+ Write_Eol;
+ Indent;
+ end if;
+
Generate_Definition (Id);
Enter_Name (Id);
Set_Ekind (Id, E_Package);
@@ -679,22 +711,14 @@ package body Sem_Ch7 is
Set_Categorization_From_Pragmas (N);
- if Debug_Flag_C then
- Write_Str ("==== Compiling package spec ");
- Write_Name (Chars (Id));
- Write_Str (" from ");
- Write_Location (Sloc (N));
- Write_Eol;
- end if;
-
Analyze (Specification (N));
Validate_Categorization_Dependency (N, Id);
Body_Required := Unit_Requires_Body (Id);
- -- When this spec does not require an explicit body, we know that
- -- there are no entities requiring completion in the language sense;
- -- we call Check_Completion here only to ensure that any nested package
+ -- When this spec does not require an explicit body, we know that there
+ -- are no entities requiring completion in the language sense; we call
+ -- Check_Completion here only to ensure that any nested package
-- declaration that requires an implicit body gets one. (In the case
-- where a body is required, Check_Completion is called at the end of
-- the body's declarative part.)
@@ -728,14 +752,23 @@ package body Sem_Ch7 is
if Comp_Unit then
Validate_RT_RAT_Component (N);
end if;
+
+ if Debug_Flag_C then
+ Outdent;
+ Write_Str ("<== package spec ");
+ Write_Name (Chars (Id));
+ Write_Str (" from ");
+ Write_Location (Sloc (N));
+ Write_Eol;
+ end if;
end Analyze_Package_Declaration;
-----------------------------------
-- Analyze_Package_Specification --
-----------------------------------
- -- Note that this code is shared for the analysis of generic package
- -- specs (see Sem_Ch12.Analyze_Generic_Package_Declaration for details).
+ -- Note that this code is shared for the analysis of generic package specs
+ -- (see Sem_Ch12.Analyze_Generic_Package_Declaration for details).
procedure Analyze_Package_Specification (N : Node_Id) is
Id : constant Entity_Id := Defining_Entity (N);
@@ -760,10 +793,10 @@ package body Sem_Ch7 is
-- visibility analysis for preconditions and postconditions in specs.
procedure Clear_Constants (Id : Entity_Id; FE : Entity_Id);
- -- Clears constant indications (Never_Set_In_Source, Constant_Value,
- -- and Is_True_Constant) on all variables that are entities of Id,
- -- and on the chain whose first element is FE. A recursive call is
- -- made for all packages and generic packages.
+ -- Clears constant indications (Never_Set_In_Source, Constant_Value, and
+ -- Is_True_Constant) on all variables that are entities of Id, and on
+ -- the chain whose first element is FE. A recursive call is made for all
+ -- packages and generic packages.
procedure Generate_Parent_References;
-- For a child unit, generate references to parent units, for
@@ -822,18 +855,17 @@ package body Sem_Ch7 is
E : Entity_Id;
begin
- -- Ignore package renamings, not interesting and they can
- -- cause self referential loops in the code below.
+ -- Ignore package renamings, not interesting and they can cause self
+ -- referential loops in the code below.
if Nkind (Parent (Id)) = N_Package_Renaming_Declaration then
return;
end if;
- -- Note: in the loop below, the check for Next_Entity pointing
- -- back to the package entity may seem odd, but it is needed,
- -- because a package can contain a renaming declaration to itself,
- -- and such renamings are generated automatically within package
- -- instances.
+ -- Note: in the loop below, the check for Next_Entity pointing back
+ -- to the package entity may seem odd, but it is needed, because a
+ -- package can contain a renaming declaration to itself, and such
+ -- renamings are generated automatically within package instances.
E := FE;
while Present (E) and then E /= Id loop
@@ -873,8 +905,8 @@ package body Sem_Ch7 is
elsif not Nkind_In (Unit (Cunit (Main_Unit)), N_Subprogram_Body,
N_Subunit)
then
- -- If current unit is an ancestor of main unit, generate
- -- a reference to its own parent.
+ -- If current unit is an ancestor of main unit, generate a
+ -- reference to its own parent.
declare
U : Node_Id;
@@ -1065,11 +1097,11 @@ package body Sem_Ch7 is
Validate_RCI_Declarations (Id);
end if;
- -- Save global references in the visible declarations, before
- -- installing private declarations of parent unit if there is one,
- -- because the privacy status of types defined in the parent will
- -- change. This is only relevant for generic child units, but is
- -- done in all cases for uniformity.
+ -- Save global references in the visible declarations, before installing
+ -- private declarations of parent unit if there is one, because the
+ -- privacy status of types defined in the parent will change. This is
+ -- only relevant for generic child units, but is done in all cases for
+ -- uniformity.
if Ekind (Id) = E_Generic_Package
and then Nkind (Orig_Decl) = N_Generic_Package_Declaration
@@ -1360,8 +1392,8 @@ package body Sem_Ch7 is
procedure Declare_Inherited_Private_Subprograms (Id : Entity_Id) is
function Is_Primitive_Of (T : Entity_Id; S : Entity_Id) return Boolean;
- -- Check whether an inherited subprogram is an operation of an
- -- untagged derived type.
+ -- Check whether an inherited subprogram is an operation of an untagged
+ -- derived type.
---------------------
-- Is_Primitive_Of --
@@ -1371,9 +1403,9 @@ package body Sem_Ch7 is
Formal : Entity_Id;
begin
- -- If the full view is a scalar type, the type is the anonymous
- -- base type, but the operation mentions the first subtype, so
- -- check the signature against the base type.
+ -- If the full view is a scalar type, the type is the anonymous base
+ -- type, but the operation mentions the first subtype, so check the
+ -- signature against the base type.
if Base_Type (Etype (S)) = Base_Type (T) then
return True;
@@ -1409,10 +1441,10 @@ package body Sem_Ch7 is
E := First_Entity (Id);
while Present (E) loop
- -- If the entity is a nonprivate type extension whose parent
- -- type is declared in an open scope, then the type may have
- -- inherited operations that now need to be made visible.
- -- Ditto if the entity is a formal derived type in a child unit.
+ -- If the entity is a nonprivate type extension whose parent type
+ -- is declared in an open scope, then the type may have inherited
+ -- operations that now need to be made visible. Ditto if the entity
+ -- is a formal derived type in a child unit.
if ((Is_Derived_Type (E) and then not Is_Private_Type (E))
or else
@@ -1498,16 +1530,15 @@ package body Sem_Ch7 is
(Is_Dispatching_Operation (New_Op)
and then Node (Last_Elmt (Op_List)) = New_Op);
- -- Substitute the new operation for the old one
- -- in the type's primitive operations list. Since
- -- the new operation was also just added to the end
- -- of list, the last element must be removed.
+ -- Substitute the new operation for the old one in the
+ -- type's primitive operations list. Since the new
+ -- operation was also just added to the end of list,
+ -- the last element must be removed.
- -- (Question: is there a simpler way of declaring
- -- the operation, say by just replacing the name
- -- of the earlier operation, reentering it in the
- -- in the symbol table (how?), and marking it as
- -- private???)
+ -- (Question: is there a simpler way of declaring the
+ -- operation, say by just replacing the name of the
+ -- earlier operation, reentering it in the in the symbol
+ -- table (how?), and marking it as private???)
Replace_Elmt (Op_Elmt, New_Op);
Remove_Last_Elmt (Op_List);
@@ -1524,8 +1555,8 @@ package body Sem_Ch7 is
end if;
else
- -- Non-tagged type, scan forward to locate
- -- inherited hidden operations.
+ -- Non-tagged type, scan forward to locate inherited hidden
+ -- operations.
Prim_Op := Next_Entity (E);
while Present (Prim_Op) loop
@@ -1581,8 +1612,8 @@ package body Sem_Ch7 is
Next2 := Next_Entity (Full_Id);
H2 := Homonym (Full_Id);
- -- Reset full declaration pointer to reflect the switched entities
- -- and readjust the next entity chains.
+ -- Reset full declaration pointer to reflect the switched entities and
+ -- readjust the next entity chains.
Exchange_Entities (Id, Full_Id);
@@ -1625,13 +1656,13 @@ package body Sem_Ch7 is
Full : Entity_Id;
begin
- -- First exchange declarations for private types, so that the
- -- full declaration is visible. For each private type, we check
- -- its Private_Dependents list and also exchange any subtypes of
- -- or derived types from it. Finally, if this is a Taft amendment
- -- type, the incomplete declaration is irrelevant, and we want to
- -- link the eventual full declaration with the original private
- -- one so we also skip the exchange.
+ -- First exchange declarations for private types, so that the full
+ -- declaration is visible. For each private type, we check its
+ -- Private_Dependents list and also exchange any subtypes of or derived
+ -- types from it. Finally, if this is a Taft amendment type, the
+ -- incomplete declaration is irrelevant, and we want to link the
+ -- eventual full declaration with the original private one so we also
+ -- skip the exchange.
Id := First_Entity (P);
while Present (Id) and then Id /= First_Private_Entity (P) loop
@@ -1659,12 +1690,12 @@ package body Sem_Ch7 is
-- can only happen in a package nested within a child package,
-- when the parent type is defined in the parent unit. At this
-- point the current type is not private either, and we have to
- -- install the underlying full view, which is now visible.
- -- Save the current full view as well, so that all views can
- -- be restored on exit. It may seem that after compiling the
- -- child body there are not environments to restore, but the
- -- back-end expects those links to be valid, and freeze nodes
- -- depend on them.
+ -- install the underlying full view, which is now visible. Save
+ -- the current full view as well, so that all views can be
+ -- restored on exit. It may seem that after compiling the child
+ -- body there are not environments to restore, but the back-end
+ -- expects those links to be valid, and freeze nodes depend on
+ -- them.
if No (Full_View (Full))
and then Present (Underlying_Full_View (Full))
@@ -1686,8 +1717,8 @@ package body Sem_Ch7 is
Priv := Node (Priv_Elmt);
-- Before the exchange, verify that the presence of the
- -- Full_View field. It will be empty if the entity
- -- has already been installed due to a previous call.
+ -- Full_View field. It will be empty if the entity has already
+ -- been installed due to a previous call.
if Present (Full_View (Priv))
and then Is_Visible_Dependent (Priv)
@@ -1772,8 +1803,7 @@ package body Sem_Ch7 is
S : constant Entity_Id := Scope (Dep);
begin
- -- Renamings created for actual types have the visibility of the
- -- actual.
+ -- Renamings created for actual types have the visibility of the actual
if Ekind (S) = E_Package
and then Is_Generic_Instance (S)
@@ -1785,9 +1815,9 @@ package body Sem_Ch7 is
elsif not (Is_Derived_Type (Dep))
and then Is_Derived_Type (Full_View (Dep))
then
- -- When instantiating a package body, the scope stack is empty,
- -- so check instead whether the dependent type is defined in
- -- the same scope as the instance itself.
+ -- When instantiating a package body, the scope stack is empty, so
+ -- check instead whether the dependent type is defined in the same
+ -- scope as the instance itself.
return In_Open_Scopes (S)
or else (Is_Generic_Instance (Current_Scope)
@@ -1856,8 +1886,8 @@ package body Sem_Ch7 is
No (Discriminant_Specifications (N))
and then not Unknown_Discriminants_Present (N));
- -- Set tagged flag before processing discriminants, to catch
- -- illegal usage.
+ -- Set tagged flag before processing discriminants, to catch illegal
+ -- usage.
Set_Is_Tagged_Type (Id, Tagged_Present (Def));
@@ -1900,8 +1930,8 @@ package body Sem_Ch7 is
Priv_Sub : Entity_Id;
procedure Preserve_Full_Attributes (Priv, Full : Entity_Id);
- -- Copy to the private declaration the attributes of the full view
- -- that need to be available for the partial view also.
+ -- Copy to the private declaration the attributes of the full view that
+ -- need to be available for the partial view also.
function Type_In_Use (T : Entity_Id) return Boolean;
-- Check whether type or base type appear in an active use_type clause
@@ -1951,8 +1981,8 @@ package body Sem_Ch7 is
then
if Priv_Is_Base_Type then
- -- Ada 2005 (AI-345): The full view of a type implementing
- -- an interface can be a task type.
+ -- Ada 2005 (AI-345): The full view of a type implementing an
+ -- interface can be a task type.
-- type T is new I with private;
-- private
@@ -1984,8 +2014,8 @@ package body Sem_Ch7 is
if Is_Tagged_Type (Priv) then
- -- If the type is tagged, the tag itself must be available
- -- on the partial view, for expansion purposes.
+ -- If the type is tagged, the tag itself must be available on
+ -- the partial view, for expansion purposes.
Set_First_Entity (Priv, First_Entity (Full));
@@ -2156,8 +2186,8 @@ package body Sem_Ch7 is
end if;
-- Make private entities invisible and exchange full and private
- -- declarations for private types. Id is now the first private
- -- entity in the package.
+ -- declarations for private types. Id is now the first private entity
+ -- in the package.
while Present (Id) loop
if Debug_Flag_E then
@@ -2178,10 +2208,10 @@ package body Sem_Ch7 is
then
Full := Full_View (Id);
- -- If the partial view is not declared in the visible part
- -- of the package (as is the case when it is a type derived
- -- from some other private type in the private part of the
- -- current package), no exchange takes place.
+ -- If the partial view is not declared in the visible part of the
+ -- package (as is the case when it is a type derived from some
+ -- other private type in the private part of the current package),
+ -- no exchange takes place.
if No (Parent (Id))
or else List_Containing (Parent (Id))
@@ -2192,10 +2222,10 @@ package body Sem_Ch7 is
-- The entry in the private part points to the full declaration,
-- which is currently visible. Exchange them so only the private
- -- type declaration remains accessible, and link private and
- -- full declaration in the opposite direction. Before the actual
- -- exchange, we copy back attributes of the full view that
- -- must be available to the partial view too.
+ -- type declaration remains accessible, and link private and full
+ -- declaration in the opposite direction. Before the actual
+ -- exchange, we copy back attributes of the full view that must
+ -- be available to the partial view too.
Preserve_Full_Attributes (Id, Full);
@@ -2213,10 +2243,10 @@ package body Sem_Ch7 is
-- Swap out the subtypes and derived types of Id that were
-- compiled in this scope, or installed previously by
-- Install_Private_Declarations.
- -- Before we do the swap, we verify the presence of the
- -- Full_View field which may be empty due to a swap by
- -- a previous call to End_Package_Scope (e.g. from the
- -- freezing mechanism).
+
+ -- Before we do the swap, we verify the presence of the Full_View
+ -- field which may be empty due to a swap by a previous call to
+ -- End_Package_Scope (e.g. from the freezing mechanism).
while Present (Priv_Elmt) loop
Priv_Sub := Node (Priv_Elmt);
@@ -2244,10 +2274,11 @@ package body Sem_Ch7 is
Exchange_Declarations (Id);
- -- If we have installed an underlying full view for a type
- -- derived from a private type in a child unit, restore the
- -- proper views of private and full view. See corresponding
- -- code in Install_Private_Declarations.
+ -- If we have installed an underlying full view for a type derived
+ -- from a private type in a child unit, restore the proper views
+ -- of private and full view. See corresponding code in
+ -- Install_Private_Declarations.
+
-- After the exchange, Full denotes the private type in the
-- visible part of the package.
@@ -2261,12 +2292,47 @@ package body Sem_Ch7 is
end if;
elsif Ekind (Id) = E_Incomplete_Type
+ and then Comes_From_Source (Id)
and then No (Full_View (Id))
then
- -- Mark Taft amendment types
+ -- Mark Taft amendment types. Verify that there are no primitive
+ -- operations declared for the type (3.10.1 (9)).
Set_Has_Completion_In_Body (Id);
+ declare
+ Elmt : Elmt_Id;
+ Subp : Entity_Id;
+
+ begin
+ Elmt := First_Elmt (Private_Dependents (Id));
+ while Present (Elmt) loop
+ Subp := Node (Elmt);
+
+ if Is_Overloadable (Subp) then
+ Error_Msg_NE
+ ("type& must be completed in the private part",
+ Parent (Subp), Id);
+
+ -- The return type of an access_to_function cannot be a
+ -- Taft-amendment type.
+
+ elsif Ekind (Subp) = E_Subprogram_Type then
+ if Etype (Subp) = Id
+ or else
+ (Is_Class_Wide_Type (Etype (Subp))
+ and then Etype (Etype (Subp)) = Id)
+ then
+ Error_Msg_NE
+ ("type& must be completed in the private part",
+ Associated_Node_For_Itype (Subp), Id);
+ end if;
+ end if;
+
+ Next_Elmt (Elmt);
+ end loop;
+ end;
+
elsif not Is_Child_Unit (Id)
and then (not Is_Private_Type (Id)
or else No (Full_View (Id)))
@@ -2288,9 +2354,9 @@ package body Sem_Ch7 is
E : Entity_Id;
begin
- -- Imported entity never requires body. Right now, only
- -- subprograms can be imported, but perhaps in the future
- -- we will allow import of packages.
+ -- Imported entity never requires body. Right now, only subprograms can
+ -- be imported, but perhaps in the future we will allow import of
+ -- packages.
if Is_Imported (P) then
return False;
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index d075a23f044..58d9ff68a46 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -7143,6 +7143,14 @@ package body Sem_Ch8 is
elsif not Redundant_Use (Id) then
Set_In_Use (T);
+
+ -- If T is tagged, primitive operators on class-wide operands
+ -- are also available.
+
+ if Is_Tagged_Type (T) then
+ Set_In_Use (Class_Wide_Type (T));
+ end if;
+
Set_Current_Use_Clause (T, Parent (Id));
Op_List := Collect_Primitive_Operations (T);
@@ -7241,7 +7249,9 @@ package body Sem_Ch8 is
Unit1 := Unit (Parent (Clause1));
Unit2 := Unit (Parent (Clause2));
- -- If both clauses are on same unit, report redundancy
+ -- If both clauses are on same unit, or one is the body
+ -- of the other, or one of them is in a subunit, report
+ -- redundancy on the later one.
if Unit1 = Unit2 then
Error_Msg_Sloc := Sloc (Current_Use_Clause (T));
@@ -7249,6 +7259,23 @@ package body Sem_Ch8 is
("& is already use-visible through previous "
& "use_type_clause #?", Clause1, T);
return;
+
+ elsif Nkind (Unit1) = N_Subunit then
+ Error_Msg_Sloc := Sloc (Current_Use_Clause (T));
+ Error_Msg_NE
+ ("& is already use-visible through previous "
+ & "use_type_clause #?", Clause1, T);
+ return;
+
+ elsif Nkind_In (Unit2, N_Package_Body, N_Subprogram_Body)
+ and then Nkind (Unit1) /= Nkind (Unit2)
+ and then Nkind (Unit1) /= N_Subunit
+ then
+ Error_Msg_Sloc := Sloc (Clause1);
+ Error_Msg_NE
+ ("& is already use-visible through previous "
+ & "use_type_clause #?", Current_Use_Clause (T), T);
+ return;
end if;
-- There is a redundant use type clause in a child unit.
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index 96e6bc1fb34..fc3db824aa2 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -28,6 +28,7 @@ with Debug; use Debug;
with Elists; use Elists;
with Einfo; use Einfo;
with Exp_Disp; use Exp_Disp;
+with Exp_Util; use Exp_Util;
with Exp_Ch7; use Exp_Ch7;
with Exp_Tss; use Exp_Tss;
with Errout; use Errout;
@@ -835,9 +836,9 @@ package body Sem_Disp is
end if;
else
- Register_Primitive (Sloc (Subp_Body),
- Prim => Subp,
- Ins_Nod => Subp_Body);
+ Insert_Actions_After (Subp_Body,
+ Register_Primitive (Sloc (Subp_Body),
+ Prim => Subp));
end if;
Generate_Reference (Tagged_Type, Subp, 'p', False);
@@ -909,7 +910,9 @@ package body Sem_Disp is
-- Ada 2005 (AI-251): In case of late overriding of a primitive
-- that covers abstract interface subprograms we must register it
-- in all the secondary dispatch tables associated with abstract
- -- interfaces.
+ -- interfaces. We do this now only if not building static tables.
+ -- Otherwise the patch code is emitted after those tables are
+ -- built, to prevent access_before_elaboration in gigi.
if Body_Is_Last_Primitive then
declare
@@ -925,10 +928,10 @@ package body Sem_Disp is
if Present (Alias (Prim))
and then Present (Interface_Alias (Prim))
and then Alias (Prim) = Subp
+ and then not Building_Static_DT (Tagged_Type)
then
- Register_Primitive (Sloc (Prim),
- Prim => Prim,
- Ins_Nod => Subp_Body);
+ Insert_Actions_After (Subp_Body,
+ Register_Primitive (Sloc (Subp_Body), Prim => Prim));
end if;
Next_Elmt (Elmt);
diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb
index bdf6d57e013..6dd7021e7cf 100644
--- a/gcc/ada/sem_elim.adb
+++ b/gcc/ada/sem_elim.adb
@@ -282,7 +282,7 @@ package body Sem_Elim is
if Is_Dispatching_Operation (E) then
-- If an overriding dispatching primitive is eliminated then
- -- its parent must have been eliminated
+ -- its parent must have been eliminated.
if Is_Overriding_Operation (E)
and then not Is_Eliminated (Overridden_Operation (E))
@@ -671,7 +671,7 @@ package body Sem_Elim is
for J in Elim_Entities.First .. Elim_Entities.Last loop
if E = Elim_Entities.Table (J).Subp then
Error_Msg_Sloc := Sloc (Elim_Entities.Table (J).Prag);
- Error_Msg_NE ("cannot call subprogram & eliminated #", N, E);
+ Error_Msg_NE ("cannot reference subprogram & eliminated #", N, E);
return;
end if;
end loop;
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb
index 2edcd0ec8db..627ea5bf9bb 100644
--- a/gcc/ada/sem_eval.adb
+++ b/gcc/ada/sem_eval.adb
@@ -1779,6 +1779,32 @@ package body Sem_Eval is
Set_Sloc (N, Loc);
end if;
end if;
+
+ -- We can also constant-fold if the prefix is a string literal.
+ -- This will be useful in an instantiation or an inlining.
+
+ elsif Compile_Time_Known_Value (Sub)
+ and then Nkind (Arr) = N_String_Literal
+ and then Compile_Time_Known_Value (Lbd)
+ and then Expr_Value (Lbd) = 1
+ and then Expr_Value (Sub) <=
+ String_Literal_Length (Etype (Arr))
+ then
+ declare
+ C : constant Char_Code :=
+ Get_String_Char (Strval (Arr),
+ UI_To_Int (Expr_Value (Sub)));
+ begin
+ Set_Character_Literal_Name (C);
+
+ Elm :=
+ Make_Character_Literal (Loc,
+ Chars => Name_Find,
+ Char_Literal_Value => UI_From_CC (C));
+ Set_Etype (Elm, Component_Type (Atyp));
+ Rewrite (N, Duplicate_Subexpr_No_Checks (Elm));
+ Set_Is_Static_Expression (N, False);
+ end;
end if;
end if;
end;
@@ -2504,8 +2530,10 @@ package body Sem_Eval is
-- Start of processing for Extract_Length
begin
- Decompose_Expr (Type_Low_Bound (T), Ent1, Kind1, Cons1);
- Decompose_Expr (Type_High_Bound (T), Ent2, Kind2, Cons2);
+ Decompose_Expr
+ (Original_Node (Type_Low_Bound (T)), Ent1, Kind1, Cons1);
+ Decompose_Expr
+ (Original_Node (Type_High_Bound (T)), Ent2, Kind2, Cons2);
if Present (Ent1)
and then Kind1 = Kind2
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index e8cd0a04b64..cdbd9e338c2 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -3531,13 +3531,14 @@ package body Sem_Prag is
end loop;
-- When the convention is Java or CIL, we also allow Import to be
- -- given for packages, generic packages, exceptions, and record
- -- components.
+ -- given for packages, generic packages, exceptions, record
+ -- components, and access to subprograms.
elsif (C = Convention_Java or else C = Convention_CIL)
and then
(Is_Package_Or_Generic_Package (Def_Id)
or else Ekind (Def_Id) = E_Exception
+ or else Ekind (Def_Id) = E_Access_Subprogram_Type
or else Nkind (Parent (Def_Id)) = N_Component_Declaration)
then
Set_Imported (Def_Id);
@@ -3931,16 +3932,17 @@ package body Sem_Prag is
-- For all cases except external names on CLI target,
-- commas, spaces and slashes are dubious (in CLI, we use
-- spaces and commas in external names to specify assembly
- -- version and public key).
+ -- version and public key, while slashes can be used in
+ -- names to mark nested classes).
or else ((not Ext_Name_Case or else VM_Target /= CLI_Target)
and then (Get_Character (C) = ' '
or else
Get_Character (C) = ','
or else
- Get_Character (C) = '/'
- or else
Get_Character (C) = '\'))
+ or else (VM_Target /= CLI_Target
+ and then Get_Character (C) = '/')
then
Error_Msg
("?interface name contains illegal character",
@@ -9365,14 +9367,14 @@ package body Sem_Prag is
else
if not Rep_Item_Too_Late (Typ, N) then
if VM_Target = No_VM then
- Set_Is_Packed (Base_Type (Typ));
+ Set_Is_Packed (Base_Type (Typ));
+ Set_Has_Pragma_Pack (Base_Type (Typ));
+ Set_Has_Non_Standard_Rep (Base_Type (Typ));
+
elsif not GNAT_Mode then
Error_Pragma
("?pragma% ignored in this configuration");
end if;
-
- Set_Has_Pragma_Pack (Base_Type (Typ));
- Set_Has_Non_Standard_Rep (Base_Type (Typ));
end if;
end if;
@@ -9381,13 +9383,13 @@ package body Sem_Prag is
else pragma Assert (Is_Record_Type (Typ));
if not Rep_Item_Too_Late (Typ, N) then
if VM_Target = No_VM then
- Set_Is_Packed (Base_Type (Typ));
+ Set_Is_Packed (Base_Type (Typ));
+ Set_Has_Pragma_Pack (Base_Type (Typ));
+ Set_Has_Non_Standard_Rep (Base_Type (Typ));
+
elsif not GNAT_Mode then
Error_Pragma ("?pragma% ignored in this configuration");
end if;
-
- Set_Has_Pragma_Pack (Base_Type (Typ));
- Set_Has_Non_Standard_Rep (Base_Type (Typ));
end if;
end if;
end Pack;
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 31242c6eb57..676cbc2bf42 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -5231,6 +5231,9 @@ package body Sem_Res is
and then Present (Controlling_Argument (N))
then
Generate_Reference (Nam, Subp, 'R');
+
+ -- Normal case, not a dispatching call
+
else
Generate_Reference (Nam, Subp);
end if;
diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index bc9dbdbc953..47bc6628e47 100644
--- a/gcc/ada/sem_type.adb
+++ b/gcc/ada/sem_type.adb
@@ -885,7 +885,7 @@ package body Sem_Type is
then
return True;
- -- An aggregate is compatible with an array or record type.
+ -- An aggregate is compatible with an array or record type
elsif T2 = Any_Composite
and then Ekind (T1) in E_Array_Type .. E_Record_Subtype
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 04187933fdc..337d1ac0cf0 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -59,8 +59,38 @@ with Tbuild; use Tbuild;
with Ttypes; use Ttypes;
with Uname; use Uname;
+with GNAT.HTable; use GNAT.HTable;
package body Sem_Util is
+ ----------------------------------------
+ -- Global_Variables for New_Copy_Tree --
+ ----------------------------------------
+
+ -- These global variables are used by New_Copy_Tree. See description
+ -- of the body of this subprogram for details. Global variables can be
+ -- safely used by New_Copy_Tree, since there is no case of a recursive
+ -- call from the processing inside New_Copy_Tree.
+
+ NCT_Hash_Threshhold : constant := 20;
+ -- If there are more than this number of pairs of entries in the
+ -- map, then Hash_Tables_Used will be set, and the hash tables will
+ -- be initialized and used for the searches.
+
+ NCT_Hash_Tables_Used : Boolean := False;
+ -- Set to True if hash tables are in use
+
+ NCT_Table_Entries : Nat;
+ -- Count entries in table to see if threshhold is reached
+
+ NCT_Hash_Table_Setup : Boolean := False;
+ -- Set to True if hash table contains data. We set this True if we
+ -- setup the hash table with data, and leave it set permanently
+ -- from then on, this is a signal that second and subsequent users
+ -- of the hash table must clear the old entries before reuse.
+
+ subtype NCT_Header_Num is Int range 0 .. 511;
+ -- Defines range of headers in hash tables (512 headers)
+
-----------------------
-- Local Subprograms --
-----------------------
@@ -7224,20 +7254,29 @@ package body Sem_Util is
when N_Assignment_Statement =>
return N = Name (P);
- -- Test prefix of component or attribute
+ -- Test prefix of component or attribute. Note that the prefix of an
+ -- explicit or implicit dereference cannot be an l-value.
when N_Attribute_Reference =>
return N = Prefix (P)
and then Name_Implies_Lvalue_Prefix (Attribute_Name (P));
when N_Expanded_Name |
- N_Explicit_Dereference |
N_Indexed_Component |
- N_Reference |
N_Selected_Component |
N_Slice =>
+ if Is_Access_Type (Etype (N)) then
+ return False; -- P is an implicit dereference
+ else
+ return N = Prefix (P);
+ end if;
+
+ when N_Reference =>
return N = Prefix (P);
+ when N_Explicit_Dereference =>
+ return False;
+
-- Function call arguments are never lvalues
when N_Function_Call =>
@@ -7422,6 +7461,954 @@ package body Sem_Util is
end if;
end Needs_One_Actual;
+ ------------------------
+ -- New_Copy_List_Tree --
+ ------------------------
+
+ function New_Copy_List_Tree (List : List_Id) return List_Id is
+ NL : List_Id;
+ E : Node_Id;
+
+ begin
+ if List = No_List then
+ return No_List;
+
+ else
+ NL := New_List;
+ E := First (List);
+
+ while Present (E) loop
+ Append (New_Copy_Tree (E), NL);
+ E := Next (E);
+ end loop;
+
+ return NL;
+ end if;
+ end New_Copy_List_Tree;
+
+ -------------------
+ -- New_Copy_Tree --
+ -------------------
+
+ use Atree.Unchecked_Access;
+ use Atree_Private_Part;
+
+ -- Our approach here requires a two pass traversal of the tree. The
+ -- first pass visits all nodes that eventually will be copied looking
+ -- for defining Itypes. If any defining Itypes are found, then they are
+ -- copied, and an entry is added to the replacement map. In the second
+ -- phase, the tree is copied, using the replacement map to replace any
+ -- Itype references within the copied tree.
+
+ -- The following hash tables are used if the Map supplied has more
+ -- than hash threshhold entries to speed up access to the map. If
+ -- there are fewer entries, then the map is searched sequentially
+ -- (because setting up a hash table for only a few entries takes
+ -- more time than it saves.
+
+ function New_Copy_Hash (E : Entity_Id) return NCT_Header_Num;
+ -- Hash function used for hash operations
+
+ -------------------
+ -- New_Copy_Hash --
+ -------------------
+
+ function New_Copy_Hash (E : Entity_Id) return NCT_Header_Num is
+ begin
+ return Nat (E) mod (NCT_Header_Num'Last + 1);
+ end New_Copy_Hash;
+
+ ---------------
+ -- NCT_Assoc --
+ ---------------
+
+ -- The hash table NCT_Assoc associates old entities in the table
+ -- with their corresponding new entities (i.e. the pairs of entries
+ -- presented in the original Map argument are Key-Element pairs).
+
+ package NCT_Assoc is new Simple_HTable (
+ Header_Num => NCT_Header_Num,
+ Element => Entity_Id,
+ No_Element => Empty,
+ Key => Entity_Id,
+ Hash => New_Copy_Hash,
+ Equal => Types."=");
+
+ ---------------------
+ -- NCT_Itype_Assoc --
+ ---------------------
+
+ -- The hash table NCT_Itype_Assoc contains entries only for those
+ -- old nodes which have a non-empty Associated_Node_For_Itype set.
+ -- The key is the associated node, and the element is the new node
+ -- itself (NOT the associated node for the new node).
+
+ package NCT_Itype_Assoc is new Simple_HTable (
+ Header_Num => NCT_Header_Num,
+ Element => Entity_Id,
+ No_Element => Empty,
+ Key => Entity_Id,
+ Hash => New_Copy_Hash,
+ Equal => Types."=");
+
+ -- Start of processing for New_Copy_Tree function
+
+ function New_Copy_Tree
+ (Source : Node_Id;
+ Map : Elist_Id := No_Elist;
+ New_Sloc : Source_Ptr := No_Location;
+ New_Scope : Entity_Id := Empty) return Node_Id
+ is
+ Actual_Map : Elist_Id := Map;
+ -- This is the actual map for the copy. It is initialized with the
+ -- given elements, and then enlarged as required for Itypes that are
+ -- copied during the first phase of the copy operation. The visit
+ -- procedures add elements to this map as Itypes are encountered.
+ -- The reason we cannot use Map directly, is that it may well be
+ -- (and normally is) initialized to No_Elist, and if we have mapped
+ -- entities, we have to reset it to point to a real Elist.
+
+ function Assoc (N : Node_Or_Entity_Id) return Node_Id;
+ -- Called during second phase to map entities into their corresponding
+ -- copies using Actual_Map. If the argument is not an entity, or is not
+ -- in Actual_Map, then it is returned unchanged.
+
+ procedure Build_NCT_Hash_Tables;
+ -- Builds hash tables (number of elements >= threshold value)
+
+ function Copy_Elist_With_Replacement
+ (Old_Elist : Elist_Id) return Elist_Id;
+ -- Called during second phase to copy element list doing replacements
+
+ procedure Copy_Itype_With_Replacement (New_Itype : Entity_Id);
+ -- Called during the second phase to process a copied Itype. The actual
+ -- copy happened during the first phase (so that we could make the entry
+ -- in the mapping), but we still have to deal with the descendents of
+ -- the copied Itype and copy them where necessary.
+
+ function Copy_List_With_Replacement (Old_List : List_Id) return List_Id;
+ -- Called during second phase to copy list doing replacements
+
+ function Copy_Node_With_Replacement (Old_Node : Node_Id) return Node_Id;
+ -- Called during second phase to copy node doing replacements
+
+ procedure Visit_Elist (E : Elist_Id);
+ -- Called during first phase to visit all elements of an Elist
+
+ procedure Visit_Field (F : Union_Id; N : Node_Id);
+ -- Visit a single field, recursing to call Visit_Node or Visit_List
+ -- if the field is a syntactic descendent of the current node (i.e.
+ -- its parent is Node N).
+
+ procedure Visit_Itype (Old_Itype : Entity_Id);
+ -- Called during first phase to visit subsidiary fields of a defining
+ -- Itype, and also create a copy and make an entry in the replacement
+ -- map for the new copy.
+
+ procedure Visit_List (L : List_Id);
+ -- Called during first phase to visit all elements of a List
+
+ procedure Visit_Node (N : Node_Or_Entity_Id);
+ -- Called during first phase to visit a node and all its subtrees
+
+ -----------
+ -- Assoc --
+ -----------
+
+ function Assoc (N : Node_Or_Entity_Id) return Node_Id is
+ E : Elmt_Id;
+ Ent : Entity_Id;
+
+ begin
+ if not Has_Extension (N) or else No (Actual_Map) then
+ return N;
+
+ elsif NCT_Hash_Tables_Used then
+ Ent := NCT_Assoc.Get (Entity_Id (N));
+
+ if Present (Ent) then
+ return Ent;
+ else
+ return N;
+ end if;
+
+ -- No hash table used, do serial search
+
+ else
+ E := First_Elmt (Actual_Map);
+ while Present (E) loop
+ if Node (E) = N then
+ return Node (Next_Elmt (E));
+ else
+ E := Next_Elmt (Next_Elmt (E));
+ end if;
+ end loop;
+ end if;
+
+ return N;
+ end Assoc;
+
+ ---------------------------
+ -- Build_NCT_Hash_Tables --
+ ---------------------------
+
+ procedure Build_NCT_Hash_Tables is
+ Elmt : Elmt_Id;
+ Ent : Entity_Id;
+ begin
+ if NCT_Hash_Table_Setup then
+ NCT_Assoc.Reset;
+ NCT_Itype_Assoc.Reset;
+ end if;
+
+ Elmt := First_Elmt (Actual_Map);
+ while Present (Elmt) loop
+ Ent := Node (Elmt);
+
+ -- Get new entity, and associate old and new
+
+ Next_Elmt (Elmt);
+ NCT_Assoc.Set (Ent, Node (Elmt));
+
+ if Is_Type (Ent) then
+ declare
+ Anode : constant Entity_Id :=
+ Associated_Node_For_Itype (Ent);
+
+ begin
+ if Present (Anode) then
+
+ -- Enter a link between the associated node of the
+ -- old Itype and the new Itype, for updating later
+ -- when node is copied.
+
+ NCT_Itype_Assoc.Set (Anode, Node (Elmt));
+ end if;
+ end;
+ end if;
+
+ Next_Elmt (Elmt);
+ end loop;
+
+ NCT_Hash_Tables_Used := True;
+ NCT_Hash_Table_Setup := True;
+ end Build_NCT_Hash_Tables;
+
+ ---------------------------------
+ -- Copy_Elist_With_Replacement --
+ ---------------------------------
+
+ function Copy_Elist_With_Replacement
+ (Old_Elist : Elist_Id) return Elist_Id
+ is
+ M : Elmt_Id;
+ New_Elist : Elist_Id;
+
+ begin
+ if No (Old_Elist) then
+ return No_Elist;
+
+ else
+ New_Elist := New_Elmt_List;
+
+ M := First_Elmt (Old_Elist);
+ while Present (M) loop
+ Append_Elmt (Copy_Node_With_Replacement (Node (M)), New_Elist);
+ Next_Elmt (M);
+ end loop;
+ end if;
+
+ return New_Elist;
+ end Copy_Elist_With_Replacement;
+
+ ---------------------------------
+ -- Copy_Itype_With_Replacement --
+ ---------------------------------
+
+ -- This routine exactly parallels its phase one analog Visit_Itype,
+
+ procedure Copy_Itype_With_Replacement (New_Itype : Entity_Id) is
+ begin
+ -- Translate Next_Entity, Scope and Etype fields, in case they
+ -- reference entities that have been mapped into copies.
+
+ Set_Next_Entity (New_Itype, Assoc (Next_Entity (New_Itype)));
+ Set_Etype (New_Itype, Assoc (Etype (New_Itype)));
+
+ if Present (New_Scope) then
+ Set_Scope (New_Itype, New_Scope);
+ else
+ Set_Scope (New_Itype, Assoc (Scope (New_Itype)));
+ end if;
+
+ -- Copy referenced fields
+
+ if Is_Discrete_Type (New_Itype) then
+ Set_Scalar_Range (New_Itype,
+ Copy_Node_With_Replacement (Scalar_Range (New_Itype)));
+
+ elsif Has_Discriminants (Base_Type (New_Itype)) then
+ Set_Discriminant_Constraint (New_Itype,
+ Copy_Elist_With_Replacement
+ (Discriminant_Constraint (New_Itype)));
+
+ elsif Is_Array_Type (New_Itype) then
+ if Present (First_Index (New_Itype)) then
+ Set_First_Index (New_Itype,
+ First (Copy_List_With_Replacement
+ (List_Containing (First_Index (New_Itype)))));
+ end if;
+
+ if Is_Packed (New_Itype) then
+ Set_Packed_Array_Type (New_Itype,
+ Copy_Node_With_Replacement
+ (Packed_Array_Type (New_Itype)));
+ end if;
+ end if;
+ end Copy_Itype_With_Replacement;
+
+ --------------------------------
+ -- Copy_List_With_Replacement --
+ --------------------------------
+
+ function Copy_List_With_Replacement
+ (Old_List : List_Id) return List_Id
+ is
+ New_List : List_Id;
+ E : Node_Id;
+
+ begin
+ if Old_List = No_List then
+ return No_List;
+
+ else
+ New_List := Empty_List;
+
+ E := First (Old_List);
+ while Present (E) loop
+ Append (Copy_Node_With_Replacement (E), New_List);
+ Next (E);
+ end loop;
+
+ return New_List;
+ end if;
+ end Copy_List_With_Replacement;
+
+ --------------------------------
+ -- Copy_Node_With_Replacement --
+ --------------------------------
+
+ function Copy_Node_With_Replacement
+ (Old_Node : Node_Id) return Node_Id
+ is
+ New_Node : Node_Id;
+
+ procedure Adjust_Named_Associations
+ (Old_Node : Node_Id;
+ New_Node : Node_Id);
+ -- If a call node has named associations, these are chained through
+ -- the First_Named_Actual, Next_Named_Actual links. These must be
+ -- propagated separately to the new parameter list, because these
+ -- are not syntactic fields.
+
+ function Copy_Field_With_Replacement
+ (Field : Union_Id) return Union_Id;
+ -- Given Field, which is a field of Old_Node, return a copy of it
+ -- if it is a syntactic field (i.e. its parent is Node), setting
+ -- the parent of the copy to poit to New_Node. Otherwise returns
+ -- the field (possibly mapped if it is an entity).
+
+ -------------------------------
+ -- Adjust_Named_Associations --
+ -------------------------------
+
+ procedure Adjust_Named_Associations
+ (Old_Node : Node_Id;
+ New_Node : Node_Id)
+ is
+ Old_E : Node_Id;
+ New_E : Node_Id;
+
+ Old_Next : Node_Id;
+ New_Next : Node_Id;
+
+ begin
+ Old_E := First (Parameter_Associations (Old_Node));
+ New_E := First (Parameter_Associations (New_Node));
+ while Present (Old_E) loop
+ if Nkind (Old_E) = N_Parameter_Association
+ and then Present (Next_Named_Actual (Old_E))
+ then
+ if First_Named_Actual (Old_Node)
+ = Explicit_Actual_Parameter (Old_E)
+ then
+ Set_First_Named_Actual
+ (New_Node, Explicit_Actual_Parameter (New_E));
+ end if;
+
+ -- Now scan parameter list from the beginning,to locate
+ -- next named actual, which can be out of order.
+
+ Old_Next := First (Parameter_Associations (Old_Node));
+ New_Next := First (Parameter_Associations (New_Node));
+
+ while Nkind (Old_Next) /= N_Parameter_Association
+ or else Explicit_Actual_Parameter (Old_Next)
+ /= Next_Named_Actual (Old_E)
+ loop
+ Next (Old_Next);
+ Next (New_Next);
+ end loop;
+
+ Set_Next_Named_Actual
+ (New_E, Explicit_Actual_Parameter (New_Next));
+ end if;
+
+ Next (Old_E);
+ Next (New_E);
+ end loop;
+ end Adjust_Named_Associations;
+
+ ---------------------------------
+ -- Copy_Field_With_Replacement --
+ ---------------------------------
+
+ function Copy_Field_With_Replacement
+ (Field : Union_Id) return Union_Id
+ is
+ begin
+ if Field = Union_Id (Empty) then
+ return Field;
+
+ elsif Field in Node_Range then
+ declare
+ Old_N : constant Node_Id := Node_Id (Field);
+ New_N : Node_Id;
+
+ begin
+ -- If syntactic field, as indicated by the parent pointer
+ -- being set, then copy the referenced node recursively.
+
+ if Parent (Old_N) = Old_Node then
+ New_N := Copy_Node_With_Replacement (Old_N);
+
+ if New_N /= Old_N then
+ Set_Parent (New_N, New_Node);
+ end if;
+
+ -- For semantic fields, update possible entity reference
+ -- from the replacement map.
+
+ else
+ New_N := Assoc (Old_N);
+ end if;
+
+ return Union_Id (New_N);
+ end;
+
+ elsif Field in List_Range then
+ declare
+ Old_L : constant List_Id := List_Id (Field);
+ New_L : List_Id;
+
+ begin
+ -- If syntactic field, as indicated by the parent pointer,
+ -- then recursively copy the entire referenced list.
+
+ if Parent (Old_L) = Old_Node then
+ New_L := Copy_List_With_Replacement (Old_L);
+ Set_Parent (New_L, New_Node);
+
+ -- For semantic list, just returned unchanged
+
+ else
+ New_L := Old_L;
+ end if;
+
+ return Union_Id (New_L);
+ end;
+
+ -- Anything other than a list or a node is returned unchanged
+
+ else
+ return Field;
+ end if;
+ end Copy_Field_With_Replacement;
+
+ -- Start of processing for Copy_Node_With_Replacement
+
+ begin
+ if Old_Node <= Empty_Or_Error then
+ return Old_Node;
+
+ elsif Has_Extension (Old_Node) then
+ return Assoc (Old_Node);
+
+ else
+ New_Node := New_Copy (Old_Node);
+
+ -- If the node we are copying is the associated node of a
+ -- previously copied Itype, then adjust the associated node
+ -- of the copy of that Itype accordingly.
+
+ if Present (Actual_Map) then
+ declare
+ E : Elmt_Id;
+ Ent : Entity_Id;
+
+ begin
+ -- Case of hash table used
+
+ if NCT_Hash_Tables_Used then
+ Ent := NCT_Itype_Assoc.Get (Old_Node);
+
+ if Present (Ent) then
+ Set_Associated_Node_For_Itype (Ent, New_Node);
+ end if;
+
+ -- Case of no hash table used
+
+ else
+ E := First_Elmt (Actual_Map);
+ while Present (E) loop
+ if Is_Itype (Node (E))
+ and then
+ Old_Node = Associated_Node_For_Itype (Node (E))
+ then
+ Set_Associated_Node_For_Itype
+ (Node (Next_Elmt (E)), New_Node);
+ end if;
+
+ E := Next_Elmt (Next_Elmt (E));
+ end loop;
+ end if;
+ end;
+ end if;
+
+ -- Recursively copy descendents
+
+ Set_Field1
+ (New_Node, Copy_Field_With_Replacement (Field1 (New_Node)));
+ Set_Field2
+ (New_Node, Copy_Field_With_Replacement (Field2 (New_Node)));
+ Set_Field3
+ (New_Node, Copy_Field_With_Replacement (Field3 (New_Node)));
+ Set_Field4
+ (New_Node, Copy_Field_With_Replacement (Field4 (New_Node)));
+ Set_Field5
+ (New_Node, Copy_Field_With_Replacement (Field5 (New_Node)));
+
+ -- Adjust Sloc of new node if necessary
+
+ if New_Sloc /= No_Location then
+ Set_Sloc (New_Node, New_Sloc);
+
+ -- If we adjust the Sloc, then we are essentially making
+ -- a completely new node, so the Comes_From_Source flag
+ -- should be reset to the proper default value.
+
+ Nodes.Table (New_Node).Comes_From_Source :=
+ Default_Node.Comes_From_Source;
+ end if;
+
+ -- If the node is call and has named associations,
+ -- set the corresponding links in the copy.
+
+ if (Nkind (Old_Node) = N_Function_Call
+ or else Nkind (Old_Node) = N_Entry_Call_Statement
+ or else
+ Nkind (Old_Node) = N_Procedure_Call_Statement)
+ and then Present (First_Named_Actual (Old_Node))
+ then
+ Adjust_Named_Associations (Old_Node, New_Node);
+ end if;
+
+ -- Reset First_Real_Statement for Handled_Sequence_Of_Statements.
+ -- The replacement mechanism applies to entities, and is not used
+ -- here. Eventually we may need a more general graph-copying
+ -- routine. For now, do a sequential search to find desired node.
+
+ if Nkind (Old_Node) = N_Handled_Sequence_Of_Statements
+ and then Present (First_Real_Statement (Old_Node))
+ then
+ declare
+ Old_F : constant Node_Id := First_Real_Statement (Old_Node);
+ N1, N2 : Node_Id;
+
+ begin
+ N1 := First (Statements (Old_Node));
+ N2 := First (Statements (New_Node));
+
+ while N1 /= Old_F loop
+ Next (N1);
+ Next (N2);
+ end loop;
+
+ Set_First_Real_Statement (New_Node, N2);
+ end;
+ end if;
+ end if;
+
+ -- All done, return copied node
+
+ return New_Node;
+ end Copy_Node_With_Replacement;
+
+ -----------------
+ -- Visit_Elist --
+ -----------------
+
+ procedure Visit_Elist (E : Elist_Id) is
+ Elmt : Elmt_Id;
+ begin
+ if Present (E) then
+ Elmt := First_Elmt (E);
+
+ while Elmt /= No_Elmt loop
+ Visit_Node (Node (Elmt));
+ Next_Elmt (Elmt);
+ end loop;
+ end if;
+ end Visit_Elist;
+
+ -----------------
+ -- Visit_Field --
+ -----------------
+
+ procedure Visit_Field (F : Union_Id; N : Node_Id) is
+ begin
+ if F = Union_Id (Empty) then
+ return;
+
+ elsif F in Node_Range then
+
+ -- Copy node if it is syntactic, i.e. its parent pointer is
+ -- set to point to the field that referenced it (certain
+ -- Itypes will also meet this criterion, which is fine, since
+ -- these are clearly Itypes that do need to be copied, since
+ -- we are copying their parent.)
+
+ if Parent (Node_Id (F)) = N then
+ Visit_Node (Node_Id (F));
+ return;
+
+ -- Another case, if we are pointing to an Itype, then we want
+ -- to copy it if its associated node is somewhere in the tree
+ -- being copied.
+
+ -- Note: the exclusion of self-referential copies is just an
+ -- optimization, since the search of the already copied list
+ -- would catch it, but it is a common case (Etype pointing
+ -- to itself for an Itype that is a base type).
+
+ elsif Has_Extension (Node_Id (F))
+ and then Is_Itype (Entity_Id (F))
+ and then Node_Id (F) /= N
+ then
+ declare
+ P : Node_Id;
+
+ begin
+ P := Associated_Node_For_Itype (Node_Id (F));
+ while Present (P) loop
+ if P = Source then
+ Visit_Node (Node_Id (F));
+ return;
+ else
+ P := Parent (P);
+ end if;
+ end loop;
+
+ -- An Itype whose parent is not being copied definitely
+ -- should NOT be copied, since it does not belong in any
+ -- sense to the copied subtree.
+
+ return;
+ end;
+ end if;
+
+ elsif F in List_Range
+ and then Parent (List_Id (F)) = N
+ then
+ Visit_List (List_Id (F));
+ return;
+ end if;
+ end Visit_Field;
+
+ -----------------
+ -- Visit_Itype --
+ -----------------
+
+ procedure Visit_Itype (Old_Itype : Entity_Id) is
+ New_Itype : Entity_Id;
+ E : Elmt_Id;
+ Ent : Entity_Id;
+
+ begin
+ -- Itypes that describe the designated type of access to subprograms
+ -- have the structure of subprogram declarations, with signatures,
+ -- etc. Either we duplicate the signatures completely, or choose to
+ -- share such itypes, which is fine because their elaboration will
+ -- have no side effects.
+
+ if Ekind (Old_Itype) = E_Subprogram_Type then
+ return;
+ end if;
+
+ New_Itype := New_Copy (Old_Itype);
+
+ -- The new Itype has all the attributes of the old one, and
+ -- we just copy the contents of the entity. However, the back-end
+ -- needs different names for debugging purposes, so we create a
+ -- new internal name for it in all cases.
+
+ Set_Chars (New_Itype, New_Internal_Name ('T'));
+
+ -- If our associated node is an entity that has already been copied,
+ -- then set the associated node of the copy to point to the right
+ -- copy. If we have copied an Itype that is itself the associated
+ -- node of some previously copied Itype, then we set the right
+ -- pointer in the other direction.
+
+ if Present (Actual_Map) then
+
+ -- Case of hash tables used
+
+ if NCT_Hash_Tables_Used then
+
+ Ent := NCT_Assoc.Get (Associated_Node_For_Itype (Old_Itype));
+
+ if Present (Ent) then
+ Set_Associated_Node_For_Itype (New_Itype, Ent);
+ end if;
+
+ Ent := NCT_Itype_Assoc.Get (Old_Itype);
+ if Present (Ent) then
+ Set_Associated_Node_For_Itype (Ent, New_Itype);
+
+ -- If the hash table has no association for this Itype and
+ -- its associated node, enter one now.
+
+ else
+ NCT_Itype_Assoc.Set
+ (Associated_Node_For_Itype (Old_Itype), New_Itype);
+ end if;
+
+ -- Case of hash tables not used
+
+ else
+ E := First_Elmt (Actual_Map);
+ while Present (E) loop
+ if Associated_Node_For_Itype (Old_Itype) = Node (E) then
+ Set_Associated_Node_For_Itype
+ (New_Itype, Node (Next_Elmt (E)));
+ end if;
+
+ if Is_Type (Node (E))
+ and then
+ Old_Itype = Associated_Node_For_Itype (Node (E))
+ then
+ Set_Associated_Node_For_Itype
+ (Node (Next_Elmt (E)), New_Itype);
+ end if;
+
+ E := Next_Elmt (Next_Elmt (E));
+ end loop;
+ end if;
+ end if;
+
+ if Present (Freeze_Node (New_Itype)) then
+ Set_Is_Frozen (New_Itype, False);
+ Set_Freeze_Node (New_Itype, Empty);
+ end if;
+
+ -- Add new association to map
+
+ if No (Actual_Map) then
+ Actual_Map := New_Elmt_List;
+ end if;
+
+ Append_Elmt (Old_Itype, Actual_Map);
+ Append_Elmt (New_Itype, Actual_Map);
+
+ if NCT_Hash_Tables_Used then
+ NCT_Assoc.Set (Old_Itype, New_Itype);
+
+ else
+ NCT_Table_Entries := NCT_Table_Entries + 1;
+
+ if NCT_Table_Entries > NCT_Hash_Threshhold then
+ Build_NCT_Hash_Tables;
+ end if;
+ end if;
+
+ -- If a record subtype is simply copied, the entity list will be
+ -- shared. Thus cloned_Subtype must be set to indicate the sharing.
+
+ if Ekind (Old_Itype) = E_Record_Subtype
+ or else Ekind (Old_Itype) = E_Class_Wide_Subtype
+ then
+ Set_Cloned_Subtype (New_Itype, Old_Itype);
+ end if;
+
+ -- Visit descendents that eventually get copied
+
+ Visit_Field (Union_Id (Etype (Old_Itype)), Old_Itype);
+
+ if Is_Discrete_Type (Old_Itype) then
+ Visit_Field (Union_Id (Scalar_Range (Old_Itype)), Old_Itype);
+
+ elsif Has_Discriminants (Base_Type (Old_Itype)) then
+ -- ??? This should involve call to Visit_Field
+ Visit_Elist (Discriminant_Constraint (Old_Itype));
+
+ elsif Is_Array_Type (Old_Itype) then
+ if Present (First_Index (Old_Itype)) then
+ Visit_Field (Union_Id (List_Containing
+ (First_Index (Old_Itype))),
+ Old_Itype);
+ end if;
+
+ if Is_Packed (Old_Itype) then
+ Visit_Field (Union_Id (Packed_Array_Type (Old_Itype)),
+ Old_Itype);
+ end if;
+ end if;
+ end Visit_Itype;
+
+ ----------------
+ -- Visit_List --
+ ----------------
+
+ procedure Visit_List (L : List_Id) is
+ N : Node_Id;
+ begin
+ if L /= No_List then
+ N := First (L);
+
+ while Present (N) loop
+ Visit_Node (N);
+ Next (N);
+ end loop;
+ end if;
+ end Visit_List;
+
+ ----------------
+ -- Visit_Node --
+ ----------------
+
+ procedure Visit_Node (N : Node_Or_Entity_Id) is
+
+ -- Start of processing for Visit_Node
+
+ begin
+ -- Handle case of an Itype, which must be copied
+
+ if Has_Extension (N)
+ and then Is_Itype (N)
+ then
+ -- Nothing to do if already in the list. This can happen with an
+ -- Itype entity that appears more than once in the tree.
+ -- Note that we do not want to visit descendents in this case.
+
+ -- Test for already in list when hash table is used
+
+ if NCT_Hash_Tables_Used then
+ if Present (NCT_Assoc.Get (Entity_Id (N))) then
+ return;
+ end if;
+
+ -- Test for already in list when hash table not used
+
+ else
+ declare
+ E : Elmt_Id;
+ begin
+ if Present (Actual_Map) then
+ E := First_Elmt (Actual_Map);
+ while Present (E) loop
+ if Node (E) = N then
+ return;
+ else
+ E := Next_Elmt (Next_Elmt (E));
+ end if;
+ end loop;
+ end if;
+ end;
+ end if;
+
+ Visit_Itype (N);
+ end if;
+
+ -- Visit descendents
+
+ Visit_Field (Field1 (N), N);
+ Visit_Field (Field2 (N), N);
+ Visit_Field (Field3 (N), N);
+ Visit_Field (Field4 (N), N);
+ Visit_Field (Field5 (N), N);
+ end Visit_Node;
+
+ -- Start of processing for New_Copy_Tree
+
+ begin
+ Actual_Map := Map;
+
+ -- See if we should use hash table
+
+ if No (Actual_Map) then
+ NCT_Hash_Tables_Used := False;
+
+ else
+ declare
+ Elmt : Elmt_Id;
+
+ begin
+ NCT_Table_Entries := 0;
+
+ Elmt := First_Elmt (Actual_Map);
+ while Present (Elmt) loop
+ NCT_Table_Entries := NCT_Table_Entries + 1;
+ Next_Elmt (Elmt);
+ Next_Elmt (Elmt);
+ end loop;
+
+ if NCT_Table_Entries > NCT_Hash_Threshhold then
+ Build_NCT_Hash_Tables;
+ else
+ NCT_Hash_Tables_Used := False;
+ end if;
+ end;
+ end if;
+
+ -- Hash table set up if required, now start phase one by visiting
+ -- top node (we will recursively visit the descendents).
+
+ Visit_Node (Source);
+
+ -- Now the second phase of the copy can start. First we process
+ -- all the mapped entities, copying their descendents.
+
+ if Present (Actual_Map) then
+ declare
+ Elmt : Elmt_Id;
+ New_Itype : Entity_Id;
+ begin
+ Elmt := First_Elmt (Actual_Map);
+ while Present (Elmt) loop
+ Next_Elmt (Elmt);
+ New_Itype := Node (Elmt);
+ Copy_Itype_With_Replacement (New_Itype);
+ Next_Elmt (Elmt);
+ end loop;
+ end;
+ end if;
+
+ -- Now we can copy the actual tree
+
+ return Copy_Node_With_Replacement (Source);
+ end New_Copy_Tree;
+
-------------------------
-- New_External_Entity --
-------------------------
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index ce6d4bd99d2..4046b785892 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -876,6 +876,57 @@ package Sem_Util is
-- formal. Used in Ada 2005 mode to solve the syntactic ambiguity that
-- results from an indexing of a function call written in prefix form.
+ function New_Copy_List_Tree (List : List_Id) return List_Id;
+ -- Copy recursively an analyzed list of nodes. Uses New_Copy_Tree defined
+ -- below. As for New_Copy_Tree, it is illegal to attempt to copy extended
+ -- nodes (entities) either directly or indirectly using this function.
+
+ function New_Copy_Tree
+ (Source : Node_Id;
+ Map : Elist_Id := No_Elist;
+ New_Sloc : Source_Ptr := No_Location;
+ New_Scope : Entity_Id := Empty) return Node_Id;
+ -- Given a node that is the root of a subtree, Copy_Tree copies the entire
+ -- syntactic subtree, including recursively any descendents whose parent
+ -- field references a copied node (descendents not linked to a copied node
+ -- by the parent field are not copied, instead the copied tree references
+ -- the same descendent as the original in this case, which is appropriate
+ -- for non-syntactic fields such as Etype). The parent pointers in the
+ -- copy are properly set. Copy_Tree (Empty/Error) returns Empty/Error.
+ -- The one exception to the rule of not copying semantic fields is that
+ -- any implicit types attached to the subtree are duplicated, so that
+ -- the copy contains a distinct set of implicit type entities. Thus this
+ -- function is used when it is necessary to duplicate an analyzed tree,
+ -- declared in the same or some other compilation unit. This function is
+ -- declared here rather than in atree because it uses semantic information
+ -- in particular concerning the structure of itypes and the generation of
+ -- public symbols.
+
+ -- The Map argument, if set to a non-empty Elist, specifies a set of
+ -- mappings to be applied to entities in the tree. The map has the form:
+ --
+ -- old entity 1
+ -- new entity to replace references to entity 1
+ -- old entity 2
+ -- new entity to replace references to entity 2
+ -- ...
+ --
+ -- The call destroys the contents of Map in this case
+ --
+ -- The parameter New_Sloc, if set to a value other than No_Location, is
+ -- used as the Sloc value for all nodes in the new copy. If New_Sloc is
+ -- set to its default value No_Location, then the Sloc values of the
+ -- nodes in the copy are simply copied from the corresponding original.
+ --
+ -- The Comes_From_Source indication is unchanged if New_Sloc is set to
+ -- the default No_Location value, but is reset if New_Sloc is given, since
+ -- in this case the result clearly is neither a source node or an exact
+ -- copy of a source node.
+ --
+ -- The parameter New_Scope, if set to a value other than Empty, is the
+ -- value to use as the Scope for any Itypes that are copied. The most
+ -- typical value for this parameter, if given, is Current_Scope.
+
function New_External_Entity
(Kind : Entity_Kind;
Scope_Id : Entity_Id;
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 3550392f872..b8ff44a72a1 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -236,12 +236,15 @@ package body Sem_Warn is
Iter : constant Node_Id := Iteration_Scheme (Loop_Statement);
Ref : Node_Id := Empty;
- -- Reference in iteration scheme to variable that may not be modified in
- -- loop, indicating a possible infinite loop.
+ -- Reference in iteration scheme to variable that might not be modified
+ -- in loop, indicating a possible infinite loop.
Var : Entity_Id := Empty;
-- Corresponding entity (entity of Ref)
+ Function_Call_Found : Boolean := False;
+ -- True if Find_Var found a function call in the condition
+
procedure Find_Var (N : Node_Id);
-- Inspect condition to see if it depends on a single entity reference.
-- If so, Ref is set to point to the reference node, and Var is set to
@@ -305,6 +308,8 @@ package body Sem_Warn is
elsif Nkind (N) = N_Function_Call then
+ Function_Call_Found := True;
+
-- Forget it if function name is not entity, who knows what
-- we might be calling?
@@ -541,7 +546,7 @@ package body Sem_Warn is
-- Start of processing for Check_Infinite_Loop_Warning
begin
- -- We need a while iteration with no condition actions. Conditions
+ -- We need a while iteration with no condition actions. Condition
-- actions just make things too complicated to get the warning right.
if No (Iter)
@@ -556,19 +561,25 @@ package body Sem_Warn is
Find_Var (Condition (Iter));
- -- Nothing to do if local variable from source not found
+ -- Nothing to do if local variable from source not found. If it's a
+ -- renaming, it is probably renaming something too complicated to deal
+ -- with here.
if No (Var)
or else Ekind (Var) /= E_Variable
or else Is_Library_Level_Entity (Var)
or else not Comes_From_Source (Var)
+ or else Nkind (Parent (Var)) = N_Object_Renaming_Declaration
then
return;
-- Nothing to do if there is some indirection involved (assume that the
-- designated variable might be modified in some way we don't see).
+ -- However, if no function call was found, then we don't care about
+ -- indirections, because the condition must be something like "while X
+ -- /= null loop", so we don't care if X.all is modified in the loop.
- elsif Has_Indirection (Etype (Var)) then
+ elsif Function_Call_Found and then Has_Indirection (Etype (Var)) then
return;
-- Same sort of thing for volatile variable, might be modified by
@@ -3006,6 +3017,7 @@ package body Sem_Warn is
when 'X' =>
Warn_On_Non_Local_Exception := False;
+ No_Warn_On_Non_Local_Exception := True;
when others =>
return False;
@@ -3079,6 +3091,8 @@ package body Sem_Warn is
Warn_On_Unrepped_Components := False;
Warn_On_Warnings_Off := False;
+ No_Warn_On_Non_Local_Exception := True;
+
when 'b' =>
Warn_On_Bad_Fixed_Value := True;
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 91d286fcc6d..b87c917c44d 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -621,10 +621,15 @@ package Sinfo is
-- A flag present in the N_Assignment_Statement node. It is used only
-- if the type being assigned is an array type, and is set if analysis
-- determines that it is definitely safe to do the copy backwards, i.e.
- -- starting at the highest addressed element. Note that if neither of the
- -- flags Forwards_OK or Backwards_OK is set, it means that the front end
- -- could not determine that either direction is definitely safe, and a
- -- runtime check may be required if the backend cannot figure it out.
+ -- starting at the highest addressed element. This is the case if either
+ -- the operands do not overlap, or they may overlap, but if they do,
+ -- then the left operand is at a higher address than the right operand.
+ --
+ -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
+ -- means that the front end could not determine that either direction is
+ -- definitely safe, and a runtime check may be required if the backend
+ -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
+ -- set, it means that the front end can assure no overlap of operands.
-- Body_To_Inline (Node3-Sem)
-- present in subprogram declarations. Denotes analyzed but unexpanded
@@ -806,7 +811,7 @@ package Sinfo is
-- See also the description of Do_Range_Check for this case. The only
-- attribute references which use this flag are Pred and Succ, where it
-- means that the result should be checked for going outside the base
- -- range.
+ -- range. Note that this flag is not set for modular types.
-- Do_Range_Check (Flag9-Sem)
-- This flag is set on an expression which appears in a context where a
@@ -971,7 +976,7 @@ package Sinfo is
-- Expansion_Delayed (Flag11-Sem)
-- Set on aggregates and extension aggregates that need a top-down rather
- -- than bottom up expansion. Typically aggregate expansion happens bottom
+ -- than bottom-up expansion. Typically aggregate expansion happens bottom
-- up. For nested aggregates the expansion is delayed until the enclosing
-- aggregate itself is expanded, e.g. in the context of a declaration. To
-- delay it we set this flag. This is done to avoid creating a temporary
@@ -1023,10 +1028,15 @@ package Sinfo is
-- A flag present in the N_Assignment_Statement node. It is used only
-- if the type being assigned is an array type, and is set if analysis
-- determines that it is definitely safe to do the copy forwards, i.e.
- -- starting at the lowest addressed element. Note that if neither of the
- -- flags Forwards_OK or Backwards_OK is set, it means that the front end
- -- could not determine that either direction is definitely safe, and a
- -- runtime check is required.
+ -- starting at the lowest addressed element. This is the case if either
+ -- the operands do not overlap, or they may overlap, but if they do,
+ -- then the left operand is at a lower address than the right operand.
+ --
+ -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
+ -- means that the front end could not determine that either direction is
+ -- definitely safe, and a runtime check may be required if the backend
+ -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
+ -- set, it means that the front end can assure no overlap of operands.
-- From_At_End (Flag4-Sem)
-- This flag is set on an N_Raise_Statement node if it corresponds to
diff --git a/gcc/ada/sinput-l.adb b/gcc/ada/sinput-l.adb
index ac9877f7ad8..08cc5f8301a 100644
--- a/gcc/ada/sinput-l.adb
+++ b/gcc/ada/sinput-l.adb
@@ -494,9 +494,9 @@ package body Sinput.L is
Prep_Buffer_Last := 0;
- -- Initialize the preprocessor
+ -- Initialize the preprocessor hooks
- Prep.Initialize
+ Prep.Setup_Hooks
(Error_Msg => Errout.Error_Msg'Access,
Scan => Scn.Scanner.Scan'Access,
Set_Ignore_Errors => Errout.Set_Ignore_Errors'Access,
diff --git a/gcc/ada/sinput-p.adb b/gcc/ada/sinput-p.adb
index b57c73bf957..2c9dc0636fc 100644
--- a/gcc/ada/sinput-p.adb
+++ b/gcc/ada/sinput-p.adb
@@ -23,9 +23,14 @@
-- --
------------------------------------------------------------------------------
+with Ada.Unchecked_Conversion;
+with Ada.Unchecked_Deallocation;
+
with Prj.Err;
with Sinput.C;
+with System;
+
package body Sinput.P is
First : Boolean := True;
@@ -34,6 +39,59 @@ package body Sinput.P is
-- The flag is reset to False at the first call to Load_Project_File.
-- Calling Reset_First sets it back to True.
+ procedure Free is new Ada.Unchecked_Deallocation
+ (Lines_Table_Type, Lines_Table_Ptr);
+
+ procedure Free is new Ada.Unchecked_Deallocation
+ (Logical_Lines_Table_Type, Logical_Lines_Table_Ptr);
+
+ -----------------------------
+ -- Clear_Source_File_Table --
+ -----------------------------
+
+ procedure Clear_Source_File_Table is
+ use System;
+
+ begin
+ for X in 1 .. Source_File.Last loop
+ declare
+ S : Source_File_Record renames Source_File.Table (X);
+ Lo : constant Source_Ptr := S.Source_First;
+ Hi : constant Source_Ptr := S.Source_Last;
+ subtype Actual_Source_Buffer is Source_Buffer (Lo .. Hi);
+ -- Physical buffer allocated
+
+ type Actual_Source_Ptr is access Actual_Source_Buffer;
+ -- This is the pointer type for the physical buffer allocated
+
+ procedure Free is new Ada.Unchecked_Deallocation
+ (Actual_Source_Buffer, Actual_Source_Ptr);
+
+ pragma Suppress (All_Checks);
+
+ pragma Warnings (Off);
+ -- The following unchecked conversion is aliased safe, since it
+ -- is not used to create improperly aliased pointer values.
+
+ function To_Actual_Source_Ptr is new
+ Ada.Unchecked_Conversion (Address, Actual_Source_Ptr);
+
+ pragma Warnings (On);
+
+ Actual_Ptr : Actual_Source_Ptr :=
+ To_Actual_Source_Ptr (S.Source_Text (Lo)'Address);
+
+ begin
+ Free (Actual_Ptr);
+ Free (S.Lines_Table);
+ Free (S.Logical_Lines_Table);
+ end;
+ end loop;
+
+ Source_File.Free;
+ Sinput.Initialize;
+ end Clear_Source_File_Table;
+
-----------------------
-- Load_Project_File --
-----------------------
@@ -100,11 +158,10 @@ package body Sinput.P is
Prj.Err.Scanner.Set_Special_Character ('#');
Prj.Err.Scanner.Set_Special_Character ('$');
- -- We scan past junk to the first interesting compilation unit
- -- token, to see if it is SEPARATE. We ignore WITH keywords during
- -- this and also PRIVATE. The reason for ignoring PRIVATE is that
- -- it handles some error situations, and also to handle PRIVATE WITH
- -- in Ada 2005 mode.
+ -- We scan past junk to the first interesting compilation unit token, to
+ -- see if it is SEPARATE. We ignore WITH keywords during this and also
+ -- PRIVATE. The reason for ignoring PRIVATE is that it handles some
+ -- error situations, and also to handle PRIVATE WITH in Ada 2005 mode.
while Token = Tok_With
or else Token = Tok_Private
diff --git a/gcc/ada/sinput-p.ads b/gcc/ada/sinput-p.ads
index 2eb3e376802..8f925bbc9a0 100644
--- a/gcc/ada/sinput-p.ads
+++ b/gcc/ada/sinput-p.ads
@@ -31,6 +31,13 @@ with Scans; use Scans;
package Sinput.P is
+ procedure Clear_Source_File_Table;
+ -- This procedure frees memory allocated in the Source_File table (in the
+ -- private part of package Sinput). It should only be used when it is
+ -- guaranteed that all source files that have been loaded so far will not
+ -- be accessed before being reloaded. It is intended for tools that parse
+ -- several times sources, to avoid memory leaks.
+
function Load_Project_File (Path : String) return Source_File_Index;
-- Load the source of a project source file into memory and initialize the
-- Scans state.
diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl
index 8943b7a53a5..2f4c6cc3b08 100644
--- a/gcc/ada/snames.ads-tmpl
+++ b/gcc/ada/snames.ads-tmpl
@@ -220,6 +220,10 @@ package Snames is
Name_Put_Line : constant Name_Id := N + $;
Name_To : constant Name_Id := N + $;
+ -- Name used by the integrated preprocessor
+
+ Name_Defined : constant Name_Id := N + $;
+
-- Names for packages that are treated specially by the compiler
Name_Exception_Traces : constant Name_Id := N + $;
@@ -1093,6 +1097,7 @@ package Snames is
Name_Metrics : constant Name_Id := N + $;
Name_Naming : constant Name_Id := N + $;
Name_None : constant Name_Id := N + $;
+ Name_Object_File_Suffix : constant Name_Id := N + $;
Name_Object_Generated : constant Name_Id := N + $;
Name_Object_List : constant Name_Id := N + $;
Name_Objects_Linked : constant Name_Id := N + $;
@@ -1130,6 +1135,7 @@ package Snames is
Name_Toolchain_Description : constant Name_Id := N + $;
Name_Toolchain_Version : constant Name_Id := N + $;
Name_Runtime_Library_Dir : constant Name_Id := N + $;
+ Name_Runtime_Source_Dir : constant Name_Id := N + $;
-- Other miscellaneous names used in front end
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 1ea8bac1e48..35ecce93fc9 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -3719,7 +3719,7 @@ package body Sprint is
Write_Id (Directly_Designated_Type (Typ));
- -- Array types and string types
+ -- Array types and string types
when E_Array_Type | E_String_Type =>
Write_Header;
@@ -3748,7 +3748,8 @@ package body Sprint is
Sprint_Node (X);
Set_Sloc (X, Old_Sloc);
- -- Array subtypes and string subtypes
+ -- Array subtypes and string subtypes.
+ -- Preserve Sloc of index subtypes, as above.
when E_Array_Subtype | E_String_Subtype =>
Write_Header (False);
@@ -3757,7 +3758,9 @@ package body Sprint is
X := First_Index (Typ);
loop
+ Old_Sloc := Sloc (X);
Sprint_Node (X);
+ Set_Sloc (X, Old_Sloc);
Next_Index (X);
exit when No (X);
Write_Str (", ");
@@ -3765,11 +3768,13 @@ package body Sprint is
Write_Char (')');
- -- Signed integer types, and modular integer subtypes
+ -- Signed integer types, and modular integer subtypes,
+ -- and also enumeration subtypes.
when E_Signed_Integer_Type |
E_Signed_Integer_Subtype |
- E_Modular_Integer_Subtype =>
+ E_Modular_Integer_Subtype |
+ E_Enumeration_Subtype =>
Write_Header (Ekind (Typ) = E_Signed_Integer_Type);
@@ -3821,14 +3826,14 @@ package body Sprint is
end if;
end;
- -- Modular integer types
+ -- Modular integer types
when E_Modular_Integer_Type =>
Write_Header;
Write_Str (" mod ");
Write_Uint_With_Col_Check (Modulus (Typ), Auto);
- -- Floating point types and subtypes
+ -- Floating point types and subtypes
when E_Floating_Point_Type |
E_Floating_Point_Subtype =>
@@ -4104,8 +4109,8 @@ package body Sprint is
exit when Spec = Empty;
-- Add semicolon, unless we are printing original tree and the
- -- next specification is part of a list (but not the first
- -- element of that list)
+ -- next specification is part of a list (but not the first element
+ -- of that list).
if not Dump_Original_Only or else not Prev_Ids (Spec) then
Write_Str ("; ");
diff --git a/gcc/ada/stand.ads b/gcc/ada/stand.ads
index 29d80a15296..f2fadccad8e 100644
--- a/gcc/ada/stand.ads
+++ b/gcc/ada/stand.ads
@@ -35,13 +35,6 @@
with Types; use Types;
--- Do we really need the with of Namet?
-
-pragma Warnings (Off);
-with Namet; use Namet;
-pragma Elaborate_All (Namet);
-pragma Warnings (On);
-
package Stand is
type Standard_Entity_Type is (
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
index a0fd4b0a115..8a227b42037 100644
--- a/gcc/ada/sysdep.c
+++ b/gcc/ada/sysdep.c
@@ -348,7 +348,7 @@ __gnat_ttyname (int filedes)
|| defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
|| (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
|| defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- || defined (__GLIBC__)
+ || defined (__GLIBC__) || defined (__APPLE__)
#ifdef __MINGW32__
#if OLD_MINGW
@@ -406,7 +406,7 @@ getc_immediate_common (FILE *stream,
|| defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (i386)) \
|| defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- || defined (__GLIBC__)
+ || defined (__GLIBC__) || defined (__APPLE__)
char c;
int nread;
int good_one = 0;
@@ -426,7 +426,7 @@ getc_immediate_common (FILE *stream,
|| defined (__osf__) || defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (i386)) \
|| defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- || defined (__GLIBC__)
+ || defined (__GLIBC__) || defined (__APPLE__)
eof_ch = termios_rec.c_cc[VEOF];
/* If waiting (i.e. Get_Immediate (Char)), set MIN = 1 and wait for
@@ -743,26 +743,53 @@ extern void (*Unlock_Task) (void);
/* Reentrant localtime for Windows and OS/2. */
-extern struct tm *
-__gnat_localtime_tzoff (const time_t *, struct tm *, long *);
+extern void
+__gnat_localtime_tzoff (const time_t *, long *);
-struct tm *
-__gnat_localtime_tzoff (const time_t *timer, struct tm *tp, long *off)
+static const unsigned long long w32_epoch_offset = 11644473600ULL;
+void
+__gnat_localtime_tzoff (const time_t *timer, long *off)
{
- DWORD dwRet;
- struct tm *tmp;
+ union
+ {
+ FILETIME ft_time;
+ unsigned long long ull_time;
+ } utc_time, local_time;
+
+ SYSTEMTIME utc_sys_time, local_sys_time;
TIME_ZONE_INFORMATION tzi;
+ BOOL status = 1;
+ DWORD tzi_status;
+
(*Lock_Task) ();
- tmp = localtime (timer);
- memcpy (tp, tmp, sizeof (struct tm));
- dwRet = GetTimeZoneInformation (&tzi);
- *off = tzi.Bias;
- if (tp->tm_isdst > 0)
- *off = *off + tzi.DaylightBias;
- *off = *off * -60;
+
+ /* First convert unix time_t structure to windows FILETIME format. */
+ utc_time.ull_time = ((unsigned long long) *timer + w32_epoch_offset)
+ * 10000000ULL;
+
+ tzi_status = GetTimeZoneInformation (&tzi);
+
+ /* If GetTimeZoneInformation does not return a value between 0 and 2 then
+ it means that we were not able to retrieve timezone informations.
+ Note that we cannot use here FileTimeToLocalFileTime as Windows will use
+ in always in this case the current timezone setting. As suggested on
+ MSDN we use the following three system calls to get the right information.
+ Note also that starting with Windows Vista new functions are provided to
+ get timezone settings that depend on the year. We cannot use them as we
+ still support Windows XP and Windows 2003. */
+ status = (tzi_status >= 0 && tzi_status <= 2)
+ && FileTimeToSystemTime (&utc_time.ft_time, &utc_sys_time)
+ && SystemTimeToTzSpecificLocalTime (&tzi, &utc_sys_time, &local_sys_time)
+ && SystemTimeToFileTime (&local_sys_time, &local_time.ft_time);
+
+ if (!status)
+ /* An error occurs so return invalid_tzoff. */
+ *off = __gnat_invalid_tzoff;
+ else
+ *off = (long) ((local_time.ull_time - utc_time.ull_time) / 10000000ULL);
+
(*Unlock_Task) ();
- return tp;
}
#else
@@ -774,16 +801,14 @@ __gnat_localtime_tzoff (const time_t *timer, struct tm *tp, long *off)
spec is required. Only use when ___THREADS_POSIX4ad4__ is defined,
the Lynx convention when building against the legacy API. */
-extern struct tm *
-__gnat_localtime_tzoff (const time_t *, struct tm *, long *);
+extern void
+__gnat_localtime_tzoff (const time_t *, long *);
-struct tm *
-__gnat_localtime_tzoff (const time_t *timer, struct tm *tp, long *off)
+void
+__gnat_localtime_tzoff (const time_t *timer, long *off)
{
/* Treat all time values in GMT */
- localtime_r (tp, timer);
*off = 0;
- return NULL;
}
#else
@@ -795,28 +820,21 @@ __gnat_localtime_tzoff (const time_t *timer, struct tm *tp, long *off)
/* All other targets provide a standard localtime_r */
-extern struct tm *
-__gnat_localtime_tzoff (const time_t *, struct tm *, long *);
+extern void
+__gnat_localtime_tzoff (const time_t *, long *);
-struct tm *
-__gnat_localtime_tzoff (const time_t *timer, struct tm *tp, long *off)
+void
+__gnat_localtime_tzoff (const time_t *timer, long *off)
{
- localtime_r (timer, tp);
+ struct tm tp;
+ localtime_r (timer, &tp);
/* AIX, HPUX, SGI Irix, Sun Solaris */
#if defined (_AIX) || defined (__hpux__) || defined (sgi) || defined (sun)
- /* The contents of external variable "timezone" may not always be
- initialized. Instead of returning an incorrect offset, treat the local
- time zone as 0 (UTC). The value of 28 hours is the maximum valid offset
- allowed by Ada.Calendar.Time_Zones. */
- if ((timezone < -28 * 3600) || (timezone > 28 * 3600))
- *off = 0;
- else
- {
- *off = (long) -timezone;
- if (tp->tm_isdst > 0)
- *off = *off + 3600;
- }
+ *off = (long) -timezone;
+ if (tp.tm_isdst > 0)
+ *off = *off + 3600;
+
/* Lynx - Treat all time values in GMT */
#elif defined (__Lynx__)
*off = 0;
@@ -850,17 +868,16 @@ __gnat_localtime_tzoff (const time_t *timer, struct tm *tp, long *off)
}
}
-/* Darwin, Free BSD, Linux, Tru64, where there exists a component tm_gmtoff
- in struct tm */
+/* Darwin, Free BSD, Linux, Tru64, where component tm_gmtoff is present in
+ struct tm */
#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\
(defined (__alpha__) && defined (__osf__)) || defined (__GLIBC__)
- *off = tp->tm_gmtoff;
+ *off = tp.tm_gmtoff;
/* All other platforms: Treat all time values in GMT */
#else
*off = 0;
#endif
- return NULL;
}
#endif
diff --git a/gcc/ada/system-darwin-x86.ads b/gcc/ada/system-darwin-x86.ads
index d7f6d0ec272..a4d5fbf25e0 100644
--- a/gcc/ada/system-darwin-x86.ads
+++ b/gcc/ada/system-darwin-x86.ads
@@ -155,7 +155,7 @@ private
Preallocated_Stacks : constant Boolean := False;
Signed_Zeros : constant Boolean := True;
Stack_Check_Default : constant Boolean := False;
- Stack_Check_Probes : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
Stack_Check_Limits : constant Boolean := False;
Support_64_Bit_Divides : constant Boolean := True;
Support_Aggregates : constant Boolean := True;
diff --git a/gcc/ada/system-darwin-x86_64.ads b/gcc/ada/system-darwin-x86_64.ads
index e57910b188f..4211f347c8e 100644
--- a/gcc/ada/system-darwin-x86_64.ads
+++ b/gcc/ada/system-darwin-x86_64.ads
@@ -5,7 +5,7 @@
-- S Y S T E M --
-- --
-- S p e c --
--- (Darwin/x86_64 Version) --
+-- (Darwin/x86_64 Version) --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
@@ -142,7 +142,7 @@ private
-- of the individual switch values.
Backend_Divide_Checks : constant Boolean := False;
- Backend_Overflow_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
Command_Line_Args : constant Boolean := True;
Configurable_Run_Time : constant Boolean := False;
Denorm : constant Boolean := True;
@@ -155,7 +155,7 @@ private
Preallocated_Stacks : constant Boolean := False;
Signed_Zeros : constant Boolean := True;
Stack_Check_Default : constant Boolean := False;
- Stack_Check_Probes : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
Stack_Check_Limits : constant Boolean := False;
Support_64_Bit_Divides : constant Boolean := True;
Support_Aggregates : constant Boolean := True;
diff --git a/gcc/ada/system-mingw-x86_64.ads b/gcc/ada/system-mingw-x86_64.ads
index c60f6aa1d40..587fd21163d 100644
--- a/gcc/ada/system-mingw-x86_64.ads
+++ b/gcc/ada/system-mingw-x86_64.ads
@@ -116,7 +116,7 @@ private
-- of the individual switch values.
Backend_Divide_Checks : constant Boolean := False;
- Backend_Overflow_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
Command_Line_Args : constant Boolean := True;
Configurable_Run_Time : constant Boolean := False;
Denorm : constant Boolean := True;
diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb
index 52bbbcb953c..da42ba8b7b5 100644
--- a/gcc/ada/targparm.adb
+++ b/gcc/ada/targparm.adb
@@ -408,10 +408,10 @@ package body Targparm is
-- Suppress_Exception_Locations
- elsif System_Text (P .. P + 34) =
- "pragma Suppress_Exception_Locations;"
+ elsif System_Text (P .. P + 35) =
+ "pragma Suppress_Exception_Locations;"
then
- P := P + 35;
+ P := P + 36;
Opt.Exception_Locations_Suppressed := True;
goto Line_Loop_Continue;
diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb
index 217c7f2d8f2..395a7137659 100644
--- a/gcc/ada/tbuild.adb
+++ b/gcc/ada/tbuild.adb
@@ -511,8 +511,7 @@ package body Tbuild is
if Suffix /= ' ' then
pragma Assert (Is_OK_Internal_Letter (Suffix));
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := Suffix;
+ Add_Char_To_Name_Buffer (Suffix);
end if;
if Suffix_Index /= 0 then
@@ -637,10 +636,8 @@ package body Tbuild is
is
begin
Get_Name_String (Related_Id);
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := '_';
- Name_Buffer (Name_Len + 1 .. Name_Len + Suffix'Length) := Suffix;
- Name_Len := Name_Len + Suffix'Length;
+ Add_Char_To_Name_Buffer ('_');
+ Add_Str_To_Name_Buffer (Suffix);
return Name_Find;
end New_Suffixed_Name;
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index 8a69057ed77..8f3c4cc389d 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -317,7 +317,8 @@ struct layout
#define FRAME_OFFSET(FP) 0
#define PC_ADJUST -2
#define STOP_FRAME(CURRENT, TOP_STACK) \
- (IS_BAD_PTR((long)(CURRENT)->return_address) \
+ (IS_BAD_PTR((long)(CURRENT)) \
+ || IS_BAD_PTR((long)(CURRENT)->return_address) \
|| (CURRENT)->return_address == 0|| (CURRENT)->next == 0 \
|| (void *) (CURRENT) < (TOP_STACK))
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index 94b037e7518..96b60b579de 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -192,8 +192,8 @@ package Types is
subtype Source_Buffer is Text_Buffer;
-- Type used to store text of a source file . The buffer for the main
-- source (the source specified on the command line) has a lower bound
- -- starting at zero. Subsequent subsidiary sources have lower bounds which
- -- are one greater than the previous upper bound.
+ -- starting at zero. Subsequent subsidiary sources have lower bounds
+ -- which are one greater than the previous upper bound.
subtype Big_Source_Buffer is Text_Buffer (0 .. Text_Ptr'Last);
-- This is a virtual type used as the designated type of the access
@@ -787,24 +787,25 @@ package Types is
PE_Access_Before_Elaboration, -- 14
PE_Accessibility_Check_Failed, -- 15
- PE_All_Guards_Closed, -- 16
- PE_Current_Task_In_Entry_Body, -- 17
- PE_Duplicated_Entry_Address, -- 18
- PE_Explicit_Raise, -- 19
- PE_Finalize_Raised_Exception, -- 20
- PE_Implicit_Return, -- 21
- PE_Misaligned_Address_Value, -- 22
- PE_Missing_Return, -- 23
- PE_Overlaid_Controlled_Object, -- 24
- PE_Potentially_Blocking_Operation, -- 25
- PE_Stubbed_Subprogram_Called, -- 26
- PE_Unchecked_Union_Restriction, -- 27
- PE_Non_Transportable_Actual, -- 28
-
- SE_Empty_Storage_Pool, -- 29
- SE_Explicit_Raise, -- 30
- SE_Infinite_Recursion, -- 31
- SE_Object_Too_Large); -- 32
+ PE_Address_Of_Intrinsic, -- 16
+ PE_All_Guards_Closed, -- 17
+ PE_Current_Task_In_Entry_Body, -- 18
+ PE_Duplicated_Entry_Address, -- 19
+ PE_Explicit_Raise, -- 20
+ PE_Finalize_Raised_Exception, -- 21
+ PE_Implicit_Return, -- 22
+ PE_Misaligned_Address_Value, -- 23
+ PE_Missing_Return, -- 24
+ PE_Overlaid_Controlled_Object, -- 25
+ PE_Potentially_Blocking_Operation, -- 26
+ PE_Stubbed_Subprogram_Called, -- 27
+ PE_Unchecked_Union_Restriction, -- 28
+ PE_Non_Transportable_Actual, -- 29
+
+ SE_Empty_Storage_Pool, -- 30
+ SE_Explicit_Raise, -- 31
+ SE_Infinite_Recursion, -- 32
+ SE_Object_Too_Large); -- 33
subtype RT_CE_Exceptions is RT_Exception_Code range
CE_Access_Check_Failed ..
diff --git a/gcc/ada/types.h b/gcc/ada/types.h
index 1d4fd67065b..9b2cc9036bd 100644
--- a/gcc/ada/types.h
+++ b/gcc/ada/types.h
@@ -359,23 +359,24 @@ typedef Int Mechanism_Type;
#define PE_Access_Before_Elaboration 14
#define PE_Accessibility_Check_Failed 15
-#define PE_All_Guards_Closed 16
-#define PE_Current_Task_In_Entry_Body 17
-#define PE_Duplicated_Entry_Address 18
-#define PE_Explicit_Raise 19
-#define PE_Finalize_Raised_Exception 20
-#define PE_Implicit_Return 21
-#define PE_Misaligned_Address_Value 22
-#define PE_Missing_Return 23
-#define PE_Overlaid_Controlled_Object 24
-#define PE_Potentially_Blocking_Operation 25
-#define PE_Stubbed_Subprogram_Called 26
-#define PE_Unchecked_Union_Restriction 27
-#define PE_Non_Transportable_Actual 28
-
-#define SE_Empty_Storage_Pool 29
-#define SE_Explicit_Raise 30
-#define SE_Infinite_Recursion 31
-#define SE_Object_Too_Large 32
-
-#define LAST_REASON_CODE 32
+#define PE_Address_Of_Intrinsic 16
+#define PE_All_Guards_Closed 17
+#define PE_Current_Task_In_Entry_Body 18
+#define PE_Duplicated_Entry_Address 19
+#define PE_Explicit_Raise 20
+#define PE_Finalize_Raised_Exception 21
+#define PE_Implicit_Return 22
+#define PE_Misaligned_Address_Value 23
+#define PE_Missing_Return 24
+#define PE_Overlaid_Controlled_Object 25
+#define PE_Potentially_Blocking_Operation 26
+#define PE_Stubbed_Subprogram_Called 27
+#define PE_Unchecked_Union_Restriction 28
+#define PE_Non_Transportable_Actual 29
+
+#define SE_Empty_Storage_Pool 30
+#define SE_Explicit_Raise 31
+#define SE_Infinite_Recursion 32
+#define SE_Object_Too_Large 33
+
+#define LAST_REASON_CODE 33
diff --git a/gcc/ada/xoscons.adb b/gcc/ada/xoscons.adb
index efce54a1f11..4f5e4a291c7 100644
--- a/gcc/ada/xoscons.adb
+++ b/gcc/ada/xoscons.adb
@@ -23,14 +23,14 @@
-- --
------------------------------------------------------------------------------
--- This program generates the spec of System.OS_Constants (s-oscons.ads).
+-- This program generates the spec of System.OS_Constants (s-oscons.ads)
-- It works in conjunction with a C template file which must be pre-processed
-- and compiled using the cross compiler. Two input files are used:
-- - the preprocessed C file: s-oscons-tmplt.i
-- - the generated assembly file: s-oscons-tmplt.s
--- The contents of s-oscons.ads is written on standard output.
+-- The contents of s-oscons.ads is written on standard output
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Exceptions; use Ada.Exceptions;
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index accba8d0d22..be36f2c6e4a 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -1,5 +1,5 @@
/* Perform branch target register load optimizations.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -1513,7 +1513,7 @@ struct rtl_opt_pass pass_branch_target_load_optimize1 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1563,7 +1563,7 @@ struct rtl_opt_pass pass_branch_target_load_optimize2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1572,4 +1572,3 @@ struct rtl_opt_pass pass_branch_target_load_optimize2 =
TODO_ggc_collect, /* todo_flags_finish */
}
};
-
diff --git a/gcc/builtins.def b/gcc/builtins.def
index 7a98c76394c..3f4e251c3fd 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -700,9 +700,9 @@ DEF_LIB_BUILTIN (BUILT_IN_STRFTIME, "strftime", BT_FN_SIZE_STRING_SIZE_CO
DEF_GCC_BUILTIN (BUILT_IN_TRAP, "trap", BT_FN_VOID, ATTR_NORETURN_NOTHROW_LIST)
DEF_GCC_BUILTIN (BUILT_IN_UNWIND_INIT, "unwind_init", BT_FN_VOID, ATTR_NULL)
DEF_GCC_BUILTIN (BUILT_IN_UPDATE_SETJMP_BUF, "update_setjmp_buf", BT_FN_VOID_PTR_INT, ATTR_NULL)
-DEF_GCC_BUILTIN (BUILT_IN_VA_COPY, "va_copy", BT_FN_VOID_VALIST_REF_VALIST_ARG, ATTR_NULL)
-DEF_GCC_BUILTIN (BUILT_IN_VA_END, "va_end", BT_FN_VOID_VALIST_REF, ATTR_NULL)
-DEF_GCC_BUILTIN (BUILT_IN_VA_START, "va_start", BT_FN_VOID_VALIST_REF_VAR, ATTR_NULL)
+DEF_GCC_BUILTIN (BUILT_IN_VA_COPY, "va_copy", BT_FN_VOID_VALIST_REF_VALIST_ARG, ATTR_NOTHROW_LIST)
+DEF_GCC_BUILTIN (BUILT_IN_VA_END, "va_end", BT_FN_VOID_VALIST_REF, ATTR_NOTHROW_LIST)
+DEF_GCC_BUILTIN (BUILT_IN_VA_START, "va_start", BT_FN_VOID_VALIST_REF_VAR, ATTR_NOTHROW_LIST)
DEF_GCC_BUILTIN (BUILT_IN_VA_ARG_PACK, "va_arg_pack", BT_FN_INT, ATTR_PURE_NOTHROW_LIST)
DEF_GCC_BUILTIN (BUILT_IN_VA_ARG_PACK_LEN, "va_arg_pack_len", BT_FN_INT, ATTR_PURE_NOTHROW_LIST)
DEF_EXT_LIB_BUILTIN (BUILT_IN__EXIT, "_exit", BT_FN_VOID_INT, ATTR_NORETURN_NOTHROW_LIST)
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 3d114550fa2..735c8e0b5c4 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1712,38 +1712,43 @@ overflow_warning (tree value)
}
}
-
-/* Warn about use of a logical || / && operator being used in a
- context where it is likely that the bitwise equivalent was intended
- by the programmer. CODE is the TREE_CODE of the operator, ARG1
- and ARG2 the arguments. */
+/* Warn about uses of logical || / && operator in a context where it
+ is likely that the bitwise equivalent was intended by the
+ programmer. We have seen an expression in which CODE is a binary
+ operator used to combine expressions OP_LEFT and OP_RIGHT, which
+ before folding had CODE_LEFT and CODE_RIGHT. */
void
-warn_logical_operator (enum tree_code code, tree arg1, tree
- arg2)
-{
- switch (code)
- {
- case TRUTH_ANDIF_EXPR:
- case TRUTH_ORIF_EXPR:
- case TRUTH_OR_EXPR:
- case TRUTH_AND_EXPR:
- if (!TREE_NO_WARNING (arg1)
- && INTEGRAL_TYPE_P (TREE_TYPE (arg1))
- && !CONSTANT_CLASS_P (arg1)
- && TREE_CODE (arg2) == INTEGER_CST
- && !integer_zerop (arg2))
- {
- warning (OPT_Wlogical_op,
- "logical %<%s%> with non-zero constant "
- "will always evaluate as true",
- ((code == TRUTH_ANDIF_EXPR)
- || (code == TRUTH_AND_EXPR)) ? "&&" : "||");
- TREE_NO_WARNING (arg1) = true;
- }
- break;
- default:
- break;
+warn_logical_operator (location_t location, enum tree_code code,
+ enum tree_code code_left, tree op_left,
+ enum tree_code ARG_UNUSED (code_right), tree op_right)
+{
+ if (code != TRUTH_ANDIF_EXPR
+ && code != TRUTH_AND_EXPR
+ && code != TRUTH_ORIF_EXPR
+ && code != TRUTH_OR_EXPR)
+ return;
+
+ /* Warn if &&/|| are being used in a context where it is
+ likely that the bitwise equivalent was intended by the
+ programmer. That is, an expression such as op && MASK
+ where op should not be any boolean expression, nor a
+ constant, and mask seems to be a non-boolean integer constant. */
+ if (!truth_value_p (code_left)
+ && INTEGRAL_TYPE_P (TREE_TYPE (op_left))
+ && !CONSTANT_CLASS_P (op_left)
+ && !TREE_NO_WARNING (op_left)
+ && TREE_CODE (op_right) == INTEGER_CST
+ && !integer_zerop (op_right)
+ && !integer_onep (op_right))
+ {
+ if (code == TRUTH_ORIF_EXPR || code == TRUTH_OR_EXPR)
+ warning_at (location, OPT_Wlogical_op, "logical %<or%>"
+ " applied to non-boolean constant");
+ else
+ warning_at (location, OPT_Wlogical_op, "logical %<and%>"
+ " applied to non-boolean constant");
+ TREE_NO_WARNING (op_left) = true;
}
}
@@ -1882,7 +1887,7 @@ bool
vector_targets_convertible_p (const_tree t1, const_tree t2)
{
if (TREE_CODE (t1) == VECTOR_TYPE && TREE_CODE (t2) == VECTOR_TYPE
- && (targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2))
+ && (TYPE_VECTOR_OPAQUE (t1) || TYPE_VECTOR_OPAQUE (t2))
&& tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)))
return true;
@@ -1900,7 +1905,7 @@ vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note)
static bool emitted_lax_note = false;
bool convertible_lax;
- if ((targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2))
+ if ((TYPE_VECTOR_OPAQUE (t1) || TYPE_VECTOR_OPAQUE (t2))
&& tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)))
return true;
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 061cbe3ad0c..723f8b5ef18 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -801,7 +801,8 @@ extern bool strict_aliasing_warning (tree, tree, tree);
extern void warnings_for_convert_and_check (tree, tree, tree);
extern tree convert_and_check (tree, tree);
extern void overflow_warning (tree);
-extern void warn_logical_operator (enum tree_code, tree, tree);
+extern void warn_logical_operator (location_t, enum tree_code,
+ enum tree_code, tree, enum tree_code, tree);
extern void check_main_parameter_types (tree decl);
extern bool c_determine_visibility (tree);
extern bool same_scalar_type_ignoring_signedness (tree, tree);
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 62262034d8c..796f1eaadf3 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2883,6 +2883,12 @@ shadow_tag_warned (const struct c_declspecs *declspecs, int warned)
found_tag = true;
+ if (declspecs->restrict_p)
+ {
+ error ("invalid use of %<restrict%>");
+ warned = 1;
+ }
+
if (name == 0)
{
if (warned != 1 && code != ENUMERAL_TYPE)
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 54edf302ab0..ece4d7f8a4a 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -412,6 +412,12 @@ c_common_handle_option (size_t scode, const char *arg, int value)
can turn it off only if it's not explicit. */
if (warn_main == -1)
warn_main = (value ? 2 : 0);
+
+ /* In C, -Wall turns on -Wenum-compare, which we do here.
+ In C++ it is on by default, which is done in
+ c_common_post_options. */
+ if (warn_enum_compare == -1)
+ warn_enum_compare = value;
}
else
{
@@ -438,6 +444,13 @@ c_common_handle_option (size_t scode, const char *arg, int value)
cpp_opts->warn_comments = value;
break;
+ case OPT_Wc___compat:
+ /* Because -Wenum-compare is the default in C++, -Wc++-compat
+ implies -Wenum-compare. */
+ if (warn_enum_compare == -1 && value)
+ warn_enum_compare = value;
+ break;
+
case OPT_Wdeprecated:
cpp_opts->warn_deprecated = value;
break;
@@ -1067,6 +1080,8 @@ c_common_post_options (const char **pfilename)
warn_override_init = extra_warnings;
if (warn_ignored_qualifiers == -1)
warn_ignored_qualifiers = extra_warnings;
+ if (warn_logical_op == -1)
+ warn_logical_op = extra_warnings;
/* -Wpointer-sign is disabled by default, but it is enabled if any
of -Wall or -pedantic are given. */
@@ -1099,6 +1114,12 @@ c_common_post_options (const char **pfilename)
if (warn_sign_conversion == -1)
warn_sign_conversion = (c_dialect_cxx ()) ? 0 : warn_conversion;
+ /* In C, -Wall and -Wc++-compat enable -Wenum-compare, which we do
+ in c_common_handle_option; if it has not yet been set, it is
+ disabled by default. In C++, it is enabled by default. */
+ if (warn_enum_compare == -1)
+ warn_enum_compare = c_dialect_cxx () ? 1 : 0;
+
/* -Wpacked-bitfield-compat is on by default for the C languages. The
warning is issued in stor-layout.c which is not part of the front-end so
we need to selectively turn it on here. */
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 7887391dfcc..9b3ace515a9 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -3044,6 +3044,7 @@ c_parser_braced_init (c_parser *parser, tree type, bool nested_p)
struct c_expr ret;
ret.value = error_mark_node;
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, "expected %<}%>");
pop_init_level (0);
return ret;
@@ -3100,6 +3101,7 @@ c_parser_initelt (c_parser *parser)
struct c_expr init;
init.value = error_mark_node;
init.original_code = ERROR_MARK;
+ init.original_type = NULL;
c_parser_error (parser, "expected identifier");
c_parser_skip_until_found (parser, CPP_COMMA, NULL);
process_init_element (init, false);
@@ -3174,6 +3176,7 @@ c_parser_initelt (c_parser *parser)
mexpr.value
= objc_build_message_expr (build_tree_list (rec, args));
mexpr.original_code = ERROR_MARK;
+ mexpr.original_type = NULL;
/* Now parse and process the remainder of the
initializer, starting with this message
expression as a primary-expression. */
@@ -3223,6 +3226,7 @@ c_parser_initelt (c_parser *parser)
struct c_expr init;
init.value = error_mark_node;
init.original_code = ERROR_MARK;
+ init.original_type = NULL;
c_parser_error (parser, "expected %<=%>");
c_parser_skip_until_found (parser, CPP_COMMA, NULL);
process_init_element (init, false);
@@ -4438,6 +4442,7 @@ c_parser_expr_no_commas (c_parser *parser, struct c_expr *after)
TREE_NO_WARNING (ret.value) = 1;
ret.original_code = ERROR_MARK;
}
+ ret.original_type = NULL;
return ret;
}
@@ -4485,6 +4490,7 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
exp1.value = c_save_expr (default_conversion (cond.value));
if (eptype)
exp1.value = build1 (EXCESS_PRECISION_EXPR, eptype, exp1.value);
+ exp1.original_type = NULL;
cond.value = c_objc_common_truthvalue_conversion (cond_loc, exp1.value);
skip_evaluation += cond.value == truthvalue_true_node;
}
@@ -4503,6 +4509,7 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
skip_evaluation -= cond.value == truthvalue_true_node;
ret.value = error_mark_node;
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
return ret;
}
exp2 = c_parser_conditional_expression (parser, NULL);
@@ -4512,6 +4519,24 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
cond.original_code == C_MAYBE_CONST_EXPR,
exp1.value, exp2.value);
ret.original_code = ERROR_MARK;
+ if (exp1.value == error_mark_node || exp2.value == error_mark_node)
+ ret.original_type = NULL;
+ else
+ {
+ tree t1, t2;
+
+ /* If both sides are enum type, the default conversion will have
+ made the type of the result be an integer type. We want to
+ remember the enum types we started with. */
+ t1 = exp1.original_type ? exp1.original_type : TREE_TYPE (exp1.value);
+ t2 = exp2.original_type ? exp2.original_type : TREE_TYPE (exp2.value);
+ ret.original_type = ((t1 != error_mark_node
+ && t2 != error_mark_node
+ && (TYPE_MAIN_VARIANT (t1)
+ == TYPE_MAIN_VARIANT (t2)))
+ ? t1
+ : NULL);
+ }
return ret;
}
@@ -4800,6 +4825,7 @@ c_parser_cast_expression (c_parser *parser, struct c_expr *after)
{
ret.value = error_mark_node;
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
return ret;
}
@@ -4813,6 +4839,7 @@ c_parser_cast_expression (c_parser *parser, struct c_expr *after)
expr = default_function_array_conversion (expr);
ret.value = c_cast_expr (type_name, expr.value);
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
return ret;
}
else
@@ -4852,6 +4879,8 @@ c_parser_unary_expression (c_parser *parser)
int ext;
struct c_expr ret, op;
location_t loc = c_parser_peek_token (parser)->location;
+ ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
switch (c_parser_peek_token (parser)->type)
{
case CPP_PLUS_PLUS:
@@ -4874,7 +4903,6 @@ c_parser_unary_expression (c_parser *parser)
op = c_parser_cast_expression (parser, NULL);
op = default_function_array_conversion (op);
ret.value = build_indirect_ref (loc, op.value, "unary *");
- ret.original_code = ERROR_MARK;
return ret;
case CPP_PLUS:
if (!c_dialect_objc () && !in_system_header)
@@ -4914,7 +4942,6 @@ c_parser_unary_expression (c_parser *parser)
c_parser_error (parser, "expected identifier");
ret.value = error_mark_node;
}
- ret.original_code = ERROR_MARK;
return ret;
case CPP_KEYWORD:
switch (c_parser_peek_token (parser)->keyword)
@@ -4975,6 +5002,7 @@ c_parser_sizeof_expression (c_parser *parser)
in_sizeof--;
ret.value = error_mark_node;
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
return ret;
}
if (c_parser_next_token_is (parser, CPP_OPEN_BRACE))
@@ -5029,6 +5057,7 @@ c_parser_alignof_expression (c_parser *parser)
in_alignof--;
ret.value = error_mark_node;
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
return ret;
}
if (c_parser_next_token_is (parser, CPP_OPEN_BRACE))
@@ -5042,6 +5071,7 @@ c_parser_alignof_expression (c_parser *parser)
in_alignof--;
ret.value = c_alignof (groktypename (type_name, NULL, NULL));
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
return ret;
}
else
@@ -5053,6 +5083,7 @@ c_parser_alignof_expression (c_parser *parser)
in_alignof--;
ret.value = c_alignof_expr (expr.value);
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
return ret;
}
}
@@ -5116,11 +5147,12 @@ c_parser_postfix_expression (c_parser *parser)
struct c_expr expr, e1, e2, e3;
struct c_type_name *t1, *t2;
location_t loc;
+ expr.original_code = ERROR_MARK;
+ expr.original_type = NULL;
switch (c_parser_peek_token (parser)->type)
{
case CPP_NUMBER:
expr.value = c_parser_peek_token (parser)->value;
- expr.original_code = ERROR_MARK;
loc = c_parser_peek_token (parser)->location;
c_parser_consume_token (parser);
if (TREE_CODE (expr.value) == FIXED_CST
@@ -5135,7 +5167,6 @@ c_parser_postfix_expression (c_parser *parser)
case CPP_CHAR32:
case CPP_WCHAR:
expr.value = c_parser_peek_token (parser)->value;
- expr.original_code = ERROR_MARK;
c_parser_consume_token (parser);
break;
case CPP_STRING:
@@ -5150,7 +5181,6 @@ c_parser_postfix_expression (c_parser *parser)
gcc_assert (c_dialect_objc ());
expr.value
= objc_build_string_object (c_parser_peek_token (parser)->value);
- expr.original_code = ERROR_MARK;
c_parser_consume_token (parser);
break;
case CPP_NAME:
@@ -5158,7 +5188,6 @@ c_parser_postfix_expression (c_parser *parser)
{
c_parser_error (parser, "expected expression");
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
{
@@ -5167,8 +5196,8 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_consume_token (parser);
expr.value = build_external_ref (id,
(c_parser_peek_token (parser)->type
- == CPP_OPEN_PAREN), loc);
- expr.original_code = ERROR_MARK;
+ == CPP_OPEN_PAREN), loc,
+ &expr.original_type);
}
break;
case CPP_OPEN_PAREN:
@@ -5189,7 +5218,6 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, NULL);
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
stmt = c_begin_stmt_expr ();
@@ -5199,7 +5227,6 @@ c_parser_postfix_expression (c_parser *parser)
pedwarn (here, OPT_pedantic,
"ISO C forbids braced-groups within expressions");
expr.value = c_finish_stmt_expr (stmt);
- expr.original_code = ERROR_MARK;
}
else if (c_token_starts_typename (c_parser_peek_2nd_token (parser)))
{
@@ -5215,7 +5242,6 @@ c_parser_postfix_expression (c_parser *parser)
if (type_name == NULL)
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
}
else
expr = c_parser_postfix_expression_after_paren_type (parser,
@@ -5230,6 +5256,7 @@ c_parser_postfix_expression (c_parser *parser)
TREE_NO_WARNING (expr.value) = 1;
if (expr.original_code != C_MAYBE_CONST_EXPR)
expr.original_code = ERROR_MARK;
+ /* Don't change EXPR.ORIGINAL_TYPE. */
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<)%>");
}
@@ -5243,7 +5270,6 @@ c_parser_postfix_expression (c_parser *parser)
expr.value = fname_decl (c_parser_peek_token (parser)->location,
c_parser_peek_token (parser)->keyword,
c_parser_peek_token (parser)->value);
- expr.original_code = ERROR_MARK;
c_parser_consume_token (parser);
break;
case RID_VA_ARG:
@@ -5251,7 +5277,6 @@ c_parser_postfix_expression (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
e1 = c_parser_expr_no_commas (parser, NULL);
@@ -5260,7 +5285,6 @@ c_parser_postfix_expression (c_parser *parser)
{
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
t1 = c_parser_type_name (parser);
@@ -5269,7 +5293,6 @@ c_parser_postfix_expression (c_parser *parser)
if (t1 == NULL)
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
}
else
{
@@ -5284,7 +5307,6 @@ c_parser_postfix_expression (c_parser *parser)
expr.value);
C_MAYBE_CONST_EXPR_NON_CONST (expr.value) = true;
}
- expr.original_code = ERROR_MARK;
}
break;
case RID_OFFSETOF:
@@ -5292,21 +5314,18 @@ c_parser_postfix_expression (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
t1 = c_parser_type_name (parser);
if (t1 == NULL)
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
if (!c_parser_require (parser, CPP_COMMA, "expected %<,%>"))
{
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
{
@@ -5371,7 +5390,6 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<)%>");
expr.value = fold_offsetof (offsetof_ref, NULL_TREE);
- expr.original_code = ERROR_MARK;
}
break;
case RID_CHOOSE_EXPR:
@@ -5379,7 +5397,6 @@ c_parser_postfix_expression (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
loc = c_parser_peek_token (parser)->location;
@@ -5388,7 +5405,6 @@ c_parser_postfix_expression (c_parser *parser)
{
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
e2 = c_parser_expr_no_commas (parser, NULL);
@@ -5396,7 +5412,6 @@ c_parser_postfix_expression (c_parser *parser)
{
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
e3 = c_parser_expr_no_commas (parser, NULL);
@@ -5420,28 +5435,24 @@ c_parser_postfix_expression (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
t1 = c_parser_type_name (parser);
if (t1 == NULL)
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
if (!c_parser_require (parser, CPP_COMMA, "expected %<,%>"))
{
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
t2 = c_parser_type_name (parser);
if (t2 == NULL)
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
@@ -5455,7 +5466,6 @@ c_parser_postfix_expression (c_parser *parser)
expr.value = comptypes (e1, e2)
? build_int_cst (NULL_TREE, 1)
: build_int_cst (NULL_TREE, 0);
- expr.original_code = ERROR_MARK;
}
break;
case RID_AT_SELECTOR:
@@ -5464,7 +5474,6 @@ c_parser_postfix_expression (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
{
@@ -5472,7 +5481,6 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<)%>");
expr.value = objc_build_selector_expr (sel);
- expr.original_code = ERROR_MARK;
}
break;
case RID_AT_PROTOCOL:
@@ -5481,7 +5489,6 @@ c_parser_postfix_expression (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
if (c_parser_next_token_is_not (parser, CPP_NAME))
@@ -5489,7 +5496,6 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_error (parser, "expected identifier");
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
{
@@ -5498,7 +5504,6 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<)%>");
expr.value = objc_build_protocol_expr (id);
- expr.original_code = ERROR_MARK;
}
break;
case RID_AT_ENCODE:
@@ -5508,14 +5513,12 @@ c_parser_postfix_expression (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
t1 = c_parser_type_name (parser);
if (t1 == NULL)
{
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
break;
}
@@ -5524,13 +5527,11 @@ c_parser_postfix_expression (c_parser *parser)
{
tree type = groktypename (t1, NULL, NULL);
expr.value = objc_build_encode_expr (type);
- expr.original_code = ERROR_MARK;
}
break;
default:
c_parser_error (parser, "expected expression");
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
break;
@@ -5545,14 +5546,12 @@ c_parser_postfix_expression (c_parser *parser)
"expected %<]%>");
expr.value = objc_build_message_expr (build_tree_list (receiver,
args));
- expr.original_code = ERROR_MARK;
break;
}
/* Else fall through to report error. */
default:
c_parser_error (parser, "expected expression");
expr.value = error_mark_node;
- expr.original_code = ERROR_MARK;
break;
}
return c_parser_postfix_expression_after_primary (parser, expr);
@@ -5597,6 +5596,7 @@ c_parser_postfix_expression_after_paren_type (c_parser *parser,
non_const |= !type_expr_const;
expr.value = build_compound_literal (type, init.value, non_const);
expr.original_code = ERROR_MARK;
+ expr.original_type = NULL;
if (type_expr)
{
if (TREE_CODE (expr.value) == C_MAYBE_CONST_EXPR)
@@ -5637,6 +5637,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
"expected %<]%>");
expr.value = build_array_ref (expr.value, idx, loc);
expr.original_code = ERROR_MARK;
+ expr.original_type = NULL;
break;
case CPP_OPEN_PAREN:
/* Function call. */
@@ -5655,6 +5656,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
&& DECL_BUILT_IN_CLASS (orig_expr.value) == BUILT_IN_NORMAL
&& DECL_FUNCTION_CODE (orig_expr.value) == BUILT_IN_CONSTANT_P)
expr.original_code = C_MAYBE_CONST_EXPR;
+ expr.original_type = NULL;
break;
case CPP_DOT:
/* Structure element reference. */
@@ -5667,11 +5669,23 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
c_parser_error (parser, "expected identifier");
expr.value = error_mark_node;
expr.original_code = ERROR_MARK;
+ expr.original_type = NULL;
return expr;
}
c_parser_consume_token (parser);
expr.value = build_component_ref (expr.value, ident);
expr.original_code = ERROR_MARK;
+ if (TREE_CODE (expr.value) != COMPONENT_REF)
+ expr.original_type = NULL;
+ else
+ {
+ /* Remember the original type of a bitfield. */
+ tree field = TREE_OPERAND (expr.value, 1);
+ if (TREE_CODE (field) != FIELD_DECL)
+ expr.original_type = NULL;
+ else
+ expr.original_type = DECL_BIT_FIELD_TYPE (field);
+ }
break;
case CPP_DEREF:
/* Structure element reference. */
@@ -5684,6 +5698,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
c_parser_error (parser, "expected identifier");
expr.value = error_mark_node;
expr.original_code = ERROR_MARK;
+ expr.original_type = NULL;
return expr;
}
c_parser_consume_token (parser);
@@ -5692,6 +5707,17 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
"->"),
ident);
expr.original_code = ERROR_MARK;
+ if (TREE_CODE (expr.value) != COMPONENT_REF)
+ expr.original_type = NULL;
+ else
+ {
+ /* Remember the original type of a bitfield. */
+ tree field = TREE_OPERAND (expr.value, 1);
+ if (TREE_CODE (field) != FIELD_DECL)
+ expr.original_type = NULL;
+ else
+ expr.original_type = DECL_BIT_FIELD_TYPE (field);
+ }
break;
case CPP_PLUS_PLUS:
/* Postincrement. */
@@ -5700,6 +5726,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
expr.value = build_unary_op (loc,
POSTINCREMENT_EXPR, expr.value, 0);
expr.original_code = ERROR_MARK;
+ expr.original_type = NULL;
break;
case CPP_MINUS_MINUS:
/* Postdecrement. */
@@ -5708,6 +5735,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
expr.value = build_unary_op (loc,
POSTDECREMENT_EXPR, expr.value, 0);
expr.original_code = ERROR_MARK;
+ expr.original_type = NULL;
break;
default:
return expr;
@@ -5735,6 +5763,7 @@ c_parser_expression (c_parser *parser)
next = default_function_array_conversion (next);
expr.value = build_compound_expr (expr.value, next.value);
expr.original_code = COMPOUND_EXPR;
+ expr.original_type = NULL;
}
return expr;
}
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 3c7b241b999..b6c3a27c5ab 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -70,6 +70,8 @@ pop_stmt_list (tree t)
{
chain = TREE_CHAIN (u);
TREE_CHAIN (u) = NULL_TREE;
+ if (chain)
+ STATEMENT_LIST_HAS_LABEL (chain) |= STATEMENT_LIST_HAS_LABEL (u);
if (t == u)
break;
u = chain;
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index ac9586b8243..6b9fcc798ca 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -163,6 +163,11 @@ struct c_expr
initializers, or ERROR_MARK for other expressions (including
parenthesized expressions). */
enum tree_code original_code;
+ /* If not NULL, the original type of an expression. This will
+ differ from the type of the value field for an enum constant.
+ The type of an enum constant is a plain integer type, but this
+ field will be the enum type. */
+ tree original_type;
};
/* A kind of type specifier. Note that this information is currently
@@ -577,7 +582,7 @@ extern struct c_expr default_function_array_conversion (struct c_expr);
extern tree composite_type (tree, tree);
extern tree build_component_ref (tree, tree);
extern tree build_array_ref (tree, tree, location_t);
-extern tree build_external_ref (tree, int, location_t);
+extern tree build_external_ref (tree, int, location_t, tree *);
extern void pop_maybe_used (bool);
extern struct c_expr c_expr_sizeof_expr (struct c_expr);
extern struct c_expr c_expr_sizeof_type (struct c_type_name *);
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 9c74bf39944..96b1a5da599 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -107,6 +107,7 @@ static void set_nonincremental_init (void);
static void set_nonincremental_init_from_string (tree);
static tree find_init_member (tree);
static void readonly_error (tree, enum lvalue_use);
+static void readonly_warning (tree, enum lvalue_use);
static int lvalue_or_else (const_tree, enum lvalue_use);
static int lvalue_p (const_tree);
static void record_maybe_used_decl (tree);
@@ -2202,9 +2203,12 @@ build_array_ref (tree array, tree index, location_t loc)
/* Build an external reference to identifier ID. FUN indicates
whether this will be used for a function call. LOC is the source
- location of the identifier. */
+ location of the identifier. This sets *TYPE to the type of the
+ identifier, which is not the same as the type of the returned value
+ for CONST_DECLs defined as enum constants. If the type of the
+ identifier is not available, *TYPE is set to NULL. */
tree
-build_external_ref (tree id, int fun, location_t loc)
+build_external_ref (tree id, int fun, location_t loc, tree *type)
{
tree ref;
tree decl = lookup_name (id);
@@ -2213,8 +2217,12 @@ build_external_ref (tree id, int fun, location_t loc)
whatever lookup_name() found. */
decl = objc_lookup_ivar (decl, id);
+ *type = NULL;
if (decl && decl != error_mark_node)
- ref = decl;
+ {
+ ref = decl;
+ *type = TREE_TYPE (ref);
+ }
else if (fun)
/* Implicit function declaration. */
ref = implicitly_declare (id);
@@ -2346,6 +2354,7 @@ c_expr_sizeof_expr (struct c_expr expr)
{
ret.value = error_mark_node;
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
pop_maybe_used (false);
}
else
@@ -2355,6 +2364,7 @@ c_expr_sizeof_expr (struct c_expr expr)
&expr_const_operands);
ret.value = c_sizeof (TREE_TYPE (folded_expr));
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
if (c_vla_type_p (TREE_TYPE (folded_expr)))
{
/* sizeof is evaluated when given a vla (C99 6.5.3.4p2). */
@@ -2380,6 +2390,7 @@ c_expr_sizeof_type (struct c_type_name *t)
type = groktypename (t, &type_expr, &type_expr_const);
ret.value = c_sizeof (type);
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
if (type_expr && c_vla_type_p (type))
{
ret.value = build2 (C_MAYBE_CONST_EXPR, TREE_TYPE (ret.value),
@@ -2488,7 +2499,12 @@ build_function_call (tree function, tree params)
trap = build2 (COMPOUND_EXPR, void_type_node, argarray[i], trap);
if (VOID_TYPE_P (return_type))
- return trap;
+ {
+ if (TYPE_QUALS (return_type) != TYPE_UNQUALIFIED)
+ pedwarn (input_location, 0,
+ "function with qualified void return type called");
+ return trap;
+ }
else
{
tree rhs;
@@ -2500,7 +2516,8 @@ build_function_call (tree function, tree params)
else
rhs = fold_convert (return_type, integer_zero_node);
- return build2 (COMPOUND_EXPR, return_type, trap, rhs);
+ return require_complete_type (build2 (COMPOUND_EXPR, return_type,
+ trap, rhs));
}
}
@@ -2533,7 +2550,12 @@ build_function_call (tree function, tree params)
function, nargs, argarray);
if (VOID_TYPE_P (TREE_TYPE (result)))
- return result;
+ {
+ if (TYPE_QUALS (TREE_TYPE (result)) != TYPE_UNQUALIFIED)
+ pedwarn (input_location, 0,
+ "function with qualified void return type called");
+ return result;
+ }
return require_complete_type (result);
}
@@ -2856,7 +2878,8 @@ parser_build_unary_op (enum tree_code code, struct c_expr arg, location_t loc)
result.value = build_unary_op (loc, code, arg.value, 0);
result.original_code = code;
-
+ result.original_type = NULL;
+
if (TREE_OVERFLOW_P (result.value) && !TREE_OVERFLOW_P (arg.value))
overflow_warning (result.value);
@@ -2879,10 +2902,17 @@ parser_build_binary_op (location_t location, enum tree_code code,
enum tree_code code1 = arg1.original_code;
enum tree_code code2 = arg2.original_code;
+ tree type1 = (arg1.original_type
+ ? arg1.original_type
+ : TREE_TYPE (arg1.value));
+ tree type2 = (arg2.original_type
+ ? arg2.original_type
+ : TREE_TYPE (arg2.value));
result.value = build_binary_op (location, code,
arg1.value, arg2.value, 1);
result.original_code = code;
+ result.original_type = NULL;
if (TREE_CODE (result.value) == ERROR_MARK)
return result;
@@ -2895,8 +2925,9 @@ parser_build_binary_op (location_t location, enum tree_code code,
if (warn_parentheses)
warn_about_parentheses (code, code1, arg1.value, code2, arg2.value);
- if (TREE_CODE_CLASS (code1) != tcc_comparison)
- warn_logical_operator (code, arg1.value, arg2.value);
+ if (warn_logical_op)
+ warn_logical_operator (input_location, code,
+ code1, arg1.value, code2, arg2.value);
/* Warn about comparisons against string literals, with the exception
of testing for equality or inequality of a string literal with NULL. */
@@ -2915,6 +2946,16 @@ parser_build_binary_op (location_t location, enum tree_code code,
&& !TREE_OVERFLOW_P (arg2.value))
overflow_warning (result.value);
+ /* Warn about comparisons of different enum types. */
+ if (warn_enum_compare
+ && TREE_CODE_CLASS (code) == tcc_comparison
+ && TREE_CODE (type1) == ENUMERAL_TYPE
+ && TREE_CODE (type2) == ENUMERAL_TYPE
+ && TYPE_MAIN_VARIANT (type1) != TYPE_MAIN_VARIANT (type2))
+ warning_at (location, OPT_Wenum_compare,
+ "comparison between %qT and %qT",
+ type1, type2);
+
return result;
}
@@ -3284,7 +3325,7 @@ build_unary_op (location_t location,
}
/* Report a read-only lvalue. */
- if (TREE_READONLY (arg))
+ if (TYPE_READONLY (argtype))
{
readonly_error (arg,
((code == PREINCREMENT_EXPR
@@ -3292,6 +3333,11 @@ build_unary_op (location_t location,
? lv_increment : lv_decrement));
return error_mark_node;
}
+ else if (TREE_READONLY (arg))
+ readonly_warning (arg,
+ ((code == PREINCREMENT_EXPR
+ || code == POSTINCREMENT_EXPR)
+ ? lv_increment : lv_decrement));
if (TREE_CODE (TREE_TYPE (arg)) == BOOLEAN_TYPE)
val = boolean_increment (code, arg);
@@ -3307,6 +3353,15 @@ build_unary_op (location_t location,
case ADDR_EXPR:
/* Note that this operation never does default_conversion. */
+ /* The operand of unary '&' must be an lvalue (which excludes
+ expressions of type void), or, in C99, the result of a [] or
+ unary '*' operator. */
+ if (VOID_TYPE_P (TREE_TYPE (arg))
+ && TYPE_QUALS (TREE_TYPE (arg)) == TYPE_UNQUALIFIED
+ && (TREE_CODE (arg) != INDIRECT_REF
+ || !flag_isoc99))
+ pedwarn (location, 0, "taking address of expression of type %<void%>");
+
/* Let &* cancel out to simplify resulting code. */
if (TREE_CODE (arg) == INDIRECT_REF)
{
@@ -3492,6 +3547,29 @@ readonly_error (tree arg, enum lvalue_use use)
arg);
}
+/* Give a warning for storing in something that is read-only in GCC
+ terms but not const in ISO C terms. */
+
+static void
+readonly_warning (tree arg, enum lvalue_use use)
+{
+ switch (use)
+ {
+ case lv_assign:
+ warning (0, "assignment of read-only location %qE", arg);
+ break;
+ case lv_increment:
+ warning (0, "increment of read-only location %qE", arg);
+ break;
+ case lv_decrement:
+ warning (0, "decrement of read-only location %qE", arg);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ return;
+}
+
/* Return nonzero if REF is an lvalue valid for this language;
otherwise, print an error message and return zero. USE says
@@ -4244,7 +4322,7 @@ build_modify_expr (location_t location,
/* Give an error for storing in something that is 'const'. */
- if (TREE_READONLY (lhs) || TYPE_READONLY (lhstype)
+ if (TYPE_READONLY (lhstype)
|| ((TREE_CODE (lhstype) == RECORD_TYPE
|| TREE_CODE (lhstype) == UNION_TYPE)
&& C_TYPE_FIELDS_READONLY (lhstype)))
@@ -4252,6 +4330,8 @@ build_modify_expr (location_t location,
readonly_error (lhs, lv_assign);
return error_mark_node;
}
+ else if (TREE_READONLY (lhs))
+ readonly_warning (lhs, lv_assign);
/* If storing into a structure or union member,
it has probably been given type `int'.
@@ -5171,8 +5251,13 @@ digest_init (tree type, tree init, bool null_pointer_constant,
tree typ2 = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (inside_init)));
expr.value = inside_init;
expr.original_code = (strict_string ? STRING_CST : ERROR_MARK);
+ expr.original_type = NULL;
maybe_warn_string_init (type, expr);
+ if (TYPE_DOMAIN (type) && !TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
+ pedwarn_init (input_location, OPT_pedantic,
+ "initialization of a flexible array member");
+
if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
TYPE_MAIN_VARIANT (type)))
return inside_init;
@@ -5671,7 +5756,8 @@ really_start_incremental_init (tree type)
if (type == 0)
type = TREE_TYPE (constructor_decl);
- if (targetm.vector_opaque_p (type))
+ if (TREE_CODE (type) == VECTOR_TYPE
+ && TYPE_VECTOR_OPAQUE (type))
error ("opaque vector types cannot be initialized");
p->type = constructor_type;
@@ -5690,6 +5776,7 @@ really_start_incremental_init (tree type)
p->depth = constructor_depth;
p->replacement_value.value = 0;
p->replacement_value.original_code = ERROR_MARK;
+ p->replacement_value.original_type = NULL;
p->implicit = 0;
p->range_stack = 0;
p->outer = 0;
@@ -5833,6 +5920,7 @@ push_init_level (int implicit)
p->depth = constructor_depth;
p->replacement_value.value = 0;
p->replacement_value.original_code = ERROR_MARK;
+ p->replacement_value.original_type = NULL;
p->implicit = implicit;
p->outer = 0;
p->incremental = constructor_incremental;
@@ -5989,6 +6077,7 @@ pop_init_level (int implicit)
struct c_expr ret;
ret.value = 0;
ret.original_code = ERROR_MARK;
+ ret.original_type = NULL;
if (implicit == 0)
{
diff --git a/gcc/c.opt b/gcc/c.opt
index 3f1cd1301a0..b3e7dd7db18 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -204,7 +204,7 @@ C ObjC C++ ObjC++ Warning
Warn about stray tokens after #elif and #endif
Wenum-compare
-C++ ObjC++ Var(warn_enum_compare) Init(1) Warning
+C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning
Warn about comparison of different enum types
Werror
@@ -284,6 +284,10 @@ Winvalid-pch
C ObjC C++ ObjC++ Warning
Warn about PCH files that are found but not used
+Wlogical-op
+C ObjC C++ ObjC++ Var(warn_logical_op) Init(-1) Warning
+Warn when a logical operator is suspiciously always evaluating to true or false
+
Wlong-long
C ObjC C++ ObjC++ Var(warn_long_long) Init(1) Warning
Do not warn about using \"long long\" when -pedantic
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 3af15ec5601..ee72030327c 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -1,5 +1,5 @@
/* Basic block reordering routines for the GNU compiler.
- Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -363,7 +363,7 @@ struct rtl_opt_pass pass_into_cfg_layout_mode =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
PROP_cfglayout, /* properties_provided */
0, /* properties_destroyed */
@@ -382,7 +382,7 @@ struct rtl_opt_pass pass_outof_cfg_layout_mode =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_cfglayout, /* properties_destroyed */
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 95d28ac1cfd..c6436bf4be7 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1,6 +1,6 @@
/* Control flow graph manipulation code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -232,22 +232,6 @@ delete_insn_chain (rtx start, rtx finish, bool clear_bb)
start = next;
}
}
-
-/* Like delete_insn_chain but also purge dead edges from BB. */
-
-void
-delete_insn_chain_and_edges (rtx first, rtx last)
-{
- bool purge = false;
-
- if (INSN_P (last)
- && BLOCK_FOR_INSN (last)
- && BB_END (BLOCK_FOR_INSN (last)) == last)
- purge = true;
- delete_insn_chain (first, last, false);
- if (purge)
- purge_dead_edges (BLOCK_FOR_INSN (last));
-}
/* Create a new basic block consisting of the instructions between HEAD and END
inclusive. This function is designed to allow fast BB construction - reuses
@@ -435,7 +419,7 @@ struct rtl_opt_pass pass_free_cfg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_cfg, /* properties_destroyed */
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 86642ab605b..ce696e211b6 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -640,6 +640,9 @@ cgraph_set_call_stmt (struct cgraph_edge *e, gimple new_stmt)
htab_hash_pointer (e->call_stmt));
}
e->call_stmt = new_stmt;
+ push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
+ e->can_throw_external = stmt_can_throw_external (new_stmt);
+ pop_cfun ();
if (e->caller->call_site_hash)
{
void **slot;
@@ -704,6 +707,9 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
edge->caller = caller;
edge->callee = callee;
edge->call_stmt = call_stmt;
+ push_cfun (DECL_STRUCT_FUNCTION (caller->decl));
+ edge->can_throw_external = stmt_can_throw_external (call_stmt);
+ pop_cfun ();
edge->prev_caller = NULL;
edge->next_caller = callee->callers;
if (callee->callers)
@@ -1215,6 +1221,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf(f, "(inlined) ");
if (edge->indirect_call)
fprintf(f, "(indirect) ");
+ if (edge->can_throw_external)
+ fprintf(f, "(can throw external) ");
}
fprintf (f, "\n calls: ");
@@ -1234,6 +1242,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
edge->frequency / (double)CGRAPH_FREQ_BASE);
if (edge->loop_nest)
fprintf (f, "(nested in %i loops) ", edge->loop_nest);
+ if (edge->can_throw_external)
+ fprintf(f, "(can throw external) ");
}
fprintf (f, "\n");
}
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index aba0e5927a3..347653fc79e 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -216,9 +216,11 @@ struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_call
per function call. The range is 0 to CGRAPH_FREQ_MAX. */
int frequency;
/* Depth of loop nest, 1 means no loop nest. */
- unsigned int loop_nest : 31;
+ unsigned int loop_nest : 30;
/* Whether this edge describes a call that was originally indirect. */
unsigned int indirect_call : 1;
+ /* Can this call throw externally? */
+ unsigned int can_throw_external : 1;
/* Unique id of the edge. */
int uid;
};
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index c7d6aa72329..f244a1e315d 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -1,5 +1,5 @@
/* Callgraph construction.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Jan Hubicka
@@ -182,7 +182,7 @@ struct gimple_opt_pass pass_build_cgraph_edges =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -243,7 +243,7 @@ struct gimple_opt_pass pass_rebuild_cgraph_edges =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -270,7 +270,7 @@ struct gimple_opt_pass pass_remove_cgraph_callee_edges =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 9f6a50ddcbe..a99b7dfe96d 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -134,6 +134,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-iterator.h"
#include "tree-pass.h"
#include "output.h"
+#include "coverage.h"
static void cgraph_expand_all_functions (void);
static void cgraph_mark_functions_to_output (void);
@@ -978,6 +979,8 @@ cgraph_finalize_compilation_unit (void)
cgraph_analyze_functions ();
timevar_pop (TV_CGRAPH);
}
+
+
/* Figure out what functions we want to assemble. */
static void
@@ -1238,6 +1241,15 @@ ipa_passes (void)
gimple_register_cfg_hooks ();
bitmap_obstack_initialize (NULL);
execute_ipa_pass_list (all_ipa_passes);
+
+ /* Generate coverage variables and constructors. */
+ coverage_finish ();
+
+ /* Process new functions added. */
+ set_cfun (NULL);
+ current_function_decl = NULL;
+ cgraph_process_new_functions ();
+
bitmap_obstack_release (NULL);
}
@@ -1369,6 +1381,7 @@ cgraph_build_static_cdtor (char which, tree body, int priority)
resdecl = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
DECL_ARTIFICIAL (resdecl) = 1;
DECL_RESULT (decl) = resdecl;
+ DECL_CONTEXT (resdecl) = decl;
allocate_struct_function (decl, false);
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c
index c678a607c66..3ec197f1beb 100644
--- a/gcc/combine-stack-adj.c
+++ b/gcc/combine-stack-adj.c
@@ -1,6 +1,6 @@
/* Combine stack adjustments.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -333,9 +333,7 @@ adjust_frame_related_expr (rtx last_sp_set, rtx insn,
if (note)
XEXP (note, 0) = new_expr;
else
- REG_NOTES (last_sp_set)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, new_expr,
- REG_NOTES (last_sp_set));
+ add_reg_note (last_sp_set, REG_FRAME_RELATED_EXPR, new_expr);
}
/* Subroutine of combine_stack_adjustments, called for each basic block. */
@@ -551,7 +549,7 @@ struct rtl_opt_pass pass_stack_adjustments =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -561,4 +559,3 @@ struct rtl_opt_pass pass_stack_adjustments =
TODO_ggc_collect, /* todo_flags_finish */
}
};
-
diff --git a/gcc/combine.c b/gcc/combine.c
index 80187347aed..b070ee1c2ab 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3643,12 +3643,12 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (i3dest_killed)
{
if (newi2pat && reg_set_p (i3dest_killed, newi2pat))
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i3dest_killed,
- NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i3dest_killed,
+ NULL_RTX),
NULL_RTX, i2, NULL_RTX, elim_i2, elim_i1);
else
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i3dest_killed,
- NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i3dest_killed,
+ NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
elim_i2, elim_i1);
}
@@ -3656,10 +3656,10 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (i2dest_in_i2src)
{
if (newi2pat && reg_set_p (i2dest, newi2pat))
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i2dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i2dest, NULL_RTX),
NULL_RTX, i2, NULL_RTX, NULL_RTX, NULL_RTX);
else
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i2dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i2dest, NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
NULL_RTX, NULL_RTX);
}
@@ -3667,10 +3667,10 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (i1dest_in_i1src)
{
if (newi2pat && reg_set_p (i1dest, newi2pat))
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i1dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i1dest, NULL_RTX),
NULL_RTX, i2, NULL_RTX, NULL_RTX, NULL_RTX);
else
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i1dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i1dest, NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
NULL_RTX, NULL_RTX);
}
@@ -9863,8 +9863,8 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes)
if (GET_CODE (XEXP (XVECEXP (newpat, 0, i), 0)) != SCRATCH)
{
gcc_assert (REG_P (XEXP (XVECEXP (newpat, 0, i), 0)));
- notes = gen_rtx_EXPR_LIST (REG_UNUSED,
- XEXP (XVECEXP (newpat, 0, i), 0), notes);
+ notes = alloc_reg_note (REG_UNUSED,
+ XEXP (XVECEXP (newpat, 0, i), 0), notes);
}
}
pat = newpat;
@@ -12231,7 +12231,7 @@ move_deaths (rtx x, rtx maybe_kill_insn, int from_luid, rtx to_insn,
*pnotes = note;
}
else
- *pnotes = gen_rtx_EXPR_LIST (REG_DEAD, x, *pnotes);
+ *pnotes = alloc_reg_note (REG_DEAD, x, *pnotes);
}
return;
@@ -12800,8 +12800,8 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
&& ! reg_bitfield_target_p (piece,
PATTERN (place)))
{
- rtx new_note
- = gen_rtx_EXPR_LIST (REG_DEAD, piece, NULL_RTX);
+ rtx new_note = alloc_reg_note (REG_DEAD, piece,
+ NULL_RTX);
distribute_notes (new_note, place, place,
NULL_RTX, NULL_RTX, NULL_RTX);
@@ -12848,9 +12848,7 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
}
if (place2)
- REG_NOTES (place2)
- = gen_rtx_fmt_ee (GET_CODE (note), REG_NOTE_KIND (note),
- XEXP (note, 0), REG_NOTES (place2));
+ add_reg_note (place2, REG_NOTE_KIND (note), XEXP (note, 0));
}
}
@@ -13046,4 +13044,3 @@ struct rtl_opt_pass pass_combine =
TODO_ggc_collect, /* todo_flags_finish */
}
};
-
diff --git a/gcc/common.opt b/gcc/common.opt
index 20dd071cd7c..c0f6b9e6d09 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -128,10 +128,6 @@ Wlarger-than=
Common RejectNegative Joined UInteger Warning
-Wlarger-than=<number> Warn if an object is larger than <number> bytes
-Wlogical-op
-Common Warning Var(warn_logical_op)
-Warn when a logical operator is suspicously always evaluating to true or false
-
Wunsafe-loop-optimizations
Common Var(warn_unsafe_loop_optimizations) Warning
Warn if the loop cannot be optimized due to nontrivial assumptions.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index ac2fcc1fb80..a2c7032d92b 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1989,9 +1989,14 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
*) with_endian=big,little ;;
esac
fi
+ # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
+ # First word : the default endian.
+ # Second word: the secondary endian (optional).
case ${with_endian} in
- big|little) tmake_file="${tmake_file} sh/t-1e" ;;
- big,little|little,big) ;;
+ big) TM_ENDIAN_CONFIG=mb ;;
+ little) TM_ENDIAN_CONFIG=ml ;;
+ big,little) TM_ENDIAN_CONFIG="mb ml" ;;
+ little,big) TM_ENDIAN_CONFIG="ml mb" ;;
*) echo "with_endian=${with_endian} not supported."; exit 1 ;;
esac
case ${with_endian} in
@@ -2101,7 +2106,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
*) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
esac
sh_multilibs=${with_multilib_list}
- if test x${sh_multilibs} = x ; then
+ if test "$sh_multilibs" = "default" ; then
case ${target} in
sh64-superh-linux* | \
sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
@@ -2117,25 +2122,32 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
fi
target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
- sh_multilibs=`echo $sh_multilibs,$sh_cpu_default | sed -e 's/[ ,/][ ,]*/ /g' -e 's/ $//' -e 's/^m/sh/' -e 's/ m/ sh/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
+ tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
+ sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^sh/m/i' -e 's/ sh/ m/gi' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
for sh_multilib in ${sh_multilibs}; do
case ${sh_multilib} in
- sh1 | sh2 | sh2e | sh3 | sh3e | \
- sh4 | sh4-single | sh4-single-only | sh4-nofpu | sh4-300 |\
- sh4a | sh4a-single | sh4a-single-only | sh4a-nofpu | sh4al | \
- sh2a | sh2a-single | sh2a-single-only | sh2a-nofpu | \
- sh5-64media | sh5-64media-nofpu | \
- sh5-32media | sh5-32media-nofpu | \
- sh5-compact | sh5-compact-nofpu)
- tmake_file="${tmake_file} sh/t-mlib-${sh_multilib}"
- tm_defines="$tm_defines SUPPORT_`echo $sh_multilib|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
+ m1 | m2 | m2e | m3 | m3e | \
+ m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
+ m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
+ m2a | m2a-single | m2a-single-only | m2a-nofpu | \
+ m5-64media | m5-64media-nofpu | \
+ m5-32media | m5-32media-nofpu | \
+ m5-compact | m5-compact-nofpu)
+ # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
+ # It is passed to MULTIILIB_OPTIONS verbatim.
+ TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
+ tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
;;
+ \!*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
+ # It is passed the MULTILIB_EXCEPTIONS verbatim.
+ TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
*)
echo "with_multilib_list=${sh_multilib} not supported."
exit 1
;;
esac
done
+ TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
if test x${enable_incomplete_targets} = xyes ; then
tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
fi
@@ -3053,7 +3065,7 @@ case ${target} in
i[34567]86-*-darwin* | x86_64-*-darwin*)
tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
;;
- i[34567]86-*-linux* | x86_64-*-linux*)
+ i[34567]86-*-linux* | x86_64-*-linux* | i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
;;
ia64*-*-linux*)
diff --git a/gcc/config/arm/sfp-machine.h b/gcc/config/arm/sfp-machine.h
index bc75737d73d..4a456ae03a2 100644
--- a/gcc/config/arm/sfp-machine.h
+++ b/gcc/config/arm/sfp-machine.h
@@ -3,6 +3,11 @@
#define _FP_WS_TYPE signed long
#define _FP_I_TYPE long
+/* The type of the result of a floating point comparison. This must
+ match `__libgcc_cmp_return__' in GCC for the target. */
+typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
+#define CMPtype __gcc_CMPtype
+
#define _FP_MUL_MEAT_S(R,X,Y) \
_FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
#define _FP_MUL_MEAT_D(R,X,Y) \
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index 309b028589d..269e2c5ddb5 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -1478,7 +1478,7 @@
(rotate:SI (match_operand:SI 1 "register_operand" "r")
(const_int 16)))]
""
- "{mov __tmp_reg__,%A0\;mov %A0,%D0\;mov %D0, __tmp_reg__\;mov __tmp_reg__,%B0\;mov %B0,%C0\;mov %C0, __tmp_reg__|movw __tmp_reg__,%A0\;movw %A0,%C0\;movw %C0, __tmp_reg__\;clr __zero_reg__}"
+ "{mov __tmp_reg__,%A1\;mov %A0,%C1\;mov %C0, __tmp_reg__\;mov __tmp_reg__,%B1\;mov %B0,%D1\;mov %D0, __tmp_reg__|movw __tmp_reg__,%A1\;movw %A0,%C1\;movw %C0, __tmp_reg__\;clr __zero_reg__}"
"reload_completed
&& REGNO (operands[0]) != REGNO (operands[1])"
[(set (match_dup 2) (match_dup 5))
@@ -1490,7 +1490,18 @@
operands[3] = simplify_gen_subreg (HImode, operands[0], SImode, si_hi_off);
operands[4] = simplify_gen_subreg (HImode, operands[1], SImode, si_lo_off);
- operands[5] = simplify_gen_subreg (HImode, operands[1], SImode, si_hi_off);"
+ operands[5] = simplify_gen_subreg (HImode, operands[1], SImode, si_hi_off);
+
+ if (REGNO (operands[0]) == REGNO(operands[1]) + 2)
+ {
+ emit_move_insn (operands[3], operands[4]);
+ DONE;
+ }
+ else if (REGNO (operands[0]) == REGNO(operands[1]) - 2)
+ {
+ emit_move_insn (operands[2], operands[5]);
+ DONE;
+ }"
[(set (attr "length") (if_then_else (eq_attr "mcu_have_movw" "yes")
(const_int 4)
(const_int 6)))
@@ -1503,17 +1514,14 @@
(rotate:SI (match_operand:SI 1 "register_operand" "r")
(const_int 8)))]
""
- "mov __tmp_reg__,%D0
- mov %D0,%C0
- mov %C0,%B0
- mov %B0,%A0
+ "mov __tmp_reg__,%D1
+ mov %D0,%C1
+ mov %C0,%B1
+ mov %B0,%A1
mov %A0, __tmp_reg__"
"reload_completed
&& REGNO (operands[0]) != REGNO (operands[1])"
- [(set (match_dup 2) (match_dup 9))
- (set (match_dup 3) (match_dup 6))
- (set (match_dup 4) (match_dup 7))
- (set (match_dup 5) (match_dup 8))]
+ [(const_int 0)]
"unsigned int si_lo_off = subreg_lowpart_offset (HImode, SImode);
unsigned int si_hi_off = subreg_highpart_offset (HImode, SImode);
unsigned int hi_lo_off = subreg_lowpart_offset (QImode, HImode);
@@ -1531,7 +1539,23 @@
operands[7] = simplify_gen_subreg (QImode, operands[6], HImode, hi_hi_off);
operands[6] = simplify_gen_subreg (QImode, operands[6], HImode, hi_lo_off);
operands[9] = simplify_gen_subreg (QImode, operands[8], HImode, hi_hi_off);
- operands[8] = simplify_gen_subreg (QImode, operands[8], HImode, hi_lo_off);"
+ operands[8] = simplify_gen_subreg (QImode, operands[8], HImode, hi_lo_off);
+
+ if (REGNO (operands[0]) < REGNO(operands[1]))
+ {
+ emit_move_insn (operands[2], operands[9]);
+ emit_move_insn (operands[3], operands[6]);
+ emit_move_insn (operands[4], operands[7]);
+ emit_move_insn (operands[5], operands[8]);
+ }
+ else
+ {
+ emit_move_insn (operands[5], operands[8]);
+ emit_move_insn (operands[2], operands[9]);
+ emit_move_insn (operands[4], operands[7]);
+ emit_move_insn (operands[3], operands[6]);
+ }
+ DONE;"
[(set_attr "length" "5")
(set_attr "cc" "none")])
@@ -1540,17 +1564,14 @@
(rotate:SI (match_operand:SI 1 "register_operand" "r")
(const_int 24)))]
""
- "mov __tmp_reg__,%A0
- mov %A0,%B0
- mov %B0,%C0
- mov %C0,%D0
+ "mov __tmp_reg__,%A1
+ mov %A0,%B1
+ mov %B0,%C1
+ mov %C0,%D1
mov %D0, __tmp_reg__"
"reload_completed
&& REGNO (operands[0]) != REGNO (operands[1])"
- [(set (match_dup 2) (match_dup 7))
- (set (match_dup 3) (match_dup 8))
- (set (match_dup 4) (match_dup 9))
- (set (match_dup 5) (match_dup 6))]
+ [(const_int 0)]
"unsigned int si_lo_off = subreg_lowpart_offset (HImode, SImode);
unsigned int si_hi_off = subreg_highpart_offset (HImode, SImode);
unsigned int hi_lo_off = subreg_lowpart_offset (QImode, HImode);
@@ -1568,7 +1589,23 @@
operands[7] = simplify_gen_subreg (QImode, operands[6], HImode, hi_hi_off);
operands[6] = simplify_gen_subreg (QImode, operands[6], HImode, hi_lo_off);
operands[9] = simplify_gen_subreg (QImode, operands[8], HImode, hi_hi_off);
- operands[8] = simplify_gen_subreg (QImode, operands[8], HImode, hi_lo_off);"
+ operands[8] = simplify_gen_subreg (QImode, operands[8], HImode, hi_lo_off);
+
+ if (REGNO (operands[0]) < REGNO(operands[1]))
+ {
+ emit_move_insn (operands[2], operands[7]);
+ emit_move_insn (operands[5], operands[6]);
+ emit_move_insn (operands[3], operands[8]);
+ emit_move_insn (operands[4], operands[9]);
+ }
+ else
+ {
+ emit_move_insn (operands[5], operands[6]);
+ emit_move_insn (operands[4], operands[9]);
+ emit_move_insn (operands[3], operands[8]);
+ emit_move_insn (operands[2], operands[7]);
+ }
+ DONE;"
[(set_attr "length" "5")
(set_attr "cc" "none")])
diff --git a/gcc/config/i386/cygwin-stdint.h b/gcc/config/i386/cygwin-stdint.h
index 53fd7e22a9d..df865f717cb 100644
--- a/gcc/config/i386/cygwin-stdint.h
+++ b/gcc/config/i386/cygwin-stdint.h
@@ -57,6 +57,6 @@ along with GCC; see the file COPYING3. If not see
/* Integer types capable of holding object pointers */
-#define INTPTR_TYPE "long int"
-#define UINTPTR_TYPE "long unsigned int"
+#define INTPTR_TYPE "int"
+#define UINTPTR_TYPE "unsigned int"
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 0b51c78f576..ca727ad12e5 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1094,13 +1094,7 @@ static const struct mips_rtx_cost_data mips_rtx_cost_data[PROCESSOR_MAX] = {
DEFAULT_COSTS
},
{ /* XLR */
- /* Need to replace first five with the costs of calling the appropriate
- libgcc routine. */
- COSTS_N_INSNS (256), /* fp_add */
- COSTS_N_INSNS (256), /* fp_mult_sf */
- COSTS_N_INSNS (256), /* fp_mult_df */
- COSTS_N_INSNS (256), /* fp_div_sf */
- COSTS_N_INSNS (256), /* fp_div_df */
+ SOFT_FP_COSTS,
COSTS_N_INSNS (8), /* int_mult_si */
COSTS_N_INSNS (8), /* int_mult_di */
COSTS_N_INSNS (72), /* int_div_si */
@@ -14725,7 +14719,7 @@ mips_final_prescan_insn (rtx insn, rtx *opvec, int noperands)
/* Implement TARGET_ASM_FINAL_POSTSCAN_INSN. */
-void
+static void
mips_final_postscan_insn (FILE *file, rtx insn, rtx *opvec, int noperands)
{
int i;
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 45971acf08a..cd6f1e5d220 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -709,7 +709,8 @@ enum mips_code_readable_setting {
%{march=mips32|march=4kc|march=4km|march=4kp|march=4ksc:-mips32} \
%{march=mips32r2|march=m4k|march=4ke*|march=4ksd|march=24k* \
|march=34k*|march=74k*: -mips32r2} \
- %{march=mips64|march=5k*|march=20k*|march=sb1*|march=sr71000: -mips64} \
+ %{march=mips64|march=5k*|march=20k*|march=sb1*|march=sr71000 \
+ |march=xlr: -mips64} \
%{march=mips64r2|march=octeon: -mips64r2} \
%{!march=*: -" MULTILIB_ISA_DEFAULT "}}"
@@ -720,7 +721,7 @@ enum mips_code_readable_setting {
#define MIPS_ARCH_FLOAT_SPEC \
"%{mhard-float|msoft-float|march=mips*:; \
march=vr41*|march=m4k|march=4k*|march=24kc|march=24kec \
- |march=34kc|march=74kc|march=5kc|march=octeon: -msoft-float; \
+ |march=34kc|march=74kc|march=5kc|march=octeon|march=xlr: -msoft-float; \
march=*: -mhard-float}"
/* A spec condition that matches 32-bit options. It only works if
@@ -3462,3 +3463,7 @@ extern enum mips_code_readable_setting mips_code_readable;
#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
mips_final_prescan_insn (INSN, OPVEC, NOPERANDS)
+
+/* This is necessary to avoid a warning about comparing different enum
+ types. */
+#define mips_tune_attr ((enum attr_cpu) mips_tune)
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 8a6719466d3..8453aab3deb 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -571,7 +571,7 @@
;; with the processor_type enumeration in mips.h.
(define_attr "cpu"
"r3000,4kc,4kp,5kc,5kf,20kc,24kc,24kf2_1,24kf1_1,74kc,74kf2_1,74kf1_1,74kf3_2,loongson_2e,loongson_2f,m4k,octeon,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,r10000,sb1,sb1a,sr71000,xlr"
- (const (symbol_ref "mips_tune")))
+ (const (symbol_ref "mips_tune_attr")))
;; The type of hardware hazard associated with this instruction.
;; DELAY means that the next instruction cannot read the result
diff --git a/gcc/config/mips/xlr.md b/gcc/config/mips/xlr.md
index 21550ba12d9..69913b7b2fb 100644
--- a/gcc/config/mips/xlr.md
+++ b/gcc/config/mips/xlr.md
@@ -1,5 +1,5 @@
;; DFA-based pipeline description for the XLR.
-;; Copyright (C) 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
;;
;; xlr.md Machine Description for the RMI XLR Microprocessor
;; This file is part of GCC.
@@ -31,7 +31,7 @@
;; Integer arithmetic instructions.
(define_insn_reservation "ir_xlr_alu" 1
(and (eq_attr "cpu" "xlr")
- (eq_attr "type" "arith,shift,clz,const,unknown,multi,nop,trap"))
+ (eq_attr "type" "move,arith,shift,clz,logical,signext,const,unknown,multi,nop,trap"))
"xlr_main_pipe")
;; Integer arithmetic instructions.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6500cc79291..07131b72723 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -885,7 +885,6 @@ static rtx paired_expand_predicate_builtin (enum insn_code, tree, rtx);
static void enable_mask_for_builtins (struct builtin_description *, int,
enum rs6000_builtins,
enum rs6000_builtins);
-static tree build_opaque_vector_type (tree, int);
static void spe_init_builtins (void);
static rtx spe_expand_builtin (tree, rtx, bool *);
static rtx spe_expand_stv_builtin (enum insn_code, tree);
@@ -916,7 +915,6 @@ static void compute_save_world_info (rs6000_stack_t *info_ptr);
static void is_altivec_return_reg (rtx, void *);
static rtx generate_set_vrsave (rtx, rs6000_stack_t *, int);
int easy_vector_constant (rtx, enum machine_mode);
-static bool rs6000_is_opaque_type (const_tree);
static rtx rs6000_dwarf_register_span (rtx);
static void rs6000_init_dwarf_reg_sizes_extra (tree);
static rtx rs6000_legitimize_tls_address (rtx, enum tls_model);
@@ -1191,9 +1189,6 @@ static const char alt_reg_names[][8] =
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST hook_int_rtx_bool_0
-#undef TARGET_VECTOR_OPAQUE_P
-#define TARGET_VECTOR_OPAQUE_P rs6000_is_opaque_type
-
#undef TARGET_DWARF_REGISTER_SPAN
#define TARGET_DWARF_REGISTER_SPAN rs6000_dwarf_register_span
@@ -9362,15 +9357,6 @@ rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
gcc_unreachable ();
}
-static tree
-build_opaque_vector_type (tree node, int nunits)
-{
- node = copy_node (node);
- TYPE_MAIN_VARIANT (node) = node;
- TYPE_CANONICAL (node) = node;
- return build_vector_type (node, nunits);
-}
-
static void
rs6000_init_builtins (void)
{
@@ -9391,7 +9377,7 @@ rs6000_init_builtins (void)
opaque_V2SF_type_node = build_opaque_vector_type (float_type_node, 2);
opaque_V2SI_type_node = build_opaque_vector_type (intSI_type_node, 2);
opaque_p_V2SI_type_node = build_pointer_type (opaque_V2SI_type_node);
- opaque_V4SI_type_node = copy_node (V4SI_type_node);
+ opaque_V4SI_type_node = build_opaque_vector_type (intSI_type_node, 4);
/* The 'vector bool ...' types must be kept distinct from 'vector unsigned ...'
types, especially in C++ land. Similarly, 'vector pixel' is distinct from
@@ -22600,7 +22586,8 @@ rs6000_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
if (DECIMAL_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS)
/* _Decimal128 must use an even/odd register pair. */
regno = (mode == TDmode) ? FP_ARG_RETURN + 1 : FP_ARG_RETURN;
- else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS)
+ else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS
+ && ((TARGET_SINGLE_FLOAT && (mode == SFmode)) || TARGET_DOUBLE_FLOAT))
regno = FP_ARG_RETURN;
else if (TREE_CODE (valtype) == COMPLEX_TYPE
&& targetm.calls.split_complex_arg)
@@ -22693,16 +22680,6 @@ rs6000_initial_elimination_offset (int from, int to)
return offset;
}
-/* Return true if TYPE is a SPE or AltiVec opaque type. */
-
-static bool
-rs6000_is_opaque_type (const_tree type)
-{
- return (type == opaque_V2SI_type_node
- || type == opaque_V2SF_type_node
- || type == opaque_V4SI_type_node);
-}
-
static rtx
rs6000_dwarf_register_span (rtx reg)
{
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index c2f05e5dfad..cb7c404567a 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -8143,8 +8143,8 @@
(define_insn "*movsi_internal1"
[(set (match_operand:SI 0 "rs6000_nonimmediate_operand" "=r,r,r,m,r,r,r,r,r,*q,*c*l,*h,*h")
(match_operand:SI 1 "input_operand" "r,U,m,r,I,L,n,R,*h,r,r,r,0"))]
- "gpc_reg_operand (operands[0], SImode)
- || gpc_reg_operand (operands[1], SImode)"
+ "!TARGET_SINGLE_FPU &&
+ (gpc_reg_operand (operands[0], SImode) || gpc_reg_operand (operands[1], SImode))"
"@
mr %0,%1
{cal|la} %0,%a1
@@ -8162,6 +8162,30 @@
[(set_attr "type" "*,*,load,store,*,*,*,*,mfjmpr,*,mtjmpr,*,*")
(set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4")])
+(define_insn "*movsi_internal1_single"
+ [(set (match_operand:SI 0 "rs6000_nonimmediate_operand" "=r,r,r,m,r,r,r,r,r,*q,*c*l,*h,*h,m,*f")
+ (match_operand:SI 1 "input_operand" "r,U,m,r,I,L,n,R,*h,r,r,r,0,f,m"))]
+ "TARGET_SINGLE_FPU &&
+ (gpc_reg_operand (operands[0], SImode) || gpc_reg_operand (operands[1], SImode))"
+ "@
+ mr %0,%1
+ {cal|la} %0,%a1
+ {l%U1%X1|lwz%U1%X1} %0,%1
+ {st%U0%X0|stw%U0%X0} %1,%0
+ {lil|li} %0,%1
+ {liu|lis} %0,%v1
+ #
+ {cal|la} %0,%a1
+ mf%1 %0
+ mt%0 %1
+ mt%0 %1
+ mt%0 %1
+ {cror 0,0,0|nop}
+ stfs%U0%X0 %1, %0
+ lfs%U1%X1 %0, %1"
+ [(set_attr "type" "*,*,load,store,*,*,*,*,mfjmpr,*,mtjmpr,*,*,*,*")
+ (set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4,4,4")])
+
;; Split a load of a large constant into the appropriate two-insn
;; sequence.
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index bfe0268cc77..3bf9d7d2157 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -60,6 +60,10 @@ enum processor_flags
extern enum processor_type s390_tune;
extern enum processor_flags s390_tune_flags;
+/* This is necessary to avoid a warning about comparing different enum
+ types. */
+#define s390_tune_attr ((enum attr_cpu)s390_tune)
+
extern enum processor_type s390_arch;
extern enum processor_flags s390_arch_flags;
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 16ed99e08f1..c3d181f0aac 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -262,7 +262,7 @@
;; CPUs could in theory be modeled.
(define_attr "cpu" "g5,g6,z900,z990,z9_109,z10"
- (const (symbol_ref "s390_tune")))
+ (const (symbol_ref "s390_tune_attr")))
(define_attr "cpu_facility" "standard,ieee,zarch,longdisp,extimm,dfp,z10"
(const_string "standard"))
diff --git a/gcc/config/sh/lib1funcs.asm b/gcc/config/sh/lib1funcs.asm
index 1f36f73dbc3..2f0ca16cd91 100644
--- a/gcc/config/sh/lib1funcs.asm
+++ b/gcc/config/sh/lib1funcs.asm
@@ -30,6 +30,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
!! recoded in assembly by Toshiyasu Morita
!! tm@netcom.com
+#if defined(__ELF__) && defined(__linux__)
+.section .note.GNU-stack,"",%progbits
+.previous
+#endif
+
/* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
ELF local label prefixes by J"orn Rennecke
amylaar@cygnus.com */
diff --git a/gcc/config/sh/linux-atomic.asm b/gcc/config/sh/linux-atomic.asm
index bf95970424c..fd3a7720e99 100644
--- a/gcc/config/sh/linux-atomic.asm
+++ b/gcc/config/sh/linux-atomic.asm
@@ -135,4 +135,7 @@ ATOMIC_FETCH_AND_COMBOP(nand,and,not,1,b,extu.b)
ATOMIC_FETCH_AND_COMBOP(nand,and,not,2,w,extu.w)
ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov)
+.section .note.GNU-stack,"",%progbits
+.previous
+
#endif /* ! __SH5__ */
diff --git a/gcc/config/sh/predicates.md b/gcc/config/sh/predicates.md
index f800db7b7d1..da9962c9984 100644
--- a/gcc/config/sh/predicates.md
+++ b/gcc/config/sh/predicates.md
@@ -112,6 +112,7 @@
|| satisfies_constraint_Css (op))
return 1;
else if (GET_CODE (op) == TRUNCATE
+ && GET_CODE (XEXP (op, 0)) == REG
&& ! system_reg_operand (XEXP (op, 0), VOIDmode)
&& (mode == VOIDmode || mode == GET_MODE (op))
&& (GET_MODE_SIZE (GET_MODE (op))
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 6a4ccb0f0e6..3a90cf172fd 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -1743,7 +1743,7 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
|| TREE_CODE (VALTYPE) == BOOLEAN_TYPE \
|| TREE_CODE (VALTYPE) == REAL_TYPE \
|| TREE_CODE (VALTYPE) == OFFSET_TYPE)) \
- && sh_promote_prototypes (VALTYPE) \
+ && sh_promote_prototypes (FUNC) \
? (TARGET_SHMEDIA64 ? DImode : SImode) : TYPE_MODE (VALTYPE)), \
BASE_RETURN_VALUE_REG (TYPE_MODE (VALTYPE)))
diff --git a/gcc/config/sh/t-1e b/gcc/config/sh/t-1e
deleted file mode 100644
index 74b0f9a606a..00000000000
--- a/gcc/config/sh/t-1e
+++ /dev/null
@@ -1 +0,0 @@
-MULTILIB_ENDIAN =
diff --git a/gcc/config/sh/t-linux b/gcc/config/sh/t-linux
index b7a3d7c977b..13ff848dd7c 100644
--- a/gcc/config/sh/t-linux
+++ b/gcc/config/sh/t-linux
@@ -4,6 +4,5 @@ LIB2FUNCS_EXTRA= $(srcdir)/config/sh/linux-atomic.asm
MULTILIB_DIRNAMES=
MULTILIB_MATCHES =
-MULTILIB_EXCEPTIONS=
EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
diff --git a/gcc/config/sh/t-mlib-sh1 b/gcc/config/sh/t-mlib-sh1
deleted file mode 100644
index 9ba70541c6c..00000000000
--- a/gcc/config/sh/t-mlib-sh1
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh1=m1/
diff --git a/gcc/config/sh/t-mlib-sh2 b/gcc/config/sh/t-mlib-sh2
deleted file mode 100644
index d8857bab66b..00000000000
--- a/gcc/config/sh/t-mlib-sh2
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2=m2/
diff --git a/gcc/config/sh/t-mlib-sh2a b/gcc/config/sh/t-mlib-sh2a
deleted file mode 100644
index e276ac99517..00000000000
--- a/gcc/config/sh/t-mlib-sh2a
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a=m2a/
diff --git a/gcc/config/sh/t-mlib-sh2a-nofpu b/gcc/config/sh/t-mlib-sh2a-nofpu
deleted file mode 100644
index a84874efcd0..00000000000
--- a/gcc/config/sh/t-mlib-sh2a-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_nofpu=m2a-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh2a-single b/gcc/config/sh/t-mlib-sh2a-single
deleted file mode 100644
index b3432fa83a1..00000000000
--- a/gcc/config/sh/t-mlib-sh2a-single
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_single=m2a-single/
diff --git a/gcc/config/sh/t-mlib-sh2a-single-only b/gcc/config/sh/t-mlib-sh2a-single-only
deleted file mode 100644
index e34afe2f219..00000000000
--- a/gcc/config/sh/t-mlib-sh2a-single-only
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2a_single_only=m2a-single-only/
diff --git a/gcc/config/sh/t-mlib-sh2e b/gcc/config/sh/t-mlib-sh2e
deleted file mode 100644
index 58841327cfe..00000000000
--- a/gcc/config/sh/t-mlib-sh2e
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh2e=m2e/
diff --git a/gcc/config/sh/t-mlib-sh3 b/gcc/config/sh/t-mlib-sh3
deleted file mode 100644
index 2c89d749a99..00000000000
--- a/gcc/config/sh/t-mlib-sh3
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh3=m3/
diff --git a/gcc/config/sh/t-mlib-sh3e b/gcc/config/sh/t-mlib-sh3e
deleted file mode 100644
index ca18b1bcf8b..00000000000
--- a/gcc/config/sh/t-mlib-sh3e
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh3e=m3e/
diff --git a/gcc/config/sh/t-mlib-sh4 b/gcc/config/sh/t-mlib-sh4
deleted file mode 100644
index be7f5c4febd..00000000000
--- a/gcc/config/sh/t-mlib-sh4
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4=m4/
diff --git a/gcc/config/sh/t-mlib-sh4-nofpu b/gcc/config/sh/t-mlib-sh4-nofpu
deleted file mode 100644
index fa12433714b..00000000000
--- a/gcc/config/sh/t-mlib-sh4-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_nofpu=m4-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh4-single b/gcc/config/sh/t-mlib-sh4-single
deleted file mode 100644
index f81bddd1efe..00000000000
--- a/gcc/config/sh/t-mlib-sh4-single
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_single=m4-single/
diff --git a/gcc/config/sh/t-mlib-sh4-single-only b/gcc/config/sh/t-mlib-sh4-single-only
deleted file mode 100644
index 121d598d69f..00000000000
--- a/gcc/config/sh/t-mlib-sh4-single-only
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4_single_only=m4-single-only/
diff --git a/gcc/config/sh/t-mlib-sh4a b/gcc/config/sh/t-mlib-sh4a
deleted file mode 100644
index 788b852962d..00000000000
--- a/gcc/config/sh/t-mlib-sh4a
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a=m4a/
diff --git a/gcc/config/sh/t-mlib-sh4a-nofpu b/gcc/config/sh/t-mlib-sh4a-nofpu
deleted file mode 100644
index c9dc28bb886..00000000000
--- a/gcc/config/sh/t-mlib-sh4a-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_nofpu=m4a-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh4a-single b/gcc/config/sh/t-mlib-sh4a-single
deleted file mode 100644
index 036a4cc0a36..00000000000
--- a/gcc/config/sh/t-mlib-sh4a-single
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_single=m4a-single/
diff --git a/gcc/config/sh/t-mlib-sh4a-single-only b/gcc/config/sh/t-mlib-sh4a-single-only
deleted file mode 100644
index 5709e8ef789..00000000000
--- a/gcc/config/sh/t-mlib-sh4a-single-only
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4a_single_only=m4a-single-only/
diff --git a/gcc/config/sh/t-mlib-sh4al b/gcc/config/sh/t-mlib-sh4al
deleted file mode 100644
index e8e36ba5b86..00000000000
--- a/gcc/config/sh/t-mlib-sh4al
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh4al=m4al/
diff --git a/gcc/config/sh/t-mlib-sh5-32media b/gcc/config/sh/t-mlib-sh5-32media
deleted file mode 100644
index f03fd291153..00000000000
--- a/gcc/config/sh/t-mlib-sh5-32media
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_32media=m5-32media/
diff --git a/gcc/config/sh/t-mlib-sh5-32media-nofpu b/gcc/config/sh/t-mlib-sh5-32media-nofpu
deleted file mode 100644
index 0d84f0eed77..00000000000
--- a/gcc/config/sh/t-mlib-sh5-32media-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_32media_nofpu=m5-32media-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh5-64media b/gcc/config/sh/t-mlib-sh5-64media
deleted file mode 100644
index d324f62b5b8..00000000000
--- a/gcc/config/sh/t-mlib-sh5-64media
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_64media=m5-64media/
diff --git a/gcc/config/sh/t-mlib-sh5-64media-nofpu b/gcc/config/sh/t-mlib-sh5-64media-nofpu
deleted file mode 100644
index 127bc47e45e..00000000000
--- a/gcc/config/sh/t-mlib-sh5-64media-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_64media_nofpu=m5-64media-nofpu/
diff --git a/gcc/config/sh/t-mlib-sh5-compact b/gcc/config/sh/t-mlib-sh5-compact
deleted file mode 100644
index e330c25e69e..00000000000
--- a/gcc/config/sh/t-mlib-sh5-compact
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_compact=m5-compact/
diff --git a/gcc/config/sh/t-mlib-sh5-compact-nofpu b/gcc/config/sh/t-mlib-sh5-compact-nofpu
deleted file mode 100644
index cf6afdc4d3c..00000000000
--- a/gcc/config/sh/t-mlib-sh5-compact-nofpu
+++ /dev/null
@@ -1 +0,0 @@
-ML_sh5_compact_nofpu=m5-compact-nofpu/
diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh
index 5f1e8fb0e98..1511d2f68a1 100644
--- a/gcc/config/sh/t-sh
+++ b/gcc/config/sh/t-sh
@@ -27,10 +27,10 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-MULTILIB_ENDIAN = ml/mb
-MULTILIB_CPUS= $(ML_sh1)$(ML_sh2a)$(ML_sh2a_nofpu)$(ML_sh2a_single_only)$(ML_sh2a_single)$(ML_sh2e)$(ML_sh2)$(ML_sh3e)$(ML_sh3)$(ML_sh4_nofpu)$(ML_sh4_single_only)$(ML_sh4_single)$(ML_sh4)$(ML_sh4a_nofpu)$(ML_sh4a_single_only)$(ML_sh4a_single)$(ML_sh4a)$(ML_sh5_32media)$(ML_sh5_32media_nofpu)$(ML_sh5_compact)$(ML_sh5_compact_nofpu)$(ML_sh5_64media)$(ML_sh5_64media_nofpu)
+DEFAULT_ENDIAN = $(word 1,$(TM_ENDIAN_CONFIG))
+OTHER_ENDIAN = $(word 2,$(TM_ENDIAN_CONFIG))
-MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) $(MULTILIB_CPUS:/=)
+MULTILIB_OPTIONS= $(OTHER_ENDIAN) $(TM_MULTILIB_CONFIG)
MULTILIB_DIRNAMES=
# The separate entries for m2a-nofpu and m2a-single-only with
@@ -58,7 +58,34 @@ MULTILIB_MATCHES = $(shell \
done)
# SH1 only supports big endian.
-MULTILIB_EXCEPTIONS = ml/m1 ml/m2a*
+MULTILIB_EXCEPTIONS = ml/m1 ml/m2a* $(TM_MULTILIB_EXCEPTIONS_CONFIG)
+
+MULTILIB_OSDIRNAMES = \
+ $(OTHER_ENDIAN)=!$(OTHER_ENDIAN) \
+ m1=!m1 $(OTHER_ENDIAN)/m1=!$(OTHER_ENDIAN)/m1 \
+ m2a=!m2a $(OTHER_ENDIAN)/m2a=!$(OTHER_ENDIAN)/m2a \
+ m2a-nofpu=!m2a-nofpu $(OTHER_ENDIAN)/m2a-nofpu=!$(OTHER_ENDIAN)/m2a-nofpu \
+ m2a-single-only=!m2a-single-only $(OTHER_ENDIAN)/m2a-single-only=!$(OTHER_ENDIAN)/m2a-single-only \
+ m2a-single=!m2a-single $(OTHER_ENDIAN)/m2a-single=!$(OTHER_ENDIAN)/m2a-single \
+ m2e=!m2e $(OTHER_ENDIAN)/m2e=!$(OTHER_ENDIAN)/m2e \
+ m2=!m2 $(OTHER_ENDIAN)/m2=!$(OTHER_ENDIAN)/m2 \
+ m3e=!m3e $(OTHER_ENDIAN)/m3e=!$(OTHER_ENDIAN)/m3e \
+ m3=!m3 $(OTHER_ENDIAN)/m3=!$(OTHER_ENDIAN)/m3 \
+ m4-nofpu=!m4-nofpu $(OTHER_ENDIAN)/m4-nofpu=!$(OTHER_ENDIAN)/m4-nofpu \
+ m4-single-only=!m4-single-only $(OTHER_ENDIAN)/m4-single-only=!$(OTHER_ENDIAN)/m4-single-only \
+ m4-single=!m4-single $(OTHER_ENDIAN)/m4-single=!$(OTHER_ENDIAN)/m4-single \
+ m4=!m4 $(OTHER_ENDIAN)/m4=!$(OTHER_ENDIAN)/m4 \
+ m4a-nofpu=!m4a-nofpu $(OTHER_ENDIAN)/m4a-nofpu=!$(OTHER_ENDIAN)/m4a-nofpu \
+ m4a-single-only=!m4a-single-only $(OTHER_ENDIAN)/m4a-single-only=!$(OTHER_ENDIAN)/m4a-single-only \
+ m4a-single=!m4a-single $(OTHER_ENDIAN)/m4a-single=!$(OTHER_ENDIAN)/m4a-single \
+ m4a=!m4a $(OTHER_ENDIAN)/m4a=!$(OTHER_ENDIAN)/m4a \
+ m4al=!m4al $(OTHER_ENDIAN)/m4al=!$(OTHER_ENDIAN)/m4al \
+ m5-32media=!m5-32media $(OTHER_ENDIAN)/m5-32media=!$(OTHER_ENDIAN)/m5-32media \
+ m5-32media-nofpu=!m5-32media-nofpu $(OTHER_ENDIAN)/m5-32media-nofpu=!$(OTHER_ENDIAN)/m5-32media-nofpu \
+ m5-compact=!m5-compact $(OTHER_ENDIAN)/m5-compact=!$(OTHER_ENDIAN)/m5-compact \
+ m5-compact-nofpu=!m5-compact-nofpu $(OTHER_ENDIAN)/m5-compact-nofpu=!$(OTHER_ENDIAN)/m5-compact-nofpu \
+ m5-64media=!m5-64media $(OTHER_ENDIAN)/m5-64media=!$(OTHER_ENDIAN)/m5-64media \
+ m5-64media-nofpu=!m5-64media-nofpu $(OTHER_ENDIAN)/m5-64media-nofpu=!$(OTHER_ENDIAN)/m5-64media-nofpu
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
diff --git a/gcc/configure b/gcc/configure
index ae1605fcfcc..755b0b8b5e4 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -458,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines use_gcc_stdint c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC pluginlibs enable_plugin LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file TM_ENDIAN_CONFIG TM_MULTILIB_CONFIG TM_MULTILIB_EXCEPTIONS_CONFIG extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines use_gcc_stdint c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC pluginlibs enable_plugin LIBOBJS LTLIBOBJS'
ac_subst_files='language_hooks'
ac_pwd=`pwd`
@@ -1107,8 +1107,9 @@ Optional Packages:
use sysroot as the system root during the build
--with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
--with-pkgversion=PKG Use PKG in the version string in place of "plugins
- merged with rev 146095"
+ merged with rev 146369"
--with-bugurl=URL Direct users to URL to report a bug
+ --with-multilib-list Select multilibs (SH only)
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
@@ -8070,7 +8071,7 @@ echo "$as_me: error: package version not specified" >&2;}
*) PKGVERSION="($withval) " ;;
esac
else
- PKGVERSION="(plugins merged with rev 146095) "
+ PKGVERSION="(plugins merged with rev 146369) "
fi;
@@ -8139,6 +8140,15 @@ fi;
+
+# Check whether --with-multilib-list or --without-multilib-list was given.
+if test "${with_multilib_list+set}" = set; then
+ withval="$with_multilib_list"
+ :
+else
+ with_multilib_list=default
+fi;
+
# -------------------------
# Checks for other programs
# -------------------------
@@ -14350,13 +14360,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:14353: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:14363: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:14356: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:14366: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:14359: output\"" >&5)
+ (eval echo "\"\$as_me:14369: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -15513,7 +15523,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 15516 "configure"' > conftest.$ac_ext
+ echo '#line 15526 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -16812,11 +16822,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16815: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16825: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16819: \$? = $ac_status" >&5
+ echo "$as_me:16829: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17151,11 +17161,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17154: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17164: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17158: \$? = $ac_status" >&5
+ echo "$as_me:17168: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17256,11 +17266,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17259: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17269: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17263: \$? = $ac_status" >&5
+ echo "$as_me:17273: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17311,11 +17321,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17314: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17324: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17318: \$? = $ac_status" >&5
+ echo "$as_me:17328: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -20123,7 +20133,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 20126 "configure"
+#line 20136 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20219,7 +20229,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 20222 "configure"
+#line 20232 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -24648,6 +24658,9 @@ fi;
+
+
+
# Echo link setup.
if test x${build} = x${host} ; then
if test x${host} = x${target} ; then
@@ -25697,6 +25710,9 @@ s,@check_languages@,$check_languages,;t t
s,@cpp_install_dir@,$cpp_install_dir,;t t
s,@xmake_file@,$xmake_file,;t t
s,@tmake_file@,$tmake_file,;t t
+s,@TM_ENDIAN_CONFIG@,$TM_ENDIAN_CONFIG,;t t
+s,@TM_MULTILIB_CONFIG@,$TM_MULTILIB_CONFIG,;t t
+s,@TM_MULTILIB_EXCEPTIONS_CONFIG@,$TM_MULTILIB_EXCEPTIONS_CONFIG,;t t
s,@extra_gcc_objs@,$extra_gcc_objs,;t t
s,@extra_headers_list@,$extra_headers_list,;t t
s,@extra_objs@,$extra_objs,;t t
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d10b2beb80a..889bbeb9499 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -780,7 +780,7 @@ esac],
[onestep=""])
AC_SUBST(onestep)
-ACX_PKGVERSION([plugins merged with rev 146095])
+ACX_PKGVERSION([plugins merged with rev 146369])
ACX_BUGURL([http://gcc.gnu.org/bugs.html])
# Sanity check enable_languages in case someone does not run the toplevel
@@ -810,6 +810,11 @@ AC_SUBST(datarootdir)
AC_SUBST(docdir)
AC_SUBST(htmldir)
+AC_ARG_WITH(multilib-list,
+[ --with-multilib-list Select multilibs (SH only)],
+:,
+with_multilib_list=default)
+
# -------------------------
# Checks for other programs
# -------------------------
@@ -3879,6 +3884,9 @@ AC_SUBST(check_languages)
AC_SUBST(cpp_install_dir)
AC_SUBST(xmake_file)
AC_SUBST(tmake_file)
+AC_SUBST(TM_ENDIAN_CONFIG)
+AC_SUBST(TM_MULTILIB_CONFIG)
+AC_SUBST(TM_MULTILIB_EXCEPTIONS_CONFIG)
AC_SUBST(extra_gcc_objs)
AC_SUBST(extra_headers_list)
AC_SUBST(extra_objs)
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index aa0ef54e603..259aa8e7a9d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,33 @@
+2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/32061
+ PR c++/36954
+ * call.c (build_new_op): Save the original codes of operands
+ before folding.
+
+2009-04-18 Kazu Hirata <kazu@codesourcery.com>
+
+ * cp-tree.h: Remove the prototype for insert_block.
+ * decl.c (insert_block): Remove.
+
+2009-04-16 Ian Lance Taylor <iant@google.com>
+
+ * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
+ (tsubst_flags_t): Change typedef from enum type to int.
+
+2009-04-16 Le-Chun Wu <lcwu@google.com>
+
+ * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
+ instead of targetm.vector_opaque_p.
+
+2009-04-15 Le-Chun Wu <lcwu@google.com>
+
+ PR c++/39551
+ * call.c (build_over_call): Set TREE_NO_WARNING on the
+ compiler-generated INDIRECT_REF expression.
+ * cvt.c (convert_to_void): Emit warning when stripping off
+ INDIRECT_REF.
+
2009-04-14 Diego Novillo <dnovillo@google.com>
* parser.c (cp_parser_type_specifier_seq): Move call to
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index ef7c045acab..feb3004517f 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3897,11 +3897,12 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
tree result = NULL_TREE;
bool result_valid_p = false;
enum tree_code code2 = NOP_EXPR;
+ enum tree_code code_orig_arg1 = ERROR_MARK;
+ enum tree_code code_orig_arg2 = ERROR_MARK;
conversion *conv;
void *p;
bool strict_p;
bool any_viable_p;
- bool expl_eq_arg1 = false;
if (error_operand_p (arg1)
|| error_operand_p (arg2)
@@ -3935,8 +3936,10 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
case TRUTH_ANDIF_EXPR:
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
- if (COMPARISON_CLASS_P (arg1))
- expl_eq_arg1 = true;
+ /* These are saved for the sake of warn_logical_operator. */
+ code_orig_arg1 = TREE_CODE (arg1);
+ code_orig_arg2 = TREE_CODE (arg2);
+
default:
break;
}
@@ -4140,8 +4143,16 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
if (conv->kind == ck_ref_bind)
conv = conv->u.next;
arg1 = convert_like (conv, arg1, complain);
+
if (arg2)
{
+ /* We need to call warn_logical_operator before
+ converting arg2 to a boolean_type. */
+ if (complain & tf_warning)
+ warn_logical_operator (input_location, code,
+ code_orig_arg1, arg1,
+ code_orig_arg2, arg2);
+
conv = cand->convs[1];
if (conv->kind == ck_ref_bind)
conv = conv->u.next;
@@ -4155,12 +4166,6 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
arg3 = convert_like (conv, arg3, complain);
}
- if (!expl_eq_arg1)
- {
- if (complain & tf_warning)
- warn_logical_operator (code, arg1, arg2);
- expl_eq_arg1 = true;
- }
}
}
@@ -4185,8 +4190,9 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
case TRUTH_ORIF_EXPR:
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
- if (!expl_eq_arg1)
- warn_logical_operator (code, arg1, arg2);
+ warn_logical_operator (input_location, code,
+ code_orig_arg1, arg1, code_orig_arg2, arg2);
+ /* Fall through. */
case PLUS_EXPR:
case MINUS_EXPR:
case MULT_EXPR:
@@ -5419,6 +5425,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
if (test)
t = build3 (COND_EXPR, TREE_TYPE (t), test, arg0, t);
val = cp_build_indirect_ref (t, 0, complain);
+ TREE_NO_WARNING (val) = 1;
}
return val;
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 849fdc736e4..6637d4f32b8 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3566,7 +3566,7 @@ typedef enum linkage_kind {
} linkage_kind;
/* Bitmask flags to control type substitution. */
-typedef enum tsubst_flags_t {
+enum tsubst_flags {
tf_none = 0, /* nothing special */
tf_error = 1 << 0, /* give error messages */
tf_warning = 1 << 1, /* give warnings too */
@@ -3585,7 +3585,11 @@ typedef enum tsubst_flags_t {
when issuing other errors. */
/* Convenient substitution flags combinations. */
tf_warning_or_error = tf_warning | tf_error
-} tsubst_flags_t;
+};
+
+/* This type is used for parameters and variables which hold
+ combinations of the flags in enum tsubst_flags. */
+typedef int tsubst_flags_t;
/* The kind of checking we can do looking in a class hierarchy. */
typedef enum base_access {
@@ -4303,7 +4307,6 @@ extern void adjust_clone_args (tree);
/* decl.c */
extern tree poplevel (int, int, int);
-extern void insert_block (tree);
extern tree pushdecl (tree);
extern tree pushdecl_maybe_friend (tree, bool);
extern void cxx_init_decl_processing (void);
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index fed4ab2910c..5032f1c0391 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -870,7 +870,20 @@ convert_to_void (tree expr, const char *implicit, tsubst_flags_t complain)
implicit ? implicit : "void context");
}
if (is_reference || !is_volatile || !is_complete || TREE_ADDRESSABLE (type))
- expr = TREE_OPERAND (expr, 0);
+ {
+ /* Emit a warning (if enabled) when the "effect-less" INDIRECT_REF
+ operation is stripped off. Note that we don't warn about
+ - an expression with TREE_NO_WARNING set. (For an example of
+ such expressions, see build_over_call in call.c.)
+ - automatic dereferencing of references, since the user cannot
+ control it. (See also warn_if_unused_value() in stmt.c.) */
+ if (warn_unused_value
+ && (complain & tf_warning)
+ && !TREE_NO_WARNING (expr)
+ && !is_reference)
+ warning (OPT_Wunused_value, "value computed is not used");
+ expr = TREE_OPERAND (expr, 0);
+ }
break;
}
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 5ab9392849b..cd550f224cb 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -783,18 +783,6 @@ poplevel (int keep, int reverse, int functionbody)
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, block);
}
-/* Insert BLOCK at the end of the list of subblocks of the
- current binding level. This is used when a BIND_EXPR is expanded,
- to handle the BLOCK node inside the BIND_EXPR. */
-
-void
-insert_block (tree block)
-{
- TREE_USED (block) = 1;
- current_binding_level->blocks
- = chainon (current_binding_level->blocks, block);
-}
-
/* Walk all the namespaces contained NAMESPACE, including NAMESPACE
itself, calling F for each. The DATA is passed to F as well. */
@@ -5157,7 +5145,7 @@ check_initializer (tree decl, tree init, int flags, tree *cleanup)
decl);
init = build_tree_list (NULL_TREE, init);
}
- else if ((*targetm.vector_opaque_p) (type))
+ else if (TREE_CODE (type) == VECTOR_TYPE && TYPE_VECTOR_OPAQUE (type))
{
error ("opaque vector types cannot be initialized");
init = error_mark_node;
@@ -8828,8 +8816,13 @@ grokdeclarator (const cp_declarator *declarator,
/* Replace the anonymous name with the real name everywhere. */
for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t))
- if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
- TYPE_NAME (t) = decl;
+ {
+ if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
+ {
+ debug_hooks->set_name (t, decl);
+ TYPE_NAME (t) = decl;
+ }
+ }
if (TYPE_LANG_SPECIFIC (type))
TYPE_WAS_ANONYMOUS (type) = 1;
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index babba15f8a5..c8bf30d69d6 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -376,6 +376,7 @@ const struct gcc_debug_hooks dbx_debug_hooks =
dbxout_handle_pch, /* handle_pch */
debug_nothing_rtx, /* var_location */
debug_nothing_void, /* switch_text_section */
+ debug_nothing_tree_tree, /* set_name */
0 /* start_end_main_source_file */
};
#endif /* DBX_DEBUGGING_INFO */
@@ -408,6 +409,7 @@ const struct gcc_debug_hooks xcoff_debug_hooks =
dbxout_handle_pch, /* handle_pch */
debug_nothing_rtx, /* var_location */
debug_nothing_void, /* switch_text_section */
+ debug_nothing_tree_tree, /* set_name */
0 /* start_end_main_source_file */
};
#endif /* XCOFF_DEBUGGING_INFO */
@@ -3593,7 +3595,7 @@ dbxout_block (tree block, int depth, tree args)
while (block)
{
/* Ignore blocks never expanded or otherwise marked as real. */
- if (TREE_ASM_WRITTEN (block))
+ if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
{
int did_output;
int blocknum = BLOCK_NUMBER (block);
diff --git a/gcc/debug.c b/gcc/debug.c
index e0beaa94b08..3946debc519 100644
--- a/gcc/debug.c
+++ b/gcc/debug.c
@@ -50,6 +50,7 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
debug_nothing_int, /* handle_pch */
debug_nothing_rtx, /* var_location */
debug_nothing_void, /* switch_text_section */
+ debug_nothing_tree_tree, /* set_name */
0 /* start_end_main_source_file */
};
@@ -67,6 +68,12 @@ debug_nothing_tree (tree decl ATTRIBUTE_UNUSED)
}
void
+debug_nothing_tree_tree (tree t1 ATTRIBUTE_UNUSED,
+ tree t2 ATTRIBUTE_UNUSED)
+{
+}
+
+void
debug_nothing_tree_tree_tree_bool (tree t1 ATTRIBUTE_UNUSED,
tree t2 ATTRIBUTE_UNUSED,
tree t3 ATTRIBUTE_UNUSED,
diff --git a/gcc/debug.h b/gcc/debug.h
index e1ee12e829d..1169c51a66b 100644
--- a/gcc/debug.h
+++ b/gcc/debug.h
@@ -126,6 +126,8 @@ struct gcc_debug_hooks
text sections. */
void (* switch_text_section) (void);
+ void (* set_name) (tree, tree);
+
/* This is 1 if the debug writer wants to see start and end commands for the
main source files, and 0 otherwise. */
int start_end_main_source_file;
@@ -140,6 +142,7 @@ extern void debug_nothing_int_charstar (unsigned int, const char *);
extern void debug_nothing_int (unsigned int);
extern void debug_nothing_int_int (unsigned int, unsigned int);
extern void debug_nothing_tree (tree);
+extern void debug_nothing_tree_tree (tree, tree);
extern void debug_nothing_tree_int (tree, int);
extern void debug_nothing_tree_tree_tree_bool (tree, tree, tree, bool);
extern bool debug_true_const_tree (const_tree);
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 7b83dce53f6..88f761b679a 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -1,6 +1,6 @@
/* Allocation for dataflow support routines.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 Free Software Foundation, Inc.
+ 2008, 2009 Free Software Foundation, Inc.
Originally contributed by Michael P. Hayes
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
@@ -766,7 +766,7 @@ struct rtl_opt_pass pass_df_initialize_opt =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -793,7 +793,7 @@ struct rtl_opt_pass pass_df_initialize_no_opt =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -842,7 +842,7 @@ struct rtl_opt_pass pass_df_finish =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/df.h b/gcc/df.h
index 639c52157b4..fd4b6089b41 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "bitmap.h"
#include "basic-block.h"
#include "alloc-pool.h"
+#include "timevar.h"
struct dataflow;
struct df;
@@ -275,7 +276,7 @@ struct df_problem {
struct df_problem *dependent_problem;
/* The timevar id associated with this pass. */
- unsigned int tv_id;
+ timevar_id_t tv_id;
/* True if the df_set_blocks should null out the basic block info if
this block drops out of df->blocks_to_analyze. */
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e8b5628c0f1..4a7db02c902 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -6758,7 +6758,7 @@ This is an acceptable initializer even if @var{EXPRESSION} is not a
constant expression, including the case where
@code{__builtin_constant_p} returns 1 because @var{EXPRESSION} can be
folded to a constant but @var{EXPRESSION} contains operands that would
-not otherwize be permitted in a static initializer (for example,
+not otherwise be permitted in a static initializer (for example,
@code{0 && foo ()}). GCC must be more conservative about evaluating the
built-in in this case, because it has no opportunity to perform
optimization.
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 07b807b0e5d..7cba4d3df0e 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -983,6 +983,57 @@ sysv, aix.
@end table
+@item --with-multilib-list=@var{list}
+@itemx --without-multilib-list
+Specify what multilibs to build.
+Currently only implemented for sh*-*-*.
+
+@var{list} is a comma separated list of CPU names. These must be of the
+form @code{sh*} or @code{m*} (in which case they match the compiler option
+for that processor). The list should not contain any endian options -
+these are handled by @option{--with-endian}.
+
+If @var{list} is empty, then there will be no multilibs for extra
+processors. The multilib for the secondary endian remains enabled.
+
+As a special case, if an entry in the list starts with a @code{!}
+(exclamation point), then it is added to the list of excluded multilibs.
+Entries of this sort should be compatible with @samp{MULTILIB_EXCLUDES}
+(once the leading @code{!} has been stripped).
+
+If @option{--with-multilib-list} is not given, then a default set of
+multilibs is selected based on the value of @option{--target}. This is
+usually the complete set of libraries, but some targets imply a more
+specialized subset.
+
+Example 1: to configure a compiler for SH4A only, but supporting both
+endians, with little endian being the default:
+@smallexample
+--with-cpu=sh4a --with-endian=little,big --with-multilib-list=
+@end smallexample
+
+Example 2: to configure a compiler for both SH4A and SH4AL-DSP, but with
+only little endian SH4AL:
+@smallexample
+--with-cpu=sh4a --with-endian=little,big --with-multilib-list=sh4al,!mb/m4al
+@end smallexample
+
+@item --with-endian=@var{endians}
+Specify what endians to use.
+Currently only implemented for sh*-*-*.
+
+@var{endians} may be one of the following:
+@table @code
+@item big
+Use big endian exclusively.
+@item little
+Use little endian exclusively.
+@item big,little
+Use big endian by default. Provide a multilib for little endian.
+@item little,big
+Use little endian by default. Provide a multilib for big endian.
+@end table
+
@item --enable-threads
Specify that the target
supports threads. This affects the Objective-C compiler and runtime
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 554b6d93cad..e1dd0e0ad46 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2758,6 +2758,7 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
-Warray-bounds @r{(only with} @option{-O2}@r{)} @gol
-Wc++0x-compat @gol
-Wchar-subscripts @gol
+-Wenum-compare @r{(in C/Objc; this is on by default in C++)} @gol
-Wimplicit-int @gol
-Wimplicit-function-declaration @gol
-Wcomment @gol
@@ -2803,6 +2804,7 @@ name is still supported, but the newer name is more descriptive.)
@gccoptlist{-Wclobbered @gol
-Wempty-body @gol
-Wignored-qualifiers @gol
+-Wlogical-op @gol
-Wmissing-field-initializers @gol
-Wmissing-parameter-type @r{(C only)} @gol
-Wold-style-declaration @r{(C only)} @gol
@@ -3743,11 +3745,12 @@ integers are disabled by default in C++ unless
Warn if an empty body occurs in an @samp{if}, @samp{else} or @samp{do
while} statement. This warning is also enabled by @option{-Wextra}.
-@item -Wenum-compare @r{(C++ and Objective-C++ only)}
+@item -Wenum-compare
@opindex Wenum-compare
@opindex Wno-enum-compare
-Warn about a comparison between values of different enum types. This
-warning is enabled by default.
+Warn about a comparison between values of different enum types. In C++
+this warning is enabled by default. In C this warning is enabled by
+@option{-Wall}.
@item -Wsign-compare
@opindex Wsign-compare
@@ -3788,7 +3791,8 @@ programmer intended to use @code{strcmp}. This warning is enabled by
@opindex Wno-logical-op
Warn about suspicious uses of logical operators in expressions.
This includes using logical operators in contexts where a
-bit-wise operator is likely to be expected.
+bit-wise operator is likely to be expected. This warning is enabled by
+@option{-Wextra}.
@item -Waggregate-return
@opindex Waggregate-return
@@ -15566,14 +15570,14 @@ This option is available for Cygwin and MinGW targets. It
specifies that a console application is to be generated, by
instructing the linker to set the PE header subsystem type
required for console applications.
-This is the default behaviour for Cygwin and MinGW targets.
+This is the default behavior for Cygwin and MinGW targets.
@item -mcygwin
@opindex mcygwin
This option is available for Cygwin targets. It specifies that
the Cygwin internal interface is to be used for predefined
preprocessor macros, C runtime libraries and related linker
-paths and options. For Cygwin targets this is the default behaviour.
+paths and options. For Cygwin targets this is the default behavior.
This option is deprecated and will be removed in a future release.
@item -mno-cygwin
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 0396a706cf7..5718eb9be67 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -750,10 +750,10 @@ This variable is declared in @file{options.h}, which is included before
any target-specific headers.
@end deftypevar
-@deftypevar {Target Hook} int TARGET_DEFAULT_TARGET_FLAGS
+@deftypevr {Target Hook} int TARGET_DEFAULT_TARGET_FLAGS
This variable specifies the initial value of @code{target_flags}.
Its default setting is 0.
-@end deftypevar
+@end deftypevr
@cindex optional hardware or system features
@cindex features, optional, in system conventions
@@ -1424,14 +1424,6 @@ floating-point arithmetic.
The default definition of this macro returns false for all sizes.
@end defmac
-@deftypefn {Target Hook} bool TARGET_VECTOR_OPAQUE_P (tree @var{type})
-This target hook should return @code{true} a vector is opaque. That
-is, if no cast is needed when copying a vector value of type
-@var{type} into another vector lvalue of the same size. Vector opaque
-types cannot be initialized. The default is that there are no such
-types.
-@end deftypefn
-
@deftypefn {Target Hook} bool TARGET_MS_BITFIELD_LAYOUT_P (tree @var{record_type})
This target hook returns @code{true} if bit-fields in the given
@var{record_type} are to be laid out following the rules of Microsoft
@@ -5680,18 +5672,18 @@ in order to make effective use of section anchors. It won't use
section anchors at all unless either @code{TARGET_MIN_ANCHOR_OFFSET}
or @code{TARGET_MAX_ANCHOR_OFFSET} is set to a nonzero value.
-@deftypevar {Target Hook} HOST_WIDE_INT TARGET_MIN_ANCHOR_OFFSET
+@deftypevr {Target Hook} HOST_WIDE_INT TARGET_MIN_ANCHOR_OFFSET
The minimum offset that should be applied to a section anchor.
On most targets, it should be the smallest offset that can be
applied to a base register while still giving a legitimate address
for every mode. The default value is 0.
-@end deftypevar
+@end deftypevr
-@deftypevar {Target Hook} HOST_WIDE_INT TARGET_MAX_ANCHOR_OFFSET
+@deftypevr {Target Hook} HOST_WIDE_INT TARGET_MAX_ANCHOR_OFFSET
Like @code{TARGET_MIN_ANCHOR_OFFSET}, but the maximum (inclusive)
offset that should be applied to section anchors. The default
value is 0.
-@end deftypevar
+@end deftypevr
@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_ANCHOR (rtx @var{x})
Write the assembly code to define section anchor @var{x}, which is a
@@ -6839,10 +6831,10 @@ Returns true if @var{exp} should be placed into a ``small data'' section.
The default version of this hook always returns false.
@end deftypefn
-@deftypevar {Target Hook} bool TARGET_HAVE_SRODATA_SECTION
+@deftypevr {Target Hook} bool TARGET_HAVE_SRODATA_SECTION
Contains the value true if the target places read-only
``small data'' into a separate section. The default value is false.
-@end deftypevar
+@end deftypevr
@deftypefn {Target Hook} bool TARGET_BINDS_LOCAL_P (tree @var{exp})
Returns true if @var{exp} names an object for which name resolution
@@ -6854,10 +6846,10 @@ for ELF, which has a looser model of global name binding than other
currently supported object file formats.
@end deftypefn
-@deftypevar {Target Hook} bool TARGET_HAVE_TLS
+@deftypevr {Target Hook} bool TARGET_HAVE_TLS
Contains the value true if the target supports thread-local storage.
The default value is false.
-@end deftypevar
+@end deftypevr
@node PIC
@@ -8498,10 +8490,10 @@ Define this macro if your target has ABI specified unwind tables. Usually
these will be output by @code{TARGET_UNWIND_EMIT}.
@end defmac
-@deftypevar {Target Hook} bool TARGET_UNWIND_TABLES_DEFAULT
+@deftypevr {Target Hook} bool TARGET_UNWIND_TABLES_DEFAULT
This variable should be set to @code{true} if the target ABI requires unwinding
tables even when exceptions are not used.
-@end deftypevar
+@end deftypevr
@defmac MUST_USE_SJLJ_EXCEPTIONS
This macro need only be defined if @code{DWARF2_UNWIND_INFO} is
@@ -8525,12 +8517,12 @@ minimum alignment otherwise. @xref{SDB and DWARF}. Only applicable if
the target supports DWARF 2 frame unwind information.
@end defmac
-@deftypevar {Target Hook} bool TARGET_TERMINATE_DW2_EH_FRAME_INFO
+@deftypevr {Target Hook} bool TARGET_TERMINATE_DW2_EH_FRAME_INFO
Contains the value true if the target should add a zero word onto the
end of a Dwarf-2 frame info section when used for exception handling.
Default value is false if @code{EH_FRAME_SECTION_NAME} is defined, and
true otherwise.
-@end deftypevar
+@end deftypevr
@deftypefn {Target Hook} rtx TARGET_DWARF_REGISTER_SPAN (rtx @var{reg})
Given a register, this hook should return a parallel of registers to
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 7d82c47679a..d4799b163b5 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -4549,6 +4549,7 @@ static void dwarf2out_imported_module_or_decl_1 (tree, tree, tree,
static void dwarf2out_abstract_function (tree);
static void dwarf2out_var_location (rtx);
static void dwarf2out_begin_function (tree);
+static void dwarf2out_set_name (tree, tree);
/* The debug hooks structure. */
@@ -4582,6 +4583,7 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
debug_nothing_int, /* handle_pch */
dwarf2out_var_location,
dwarf2out_switch_text_section,
+ dwarf2out_set_name,
1 /* start_end_main_source_file */
};
#endif
@@ -5929,12 +5931,9 @@ debug_str_eq (const void *x1, const void *x2)
(const char *)x2) == 0;
}
-/* Add a string attribute value to a DIE. */
-
-static inline void
-add_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
+static struct indirect_string_node *
+find_AT_string (const char *str)
{
- dw_attr_node attr;
struct indirect_string_node *node;
void **slot;
@@ -5955,6 +5954,18 @@ add_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
node = (struct indirect_string_node *) *slot;
node->refcount++;
+ return node;
+}
+
+/* Add a string attribute value to a DIE. */
+
+static inline void
+add_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
+{
+ dw_attr_node attr;
+ struct indirect_string_node *node;
+
+ node = find_AT_string (str);
attr.dw_attr = attr_kind;
attr.dw_attr_val.val_class = dw_val_class_str;
@@ -10889,21 +10900,22 @@ field_byte_offset (const_tree decl)
unsigned HOST_WIDE_INT type_size_in_bits;
type = field_type (decl);
+ type_size_in_bits = simple_type_size_in_bits (type);
+ type_align_in_bits = simple_type_align_in_bits (type);
+
field_size_tree = DECL_SIZE (decl);
/* The size could be unspecified if there was an error, or for
a flexible array member. */
- if (! field_size_tree)
+ if (!field_size_tree)
field_size_tree = bitsize_zero_node;
- /* If we don't know the size of the field, pretend it's a full word. */
+ /* If the size of the field is not constant, use the type size. */
if (host_integerp (field_size_tree, 1))
field_size_in_bits = tree_low_cst (field_size_tree, 1);
else
- field_size_in_bits = BITS_PER_WORD;
+ field_size_in_bits = type_size_in_bits;
- type_size_in_bits = simple_type_size_in_bits (type);
- type_align_in_bits = simple_type_align_in_bits (type);
decl_align_in_bits = simple_decl_align_in_bits (decl);
/* The GCC front-end doesn't make any attempt to keep track of the
@@ -15763,6 +15775,31 @@ maybe_emit_file (struct dwarf_file_data * fd)
return fd->emitted_number;
}
+/* Replace DW_AT_name for the decl with name. */
+
+static void
+dwarf2out_set_name (tree decl, tree name)
+{
+ dw_die_ref die;
+ dw_attr_ref attr;
+
+ die = TYPE_SYMTAB_DIE (decl);
+ if (!die)
+ return;
+
+ attr = get_AT (die, DW_AT_name);
+ if (attr)
+ {
+ struct indirect_string_node *node;
+
+ node = find_AT_string (dwarf2_name (name, 0));
+ /* replace the string. */
+ attr->dw_attr_val.v.val_str = node;
+ }
+
+ else
+ add_name_attribute (die, dwarf2_name (name, 0));
+}
/* Called by the final INSN scan whenever we see a var location. We
use it to drop labels in the right places, and throw the location in
our lookup table. */
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 1f51e125f35..ffb658738d1 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1858,17 +1858,6 @@ set_mem_attributes (rtx ref, tree t, int objectp)
set_mem_attributes_minus_bitpos (ref, t, objectp, 0);
}
-/* Set MEM to the decl that REG refers to. */
-
-void
-set_mem_attrs_from_reg (rtx mem, rtx reg)
-{
- MEM_ATTRS (mem)
- = get_mem_attrs (MEM_ALIAS_SET (mem), REG_EXPR (reg),
- GEN_INT (REG_OFFSET (reg)),
- MEM_SIZE (mem), MEM_ALIGN (mem), GET_MODE (mem));
-}
-
/* Set the alias set of MEM to SET. */
void
@@ -2392,7 +2381,7 @@ struct rtl_opt_pass pass_unshare_all_rtl =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/except.c b/gcc/except.c
index 37bc5bbf13c..bc3b8c495a2 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -114,119 +114,15 @@ static int sjlj_fc_personality_ofs;
static int sjlj_fc_lsda_ofs;
static int sjlj_fc_jbuf_ofs;
-/* Describes one exception region. */
-struct eh_region GTY(())
-{
- /* The immediately surrounding region. */
- struct eh_region *outer;
-
- /* The list of immediately contained regions. */
- struct eh_region *inner;
- struct eh_region *next_peer;
-
- /* An identifier for this region. */
- int region_number;
-
- /* When a region is deleted, its parents inherit the REG_EH_REGION
- numbers already assigned. */
- bitmap aka;
-
- /* Each region does exactly one thing. */
- enum eh_region_type
- {
- ERT_UNKNOWN = 0,
- ERT_CLEANUP,
- ERT_TRY,
- ERT_CATCH,
- ERT_ALLOWED_EXCEPTIONS,
- ERT_MUST_NOT_THROW,
- ERT_THROW
- } type;
-
- /* Holds the action to perform based on the preceding type. */
- union eh_region_u {
- /* A list of catch blocks, a surrounding try block,
- and the label for continuing after a catch. */
- struct eh_region_u_try {
- struct eh_region *eh_catch;
- struct eh_region *last_catch;
- } GTY ((tag ("ERT_TRY"))) eh_try;
-
- /* The list through the catch handlers, the list of type objects
- matched, and the list of associated filters. */
- struct eh_region_u_catch {
- struct eh_region *next_catch;
- struct eh_region *prev_catch;
- tree type_list;
- tree filter_list;
- } GTY ((tag ("ERT_CATCH"))) eh_catch;
-
- /* A tree_list of allowed types. */
- struct eh_region_u_allowed {
- tree type_list;
- int filter;
- } GTY ((tag ("ERT_ALLOWED_EXCEPTIONS"))) allowed;
-
- /* The type given by a call to "throw foo();", or discovered
- for a throw. */
- struct eh_region_u_throw {
- tree type;
- } GTY ((tag ("ERT_THROW"))) eh_throw;
-
- /* Retain the cleanup expression even after expansion so that
- we can match up fixup regions. */
- struct eh_region_u_cleanup {
- struct eh_region *prev_try;
- } GTY ((tag ("ERT_CLEANUP"))) cleanup;
- } GTY ((desc ("%0.type"))) u;
-
- /* Entry point for this region's handler before landing pads are built. */
- rtx label;
- tree tree_label;
-
- /* Entry point for this region's handler from the runtime eh library. */
- rtx landing_pad;
-
- /* Entry point for this region's handler from an inner region. */
- rtx post_landing_pad;
-
- /* The RESX insn for handing off control to the next outermost handler,
- if appropriate. */
- rtx resume;
-
- /* True if something in this region may throw. */
- unsigned may_contain_throw : 1;
-};
-
-typedef struct eh_region *eh_region;
struct call_site_record GTY(())
{
rtx landing_pad;
int action;
};
-
-DEF_VEC_P(eh_region);
-DEF_VEC_ALLOC_P(eh_region, gc);
-DEF_VEC_ALLOC_P(eh_region, heap);
-
-/* Used to save exception status for each function. */
-struct eh_status GTY(())
-{
- /* The tree of all regions for this function. */
- struct eh_region *region_tree;
-
- /* The same information as an indexable array. */
- VEC(eh_region,gc) *region_array;
- int last_region_number;
-
- htab_t GTY((param_is (struct throw_stmt_node))) throw_stmt_table;
-};
static int t2r_eq (const void *, const void *);
static hashval_t t2r_hash (const void *);
-static void add_type_for_runtime (tree);
-static tree lookup_type_for_runtime (tree);
static int ttypes_filter_eq (const void *, const void *);
static hashval_t ttypes_filter_hash (const void *);
@@ -1224,32 +1120,6 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
return eh_offset;
}
-/* Return true if REGION_A is outer to REGION_B in IFUN. */
-
-bool
-eh_region_outer_p (struct function *ifun, int region_a, int region_b)
-{
- struct eh_region *rp_a, *rp_b;
-
- gcc_assert (ifun->eh->last_region_number > 0);
- gcc_assert (ifun->eh->region_tree);
-
- rp_a = VEC_index (eh_region, ifun->eh->region_array, region_a);
- rp_b = VEC_index (eh_region, ifun->eh->region_array, region_b);
- gcc_assert (rp_a != NULL);
- gcc_assert (rp_b != NULL);
-
- do
- {
- if (rp_a == rp_b)
- return true;
- rp_b = rp_b->outer;
- }
- while (rp_b);
-
- return false;
-}
-
/* Return region number of region that is outer to both if REGION_A and
REGION_B in IFUN. */
@@ -1308,7 +1178,7 @@ t2r_hash (const void *pentry)
return TREE_HASH (TREE_PURPOSE (entry));
}
-static void
+void
add_type_for_runtime (tree type)
{
tree *slot;
@@ -1322,7 +1192,7 @@ add_type_for_runtime (tree type)
}
}
-static tree
+tree
lookup_type_for_runtime (tree type)
{
tree *slot;
@@ -2976,6 +2846,10 @@ set_nothrow_function_flags (void)
(current_function_decl))
>= AVAIL_AVAILABLE))
{
+ struct cgraph_node *node = cgraph_node (current_function_decl);
+ struct cgraph_edge *e;
+ for (e = node->callers; e; e = e->next_caller)
+ e->can_throw_external = false;
TREE_NOTHROW (current_function_decl) = 1;
if (dump_file)
@@ -2995,7 +2869,7 @@ struct rtl_opt_pass pass_set_nothrow_function_flags =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3517,7 +3391,7 @@ struct rtl_opt_pass pass_convert_to_eh_region_ranges =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -4092,6 +3966,15 @@ dump_eh_tree (FILE * out, struct function *fun)
}
}
+/* Dump the EH tree for FN on stderr. */
+
+void
+debug_eh_tree (struct function *fn)
+{
+ dump_eh_tree (stderr, fn);
+}
+
+
/* Verify EH region invariants. */
static bool
diff --git a/gcc/except.h b/gcc/except.h
index 24611a559c3..18c36b01987 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -24,12 +24,109 @@ along with GCC; see the file COPYING3. If not see
struct function;
-/* Per-function EH data. Used only in except.c, but GC and others
- manipulate pointers to the opaque type. */
-struct eh_status;
+/* Describes one exception region. */
+struct eh_region GTY(())
+{
+ /* The immediately surrounding region. */
+ struct eh_region *outer;
+
+ /* The list of immediately contained regions. */
+ struct eh_region *inner;
+ struct eh_region *next_peer;
+
+ /* An identifier for this region. */
+ int region_number;
+
+ /* When a region is deleted, its parents inherit the REG_EH_REGION
+ numbers already assigned. */
+ bitmap aka;
+
+ /* Each region does exactly one thing. */
+ enum eh_region_type
+ {
+ ERT_UNKNOWN = 0,
+ ERT_CLEANUP,
+ ERT_TRY,
+ ERT_CATCH,
+ ERT_ALLOWED_EXCEPTIONS,
+ ERT_MUST_NOT_THROW,
+ ERT_THROW
+ } type;
+
+ /* Holds the action to perform based on the preceding type. */
+ union eh_region_u {
+ /* A list of catch blocks, a surrounding try block,
+ and the label for continuing after a catch. */
+ struct eh_region_u_try {
+ struct eh_region *eh_catch;
+ struct eh_region *last_catch;
+ } GTY ((tag ("ERT_TRY"))) eh_try;
+
+ /* The list through the catch handlers, the list of type objects
+ matched, and the list of associated filters. */
+ struct eh_region_u_catch {
+ struct eh_region *next_catch;
+ struct eh_region *prev_catch;
+ tree type_list;
+ tree filter_list;
+ } GTY ((tag ("ERT_CATCH"))) eh_catch;
+
+ /* A tree_list of allowed types. */
+ struct eh_region_u_allowed {
+ tree type_list;
+ int filter;
+ } GTY ((tag ("ERT_ALLOWED_EXCEPTIONS"))) allowed;
+
+ /* The type given by a call to "throw foo();", or discovered
+ for a throw. */
+ struct eh_region_u_throw {
+ tree type;
+ } GTY ((tag ("ERT_THROW"))) eh_throw;
+
+ /* Retain the cleanup expression even after expansion so that
+ we can match up fixup regions. */
+ struct eh_region_u_cleanup {
+ struct eh_region *prev_try;
+ } GTY ((tag ("ERT_CLEANUP"))) cleanup;
+ } GTY ((desc ("%0.type"))) u;
+
+ /* Entry point for this region's handler before landing pads are built. */
+ rtx label;
+ tree tree_label;
+
+ /* Entry point for this region's handler from the runtime eh library. */
+ rtx landing_pad;
+
+ /* Entry point for this region's handler from an inner region. */
+ rtx post_landing_pad;
+
+ /* The RESX insn for handing off control to the next outermost handler,
+ if appropriate. */
+ rtx resume;
+
+ /* True if something in this region may throw. */
+ unsigned may_contain_throw : 1;
+};
+
+typedef struct eh_region *eh_region;
+DEF_VEC_P(eh_region);
+DEF_VEC_ALLOC_P(eh_region, gc);
+DEF_VEC_ALLOC_P(eh_region, heap);
+
+/* Per-function EH data. Used to save exception status for each
+ function. */
+struct eh_status GTY(())
+{
+ /* The tree of all regions for this function. */
+ struct eh_region *region_tree;
+
+ /* The same information as an indexable array. */
+ VEC(eh_region,gc) *region_array;
+ int last_region_number;
+
+ htab_t GTY((param_is (struct throw_stmt_node))) throw_stmt_table;
+};
-/* Internal structure describing a region. */
-struct eh_region;
/* Test: is exception handling turned on? */
extern int doing_eh (int);
@@ -108,8 +205,10 @@ extern void collect_eh_region_array (void);
extern void expand_resx_expr (tree);
extern void verify_eh_tree (struct function *);
extern void dump_eh_tree (FILE *, struct function *);
-extern bool eh_region_outer_p (struct function *, int, int);
+void debug_eh_tree (struct function *);
extern int eh_region_outermost (struct function *, int, int);
+extern void add_type_for_runtime (tree);
+extern tree lookup_type_for_runtime (tree);
/* If non-NULL, this is a function that returns an expression to be
executed if an unhandled exception is propagated out of a cleanup
diff --git a/gcc/final.c b/gcc/final.c
index 32d6b74e8f1..621bc28bcb1 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1,6 +1,6 @@
/* Convert RTL to assembler code and output it, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -801,7 +801,7 @@ struct rtl_opt_pass pass_compute_alignments =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -4356,4 +4356,3 @@ struct rtl_opt_pass pass_clean_state =
0 /* todo_flags_finish */
}
};
-
diff --git a/gcc/function.c b/gcc/function.c
index e8d99015e4d..3809770a0d3 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1813,7 +1813,7 @@ struct rtl_opt_pass pass_instantiate_virtual_regs =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -4223,7 +4223,7 @@ struct rtl_opt_pass pass_init_function =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -5340,13 +5340,6 @@ current_function_name (void)
{
return lang_hooks.decl_printable_name (cfun->decl, 2);
}
-
-/* Returns the raw (mangled) name of the current function. */
-const char *
-current_function_assembler_name (void)
-{
- return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (cfun->decl));
-}
static unsigned int
@@ -5397,7 +5390,7 @@ struct rtl_opt_pass pass_leaf_regs =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -5632,7 +5625,7 @@ struct rtl_opt_pass pass_match_asm_constraints =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/function.h b/gcc/function.h
index 5bee64b153f..77b1ae813c0 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -677,8 +677,6 @@ extern rtx get_arg_pointer_save_area (void);
/* Returns the name of the current function. */
extern const char *current_function_name (void);
-/* Returns the assembler name (raw, mangled) of the current function. */
-extern const char *current_function_assembler_name (void);
extern void do_warn_unused_parameter (tree);
diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h
index 6865566472f..543dc933742 100644
--- a/gcc/gcc-plugin.h
+++ b/gcc/gcc-plugin.h
@@ -67,22 +67,42 @@ struct plugin_info
const char *help;
};
+/* Represents the gcc version. Used to avoid using an incompatible plugin. */
+
+struct plugin_gcc_version
+{
+ const char *basever;
+ const char *datestamp;
+ const char *devphase;
+ const char *revision;
+ const char *configuration_arguments;
+};
+
+extern struct plugin_gcc_version plugin_gcc_version;
+
+/* The default version check. Compares every field in VERSION. */
+
+extern bool plugin_default_version_check(struct plugin_gcc_version *version);
+
/* Function type for the plugin initialization routine. Each plugin module
should define this as an externally-visible function with name
"plugin_init."
PLUGIN_NAME - name of the plugin (useful for error reporting)
+ VERSION - the plugin_gcc_version symbol of the plugin itself.
ARGC - the size of the ARGV array
ARGV - an array of key-value argument pair
Returns 0 if initialization finishes successfully. */
typedef int (*plugin_init_func) (const char *plugin_name,
+ struct plugin_gcc_version *version,
int argc, struct plugin_argument *argv);
/* Declaration for "plugin_init" function so that it doesn't need to be
duplicated in every plugin. */
-extern int plugin_init (const char *, int, struct plugin_argument *);
+extern int plugin_init (const char *, struct plugin_gcc_version *version,
+ int, struct plugin_argument *);
/* Function type for a plugin callback routine.
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 03ea001f6be..53325b23f39 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3662,9 +3662,9 @@ process_command (int argc, const char **argv)
/* CPP driver cannot obtain switch from cc1_options. */
if (is_cpp_driver)
- add_preprocessor_option ("--version", strlen("--version"));
- add_assembler_option ("--version", strlen("--version"));
- add_linker_option ("--version", strlen("--version"));
+ add_preprocessor_option ("--version", strlen ("--version"));
+ add_assembler_option ("--version", strlen ("--version"));
+ add_linker_option ("--version", strlen ("--version"));
}
else if (strcmp (argv[i], "-fhelp") == 0)
{
@@ -4741,6 +4741,49 @@ spec_path (char *path, void *data)
return NULL;
}
+/* Create a temporary FILE with the contents of ARGV. Add @FILE to the
+ argument list. */
+
+static void
+create_at_file (char **argv)
+{
+ char *temp_file = make_temp_file ("");
+ char *at_argument = concat ("@", temp_file, NULL);
+ FILE *f = fopen (temp_file, "w");
+ int status;
+
+ if (f == NULL)
+ fatal ("could not open temporary response file %s",
+ temp_file);
+
+ status = writeargv (argv, f);
+
+ if (status)
+ fatal ("could not write to temporary response file %s",
+ temp_file);
+
+ status = fclose (f);
+
+ if (EOF == status)
+ fatal ("could not close temporary response file %s",
+ temp_file);
+
+ store_arg (at_argument, 0, 0);
+
+ record_temp_file (temp_file, !save_temps_flag, !save_temps_flag);
+}
+
+/* True if we should compile INFILE. */
+
+static bool
+compile_input_file_p (struct infile *infile)
+{
+ if ((!infile->language) || (infile->language[0] != '*'))
+ if (infile->incompiler == input_file_compiler)
+ return true;
+ return false;
+}
+
/* Process the sub-spec SPEC as a portion of a larger spec.
This is like processing a whole spec except that we do
not initialize at the beginning and we do not supply a
@@ -5107,9 +5150,37 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
case 'i':
if (combine_inputs)
{
- for (i = 0; (int) i < n_infiles; i++)
- if ((!infiles[i].language) || (infiles[i].language[0] != '*'))
- if (infiles[i].incompiler == input_file_compiler)
+ if (at_file_supplied)
+ {
+ /* We are going to expand `%i' to `@FILE', where FILE
+ is a newly-created temporary filename. The filenames
+ that would usually be expanded in place of %o will be
+ written to the temporary file. */
+ char **argv;
+ int n_files = 0;
+ int j;
+
+ for (i = 0; i < n_infiles; i++)
+ if (compile_input_file_p (&infiles[i]))
+ n_files++;
+
+ argv = (char **) alloca (sizeof (char *) * (n_files + 1));
+
+ /* Copy the strings over. */
+ for (i = 0, j = 0; i < n_infiles; i++)
+ if (compile_input_file_p (&infiles[i]))
+ {
+ argv[j] = CONST_CAST (char *, infiles[i].name);
+ infiles[i].compiled = true;
+ j++;
+ }
+ argv[j] = NULL;
+
+ create_at_file (argv);
+ }
+ else
+ for (i = 0; (int) i < n_infiles; i++)
+ if (compile_input_file_p (&infiles[i]))
{
store_arg (infiles[i].name, 0, 0);
infiles[i].compiled = true;
@@ -5187,14 +5258,8 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
that would usually be expanded in place of %o will be
written to the temporary file. */
- char *temp_file = make_temp_file ("");
- char *at_argument;
char **argv;
- int n_files, j, status;
- FILE *f;
-
- at_argument = concat ("@", temp_file, NULL);
- store_arg (at_argument, 0, 0);
+ int n_files, j;
/* Convert OUTFILES into a form suitable for writeargv. */
@@ -5213,25 +5278,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
}
argv[j] = NULL;
- f = fopen (temp_file, "w");
-
- if (f == NULL)
- fatal ("could not open temporary response file %s",
- temp_file);
-
- status = writeargv (argv, f);
-
- if (status)
- fatal ("could not write to temporary response file %s",
- temp_file);
-
- status = fclose (f);
-
- if (EOF == status)
- fatal ("could not close temporary response file %s",
- temp_file);
-
- record_temp_file (temp_file, !save_temps_flag, !save_temps_flag);
+ create_at_file (argv);
}
else
for (i = 0; i < max; i++)
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index fecc667f6b9..71ab1b1e44c 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -1,6 +1,6 @@
/* GIMPLE lowering pass. Converts High GIMPLE into Low GIMPLE.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -209,7 +209,7 @@ struct gimple_opt_pass pass_lower_cf =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lcf, /* properties_provided */
0, /* properties_destroyed */
@@ -950,7 +950,7 @@ struct gimple_opt_pass pass_mark_used_blocks =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 4d05c983e9d..a91e83a99d4 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -2195,16 +2195,11 @@ gimple_copy (gimple stmt)
for (i = 0; i < num_ops; i++)
gimple_set_op (copy, i, unshare_expr (gimple_op (stmt, i)));
- /* Clear out SSA operand vectors on COPY. Note that we cannot
- call the API functions for setting addresses_taken, stores
- and loads. These functions free the previous values, and we
- cannot do that on COPY as it will affect the original
- statement. */
+ /* Clear out SSA operand vectors on COPY. */
if (gimple_has_ops (stmt))
{
gimple_set_def_ops (copy, NULL);
gimple_set_use_ops (copy, NULL);
- copy->gsops.opbase.addresses_taken = NULL;
}
if (gimple_has_mem_ops (stmt))
@@ -3194,4 +3189,230 @@ count_uses_and_derefs (tree ptr, gimple stmt, unsigned *num_uses_p,
gcc_assert (*num_uses_p >= *num_loads_p + *num_stores_p);
}
+/* From a tree operand OP return the base of a load or store operation
+ or NULL_TREE if OP is not a load or a store. */
+
+static tree
+get_base_loadstore (tree op)
+{
+ while (handled_component_p (op))
+ op = TREE_OPERAND (op, 0);
+ if (DECL_P (op)
+ || INDIRECT_REF_P (op)
+ || TREE_CODE (op) == TARGET_MEM_REF)
+ return op;
+ return NULL_TREE;
+}
+
+/* For the statement STMT call the callbacks VISIT_LOAD, VISIT_STORE and
+ VISIT_ADDR if non-NULL on loads, store and address-taken operands
+ passing the STMT, the base of the operand and DATA to it. The base
+ will be either a decl, an indirect reference (including TARGET_MEM_REF)
+ or the argument of an address expression.
+ Returns the results of these callbacks or'ed. */
+
+bool
+walk_stmt_load_store_addr_ops (gimple stmt, void *data,
+ bool (*visit_load)(gimple, tree, void *),
+ bool (*visit_store)(gimple, tree, void *),
+ bool (*visit_addr)(gimple, tree, void *))
+{
+ bool ret = false;
+ unsigned i;
+ if (gimple_assign_single_p (stmt))
+ {
+ tree lhs, rhs;
+ if (visit_store)
+ {
+ lhs = get_base_loadstore (gimple_assign_lhs (stmt));
+ if (lhs)
+ ret |= visit_store (stmt, lhs, data);
+ }
+ rhs = gimple_assign_rhs1 (stmt);
+ if (visit_addr)
+ {
+ if (TREE_CODE (rhs) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (rhs, 0), data);
+ else if (TREE_CODE (rhs) == TARGET_MEM_REF
+ && TREE_CODE (TMR_BASE (rhs)) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (TMR_BASE (rhs), 0), data);
+ else if (TREE_CODE (rhs) == OBJ_TYPE_REF
+ && TREE_CODE (OBJ_TYPE_REF_OBJECT (rhs)) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (OBJ_TYPE_REF_OBJECT (rhs),
+ 0), data);
+ }
+ if (visit_load)
+ {
+ rhs = get_base_loadstore (rhs);
+ if (rhs)
+ ret |= visit_load (stmt, rhs, data);
+ }
+ }
+ else if (visit_addr
+ && (is_gimple_assign (stmt)
+ || gimple_code (stmt) == GIMPLE_COND
+ || gimple_code (stmt) == GIMPLE_CHANGE_DYNAMIC_TYPE))
+ {
+ for (i = 0; i < gimple_num_ops (stmt); ++i)
+ if (gimple_op (stmt, i)
+ && TREE_CODE (gimple_op (stmt, i)) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (gimple_op (stmt, i), 0), data);
+ }
+ else if (is_gimple_call (stmt))
+ {
+ if (visit_store)
+ {
+ tree lhs = gimple_call_lhs (stmt);
+ if (lhs)
+ {
+ lhs = get_base_loadstore (lhs);
+ if (lhs)
+ ret |= visit_store (stmt, lhs, data);
+ }
+ }
+ if (visit_load || visit_addr)
+ for (i = 0; i < gimple_call_num_args (stmt); ++i)
+ {
+ tree rhs = gimple_call_arg (stmt, i);
+ if (visit_addr
+ && TREE_CODE (rhs) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (rhs, 0), data);
+ else if (visit_load)
+ {
+ rhs = get_base_loadstore (rhs);
+ if (rhs)
+ ret |= visit_load (stmt, rhs, data);
+ }
+ }
+ if (visit_addr
+ && gimple_call_chain (stmt)
+ && TREE_CODE (gimple_call_chain (stmt)) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (gimple_call_chain (stmt), 0),
+ data);
+ }
+ else if (gimple_code (stmt) == GIMPLE_ASM)
+ {
+ unsigned noutputs;
+ const char *constraint;
+ const char **oconstraints;
+ bool allows_mem, allows_reg, is_inout;
+ noutputs = gimple_asm_noutputs (stmt);
+ oconstraints = XALLOCAVEC (const char *, noutputs);
+ if (visit_store || visit_addr)
+ for (i = 0; i < gimple_asm_noutputs (stmt); ++i)
+ {
+ tree link = gimple_asm_output_op (stmt, i);
+ tree op = get_base_loadstore (TREE_VALUE (link));
+ if (op && visit_store)
+ ret |= visit_store (stmt, op, data);
+ if (visit_addr)
+ {
+ constraint = TREE_STRING_POINTER
+ (TREE_VALUE (TREE_PURPOSE (link)));
+ oconstraints[i] = constraint;
+ parse_output_constraint (&constraint, i, 0, 0, &allows_mem,
+ &allows_reg, &is_inout);
+ if (op && !allows_reg && allows_mem)
+ ret |= visit_addr (stmt, op, data);
+ }
+ }
+ if (visit_load || visit_addr)
+ for (i = 0; i < gimple_asm_ninputs (stmt); ++i)
+ {
+ tree link = gimple_asm_input_op (stmt, i);
+ tree op = TREE_VALUE (link);
+ if (visit_addr
+ && TREE_CODE (op) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data);
+ else if (visit_load || visit_addr)
+ {
+ op = get_base_loadstore (op);
+ if (op)
+ {
+ if (visit_load)
+ ret |= visit_load (stmt, op, data);
+ if (visit_addr)
+ {
+ constraint = TREE_STRING_POINTER
+ (TREE_VALUE (TREE_PURPOSE (link)));
+ parse_input_constraint (&constraint, 0, 0, noutputs,
+ 0, oconstraints,
+ &allows_mem, &allows_reg);
+ if (!allows_reg && allows_mem)
+ ret |= visit_addr (stmt, op, data);
+ }
+ }
+ }
+ }
+ }
+ else if (gimple_code (stmt) == GIMPLE_RETURN)
+ {
+ tree op = gimple_return_retval (stmt);
+ if (op)
+ {
+ if (visit_addr
+ && TREE_CODE (op) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data);
+ else if (visit_load)
+ {
+ op = get_base_loadstore (op);
+ if (op)
+ ret |= visit_load (stmt, op, data);
+ }
+ }
+ }
+ else if (visit_addr
+ && gimple_code (stmt) == GIMPLE_PHI)
+ {
+ for (i = 0; i < gimple_phi_num_args (stmt); ++i)
+ {
+ tree op = PHI_ARG_DEF (stmt, i);
+ if (TREE_CODE (op) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data);
+ }
+ }
+
+ return ret;
+}
+
+/* Like walk_stmt_load_store_addr_ops but with NULL visit_addr. IPA-CP
+ should make a faster clone for this case. */
+
+bool
+walk_stmt_load_store_ops (gimple stmt, void *data,
+ bool (*visit_load)(gimple, tree, void *),
+ bool (*visit_store)(gimple, tree, void *))
+{
+ return walk_stmt_load_store_addr_ops (stmt, data,
+ visit_load, visit_store, NULL);
+}
+
+/* Helper for gimple_ior_addresses_taken_1. */
+
+static bool
+gimple_ior_addresses_taken_1 (gimple stmt ATTRIBUTE_UNUSED,
+ tree addr, void *data)
+{
+ bitmap addresses_taken = (bitmap)data;
+ while (handled_component_p (addr))
+ addr = TREE_OPERAND (addr, 0);
+ if (DECL_P (addr))
+ {
+ bitmap_set_bit (addresses_taken, DECL_UID (addr));
+ return true;
+ }
+ return false;
+}
+
+/* Set the bit for the uid of all decls that have their address taken
+ in STMT in the ADDRESSES_TAKEN bitmap. Returns true if there
+ were any in this stmt. */
+
+bool
+gimple_ior_addresses_taken (bitmap addresses_taken, gimple stmt)
+{
+ return walk_stmt_load_store_addr_ops (stmt, addresses_taken, NULL, NULL,
+ gimple_ior_addresses_taken_1);
+}
+
#include "gt-gimple.h"
diff --git a/gcc/gimple.h b/gcc/gimple.h
index dde7f942e16..2d5ee0fd9b4 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -327,15 +327,10 @@ struct gimple_statement_base GTY(())
struct gimple_statement_with_ops_base GTY(())
{
- /* [ WORD 1-4 ] */
+ /* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
- /* [ WORD 5 ]
- Symbols whose addresses are taken by this statement (i.e., they
- appear inside ADDR_EXPR nodes). */
- bitmap GTY((skip (""))) addresses_taken;
-
- /* [ WORD 6-7 ]
+ /* [ WORD 5-6 ]
SSA operand vectors. NOTE: It should be possible to
amalgamate these vectors with the operand vector OP. However,
the SSA operand vectors are organized differently and contain
@@ -349,10 +344,10 @@ struct gimple_statement_with_ops_base GTY(())
struct gimple_statement_with_ops GTY(())
{
- /* [ WORD 1-7 ] */
+ /* [ WORD 1-6 ] */
struct gimple_statement_with_ops_base opbase;
- /* [ WORD 8 ]
+ /* [ WORD 7 ]
Operand vector. NOTE! This must always be the last field
of this structure. In particular, this means that this
structure cannot be embedded inside another one. */
@@ -364,10 +359,10 @@ struct gimple_statement_with_ops GTY(())
struct gimple_statement_with_memory_ops_base GTY(())
{
- /* [ WORD 1-7 ] */
+ /* [ WORD 1-6 ] */
struct gimple_statement_with_ops_base opbase;
- /* [ WORD 8-9 ]
+ /* [ WORD 7-8 ]
Virtual operands for this statement. The GC will pick them
up via the ssa_names array. */
tree GTY((skip (""))) vdef;
@@ -379,10 +374,10 @@ struct gimple_statement_with_memory_ops_base GTY(())
struct gimple_statement_with_memory_ops GTY(())
{
- /* [ WORD 1-9 ] */
+ /* [ WORD 1-8 ] */
struct gimple_statement_with_memory_ops_base membase;
- /* [ WORD 10 ]
+ /* [ WORD 9 ]
Operand vector. NOTE! This must always be the last field
of this structure. In particular, this means that this
structure cannot be embedded inside another one. */
@@ -545,20 +540,20 @@ struct gimple_statement_wce GTY(())
struct gimple_statement_asm GTY(())
{
- /* [ WORD 1-9 ] */
+ /* [ WORD 1-8 ] */
struct gimple_statement_with_memory_ops_base membase;
- /* [ WORD 10 ]
+ /* [ WORD 9 ]
__asm__ statement. */
const char *string;
- /* [ WORD 11 ]
+ /* [ WORD 10 ]
Number of inputs, outputs and clobbers. */
unsigned char ni;
unsigned char no;
unsigned short nc;
- /* [ WORD 12 ]
+ /* [ WORD 11 ]
Operand vector. NOTE! This must always be the last field
of this structure. In particular, this means that this
structure cannot be embedded inside another one. */
@@ -909,6 +904,14 @@ extern tree get_call_expr_in (tree t);
extern void recalculate_side_effects (tree);
extern void count_uses_and_derefs (tree, gimple, unsigned *, unsigned *,
unsigned *);
+extern bool walk_stmt_load_store_addr_ops (gimple, void *,
+ bool (*)(gimple, tree, void *),
+ bool (*)(gimple, tree, void *),
+ bool (*)(gimple, tree, void *));
+extern bool walk_stmt_load_store_ops (gimple, void *,
+ bool (*)(gimple, tree, void *),
+ bool (*)(gimple, tree, void *));
+extern bool gimple_ior_addresses_taken (bitmap, gimple);
/* In gimplify.c */
extern tree create_tmp_var_raw (tree, const char *);
@@ -1235,41 +1238,6 @@ gimple_has_mem_ops (const_gimple g)
return gimple_code (g) >= GIMPLE_ASSIGN && gimple_code (g) <= GIMPLE_RETURN;
}
-/* Return the set of addresses taken by statement G. */
-
-static inline bitmap
-gimple_addresses_taken (const_gimple g)
-{
- if (gimple_has_ops (g))
- return g->gsops.opbase.addresses_taken;
- else
- return NULL;
-}
-
-
-/* Return a pointer to the set of addresses taken by statement G. */
-
-static inline bitmap *
-gimple_addresses_taken_ptr (gimple g)
-{
- if (gimple_has_ops (g))
- return &g->gsops.opbase.addresses_taken;
- else
- return NULL;
-}
-
-
-/* Set B to be the set of addresses taken by statement G. The
- previous set is freed. */
-
-static inline void
-gimple_set_addresses_taken (gimple g, bitmap b)
-{
- gcc_assert (gimple_has_ops (g));
- BITMAP_FREE (g->gsops.opbase.addresses_taken);
- g->gsops.opbase.addresses_taken = b;
-}
-
/* Return the set of DEF operands for statement G. */
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 09dc233c253..60aeac3a55f 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1,6 +1,6 @@
/* Instruction scheduling pass.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
and currently maintained by, Jim Wilson (wilson@cygnus.com)
@@ -3906,12 +3906,10 @@ sched_create_recovery_edges (basic_block first_bb, basic_block rec,
/* Rewritten from cfgrtl.c. */
if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections)
- /* We don't need the same note for the check because
- any_condjump_p (check) == true. */
{
- REG_NOTES (jump) = gen_rtx_EXPR_LIST (REG_CROSSING_JUMP,
- NULL_RTX,
- REG_NOTES (jump));
+ /* We don't need the same note for the check because
+ any_condjump_p (check) == true. */
+ add_reg_note (jump, REG_CROSSING_JUMP, NULL_RTX);
}
edge_flags = EDGE_CROSSING;
}
diff --git a/gcc/init-regs.c b/gcc/init-regs.c
index 791b9266bec..273ab97b77f 100644
--- a/gcc/init-regs.c
+++ b/gcc/init-regs.c
@@ -1,5 +1,5 @@
/* Initialization of uninitialized regs.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -148,7 +148,7 @@ struct rtl_opt_pass pass_initialize_regs =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 1fc0737c822..2d0b236a084 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1,6 +1,6 @@
/* Procedure integration for GCC.
Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
@@ -308,7 +308,7 @@ struct rtl_opt_pass pass_initial_value_sets =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index a8c4b1b310b..c938b0da1c6 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -209,36 +209,28 @@ check_decl (funct_state local,
variable T is legal in a function that is either pure or const. */
static inline void
-check_op (funct_state local,
- tree t, bool checking_write)
+check_op (funct_state local, tree t, bool checking_write)
{
- while (t && handled_component_p (t))
- t = TREE_OPERAND (t, 0);
- if (!t)
- return;
- if (INDIRECT_REF_P (t) || TREE_CODE (t) == TARGET_MEM_REF)
+ if (TREE_THIS_VOLATILE (t))
{
- if (TREE_THIS_VOLATILE (t))
- {
- local->pure_const_state = IPA_NEITHER;
- if (dump_file)
- fprintf (dump_file, " Volatile indirect ref is not const/pure\n");
- return;
- }
- else if (checking_write)
- {
- local->pure_const_state = IPA_NEITHER;
- if (dump_file)
- fprintf (dump_file, " Indirect ref write is not const/pure\n");
- return;
- }
- else
- {
- if (dump_file)
- fprintf (dump_file, " Indirect ref read is not const\n");
- if (local->pure_const_state == IPA_CONST)
- local->pure_const_state = IPA_PURE;
- }
+ local->pure_const_state = IPA_NEITHER;
+ if (dump_file)
+ fprintf (dump_file, " Volatile indirect ref is not const/pure\n");
+ return;
+ }
+ else if (checking_write)
+ {
+ local->pure_const_state = IPA_NEITHER;
+ if (dump_file)
+ fprintf (dump_file, " Indirect ref write is not const/pure\n");
+ return;
+ }
+ else
+ {
+ if (dump_file)
+ fprintf (dump_file, " Indirect ref read is not const\n");
+ if (local->pure_const_state == IPA_CONST)
+ local->pure_const_state = IPA_PURE;
}
}
@@ -375,6 +367,30 @@ check_call (funct_state local, gimple call, bool ipa)
/* Direct functions calls are handled by IPA propagation. */
}
+/* Wrapper around check_decl for loads. */
+
+static bool
+check_load (gimple stmt ATTRIBUTE_UNUSED, tree op, void *data)
+{
+ if (DECL_P (op))
+ check_decl ((funct_state)data, op, false);
+ else
+ check_op ((funct_state)data, op, false);
+ return false;
+}
+
+/* Wrapper around check_decl for stores. */
+
+static bool
+check_store (gimple stmt ATTRIBUTE_UNUSED, tree op, void *data)
+{
+ if (DECL_P (op))
+ check_decl ((funct_state)data, op, true);
+ else
+ check_op ((funct_state)data, op, true);
+ return false;
+}
+
/* Look into pointer pointed to by GSIP and figure out what interesting side
effects it has. */
static void
@@ -389,45 +405,8 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
print_gimple_stmt (dump_file, stmt, 0, 0);
}
- /* Look for direct loads and stores. */
- if (gimple_has_lhs (stmt))
- {
- tree lhs = get_base_address (gimple_get_lhs (stmt));
- if (lhs && DECL_P (lhs))
- check_decl (local, lhs, true);
- }
- if (gimple_assign_single_p (stmt))
- {
- tree rhs = get_base_address (gimple_assign_rhs1 (stmt));
- if (rhs && DECL_P (rhs))
- check_decl (local, rhs, false);
- }
- else if (is_gimple_call (stmt))
- {
- for (i = 0; i < gimple_call_num_args (stmt); ++i)
- {
- tree rhs = get_base_address (gimple_call_arg (stmt, i));
- if (rhs && DECL_P (rhs))
- check_decl (local, rhs, false);
- }
- }
- else if (gimple_code (stmt) == GIMPLE_ASM)
- {
- for (i = 0; i < gimple_asm_ninputs (stmt); ++i)
- {
- tree op = TREE_VALUE (gimple_asm_input_op (stmt, i));
- op = get_base_address (op);
- if (op && DECL_P (op))
- check_decl (local, op, false);
- }
- for (i = 0; i < gimple_asm_noutputs (stmt); ++i)
- {
- tree op = TREE_VALUE (gimple_asm_output_op (stmt, i));
- op = get_base_address (op);
- if (op && DECL_P (op))
- check_decl (local, op, true);
- }
- }
+ /* Look for loads and stores. */
+ walk_stmt_load_store_ops (stmt, local, check_load, check_store);
if (gimple_code (stmt) != GIMPLE_CALL
&& stmt_could_throw_p (stmt))
@@ -447,13 +426,7 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
}
switch (gimple_code (stmt))
{
- case GIMPLE_ASSIGN:
- check_op (local, gimple_assign_lhs (stmt), true);
- i = 1;
- break;
case GIMPLE_CALL:
- check_op (local, gimple_call_lhs (stmt), true);
- i = 1;
check_call (local, stmt, ipa);
break;
case GIMPLE_LABEL:
@@ -466,10 +439,6 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
}
break;
case GIMPLE_ASM:
- for (i = 0; i < gimple_asm_noutputs (stmt); i++)
- check_op (local, TREE_VALUE (gimple_asm_output_op (stmt, i)), true);
- for (i = 0; i < gimple_asm_ninputs (stmt); i++)
- check_op (local, TREE_VALUE (gimple_asm_input_op (stmt, i)), false);
for (i = 0; i < gimple_asm_nclobbers (stmt); i++)
{
tree op = gimple_asm_clobber_op (stmt, i);
@@ -493,9 +462,6 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
default:
break;
}
-
- for (; i < gimple_num_ops (stmt); i++)
- check_op (local, gimple_op (stmt, i), false);
}
@@ -671,6 +637,12 @@ generate_summary (void)
visited_nodes = NULL;
}
+static bool
+ignore_edge (struct cgraph_edge *e)
+{
+ return (!e->can_throw_external);
+}
+
/* Produce the global information by preforming a transitive closure
on the local information that was produced by generate_summary.
Note that there is no function_transform pass since this only
@@ -690,7 +662,7 @@ propagate (void)
cgraph_remove_function_insertion_hook (function_insertion_hook_holder);
cgraph_remove_node_duplication_hook (node_duplication_hook_holder);
cgraph_remove_node_removal_hook (node_removal_hook_holder);
- order_pos = ipa_utils_reduced_inorder (order, true, false);
+ order_pos = ipa_utils_reduced_inorder (order, true, false, NULL);
if (dump_file)
{
dump_cgraph (dump_file);
@@ -705,7 +677,6 @@ propagate (void)
{
enum pure_const_state_e pure_const_state = IPA_CONST;
bool looping = false;
- bool can_throw = false;
int count = 0;
node = order[i];
@@ -718,13 +689,10 @@ propagate (void)
if (pure_const_state < w_l->pure_const_state)
pure_const_state = w_l->pure_const_state;
- if (w_l->can_throw)
- can_throw = true;
if (w_l->looping)
looping = true;
- if (pure_const_state == IPA_NEITHER
- && can_throw)
+ if (pure_const_state == IPA_NEITHER)
break;
count++;
@@ -741,16 +709,10 @@ propagate (void)
funct_state y_l = get_function_state (y);
if (pure_const_state < y_l->pure_const_state)
pure_const_state = y_l->pure_const_state;
- if (pure_const_state == IPA_NEITHER
- && can_throw)
+ if (pure_const_state == IPA_NEITHER)
break;
if (y_l->looping)
looping = true;
- if (y_l->can_throw && !TREE_NOTHROW (w->decl)
- /* FIXME: We should check that the throw can get external.
- We also should handle only loops formed by can throw external
- edges. */)
- can_throw = true;
}
}
w_info = (struct ipa_dfs_info *) w->aux;
@@ -800,16 +762,87 @@ propagate (void)
default:
break;
}
+ w_info = (struct ipa_dfs_info *) w->aux;
+ w = w_info->next_cycle;
+ }
+ }
+
+ /* Cleanup. */
+ for (node = cgraph_nodes; node; node = node->next)
+ {
+ /* Get rid of the aux information. */
+ if (node->aux)
+ {
+ w_info = (struct ipa_dfs_info *) node->aux;
+ free (node->aux);
+ node->aux = NULL;
+ }
+ }
+ order_pos = ipa_utils_reduced_inorder (order, true, false, ignore_edge);
+ if (dump_file)
+ {
+ dump_cgraph (dump_file);
+ ipa_utils_print_order(dump_file, "reduced for nothrow", order, order_pos);
+ }
+ /* Propagate the local information thru the call graph to produce
+ the global information. All the nodes within a cycle will have
+ the same info so we collapse cycles first. Then we can do the
+ propagation in one pass from the leaves to the roots. */
+ for (i = 0; i < order_pos; i++ )
+ {
+ bool can_throw = false;
+ node = order[i];
+
+ /* Find the worst state for any node in the cycle. */
+ w = node;
+ while (w)
+ {
+ struct cgraph_edge *e;
+ funct_state w_l = get_function_state (w);
+
+ if (w_l->can_throw)
+ can_throw = true;
+
+ if (can_throw)
+ break;
+
+ for (e = w->callees; e; e = e->next_callee)
+ {
+ struct cgraph_node *y = e->callee;
+
+ if (cgraph_function_body_availability (y) > AVAIL_OVERWRITABLE)
+ {
+ funct_state y_l = get_function_state (y);
+
+ if (can_throw)
+ break;
+ if (y_l->can_throw && !TREE_NOTHROW (w->decl)
+ && e->can_throw_external)
+ can_throw = true;
+ }
+ }
+ w_info = (struct ipa_dfs_info *) w->aux;
+ w = w_info->next_cycle;
+ }
+
+ /* Copy back the region's pure_const_state which is shared by
+ all nodes in the region. */
+ w = node;
+ while (w)
+ {
+ funct_state w_l = get_function_state (w);
if (!can_throw && !TREE_NOTHROW (w->decl))
{
- /* FIXME: TREE_NOTHROW is not set because passmanager will execute
- verify_ssa and verify_cfg on every function. Before fixup_cfg is done,
- those functions are going to have NOTHROW calls in EH regions reulting
- in ICE. */
+ struct cgraph_edge *e;
+ TREE_NOTHROW (w->decl) = true;
+ for (e = w->callers; e; e = e->next_caller)
+ e->can_throw_external = false;
if (dump_file)
fprintf (dump_file, "Function found to be nothrow: %s\n",
cgraph_node_name (w));
}
+ else if (can_throw && !TREE_NOTHROW (w->decl))
+ w_l->can_throw = true;
w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
@@ -952,7 +985,12 @@ local_pure_const (void)
}
if (!l->can_throw && !TREE_NOTHROW (current_function_decl))
{
- TREE_NOTHROW (current_function_decl) = 1;
+ struct cgraph_edge *e;
+
+ TREE_NOTHROW (current_function_decl) = true;
+ for (e = cgraph_node (current_function_decl)->callers;
+ e; e = e->next_caller)
+ e->can_throw_external = false;
changed = true;
if (dump_file)
fprintf (dump_file, "Function found to be nothrow: %s\n",
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index 4bc49cf0a05..36cb5f3f5f9 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -334,23 +334,36 @@ mark_address_taken (tree x)
bitmap_set_bit (module_statics_escape, DECL_UID (x));
}
+/* Wrapper around mark_address_taken for the stmt walker. */
+
+static bool
+mark_address (gimple stmt ATTRIBUTE_UNUSED, tree addr,
+ void *data ATTRIBUTE_UNUSED)
+{
+ while (handled_component_p (addr))
+ addr = TREE_OPERAND (addr, 0);
+ mark_address_taken (addr);
+ return false;
+}
+
/* Mark load of T. */
-static void
-mark_load (ipa_reference_local_vars_info_t local,
- tree t)
+static bool
+mark_load (gimple stmt ATTRIBUTE_UNUSED, tree t, void *data)
{
+ ipa_reference_local_vars_info_t local = (ipa_reference_local_vars_info_t)data;
if (TREE_CODE (t) == VAR_DECL
&& has_proper_scope_for_analysis (t))
bitmap_set_bit (local->statics_read, DECL_UID (t));
+ return false;
}
/* Mark store of T. */
-static void
-mark_store (ipa_reference_local_vars_info_t local,
- tree t)
+static bool
+mark_store (gimple stmt ATTRIBUTE_UNUSED, tree t, void *data)
{
+ ipa_reference_local_vars_info_t local = (ipa_reference_local_vars_info_t)data;
if (TREE_CODE (t) == VAR_DECL
&& has_proper_scope_for_analysis (t))
{
@@ -361,6 +374,7 @@ mark_store (ipa_reference_local_vars_info_t local,
if (module_statics_written)
bitmap_set_bit (module_statics_written, DECL_UID (t));
}
+ return false;
}
/* Look for memory clobber and set read_all/write_all if present. */
@@ -427,57 +441,18 @@ scan_stmt_for_static_refs (gimple_stmt_iterator *gsip,
{
gimple stmt = gsi_stmt (*gsip);
ipa_reference_local_vars_info_t local = NULL;
- unsigned int i;
- bitmap_iterator bi;
if (fn)
local = get_reference_vars_info (fn)->local;
/* Look for direct loads and stores. */
- if (gimple_has_lhs (stmt))
- {
- tree lhs = get_base_address (gimple_get_lhs (stmt));
- if (lhs && DECL_P (lhs))
- mark_store (local, lhs);
- }
- if (gimple_assign_single_p (stmt))
- {
- tree rhs = get_base_address (gimple_assign_rhs1 (stmt));
- if (rhs && DECL_P (rhs))
- mark_load (local, rhs);
- }
- else if (is_gimple_call (stmt))
- {
- for (i = 0; i < gimple_call_num_args (stmt); ++i)
- {
- tree rhs = get_base_address (gimple_call_arg (stmt, i));
- if (rhs && DECL_P (rhs))
- mark_load (local, rhs);
- }
- check_call (local, stmt);
- }
- else if (gimple_code (stmt) == GIMPLE_ASM)
- {
- for (i = 0; i < gimple_asm_ninputs (stmt); ++i)
- {
- tree op = TREE_VALUE (gimple_asm_input_op (stmt, i));
- op = get_base_address (op);
- if (op && DECL_P (op))
- mark_load (local, op);
- }
- for (i = 0; i < gimple_asm_noutputs (stmt); ++i)
- {
- tree op = TREE_VALUE (gimple_asm_output_op (stmt, i));
- op = get_base_address (op);
- if (op && DECL_P (op))
- mark_store (local, op);
- }
- check_asm_memory_clobber (local, stmt);
- }
+ walk_stmt_load_store_addr_ops (stmt, local, mark_load, mark_store,
+ mark_address);
- if (gimple_addresses_taken (stmt))
- EXECUTE_IF_SET_IN_BITMAP (gimple_addresses_taken (stmt), 0, i, bi)
- mark_address_taken (referenced_var_lookup (i));
+ if (is_gimple_call (stmt))
+ check_call (local, stmt);
+ else if (gimple_code (stmt) == GIMPLE_ASM)
+ check_asm_memory_clobber (local, stmt);
return NULL;
}
@@ -1020,7 +995,7 @@ propagate (void)
struct cgraph_node *w;
struct cgraph_node **order =
XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
- int order_pos = ipa_utils_reduced_inorder (order, false, true);
+ int order_pos = ipa_utils_reduced_inorder (order, false, true, NULL);
int i;
cgraph_remove_function_insertion_hook (function_insertion_hook_holder);
@@ -1031,7 +1006,7 @@ propagate (void)
the global information. All the nodes within a cycle will have
the same info so we collapse cycles first. Then we can do the
propagation in one pass from the leaves to the roots. */
- order_pos = ipa_utils_reduced_inorder (order, true, true);
+ order_pos = ipa_utils_reduced_inorder (order, true, true, NULL);
if (dump_file)
ipa_utils_print_order(dump_file, "reduced", order, order_pos);
diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c
index 9ca53645aa0..8b5360d00e9 100644
--- a/gcc/ipa-struct-reorg.c
+++ b/gcc/ipa-struct-reorg.c
@@ -606,13 +606,17 @@ gen_size (tree num, tree type, tree *res)
if (exact_log2 (struct_size_int) == -1)
{
tree size = build_int_cst (TREE_TYPE (num), struct_size_int);
- new_stmt = gimple_build_assign_with_ops (MULT_EXPR, *res, num, size);
+ new_stmt = gimple_build_assign (*res, fold_build2 (MULT_EXPR,
+ TREE_TYPE (num),
+ num, size));
}
else
{
tree C = build_int_cst (TREE_TYPE (num), exact_log2 (struct_size_int));
- new_stmt = gimple_build_assign_with_ops (LSHIFT_EXPR, *res, num, C);
+ new_stmt = gimple_build_assign (*res, fold_build2 (LSHIFT_EXPR,
+ TREE_TYPE (num),
+ num, C));
}
finalize_stmt (new_stmt);
@@ -1291,6 +1295,8 @@ create_general_new_stmt (struct access_site *acc, tree new_type)
{
pos = find_pos_in_stmt (new_stmt, var);
gcc_assert (pos);
+ /* ??? This misses adjustments to the type of the
+ INDIRECT_REF we possibly replace the operand of. */
*pos = new_var;
}
}
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index 3b5d128f60d..97a2b3c8237 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -81,7 +81,8 @@ struct searchc_env {
searching from. */
static void
-searchc (struct searchc_env* env, struct cgraph_node *v)
+searchc (struct searchc_env* env, struct cgraph_node *v,
+ bool (*ignore_edge) (struct cgraph_edge *))
{
struct cgraph_edge *edge;
struct ipa_dfs_info *v_info = (struct ipa_dfs_info *) v->aux;
@@ -101,12 +102,15 @@ searchc (struct searchc_env* env, struct cgraph_node *v)
struct ipa_dfs_info * w_info;
struct cgraph_node *w = edge->callee;
+ if (ignore_edge && ignore_edge (edge))
+ continue;
+
if (w->aux && cgraph_function_body_availability (edge->callee) > AVAIL_OVERWRITABLE)
{
w_info = (struct ipa_dfs_info *) w->aux;
if (w_info->new_node)
{
- searchc (env, w);
+ searchc (env, w, ignore_edge);
v_info->low_link =
(v_info->low_link < w_info->low_link) ?
v_info->low_link : w_info->low_link;
@@ -152,7 +156,8 @@ searchc (struct searchc_env* env, struct cgraph_node *v)
int
ipa_utils_reduced_inorder (struct cgraph_node **order,
- bool reduce, bool allow_overwritable)
+ bool reduce, bool allow_overwritable,
+ bool (*ignore_edge) (struct cgraph_edge *))
{
struct cgraph_node *node;
struct searchc_env env;
@@ -193,7 +198,7 @@ ipa_utils_reduced_inorder (struct cgraph_node **order,
while (result)
{
node = (struct cgraph_node *)result->value;
- searchc (&env, node);
+ searchc (&env, node, ignore_edge);
result = splay_tree_min (env.nodes_marked_new);
}
splay_tree_delete (env.nodes_marked_new);
@@ -217,7 +222,8 @@ get_base_var (tree t)
&& (!CONSTANT_CLASS_P (t))
&& TREE_CODE (t) != LABEL_DECL
&& TREE_CODE (t) != FUNCTION_DECL
- && TREE_CODE (t) != CONST_DECL)
+ && TREE_CODE (t) != CONST_DECL
+ && TREE_CODE (t) != CONSTRUCTOR)
{
t = TREE_OPERAND (t, 0);
}
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h
index 3ccdbafe909..31d78374ff6 100644
--- a/gcc/ipa-utils.h
+++ b/gcc/ipa-utils.h
@@ -39,7 +39,8 @@ struct ipa_dfs_info {
/* In ipa-utils.c */
void ipa_utils_print_order (FILE*, const char *, struct cgraph_node**, int);
-int ipa_utils_reduced_inorder (struct cgraph_node **, bool, bool);
+int ipa_utils_reduced_inorder (struct cgraph_node **, bool, bool,
+ bool (*ignore_edge) (struct cgraph_edge *));
tree get_base_var (tree);
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 4f1d302b7c7..743ec3cd835 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -285,8 +285,8 @@ update_copy_costs (ira_allocno_t allocno, bool decr_p)
continue;
cost = (cp->second == allocno
- ? ira_register_move_cost[mode][rclass][cover_class]
- : ira_register_move_cost[mode][cover_class][rclass]);
+ ? ira_get_register_move_cost (mode, rclass, cover_class)
+ : ira_get_register_move_cost (mode, cover_class, rclass));
if (decr_p)
cost = -cost;
@@ -1071,7 +1071,7 @@ calculate_allocno_spill_cost (ira_allocno_t a)
* ira_loop_edge_freq (loop_node, regno, true)
+ ira_memory_move_cost[mode][rclass][0]
* ira_loop_edge_freq (loop_node, regno, false))
- - (ira_register_move_cost[mode][rclass][rclass]
+ - (ira_get_register_move_cost (mode, rclass, rclass)
* (ira_loop_edge_freq (loop_node, regno, false)
+ ira_loop_edge_freq (loop_node, regno, true))));
return cost;
@@ -2039,7 +2039,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node)
else
{
cover_class = ALLOCNO_COVER_CLASS (subloop_allocno);
- cost = (ira_register_move_cost[mode][rclass][rclass]
+ cost = (ira_get_register_move_cost (mode, rclass, rclass)
* (exit_freq + enter_freq));
ira_allocate_and_set_or_copy_costs
(&ALLOCNO_UPDATED_HARD_REG_COSTS (subloop_allocno), cover_class,
@@ -2164,7 +2164,7 @@ move_spill_restore (void)
+= (ira_memory_move_cost[mode][rclass][0] * exit_freq
+ ira_memory_move_cost[mode][rclass][1] * enter_freq);
if (hard_regno2 != hard_regno)
- cost -= (ira_register_move_cost[mode][rclass][rclass]
+ cost -= (ira_get_register_move_cost (mode, rclass, rclass)
* (exit_freq + enter_freq));
}
}
@@ -2183,7 +2183,7 @@ move_spill_restore (void)
+= (ira_memory_move_cost[mode][rclass][1] * exit_freq
+ ira_memory_move_cost[mode][rclass][0] * enter_freq);
if (hard_regno2 != hard_regno)
- cost -= (ira_register_move_cost[mode][rclass][rclass]
+ cost -= (ira_get_register_move_cost (mode, rclass, rclass)
* (exit_freq + enter_freq));
}
}
@@ -2249,8 +2249,8 @@ update_curr_costs (ira_allocno_t a)
if (i < 0)
continue;
cost = (cp->first == a
- ? ira_register_move_cost[mode][rclass][cover_class]
- : ira_register_move_cost[mode][cover_class][rclass]);
+ ? ira_get_register_move_cost (mode, rclass, cover_class)
+ : ira_get_register_move_cost (mode, cover_class, rclass));
ira_allocate_and_set_or_copy_costs
(&ALLOCNO_UPDATED_HARD_REG_COSTS (a),
cover_class, ALLOCNO_COVER_CLASS_COST (a),
diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c
index 05870ab4b16..399a28ae5cc 100644
--- a/gcc/ira-conflicts.c
+++ b/gcc/ira-conflicts.c
@@ -411,9 +411,9 @@ process_regs_for_copy (rtx reg1, rtx reg2, bool constraint_p,
/* Can not be tied. It is not in the cover class. */
return false;
if (HARD_REGISTER_P (reg1))
- cost = ira_register_move_cost[mode][cover_class][rclass] * freq;
+ cost = ira_get_register_move_cost (mode, cover_class, rclass) * freq;
else
- cost = ira_register_move_cost[mode][rclass][cover_class] * freq;
+ cost = ira_get_register_move_cost (mode, rclass, cover_class) * freq;
for (;;)
{
ira_allocate_and_set_costs
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 397affd4b1f..58700b75f14 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -138,9 +138,6 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class rclass, bool to_p,
sri.extra_cost = 0;
secondary_class = targetm.secondary_reload (to_p, x, rclass, mode, &sri);
- if (ira_register_move_cost[mode] == NULL)
- ira_init_register_move_cost (mode);
-
if (secondary_class != NO_REGS)
{
if (!move_cost[mode])
@@ -294,19 +291,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
needs to do a copy, which is one insn. */
struct costs *pp = this_op_costs[i];
- if (ira_register_move_cost[mode] == NULL)
- ira_init_register_move_cost (mode);
-
for (k = 0; k < cost_classes_num; k++)
{
rclass = cost_classes[k];
pp->cost[k]
- = ((recog_data.operand_type[i] != OP_OUT
- ? ira_may_move_in_cost[mode][rclass]
- [classes[i]] * frequency : 0)
- + (recog_data.operand_type[i] != OP_IN
- ? ira_may_move_out_cost[mode][classes[i]]
- [rclass] * frequency : 0));
+ = (((recog_data.operand_type[i] != OP_OUT
+ ? ira_get_may_move_cost (mode, rclass,
+ classes[i], true) : 0)
+ + (recog_data.operand_type[i] != OP_IN
+ ? ira_get_may_move_cost (mode, classes[i],
+ rclass, false) : 0))
+ * frequency);
}
/* If the alternative actually allows memory, make
@@ -342,8 +337,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
: 0));
else if (ira_reg_class_intersect
[pref_class][classes[i]] == NO_REGS)
- alt_cost += (ira_register_move_cost
- [mode][pref_class][classes[i]]);
+ alt_cost += ira_get_register_move_cost (mode,
+ pref_class,
+ classes[i]);
}
if (REGNO (ops[i]) != REGNO (ops[j])
&& ! find_reg_note (insn, REG_DEAD, op))
@@ -540,19 +536,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
{
struct costs *pp = this_op_costs[i];
- if (ira_register_move_cost[mode] == NULL)
- ira_init_register_move_cost (mode);
-
for (k = 0; k < cost_classes_num; k++)
{
rclass = cost_classes[k];
pp->cost[k]
- = ((recog_data.operand_type[i] != OP_OUT
- ? ira_may_move_in_cost[mode][rclass]
- [classes[i]] * frequency : 0)
- + (recog_data.operand_type[i] != OP_IN
- ? ira_may_move_out_cost[mode][classes[i]]
- [rclass] * frequency : 0));
+ = (((recog_data.operand_type[i] != OP_OUT
+ ? ira_get_may_move_cost (mode, rclass,
+ classes[i], true) : 0)
+ + (recog_data.operand_type[i] != OP_IN
+ ? ira_get_may_move_cost (mode, classes[i],
+ rclass, false) : 0))
+ * frequency);
}
/* If the alternative actually allows memory, make
@@ -587,8 +581,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
: 0));
else if (ira_reg_class_intersect[pref_class][classes[i]]
== NO_REGS)
- alt_cost += (ira_register_move_cost
- [mode][pref_class][classes[i]]);
+ alt_cost += ira_get_register_move_cost (mode,
+ pref_class,
+ classes[i]);
}
}
}
@@ -901,13 +896,11 @@ record_address_regs (enum machine_mode mode, rtx x, int context,
ALLOCNO_NUM (ira_curr_regno_allocno_map
[REGNO (x)]));
pp->mem_cost += (ira_memory_move_cost[Pmode][rclass][1] * scale) / 2;
- if (ira_register_move_cost[Pmode] == NULL)
- ira_init_register_move_cost (Pmode);
for (k = 0; k < cost_classes_num; k++)
{
i = cost_classes[k];
pp->cost[k]
- += (ira_may_move_in_cost[Pmode][i][rclass] * scale) / 2;
+ += (ira_get_may_move_cost (Pmode, i, rclass, true) * scale) / 2;
}
}
break;
@@ -1425,8 +1418,9 @@ process_bb_node_for_hard_reg_moves (ira_loop_tree_node_t loop_tree_node)
continue;
mode = ALLOCNO_MODE (a);
hard_reg_class = REGNO_REG_CLASS (hard_regno);
- cost = (to_p ? ira_register_move_cost[mode][hard_reg_class][rclass]
- : ira_register_move_cost[mode][rclass][hard_reg_class]) * freq;
+ cost
+ = (to_p ? ira_get_register_move_cost (mode, hard_reg_class, rclass)
+ : ira_get_register_move_cost (mode, rclass, hard_reg_class)) * freq;
ira_allocate_and_set_costs (&ALLOCNO_HARD_REG_COSTS (a), rclass,
ALLOCNO_COVER_CLASS_COST (a));
ira_allocate_and_set_costs (&ALLOCNO_CONFLICT_HARD_REG_COSTS (a),
@@ -1579,9 +1573,6 @@ ira_finish_costs_once (void)
void
ira_costs (void)
{
- ira_allocno_t a;
- ira_allocno_iterator ai;
-
allocno_costs = (struct costs *) ira_allocate (max_struct_costs_size
* ira_allocnos_num);
total_costs = (struct costs *) ira_allocate (max_struct_costs_size
@@ -1594,12 +1585,6 @@ ira_costs (void)
* max_reg_num ());
find_allocno_class_costs ();
setup_allocno_cover_class_and_costs ();
- /* Because we could process operands only as subregs, check mode of
- the registers themselves too. */
- FOR_EACH_ALLOCNO (a, ai)
- if (ira_register_move_cost[ALLOCNO_MODE (a)] == NULL
- && have_regs_of_mode[ALLOCNO_MODE (a)])
- ira_init_register_move_cost (ALLOCNO_MODE (a));
ira_free (common_classes);
ira_free (allocno_pref_buffer);
ira_free (total_costs);
diff --git a/gcc/ira-emit.c b/gcc/ira-emit.c
index df10ea45d62..1d4d8ea224f 100644
--- a/gcc/ira-emit.c
+++ b/gcc/ira-emit.c
@@ -812,7 +812,8 @@ emit_move_list (move_t list, int freq)
}
else
{
- cost = ira_register_move_cost[mode][cover_class][cover_class] * freq;
+ cost = (ira_get_register_move_cost (mode, cover_class, cover_class)
+ * freq);
ira_shuffle_cost += cost;
}
ira_overall_cost += cost;
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index 6e66cc49572..5b8c1ef0bae 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -730,21 +730,24 @@ ira_allocno_set_iter_next (ira_allocno_set_iterator *i)
extern HARD_REG_SET ira_reg_mode_hard_regset
[FIRST_PSEUDO_REGISTER][NUM_MACHINE_MODES];
-/* Arrays analogous to macros MEMORY_MOVE_COST and
- REGISTER_MOVE_COST. */
+/* Arrays analogous to macros MEMORY_MOVE_COST and REGISTER_MOVE_COST.
+ Don't use ira_register_move_cost directly. Use function of
+ ira_get_may_move_cost instead. */
extern short ira_memory_move_cost[MAX_MACHINE_MODE][N_REG_CLASSES][2];
extern move_table *ira_register_move_cost[MAX_MACHINE_MODE];
/* Similar to may_move_in_cost but it is calculated in IRA instead of
regclass. Another difference we take only available hard registers
into account to figure out that one register class is a subset of
- the another one. */
+ the another one. Don't use it directly. Use function of
+ ira_get_may_move_cost instead. */
extern move_table *ira_may_move_in_cost[MAX_MACHINE_MODE];
/* Similar to may_move_out_cost but it is calculated in IRA instead of
regclass. Another difference we take only available hard registers
into account to figure out that one register class is a subset of
- the another one. */
+ the another one. Don't use it directly. Use function of
+ ira_get_may_move_cost instead. */
extern move_table *ira_may_move_out_cost[MAX_MACHINE_MODE];
/* Register class subset relation: TRUE if the first class is a subset
@@ -941,6 +944,34 @@ extern void ira_emit (bool);
+/* Return cost of moving value of MODE from register of class FROM to
+ register of class TO. */
+static inline int
+ira_get_register_move_cost (enum machine_mode mode,
+ enum reg_class from, enum reg_class to)
+{
+ if (ira_register_move_cost[mode] == NULL)
+ ira_init_register_move_cost (mode);
+ return ira_register_move_cost[mode][from][to];
+}
+
+/* Return cost of moving value of MODE from register of class FROM to
+ register of class TO. Return zero if IN_P is true and FROM is
+ subset of TO or if IN_P is false and FROM is superset of TO. */
+static inline int
+ira_get_may_move_cost (enum machine_mode mode,
+ enum reg_class from, enum reg_class to,
+ bool in_p)
+{
+ if (ira_register_move_cost[mode] == NULL)
+ ira_init_register_move_cost (mode);
+ return (in_p
+ ? ira_may_move_in_cost[mode][from][to]
+ : ira_may_move_out_cost[mode][from][to]);
+}
+
+
+
/* The iterator for all allocnos. */
typedef struct {
/* The number of the current element in IRA_ALLOCNOS. */
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 7ad903d2e44..4390c6fdb8c 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -782,10 +782,11 @@ process_single_reg_class_operands (bool in_p, int freq)
[ira_class_hard_regs[cl][0]]) >= 0
&& reg_class_size[cl] <= (unsigned) CLASS_MAX_NREGS (cl, mode))
{
- /* ??? FREQ */
- cost = freq * (in_p
- ? ira_register_move_cost[mode][cover_class][cl]
- : ira_register_move_cost[mode][cl][cover_class]);
+ cost
+ = (freq
+ * (in_p
+ ? ira_get_register_move_cost (mode, cover_class, cl)
+ : ira_get_register_move_cost (mode, cl, cover_class)));
ira_allocate_and_set_costs
(&ALLOCNO_CONFLICT_HARD_REG_COSTS (operand_a), cover_class, 0);
ALLOCNO_CONFLICT_HARD_REG_COSTS (operand_a)
diff --git a/gcc/ira.c b/gcc/ira.c
index 3742f0f35c1..4dee400f3f8 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -3320,7 +3320,7 @@ struct rtl_opt_pass pass_ira =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/jump.c b/gcc/jump.c
index 1189f812fef..90359f8f997 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -132,7 +132,7 @@ struct rtl_opt_pass pass_cleanup_barriers =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/main.c b/gcc/main.c
index fc5a4db567f..3e6c41c39a1 100644
--- a/gcc/main.c
+++ b/gcc/main.c
@@ -32,5 +32,5 @@ int main (int argc, char **argv);
int
main (int argc, char **argv)
{
- return toplev_main (argc, (const char **) argv);
+ return toplev_main (argc, argv);
}
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index 26b04d63ebb..704dbe7ef82 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -2420,7 +2420,7 @@ struct simple_ipa_opt_pass pass_ipa_matrix_reorg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -2428,4 +2428,3 @@ struct simple_ipa_opt_pass pass_ipa_matrix_reorg =
TODO_dump_cgraph | TODO_dump_func /* todo_flags_finish */
}
};
-
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index be0153fea42..3e6d91cc592 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1577,6 +1577,7 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
t = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
DECL_ARTIFICIAL (t) = 1;
DECL_IGNORED_P (t) = 1;
+ DECL_CONTEXT (t) = decl;
DECL_RESULT (decl) = t;
t = build_decl (PARM_DECL, get_identifier (".omp_data_i"), ptr_type_node);
@@ -2318,14 +2319,14 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
name);
gimple_add_tmp_var (x);
TREE_ADDRESSABLE (x) = 1;
- x = build_fold_addr_expr_with_type (x, TREE_TYPE (new_var));
+ x = build_fold_addr_expr (x);
}
else
{
x = build_call_expr (built_in_decls[BUILT_IN_ALLOCA], 1, x);
- x = fold_convert (TREE_TYPE (new_var), x);
}
+ x = fold_convert (TREE_TYPE (new_var), x);
gimplify_assign (new_var, x, ilist);
new_var = build_fold_indirect_ref (new_var);
@@ -3812,21 +3813,25 @@ expand_omp_for_generic (struct omp_region *region,
/* Iteration setup for sequential loop goes in L0_BB. */
gsi = gsi_start_bb (l0_bb);
+ t = istart0;
if (bias)
- t = fold_convert (type, fold_build2 (MINUS_EXPR, fd->iter_type,
- istart0, bias));
- else
- t = fold_convert (type, istart0);
+ t = fold_build2 (MINUS_EXPR, fd->iter_type, t, bias);
+ if (POINTER_TYPE_P (type))
+ t = fold_convert (lang_hooks.types.type_for_size (TYPE_PRECISION (type),
+ 0), t);
+ t = fold_convert (type, t);
t = force_gimple_operand_gsi (&gsi, t, false, NULL_TREE,
false, GSI_CONTINUE_LINKING);
stmt = gimple_build_assign (fd->loop.v, t);
gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING);
+ t = iend0;
if (bias)
- t = fold_convert (type, fold_build2 (MINUS_EXPR, fd->iter_type,
- iend0, bias));
- else
- t = fold_convert (type, iend0);
+ t = fold_build2 (MINUS_EXPR, fd->iter_type, t, bias);
+ if (POINTER_TYPE_P (type))
+ t = fold_convert (lang_hooks.types.type_for_size (TYPE_PRECISION (type),
+ 0), t);
+ t = fold_convert (type, t);
iend = force_gimple_operand_gsi (&gsi, t, true, NULL_TREE,
false, GSI_CONTINUE_LINKING);
if (fd->collapse > 1)
@@ -3843,7 +3848,8 @@ expand_omp_for_generic (struct omp_region *region,
itype = lang_hooks.types.type_for_size (TYPE_PRECISION (vtype), 0);
t = fold_build2 (TRUNC_MOD_EXPR, type, tem, counts[i]);
t = fold_convert (itype, t);
- t = fold_build2 (MULT_EXPR, itype, t, fd->loops[i].step);
+ t = fold_build2 (MULT_EXPR, itype, t,
+ fold_convert (itype, fd->loops[i].step));
if (POINTER_TYPE_P (vtype))
t = fold_build2 (POINTER_PLUS_EXPR, vtype,
fd->loops[i].n1, fold_convert (sizetype, t));
@@ -5463,7 +5469,7 @@ struct gimple_opt_pass pass_expand_omp =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -6628,7 +6634,7 @@ struct gimple_opt_pass pass_lower_omp =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lomp, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/passes.c b/gcc/passes.c
index 2814140ee15..1e7bab03983 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -319,7 +319,7 @@ struct rtl_opt_pass pass_postreload =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_rtl, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1207,14 +1207,14 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
execute_todo (ipa_pass->function_transform_todo_flags_start);
/* If a timevar is present, start it. */
- if (pass->tv_id)
+ if (pass->tv_id != TV_NONE)
timevar_push (pass->tv_id);
/* Do it! */
todo_after = ipa_pass->function_transform (node);
/* Stop timevar. */
- if (pass->tv_id)
+ if (pass->tv_id != TV_NONE)
timevar_pop (pass->tv_id);
/* Run post-pass cleanup and verification. */
@@ -1281,7 +1281,7 @@ execute_one_pass (struct opt_pass *pass)
#endif
/* If a timevar is present, start it. */
- if (pass->tv_id)
+ if (pass->tv_id != TV_NONE)
timevar_push (pass->tv_id);
/* Do it! */
@@ -1292,7 +1292,7 @@ execute_one_pass (struct opt_pass *pass)
}
/* Stop timevar. */
- if (pass->tv_id)
+ if (pass->tv_id != TV_NONE)
timevar_pop (pass->tv_id);
do_per_function (update_properties_after_pass, pass);
diff --git a/gcc/plugin-version.c b/gcc/plugin-version.c
new file mode 100644
index 00000000000..b6f35a9d18f
--- /dev/null
+++ b/gcc/plugin-version.c
@@ -0,0 +1,36 @@
+/* Version information for plugins.
+ Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "system.h"
+#include "gcc-plugin.h"
+#include "configargs.h"
+
+static char basever[] = BASEVER;
+static char datestamp[] = DATESTAMP;
+static char devphase[] = DEVPHASE;
+static char revision[] = REVISION;
+
+/* FIXME plugins: We should make the version information more precise.
+ One way to do is to add a checksum. */
+
+struct plugin_gcc_version plugin_gcc_version = {basever, datestamp, devphase,
+ revision,
+ configuration_arguments};
diff --git a/gcc/plugin.c b/gcc/plugin.c
index 166e1775dea..c406c38b5f3 100644
--- a/gcc/plugin.c
+++ b/gcc/plugin.c
@@ -99,6 +99,7 @@ static struct pass_list_node *prev_added_pass_node;
/* Each plugin should define an initialization function with exactly
this name. */
static const char *str_plugin_init_func_name = "plugin_init";
+static const char *str_plugin_gcc_version_name = "plugin_gcc_version";
#endif
/* Helper function for the hash table that compares the base_name of the
@@ -453,7 +454,8 @@ register_pass (const char *plugin_name, struct plugin_pass *pass_info)
}
-/* Register additional plugin information. */
+/* Register additional plugin information. NAME is the name passed to
+ plugin_init. INFO is the information that should be registered. */
static void
register_plugin_info (const char* name, struct plugin_info *info)
@@ -558,13 +560,17 @@ invoke_plugin_callbacks (enum plugin_event event, void *gcc_data)
#define PTR_UNION_AS_VOID_PTR(NAME) (NAME._q)
#define PTR_UNION_AS_CAST_PTR(NAME) (NAME._nq)
+/* Try to initialize PLUGIN. Return true if successful. */
+
static bool
try_init_one_plugin (struct plugin_name_args *plugin)
{
void *dl_handle;
plugin_init_func plugin_init;
+ struct plugin_gcc_version *version;
char *err;
PTR_UNION_TYPE (plugin_init_func) plugin_init_union;
+ PTR_UNION_TYPE (struct plugin_gcc_version*) version_union;
dl_handle = dlopen (plugin->full_name, RTLD_NOW);
if (!dl_handle)
@@ -587,8 +593,12 @@ try_init_one_plugin (struct plugin_name_args *plugin)
return false;
}
+ PTR_UNION_AS_VOID_PTR (version_union) =
+ dlsym (dl_handle, str_plugin_gcc_version_name);
+ version = PTR_UNION_AS_CAST_PTR (version_union);
+
/* Call the plugin-provided initialization routine with the arguments. */
- if ((*plugin_init) (plugin->base_name, plugin->argc, plugin->argv))
+ if ((*plugin_init) (plugin->base_name, version, plugin->argc, plugin->argv))
{
error ("Fail to initialize plugin %s", plugin->full_name);
return false;
@@ -707,7 +717,8 @@ print_plugins_versions (FILE *file, const char *indent)
htab_traverse_noresize (plugin_name_args_tab, print_version_one_plugin, &opt);
}
-/* Print help for one plugin. */
+/* Print help for one plugin. SLOT is the hash table slot. DATA is the
+ argument to htab_traverse_noresize. */
static int
print_help_one_plugin (void **slot, void *data)
@@ -735,7 +746,8 @@ print_help_one_plugin (void **slot, void *data)
return 1;
}
-/* Print help for each plugin. */
+/* Print help for each plugin. The output goes to FILE and every line starts
+ with INDENT. */
void
print_plugins_help (FILE *file, const char *indent)
@@ -800,3 +812,26 @@ debug_active_plugins (void)
{
dump_active_plugins (stderr);
}
+
+/* The default version check. Compares every field in VERSION. */
+
+bool
+plugin_default_version_check(struct plugin_gcc_version *version)
+{
+ /* version is NULL if the plugin was not linked with plugin-version.o */
+ if (!version)
+ return false;
+
+ if (strcmp (version->basever, plugin_gcc_version.basever))
+ return false;
+ if (strcmp (version->datestamp, plugin_gcc_version.datestamp))
+ return false;
+ if (strcmp (version->devphase, plugin_gcc_version.devphase))
+ return false;
+ if (strcmp (version->revision, plugin_gcc_version.revision))
+ return false;
+ if (strcmp (version->configuration_arguments,
+ plugin_gcc_version.configuration_arguments))
+ return false;
+ return true;
+}
diff --git a/gcc/recog.c b/gcc/recog.c
index 95f6e9a0965..baad154c448 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3500,7 +3500,7 @@ struct rtl_opt_pass pass_split_all_insns =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3530,7 +3530,7 @@ struct rtl_opt_pass pass_split_after_reload =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3574,7 +3574,7 @@ struct rtl_opt_pass pass_split_before_regstack =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3612,7 +3612,7 @@ struct rtl_opt_pass pass_split_before_sched2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3644,7 +3644,7 @@ struct rtl_opt_pass pass_split_for_shorten_branches =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3652,5 +3652,3 @@ struct rtl_opt_pass pass_split_for_shorten_branches =
TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
}
};
-
-
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index e579c281aa3..f31866602eb 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -948,7 +948,7 @@ struct rtl_opt_pass pass_reginfo_init =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1311,34 +1311,6 @@ init_subregs_of_mode (void)
return 0;
}
-/* Set bits in *USED which correspond to registers which can't change
- their mode from FROM to any mode in which REGNO was
- encountered. */
-void
-cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
- unsigned int regno)
-{
- struct subregs_of_mode_node dummy, *node;
- enum machine_mode to;
- unsigned char mask;
- unsigned int i;
-
- gcc_assert (subregs_of_mode);
- dummy.block = regno & -8;
- node = (struct subregs_of_mode_node *)
- htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
- if (node == NULL)
- return;
-
- mask = 1 << (regno & 7);
- for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
- if (node->modes[to] & mask)
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (!TEST_HARD_REG_BIT (*used, i)
- && REG_CANNOT_CHANGE_MODE_P (i, from, to))
- SET_HARD_REG_BIT (*used, i);
-}
-
/* Return 1 if REGNO has had an invalid mode change in CLASS from FROM
mode. */
bool
@@ -1407,7 +1379,7 @@ struct rtl_opt_pass pass_subregs_of_mode_init =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1426,7 +1398,7 @@ struct rtl_opt_pass pass_subregs_of_mode_finish =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 180c394b421..bb5a3a2bcd3 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2686,7 +2686,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
? eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true)
: NULL_RTX);
- x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), new_rtx, XEXP (x, 1));
+ x = alloc_reg_note (REG_NOTE_KIND (x), new_rtx, XEXP (x, 1));
}
}
diff --git a/gcc/rtl.h b/gcc/rtl.h
index bdb41d62b55..ff09d2aedb5 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1493,7 +1493,6 @@ extern rtx copy_insn (rtx);
extern rtx gen_int_mode (HOST_WIDE_INT, enum machine_mode);
extern rtx emit_copy_of_insn_after (rtx, rtx);
extern void set_reg_attrs_from_value (rtx, rtx);
-extern void set_mem_attrs_from_reg (rtx, rtx);
extern void set_reg_attrs_for_parm (rtx, rtx);
extern void adjust_reg_mode (rtx, enum machine_mode);
extern int mem_expr_equal_p (const_tree, const_tree);
@@ -1759,6 +1758,7 @@ extern rtx find_reg_equal_equiv_note (const_rtx);
extern rtx find_constant_src (const_rtx);
extern int find_reg_fusage (const_rtx, enum rtx_code, const_rtx);
extern int find_regno_fusage (const_rtx, enum rtx_code, unsigned int);
+extern rtx alloc_reg_note (enum reg_note, rtx, rtx);
extern void add_reg_note (rtx, enum reg_note, rtx);
extern void remove_note (rtx, const_rtx);
extern void remove_reg_equal_equiv_notes (rtx);
@@ -2146,7 +2146,6 @@ extern void emit_insn_at_entry (rtx);
extern void delete_insn_chain (rtx, rtx, bool);
extern rtx unlink_insn_chain (rtx, rtx);
extern rtx delete_insn_and_edges (rtx);
-extern void delete_insn_chain_and_edges (rtx, rtx);
extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
extern rtx gen_const_mem (enum machine_mode, rtx);
extern rtx gen_frame_mem (enum machine_mode, rtx);
@@ -2246,10 +2245,6 @@ extern void init_reg_sets (void);
extern void regclass (rtx, int);
extern void reg_scan (rtx, unsigned int);
extern void fix_register (const char *, int, int);
-#ifdef HARD_CONST
-extern void cannot_change_mode_set_regs (HARD_REG_SET *,
- enum machine_mode, unsigned int);
-#endif
extern bool invalid_mode_change_p (unsigned int, enum reg_class,
enum machine_mode);
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 73d3b08d940..d15dbe22822 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1865,10 +1865,11 @@ find_regno_fusage (const_rtx insn, enum rtx_code code, unsigned int regno)
}
-/* Add register note with kind KIND and datum DATUM to INSN. */
+/* Allocate a register note with kind KIND and datum DATUM. LIST is
+ stored as the pointer to the next register note. */
-void
-add_reg_note (rtx insn, enum reg_note kind, rtx datum)
+rtx
+alloc_reg_note (enum reg_note kind, rtx datum, rtx list)
{
rtx note;
@@ -1881,16 +1882,24 @@ add_reg_note (rtx insn, enum reg_note kind, rtx datum)
/* These types of register notes use an INSN_LIST rather than an
EXPR_LIST, so that copying is done right and dumps look
better. */
- note = alloc_INSN_LIST (datum, REG_NOTES (insn));
+ note = alloc_INSN_LIST (datum, list);
PUT_REG_NOTE_KIND (note, kind);
break;
default:
- note = alloc_EXPR_LIST (kind, datum, REG_NOTES (insn));
+ note = alloc_EXPR_LIST (kind, datum, list);
break;
}
- REG_NOTES (insn) = note;
+ return note;
+}
+
+/* Add register note with kind KIND and datum DATUM to INSN. */
+
+void
+add_reg_note (rtx insn, enum reg_note kind, rtx datum)
+{
+ REG_NOTES (insn) = alloc_reg_note (kind, datum, REG_NOTES (insn));
}
/* Remove register note NOTE from the REG_NOTES of INSN. */
@@ -5025,4 +5034,3 @@ constant_pool_constant_p (rtx x)
x = avoid_constant_pool_reference (x);
return GET_CODE (x) == CONST_DOUBLE;
}
-
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 1b64a50f7ca..9874db7d0c0 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -337,6 +337,7 @@ const struct gcc_debug_hooks sdb_debug_hooks =
debug_nothing_int, /* handle_pch */
debug_nothing_rtx, /* var_location */
debug_nothing_void, /* switch_text_section */
+ debug_nothing_tree_tree, /* set_name */
0 /* start_end_main_source_file */
};
diff --git a/gcc/stack-ptr-mod.c b/gcc/stack-ptr-mod.c
index ea83875e17a..9800d9966ab 100644
--- a/gcc/stack-ptr-mod.c
+++ b/gcc/stack-ptr-mod.c
@@ -1,5 +1,5 @@
/* Discover if the stack pointer is modified in a function.
- Copyright (C) 2007, 2008
+ Copyright (C) 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -101,7 +101,7 @@ struct rtl_opt_pass pass_stack_ptr_mod =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/target-def.h b/gcc/target-def.h
index 9e6693bbb88..73e69434d20 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -478,10 +478,6 @@
#define TARGET_VECTOR_MODE_SUPPORTED_P hook_bool_mode_false
#endif
-#ifndef TARGET_VECTOR_OPAQUE_P
-#define TARGET_VECTOR_OPAQUE_P hook_bool_const_tree_false
-#endif
-
/* In hooks.c. */
#define TARGET_CANNOT_MODIFY_JUMPS_P hook_bool_void_false
#define TARGET_BRANCH_TARGET_REGISTER_CLASS hook_int_void_no_regs
@@ -886,7 +882,6 @@
TARGET_VALID_POINTER_MODE, \
TARGET_SCALAR_MODE_SUPPORTED_P, \
TARGET_VECTOR_MODE_SUPPORTED_P, \
- TARGET_VECTOR_OPAQUE_P, \
TARGET_RTX_COSTS, \
TARGET_ADDRESS_COST, \
TARGET_ALLOCATE_INITIAL_VALUE, \
diff --git a/gcc/target.h b/gcc/target.h
index a520e1c5765..608910a3ec4 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -674,9 +674,6 @@ struct gcc_target
for further details. */
bool (* vector_mode_supported_p) (enum machine_mode mode);
- /* True if a vector is opaque. */
- bool (* vector_opaque_p) (const_tree);
-
/* Compute a (partial) cost for rtx X. Return true if the complete
cost has been computed, and false if subexpressions should be
scanned. In either case, *TOTAL contains the cost result. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a6e9bf7329e..df0281d96c2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,184 @@
+2009-04-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/rep_clause3.adb: New test.
+
+2009-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/37481
+ * gcc.dg/c99-flex-array-7.c: New test.
+
+2009-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/19771
+ * gcc.c-torture/execute/vla-dealloc-1.c: New test.
+
+2009-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/38243
+ * gcc.dg/c99-restrict-3.c: New test.
+
+2009-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/20078
+ * gcc.dg/cpp/paste16.c, gcc.dg/cpp/redef4.c: New tests.
+
+2009-04-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * lib/gnat.exp (local_find_gnatmake): Pass --LINK to gnatlink.
+ Do not pass -B$root after -margs.
+
+2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/32061
+ PR c++/36954
+ * gcc.dg/pr32061.c: New.
+ * gcc.dg/Wlogical-op-1.c: Update.
+ * g++.dg/warn/Wlogical-op-1.C: Update.
+ * g++.dg/warn/pr36954.C: New.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/27676
+ * gcc.dg/lvalue-5.c: New test.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/22367
+ * gcc.dg/lvalue-6.c, gcc.dg/lvalue-7.c: New tests.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/cpp/include5.c: New test.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/35210
+ * gcc.dg/call-diag-2.c: New test.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/39646
+ * gcc.dg/cpp/line8.c: New test.
+
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/39647
+ * gcc.dg/cpp/line7.c: New test.
+
+2009-04-18 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/39804
+ * gcc.target/i386/pr39804.c: New testcase.
+
+2009-04-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/i386/pr39496.c: Compile with -mtune=i686.
+ * g++.dg/other/pr39496.C: Likewise.
+
+2009-04-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR middle-end/36902
+ * gcc.dg/pr36902.c: New.
+
+2009-04-17 Diego Novillo <dnovillo@google.com>
+
+ * gcc.c-torture/execute/builtins/strlen-3.c: Fix ODR
+ violation for variable 'inside_main'.
+
+2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gfortran.fortran-torture/execute/getarg_1.x: New file.
+
+2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gfortran.dg/vect/pr39318.f90: Guard with "target fopenmp".
+
+2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gfortran.dg/chmod_1.f90: Disable on spu-*-* targets.
+ * gfortran.dg/chmod_2.f90: Likewise.
+ * gfortran.dg/chmod_3.f90: Likewise.
+ * gfortran.dg/open_errors.f90: Likewise.
+ * gfortran.dg/stat_1.f90: Likewise.
+ * gfortran.dg/stat_2.f90: Likewise.
+
+2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gfortran.fortran-torture/execute/nan_inf_fmt.x: Skip on spu-*-*.
+ * gfortran.fortran-torture/execute/intrinsic_nearest.x: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_set_exponent.x: Likewise.
+ * gfortran.dg/nearest_1.f90: Likewise.
+ * gfortran.dg/nearest_3.f90: Likewise.
+ * gfortran.dg/isnan_1.f90: Likewise.
+ * gfortran.dg/isnan_2.f90: Likewise.
+ * gfortran.dg/nan_1.f90: Likewise.
+ * gfortran.dg/nan_2.f90: Likewise.
+ * gfortran.dg/nan_3.f90: Likewise.
+ * gfortran.dg/nan_4.f90: Likewise.
+ * gfortran.dg/module_nan.f90: Likewise.
+ * gfortran.dg/int_conv_2.f90: Likewise.
+ * gfortran.dg/init_flag_3.f90: Likewise.
+ * gfortran.dg/namelist_42.f90: Likewise.
+ * gfortran.dg/namelist_43.f90: Likewise.
+ * gfortran.dg/real_const_3.f90: Likewise.
+ * gfortran.dg/transfer_simplify_1.f90: Likewise.
+
+ * gfortran.dg/default_format_1.f90: XFAIL on spu-*-*.
+ * gfortran.dg/default_format_denormal_1.f90: XFAIL on spu-*-*.
+ * gfortran.dg/scalar_mask_2.f90: XFAIL on spu-*-*.
+ * gfortran.dg/integer_exponentiation_3.F90: XFAIL on spu-*-*.
+ * gfortran.dg/integer_exponentiation_5.F90: XFAIL on spu-*-*.
+
+ * gfortran.dg/elemental_subroutine_1.f90: Relax "epsilon" check.
+ * gfortran.dg/gamma_5.f90: Likewise.
+
+2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * lib/gcc-dg.exp (gcc-dg-prune): Make linker message check
+ less strict so it also works with auto-overlay support.
+ * lib/gcc-defs.exp (${tool}_check_unsupported_p): Add check
+ for "exceeds local store" linker errors on the SPU.
+
+ * lib/gfortran.exp: Include target-supports.exp.
+ (gfortran_init): On SPU targets where automatic overlay support
+ is available, use it to build all Fortran test cases.
+
+ * gfortran.dg/pr20257.f90: Skip on spu-*-* targets.
+
+2009-04-17 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat.dg/ref_type.ads, gnat.dg/ref_type.adb: Fix test after proper
+ rule enforced by gnat on taft types.
+
+2009-04-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/39792
+ * g++.dg/ext/complit11.C: Add empty dg-options.
+
+2009-04-16 Andrew Pinski <pinskia@gmail.com>
+
+ PR c++/17570
+ * g++.dg/template/defarg11.C: New test.
+
+2009-04-16 Andrew Pinski <pinskia@gmail.com>
+
+ PR c++/28766
+ * g++.dg/ext/complit11.C: New testcase.
+
+2009-04-15 Le-Chun Wu <lcwu@google.com>
+
+ PR c++/39551
+ * g++.dg/warn/Wunused-13.C: New testcase.
+
+2009-04-15 Ian Lance Taylor <iant@google.com>
+
+ * gcc.dg/Wenum-compare-1.c: New testcase.
+
+2009-04-15 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39764
+ * g++.dg/torture/pr39764.C: New testcase.
+
2009-04-15 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/ext/altivec-17.C: New.
@@ -2023,7 +2204,7 @@
2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
- PR C++/36607
+ PR c++/36607
* g++.dg/expr/cast10.C: New test.
2009-02-03 Joseph Myers <joseph@codesourcery.com>
@@ -2466,7 +2647,7 @@
2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
- PR C++/29388
+ PR c++/29388
* g++.dg/template/error37.C: New testcase.
2009-01-15 Jason Merrill <jason@redhat.com>
diff --git a/gcc/testsuite/g++.dg/ext/complit11.C b/gcc/testsuite/g++.dg/ext/complit11.C
new file mode 100644
index 00000000000..7b41795ece3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/complit11.C
@@ -0,0 +1,16 @@
+// { dg-do compile }
+// { dg-options "" }
+
+struct A { int i; };
+
+template<int t>
+void foo()
+{
+ ((struct A) { 0 }).i += 1;
+}
+
+void g(void)
+{
+ foo<0>();
+}
+
diff --git a/gcc/testsuite/g++.dg/other/pr39496.C b/gcc/testsuite/g++.dg/other/pr39496.C
index 94e33abbe11..5b1e76c7576 100644
--- a/gcc/testsuite/g++.dg/other/pr39496.C
+++ b/gcc/testsuite/g++.dg/other/pr39496.C
@@ -1,6 +1,6 @@
// PR target/39496
// { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } }
-// { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -msse2 -mfpmath=sse" }
+// { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -mtune=i686 -msse2 -mfpmath=sse" }
// Verify that {foo,bar}{,2}param are all passed on the stack, using
// normal calling conventions, when not optimizing.
// { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*fooparam," } }
diff --git a/gcc/testsuite/g++.dg/template/defarg11.C b/gcc/testsuite/g++.dg/template/defarg11.C
new file mode 100644
index 00000000000..00c4e658d9a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/defarg11.C
@@ -0,0 +1,18 @@
+// { dg-do compile }
+
+// We used to reject this code as the extension
+// for default arguments being accepted as less the
+// needed template arguments.
+
+
+template<typename> struct match { };
+
+template<template<typename> class t,typename T>
+struct match<t<T> > { typedef int type; };
+
+template<template<typename,typename> class t,typename T0,typename T1>
+struct match<t<T0,T1> > { typedef int type; };
+
+template<typename,typename =void> struct other { };
+
+typedef match<other<void,void> >::type type;
diff --git a/gcc/testsuite/g++.dg/torture/pr39764.C b/gcc/testsuite/g++.dg/torture/pr39764.C
new file mode 100644
index 00000000000..a8901331352
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr39764.C
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+class A;
+class B { };
+extern const double NaN;
+B foo(A* exec, double d);
+inline B baz(A* a) {
+ return foo(a, NaN);
+}
+B bar(A* a) {
+ return baz(a);
+}
+extern const double NaN = (__builtin_nanf(""));
+
diff --git a/gcc/testsuite/g++.dg/warn/Wlogical-op-1.C b/gcc/testsuite/g++.dg/warn/Wlogical-op-1.C
index f67ab89f867..61d4a9dae23 100644
--- a/gcc/testsuite/g++.dg/warn/Wlogical-op-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wlogical-op-1.C
@@ -28,20 +28,39 @@ extern testenum testa();
void foo()
{
- if ( f && b2 ) // { dg-warning "always evaluate as" }
+ if ( f && b2 ) // { dg-warning "logical" }
do_something(1);
- if ( c && b2 ) // { dg-warning "always evaluate as" }
+ if ( c && b2 ) // { dg-warning "logical" }
do_something(2);
- if ( b2 && c == a ) // { dg-bogus "always evaluate as" }
+ if ( b2 && c == a ) // { dg-bogus "logical" }
do_something(101);
if ( 1 && c )
- do_something(102); // { dg-bogus "always evaluate as" }
- if ( t2 && b2 ) // { dg-bogus "always evaluate as" }
+ do_something(102); // { dg-bogus "logical" }
+ if ( t2 && b2 ) // { dg-bogus "logical" }
do_something(103);
- if ( true && c == a ) // { dg-bogus "always evaluate as" }
+ if ( true && c == a ) // { dg-bogus "logical" }
do_something(104);
- if ( b2 && true ) // { dg-bogus "always evaluate as" }
+ if ( b2 && true ) // { dg-bogus "logical" }
do_something(105);
}
+
+void bar()
+{
+ if ( f || b2 ) // { dg-warning "logical" }
+ do_something(1);
+ if ( c || b2 ) // { dg-warning "logical" }
+ do_something(2);
+
+ if ( b2 || c == a ) // { dg-bogus "logical" }
+ do_something(101);
+ if ( 1 || c )
+ do_something(102); // { dg-bogus "logical" }
+ if ( t2 || b2 ) // { dg-bogus "logical" }
+ do_something(103);
+ if ( true || c == a ) // { dg-bogus "logical" }
+ do_something(104);
+ if ( b2 || true ) // { dg-bogus "logical" }
+ do_something(105);
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-13.C b/gcc/testsuite/g++.dg/warn/Wunused-13.C
new file mode 100644
index 00000000000..d0eae113e9e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-13.C
@@ -0,0 +1,7 @@
+// Test whether -Wunused handles effectless indirect_ref operation ('*').
+// { dg-do compile }
+// { dg-options "-Wunused" }
+
+void Foo(int* x) {
+ *x++; // { dg-warning "value computed is not used" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/pr36954.C b/gcc/testsuite/g++.dg/warn/pr36954.C
new file mode 100644
index 00000000000..92cea2f3876
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/pr36954.C
@@ -0,0 +1,23 @@
+// PR c++/36954
+// { dg-do compile }
+// { dg-options "-Wlogical-op -Wextra -Wall" }
+
+template<class C> void Test()
+{
+ if ((1 == 2) || (true)) {
+ }
+
+ if ((1 == 2) || (!false)) {
+ }
+
+ if (false || true) {
+ }
+}
+
+
+
+int main() {
+ if ((1 == 2) || (true)) {
+ }
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strlen-3.c b/gcc/testsuite/gcc.c-torture/execute/builtins/strlen-3.c
index 221e306247a..666ca21b94f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/strlen-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strlen-3.c
@@ -10,7 +10,7 @@ extern char *strcpy (char *, const char *);
static const char bar[] = "Hello, World!";
static const char baz[] = "hello, world?";
static const char larger[20] = "short string";
-extern volatile int inside_main;
+extern int inside_main;
int l1 = 1;
int x = 6;
diff --git a/gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c b/gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c
new file mode 100644
index 00000000000..f2291ad66d4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c
@@ -0,0 +1,22 @@
+/* VLAs should be deallocated on a jump to before their definition,
+ including a jump to a label in an inner scope. PR 19771. */
+
+void *volatile p;
+
+int
+main (void)
+{
+ int n = 0;
+ if (0)
+ {
+ lab:;
+ }
+ int x[n % 1000 + 1];
+ x[0] = 1;
+ x[n % 1000] = 2;
+ p = x;
+ n++;
+ if (n < 1000000)
+ goto lab;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/Wenum-compare-1.c b/gcc/testsuite/gcc.dg/Wenum-compare-1.c
new file mode 100644
index 00000000000..dd321e0f643
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wenum-compare-1.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-Wenum-compare" } */
+enum E1 { A, B, C };
+enum E2 { D, E, F };
+extern void f2 ();
+void
+f1 ()
+{
+ int a = A;
+ int d = D;
+ enum E1 e1 = A;
+ enum E2 e2 = D;
+ if (A > D) /* { dg-warning "comparison between .enum E1. and .enum E2." } */
+ f2 ();
+ if (e1 > e2) /* { dg-warning "comparison between .enum E1. and .enum E2." } */
+ f2 ();
+ if (e1 > e2 + 1)
+ f2 ();
+ if (A > 0)
+ f2 ();
+ if (e1 > 0)
+ f2 ();
+ if (A + D > 0)
+ f2 ();
+ if (e1 > 0)
+ f2 ();
+ if (A + D > 0)
+ f2 ();
+ if ((int) A > D)
+ f2 ();
+ if ((int) e1 > e2)
+ f2 ();
+}
diff --git a/gcc/testsuite/gcc.dg/Wlogical-op-1.c b/gcc/testsuite/gcc.dg/Wlogical-op-1.c
index d9687bf09a2..2cbb9806e03 100644
--- a/gcc/testsuite/gcc.dg/Wlogical-op-1.c
+++ b/gcc/testsuite/gcc.dg/Wlogical-op-1.c
@@ -14,34 +14,64 @@ extern int testa();
void foo()
{
- if ( testa() && b ) /* { dg-warning "always evaluate as" } */
+ if ( testa() && b ) /* { dg-warning "logical" } */
(void)testa();
- if ( c && b ) /* { dg-warning "always evaluate as" } */
+ if ( c && b ) /* { dg-warning "logical" } */
(void)testa();
- if ( c && 0x42 ) /* { dg-warning "always evaluate as" } */
+ if ( c && 0x42 ) /* { dg-warning "logical" } */
(void)testa();
- if ( c && 0x42 ) /* { dg-warning "always evaluate as" } */
+ if ( c && 0x80 >>6) /* { dg-warning "logical" } */
+ (void)testa();
+
+
+ if ( b && c == a ) /* { dg-bogus "logical" } */
+ (void)testa();
+
+ if ( 1 && c ) /* { dg-bogus "logical" } */
+ (void)testa();
+
+ if ( t2 && b ) /* { dg-bogus "logical" } */
+ (void)testa();
+
+ if ( 0 && c == a ) /* { dg-bogus "logical" } */
+ (void)testa();
+
+ if ( b && 1 ) /* { dg-bogus "logical" } */
+ (void)testa();
+}
+
+
+void bar()
+{
+ if ( testa() || b ) /* { dg-warning "logical" } */
+ (void)testa();
+
+ if ( c || b ) /* { dg-warning "logical" } */
+ (void)testa();
+
+ if ( c || 0x42 ) /* { dg-warning "logical" } */
(void) testa();
- if ( c && 0x80 >>6) /* { dg-warning "always evaluate as" } */
+ if ( c || 0x80 >>6) /* { dg-warning "logical" } */
(void)testa();
- if ( b && c == a ) /* { dg-bogus "always evaluate as" } */
+ if ( b || c == a ) /* { dg-bogus "logical" } */
(void)testa();
- if ( 1 && c ) /* { dg-bogus "always evaluate as" } */
+ if ( 1 || c ) /* { dg-bogus "logical" } */
(void)testa();
- if ( t2 && b ) /* { dg-bogus "always evaluate as" } */
+ if ( t2 || b ) /* { dg-bogus "logical" } */
(void)testa();
- if ( 0 && c == a ) /* { dg-bogus "always evaluate as" } */
+ if ( 0 || c == a ) /* { dg-bogus "logical" } */
(void)testa();
- if ( b && 1 ) /* { dg-bogus "always evaluate as" } */
+ if ( b || 1 ) /* { dg-bogus "logical" } */
(void)testa();
}
+
diff --git a/gcc/testsuite/gcc.dg/c99-flex-array-7.c b/gcc/testsuite/gcc.dg/c99-flex-array-7.c
new file mode 100644
index 00000000000..8966e6cccc0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-flex-array-7.c
@@ -0,0 +1,17 @@
+/* Initialization of a flexible array member with a string constant
+ must be diagnosed. PR 37481. */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+struct s { int a; char b[]; };
+
+struct s a = { 0, "" }; /* { dg-error "initialization of a flexible array member" } */
+/* { dg-error "near init" "near init" { target *-*-* } 8 } */
+struct s b = { 0, { 0 } }; /* { dg-error "initialization of a flexible array member" } */
+/* { dg-error "near init" "near init" { target *-*-* } 10 } */
+struct s c = { 0, { } }; /* { dg-error "ISO C forbids empty initializer braces" } */
+struct s d = { .b = "" }; /* { dg-error "initialization of a flexible array member" } */
+/* { dg-error "near init" "near init" { target *-*-* } 13 } */
+struct s e = { .b = { 0 } }; /* { dg-error "initialization of a flexible array member" } */
+/* { dg-error "near init" "near init" { target *-*-* } 15 } */
+struct s f = { .b = { } }; /* { dg-error "ISO C forbids empty initializer braces" } */
diff --git a/gcc/testsuite/gcc.dg/c99-restrict-3.c b/gcc/testsuite/gcc.dg/c99-restrict-3.c
new file mode 100644
index 00000000000..e5200a57be9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-restrict-3.c
@@ -0,0 +1,7 @@
+/* restrict qualifiers on non-pointers must be diagnosed even when
+ only a tag is being declared. PR 38243. */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+restrict struct s; /* { dg-error "restrict" } */
+restrict union u; /* { dg-error "restrict" } */
diff --git a/gcc/testsuite/gcc.dg/call-diag-2.c b/gcc/testsuite/gcc.dg/call-diag-2.c
new file mode 100644
index 00000000000..0d87e52e973
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/call-diag-2.c
@@ -0,0 +1,17 @@
+/* Test diagnostics for calling function returning qualified void or
+ other incomplete type other than void. PR 35210. */
+/* { dg-do compile } */
+/* { dg-options "-pedantic-errors" } */
+
+const void f_cv (void);
+struct s f_s (void);
+void f_v (void);
+
+void g1 (void) { f_cv (); } /* { dg-error "qualified void" } */
+void g2 (void) { f_s (); } /* { dg-error "invalid use of undefined type" } */
+void g3 (void) { ((const void (*) (void)) f_v) (); } /* { dg-error "qualified void" } */
+/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 12 } */
+/* { dg-message "will abort" "abort" { target *-*-* } 12 } */
+void g4 (void) { ((struct s (*) (void)) f_v) (), (void) 0; } /* { dg-error "invalid use of undefined type" } */
+/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 15 } */
+/* { dg-message "will abort" "abort" { target *-*-* } 15 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/include5.c b/gcc/testsuite/gcc.dg/cpp/include5.c
new file mode 100644
index 00000000000..9bbc2878d05
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/include5.c
@@ -0,0 +1,9 @@
+/* Test #include directives with macros expanding to empty. */
+
+#define EMPTY_OBJ
+#define EMPTY_FUNC()
+
+#include <stddef.h> EMPTY_OBJ
+#include <stddef.h> EMPTY_FUNC()
+#include "stddef.h" EMPTY_OBJ
+#include "stddef.h" EMPTY_FUNC()
diff --git a/gcc/testsuite/gcc.dg/cpp/line7.c b/gcc/testsuite/gcc.dg/cpp/line7.c
new file mode 100644
index 00000000000..754727e885f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/line7.c
@@ -0,0 +1,19 @@
+/* Test #line syntax, including macro expansion and empty macros. PR
+ 39647. */
+
+/* { dg-do preprocess } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+
+#define EMPTY_OBJ
+#define EMPTY_FUNC()
+
+#define A 12 "line7.c"
+#line A
+
+#line EMPTY_OBJ /* { dg-error "unexpected end of file" } */
+#line X /* { dg-error "is not a positive integer" } */
+#line 16 16 /* { dg-error "is not a valid filename" } */
+
+#line 18 "line7.c" EMPTY_OBJ
+#line 19 "line7.c" EMPTY_FUNC()
+#line 20 "line7.c" foo /* { dg-error "extra tokens at end" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/line8.c b/gcc/testsuite/gcc.dg/cpp/line8.c
new file mode 100644
index 00000000000..5aeb26ca325
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/line8.c
@@ -0,0 +1,10 @@
+/* Test that "" is not specially interpreted as "<stdin>" in a #line
+ directive. PR 39646. */
+
+/* { dg-do compile } */
+/* { dg-options "-pedantic-errors" } */
+
+extern int x;
+
+#line 24 ""
+extern char z[sizeof __FILE__ == 1];
diff --git a/gcc/testsuite/gcc.dg/cpp/paste16.c b/gcc/testsuite/gcc.dg/cpp/paste16.c
new file mode 100644
index 00000000000..11aca2b60d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste16.c
@@ -0,0 +1,6 @@
+/* Test multiple consecutive ## tokens. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+#define cat(x,y) x##########y
+int abcd;
+int *p = &cat(ab,cd);
diff --git a/gcc/testsuite/gcc.dg/cpp/redef4.c b/gcc/testsuite/gcc.dg/cpp/redef4.c
new file mode 100644
index 00000000000..b34635b2e42
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/redef4.c
@@ -0,0 +1,499 @@
+/* Test redefinitions differing only in the spelling of paste and
+ stringify tokens, whitespace around them, or the number of
+ consecutive paste tokens. */
+/* { dg-do preprocess } */
+/* { dg-options "" } */
+
+#define str(x) #x /* { dg-message "previous definition" } */
+#define str(x) %: x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) #x /* { dg-message "previous definition" } */
+#define str(x) # x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) #x /* { dg-message "previous definition" } */
+#define str(x) %: x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) %:x /* { dg-message "previous definition" } */
+#define str(x) #x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) %:x /* { dg-message "previous definition" } */
+#define str(x) %: x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) %:x /* { dg-message "previous definition" } */
+#define str(x) # x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) %:x /* { dg-message "previous definition" } */
+#define str(x) %: x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) # x /* { dg-message "previous definition" } */
+#define str(x) #x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) # x /* { dg-message "previous definition" } */
+#define str(x) %: x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) # x /* { dg-message "previous definition" } */
+#define str(x) %: x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) %: x /* { dg-message "previous definition" } */
+#define str(x) #x /* { dg-warning "redefined" } */
+#undef str
+#define str(x) %: x /* { dg-message "previous definition" } */
+#define str(x) # x /* { dg-warning "redefined" } */
+#undef str
+
+#define str(x) #x
+#define str(x) #x
+#undef str
+#define str(x) # x
+#define str(x) # x
+#undef str
+#define str(x) %: x
+#define str(x) %: x
+#undef str
+#define str(x) %: x
+#define str(x) %: x
+#undef str
+
+#define astr(x) a#x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a#x /* { dg-message "previous definition" } */
+#define astr(x) a# x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a#x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a#x /* { dg-message "previous definition" } */
+#define astr(x) a #x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a#x /* { dg-message "previous definition" } */
+#define astr(x) a %:x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a#x /* { dg-message "previous definition" } */
+#define astr(x) a # x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a#x /* { dg-message "previous definition" } */
+#define astr(x) a %: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a#x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a# x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a #x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a %:x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a # x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%:x /* { dg-message "previous definition" } */
+#define astr(x) a %: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a# x /* { dg-message "previous definition" } */
+#define astr(x) a#x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a# x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a# x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a# x /* { dg-message "previous definition" } */
+#define astr(x) a #x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a# x /* { dg-message "previous definition" } */
+#define astr(x) a %:x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a# x /* { dg-message "previous definition" } */
+#define astr(x) a # x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a# x /* { dg-message "previous definition" } */
+#define astr(x) a %: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%: x /* { dg-message "previous definition" } */
+#define astr(x) a#x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%: x /* { dg-message "previous definition" } */
+#define astr(x) a# x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%: x /* { dg-message "previous definition" } */
+#define astr(x) a #x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%: x /* { dg-message "previous definition" } */
+#define astr(x) a %:x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%: x /* { dg-message "previous definition" } */
+#define astr(x) a # x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a%: x /* { dg-message "previous definition" } */
+#define astr(x) a %: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a #x /* { dg-message "previous definition" } */
+#define astr(x) a#x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a #x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a #x /* { dg-message "previous definition" } */
+#define astr(x) a# x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a #x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a #x /* { dg-message "previous definition" } */
+#define astr(x) a %:x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a #x /* { dg-message "previous definition" } */
+#define astr(x) a # x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a #x /* { dg-message "previous definition" } */
+#define astr(x) a %: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %:x /* { dg-message "previous definition" } */
+#define astr(x) a#x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %:x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %:x /* { dg-message "previous definition" } */
+#define astr(x) a# x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %:x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %:x /* { dg-message "previous definition" } */
+#define astr(x) a #x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %:x /* { dg-message "previous definition" } */
+#define astr(x) a # x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %:x /* { dg-message "previous definition" } */
+#define astr(x) a %: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a # x /* { dg-message "previous definition" } */
+#define astr(x) a#x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a # x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a # x /* { dg-message "previous definition" } */
+#define astr(x) a# x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a # x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a # x /* { dg-message "previous definition" } */
+#define astr(x) a #x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a # x /* { dg-message "previous definition" } */
+#define astr(x) a %:x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a # x /* { dg-message "previous definition" } */
+#define astr(x) a %: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %: x /* { dg-message "previous definition" } */
+#define astr(x) a#x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %: x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %: x /* { dg-message "previous definition" } */
+#define astr(x) a# x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %: x /* { dg-message "previous definition" } */
+#define astr(x) a%: x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %: x /* { dg-message "previous definition" } */
+#define astr(x) a #x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %: x /* { dg-message "previous definition" } */
+#define astr(x) a %:x /* { dg-warning "redefined" } */
+#undef astr
+#define astr(x) a %: x /* { dg-message "previous definition" } */
+#define astr(x) a # x /* { dg-warning "redefined" } */
+#undef astr
+
+#define astr(x) a#x
+#define astr(x) a#x
+#undef astr
+#define astr(x) a# x
+#define astr(x) a# x
+#undef astr
+#define astr(x) a%: x
+#define astr(x) a%: x
+#undef astr
+#define astr(x) a%: x
+#define astr(x) a%: x
+#undef astr
+#define astr(x) a #x
+#define astr(x) a #x
+#undef astr
+#define astr(x) a %:x
+#define astr(x) a %:x
+#undef astr
+#define astr(x) a # x
+#define astr(x) a # x
+#undef astr
+#define astr(x) a %: x
+#define astr(x) a %: x
+#undef astr
+
+#define cat(x,y) x##y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x##y /* { dg-message "previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x##y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x##y /* { dg-message "previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x##y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x##y /* { dg-message "previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x##y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x## y /* { dg-message "previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x## y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x## y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x## y /* { dg-message "previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x## y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x## y /* { dg-message "previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x## y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ##y /* { dg-message "previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ##y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ##y /* { dg-message "previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ##y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ##y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ##y /* { dg-message "previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ##y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ## y /* { dg-message "previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ## y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ## y /* { dg-message "previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ## y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ## y /* { dg-message "previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ## y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x ## y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#undef cat
+#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#undef cat
+
+#define cat(x,y) x##y
+#define cat(x,y) x##y
+#undef cat
+#define cat(x,y) x## y
+#define cat(x,y) x## y
+#undef cat
+#define cat(x,y) x%:%: y
+#define cat(x,y) x%:%: y
+#undef cat
+#define cat(x,y) x%:%: y
+#define cat(x,y) x%:%: y
+#undef cat
+#define cat(x,y) x ##y
+#define cat(x,y) x ##y
+#undef cat
+#define cat(x,y) x %:%:y
+#define cat(x,y) x %:%:y
+#undef cat
+#define cat(x,y) x ## y
+#define cat(x,y) x ## y
+#undef cat
+#define cat(x,y) x %:%: y
+#define cat(x,y) x %:%: y
+#undef cat
+
+#define cat3(x,y,z) x##y##z /* { dg-message "previous definition" } */
+#define cat3(x,y,z) x##y####z /* { dg-warning "redefined" } */
+#undef cat3
+
+#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */
+#define cat3(x,y,z) x####y##z /* { dg-warning "redefined" } */
+#undef cat3
+
+#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */
+#define cat3(x,y,z) x##y## ##z /* { dg-warning "redefined" } */
+#undef cat3
+
+#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */
+#define cat3(x,y,z) x##y##%:%:z /* { dg-warning "redefined" } */
+#undef cat3
+
+#define cat3(x,y,z) x##y######## ####z /* { dg-message "previous definition" } */
+#define cat3(x,y,z) x##y############z /* { dg-warning "redefined" } */
+#undef cat3
+
+#define cat3(x,y,z) x##y############z /* { dg-message "previous definition" } */
+#define cat3(x,y,z) x##y########%:%:##z /* { dg-warning "redefined" } */
+#undef cat3
+
+#define cat3(x,y,z) x##y##z
+#define cat3(x,y,z) x##y##z
+#undef cat3
+
+#define cat3(x,y,z) x##y####z
+#define cat3(x,y,z) x##y####z
+#undef cat3
+
+#define cat3(x,y,z) x####y##z
+#define cat3(x,y,z) x####y##z
+#undef cat3
+
+#define cat3(x,y,z) x##y## ##z
+#define cat3(x,y,z) x##y## ##z
+#undef cat3
+
+#define cat3(x,y,z) x##y##%:%:z
+#define cat3(x,y,z) x##y##%:%:z
+#undef cat3
+
+#define cat3(x,y,z) x##y######## ####z
+#define cat3(x,y,z) x##y######## ####z
+#undef cat3
+
+#define cat3(x,y,z) x##y############z
+#define cat3(x,y,z) x##y############z
+#undef cat3
+
+#define cat3(x,y,z) x##y########%:%:##z
+#define cat3(x,y,z) x##y########%:%:##z
+#undef cat3
diff --git a/gcc/testsuite/gcc.dg/lvalue-5.c b/gcc/testsuite/gcc.dg/lvalue-5.c
new file mode 100644
index 00000000000..514f35ed802
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lvalue-5.c
@@ -0,0 +1,14 @@
+/* Test assignment to elements of a string literal is a warning, not
+ an error. PR 27676. */
+/* { dg-do compile } */
+/* { dg-options "-pedantic-errors" } */
+
+void
+f (void)
+{
+ "foo"[0] = 0; /* { dg-warning "assignment of read-only location" } */
+ "foo"[0]++; /* { dg-warning "increment of read-only location" } */
+ "foo"[0]--; /* { dg-warning "decrement of read-only location" } */
+ ++"foo"[0]; /* { dg-warning "increment of read-only location" } */
+ --"foo"[0]; /* { dg-warning "decrement of read-only location" } */
+}
diff --git a/gcc/testsuite/gcc.dg/lvalue-6.c b/gcc/testsuite/gcc.dg/lvalue-6.c
new file mode 100644
index 00000000000..af69de4df4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lvalue-6.c
@@ -0,0 +1,17 @@
+/* Test constraints on unary '&': PR 22367. */
+
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
+
+extern void v;
+void f1 (void) { &v; } /* { dg-error "taking address of expression of type 'void'" } */
+
+extern void *pv;
+void f2 (void) { &*pv; } /* { dg-warning "dereferencing" } */
+/* { dg-error "taking address of expression of type 'void'" "C90 only error" { target *-*-* } 10 } */
+
+extern const void cv;
+void f3 (void) { &cv; }
+
+extern const void *pcv;
+void f4 (void) { &*pcv; } /* { dg-warning "dereferencing" } */
diff --git a/gcc/testsuite/gcc.dg/lvalue-7.c b/gcc/testsuite/gcc.dg/lvalue-7.c
new file mode 100644
index 00000000000..37964e1cd76
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lvalue-7.c
@@ -0,0 +1,16 @@
+/* Test constraints on unary '&': PR 22367. */
+
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+extern void v;
+void f1 (void) { &v; } /* { dg-error "taking address of expression of type 'void'" } */
+
+extern void *pv;
+void f2 (void) { &*pv; } /* { dg-warning "dereferencing" } */
+
+extern const void cv;
+void f3 (void) { &cv; }
+
+extern const void *pcv;
+void f4 (void) { &*pcv; } /* { dg-warning "dereferencing" } */
diff --git a/gcc/testsuite/gcc.dg/pr32061.c b/gcc/testsuite/gcc.dg/pr32061.c
new file mode 100644
index 00000000000..dc1a916f1bb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr32061.c
@@ -0,0 +1,10 @@
+/* PR c/32061
+ { dg-do compile }
+ { dg-options "-Wlogical-op -Wall -Wextra" }
+*/
+#define FORCE 1
+#define FLAG 1
+int func (int resp, int flags)
+{
+ return (resp && (FORCE || (FLAG & flags)));
+}
diff --git a/gcc/testsuite/gcc.dg/pr36902.c b/gcc/testsuite/gcc.dg/pr36902.c
new file mode 100644
index 00000000000..43a2d14f981
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr36902.c
@@ -0,0 +1,61 @@
+/* PR middle-end/36902 Array bound warning with dead code after optimization */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Warray-bounds -Wall -Wextra" } */
+typedef unsigned char __u8;
+typedef unsigned short __u16;
+
+static inline unsigned char *
+foo(unsigned char * to, const unsigned char * from, int n)
+{
+ switch ( n )
+ {
+ case 3:
+ *to = *from;
+ break;
+ case 5:
+ to[4] = from [4];
+ break;
+ }
+ return to;
+}
+
+struct {
+ int size_of_select;
+ unsigned char pcr_select[4];
+} sel;
+
+int bar(void)
+{
+ static unsigned char buf[64];
+
+ sel.size_of_select = 3;
+ foo(buf, sel.pcr_select, sel.size_of_select);
+
+ return 1;
+}
+
+
+static inline unsigned char *
+foo2(unsigned char * to, const unsigned char * from, int n)
+{
+ switch ( n )
+ {
+ case 3:
+ *to = *from;
+ break;
+ case 5:
+ to[4] = from [4]; /* { dg-warning "array subscript is above array bounds" } */
+ break;
+ }
+ return to;
+}
+
+int baz(void)
+{
+ static unsigned char buf[64];
+
+ sel.size_of_select = 5;
+ foo2(buf, sel.pcr_select, sel.size_of_select);
+
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39496.c b/gcc/testsuite/gcc.target/i386/pr39496.c
index d90a2c7f3ea..e4132a1165b 100644
--- a/gcc/testsuite/gcc.target/i386/pr39496.c
+++ b/gcc/testsuite/gcc.target/i386/pr39496.c
@@ -1,6 +1,6 @@
/* PR target/39496 */
/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } } */
-/* { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -msse2 -mfpmath=sse" } */
+/* { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -mtune=i686 -msse2 -mfpmath=sse" } */
/* Verify that {foo,bar}{,2}param are all passed on the stack, using
normal calling conventions, when not optimizing. */
/* { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*fooparam," } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr39804.c b/gcc/testsuite/gcc.target/i386/pr39804.c
new file mode 100644
index 00000000000..3ff2479084f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39804.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O" } */
+
+typedef unsigned char u8;
+struct __large_struct { unsigned long buf[100]; };
+static inline __attribute__((always_inline)) unsigned long
+__copy_from_user_inatomic(void *to, const void *from, unsigned long n)
+{
+ unsigned long ret = 0;
+ asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n"
+ ".section .fixup,\"ax\"\n"
+ "3: mov %3,%0\n"
+ " xor""b"" %""b""1,%""b""1\n"
+ " jmp 2b\n"
+ ".previous\n"
+ " .section __ex_table,\"a\"\n"
+ " " ".balign 4" " " "\n"
+ " " ".long" " " "1b" "," "3b" "\n"
+ " .previous\n"
+ : "=r" (ret), "=q"(*(u8 *)to)
+ : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret));
+ return ret;
+}
+void romchecksum(const unsigned char *rom, unsigned char c)
+{
+ unsigned char sum;
+ for (sum = 0;
+ !__copy_from_user_inatomic(&(c), ( typeof(c) *)(rom++), sizeof(c));)
+ sum += c;
+}
diff --git a/gcc/testsuite/gfortran.dg/chmod_1.f90 b/gcc/testsuite/gfortran.dg/chmod_1.f90
index e83beccf84b..1c7907e8f35 100644
--- a/gcc/testsuite/gfortran.dg/chmod_1.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_1.f90
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! *-*-mingw* } } }
+! { dg-do run { target { ! { *-*-mingw* spu-*-* } } } }
! { dg-options "-std=gnu" }
implicit none
character(len=*), parameter :: n = "foobar_file"
diff --git a/gcc/testsuite/gfortran.dg/chmod_2.f90 b/gcc/testsuite/gfortran.dg/chmod_2.f90
index f319cd1868e..b43c60f9b92 100644
--- a/gcc/testsuite/gfortran.dg/chmod_2.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_2.f90
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! *-*-mingw* } } }
+! { dg-do run { target { ! { *-*-mingw* spu-*-* } } } }
! { dg-options "-std=gnu" }
implicit none
character(len=*), parameter :: n = "foobar_file"
diff --git a/gcc/testsuite/gfortran.dg/chmod_3.f90 b/gcc/testsuite/gfortran.dg/chmod_3.f90
index 63a4bbb564e..c97af6d4692 100644
--- a/gcc/testsuite/gfortran.dg/chmod_3.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_3.f90
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! *-*-mingw* } } }
+! { dg-do run { target { ! { *-*-mingw* spu-*-* } } } }
! { dg-options "-std=gnu -fdefault-integer-8" }
implicit none
character(len=*), parameter :: n = "foobar_file"
diff --git a/gcc/testsuite/gfortran.dg/default_format_1.f90 b/gcc/testsuite/gfortran.dg/default_format_1.f90
index 9d3e3ad7635..1c6e71ebc71 100644
--- a/gcc/testsuite/gfortran.dg/default_format_1.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_1.f90
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run { xfail spu-*-* } }
! Test XFAILed on Darwin because the system's printf() lacks
! proper support for denormals.
!
diff --git a/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 b/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
index c4d6086594d..adecd50c4d0 100644
--- a/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
@@ -1,4 +1,4 @@
-! { dg-do run { xfail alpha*-*-* *-*-darwin[89]* *-*-freebsd* *-*-mingw* } }
+! { dg-do run { xfail alpha*-*-* *-*-darwin[89]* *-*-freebsd* *-*-mingw* spu-*-* } }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormals.
!
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90
index 298b54eee3d..802d1ed20ff 100644
--- a/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90
@@ -48,7 +48,7 @@ end module pr22146
! Test an expression in the INTENT(IN) argument
x = (/1.0, 2.0/)
call foobar (cos (x) + u, y)
- if (any(abs (y + cos (x) + u) .gt. 2.0e-6)) call abort ()
+ if (any(abs (y + cos (x) + u) .gt. 4.0e-6)) call abort ()
contains
diff --git a/gcc/testsuite/gfortran.dg/gamma_5.f90 b/gcc/testsuite/gfortran.dg/gamma_5.f90
index d9cb3580a60..467c5796244 100644
--- a/gcc/testsuite/gfortran.dg/gamma_5.f90
+++ b/gcc/testsuite/gfortran.dg/gamma_5.f90
@@ -21,7 +21,7 @@ program main
xd = n + 0.5d0
td = c(n)*sqrt(pi)
ts = c(n)*sqrt(pi)
- if (abs(gamma(xs)-ts)/ts > 3e-6) call abort
+ if (abs(gamma(xs)-ts)/ts > 9e-6) call abort
if (abs(gamma(xd)-td)/td > 5e-14) call abort
end do
call tst_s(2.3, gamma(2.3))
diff --git a/gcc/testsuite/gfortran.dg/init_flag_3.f90 b/gcc/testsuite/gfortran.dg/init_flag_3.f90
index 9724d39c217..4a3fd1eb306 100644
--- a/gcc/testsuite/gfortran.dg/init_flag_3.f90
+++ b/gcc/testsuite/gfortran.dg/init_flag_3.f90
@@ -1,6 +1,7 @@
! { dg-do run }
! { dg-options "-finit-integer=-1 -finit-logical=false -finit-real=nan" }
! { dg-options "-finit-integer=-1 -finit-logical=false -finit-real=nan -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
program init_flag_3
call real_test
diff --git a/gcc/testsuite/gfortran.dg/int_conv_2.f90 b/gcc/testsuite/gfortran.dg/int_conv_2.f90
index ce5f5a21712..ed7a5f4cd60 100644
--- a/gcc/testsuite/gfortran.dg/int_conv_2.f90
+++ b/gcc/testsuite/gfortran.dg/int_conv_2.f90
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
! PR fortran/37930
program test
implicit none
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
index 3d95fb102cc..e5c4052bacb 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
@@ -1,4 +1,5 @@
-! { dg-do run }
+! { dg-do run { xfail spu-*-* } }
+! FAILs on SPU because of wrong compile-time rounding mode
! { dg-options "" }
module mod_check
implicit none
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
index 2fc8df35c3f..fe431ba14e9 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
@@ -1,4 +1,5 @@
-! { dg-do run }
+! { dg-do run { xfail spu-*-* } }
+! FAILs on SPU because of invalid result of 1.0/0.0 inline code
! { dg-options "-fno-range-check" }
! { dg-options "-fno-range-check -mieee" { target alpha*-*-* } } */
module mod_check
diff --git a/gcc/testsuite/gfortran.dg/isnan_1.f90 b/gcc/testsuite/gfortran.dg/isnan_1.f90
index 3c0cce8d378..47187432bf2 100644
--- a/gcc/testsuite/gfortran.dg/isnan_1.f90
+++ b/gcc/testsuite/gfortran.dg/isnan_1.f90
@@ -2,6 +2,7 @@
!
! { dg-do run }
! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
implicit none
real :: x
diff --git a/gcc/testsuite/gfortran.dg/isnan_2.f90 b/gcc/testsuite/gfortran.dg/isnan_2.f90
index 37b53633fa7..fe6e9314613 100644
--- a/gcc/testsuite/gfortran.dg/isnan_2.f90
+++ b/gcc/testsuite/gfortran.dg/isnan_2.f90
@@ -3,6 +3,7 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
! { dg-options "-fno-range-check -pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
implicit none
character(len=1) :: s
diff --git a/gcc/testsuite/gfortran.dg/module_nan.f90 b/gcc/testsuite/gfortran.dg/module_nan.f90
index 52fa8a9f77d..d6db6fb054b 100644
--- a/gcc/testsuite/gfortran.dg/module_nan.f90
+++ b/gcc/testsuite/gfortran.dg/module_nan.f90
@@ -1,6 +1,7 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34318
!
diff --git a/gcc/testsuite/gfortran.dg/namelist_42.f90 b/gcc/testsuite/gfortran.dg/namelist_42.f90
index 1aa75ab4b41..476c1196caa 100644
--- a/gcc/testsuite/gfortran.dg/namelist_42.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_42.f90
@@ -1,5 +1,6 @@
! { dg-do run { target fd_truncate } }
! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34427
!
diff --git a/gcc/testsuite/gfortran.dg/namelist_43.f90 b/gcc/testsuite/gfortran.dg/namelist_43.f90
index ad518dd126f..0dc8dac04ae 100644
--- a/gcc/testsuite/gfortran.dg/namelist_43.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_43.f90
@@ -1,5 +1,6 @@
! { dg-do run { target fd_truncate } }
! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34427
!
diff --git a/gcc/testsuite/gfortran.dg/nan_1.f90 b/gcc/testsuite/gfortran.dg/nan_1.f90
index 6b7e19f8060..938c04f004d 100644
--- a/gcc/testsuite/gfortran.dg/nan_1.f90
+++ b/gcc/testsuite/gfortran.dg/nan_1.f90
@@ -3,6 +3,7 @@
!
! { dg-do run }
! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
module aux2
interface isnan
diff --git a/gcc/testsuite/gfortran.dg/nan_2.f90 b/gcc/testsuite/gfortran.dg/nan_2.f90
index 30987715f36..c26eebcb627 100644
--- a/gcc/testsuite/gfortran.dg/nan_2.f90
+++ b/gcc/testsuite/gfortran.dg/nan_2.f90
@@ -1,6 +1,7 @@
! { dg-do run }
! { dg-options "-fno-range-check -pedantic" }
! { dg-options "-fno-range-check -pedantic -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34333
!
diff --git a/gcc/testsuite/gfortran.dg/nan_3.f90 b/gcc/testsuite/gfortran.dg/nan_3.f90
index adc927674b9..018608b5003 100644
--- a/gcc/testsuite/gfortran.dg/nan_3.f90
+++ b/gcc/testsuite/gfortran.dg/nan_3.f90
@@ -1,6 +1,7 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34319
!
diff --git a/gcc/testsuite/gfortran.dg/nan_4.f90 b/gcc/testsuite/gfortran.dg/nan_4.f90
index 7c37671efef..09c887e17f2 100644
--- a/gcc/testsuite/gfortran.dg/nan_4.f90
+++ b/gcc/testsuite/gfortran.dg/nan_4.f90
@@ -1,6 +1,7 @@
! { dg-do compile }
! { dg-options "-std=gnu" }
! { dg-options "-std=gnu -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34398.
!
diff --git a/gcc/testsuite/gfortran.dg/nearest_1.f90 b/gcc/testsuite/gfortran.dg/nearest_1.f90
index 64e2b8524fc..a38f25985ca 100644
--- a/gcc/testsuite/gfortran.dg/nearest_1.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_1.f90
@@ -1,6 +1,7 @@
! { dg-do run }
! { dg-options "-O0 -ffloat-store" }
! { dg-options "-O0 -ffloat-store -mieee" { target alpha*-*-* } }
+! { dg-skip-if "Denormals not supported" { spu-*-* } { "*" } { "" } }
! PR fortran/27021
! Original code submitted by Dominique d'Humieres
! Converted to Dejagnu for the testsuite by Steven G. Kargl
diff --git a/gcc/testsuite/gfortran.dg/nearest_3.f90 b/gcc/testsuite/gfortran.dg/nearest_3.f90
index 3af4cfc34d2..b2bb7e3e5b9 100644
--- a/gcc/testsuite/gfortran.dg/nearest_3.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_3.f90
@@ -1,5 +1,6 @@
! { dg-do run }
! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34209
!
diff --git a/gcc/testsuite/gfortran.dg/open_errors.f90 b/gcc/testsuite/gfortran.dg/open_errors.f90
index 0def37a6356..729cc6a4fef 100644
--- a/gcc/testsuite/gfortran.dg/open_errors.f90
+++ b/gcc/testsuite/gfortran.dg/open_errors.f90
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! *-*-mingw* } } }
+! { dg-do run { target { ! { *-*-mingw* spu-*-* } } } }
! PR30005 Enhanced error messages for OPEN
! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
character(60) :: msg
diff --git a/gcc/testsuite/gfortran.dg/pr20257.f90 b/gcc/testsuite/gfortran.dg/pr20257.f90
index ca5a00bf882..77c885f48fc 100644
--- a/gcc/testsuite/gfortran.dg/pr20257.f90
+++ b/gcc/testsuite/gfortran.dg/pr20257.f90
@@ -1,4 +1,5 @@
! { dg-do run { target fd_truncate } }
+! { dg-skip-if "Too big for local store" { spu-*-* } { "*" } { "" } }
integer,parameter :: n = 10000
real(8) array(10000)
diff --git a/gcc/testsuite/gfortran.dg/real_const_3.f90 b/gcc/testsuite/gfortran.dg/real_const_3.f90
index 90e82087bb4..6567ac74f63 100644
--- a/gcc/testsuite/gfortran.dg/real_const_3.f90
+++ b/gcc/testsuite/gfortran.dg/real_const_3.f90
@@ -1,6 +1,7 @@
!{ dg-do run }
!{ dg-options "-fno-range-check" }
!{ dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+!{ dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
! PR19310 and PR19904, allow disabling range check during compile.
! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
program main
diff --git a/gcc/testsuite/gfortran.dg/scalar_mask_2.f90 b/gcc/testsuite/gfortran.dg/scalar_mask_2.f90
index adc7bbd60d4..967ac5c22c2 100644
--- a/gcc/testsuite/gfortran.dg/scalar_mask_2.f90
+++ b/gcc/testsuite/gfortran.dg/scalar_mask_2.f90
@@ -1,4 +1,5 @@
-! { dg-do run }
+! { dg-do run { xfail spu-*-* } }
+! FAILs on SPU because of rounding error reading kinds.h
program main
! Test scalar masks for different intrinsics.
real, dimension(2,2) :: a
diff --git a/gcc/testsuite/gfortran.dg/stat_1.f90 b/gcc/testsuite/gfortran.dg/stat_1.f90
index df60c3948f2..2fceaab9f7e 100644
--- a/gcc/testsuite/gfortran.dg/stat_1.f90
+++ b/gcc/testsuite/gfortran.dg/stat_1.f90
@@ -1,5 +1,5 @@
! { dg-do run { target fd_truncate } }
-! { dg-skip-if "" { *-*-mingw* } { "*" } { "" } }
+! { dg-skip-if "" { *-*-mingw* spu-*-* } { "*" } { "" } }
! { dg-options "-std=gnu" }
character(len=*), parameter :: f = "testfile"
integer :: s1(13), r1, s2(13), r2, s3(13), r3
diff --git a/gcc/testsuite/gfortran.dg/stat_2.f90 b/gcc/testsuite/gfortran.dg/stat_2.f90
index 4622395c34d..72661aced41 100644
--- a/gcc/testsuite/gfortran.dg/stat_2.f90
+++ b/gcc/testsuite/gfortran.dg/stat_2.f90
@@ -1,5 +1,5 @@
! { dg-do run { target fd_truncate } }
-! { dg-skip-if "" { *-*-mingw* } { "*" } { "" } }
+! { dg-skip-if "" { *-*-mingw* spu-*-* } { "*" } { "" } }
! { dg-options "-std=gnu" }
character(len=*), parameter :: f = "testfile"
integer :: s1(13), r1, s2(13), r2, s3(13), r3
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_1.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_1.f90
index c1b241fb99d..4f92121a572 100644
--- a/gcc/testsuite/gfortran.dg/transfer_simplify_1.f90
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_1.f90
@@ -1,5 +1,6 @@
! { dg-do run }
! { dg-options "-O2" }
+! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
! Tests that the PRs caused by the lack of gfc_simplify_transfer are
! now fixed. These were brought together in the meta-bug PR31237
! (TRANSFER intrinsic).
diff --git a/gcc/testsuite/gfortran.dg/vect/pr39318.f90 b/gcc/testsuite/gfortran.dg/vect/pr39318.f90
index 9e58a17b526..c22e558e241 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr39318.f90
+++ b/gcc/testsuite/gfortran.dg/vect/pr39318.f90
@@ -1,4 +1,4 @@
-! { dg-do compile }
+! { dg-do compile { target fopenmp } }
! { dg-options "-c -fopenmp -fexceptions -O2 -ftree-vectorize" }
subroutine adw_trajsp (F_u,i0,in,j0,jn)
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/getarg_1.x b/gcc/testsuite/gfortran.fortran-torture/execute/getarg_1.x
new file mode 100644
index 00000000000..6356b439e5e
--- /dev/null
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/getarg_1.x
@@ -0,0 +1,5 @@
+if [istarget "spu-*-*"] {
+ # We need -mstdmain to enable argument processing on SPU.
+ lappend additional_flags "-mstdmain"
+}
+return 0
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x
index dad399dcb8d..2d2b6ee8e68 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x
@@ -1,2 +1,6 @@
+if [istarget "spu-*-*"] {
+ # No Inf/NaN support on SPU.
+ return 1
+}
add-ieee-options
return 0
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x
index dad399dcb8d..e49cd40f269 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x
@@ -1,2 +1,6 @@
+if [istarget "spu-*-*"] {
+ # No denormal support on SPU.
+ return 1
+}
add-ieee-options
return 0
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x b/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x
index dad399dcb8d..2d2b6ee8e68 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x
@@ -1,2 +1,6 @@
+if [istarget "spu-*-*"] {
+ # No Inf/NaN support on SPU.
+ return 1
+}
add-ieee-options
return 0
diff --git a/gcc/testsuite/gnat.dg/ref_type.adb b/gcc/testsuite/gnat.dg/ref_type.adb
index 4cead9093c9..3d36b96ff96 100644
--- a/gcc/testsuite/gnat.dg/ref_type.adb
+++ b/gcc/testsuite/gnat.dg/ref_type.adb
@@ -2,7 +2,6 @@
-- { dg-do compile }
package body ref_type is
- type T is tagged null record;
procedure Print (X : T) is
begin
null;
diff --git a/gcc/testsuite/gnat.dg/ref_type.ads b/gcc/testsuite/gnat.dg/ref_type.ads
index 021ca72881d..550d5892ff2 100644
--- a/gcc/testsuite/gnat.dg/ref_type.ads
+++ b/gcc/testsuite/gnat.dg/ref_type.ads
@@ -1,5 +1,5 @@
package ref_type is
private
- type T is tagged;
+ type T is tagged null record;
procedure Print (X : T);
end ref_type;
diff --git a/gcc/testsuite/gnat.dg/rep_clause3.adb b/gcc/testsuite/gnat.dg/rep_clause3.adb
new file mode 100644
index 00000000000..f4adcc37bf6
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/rep_clause3.adb
@@ -0,0 +1,47 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+procedure Rep_Clause3 is
+
+ subtype U_16 is integer range 0..2**16-1;
+
+ type TYPE1 is range 0 .. 135;
+ for TYPE1'size use 14;
+
+ type TYPE2 is range 0 .. 262_143;
+ for TYPE2'size use 18;
+
+ subtype TYPE3 is integer range 1 .. 21*6;
+
+ type ARR is array (TYPE3 range <>) of boolean;
+ pragma Pack(ARR);
+
+ subtype SUB_ARR is ARR(1 .. 5*6);
+
+ OBJ : SUB_ARR;
+
+ type R is
+ record
+ N : TYPE1;
+ L : TYPE2;
+ I : SUB_ARR;
+ CRC : U_16;
+ end record;
+ for R use
+ record at mod 4;
+ N at 0 range 0 .. 13;
+ L at 0 range 14 .. 31;
+ I at 4 range 2 .. 37;
+ CRC at 8 range 16 .. 31;
+ end record;
+ for R'size use 12*8;
+
+ type SUB_R is array (1..4) of R;
+
+ T : SUB_R;
+
+begin
+ if OBJ = T(1).I then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 7bcbcabc087..53926a69a23 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -155,6 +155,10 @@ proc ${tool}_check_unsupported_p { output } {
if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] {
return "memory full"
}
+ if {[istarget spu-*-*] && \
+ [string match "*exceeds local store*" $output]} {
+ return "memory full"
+ }
return ""
}
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 1944e83febc..7d00acf6d1a 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -186,7 +186,7 @@ proc gcc-dg-prune { system text } {
# Likewise, if we see ".text exceeds local store range" or
# similar.
if {[string match "spu-*" $system] && \
- [string match "*exceeds local store range*" $text]} {
+ [string match "*exceeds local store*" $text]} {
# The format here is important. See dg.exp.
return "::unsupported::memory full"
}
diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp
index d001f657fbc..a4d6e2b5d38 100644
--- a/gcc/testsuite/lib/gfortran.exp
+++ b/gcc/testsuite/lib/gfortran.exp
@@ -27,6 +27,7 @@ load_lib prune.exp
load_lib gcc-defs.exp
load_lib timeout.exp
load_lib target-libpath.exp
+load_lib target-supports.exp
#
# GFORTRAN_UNDER_TEST is the compiler under test.
@@ -177,6 +178,13 @@ proc gfortran_init { args } {
lappend ALWAYS_GFORTRANFLAGS "additional_flags=$TOOL_OPTIONS"
}
+ # On the SPU, most of the fortran test cases exceed local store size.
+ # Use automatic overlay support to make them fit.
+ if { [check_effective_target_spu_auto_overlay] } {
+ lappend ALWAYS_GFORTRANFLAGS "ldflags=-Wl,--auto-overlay"
+ lappend ALWAYS_GFORTRANFLAGS "ldflags=-Wl,--reserved-space=131072"
+ }
+
verbose -log "ALWAYS_GFORTRANFLAGS set to $ALWAYS_GFORTRANFLAGS"
verbose "gfortran is initialized" 3
diff --git a/gcc/testsuite/lib/gnat.exp b/gcc/testsuite/lib/gnat.exp
index c14899fe914..35e18da93d2 100644
--- a/gcc/testsuite/lib/gnat.exp
+++ b/gcc/testsuite/lib/gnat.exp
@@ -255,7 +255,7 @@ proc prune_gnat_output { text } {
proc local_find_gnatmake {} {
global tool_root_dir
-
+
if ![is_remote host] {
set file [lookfor_file $tool_root_dir gnatmake]
if { $file == "" } {
@@ -263,7 +263,7 @@ proc local_find_gnatmake {} {
}
if { $file != "" } {
set root [file dirname $file]
- set CC "$file --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs -B$root -margs -B$root";
+ set CC "$file --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs --LINK=$root/xgcc -B$root -margs";
} else {
set CC [transform gnatmake]
}
diff --git a/gcc/timevar.h b/gcc/timevar.h
index d71ba3110c7..8b4caba2e35 100644
--- a/gcc/timevar.h
+++ b/gcc/timevar.h
@@ -1,5 +1,6 @@
/* Timing variables for measuring compiler performance.
- Copyright (C) 2000, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003, 2004, 2005, 2007, 2009
+ Free Software Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
This file is part of GCC.
@@ -72,6 +73,7 @@ struct timevar_time_def
identifier__,
typedef enum
{
+ TV_NONE,
#include "timevar.def"
TIMEVAR_LAST
}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 0f3d30b3b63..95b5ba3d70d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -993,11 +993,6 @@ compile_file (void)
varpool_assemble_pending_decls ();
finish_aliases_2 ();
- /* This must occur after the loop to output deferred functions.
- Else the coverage initializer would not be emitted if all the
- functions in this compilation unit were deferred. */
- coverage_finish ();
-
/* Likewise for mudflap static object registrations. */
if (flag_mudflap)
mudflap_finish_file ();
@@ -1508,6 +1503,15 @@ default_tree_printer (pretty_printer * pp, text_info *text, const char *spec,
switch (*spec)
{
+ case 'E':
+ t = va_arg (*text->args_ptr, tree);
+ if (TREE_CODE (t) == IDENTIFIER_NODE)
+ {
+ pp_string (pp, IDENTIFIER_POINTER (t));
+ return true;
+ }
+ break;
+
case 'D':
t = va_arg (*text->args_ptr, tree);
if (DECL_DEBUG_EXPR_IS_FROM (t) && DECL_DEBUG_EXPR (t))
@@ -2261,16 +2265,18 @@ do_compile (void)
It is not safe to call this function more than once. */
int
-toplev_main (unsigned int argc, const char **argv)
+toplev_main (int argc, char **argv)
{
- save_argv = argv;
+ expandargv (&argc, &argv);
+
+ save_argv = (const char **) argv;
/* Initialization of GCC's environment, and diagnostics. */
general_init (argv[0]);
/* Parse the options and do minimal processing; basically just
enough to default flags appropriately. */
- decode_options (argc, argv);
+ decode_options (argc, (const char **) argv);
init_local_tick ();
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 2324b068f77..15180c36f95 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
#define skip_leading_substring(whole, part) \
(strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part))
-extern int toplev_main (unsigned int, const char **);
+extern int toplev_main (int, char **);
extern int read_integral_parameter (const char *, const char *, const int);
extern void strip_off_ending (char *, int);
extern const char *trim_filename (const char *);
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 6c5eb87d644..9c701463784 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -375,7 +375,29 @@ make_blocks (gimple_seq seq)
/* If STMT is a basic block terminator, set START_NEW_BLOCK for the
next iteration. */
if (stmt_ends_bb_p (stmt))
- start_new_block = true;
+ {
+ /* If the stmt can make abnormal goto use a new temporary
+ for the assignment to the LHS. This makes sure the old value
+ of the LHS is available on the abnormal edge. Otherwise
+ we will end up with overlapping life-ranges for abnormal
+ SSA names. */
+ if (gimple_has_lhs (stmt)
+ && stmt_can_make_abnormal_goto (stmt)
+ && is_gimple_reg_type (TREE_TYPE (gimple_get_lhs (stmt))))
+ {
+ tree lhs = gimple_get_lhs (stmt);
+ tree tmp = create_tmp_var (TREE_TYPE (lhs), NULL);
+ gimple s = gimple_build_assign (lhs, tmp);
+ gimple_set_location (s, gimple_location (stmt));
+ gimple_set_block (s, gimple_block (stmt));
+ gimple_set_lhs (stmt, tmp);
+ if (TREE_CODE (TREE_TYPE (tmp)) == COMPLEX_TYPE
+ || TREE_CODE (TREE_TYPE (tmp)) == VECTOR_TYPE)
+ DECL_GIMPLE_REG_P (tmp) = 1;
+ gsi_insert_after (&i, s, GSI_SAME_STMT);
+ }
+ start_new_block = true;
+ }
gsi_next (&i);
first_stmt_of_seq = false;
@@ -1552,7 +1574,8 @@ remove_useless_stmts_cond (gimple_stmt_iterator *gsi, struct rus_data *data)
gimple stmt = gsi_stmt (*gsi);
/* The folded result must still be a conditional statement. */
- fold_stmt_inplace (stmt);
+ fold_stmt (gsi);
+ gcc_assert (gsi_stmt (*gsi) == stmt);
data->may_branch = true;
@@ -2075,7 +2098,7 @@ struct gimple_opt_pass pass_remove_useless_stmts =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3546,8 +3569,52 @@ verify_gimple_assign_binary (gimple stmt)
return false;
}
+ case PLUS_EXPR:
+ {
+ /* We use regular PLUS_EXPR for vectors.
+ ??? This just makes the checker happy and may not be what is
+ intended. */
+ if (TREE_CODE (lhs_type) == VECTOR_TYPE
+ && POINTER_TYPE_P (TREE_TYPE (lhs_type)))
+ {
+ if (TREE_CODE (rhs1_type) != VECTOR_TYPE
+ || TREE_CODE (rhs2_type) != VECTOR_TYPE)
+ {
+ error ("invalid non-vector operands to vector valued plus");
+ return true;
+ }
+ lhs_type = TREE_TYPE (lhs_type);
+ rhs1_type = TREE_TYPE (rhs1_type);
+ rhs2_type = TREE_TYPE (rhs2_type);
+ /* PLUS_EXPR is commutative, so we might end up canonicalizing
+ the pointer to 2nd place. */
+ if (POINTER_TYPE_P (rhs2_type))
+ {
+ tree tem = rhs1_type;
+ rhs1_type = rhs2_type;
+ rhs2_type = tem;
+ }
+ goto do_pointer_plus_expr_check;
+ }
+ }
+ /* Fallthru. */
+ case MINUS_EXPR:
+ {
+ if (POINTER_TYPE_P (lhs_type)
+ || POINTER_TYPE_P (rhs1_type)
+ || POINTER_TYPE_P (rhs2_type))
+ {
+ error ("invalid (pointer) operands to plus/minus");
+ return true;
+ }
+
+ /* Continue with generic binary expression handling. */
+ break;
+ }
+
case POINTER_PLUS_EXPR:
{
+do_pointer_plus_expr_check:
if (!POINTER_TYPE_P (rhs1_type)
|| !useless_type_conversion_p (lhs_type, rhs1_type)
|| !useless_type_conversion_p (sizetype, rhs2_type))
@@ -3603,21 +3670,6 @@ verify_gimple_assign_binary (gimple stmt)
connected to the operand types. */
return verify_gimple_comparison (lhs_type, rhs1, rhs2);
- case PLUS_EXPR:
- case MINUS_EXPR:
- {
- if (POINTER_TYPE_P (lhs_type)
- || POINTER_TYPE_P (rhs1_type)
- || POINTER_TYPE_P (rhs2_type))
- {
- error ("invalid (pointer) operands to plus/minus");
- return true;
- }
-
- /* Continue with generic binary expression handling. */
- break;
- }
-
case WIDEN_SUM_EXPR:
case WIDEN_MULT_EXPR:
case VEC_WIDEN_MULT_HI_EXPR:
@@ -4104,7 +4156,10 @@ verify_stmt (gimple_stmt_iterator *gsi)
to match. */
if (lookup_stmt_eh_region (stmt) >= 0)
{
- if (!stmt_could_throw_p (stmt))
+ /* During IPA passes, ipa-pure-const sets nothrow flags on calls
+ and they are updated on statements only after fixup_cfg
+ is executed at beggining of expansion stage. */
+ if (!stmt_could_throw_p (stmt) && cgraph_state != CGRAPH_STATE_IPA_SSA)
{
error ("statement marked for throw, but doesn%'t");
goto fail;
@@ -7118,7 +7173,7 @@ struct gimple_opt_pass pass_warn_function_return =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -7152,7 +7207,7 @@ struct gimple_opt_pass pass_warn_function_noreturn =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index ac7748ed513..931d030ee32 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -1,5 +1,6 @@
/* Lower complex number operations to scalar operations.
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -1605,7 +1606,7 @@ struct gimple_opt_pass pass_lower_complex =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1656,7 +1657,7 @@ struct gimple_opt_pass pass_lower_complex_O0 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 1738dd01266..1bd54cd99a3 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -88,26 +88,10 @@ find_referenced_vars (void)
FOR_EACH_BB (bb)
{
for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- size_t i;
- gimple stmt = gsi_stmt (si);
- for (i = 0; i < gimple_num_ops (stmt); i++)
- walk_tree (gimple_op_ptr (stmt, i), find_vars_r, NULL, NULL);
- }
+ find_referenced_vars_in (gsi_stmt (si));
for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple phi = gsi_stmt (si);
- size_t i, len = gimple_phi_num_args (phi);
-
- walk_tree (gimple_phi_result_ptr (phi), find_vars_r, NULL, NULL);
-
- for (i = 0; i < len; i++)
- {
- tree arg = gimple_phi_arg_def (phi, i);
- walk_tree (&arg, find_vars_r, NULL, NULL);
- }
- }
+ find_referenced_vars_in (gsi_stmt (si));
}
return 0;
@@ -498,6 +482,33 @@ find_vars_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
return NULL_TREE;
}
+/* Find referenced variables in STMT. In contrast with
+ find_new_referenced_vars, this function will not mark newly found
+ variables for renaming. */
+
+void
+find_referenced_vars_in (gimple stmt)
+{
+ size_t i;
+
+ if (gimple_code (stmt) != GIMPLE_PHI)
+ {
+ for (i = 0; i < gimple_num_ops (stmt); i++)
+ walk_tree (gimple_op_ptr (stmt, i), find_vars_r, NULL, NULL);
+ }
+ else
+ {
+ walk_tree (gimple_phi_result_ptr (stmt), find_vars_r, NULL, NULL);
+
+ for (i = 0; i < gimple_phi_num_args (stmt); i++)
+ {
+ tree arg = gimple_phi_arg_def (stmt, i);
+ walk_tree (&arg, find_vars_r, NULL, NULL);
+ }
+ }
+}
+
+
/* Lookup UID in the referenced_vars hashtable and return the associated
variable. */
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 7de8db8d321..536a111bb44 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -234,7 +234,7 @@ get_lineno (const_gimple stmt)
return -1;
loc = gimple_location (stmt);
- if (loc != UNKNOWN_LOCATION)
+ if (loc == UNKNOWN_LOCATION)
return -1;
return LOCATION_LINE (loc);
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index f2d7c5f7f93..d78baf45923 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -616,6 +616,7 @@ extern tree gimple_default_def (struct function *, tree);
extern bool stmt_references_abnormal_ssa_name (gimple);
extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *,
HOST_WIDE_INT *, HOST_WIDE_INT *);
+extern void find_referenced_vars_in (gimple);
/* In tree-phinodes.c */
extern void reserve_phi_args_for_new_edge (basic_block);
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 0e41d5fa679..f9b942a9520 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1,5 +1,6 @@
/* If-conversion for vectorizer.
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Devang Patel <dpatel@apple.com>
This file is part of GCC.
@@ -1162,7 +1163,7 @@ struct gimple_opt_pass pass_if_conversion =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 67f8fd87220..db1af2bd96b 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -1,5 +1,5 @@
/* Rewrite a program in Normal form into SSA.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
@@ -2272,7 +2272,7 @@ struct gimple_opt_pass pass_build_ssa =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_referenced_vars, /* properties_required */
PROP_ssa, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-iterator.c b/gcc/tree-iterator.c
index 53495ebae2a..43218f6b754 100644
--- a/gcc/tree-iterator.c
+++ b/gcc/tree-iterator.c
@@ -238,64 +238,6 @@ tsi_delink (tree_stmt_iterator *i)
i->ptr = next;
}
-/* Move all statements in the statement list after I to a new
- statement list. I itself is unchanged. */
-
-tree
-tsi_split_statement_list_after (const tree_stmt_iterator *i)
-{
- struct tree_statement_list_node *cur, *next;
- tree old_sl, new_sl;
-
- cur = i->ptr;
- /* How can we possibly split after the end, or before the beginning? */
- gcc_assert (cur);
- next = cur->next;
-
- old_sl = i->container;
- new_sl = alloc_stmt_list ();
- TREE_SIDE_EFFECTS (new_sl) = 1;
-
- STATEMENT_LIST_HEAD (new_sl) = next;
- STATEMENT_LIST_TAIL (new_sl) = STATEMENT_LIST_TAIL (old_sl);
- STATEMENT_LIST_TAIL (old_sl) = cur;
- cur->next = NULL;
- next->prev = NULL;
-
- return new_sl;
-}
-
-/* Move all statements in the statement list before I to a new
- statement list. I is set to the head of the new list. */
-
-tree
-tsi_split_statement_list_before (tree_stmt_iterator *i)
-{
- struct tree_statement_list_node *cur, *prev;
- tree old_sl, new_sl;
-
- cur = i->ptr;
- /* How can we possibly split after the end, or before the beginning? */
- gcc_assert (cur);
- prev = cur->prev;
-
- old_sl = i->container;
- new_sl = alloc_stmt_list ();
- TREE_SIDE_EFFECTS (new_sl) = 1;
- i->container = new_sl;
-
- STATEMENT_LIST_HEAD (new_sl) = cur;
- STATEMENT_LIST_TAIL (new_sl) = STATEMENT_LIST_TAIL (old_sl);
- STATEMENT_LIST_TAIL (old_sl) = prev;
- cur->prev = NULL;
- if (prev)
- prev->next = NULL;
- else
- STATEMENT_LIST_HEAD (old_sl) = NULL;
-
- return new_sl;
-}
-
/* Return the first expression in a sequence of COMPOUND_EXPRs,
or in a STATEMENT_LIST. */
@@ -320,19 +262,6 @@ expr_first (tree expr)
/* Return the last expression in a sequence of COMPOUND_EXPRs,
or in a STATEMENT_LIST. */
-#define EXPR_LAST_BODY do { \
- if (expr == NULL_TREE) \
- return expr;\
- if (TREE_CODE (expr) == STATEMENT_LIST) \
- { \
- struct tree_statement_list_node *n = STATEMENT_LIST_TAIL (expr); \
- return n ? n->stmt : NULL_TREE; \
- } \
- while (TREE_CODE (expr) == COMPOUND_EXPR) \
- expr = TREE_OPERAND (expr, 1); \
- return expr; \
-} while (0)
-
tree
expr_last (tree expr)
{
@@ -351,29 +280,4 @@ expr_last (tree expr)
return expr;
}
-/* If EXPR is a single statement return it. If EXPR is a
- STATEMENT_LIST containing exactly one statement S, return S.
- Otherwise, return NULL. */
-
-tree
-expr_only (tree expr)
-{
- if (expr == NULL_TREE)
- return NULL_TREE;
-
- if (TREE_CODE (expr) == STATEMENT_LIST)
- {
- struct tree_statement_list_node *n = STATEMENT_LIST_TAIL (expr);
- if (n && STATEMENT_LIST_HEAD (expr) == n)
- return n->stmt;
- else
- return NULL_TREE;
- }
-
- if (TREE_CODE (expr) == COMPOUND_EXPR)
- return NULL_TREE;
-
- return expr;
-}
-
#include "gt-tree-iterator.h"
diff --git a/gcc/tree-iterator.h b/gcc/tree-iterator.h
index 98f0cf80c49..c765bb5575d 100644
--- a/gcc/tree-iterator.h
+++ b/gcc/tree-iterator.h
@@ -113,9 +113,6 @@ extern void tsi_link_after (tree_stmt_iterator *, tree,
void tsi_delink (tree_stmt_iterator *);
-tree tsi_split_statement_list_after (const tree_stmt_iterator *);
-tree tsi_split_statement_list_before (tree_stmt_iterator *);
-
void append_to_statement_list (tree, tree *);
void append_to_statement_list_force (tree, tree *);
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 61762971c7c..a5c73165cb4 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -216,7 +216,7 @@ generate_loops_for_partition (struct loop *loop, bitmap partition, bool copy_p)
return true;
}
-/* Build size argument. */
+/* Build the size argument for a memset call. */
static inline tree
build_size_arg (tree nb_iter, tree op, gimple_seq* stmt_list)
@@ -224,8 +224,10 @@ build_size_arg (tree nb_iter, tree op, gimple_seq* stmt_list)
tree nb_bytes;
gimple_seq stmts = NULL;
- nb_bytes = fold_build2 (MULT_EXPR, TREE_TYPE (nb_iter),
- nb_iter, TYPE_SIZE_UNIT (TREE_TYPE (op)));
+ nb_bytes = fold_build2 (MULT_EXPR, size_type_node,
+ fold_convert (size_type_node, nb_iter),
+ fold_convert (size_type_node,
+ TYPE_SIZE_UNIT (TREE_TYPE (op))));
nb_bytes = force_gimple_operand (nb_bytes, &stmts, true, NULL);
gimple_seq_add_seq (stmt_list, stmts);
@@ -272,7 +274,8 @@ generate_memset_zero (gimple stmt, tree op0, tree nb_iter,
{
nb_bytes = build_size_arg (nb_iter, op0, &stmt_list);
addr_base = size_binop (PLUS_EXPR, DR_OFFSET (dr), DR_INIT (dr));
- addr_base = fold_build2 (MINUS_EXPR, sizetype, addr_base, nb_bytes);
+ addr_base = fold_build2 (MINUS_EXPR, sizetype, addr_base,
+ fold_convert (sizetype, nb_bytes));
addr_base = force_gimple_operand (addr_base, &stmts, true, NULL);
gimple_seq_add_seq (&stmt_list, stmts);
@@ -291,7 +294,7 @@ generate_memset_zero (gimple stmt, tree op0, tree nb_iter,
fn = build1 (ADDR_EXPR, build_pointer_type (fntype), fndecl);
if (!nb_bytes)
- nb_bytes = build_size_arg (nb_iter, op0, &stmt_list);
+ nb_bytes = build_size_arg (nb_iter, op0, &stmt_list);
fn_call = gimple_build_call (fn, 3, mem, integer_zero_node, nb_bytes);
gimple_seq_add_stmt (&stmt_list, fn_call);
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index dae12874dad..23cd169ae09 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -1,5 +1,5 @@
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
@@ -634,7 +634,7 @@ mf_build_check_statement_for (tree base, tree limit,
/* Build the conditional jump. 'cond' is just a temporary so we can
simply build a void COND_EXPR. We do need labels in both arms though. */
- g = gimple_build_cond (NE_EXPR, cond, integer_zero_node, NULL_TREE,
+ g = gimple_build_cond (NE_EXPR, cond, boolean_false_node, NULL_TREE,
NULL_TREE);
gimple_set_location (g, location);
gimple_seq_add_stmt (&seq, g);
@@ -664,9 +664,9 @@ mf_build_check_statement_for (tree base, tree limit,
/* u is a string, so it is already a gimple value. */
u = mf_file_function_line_tree (location);
/* NB: we pass the overall [base..limit] range to mf_check. */
- v = fold_build2 (PLUS_EXPR, integer_type_node,
+ v = fold_build2 (PLUS_EXPR, mf_uintptr_type,
fold_build2 (MINUS_EXPR, mf_uintptr_type, mf_limit, mf_base),
- integer_one_node);
+ build_int_cst (mf_uintptr_type, 1));
v = force_gimple_operand (v, &stmts, true, NULL_TREE);
gimple_seq_add_seq (&seq, stmts);
g = gimple_build_call (mf_check_fndecl, 4, mf_base, v, dirflag, u);
@@ -1346,7 +1346,7 @@ struct gimple_opt_pass pass_mudflap_1 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1365,7 +1365,7 @@ struct gimple_opt_pass pass_mudflap_2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_leh, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-nomudflap.c b/gcc/tree-nomudflap.c
index 3d1c7eb1d6e..5429e289c35 100644
--- a/gcc/tree-nomudflap.c
+++ b/gcc/tree-nomudflap.c
@@ -100,7 +100,7 @@ struct gimple_opt_pass pass_mudflap_1 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -119,7 +119,7 @@ struct gimple_opt_pass pass_mudflap_2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c
index 7e811cf8c9d..a82a3b01c68 100644
--- a/gcc/tree-nrv.c
+++ b/gcc/tree-nrv.c
@@ -1,5 +1,5 @@
/* Language independent return value optimizations
- Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -349,7 +349,7 @@ struct gimple_opt_pass pass_return_slot =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 7e346a9f55d..d99bc238576 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -1,5 +1,6 @@
/* __builtin_object_size (ptr, object_size_type) computation
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>
This file is part of GCC.
@@ -1111,7 +1112,7 @@ struct gimple_opt_pass pass_object_sizes =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index d69fd2949df..666b31bd844 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -1,5 +1,5 @@
/* Top-level control of tree optimizations.
- Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
@@ -72,7 +72,7 @@ struct gimple_opt_pass pass_all_optimizations =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -100,7 +100,7 @@ struct simple_ipa_opt_pass pass_early_local_passes =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -141,7 +141,7 @@ struct gimple_opt_pass pass_all_early_optimizations =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -172,7 +172,7 @@ struct gimple_opt_pass pass_cleanup_cfg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -207,7 +207,7 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -241,7 +241,7 @@ struct gimple_opt_pass pass_free_datastructures =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -270,7 +270,7 @@ struct gimple_opt_pass pass_free_cfg_annotations =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -341,7 +341,7 @@ struct gimple_opt_pass pass_fixup_cfg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -371,7 +371,7 @@ struct gimple_opt_pass pass_init_datastructures =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 07e4247ec8e..f0ae58a0414 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_PASS_H
#define GCC_TREE_PASS_H 1
-/* In tree-dump.c */
+#include "timevar.h"
/* Different tree dump places. When you add new tree dump places,
extend the DUMP_FILES array in tree-dump.c. */
@@ -75,6 +75,7 @@ enum tree_dump_index
dumper to print stmts. */
#define TDF_RHS_ONLY (1 << 17) /* a flag to only print the RHS of
a gimple stmt. */
+/* In tree-dump.c */
extern char *get_dump_file_name (enum tree_dump_index);
extern int dump_enabled_p (enum tree_dump_index);
@@ -128,7 +129,7 @@ struct opt_pass
/* The timevar id associated with this pass. */
/* ??? Ideally would be dynamically assigned. */
- unsigned int tv_id;
+ timevar_id_t tv_id;
/* Sets of properties input and output from this pass. */
unsigned int properties_required;
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index a497ca794f5..c8cbe1d4351 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -488,6 +488,7 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
case TREE_BINFO:
dump_generic_node (buffer, BINFO_TYPE (node), spc, flags, false);
+ break;
case TREE_VEC:
{
@@ -551,8 +552,7 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
else if (TREE_CODE (node) == VECTOR_TYPE)
{
pp_string (buffer, "vector ");
- dump_generic_node (buffer, TREE_TYPE (node),
- spc, flags, false);
+ dump_generic_node (buffer, TREE_TYPE (node), spc, flags, false);
}
else if (TREE_CODE (node) == INTEGER_TYPE)
{
@@ -562,6 +562,24 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
pp_decimal_int (buffer, TYPE_PRECISION (node));
pp_string (buffer, ">");
}
+ else if (TREE_CODE (node) == COMPLEX_TYPE)
+ {
+ pp_string (buffer, "__complex__ ");
+ dump_generic_node (buffer, TREE_TYPE (node), spc, flags, false);
+ }
+ else if (TREE_CODE (node) == REAL_TYPE)
+ {
+ pp_string (buffer, "<float:");
+ pp_decimal_int (buffer, TYPE_PRECISION (node));
+ pp_string (buffer, ">");
+ }
+ else if (TREE_CODE (node) == FIXED_POINT_TYPE)
+ {
+ pp_string (buffer, "<fixed-point-");
+ pp_string (buffer, TYPE_SATURATING (node) ? "sat:" : "nonsat:");
+ pp_decimal_int (buffer, TYPE_PRECISION (node));
+ pp_string (buffer, ">");
+ }
else
pp_string (buffer, "<unnamed type>");
}
@@ -572,7 +590,12 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
case REFERENCE_TYPE:
str = (TREE_CODE (node) == POINTER_TYPE ? "*" : "&");
- if (TREE_CODE (TREE_TYPE (node)) == FUNCTION_TYPE)
+ if (TREE_TYPE (node) == NULL)
+ {
+ pp_string (buffer, str);
+ pp_string (buffer, "<null type>");
+ }
+ else if (TREE_CODE (TREE_TYPE (node)) == FUNCTION_TYPE)
{
tree fnode = TREE_TYPE (node);
@@ -612,11 +635,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
NIY;
break;
- case METHOD_TYPE:
- dump_decl_name (buffer, TYPE_NAME (TYPE_METHOD_BASETYPE (node)), flags);
- pp_string (buffer, "::");
- break;
-
case TARGET_MEM_REF:
{
const char *sep = "";
@@ -710,7 +728,12 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
if (TYPE_NAME (node))
dump_generic_node (buffer, TYPE_NAME (node), spc, flags, false);
- else
+ else if (!(flags & TDF_SLIM))
+ /* FIXME: If we eliminate the 'else' above and attempt
+ to show the fields for named types, we may get stuck
+ following a cycle of pointers to structs. The alleged
+ self-reference check in print_struct_decl will not detect
+ cycles involving more than one pointer or struct type. */
print_struct_decl (buffer, node, spc, flags);
break;
}
@@ -836,6 +859,23 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
break;
case FUNCTION_TYPE:
+ case METHOD_TYPE:
+ dump_generic_node (buffer, TREE_TYPE (node), spc, flags, false);
+ pp_space (buffer);
+ if (TREE_CODE (node) == METHOD_TYPE)
+ {
+ if (TYPE_METHOD_BASETYPE (node))
+ dump_decl_name (buffer, TYPE_NAME (TYPE_METHOD_BASETYPE (node)),
+ flags);
+ else
+ pp_string (buffer, "<null method basetype>");
+ pp_string (buffer, "::");
+ }
+ if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node)))
+ dump_decl_name (buffer, TYPE_NAME (node), flags);
+ else
+ pp_printf (buffer, "<T%x>", TYPE_UID (node));
+ dump_function_declaration (buffer, node, spc, flags);
break;
case FUNCTION_DECL:
@@ -2206,8 +2246,8 @@ print_struct_decl (pretty_printer *buffer, const_tree node, int spc, int flags)
Maybe this could be solved by looking at the scope in which the
structure was declared. */
if (TREE_TYPE (tmp) != node
- || (TREE_CODE (TREE_TYPE (tmp)) == POINTER_TYPE
- && TREE_TYPE (TREE_TYPE (tmp)) != node))
+ && (TREE_CODE (TREE_TYPE (tmp)) != POINTER_TYPE
+ || TREE_TYPE (TREE_TYPE (tmp)) != node))
{
print_declaration (buffer, tmp, spc+2, flags);
pp_newline (buffer);
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 06f113bea09..8ffedf1823e 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -208,6 +208,8 @@ static tree
prepare_instrumented_value (gimple_stmt_iterator *gsi, histogram_value value)
{
tree val = value->hvalue.value;
+ if (POINTER_TYPE_P (TREE_TYPE (val)))
+ val = fold_convert (sizetype, val);
return force_gimple_operand_gsi (gsi, fold_convert (gcov_type_node, val),
true, NULL_TREE, true, GSI_SAME_STMT);
}
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index b9cd54732b9..8982280fb2c 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -670,16 +670,6 @@ refs_may_alias_p_1 (tree ref1, tree ref2)
|| INDIRECT_REF_P (ref2)
|| TREE_CODE (ref2) == TARGET_MEM_REF));
- /* Defer to TBAA if possible. */
- if (flag_strict_aliasing
- && !alias_sets_conflict_p (get_alias_set (ref1), get_alias_set (ref2)))
- return false;
-
- /* If one reference is a TARGET_MEM_REF weird things are allowed. */
- if (TREE_CODE (ref1) == TARGET_MEM_REF
- || TREE_CODE (ref2) == TARGET_MEM_REF)
- return true;
-
/* Decompose the references into their base objects and the access. */
base1 = get_ref_base_and_extent (ref1, &offset1, &size1, &max_size1);
base2 = get_ref_base_and_extent (ref2, &offset2, &size2, &max_size2);
@@ -693,14 +683,32 @@ refs_may_alias_p_1 (tree ref1, tree ref2)
|| is_gimple_min_invariant (base2))
return false;
+ /* Defer to simple offset based disambiguation if we have
+ references based on two decls. Do this before defering to
+ TBAA to handle must-alias cases in conformance with the
+ GCC extension of allowing type-punning through unions. */
var1_p = SSA_VAR_P (base1);
var2_p = SSA_VAR_P (base2);
- ind1_p = INDIRECT_REF_P (base1);
- ind2_p = INDIRECT_REF_P (base2);
if (var1_p && var2_p)
return decl_refs_may_alias_p (base1, offset1, max_size1,
base2, offset2, max_size2);
- else if (var1_p && ind2_p)
+
+ /* First defer to TBAA if possible. */
+ if (flag_strict_aliasing
+ && !alias_sets_conflict_p (get_alias_set (ref1), get_alias_set (ref2)))
+ return false;
+
+ /* If one reference is a TARGET_MEM_REF weird things are allowed. Still
+ TBAA disambiguation based on the access type is possible, so bail
+ out only after that check. */
+ if (TREE_CODE (ref1) == TARGET_MEM_REF
+ || TREE_CODE (ref2) == TARGET_MEM_REF)
+ return true;
+
+ /* Dispatch to the pointer-vs-decl or pointer-vs-pointer disambiguators. */
+ ind1_p = INDIRECT_REF_P (base1);
+ ind2_p = INDIRECT_REF_P (base2);
+ if (var1_p && ind2_p)
return indirect_ref_may_alias_decl_p (ref2, TREE_OPERAND (base2, 0),
offset2, max_size2, -1,
ref1, base1,
@@ -737,7 +745,7 @@ refs_may_alias_p (tree ref1, tree ref2)
static bool
ref_maybe_used_by_call_p_1 (gimple call, tree ref)
{
- tree base, fndecl;
+ tree base;
unsigned i;
int flags = gimple_call_flags (call);
@@ -758,14 +766,8 @@ ref_maybe_used_by_call_p_1 (gimple call, tree ref)
cannot possibly use it. */
if (DECL_P (base)
&& !may_be_aliased (base)
- /* But local statics can be used through recursion! */
- && (!is_global_var (base)
- /* But not via builtins.
- ??? We just assume that this is true if we are not a
- builtin function ourself. */
- || (!DECL_BUILT_IN (cfun->decl)
- && (fndecl = gimple_call_fndecl (call))
- && DECL_BUILT_IN (fndecl))))
+ /* But local statics can be used through recursion. */
+ && !is_global_var (base))
goto process_args;
/* Check if base is a global static variable that is not read
@@ -865,7 +867,7 @@ ref_maybe_used_by_stmt_p (gimple stmt, tree ref)
static bool
call_may_clobber_ref_p_1 (gimple call, tree ref)
{
- tree fndecl, base;
+ tree base;
/* If the call is pure or const it cannot clobber anything. */
if (gimple_call_flags (call)
@@ -884,15 +886,11 @@ call_may_clobber_ref_p_1 (gimple call, tree ref)
cannot possibly clobber it. */
if (DECL_P (base)
&& !may_be_aliased (base)
- /* But local non-readonly statics can be modified through recursion! */
+ /* But local non-readonly statics can be modified through recursion
+ or the call may implement a threading barrier which we must
+ treat as may-def. */
&& (TREE_READONLY (base)
- || !is_global_var (base)
- /* But not via builtins.
- ??? We just assume that this is true if we are not a
- builtin function ourself. */
- || (!DECL_BUILT_IN (cfun->decl)
- && (fndecl = gimple_call_fndecl (call))
- && DECL_BUILT_IN (fndecl))))
+ || !is_global_var (base)))
return false;
/* Check if base is a global static variable that is not written
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 226fd3dbb27..9cf2f83546b 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -228,6 +228,8 @@ typedef enum
doing the store). */
static prop_value_t *const_val;
+static void canonicalize_float_value (prop_value_t *);
+
/* Dump constant propagation value VAL to file OUTF prefixed by PREFIX. */
static void
@@ -387,6 +389,8 @@ get_value (tree var)
if (val->lattice_val == UNINITIALIZED)
*val = get_default_value (var);
+ canonicalize_float_value (val);
+
return val;
}
@@ -1612,7 +1616,7 @@ struct gimple_opt_pass pass_ccp =
};
-/* A subroutine of fold_stmt_r. Attempts to fold *(A+O) to A[X].
+/* A subroutine of fold_stmt. Attempts to fold *(A+O) to A[X].
BASE is an array type. OFFSET is a byte displacement. ORIG_TYPE
is the desired result type. */
@@ -1997,7 +2001,7 @@ maybe_fold_offset_to_address (tree addr, tree offset, tree orig_type)
return NULL_TREE;
}
-/* A subroutine of fold_stmt_r. Attempt to simplify *(BASE+OFFSET).
+/* A subroutine of fold_stmt. Attempt to simplify *(BASE+OFFSET).
Return the simplified expression, or NULL if nothing could be done. */
static tree
@@ -2216,180 +2220,64 @@ maybe_fold_stmt_addition (tree res_type, tree op0, tree op1)
return t;
}
-/* For passing state through walk_tree into fold_stmt_r and its
- children. */
-
-struct fold_stmt_r_data
-{
- gimple stmt;
- bool *changed_p;
- bool *inside_addr_expr_p;
-};
-
-/* Subroutine of fold_stmt called via walk_tree. We perform several
- simplifications of EXPR_P, mostly having to do with pointer arithmetic. */
+/* Subroutine of fold_stmt. We perform several simplifications of the
+ memory reference tree EXPR and make sure to re-gimplify them properly
+ after propagation of constant addresses. IS_LHS is true if the
+ reference is supposed to be an lvalue. */
static tree
-fold_stmt_r (tree *expr_p, int *walk_subtrees, void *data)
+maybe_fold_reference (tree expr, bool is_lhs)
{
- struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct fold_stmt_r_data *fold_stmt_r_data;
- bool *inside_addr_expr_p;
- bool *changed_p;
- tree expr = *expr_p, t;
- bool volatile_p = TREE_THIS_VOLATILE (expr);
+ tree *t = &expr;
- fold_stmt_r_data = (struct fold_stmt_r_data *) wi->info;
- inside_addr_expr_p = fold_stmt_r_data->inside_addr_expr_p;
- changed_p = fold_stmt_r_data->changed_p;
+ if (TREE_CODE (expr) == ARRAY_REF
+ && !is_lhs)
+ {
+ tree tem = fold_read_from_constant_string (expr);
+ if (tem)
+ return tem;
+ }
- /* ??? It'd be nice if walk_tree had a pre-order option. */
- switch (TREE_CODE (expr))
+ /* ??? We might want to open-code the relevant remaining cases
+ to avoid using the generic fold. */
+ if (handled_component_p (*t)
+ && CONSTANT_CLASS_P (TREE_OPERAND (*t, 0)))
{
- case INDIRECT_REF:
- t = walk_tree (&TREE_OPERAND (expr, 0), fold_stmt_r, data, NULL);
- if (t)
- return t;
- *walk_subtrees = 0;
+ tree tem = fold (*t);
+ if (tem != *t)
+ return tem;
+ }
- t = maybe_fold_stmt_indirect (expr, TREE_OPERAND (expr, 0),
- integer_zero_node);
+ while (handled_component_p (*t))
+ t = &TREE_OPERAND (*t, 0);
+
+ if (TREE_CODE (*t) == INDIRECT_REF)
+ {
+ tree tem = maybe_fold_stmt_indirect (*t, TREE_OPERAND (*t, 0),
+ integer_zero_node);
/* Avoid folding *"abc" = 5 into 'a' = 5. */
- if (wi->is_lhs && t && TREE_CODE (t) == INTEGER_CST)
- t = NULL_TREE;
- if (!t
- && TREE_CODE (TREE_OPERAND (expr, 0)) == ADDR_EXPR)
+ if (is_lhs && tem && CONSTANT_CLASS_P (tem))
+ tem = NULL_TREE;
+ if (!tem
+ && TREE_CODE (TREE_OPERAND (*t, 0)) == ADDR_EXPR)
/* If we had a good reason for propagating the address here,
make sure we end up with valid gimple. See PR34989. */
- t = TREE_OPERAND (TREE_OPERAND (expr, 0), 0);
- break;
-
- case NOP_EXPR:
- t = walk_tree (&TREE_OPERAND (expr, 0), fold_stmt_r, data, NULL);
- if (t)
- return t;
- *walk_subtrees = 0;
-
- if (POINTER_TYPE_P (TREE_TYPE (expr))
- && POINTER_TYPE_P (TREE_TYPE (TREE_TYPE (expr)))
- && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 0)))
- && (t = maybe_fold_offset_to_address (TREE_OPERAND (expr, 0),
- integer_zero_node,
- TREE_TYPE (TREE_TYPE (expr)))))
- return t;
- break;
-
- /* ??? Could handle more ARRAY_REFs here, as a variant of INDIRECT_REF.
- We'd only want to bother decomposing an existing ARRAY_REF if
- the base array is found to have another offset contained within.
- Otherwise we'd be wasting time. */
- case ARRAY_REF:
- /* If we are not processing expressions found within an
- ADDR_EXPR, then we can fold constant array references.
- Don't fold on LHS either, to avoid folding "abc"[0] = 5
- into 'a' = 5. */
- if (!*inside_addr_expr_p && !wi->is_lhs)
- t = fold_read_from_constant_string (expr);
- else
- t = NULL;
- break;
-
- case ADDR_EXPR:
- *inside_addr_expr_p = true;
- t = walk_tree (&TREE_OPERAND (expr, 0), fold_stmt_r, data, NULL);
- *inside_addr_expr_p = false;
- if (t)
- return t;
- *walk_subtrees = 0;
-
- /* Make sure the value is properly considered constant, and so gets
- propagated as expected. */
- if (*changed_p)
- recompute_tree_invariant_for_addr_expr (expr);
- return NULL_TREE;
-
- case COMPONENT_REF:
- t = walk_tree (&TREE_OPERAND (expr, 0), fold_stmt_r, data, NULL);
- if (t)
- return t;
- *walk_subtrees = 0;
-
- /* Make sure the FIELD_DECL is actually a field in the type on the lhs.
- We've already checked that the records are compatible, so we should
- come up with a set of compatible fields. */
- {
- tree expr_record = TREE_TYPE (TREE_OPERAND (expr, 0));
- tree expr_field = TREE_OPERAND (expr, 1);
-
- if (DECL_FIELD_CONTEXT (expr_field) != TYPE_MAIN_VARIANT (expr_record))
- {
- expr_field = find_compatible_field (expr_record, expr_field);
- TREE_OPERAND (expr, 1) = expr_field;
- }
- }
- break;
+ tem = TREE_OPERAND (TREE_OPERAND (*t, 0), 0);
- case TARGET_MEM_REF:
- t = maybe_fold_tmr (expr);
- break;
-
- case POINTER_PLUS_EXPR:
- t = walk_tree (&TREE_OPERAND (expr, 0), fold_stmt_r, data, NULL);
- if (t)
- return t;
- t = walk_tree (&TREE_OPERAND (expr, 1), fold_stmt_r, data, NULL);
- if (t)
- return t;
- *walk_subtrees = 0;
-
- t = maybe_fold_stmt_addition (TREE_TYPE (expr),
- TREE_OPERAND (expr, 0),
- TREE_OPERAND (expr, 1));
- break;
-
- case COND_EXPR:
- if (COMPARISON_CLASS_P (TREE_OPERAND (expr, 0)))
- {
- tree op0 = TREE_OPERAND (expr, 0);
- tree tem;
- bool set;
-
- fold_defer_overflow_warnings ();
- tem = fold_binary (TREE_CODE (op0), TREE_TYPE (op0),
- TREE_OPERAND (op0, 0),
- TREE_OPERAND (op0, 1));
- /* This is actually a conditional expression, not a GIMPLE
- conditional statement, however, the valid_gimple_rhs_p
- test still applies. */
- set = tem && is_gimple_condexpr (tem) && valid_gimple_rhs_p (tem);
- fold_undefer_overflow_warnings (set, fold_stmt_r_data->stmt, 0);
- if (set)
- {
- COND_EXPR_COND (expr) = tem;
- t = expr;
- break;
- }
- }
- return NULL_TREE;
-
- default:
- return NULL_TREE;
- }
-
- if (t)
- {
- /* Preserve volatileness of the original expression.
- We can end up with a plain decl here which is shared
- and we shouldn't mess with its flags. */
- if (!SSA_VAR_P (t))
- TREE_THIS_VOLATILE (t) = volatile_p;
- *expr_p = t;
- *changed_p = true;
+ if (tem)
+ {
+ *t = tem;
+ tem = maybe_fold_reference (expr, is_lhs);
+ if (tem)
+ return tem;
+ return expr;
+ }
}
return NULL_TREE;
}
+
/* Return the string length, maximum string length or maximum value of
ARG in LENGTH.
If ARG is an SSA name variable, follow its use-def chains. If LENGTH
@@ -2709,23 +2597,61 @@ fold_gimple_assign (gimple_stmt_iterator *si)
gimple stmt = gsi_stmt (*si);
enum tree_code subcode = gimple_assign_rhs_code (stmt);
- tree result = NULL;
+ tree result = NULL_TREE;
switch (get_gimple_rhs_class (subcode))
{
case GIMPLE_SINGLE_RHS:
{
tree rhs = gimple_assign_rhs1 (stmt);
-
+
/* Try to fold a conditional expression. */
if (TREE_CODE (rhs) == COND_EXPR)
{
- tree temp = fold (COND_EXPR_COND (rhs));
- if (temp != COND_EXPR_COND (rhs))
- result = fold_build3 (COND_EXPR, TREE_TYPE (rhs), temp,
- COND_EXPR_THEN (rhs), COND_EXPR_ELSE (rhs));
+ tree op0 = COND_EXPR_COND (rhs);
+ tree tem;
+ bool set = false;
+
+ if (COMPARISON_CLASS_P (op0))
+ {
+ fold_defer_overflow_warnings ();
+ tem = fold_binary (TREE_CODE (op0), TREE_TYPE (op0),
+ TREE_OPERAND (op0, 0),
+ TREE_OPERAND (op0, 1));
+ /* This is actually a conditional expression, not a GIMPLE
+ conditional statement, however, the valid_gimple_rhs_p
+ test still applies. */
+ set = (tem && is_gimple_condexpr (tem)
+ && valid_gimple_rhs_p (tem));
+ fold_undefer_overflow_warnings (set, stmt, 0);
+ }
+ else if (is_gimple_min_invariant (op0))
+ {
+ tem = op0;
+ set = true;
+ }
+ else
+ return NULL_TREE;
+
+ if (set)
+ result = fold_build3 (COND_EXPR, TREE_TYPE (rhs), tem,
+ COND_EXPR_THEN (rhs), COND_EXPR_ELSE (rhs));
}
+ else if (TREE_CODE (rhs) == TARGET_MEM_REF)
+ return maybe_fold_tmr (rhs);
+
+ else if (REFERENCE_CLASS_P (rhs))
+ return maybe_fold_reference (rhs, false);
+
+ else if (TREE_CODE (rhs) == ADDR_EXPR)
+ {
+ tree tem = maybe_fold_reference (TREE_OPERAND (rhs, 0), true);
+ if (tem)
+ result = fold_convert (TREE_TYPE (rhs),
+ build_fold_addr_expr (tem));
+ }
+
/* If we couldn't fold the RHS, hand over to the generic
fold routines. */
if (result == NULL_TREE)
@@ -2738,11 +2664,8 @@ fold_gimple_assign (gimple_stmt_iterator *si)
if (result != rhs && valid_gimple_rhs_p (result))
return result;
- else
- /* It is possible that fold_stmt_r simplified the RHS.
- Make sure that the subcode of this statement still
- reflects the principal operator of the rhs operand. */
- return rhs;
+
+ return NULL_TREE;
}
break;
@@ -2913,125 +2836,130 @@ fold_gimple_call (gimple_stmt_iterator *gsi)
return false;
}
-/* Fold the statement pointed to by GSI. In some cases, this function may
- replace the whole statement with a new one. Returns true iff folding
- makes any changes. */
+/* Worker for both fold_stmt and fold_stmt_inplace. The INPLACE argument
+ distinguishes both cases. */
-bool
-fold_stmt (gimple_stmt_iterator *gsi)
+static bool
+fold_stmt_1 (gimple_stmt_iterator *gsi, bool inplace)
{
- tree res;
- struct fold_stmt_r_data fold_stmt_r_data;
- struct walk_stmt_info wi;
-
bool changed = false;
- bool inside_addr_expr = false;
-
gimple stmt = gsi_stmt (*gsi);
-
- fold_stmt_r_data.stmt = stmt;
- fold_stmt_r_data.changed_p = &changed;
- fold_stmt_r_data.inside_addr_expr_p = &inside_addr_expr;
-
- memset (&wi, 0, sizeof (wi));
- wi.info = &fold_stmt_r_data;
-
- /* Fold the individual operands.
- For example, fold instances of *&VAR into VAR, etc. */
- res = walk_gimple_op (stmt, fold_stmt_r, &wi);
- gcc_assert (!res);
+ unsigned i;
/* Fold the main computation performed by the statement. */
switch (gimple_code (stmt))
{
case GIMPLE_ASSIGN:
{
+ unsigned old_num_ops = gimple_num_ops (stmt);
tree new_rhs = fold_gimple_assign (gsi);
- if (new_rhs != NULL_TREE)
+ if (new_rhs != NULL_TREE
+ && (!inplace
+ || get_gimple_rhs_num_ops (TREE_CODE (new_rhs)) < old_num_ops))
{
gimple_assign_set_rhs_from_tree (gsi, new_rhs);
changed = true;
}
- stmt = gsi_stmt (*gsi);
break;
}
+
case GIMPLE_COND:
changed |= fold_gimple_cond (stmt);
break;
+
case GIMPLE_CALL:
+ /* Fold *& in call arguments. */
+ for (i = 0; i < gimple_call_num_args (stmt); ++i)
+ if (REFERENCE_CLASS_P (gimple_call_arg (stmt, i)))
+ {
+ tree tmp = maybe_fold_reference (gimple_call_arg (stmt, i), false);
+ if (tmp)
+ {
+ gimple_call_set_arg (stmt, i, tmp);
+ changed = true;
+ }
+ }
/* The entire statement may be replaced in this case. */
- changed |= fold_gimple_call (gsi);
+ if (!inplace)
+ changed |= fold_gimple_call (gsi);
break;
- default:
- return changed;
+ case GIMPLE_ASM:
+ /* Fold *& in asm operands. */
+ for (i = 0; i < gimple_asm_noutputs (stmt); ++i)
+ {
+ tree link = gimple_asm_output_op (stmt, i);
+ tree op = TREE_VALUE (link);
+ if (REFERENCE_CLASS_P (op)
+ && (op = maybe_fold_reference (op, true)) != NULL_TREE)
+ {
+ TREE_VALUE (link) = op;
+ changed = true;
+ }
+ }
+ for (i = 0; i < gimple_asm_ninputs (stmt); ++i)
+ {
+ tree link = gimple_asm_input_op (stmt, i);
+ tree op = TREE_VALUE (link);
+ if (REFERENCE_CLASS_P (op)
+ && (op = maybe_fold_reference (op, false)) != NULL_TREE)
+ {
+ TREE_VALUE (link) = op;
+ changed = true;
+ }
+ }
break;
+
+ default:;
+ }
+
+ stmt = gsi_stmt (*gsi);
+
+ /* Fold *& on the lhs. */
+ if (gimple_has_lhs (stmt))
+ {
+ tree lhs = gimple_get_lhs (stmt);
+ if (lhs && REFERENCE_CLASS_P (lhs))
+ {
+ tree new_lhs = maybe_fold_reference (lhs, true);
+ if (new_lhs)
+ {
+ gimple_set_lhs (stmt, new_lhs);
+ changed = true;
+ }
+ }
}
return changed;
}
+/* Fold the statement pointed to by GSI. In some cases, this function may
+ replace the whole statement with a new one. Returns true iff folding
+ makes any changes.
+ The statement pointed to by GSI should be in valid gimple form but may
+ be in unfolded state as resulting from for example constant propagation
+ which can produce *&x = 0. */
+
+bool
+fold_stmt (gimple_stmt_iterator *gsi)
+{
+ return fold_stmt_1 (gsi, false);
+}
+
/* Perform the minimal folding on statement STMT. Only operations like
*&x created by constant propagation are handled. The statement cannot
be replaced with a new one. Return true if the statement was
- changed, false otherwise. */
+ changed, false otherwise.
+ The statement STMT should be in valid gimple form but may
+ be in unfolded state as resulting from for example constant propagation
+ which can produce *&x = 0. */
bool
fold_stmt_inplace (gimple stmt)
{
- tree res;
- struct fold_stmt_r_data fold_stmt_r_data;
- struct walk_stmt_info wi;
- gimple_stmt_iterator si;
-
- bool changed = false;
- bool inside_addr_expr = false;
-
- fold_stmt_r_data.stmt = stmt;
- fold_stmt_r_data.changed_p = &changed;
- fold_stmt_r_data.inside_addr_expr_p = &inside_addr_expr;
-
- memset (&wi, 0, sizeof (wi));
- wi.info = &fold_stmt_r_data;
-
- /* Fold the individual operands.
- For example, fold instances of *&VAR into VAR, etc.
-
- It appears that, at one time, maybe_fold_stmt_indirect
- would cause the walk to return non-null in order to
- signal that the entire statement should be replaced with
- a call to _builtin_trap. This functionality is currently
- disabled, as noted in a FIXME, and cannot be supported here. */
- res = walk_gimple_op (stmt, fold_stmt_r, &wi);
- gcc_assert (!res);
-
- /* Fold the main computation performed by the statement. */
- switch (gimple_code (stmt))
- {
- case GIMPLE_ASSIGN:
- {
- unsigned old_num_ops;
- tree new_rhs;
- old_num_ops = gimple_num_ops (stmt);
- si = gsi_for_stmt (stmt);
- new_rhs = fold_gimple_assign (&si);
- if (new_rhs != NULL_TREE
- && get_gimple_rhs_num_ops (TREE_CODE (new_rhs)) < old_num_ops)
- {
- gimple_assign_set_rhs_from_tree (&si, new_rhs);
- changed = true;
- }
- gcc_assert (gsi_stmt (si) == stmt);
- break;
- }
- case GIMPLE_COND:
- changed |= fold_gimple_cond (stmt);
- break;
-
- default:
- break;
- }
-
+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+ bool changed = fold_stmt_1 (&gsi, true);
+ gcc_assert (gsi_stmt (gsi) == stmt);
return changed;
}
@@ -3377,7 +3305,7 @@ struct gimple_opt_pass pass_fold_builtins =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index e2909e8033f..1a851fa6770 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -1915,26 +1915,6 @@ eliminate_redundant_computations (gimple_stmt_iterator* gsi)
return retval;
}
-/* Return true if statement GS is an assignment that peforms a useless
- type conversion. It is is intended to be a tuples analog of function
- tree_ssa_useless_type_conversion. */
-
-static bool
-gimple_assign_unary_useless_conversion_p (gimple gs)
-{
- if (is_gimple_assign (gs)
- && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (gs))
- || gimple_assign_rhs_code (gs) == VIEW_CONVERT_EXPR
- || gimple_assign_rhs_code (gs) == NON_LVALUE_EXPR))
- {
- tree lhs_type = TREE_TYPE (gimple_assign_lhs (gs));
- tree rhs_type = TREE_TYPE (gimple_assign_rhs1 (gs));
- return useless_type_conversion_p (lhs_type, rhs_type);
- }
-
- return false;
-}
-
/* STMT, a GIMPLE_ASSIGN, may create certain equivalences, in either
the available expressions table or the const_and_copies table.
Detect and record those equivalences. */
@@ -1953,14 +1933,10 @@ record_equivalences_from_stmt (gimple stmt, int may_optimize_p)
lhs_code = TREE_CODE (lhs);
if (lhs_code == SSA_NAME
- && (gimple_assign_single_p (stmt)
- || gimple_assign_unary_useless_conversion_p (stmt)))
+ && gimple_assign_single_p (stmt))
{
tree rhs = gimple_assign_rhs1 (stmt);
- /* Strip away any useless type conversions. */
- STRIP_USELESS_TYPE_CONVERSION (rhs);
-
/* If the RHS of the assignment is a constant or another variable that
may be propagated, register it in the CONST_AND_COPIES table. We
do not need to record unwind data for this, since this is a true
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index f75e0afa73f..c596e8b7541 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -186,8 +186,7 @@ get_prop_dest_stmt (tree name, tree *final_name_p)
return NULL;
/* If this is not a trivial copy, we found it. */
- if (!gimple_assign_copy_p (use_stmt)
- || TREE_CODE (gimple_assign_lhs (use_stmt)) != SSA_NAME
+ if (!gimple_assign_ssa_name_copy_p (use_stmt)
|| gimple_assign_rhs1 (use_stmt) != name)
break;
@@ -225,12 +224,11 @@ get_prop_source_stmt (tree name, bool single_use_only, bool *single_use_p)
}
/* If name is defined by a PHI node or is the default def, bail out. */
- if (gimple_code (def_stmt) != GIMPLE_ASSIGN)
+ if (!is_gimple_assign (def_stmt))
return NULL;
- /* If name is not a simple copy destination, we found it. */
- if (!gimple_assign_copy_p (def_stmt)
- || TREE_CODE (gimple_assign_rhs1 (def_stmt)) != SSA_NAME)
+ /* If def_stmt is not a simple copy, we possibly found it. */
+ if (!gimple_assign_ssa_name_copy_p (def_stmt))
{
tree rhs;
@@ -266,6 +264,7 @@ can_propagate_from (gimple def_stmt)
ssa_op_iter iter;
gcc_assert (is_gimple_assign (def_stmt));
+
/* If the rhs has side-effects we cannot propagate from it. */
if (gimple_has_volatile_ops (def_stmt))
return false;
@@ -276,8 +275,8 @@ can_propagate_from (gimple def_stmt)
return false;
/* Constants can be always propagated. */
- if (is_gimple_min_invariant
- (rhs_to_tree (TREE_TYPE (gimple_assign_lhs (def_stmt)), def_stmt)))
+ if (gimple_assign_single_p (def_stmt)
+ && is_gimple_min_invariant (gimple_assign_rhs1 (def_stmt)))
return true;
/* We cannot propagate ssa names that occur in abnormal phi nodes. */
@@ -289,14 +288,14 @@ can_propagate_from (gimple def_stmt)
then we can not apply optimizations as some targets require
function pointers to be canonicalized and in this case this
optimization could eliminate a necessary canonicalization. */
- if (is_gimple_assign (def_stmt)
- && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt))))
+ if (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt)))
{
tree rhs = gimple_assign_rhs1 (def_stmt);
if (POINTER_TYPE_P (TREE_TYPE (rhs))
&& TREE_CODE (TREE_TYPE (TREE_TYPE (rhs))) == FUNCTION_TYPE)
return false;
}
+
return true;
}
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index fa247458e92..5f3b9d86cc5 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -595,6 +595,8 @@ remove_unused_scope_block_p (tree scope)
/* Verfify that only blocks with source location set
are entry points to the inlined functions. */
gcc_assert (BLOCK_SOURCE_LOCATION (scope) == UNKNOWN_LOCATION);
+
+ TREE_USED (scope) = !unused;
return unused;
}
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index c568cf0e53a..8d08aa7709f 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -1,5 +1,5 @@
/* Global, SSA-based optimizations using mathematical identities.
- Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -564,7 +564,7 @@ struct gimple_opt_pass pass_cse_reciprocals =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -778,7 +778,7 @@ struct gimple_opt_pass pass_cse_sincos =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -870,7 +870,7 @@ struct gimple_opt_pass pass_convert_to_rsqrt =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index c9473a8f9b1..7d588f8eb96 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -686,10 +686,13 @@ add_stmt_operand (tree *var_p, gimple stmt, int flags)
add_virtual_operand (stmt, flags);
}
-/* Add the base address of REF to SET. */
+/* Mark the base address of REF as having its address taken.
+ REF may be a single variable whose address has been taken or any
+ other valid GIMPLE memory reference (structure reference, array,
+ etc). */
static void
-add_to_addressable_set (tree ref, bitmap *set)
+mark_address_taken (tree ref)
{
tree var;
@@ -699,27 +702,8 @@ add_to_addressable_set (tree ref, bitmap *set)
be referenced using pointer arithmetic. See PR 21407 and the
ensuing mailing list discussion. */
var = get_base_address (ref);
- if (var && SSA_VAR_P (var))
- {
- if (*set == NULL)
- *set = BITMAP_ALLOC (&operands_bitmap_obstack);
-
- bitmap_set_bit (*set, DECL_UID (var));
- TREE_ADDRESSABLE (var) = 1;
- }
-}
-
-/* Add the base address of REF to the set of addresses taken by STMT.
- REF may be a single variable whose address has been taken or any
- other valid GIMPLE memory reference (structure reference, array,
- etc). If the base address of REF is a decl that has sub-variables,
- also add all of its sub-variables. */
-
-static void
-gimple_add_to_addresses_taken (gimple stmt, tree ref)
-{
- gcc_assert (gimple_has_ops (stmt));
- add_to_addressable_set (ref, gimple_addresses_taken_ptr (stmt));
+ if (var && DECL_P (var))
+ TREE_ADDRESSABLE (var) = 1;
}
@@ -763,7 +747,7 @@ get_tmr_operands (gimple stmt, tree expr, int flags)
get_expr_operands (stmt, &TMR_INDEX (expr), opf_use);
if (TMR_SYMBOL (expr))
- gimple_add_to_addresses_taken (stmt, TMR_SYMBOL (expr));
+ mark_address_taken (TMR_SYMBOL (expr));
add_virtual_operand (stmt, flags);
}
@@ -824,7 +808,7 @@ get_asm_expr_operands (gimple stmt)
{
tree t = get_base_address (TREE_VALUE (link));
if (t && DECL_P (t))
- gimple_add_to_addresses_taken (stmt, t);
+ mark_address_taken (t);
}
get_expr_operands (stmt, &TREE_VALUE (link), opf_def);
@@ -844,7 +828,7 @@ get_asm_expr_operands (gimple stmt)
{
tree t = get_base_address (TREE_VALUE (link));
if (t && DECL_P (t))
- gimple_add_to_addresses_taken (stmt, t);
+ mark_address_taken (t);
}
get_expr_operands (stmt, &TREE_VALUE (link), 0);
@@ -887,7 +871,7 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
reference to it, but the fact that the statement takes its
address will be of interest to some passes (e.g. alias
resolution). */
- gimple_add_to_addresses_taken (stmt, TREE_OPERAND (expr, 0));
+ mark_address_taken (TREE_OPERAND (expr, 0));
/* If the address is invariant, there may be no interesting
variable references inside. */
@@ -1091,14 +1075,9 @@ parse_ssa_operands (gimple stmt)
static void
build_ssa_operands (gimple stmt)
{
- /* Initially assume that the statement has no volatile operands and
- makes no memory references. */
+ /* Initially assume that the statement has no volatile operands. */
gimple_set_has_volatile_ops (stmt, false);
- /* Just clear the bitmap so we don't end up reallocating it over and over. */
- if (gimple_addresses_taken (stmt))
- bitmap_clear (gimple_addresses_taken (stmt));
-
start_ssa_stmt_operands ();
parse_ssa_operands (stmt);
finalize_ssa_stmt_operands (stmt);
@@ -1133,9 +1112,6 @@ free_stmt_operands (gimple stmt)
gimple_set_use_ops (stmt, NULL);
}
- if (gimple_has_ops (stmt))
- gimple_set_addresses_taken (stmt, NULL);
-
if (gimple_has_mem_ops (stmt))
{
gimple_set_vuse (stmt, NULL_TREE);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 54770c8eea9..61207b2f849 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3981,8 +3981,10 @@ eliminate (void)
value is constant, use that constant. */
if (!sprime && is_gimple_min_invariant (VN_INFO (lhs)->valnum))
{
- sprime = fold_convert (TREE_TYPE (lhs),
- VN_INFO (lhs)->valnum);
+ sprime = VN_INFO (lhs)->valnum;
+ if (!useless_type_conversion_p (TREE_TYPE (lhs),
+ TREE_TYPE (sprime)))
+ sprime = fold_convert (TREE_TYPE (lhs), sprime);
if (dump_file && (dump_flags & TDF_DETAILS))
{
@@ -4181,6 +4183,8 @@ eliminate (void)
remove_phi_node (&gsi, false);
+ if (!useless_type_conversion_p (TREE_TYPE (res), TREE_TYPE (sprime)))
+ sprime = fold_convert (TREE_TYPE (res), sprime);
stmt = gimple_build_assign (res, sprime);
SSA_NAME_DEF_STMT (res) = stmt;
if (TREE_CODE (sprime) == SSA_NAME)
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index ad6858891e6..76aec2ab0f6 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -828,36 +828,6 @@ ssa_propagate (ssa_prop_visit_stmt_fn visit_stmt,
}
-/* Return true if STMT is of the form 'LHS = mem_ref', where 'mem_ref'
- is a non-volatile pointer dereference, a structure reference or a
- reference to a single _DECL. Ignore volatile memory references
- because they are not interesting for the optimizers. */
-
-bool
-stmt_makes_single_load (gimple stmt)
-{
- tree rhs;
-
- if (gimple_code (stmt) != GIMPLE_ASSIGN)
- return false;
-
- /* Only a GIMPLE_SINGLE_RHS assignment may have a
- declaration or reference as its RHS. */
- if (get_gimple_rhs_class (gimple_assign_rhs_code (stmt))
- != GIMPLE_SINGLE_RHS)
- return false;
-
- if (!gimple_vuse (stmt))
- return false;
-
- rhs = gimple_assign_rhs1 (stmt);
-
- return (!TREE_THIS_VOLATILE (rhs)
- && (DECL_P (rhs)
- || REFERENCE_CLASS_P (rhs)));
-}
-
-
/* Return true if STMT is of the form 'mem_ref = RHS', where 'mem_ref'
is a non-volatile pointer dereference, a structure reference or a
reference to a single _DECL. Ignore volatile memory references
diff --git a/gcc/tree-ssa-propagate.h b/gcc/tree-ssa-propagate.h
index b965890c0a8..3c267247717 100644
--- a/gcc/tree-ssa-propagate.h
+++ b/gcc/tree-ssa-propagate.h
@@ -118,7 +118,6 @@ bool valid_gimple_rhs_p (tree);
bool valid_gimple_call_p (tree);
void move_ssa_defining_stmt_for_defs (gimple, gimple);
bool update_call_from_tree (gimple_stmt_iterator *, tree);
-bool stmt_makes_single_load (gimple);
bool stmt_makes_single_store (gimple);
bool substitute_and_fold (prop_value_t *, bool);
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index f3b00e99b48..b101aebd9e4 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -2886,7 +2886,8 @@ run_scc_vn (bool may_insert_arg)
if (!name)
continue;
info = VN_INFO (name);
- if (info->valnum == name)
+ if (info->valnum == name
+ || info->valnum == VN_TOP)
info->value_id = get_next_value_id ();
else if (is_gimple_min_invariant (info->valnum))
info->value_id = get_or_alloc_constant_value_id (info->valnum);
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 7ac27c06ad6..b0768d0c20b 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3052,6 +3052,14 @@ get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results,
else
result->offset = bitpos;
}
+ else if (result->type == ADDRESSOF)
+ {
+ /* We can end up here for component references on a
+ VIEW_CONVERT_EXPR <>(&foobar). */
+ result->type = SCALAR;
+ result->var = anything_id;
+ result->offset = 0;
+ }
else
gcc_unreachable ();
}
@@ -5745,7 +5753,7 @@ struct gimple_opt_pass pass_build_alias =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
PROP_alias, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index ba0c6ab720d..ca00e04f784 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -834,7 +834,6 @@ delete_tree_ssa (void)
{
gimple_set_def_ops (stmt, NULL);
gimple_set_use_ops (stmt, NULL);
- gimple_set_addresses_taken (stmt, NULL);
}
if (gimple_has_mem_ops (stmt))
@@ -1457,7 +1456,7 @@ struct gimple_opt_pass pass_early_warn_uninitialized =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1476,7 +1475,7 @@ struct gimple_opt_pass pass_late_warn_uninitialized =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1504,13 +1503,12 @@ execute_update_addresses_taken (bool do_optimize)
{
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
- const_gimple stmt = gsi_stmt (gsi);
+ gimple stmt = gsi_stmt (gsi);
enum gimple_code code = gimple_code (stmt);
- bitmap taken = gimple_addresses_taken (stmt);
-
- if (taken)
- bitmap_ior_into (addresses_taken, taken);
-
+
+ /* Note all addresses taken by the stmt. */
+ gimple_ior_addresses_taken (addresses_taken, stmt);
+
/* If we have a call or an assignment, see if the lhs contains
a local decl that requires not to be a gimple register. */
if (code == GIMPLE_ASSIGN || code == GIMPLE_CALL)
@@ -1619,7 +1617,7 @@ struct gimple_opt_pass pass_update_address_taken =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 19032d52448..c019074cfae 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -1,6 +1,7 @@
/* Generic routines for manipulating SSA_NAME expressions
- Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-
+ Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
+ Free Software Foundation, Inc.
+
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
@@ -349,7 +350,7 @@ struct gimple_opt_pass pass_release_ssa_names =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index 00fce82e750..f9a2110095c 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -1,5 +1,5 @@
/* Pass computing data for optimizing stdarg functions.
- Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>
This file is part of GCC.
@@ -905,7 +905,7 @@ struct gimple_opt_pass pass_stdarg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 59a7694f095..6b03eaaac89 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -1,5 +1,5 @@
/* Tail call optimization on trees.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -999,7 +999,7 @@ struct gimple_opt_pass pass_tail_recursion =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1018,7 +1018,7 @@ struct gimple_opt_pass pass_tail_calls =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index 13138ddd464..d99d713fd31 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -1,5 +1,6 @@
/* Lower vector operations to scalar operations.
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -555,7 +556,7 @@ struct gimple_opt_pass pass_lower_vector =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -575,7 +576,7 @@ struct gimple_opt_pass pass_lower_vector_ssa =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index ae578f099fc..56f9bba513d 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -1593,7 +1593,8 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
tree access_fn = NULL;
tree evolution_part;
tree init_expr;
- tree step_expr;
+ tree step_expr, off;
+ tree type;
tree var, ni, ni_name;
gimple_stmt_iterator last_gsi;
@@ -1623,6 +1624,11 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
access_fn = analyze_scalar_evolution (loop, PHI_RESULT (phi));
gcc_assert (access_fn);
+ /* We can end up with an access_fn like
+ (short int) {(short unsigned int) i_49, +, 1}_1
+ for further analysis we need to strip the outer cast but we
+ need to preserve the original type. */
+ type = TREE_TYPE (access_fn);
STRIP_NOPS (access_fn);
evolution_part =
unshare_expr (evolution_part_in_loop_num (access_fn, loop->num));
@@ -1635,22 +1641,19 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
step_expr = evolution_part;
init_expr = unshare_expr (initial_condition_in_loop_num (access_fn,
loop->num));
+ init_expr = fold_convert (type, init_expr);
+ off = fold_build2 (MULT_EXPR, TREE_TYPE (step_expr),
+ fold_convert (TREE_TYPE (step_expr), niters),
+ step_expr);
if (POINTER_TYPE_P (TREE_TYPE (init_expr)))
ni = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (init_expr),
- init_expr,
- fold_build2 (MULT_EXPR, sizetype,
- fold_convert (sizetype, niters),
- step_expr));
+ init_expr,
+ fold_convert (sizetype, off));
else
ni = fold_build2 (PLUS_EXPR, TREE_TYPE (init_expr),
- fold_build2 (MULT_EXPR, TREE_TYPE (init_expr),
- fold_convert (TREE_TYPE (init_expr),
- niters),
- step_expr),
- init_expr);
-
-
+ init_expr,
+ fold_convert (TREE_TYPE (init_expr), off));
var = create_tmp_var (TREE_TYPE (init_expr), "tmp");
add_referenced_var (var);
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 9ae4403f38c..d78fa99ff8b 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2267,33 +2267,33 @@ get_initial_def_for_reduction (gimple stmt, tree init_val, tree *adjustment_def)
stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- tree scalar_type = TREE_TYPE (vectype);
+ tree scalar_type = TREE_TYPE (init_val);
+ tree vectype = get_vectype_for_scalar_type (scalar_type);
+ int nunits;
enum tree_code code = gimple_assign_rhs_code (stmt);
- tree type = TREE_TYPE (init_val);
- tree vecdef;
tree def_for_init;
tree init_def;
tree t = NULL_TREE;
int i;
bool nested_in_vect_loop = false;
- gcc_assert (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type));
+ gcc_assert (vectype);
+ nunits = TYPE_VECTOR_SUBPARTS (vectype);
+
+ gcc_assert (POINTER_TYPE_P (scalar_type) || INTEGRAL_TYPE_P (scalar_type)
+ || SCALAR_FLOAT_TYPE_P (scalar_type));
if (nested_in_vect_loop_p (loop, stmt))
nested_in_vect_loop = true;
else
gcc_assert (loop == (gimple_bb (stmt))->loop_father);
- vecdef = vect_get_vec_def_for_operand (init_val, stmt, NULL);
-
switch (code)
{
case WIDEN_SUM_EXPR:
case DOT_PROD_EXPR:
case PLUS_EXPR:
if (nested_in_vect_loop)
- *adjustment_def = vecdef;
+ *adjustment_def = vect_get_vec_def_for_operand (init_val, stmt, NULL);
else
*adjustment_def = init_val;
/* Create a vector of zeros for init_def. */
@@ -2310,7 +2310,7 @@ get_initial_def_for_reduction (gimple stmt, tree init_val, tree *adjustment_def)
case MIN_EXPR:
case MAX_EXPR:
*adjustment_def = NULL_TREE;
- init_def = vecdef;
+ init_def = vect_get_vec_def_for_operand (init_val, stmt, NULL);
break;
default:
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 0636c6adbc6..2ac6a8b87a6 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -305,7 +305,7 @@ struct simple_ipa_opt_pass pass_ipa_increase_alignment =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -313,5 +313,3 @@ struct simple_ipa_opt_pass pass_ipa_increase_alignment =
0 /* todo_flags_finish */
}
};
-
-
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index cceea2549a3..e3d14b29182 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -1368,28 +1368,6 @@ ssa_name_nonnegative_p (const_tree t)
return false;
}
-/* Return true if T, an SSA_NAME, is known to be nonzero. Return
- false otherwise or if no value range information is available. */
-
-bool
-ssa_name_nonzero_p (const_tree t)
-{
- value_range_t *vr = get_value_range (t);
-
- if (!vr)
- return false;
-
- /* A VR_RANGE which does not include zero is a nonzero value. */
- if (vr->type == VR_RANGE && !symbolic_range_p (vr))
- return ! range_includes_zero_p (vr);
-
- /* A VR_ANTI_RANGE which does include zero is a nonzero value. */
- if (vr->type == VR_ANTI_RANGE && !symbolic_range_p (vr))
- return range_includes_zero_p (vr);
-
- return false;
-}
-
/* If OP has a value range with a single constant value return that,
otherwise return NULL_TREE. This returns OP itself if OP is a
constant. */
@@ -4996,7 +4974,7 @@ insert_range_assertions (void)
IGNORE_OFF_BY_ONE is true if the ARRAY_REF is inside a ADDR_EXPR. */
static void
-check_array_ref (tree ref, const location_t *location, bool ignore_off_by_one)
+check_array_ref (tree ref, location_t location, bool ignore_off_by_one)
{
value_range_t* vr = NULL;
tree low_sub, up_sub;
@@ -5035,8 +5013,8 @@ check_array_ref (tree ref, const location_t *location, bool ignore_off_by_one)
&& TREE_CODE (low_sub) == INTEGER_CST
&& tree_int_cst_lt (low_sub, low_bound))
{
- warning (OPT_Warray_bounds,
- "%Harray subscript is outside array bounds", location);
+ warning_at (location, OPT_Warray_bounds,
+ "array subscript is outside array bounds");
TREE_NO_WARNING (ref) = 1;
}
}
@@ -5050,15 +5028,15 @@ check_array_ref (tree ref, const location_t *location, bool ignore_off_by_one)
0),
up_sub)))
{
- warning (OPT_Warray_bounds, "%Harray subscript is above array bounds",
- location);
+ warning_at (location, OPT_Warray_bounds,
+ "array subscript is above array bounds");
TREE_NO_WARNING (ref) = 1;
}
else if (TREE_CODE (low_sub) == INTEGER_CST
&& tree_int_cst_lt (low_sub, low_bound))
{
- warning (OPT_Warray_bounds, "%Harray subscript is below array bounds",
- location);
+ warning_at (location, OPT_Warray_bounds,
+ "array subscript is below array bounds");
TREE_NO_WARNING (ref) = 1;
}
}
@@ -5067,7 +5045,7 @@ check_array_ref (tree ref, const location_t *location, bool ignore_off_by_one)
address of an ARRAY_REF, and call check_array_ref on it. */
static void
-search_for_addr_array (tree t, const location_t *location)
+search_for_addr_array (tree t, location_t location)
{
while (TREE_CODE (t) == SSA_NAME)
{
@@ -5115,11 +5093,11 @@ check_array_bounds (tree *tp, int *walk_subtree, void *data)
*walk_subtree = TRUE;
if (TREE_CODE (t) == ARRAY_REF)
- check_array_ref (t, location, false /*ignore_off_by_one*/);
+ check_array_ref (t, *location, false /*ignore_off_by_one*/);
if (TREE_CODE (t) == INDIRECT_REF
|| (TREE_CODE (t) == RETURN_EXPR && TREE_OPERAND (t, 0)))
- search_for_addr_array (TREE_OPERAND (t, 0), location);
+ search_for_addr_array (TREE_OPERAND (t, 0), *location);
if (TREE_CODE (t) == ADDR_EXPR)
*walk_subtree = FALSE;
@@ -5141,9 +5119,23 @@ check_all_array_refs (void)
/* Skip bb's that are clearly unreachable. */
if (single_pred_p (bb))
{
- basic_block pred_bb = EDGE_PRED (bb, 0)->src;
+ int i;
+ bool reachable = true;
+ edge e2;
+ edge e = EDGE_PRED (bb, 0);
+ basic_block pred_bb = e->src;
gimple ls = NULL;
+ for (i = 0; VEC_iterate (edge, to_remove_edges, i, e2); ++i)
+ if (e == e2)
+ {
+ reachable = false;
+ break;
+ }
+
+ if (!reachable)
+ continue;
+
if (!gsi_end_p (gsi_last_bb (pred_bb)))
ls = gsi_stmt (gsi_last_bb (pred_bb));
@@ -5157,7 +5149,6 @@ check_all_array_refs (void)
for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
{
gimple stmt = gsi_stmt (si);
- const location_t *location = gimple_location_ptr (stmt);
struct walk_stmt_info wi;
if (!gimple_has_location (stmt))
continue;
@@ -5169,13 +5160,14 @@ check_all_array_refs (void)
for (i = 0; i < n; i++)
{
tree arg = gimple_call_arg (stmt, i);
- search_for_addr_array (arg, location);
+ search_for_addr_array (arg, gimple_location (stmt));
}
}
else
{
memset (&wi, 0, sizeof (wi));
- wi.info = CONST_CAST (void *, (const void *) location);
+ wi.info = CONST_CAST (void *, (const void *)
+ gimple_location_ptr (stmt));
walk_gimple_op (gsi_stmt (si),
check_array_bounds,
@@ -5875,7 +5867,7 @@ vrp_visit_cond_stmt (gimple stmt, edge *taken_edge_p)
If there is a CASE_LABEL for VAL, its index is placed in IDX and true is
returned.
- If there is no CASE_LABEL for VAL and the is one that is larger than VAL,
+ If there is no CASE_LABEL for VAL and there is one that is larger than VAL,
it is placed in IDX and false is returned.
If VAL is larger than any CASE_LABEL, n is placed on IDX and false is
@@ -6860,19 +6852,35 @@ simplify_switch_using_ranges (gimple stmt)
tree vec2;
switch_update su;
- if (TREE_CODE (op) != SSA_NAME)
- return false;
+ if (TREE_CODE (op) == SSA_NAME)
+ {
+ vr = get_value_range (op);
- vr = get_value_range (op);
+ /* We can only handle integer ranges. */
+ if (vr->type != VR_RANGE
+ || symbolic_range_p (vr))
+ return false;
- /* We can only handle integer ranges. */
- if (vr->type != VR_RANGE
- || symbolic_range_p (vr))
+ /* Find case label for min/max of the value range. */
+ take_default = !find_case_label_range (stmt, vr->min, vr->max, &i, &j);
+ }
+ else if (TREE_CODE (op) == INTEGER_CST)
+ {
+ take_default = !find_case_label_index (stmt, 1, op, &i);
+ if (take_default)
+ {
+ i = 1;
+ j = 0;
+ }
+ else
+ {
+ j = i;
+ }
+ }
+ else
return false;
- /* Find case label for min/max of the value range. */
n = gimple_switch_num_labels (stmt);
- take_default = !find_case_label_range (stmt, vr->min, vr->max, &i, &j);
/* Bail out if this is just all edges taken. */
if (i == 1
diff --git a/gcc/tree.c b/gcc/tree.c
index a66479d5e5a..ca81a510bf7 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3584,7 +3584,8 @@ set_expr_locus (tree node, source_location *loc)
LOC is the location to use in tree T. */
-void protected_set_expr_location (tree t, location_t loc)
+void
+protected_set_expr_location (tree t, location_t loc)
{
if (t && CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, loc);
@@ -7970,6 +7971,19 @@ build_vector_type (tree innertype, int nunits)
return make_vector_type (innertype, nunits, VOIDmode);
}
+/* Similarly, but takes the inner type and number of units, which must be
+ a power of two. */
+
+tree
+build_opaque_vector_type (tree innertype, int nunits)
+{
+ tree t;
+ innertype = build_distinct_type_copy (innertype);
+ t = make_vector_type (innertype, nunits, VOIDmode);
+ TYPE_VECTOR_OPAQUE (t) = true;
+ return t;
+}
+
/* Build RESX_EXPR with given REGION_NUMBER. */
tree
@@ -9058,26 +9072,6 @@ prototype_p (tree fntype)
return (t != NULL_TREE);
}
-/* Return the number of arguments that a function has. */
-
-int
-function_args_count (tree fntype)
-{
- function_args_iterator args_iter;
- tree t;
- int num = 0;
-
- if (fntype)
- {
- FOREACH_FUNCTION_ARGS(fntype, t, args_iter)
- {
- num++;
- }
- }
-
- return num;
-}
-
/* If BLOCK is inlined from an __attribute__((__artificial__))
routine, return pointer to location from where it has been
called. */
diff --git a/gcc/tree.h b/gcc/tree.h
index b191d43d046..c5c855fad23 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -586,6 +586,9 @@ struct tree_common GTY(())
STMT_IN_SSA_EDGE_WORKLIST in
all expressions (tree-ssa-propagate.c)
+ TYPE_VECTOR_OPAQUE in
+ VECTOR_TYPE
+
visited:
TREE_VISITED in
@@ -2221,6 +2224,11 @@ extern enum machine_mode vector_type_mode (const_tree);
#define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
(VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision = exact_log2 (X))
+/* Nonzero in an IDENTIFIER_NODE if the name is a local alias, whose
+ uses are to be substituted for uses of the TREE_CHAINed identifier. */
+#define TYPE_VECTOR_OPAQUE(NODE) \
+ (VECTOR_TYPE_CHECK (NODE)->base.deprecated_flag)
+
/* Indicates that objects of this type must be initialized by calling a
function when they are created. */
#define TYPE_NEEDS_CONSTRUCTING(NODE) \
@@ -3938,6 +3946,7 @@ extern tree build_reference_type_for_mode (tree, enum machine_mode, bool);
extern tree build_reference_type (tree);
extern tree build_vector_type_for_mode (tree, enum machine_mode);
extern tree build_vector_type (tree innertype, int nunits);
+extern tree build_opaque_vector_type (tree innertype, int nunits);
extern tree build_type_no_quals (tree);
extern tree build_index_type (tree);
extern tree build_index_2_type (tree, tree);
@@ -4252,7 +4261,6 @@ extern tree convert (tree, tree);
extern unsigned int expr_align (const_tree);
extern tree expr_first (tree);
extern tree expr_last (tree);
-extern tree expr_only (tree);
extern tree size_in_bytes (const_tree);
extern HOST_WIDE_INT int_size_in_bytes (const_tree);
extern HOST_WIDE_INT max_int_size_in_bytes (const_tree);
@@ -4647,7 +4655,6 @@ extern tree create_artificial_label (void);
extern const char *get_name (tree);
extern bool stdarg_p (tree);
extern bool prototype_p (tree);
-extern int function_args_count (tree);
extern bool auto_var_in_fn_p (const_tree, const_tree);
/* In gimplify.c */
@@ -5192,7 +5199,6 @@ extern tree tree_mem_ref_addr (tree, tree);
extern void copy_mem_ref_info (tree, tree);
/* In tree-vrp.c */
-extern bool ssa_name_nonzero_p (const_tree);
extern bool ssa_name_nonnegative_p (const_tree);
/* In tree-object-size.c. */
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index c655caa53b9..134c7d99225 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -211,6 +211,7 @@ const struct gcc_debug_hooks vmsdbg_debug_hooks
debug_nothing_int, /* handle_pch */
debug_nothing_rtx, /* var_location */
debug_nothing_void, /* switch_text_section */
+ debug_nothing_tree_tree, /* set_name */
0 /* start_end_main_source_file */
};