GCC modified for the FreeChainXenon project
Find a file
Joseph Myers e9e32ee6e8 Fix TYPE_MAIN_VARIANT construction for arrays of qualified typedefs (PR c/68162).
PR c/68162 reports a spurious warning about incompatible types
involving arrays of const double, constructed in one place using a
typedef for const double and in another place literally using const
double.

The problem is that the array of the typedef was incorrectly
constructed without a TYPE_MAIN_VARIANT being an array of unqualified
elements as it should be (though it seems some more recent change
resulted in this producing incorrect diagnostics, likely the support
for C++-style handling of arrays of qualified type).  This patch fixes
the logic in grokdeclarator to determine first_non_attr_kind, which is
used to determine whether it is necessary to use the TYPE_MAIN_VARIANT
of the type in the declaration specifiers.

However, fixing that logic introduces a failure of
gcc.dg/debug/dwarf2/pr47939-4.c, a test introduced along with
first_non_attr_kind.  Thus, it is necessary to track the original
qualified typedef when qualifying an array type, to use it rather than
a newly-constructed type, to avoid regressing regarding typedef names
in debug info.  This is done along lines I suggested in
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47939#c6>: track the
original type and the number of levels of array indirection at which
it appears, and, in possibly affected cases, pass extra arguments to
c_build_qualified_type (with default arguments to avoid needing to
pass those extra arguments explicitly everywhere).  Given Richard's
recent fix to dwarf2out.c, this allows the C bug to be fixed without
causing debug information regressions.

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

gcc/c:
	PR c/68162
	* c-decl.c (grokdeclarator): Set first_non_attr_kind before
	following link from declarator to next declarator.  Track original
	qualified type and pass it to c_build_qualified_type.
	* c-typeck.c (c_build_qualified_type): Add arguments
	orig_qual_type and orig_qual_indirect.

gcc/c-family:
	PR c/68162
	* c-common.h (c_build_qualified_type): Add extra default
	arguments.

gcc/cp:
	PR c/68162
	* tree.c (c_build_qualified_type): Add extra arguments.

gcc/testsuite:
	PR c/68162
	* gcc.dg/pr68162-1.c: New test.

