Go to file
Jakub Jelinek 65371066d8 stor-layout: Avoid DECL_BIT_FIELD_REPRESENTATIVE with NULL TREE_TYPE [PR101172]
finish_bitfield_representative has an early out if the field after a
bitfield has error_mark_node type, but that early out leads to TREE_TYPE
of the DECL_BIT_FIELD_REPRESENTATIVE being NULL, which breaks assumptions
on code that uses the DECL_BIT_FIELD_REPRESENTATIVE during error-recovery.

The following patch instead sets TREE_TYPE of the representative to
error_mark_node, something the users can deal with better.  At this point
the representative can be set as DECL_BIT_FIELD_REPRESENTATIVE for multiple
bitfields, so making sure that we clear the DECL_BIT_FIELD_REPRESENTATIVE
instead would be harder (but doable, e.g. with the error_mark_node TREE_TYPE
set by this patch set some flag in the caller and if the flag is there, walk
all the fields once again and clear all DECL_BIT_FIELD_REPRESENTATIVE that
have error_mark_node TREE_TYPE).

2021-06-24  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/101172
	* stor-layout.c (finish_bitfield_representative): If nextf has
	error_mark_node type, set repr type to error_mark_node too.

	* gcc.dg/pr101172.c: New test.
2021-06-24 12:22:14 +02:00
c++tools Daily bump. 2021-05-26 00:16:41 +00:00
config Daily bump. 2021-06-15 00:16:37 +00:00
contrib Daily bump. 2021-06-24 00:16:30 +00:00
fixincludes
gcc stor-layout: Avoid DECL_BIT_FIELD_REPRESENTATIVE with NULL TREE_TYPE [PR101172] 2021-06-24 12:22:14 +02:00
gnattools
gotools
include
INSTALL
intl Daily bump. 2021-06-15 00:16:37 +00:00
libada
libatomic
libbacktrace
libcc1
libcody
libcpp Daily bump. 2021-06-17 00:16:54 +00:00
libdecnumber
libffi Daily bump. 2021-06-17 00:16:54 +00:00
libgcc Daily bump. 2021-06-24 00:16:30 +00:00
libgfortran Daily bump. 2021-06-23 00:16:28 +00:00
libgo libgo: update to Go1.16.5 release 2021-06-10 14:41:23 -07:00
libgomp openmp: in_reduction clause support on target construct 2021-06-24 11:35:08 +02:00
libiberty Daily bump. 2021-06-06 00:16:22 +00:00
libitm Daily bump. 2021-06-18 00:16:58 +00:00
libobjc
liboffloadmic Daily bump. 2021-05-26 00:16:41 +00:00
libphobos Daily bump. 2021-06-12 00:16:27 +00:00
libquadmath Daily bump. 2021-06-09 00:16:30 +00:00
libsanitizer Daily bump. 2021-05-22 00:16:29 +00:00
libssp
libstdc++-v3 Daily bump. 2021-06-24 00:16:30 +00:00
libvtv
lto-plugin
maintainer-scripts Daily bump. 2021-05-15 00:16:27 +00:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-06-23 00:16:28 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure sim: leverage gnulib 2021-05-29 10:59:54 -04:00
configure.ac sim: leverage gnulib 2021-05-29 10:59:54 -04:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Remove my Write After Approval entry. 2021-06-22 16:09:56 +08:00
Makefile.def sim: depend on gnulib 2021-05-18 17:45:19 -04:00
Makefile.in sim: depend on gnulib 2021-05-18 17:45:19 -04:00
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
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.