ca1f6b2991
2017-04-25 Bob Duff <duff@adacore.com> * sem_prag.adb (No_Return): Give an error if the pragma applies to a body. Specialize the error for the specless body case, as is done for (e.g.) pragma Convention. * debug.adb: Add switch -gnatd.J to disable the above legality checks. This is mainly for use in our test suite, to avoid rewriting a lot of illegal (but working) code. It might also be useful to customers. Under this switch, if a pragma No_Return applies to a body, and the procedure raises an exception (as it should), the pragma has no effect. If the procedure does return, execution is erroneous. 2017-04-25 Bob Duff <duff@adacore.com> * exp_ch6.adb (Expand_Actuals): This is the root of the problem. It took N as an 'in out' parameter, and in some cases, rewrote N, but then set N to Original_Node(N). So the node returned in N had no Parent. The caller continued processing of this orphaned node. In some cases that caused a crash (e.g. Remove_Side_Effects climbs up Parents in a loop, and trips over the Empty Parent). The solution is to make N an 'in' parameter. Instead of rewriting it, return the list of post-call actions, so the caller can do the rewriting later, after N has been fully processed. (Expand_Call_Helper): Move most of Expand_Call here. It has too many premature 'return' statements, and we want to do the rewriting on return. (Insert_Post_Call_Actions): New procedure to insert the post-call actions in the appropriate place. In the problematic case, that involves rewriting N as an Expression_With_Actions. (Expand_Call): Call the new procedures Expand_Call_Helper and Insert_Post_Call_Actions. From-SVN: r247178 |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcilkrts | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libmpx | ||
libobjc | ||
liboffloadmic | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
README | ||
symlink-tree | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.