From-SVN: r231194
2015-12-02 18:24:23 +00:00
boehm-gc Testsuite: add dg-{begin|end}-multiline-output commands 2015-10-09 13:55:23 +00:00
config libsanitizer merge from upstream r250806, compiler part. 2015-10-21 10:40:54 +03:00
contrib clang-format: split content of a list to multiple lines 2015-11-20 12:24:34 +00:00
fixincludes inclhack.def (aix_stdio_inline): New fix. 2015-08-14 07:17:29 -04:00
gcc Fix TYPE_MAIN_VARIANT construction for arrays of qualified typedefs (PR c/68162). 2015-12-02 18:24:23 +00:00
gnattools configure.ac (*-*-dragonfly*): New configuration. 2015-06-08 07:27:56 +00:00
gotools Makefile.am (go_cmd_go_files): Update to Go 1.5.1 library by adding alldocs.go, doc.go, note.go. 2015-10-31 21:29:38 +00:00
include PR other/61321 - demangler crash on casts in template parameters 2015-11-27 14:48:21 +00:00
INSTALL README: Do not mention CVS. 2014-10-12 15:05:28 +00:00
intl Makefile.def (libiconv): Define bootstrap=true. 2015-08-07 01:13:52 -04:00
libada re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.) 2015-04-10 06:43:52 +00:00
libatomic Add out-of-line versions of some <stdatomic.h> functions (PR c/65083). 2015-11-18 22:13:44 +00:00
libbacktrace posix.c (backtrace_open): Cast second argument of open() to int. 2015-09-17 13:08:04 -04:00
libcc1 hash-traits.h (free_ptr_hash): New class. 2015-06-25 17:06:24 +00:00
libcilkrts re PR target/66326 (Floating point exception with -mfpmath=387 and -fcilkplus.) 2015-11-09 10:12:34 +00:00
libcpp PR 62314: add ability to add fixit-hints to a diagnostic 2015-11-20 20:08:47 +00:00
libdecnumber IA MCU psABI support: changes to libraries 2015-06-30 09:42:07 -07:00
libffi re PR libffi/65441 (FAIL: libffi.call/float2.c -W -Wall -Wno-psabi (test for excess errors)) 2015-10-27 00:39:32 +00:00
libgcc fptr.c (__canonicalize_funcptr_for_compare): Initialize fixup values if saved GOT address doesn't match runtime address. 2015-12-01 23:59:20 +00:00
libgfortran re PR fortran/52251 (Nonadvancing I/O and the t edit descriptor) 2015-11-23 00:40:51 +00:00
libgo re PR go/61303 (gccgo: segfault, regression since 4.8.2) 2015-11-26 00:24:21 +00:00
libgomp Some OpenACC host_data cleanup 2015-12-02 16:53:34 +01:00
libiberty PR other/61321 - demangler crash on casts in template parameters 2015-11-27 14:48:21 +00:00
libitm libitm: Use multiplicative hashing in the multi-lock TM method. 2015-11-26 16:10:54 +00:00
libjava libjava: fix locale handling when sorting JNI methods 2015-10-26 18:32:41 +00:00
libmpx re PR other/66887 (trunk/libmpx/mpxrt/mpxrt.c:158: possible performance problem) 2015-10-15 09:26:39 +00:00
libobjc replace BITS_PER_UNIT with __CHAR_BIT__ in target libs 2015-11-07 19:36:26 +00:00
liboffloadmic libgomp-plugin-intelmic.cpp (struct TargetImageDesc): New. 2015-11-19 16:22:13 +00:00
libquadmath Makefile.am (libquadmath_la_SOURCES): Add math/logbq.c. 2015-08-09 08:46:52 +00:00
libsanitizer Move ptrace.h to appropriate place. 2015-11-24 14:24:46 +02:00
libssp libssp: Bump to automake 1.11.6 2015-05-13 11:12:39 +00:00
libstdc++-v3 Fix ambiguity with multiple enable_shared_from_this bases 2015-12-02 15:08:18 +00:00
libvtv configure.ac: Move AM_ENABLE_MULTILIB before GCC_LIBSTDCXX_RAW_CXX_FLAGS. 2015-12-02 18:18:51 +00:00
lto-plugin re PR lto/67548 (LTO drops weak binding with "ld -r") 2015-11-25 23:05:07 +00:00
maintainer-scripts update_version_svn: Add gcc-4_8-branch to IGNORE_BRANCHES. 2015-06-23 07:48:06 +00:00
zlib 2015-11-23 Matthias Klose <doko@ubuntu.com> 2015-11-23 20:27:57 +00:00
.dir-locals.el
.gitignore Add clang-format config to contrib folder 2015-11-19 12:32:09 +00:00
ABOUT-NLS
ChangeLog re PR libffi/65726 (libffi fails to build when not bootstrapping: configure: error: C++ preprocessor "/lib/cpp" fails sanity check) 2015-12-01 21:15:35 +01:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.tree-ssa
compile Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
config-ml.in re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
config.guess * config.sub, config.guess: Import from upstream. 2015-07-28 10:57:40 +10:00
config.rpath
config.sub * config.sub, config.guess: Import from upstream. 2015-07-28 10:57:40 +10:00
configure Sync top level configure with binutils-gdb. 2015-11-20 14:24:07 +00:00
configure.ac Sync top level configure with binutils-gdb. 2015-11-20 14:24:07 +00:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
install-sh Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
libtool-ldflags
libtool.m4 * libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L" symbols. 2015-11-26 08:20:59 -05:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Update email address. 2015-10-23 17:06:07 +00:00
Makefile.def re PR libffi/65726 (libffi fails to build when not bootstrapping: configure: error: C++ preprocessor "/lib/cpp" fails sanity check) 2015-12-01 21:15:35 +01:00
Makefile.in re PR libffi/65726 (libffi fails to build when not bootstrapping: configure: error: C++ preprocessor "/lib/cpp" fails sanity check) 2015-12-01 21:15:35 +01:00
Makefile.tpl Add clang-format config to contrib folder 2015-11-19 12:32:09 +00:00
missing Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
mkdep
mkinstalldirs Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
move-if-change Update move-if-change from gnulib 2014-11-16 16:12:44 +00:00
README
symlink-tree
ylwrap Update from upstream Automake files. 2014-11-16 14:07:13 +00:00

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.