aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-01-26 12:28:36 +0000
committerJakub Jelinek <jakub@redhat.com>2009-01-26 12:28:36 +0000
commitc58d0aab9cceb0437c13fb7d88dd9e82b48e82a1 (patch)
tree14d43b52ff28880a8caeb0a9611364fd576671cd
parent10d249b47119b4e4eecaa620188408e919d6449d (diff)
svn merge -r131256:139562 svn+ssh://gcc.gnu.org/svn/gcc/branches/redhat/fc6-4_1-branchredhat/fc5-4_1-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/fc5-4_1-branch@143674 138bc75d-0d04-0410-961f-82ee72b054a4
-rwxr-xr-x[-rw-r--r--]compile0
-rw-r--r--fixincludes/ChangeLog12
-rw-r--r--fixincludes/inclhack.def12
-rw-r--r--gcc/ChangeLog142
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/gnat_rm.texi10
-rw-r--r--gcc/ada/gnat_ugn.texi43
-rw-r--r--gcc/c-decl.c3
-rw-r--r--gcc/collect2.c8
-rw-r--r--gcc/combine.c3
-rw-r--r--gcc/config/i386/t-linux649
-rw-r--r--gcc/config/mips/mips.c2
-rw-r--r--gcc/config/mips/mips.md3
-rw-r--r--gcc/config/pa/pa-hpux.h2
-rw-r--r--gcc/config/pa/pa-hpux10.h2
-rw-r--r--gcc/config/pa/pa-hpux11.h13
-rw-r--r--gcc/config/pa/pa.c29
-rw-r--r--gcc/config/pa/som.h4
-rw-r--r--gcc/config/rs6000/rs6000.md1
-rw-r--r--gcc/config/rs6000/t-linux649
-rw-r--r--gcc/config/s390/fixdfdi.h32
-rw-r--r--gcc/cp/ChangeLog31
-rw-r--r--gcc/cp/call.c14
-rw-r--r--gcc/cp/class.c10
-rw-r--r--gcc/cp/pt.c14
-rw-r--r--gcc/cse.c30
-rw-r--r--gcc/doc/tm.texi8
-rw-r--r--gcc/expr.c9
-rw-r--r--gcc/fold-const.c9
-rw-r--r--gcc/ipa-pure-const.c30
-rw-r--r--gcc/ipa-utils.c2
-rw-r--r--gcc/resource.c5
-rw-r--r--gcc/testsuite/ChangeLog149
-rw-r--r--gcc/testsuite/g++.dg/eh/ia64-2.C3
-rw-r--r--gcc/testsuite/g++.dg/eh/weak1.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr14814.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20080114-1.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr34993.c5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20080408-1.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20080813-1.c30
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/chk.h8
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr33631.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr34130.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr34456.c30
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr35163.c11
-rw-r--r--gcc/testsuite/gcc.dg/assign-warn-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/nested-func-6.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr33826.c41
-rw-r--r--gcc/testsuite/gcc.dg/pr34003-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr34003-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/tf_to_di-1.c47
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr21291.c7
-rw-r--r--gcc/testsuite/lib/target-supports.exp10
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-1.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-4.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-3.mm14
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-8.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-runtime-2.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/isa-field-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/layout-1.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/lookup-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-9.mm1
-rw-r--r--gcc/tree-nested.c2
-rw-r--r--gcc/tree.c5
-rw-r--r--gcc/varasm.c5
-rw-r--r--libgfortran/ChangeLog9
-rw-r--r--libgfortran/intrinsics/c99_functions.c4
-rw-r--r--libstdc++-v3/ChangeLog18
-rwxr-xr-xlibstdc++-v3/scripts/testsuite_flags.in2
-rw-r--r--libstdc++-v3/testsuite/27_io/fpos/14320-1.cc7
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp25
80 files changed, 947 insertions, 149 deletions
diff --git a/compile b/compile
index 1b1d2321695..1b1d2321695 100644..100755
--- a/compile
+++ b/compile
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index a64cf1ce14d..b3fe5e6e26a 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,15 @@
+2008-03-17 Dave Korn <dave.korn@artimi.com>
+
+ * fixincl.x: Revert last change, restoring GPLv2 status.
+
+2008-02-04 Ismail Dönmez <ismail@pardus.org.tr>
+
+ * inclhack.def: (bsd_stdio_attrs_conflict, freebsd_gcc3_breakage,
+ freebsd_gcc4_breakage, hpux11_abs, netbsd_extra_semicolon): Add
+ quotes around mach entries.
+ * fixincl.x: Regenerate with latest autogen (5.9.4), updating license
+ to GPLv3.
+
2007-07-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR target/32641
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index fec214e9542..c72c787973a 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -1050,8 +1050,8 @@ fix = {
*/
fix = {
hackname = bsd_stdio_attrs_conflict;
- mach = *-*-*bsd*;
- mach = *-*-*darwin*;
+ mach = "*-*-*bsd*";
+ mach = "*-*-*darwin*";
files = stdio.h;
select = "^#define[ \t]*vfscanf[ \t]*__svfscanf[ \t]*$";
c_fix = format;
@@ -1242,7 +1242,7 @@ fix = {
*/
fix = {
hackname = freebsd_gcc3_breakage;
- mach = *-*-freebsd*;
+ mach = "*-*-freebsd*";
files = sys/cdefs.h;
select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$';
bypass = '__GNUC__[ \t]*([>=]=[ \t]*[3-9]|>[ \t]*2)';
@@ -1259,7 +1259,7 @@ fix = {
*/
fix = {
hackname = freebsd_gcc4_breakage;
- mach = *-*-freebsd*;
+ mach = "*-*-freebsd*";
files = sys/cdefs.h;
select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 \|\| __GNUC__ == 3$';
c_fix = format;
@@ -1534,7 +1534,7 @@ fix = {
*/
fix = {
hackname = hpux11_abs;
- mach = ia64-hp-hpux11*;
+ mach = "ia64-hp-hpux11*";
files = stdlib.h;
select = "ifndef _MATH_INCLUDED";
c_fix = format;
@@ -2450,7 +2450,7 @@ fix = {
*/
fix = {
hackname = netbsd_extra_semicolon;
- mach = *-*-netbsd*;
+ mach = "*-*-netbsd*";
files = sys/cdefs.h;
select = "#define[ \t]*__END_DECLS[ \t]*};";
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 964696fd3fb..759e628d5e8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,145 @@
+2008-08-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/37103
+ * fold-const.c (fold_widened_comparison): Do not allow
+ sign changes that change the result even if shorter type
+ is wider than arg1_unw's type.
+
+2008-06-05 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * config/mips/mips.c (mips_emit_loadgp): Emit a blockage if
+ current_function_profile.
+ * config/mips/mips.md (loadgp_blockage): Use SI rather than DI.
+
+2008-05-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree-nested.c (check_for_nested_with_variably_modified): Fix typo.
+
+2008-04-08 Richard Guenther <rguenther@suse.de>
+
+ * fold-const.c (fold_widened_comparison): Do not allow
+ sign-changes that change the result.
+
+2008-03-25 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline:
+ 2008-02-12 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/35163
+ * fold-const.c (fold_widened_comparison): Use get_unwidened in
+ value-preserving mode. Disallow final truncation.
+
+2008-03-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Backport:
+ 2007-09-27 Matthias Klose <doko@ubuntu.com>
+
+ * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Use ../lib32 as the
+ multilib osdirname if it exists.
+ * config/rs6000/t-linux64 (MULTILIB_OSDIRNAMES): Likewise.
+
+2008-02-14 Alan Modra <amodra@bigpond.net.au>
+
+ PR target/34393
+ * config/rs6000/rs6000.md (restore_stack_block): Force operands[1]
+ to a reg.
+
+2008-02-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR middle_end/34150
+ * pa.c (legitimize_pic_address): Add REG_EQUAL note on sets with a
+ pic_label_operand source. Similarly, add a REG_LABEL note and
+ update LABEL_NUSES during and after reload.
+
+2008-02-08 Steven Bosscher <stevenb.gcc@gmail.com>
+
+ PR middle-end/34627
+ * combine.c (simplify_if_then_else): Make sure the comparison is
+ against const0_rtx when simplifying to (abs x) or (neg (abs X)).
+
+2008-02-04 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/33631
+ * expr.c (count_type_elements): Give for unions instead of
+ guessing.
+
+2008-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Backport:
+ 2007-08-02 Nathan Froyd <froydnj@codesourcery.com>
+
+ PR middle-end/25445
+ * varasm.c (default_binds_local_p_1): Consult flag_whole_program
+ if we are compiling with -fPIC.
+
+2008-01-31 Richard Henderson <rth@redhat.com>
+
+ PR c/34993
+ * tree.c (build_type_attribute_qual_variant): Skip TYPE_DOMAIN
+ for unbounded arrays.
+
+2008-01-31 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * config/s390/fixdfdi.h (__fixunstfdi, __fixtfdi): Rearrange
+ the overflow check to make it easier to read.
+ (__fixtfdi): Change the type of the ll member in union
+ long_double to UDItype_x.
+
+2008-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Backport:
+ 2007-11-07 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ PR middle-end/33826
+ * ipa-pure-const (static_execute): Added code to keep recursive
+ functions from being marked as pure or const.
+ * ipa-utils (searchc): Fixed comment.
+
+2008-01-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR libgfortran/34699
+ * pa-hpux.h (LINK_SPEC): Only search /lib/pa1.1 and /usr/lib/pa1.1 on
+ static links.
+ * pa-hpux10.h (LINK_SPEC): Likewise.
+ * pa-hpux11.h (LINK_SPEC): Don't search /lib/pa1.1 and /usr/lib/pa1.1.
+
+2008-01-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/31944
+ * cse.c (remove_pseudo_from_table): New function.
+ (merge_equiv_classes): Use above function to remove pseudo-registers.
+ (invalidate): Likewise.
+
+2007-12-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR driver/33772
+ * collect2.c (SHLIB_SUFFIX): Define if not defined.
+ (write_c_file_stat): Use SHLIB_SUFFIX.
+ * som.h (SHLIB_SUFFIX): Define.
+ * doc/tm.texi (SHLIB_SUFFIX): Document.
+
+2007-12-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/34003
+ * c-decl.c (merge_decls): Copy RTL from olddecl to newdecl.
+ * config/pa/pa.c (pa_encode_section_info): If !first, preserve
+ SYMBOL_FLAG_REFERENCED flag.
+
+2007-12-19 Kaz Kylheku <kaz@zeugmasystems.com>
+
+ PR rtl-optimization/34456
+ * resource.c (mark_set_resources): Use regs_invalidated_by_call
+ rather than call_used_regs and global_regs.
+
+2007-11-29 Matthias Klose <doko@ubuntu.com>
+
+ Backport from mainline:
+ 2007-11-17 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/34130
+ * fold-const.c (extract_muldiv_1): Do not move negative
+ constants inside ABS_EXPR.
+
2007-11-16 Richard Guenther <rguenther@suse.de>
PR middle-end/34030
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 2d6de9bd055..1c2bd7cba60 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20071124
+20080704
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index dad57a4c6ac..8fb60d2b6ef 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,17 @@
+2008-02-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ PR documentation/15479
+ * gnat_ugn.texi: In non-code, avoid space before colon.
+ (Regular Expressions in gnatfind and gnatxref): Fix indentation.
+ (Examples of gnatxref Usage): Use @command{vi} instead of
+ @file{vi}.
+ (Character Set Control): Do not use @code for UTF-8.
+ (Validity Checking): Fix typo "NaNs" instead of "NaN's". Do not
+ use @code for IEEE.
+ * gnat_rm.texi (Aggregates with static bounds): Fix typo in code
+ sample.
+ * gnat_rm.texi, gnat_ugn.texi: Fix typos. Bump copyright years.
+
2007-02-20 Eric Botcazou <ebotcazou@adacore.com>
PR ada/30684
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 9baa081a703..73845ed294e 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -32,7 +32,7 @@
@end direntry
@copying
-Copyright @copyright{} 1995-2004, Free Software Foundation
+Copyright @copyright{} 1995-2004, 2005, 2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
@@ -1657,7 +1657,7 @@ region as the function to which they apply.
pragma applies. If more than one function name exists of this name in
the declarative part you must use the @code{Parameter_Types} and
@code{Result_Type} parameters is mandatory to achieve the required
-unique designation. @var{subtype_ mark}s in these parameters must
+unique designation. @var{subtype_mark}s in these parameters must
exactly match the subtypes in the corresponding function specification,
using positional notation to match parameters with subtype marks.
The form with an @code{'Access} attribute can be used to match an
@@ -6750,7 +6750,7 @@ See separate section on source representation.
length. See 2.2(15).
@end cartouche
@noindent
-The maximum line length is 255 characters an the maximum length of a
+The maximum line length is 255 characters and the maximum length of a
lexical element is also 255 characters.
@sp 1
@@ -7854,7 +7854,7 @@ pragma Linker_Options ("-labc" & ASCII.Nul & "-ldef");
causes two separate arguments @code{-labc} and @code{-ldef} to be passed to the
linker. The order of linker options is preserved for a given unit. The final
list of options passed to the linker is in reverse order of the elaboration
-order. For example, linker options fo a body always appear before the options
+order. For example, linker options for a body always appear before the options
from the corresponding package spec.
@sp 1
@@ -14068,7 +14068,7 @@ generate the equivalent of
Cr_Var1 (4) := 11;
for I in Cr_Var2'range loop
- Cr_Var2 (I) := =-1;
+ Cr_Var2 (I) := -1;
end loop;
@end smallexample
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 4f4e5852b30..68eb5675426 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -111,7 +111,8 @@
@c %**end of header
@copying
-Copyright @copyright{} 1995-2005, Free Software Foundation
+Copyright @copyright{} 1995-2005, 2008 Free Software
+Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
@@ -5190,9 +5191,9 @@ overwriting may occur.
@cindex @option{-gnatVf} (@command{gcc})
In the absence of this switch, validity checking occurs only for discrete
values. If @option{-gnatVf} is specified, then validity checking also applies
-for floating-point values, and NaN's and infinities are considered invalid,
+for floating-point values, and NaNs and infinities are considered invalid,
as well as out of range values for constrained types. Note that this means
-that standard @code{IEEE} infinity mode is not allowed. The exact contexts
+that standard IEEE infinity mode is not allowed. The exact contexts
in which floating-point values are checked depends on the setting of other
options. For example,
@option{^-gnatVif^VALIDITY_CHECKING=(IN_PARAMS,FLOATS)^} or
@@ -6159,7 +6160,7 @@ For full details on the these encoding
methods see @ref{Wide Character Encodings}.
Note that brackets coding is always accepted, even if one of the other
options is specified, so for example @option{-gnatW8} specifies that both
-brackets and @code{UTF-8} encodings will be recognized. The units that are
+brackets and UTF-8 encodings will be recognized. The units that are
with'ed directly or indirectly will be scanned using the specified
representation scheme, and so if one of the non-brackets scheme is
used, it must be used consistently throughout the program. However,
@@ -8787,7 +8788,7 @@ $ gnatmake /SOURCE_SEARCH=@i{[INCLUDE_DIR]}
@item
Using @command{gnatmake} along with the
@option{^-m (minimal recompilation)^/MINIMAL_RECOMPILATION^}
-switch provides a mechanism for avoiding unnecessary rcompilations. Using
+switch provides a mechanism for avoiding unnecessary recompilations. Using
this switch,
you can update the comments/format of your
source files without having to recompile everything. Note, however, that
@@ -11393,7 +11394,7 @@ reserved words currently used in project file syntax are:
@end itemize
@noindent
-Comments in project files have the same syntax as in Ada, two consecutives
+Comments in project files have the same syntax as in Ada, two consecutive
hyphens through the end of the line.
@node Packages
@@ -14049,7 +14050,7 @@ the source path. If you specify directories, no result is produced.
@end table
@noindent
-The switches can be :
+The switches can be:
@table @option
@c !sort!
@item ^-a^/ALL_FILES^
@@ -14418,14 +14419,14 @@ specifies the command used to debug the application
@noindent
As specified in the section about @command{gnatfind}, the pattern can be a
regular expression. Actually, there are to set of regular expressions
-which are recognized by the program :
+which are recognized by the program:
@table @code
@item globbing patterns
These are the most usual regular expression. They are the same that you
generally used in a Unix shell command line, or in a DOS session.
-Here is a more formal grammar :
+Here is a more formal grammar:
@smallexample
@group
@iftex
@@ -14436,7 +14437,7 @@ term ::= elmt -- matches elmt
term ::= elmt elmt -- concatenation (elmt then elmt)
term ::= * -- any string of 0 or more characters
term ::= ? -- matches any character
-term ::= [char @{char@}] -- matches any character listed
+term ::= [char @{char@}] -- matches any character listed
term ::= [char - char] -- matches any character in range
@end group
@end smallexample
@@ -14453,9 +14454,9 @@ reference manual style BNF is as follows
@leftskip=.5cm
@end iftex
@group
-regexp ::= term @{| term@} -- alternation (term or term ...)
+regexp ::= term @{| term@} -- alternation (term or term ...)
-term ::= item @{item@} -- concatenation (item then item)
+term ::= item @{item@} -- concatenation (item then item)
item ::= elmt -- match elmt
item ::= elmt * -- zero or more elmt's
@@ -14476,7 +14477,7 @@ nschar ::= any character except ()[].*+?^^^
@end group
@end smallexample
-Following are a few examples :
+Following are a few examples:
@table @samp
@item abcde|fghi
@@ -14487,7 +14488,7 @@ will match any string like 'abd', 'abcd', 'abccd', 'abcccd', and so on
@item [a-z]+
will match any string which has only lowercase characters in it (and at
-least one character
+least one character.
@end table
@end table
@@ -14498,7 +14499,7 @@ least one character
@subsection General Usage
@noindent
-For the following examples, we will consider the following units :
+For the following examples, we will consider the following units:
@smallexample @c ada
@group
@@ -14594,9 +14595,9 @@ of these.
@subsection Using gnatxref with vi
@code{gnatxref} can generate a tags file output, which can be used
-directly from @file{vi}. Note that the standard version of @file{vi}
+directly from @command{vi}. Note that the standard version of @command{vi}
will not work properly with overloaded symbols. Consider using another
-free implementation of @file{vi}, such as @file{vim}.
+free implementation of @command{vi}, such as @command{vim}.
@smallexample
$ gnatxref -v gnatfind.adb > tags
@@ -14606,7 +14607,7 @@ $ gnatxref -v gnatfind.adb > tags
will generate the tags file for @code{gnatfind} itself (if the sources
are in the search path!).
-From @file{vi}, you can then use the command @samp{:tag @i{entity}}
+From @command{vi}, you can then use the command @samp{:tag @i{entity}}
(replacing @i{entity} by whatever you are looking for), and vi will
display a new file with the corresponding declaration of entity.
@end ifclear
@@ -17880,7 +17881,7 @@ GLIB=...
# The directories for the libraries
# (This macro expands the list of CSC to the list of shared libraries, you
-# could simply use the expanded form :
+# could simply use the expanded form:
# LIB_DIR=aa/lib/libaa.so bb/lib/libbb.so cc/lib/libcc.so
LIB_DIR=$@{foreach dir,$@{CSC_LIST@},$@{dir@}/lib/lib$@{dir@}.so@}
@@ -19051,7 +19052,7 @@ You can pass it as many Ada files as you want. @code{gnathtml} will generate
an html file for every ada file, and a global file called @file{index.htm}.
This file is an index of every identifier defined in the files.
-The available switches are the following ones :
+The available switches are the following ones:
@table @option
@item -83
@@ -19140,7 +19141,7 @@ Operating System via the Internet.
On Unix systems, you may want to modify the first line of the script
@code{gnathtml}, to explicitly tell the Operating system where Perl
-is. The syntax of this line is :
+is. The syntax of this line is:
@smallexample
#!full_path_name_to_perl
@end smallexample
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index de02716273b..0cfbfc75400 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1651,6 +1651,9 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
}
}
+ /* Keep the old rtl since we can safely use it. */
+ if (HAS_RTL_P (olddecl))
+ COPY_DECL_RTL (olddecl, newdecl);
/* Merge the type qualifiers. */
if (TREE_READONLY (newdecl))
diff --git a/gcc/collect2.c b/gcc/collect2.c
index f4cc46aad50..b39e61eb961 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -130,6 +130,10 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define SCAN_LIBRARIES
#endif
+#ifndef SHLIB_SUFFIX
+#define SHLIB_SUFFIX ".so"
+#endif
+
#ifdef USE_COLLECT2
int do_collecting = 1;
#else
@@ -1791,9 +1795,9 @@ write_c_file_stat (FILE *stream, const char *name ATTRIBUTE_UNUSED)
}
else
{
- if (strncmp (q, ".so", 3) == 0)
+ if (strncmp (q, SHLIB_SUFFIX, strlen (SHLIB_SUFFIX)) == 0)
{
- q += 3;
+ q += strlen (SHLIB_SUFFIX);
break;
}
else
diff --git a/gcc/combine.c b/gcc/combine.c
index 653ffb7b22c..55cc23615fe 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5130,9 +5130,10 @@ simplify_if_then_else (rtx x)
/* Look for cases where we have (abs x) or (neg (abs X)). */
if (GET_MODE_CLASS (mode) == MODE_INT
+ && comparison_p
+ && XEXP (cond, 1) == const0_rtx
&& GET_CODE (false_rtx) == NEG
&& rtx_equal_p (true_rtx, XEXP (false_rtx, 0))
- && comparison_p
&& rtx_equal_p (true_rtx, XEXP (cond, 0))
&& ! side_effects_p (true_rtx))
switch (true_code)
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
index aac59a08e36..61a13a137e5 100644
--- a/gcc/config/i386/t-linux64
+++ b/gcc/config/i386/t-linux64
@@ -4,9 +4,16 @@
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
$(srcdir)/config/i386/libgcc-x86_64-glibc.ver
+# On Debian, Ubuntu and other derivative distributions, the 32bit libraries
+# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to
+# /lib and /usr/lib, while other distributions install libraries into /lib64
+# and /usr/lib64. The LSB does not enforce the use of /lib64 and /usr/lib64,
+# it doesn't tell anything about the 32bit libraries on those systems. Set
+# MULTILIB_OSDIRNAMES according to what is found on the target.
+
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 521afa4bf1a..9cf221b3365 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -6534,7 +6534,7 @@ mips_emit_loadgp (void)
offset = mips_unspec_address (addr, SYMBOL_GOTOFF_LOADGP);
incoming_address = gen_rtx_REG (Pmode, PIC_FUNCTION_ADDR_REGNUM);
emit_insn (gen_loadgp (offset, incoming_address));
- if (!TARGET_EXPLICIT_RELOCS)
+ if (!TARGET_EXPLICIT_RELOCS || current_function_profile)
emit_insn (gen_loadgp_blockage ());
}
}
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index e2ab7fdb999..2c7922ef789 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -3947,12 +3947,11 @@
}
[(set_attr "length" "12")])
-;; The use of gp is hidden when not using explicit relocations.
;; This blockage instruction prevents the gp load from being
;; scheduled after an implicit use of gp. It also prevents
;; the load from being deleted as dead.
(define_insn "loadgp_blockage"
- [(unspec_volatile [(reg:DI 28)] UNSPEC_BLOCKAGE)]
+ [(unspec_volatile [(reg:SI 28)] UNSPEC_BLOCKAGE)]
""
""
[(set_attr "type" "unknown")
diff --git a/gcc/config/pa/pa-hpux.h b/gcc/config/pa/pa-hpux.h
index 4b6c91092f3..8c85dc89f02 100644
--- a/gcc/config/pa/pa-hpux.h
+++ b/gcc/config/pa/pa-hpux.h
@@ -98,7 +98,7 @@ Boston, MA 02110-1301, USA. */
#undef LINK_SPEC
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
#define LINK_SPEC \
- "%{!mpa-risc-1-0:%{!march=1.0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
+ "%{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
#else
#define LINK_SPEC \
"%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h
index bc07e5b391a..94429b31863 100644
--- a/gcc/config/pa/pa-hpux10.h
+++ b/gcc/config/pa/pa-hpux10.h
@@ -85,7 +85,7 @@ Boston, MA 02110-1301, USA. */
#undef LINK_SPEC
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
#define LINK_SPEC \
- "%{!mpa-risc-1-0:%{!march=1.0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\
+ "%{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\
%{!shared:%{p:-L/lib/libp %{!static:\
%nWarning: consider linking with `-static' as system libraries with\n\
%n profiling support are only provided in archive format}}}\
diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h
index ad16bb41e3f..7a783f8a035 100644
--- a/gcc/config/pa/pa-hpux11.h
+++ b/gcc/config/pa/pa-hpux11.h
@@ -106,18 +106,6 @@ Boston, MA 02110-1301, USA. */
/* We can debug dynamically linked executables on hpux11; we also
want dereferencing of a NULL pointer to cause a SEGV. */
#undef LINK_SPEC
-#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
-#define LINK_SPEC \
- "%{!mpa-risc-1-0:%{!march=1.0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\
- %{!shared:%{p:-L/lib/libp -L/usr/lib/libp %{!static:\
- %nWarning: consider linking with `-static' as system libraries with\n\
- %n profiling support are only provided in archive format}}}\
- %{!shared:%{pg:-L/lib/libp -L/usr/lib/libp %{!static:\
- %nWarning: consider linking with `-static' as system libraries with\n\
- %n profiling support are only provided in archive format}}}\
- -z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
- %{static:-a archive} %{shared:-b}"
-#else
#define LINK_SPEC \
"%{!shared:%{p:-L/lib/libp -L/usr/lib/libp %{!static:\
%nWarning: consider linking with `-static' as system libraries with\n\
@@ -127,7 +115,6 @@ Boston, MA 02110-1301, USA. */
%n profiling support are only provided in archive format}}}\
-z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
%{static:-a archive} %{shared:-b}"
-#endif
/* hpux 11 has posix threads. */
#undef LIB_SPEC
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 37b051315e8..2602c94a0f7 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -607,6 +607,8 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
/* Labels need special handling. */
if (pic_label_operand (orig, mode))
{
+ rtx insn;
+
/* We do not want to go through the movXX expanders here since that
would create recursion.
@@ -617,7 +619,24 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
So instead we just emit the raw set, which avoids the movXX
expanders completely. */
mark_reg_pointer (reg, BITS_PER_UNIT);
- emit_insn (gen_rtx_SET (VOIDmode, reg, orig));
+ insn = emit_insn (gen_rtx_SET (VOIDmode, reg, orig));
+
+ /* Put a REG_EQUAL note on this insn, so that it can be optimized. */
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig, REG_NOTES (insn));
+
+ /* During and after reload, we need to generate a REG_LABEL note and
+ update LABEL_NUSES because this is not done automatically. */
+ if (reload_in_progress || reload_completed)
+ {
+ /* Extract LABEL_REF. */
+ if (GET_CODE (orig) == CONST)
+ orig = XEXP (XEXP (orig, 0), 0);
+ /* Extract CODE_LABEL. */
+ orig = XEXP (orig, 0);
+ REG_NOTES (insn) = gen_rtx_INSN_LIST (REG_LABEL, orig,
+ REG_NOTES (insn));
+ LABEL_NUSES (orig)++;
+ }
current_function_uses_pic_offset_table = 1;
return reg;
}
@@ -7545,6 +7564,12 @@ hppa_encode_label (rtx sym)
static void
pa_encode_section_info (tree decl, rtx rtl, int first)
{
+ int old_referenced = 0;
+
+ if (!first && MEM_P (rtl) && GET_CODE (XEXP (rtl, 0)) == SYMBOL_REF)
+ old_referenced
+ = SYMBOL_REF_FLAGS (XEXP (rtl, 0)) & SYMBOL_FLAG_REFERENCED;
+
default_encode_section_info (decl, rtl, first);
if (first && TEXT_SPACE_P (decl))
@@ -7553,6 +7578,8 @@ pa_encode_section_info (tree decl, rtx rtl, int first)
if (TREE_CODE (decl) == FUNCTION_DECL)
hppa_encode_label (XEXP (rtl, 0));
}
+ else if (old_referenced)
+ SYMBOL_REF_FLAGS (XEXP (rtl, 0)) |= old_referenced;
}
/* This is sort of inverse to pa_encode_section_info. */
diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h
index e397b9dfd8e..9754490d3d8 100644
--- a/gcc/config/pa/som.h
+++ b/gcc/config/pa/som.h
@@ -360,3 +360,7 @@ do { \
/* We can't handle weak aliases, and therefore can't support pragma weak.
Suppress the use of pragma weak in gthr-dce.h and gthr-posix.h. */
#define GTHREAD_USE_WEAK 0
+
+/* Shared library suffix. Collect2 strips the version string after
+ this suffix when generating constructor/destructor names. */
+#define SHLIB_SUFFIX ".sl"
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 95af8753e67..78c0170d521 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -9752,6 +9752,7 @@
""
"
{
+ operands[1] = force_reg (Pmode, operands[1]);
operands[2] = gen_reg_rtx (Pmode);
operands[3] = gen_frame_mem (Pmode, operands[0]);
operands[4] = gen_frame_mem (Pmode, operands[1]);
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
index 2c30a89892f..d61cd80ca16 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -6,12 +6,19 @@ LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \
TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
+# On Debian, Ubuntu and other derivative distributions, the 32bit libraries
+# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to
+# /lib and /usr/lib, while other distributions install libraries into /lib64
+# and /usr/lib64. The LSB does not enforce the use of /lib64 and /usr/lib64,
+# it doesn't tell anything about the 32bit libraries on those systems. Set
+# MULTILIB_OSDIRNAMES according to what is found on the target.
+
MULTILIB_OPTIONS = m64/m32 msoft-float
MULTILIB_DIRNAMES = 64 32 nof
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
MULTILIB_EXCEPTIONS = m64/msoft-float
MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES = ../lib64 ../lib nof
+MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
# We want fine grained libraries, so use the new code to build the
diff --git a/gcc/config/s390/fixdfdi.h b/gcc/config/s390/fixdfdi.h
index fd12243a381..95a5eef0173 100644
--- a/gcc/config/s390/fixdfdi.h
+++ b/gcc/config/s390/fixdfdi.h
@@ -78,13 +78,15 @@ __fixunstfdi (long double a1)
if ((EXPD(dl1) == 0x7fff) && !FRACD_ZERO_P (dl1))
return 0x0ULL;
- /* If the upper ll part of the mantissa isn't
- zeroed out after shifting the number would be to large. */
- if (exp >= -HIGH_LL_FRAC_BITS)
- return 0xFFFFFFFFFFFFFFFFULL;
-
+ /* One extra bit is needed for the unit bit which is appended by
+ MANTD_HIGH_LL on the left of the matissa. */
exp += HIGH_LL_FRAC_BITS + 1;
+ /* If the result would still need a left shift it will be to large
+ to be represented. */
+ if (exp > 0)
+ return 0xFFFFFFFFFFFFFFFFULL;
+
l = MANTD_LOW_LL (dl1) >> (HIGH_LL_FRAC_BITS + 1)
| MANTD_HIGH_LL (dl1) << (64 - (HIGH_LL_FRAC_BITS + 1));
@@ -118,7 +120,7 @@ union double_long {
struct {
SItype_x i[4]; /* 32 bit parts: 0 upper ... 3 lowest */
} l;
- DItype_x ll[2]; /* 64 bit parts: 0 upper, 1 lower */
+ UDItype_x ll[2]; /* 64 bit parts: 0 upper, 1 lower */
};
DItype_x __fixtfdi (long double a1);
@@ -150,17 +152,21 @@ __fixtfdi (long double a1)
if ((EXPD(dl1) == 0x7fff) && !FRACD_ZERO_P (dl1))
return 0x8000000000000000ULL;
- /* If the upper ll part of the mantissa isn't
- zeroed out after shifting the number would be to large. */
- if (exp >= -HIGH_LL_FRAC_BITS)
+ /* One extra bit is needed for the unit bit which is appended by
+ MANTD_HIGH_LL on the left of the matissa. */
+ exp += HIGH_LL_FRAC_BITS + 1;
+
+ /* If the result would still need a left shift it will be to large
+ to be represented. Compared to the unsigned variant we have to
+ take care that there is still space for the sign bit to be
+ applied. So we can only go on if there is a right-shift by one
+ or more. */
+ if (exp >= 0)
{
- l = (long long)1 << 63; /* long int min */
+ l = (long long)1 << 63; /* long long int min */
return SIGND (dl1) ? l : l - 1;
}
- /* The extra bit is needed for the sign bit. */
- exp += HIGH_LL_FRAC_BITS + 1;
-
l = MANTD_LOW_LL (dl1) >> (HIGH_LL_FRAC_BITS + 1)
| MANTD_HIGH_LL (dl1) << (64 - (HIGH_LL_FRAC_BITS + 1));
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 778559062ef..258ecc06bad 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,34 @@
+2008-02-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/34950
+ * pt.c (resolve_overloaded_unification): Set processing_template_decl
+ while we look for possible bindings.
+
+2008-02-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/34774
+ * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
+ of enumerators, too.
+
+2008-01-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/35007
+ * class.c (build_base_path): Fix !want_pointer case.
+
+2008-01-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/27177
+ * class.c (build_base_path): Fix previous change.
+
+ PR c++/27177
+ * class.c (build_base_path): Don't mess with virtual access if
+ skip_evaluation.
+ * call.c (standard_conversion): Don't check whether source type
+ is complete.
+
+ PR c++/33959
+ * pt.c (tsubst_aggr_type): Make sure our context is complete.
+
2007-10-26 Jakub Jelinek <jakub@redhat.com>
PR c++/33744
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index b9941bc4015..508982d3e4c 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -714,19 +714,7 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
that necessitates this conversion is ill-formed.
Therefore, we use DERIVED_FROM_P, and do not check
access or uniqueness. */
- && DERIVED_FROM_P (TREE_TYPE (to), TREE_TYPE (from))
- /* If FROM is not yet complete, then we must be parsing
- the body of a class. We know what's derived from
- what, but we can't actually perform a
- derived-to-base conversion. For example, in:
-
- struct D : public B {
- static const int i = sizeof((B*)(D*)0);
- };
-
- the D*-to-B* conversion is a reinterpret_cast, not a
- static_cast. */
- && COMPLETE_TYPE_P (TREE_TYPE (from)))
+ && DERIVED_FROM_P (TREE_TYPE (to), TREE_TYPE (from)))
{
from =
cp_build_qualified_type (TREE_TYPE (to),
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 5249c8b72ab..6cb040dbea5 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -294,6 +294,16 @@ build_base_path (enum tree_code code,
/* Do we need to look in the vtable for the real offset? */
virtual_access = (v_binfo && fixed_type_p <= 0);
+ /* Don't bother with the calculations inside sizeof; they'll ICE if the
+ source type is incomplete and the pointer value doesn't matter. */
+ if (skip_evaluation)
+ {
+ expr = build_nop (build_pointer_type (target_type), expr);
+ if (!want_pointer)
+ expr = build_indirect_ref (expr, NULL);
+ return expr;
+ }
+
/* Do we need to check for a null pointer? */
if (want_pointer && !nonnull)
{
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index cce50a2ea36..9a7c806dc67 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6164,8 +6164,14 @@ tsubst_aggr_type (tree t,
up. */
context = TYPE_CONTEXT (t);
if (context)
- context = tsubst_aggr_type (context, args, complain,
- in_decl, /*entering_scope=*/1);
+ {
+ context = tsubst_aggr_type (context, args, complain,
+ in_decl, /*entering_scope=*/1);
+ /* If context is a nested class inside a class template,
+ it may still need to be instantiated (c++/33959). */
+ if (TYPE_P (context))
+ complete_type (context);
+ }
/* Then, figure out what arguments are appropriate for the
type we are trying to find. For example, given:
@@ -9901,6 +9907,7 @@ resolve_overloaded_unification (tree tparms,
if (TREE_CODE (fn) != TEMPLATE_DECL)
continue;
+ ++processing_template_decl;
subargs = get_bindings (fn, DECL_TEMPLATE_RESULT (fn),
expl_subargs, /*check_ret=*/false);
if (subargs)
@@ -9909,6 +9916,7 @@ resolve_overloaded_unification (tree tparms,
good += try_one_overload (tparms, targs, tempargs, parm,
elem, strict, sub_strict, addr_p);
}
+ --processing_template_decl;
}
}
else
@@ -12673,7 +12681,7 @@ value_dependent_expression_p (tree expression)
/* A non-type template parm. */
if (DECL_TEMPLATE_PARM_P (expression))
return true;
- return false;
+ return value_dependent_expression_p (DECL_INITIAL (expression));
case VAR_DECL:
/* A constant with integral or enumeration type and is initialized
diff --git a/gcc/cse.c b/gcc/cse.c
index 70fec9eec63..a35c41c8a0d 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -583,7 +583,8 @@ static void delete_reg_equiv (unsigned int);
static int mention_regs (rtx);
static int insert_regs (rtx, struct table_elt *, int);
static void remove_from_table (struct table_elt *, unsigned);
-static struct table_elt *lookup (rtx, unsigned, enum machine_mode);
+static void remove_pseudo_from_table (rtx, unsigned);
+static struct table_elt *lookup (rtx, unsigned, enum machine_mode);
static struct table_elt *lookup_for_remove (rtx, unsigned, enum machine_mode);
static rtx lookup_as_function (rtx, enum rtx_code);
static struct table_elt *insert (rtx, struct table_elt *, unsigned,
@@ -1382,6 +1383,19 @@ remove_from_table (struct table_elt *elt, unsigned int hash)
table_size--;
}
+/* Same as above, but X is a pseudo-register. */
+
+static void
+remove_pseudo_from_table (rtx x, unsigned int hash)
+{
+ struct table_elt *elt;
+
+ /* Because a pseudo-register can be referenced in more than one
+ mode, we might have to remove more than one table entry. */
+ while ((elt = lookup_for_remove (x, hash, VOIDmode)))
+ remove_from_table (elt, hash);
+}
+
/* Look up X in the hash table and return its table element,
or 0 if X is not in the table.
@@ -1708,7 +1722,10 @@ merge_equiv_classes (struct table_elt *class1, struct table_elt *class2)
delete_reg_equiv (REGNO (exp));
}
- remove_from_table (elt, hash);
+ if (REG_P (exp) && REGNO (exp) >= FIRST_PSEUDO_REGISTER)
+ remove_pseudo_from_table (exp, hash);
+ else
+ remove_from_table (elt, hash);
if (insert_regs (exp, class1, 0) || need_rehash)
{
@@ -1804,14 +1821,7 @@ invalidate (rtx x, enum machine_mode full_mode)
SUBREG_TICKED (regno) = -1;
if (regno >= FIRST_PSEUDO_REGISTER)
- {
- /* Because a register can be referenced in more than one mode,
- we might have to remove more than one table entry. */
- struct table_elt *elt;
-
- while ((elt = lookup_for_remove (x, hash, GET_MODE (x))))
- remove_from_table (elt, hash);
- }
+ remove_pseudo_from_table (x, hash);
else
{
HOST_WIDE_INT in_table
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 07c3ce1ff88..c5a3d240c64 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7314,6 +7314,14 @@ code must advance @var{ptr} to the beginning of the filename on that
line. Otherwise, it must set @var{ptr} to @code{NULL}.
@end defmac
+@defmac SHLIB_SUFFIX
+Define this macro to a C string constant containing the default shared
+library extension of the target (e.g., @samp{".so"}). @command{collect2}
+strips version information after this suffix when generating global
+constructor and destructor names. This define is only needed on targets
+that use @command{collect2} to process constructors and destructors.
+@end defmac
+
@node Instruction Output
@subsection Output of Assembler Instructions
diff --git a/gcc/expr.c b/gcc/expr.c
index 80c243a410d..f546aef8c2d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4614,14 +4614,7 @@ count_type_elements (tree type, bool allow_flexarr)
case UNION_TYPE:
case QUAL_UNION_TYPE:
- {
- /* Ho hum. How in the world do we guess here? Clearly it isn't
- right to count the fields. Guess based on the number of words. */
- HOST_WIDE_INT n = int_size_in_bytes (type);
- if (n < 0)
- return -1;
- return n / UNITS_PER_WORD;
- }
+ return -1;
case COMPLEX_TYPE:
return 2;
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 5c97369f20d..12a75ab943c 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -5344,6 +5344,9 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
}
break;
}
+ /* If the constant is negative, we cannot simplify this. */
+ if (tree_int_cst_sgn (c) == -1)
+ break;
/* FALLTHROUGH */
case NEGATE_EXPR:
if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
@@ -6302,12 +6305,16 @@ fold_widened_comparison (enum tree_code code, tree type, tree arg0, tree arg1)
if (TYPE_PRECISION (TREE_TYPE (arg0)) <= TYPE_PRECISION (shorter_type))
return NULL_TREE;
- arg1_unw = get_unwidened (arg1, shorter_type);
+ arg1_unw = get_unwidened (arg1, NULL_TREE);
/* If possible, express the comparison in the shorter mode. */
if ((code == EQ_EXPR || code == NE_EXPR
|| TYPE_UNSIGNED (TREE_TYPE (arg0)) == TYPE_UNSIGNED (shorter_type))
&& (TREE_TYPE (arg1_unw) == shorter_type
+ || ((TYPE_PRECISION (shorter_type)
+ >= TYPE_PRECISION (TREE_TYPE (arg1_unw)))
+ && (TYPE_UNSIGNED (shorter_type)
+ == TYPE_UNSIGNED (TREE_TYPE (arg1_unw))))
|| (TREE_CODE (arg1_unw) == INTEGER_CST
&& (TREE_CODE (shorter_type) == INTEGER_TYPE
|| TREE_CODE (shorter_type) == BOOLEAN_TYPE)
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index ae92e7e3af0..ac45705cb0d 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -639,6 +639,7 @@ static_execute (void)
for (i = 0; i < order_pos; i++ )
{
enum pure_const_state_e pure_const_state = IPA_CONST;
+ int count = 0;
node = order[i];
/* Find the worst state for any node in the cycle. */
@@ -655,11 +656,40 @@ static_execute (void)
if (!w_l->state_set_in_source)
{
struct cgraph_edge *e;
+ count++;
+
+ /* FIXME!!! Because of pr33826, we cannot have either
+ immediate or transitive recursive functions marked as
+ pure or const because dce can delete a function that
+ is in reality an infinite loop. A better solution
+ than just outlawing them is to add another bit the
+ functions to distinguish recursive from non recursive
+ pure and const function. This would allow the
+ recursive ones to be cse'd but not dce'd. In this
+ same vein, we could allow functions with loops to
+ also be cse'd but not dce'd.
+
+ Unfortunately we are late in stage 3, and the fix
+ described above is is not appropriate. */
+ if (count > 1)
+ {
+ pure_const_state = IPA_NEITHER;
+ break;
+ }
+
for (e = w->callees; e; e = e->next_callee)
{
struct cgraph_node *y = e->callee;
/* Only look at the master nodes and skip external nodes. */
y = cgraph_master_clone (y);
+
+ /* Check for immediate recursive functions. See the
+ FIXME above. */
+ if (w == y)
+ {
+ pure_const_state = IPA_NEITHER;
+ break;
+ }
if (y)
{
funct_state y_l = get_function_state (y);
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index 76f0f601c16..cd707455b76 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -78,7 +78,7 @@ struct searchc_env {
has been customized for cgraph_nodes. The env parameter is because
it is recursive and there are no nested functions here. This
function should only be called from itself or
- cgraph_reduced_inorder. ENV is a stack env and would be
+ ipa_utils_reduced_inorder. ENV is a stack env and would be
unnecessary if C had nested functions. V is the node to start
searching from. */
diff --git a/gcc/resource.c b/gcc/resource.c
index 95f1628a006..4eefab6c90b 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -664,9 +664,8 @@ mark_set_resources (rtx x, struct resources *res, int in_dest,
rtx link;
res->cc = res->memory = 1;
- for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
- if (call_used_regs[r] || global_regs[r])
- SET_HARD_REG_BIT (res->regs, r);
+
+ IOR_HARD_REG_SET (res->regs, regs_invalidated_by_call);
for (link = CALL_INSN_FUNCTION_USAGE (x);
link; link = XEXP (link, 1))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7d58214f132..1348d2edc17 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,152 @@
+2008-08-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/37103
+ * gcc.c-torture/execute/20080813-1.c: New test.
+
+2008-05-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/nested-func-6.c: New test.
+
+2008-04-08 Richard Guenther <rguenther@suse.de>
+
+ * gcc.c-torture/execute/20080408-1.c: New testcase.
+
+2008-03-25 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline:
+ 2008-02-12 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/35163
+ * gcc.c-torture/execute/pr35163.c: New testcase.
+
+2008-02-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Backport:
+ 2005-11-30 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/21655
+ * g++.dg/tree-ssa/pr14814.C: Remove XFAIL.
+
+2008-02-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * obj-c++.dg/bitfield-1.mm: Expect failures.
+ * obj-c++.dg/bitfield-4.mm: Likewise.
+ * obj-c++.dg/cxx-ivars-2.mm: Likewise.
+ * obj-c++.dg/encode-8.mm: Likewise.
+ * obj-c++.dg/isa-field-1.mm: Likewise.
+ * obj-c++.dg/layout-1.mm: Likewise.
+ * obj-c++.dg/lookup-2.mm: Likewise.
+ * obj-c++.dg/try-catch-2.mm: Likewise.
+ * obj-c++.dg/try-catch-9.mm: Likewise.
+
+2008-02-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ PR objc++/34193
+ * obj-c++.dg/gnu-runtime-2.mm: Fix signature of function main().
+
+2008-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ PR objc++/27232
+
+ Backport:
+ 2006-09-22 Mike Stump <mrs@apple.com>
+
+ * obj-c++.dg/encode-3.mm: Fix for 64-bit support.
+
+2008-02-04 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/33631
+ * gcc.c-torture/execute/pr33631.c: New testcase.
+
+2008-01-31 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * gcc.dg/tf_to_di-1.c: New testcase.
+
+2008-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Backport:
+ 2008-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/pr33826.c: Require nonpic.
+
+ 2007-11-08 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ PR middle-end/33826
+ * gcc.dg/pr33826.c: New.
+ * gcc.dg/tree-ssa/20030714-1.c: Removed two tests that depend on
+ recursive functions being marked pure or const.
+
+2008-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/vect/vect-ifcvt-9.c: Use inline.
+
+2008-01-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * g++.dg/eh/ia64-2.C: Add "dg-require-weak" statement. Place
+ "dg-do run" statement before "dg-require-weak" statement.
+ * g++.dg/eh/weak1.C: Likewise.
+
+2008-01-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Backport:
+ 2007-03-21 Richard Sandiford <richard@codesourcery.com>
+
+ * gcc.target/i386/pr21291.c: Require nonpic or ! ilp32.
+
+2008-01-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/compile/20080114-1.c: Use empty asm statements.
+
+2008-01-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/compile/20080114-1.c: New test.
+
+2008-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.c-torture/execute/builtins/chk.h: Don't check !__PIE__.
+ Also check __pic__.
+ * lib/target-supports.exp (check_effective_target_nonpic): Likewise.
+ * gcc.dg/assign-warn-3.c: Use "static inline" instead of "inline".
+
+ Backport:
+
+ 2007-03-21 Richard Sandiford <richard@codesourcery.com>
+ * gcc.c-torture/execute/builtins/chk.h (LOCAL): Define.
+ * gcc.c-torture/execute/builtins/sprintf-chk.c (s1): Make LOCAL.
+ * gcc.c-torture/execute/builtins/stpcpy-chk.c (s1): Likewise.
+ * gcc.c-torture/execute/builtins/strcpy-chk.c (s1): Likewise.
+
+ 2007-07-26 Nathan Froyd <froydnj@codesourcery.com>
+ PR/19232
+ * gcc.dg/assign-warn-3.c (f0): Declare as inline.
+ (f1): Likewise.
+
+ 2007-01-15 Dale Johannesen <dalej@apple.com>
+ * gcc.dg/tree-ssa/loop-3.c: Disable with -fpic or -fPIC.
+
+ 2007-03-21 Richard Sandiford <richard@codesourcery.com>
+ * lib/target-supports.exp (check_effective_target_nonpic): New
+ procedure.
+
+2007-12-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/34003
+ * gcc.dg/pr34003-1.c: New test.
+ * gcc.dg/pr34003-2.c: New.
+
+2007-12-19 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ PR rtl-optimization/34456
+ * gcc.c-torture/execute/pr34456.c: New test.
+
+2007-11-29 Matthias Klose <doko@ubuntu.com>
+
+ Backport from mainline:
+ 2007-11-17 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/34130
+ * gcc.c-torture/execute/pr34130.c: New testcase.
+
2007-11-16 Richard Guenther <rguenther@suse.de>
PR middle-end/34030
diff --git a/gcc/testsuite/g++.dg/eh/ia64-2.C b/gcc/testsuite/g++.dg/eh/ia64-2.C
index 0390bc88305..aa005d8ed36 100644
--- a/gcc/testsuite/g++.dg/eh/ia64-2.C
+++ b/gcc/testsuite/g++.dg/eh/ia64-2.C
@@ -5,8 +5,9 @@
// But br.call returns to the start of the next bundlem so during
// unwinding the call was considered to be outside of the EH region
// while it should have been inside.
-// { dg-options "-O2" }
// { dg-do run }
+// { dg-require-weak "" }
+// { dg-options "-O2" }
struct A {};
struct B { virtual ~B(); };
diff --git a/gcc/testsuite/g++.dg/eh/weak1.C b/gcc/testsuite/g++.dg/eh/weak1.C
index 09f2fcba4df..3034e809ea7 100644
--- a/gcc/testsuite/g++.dg/eh/weak1.C
+++ b/gcc/testsuite/g++.dg/eh/weak1.C
@@ -1,6 +1,6 @@
// PR target/29487
-// { dg-require-weak "" }
// { dg-do run { xfail "hppa*-hp-hpux11.*" } }
+// { dg-require-weak "" }
// { dg-additional-sources "weak1-a.cc" }
// { dg-options "-O2" }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr14814.C b/gcc/testsuite/g++.dg/tree-ssa/pr14814.C
index c793f88f22f..add6e11635a 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr14814.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr14814.C
@@ -14,7 +14,7 @@ int foo(XX& r) {
if (r.direction().y() < 0.000001) return 0;
return 1; }
-/* { dg-final { scan-tree-dump-times "&this" 0 "forwprop2" { xfail *-*-* } } }*/
+/* { dg-final { scan-tree-dump-times "&this" 0 "forwprop2" } }*/
/* { dg-final { scan-tree-dump-times "&r" 0 "forwprop2" } } */
/* { dg-final { cleanup-tree-dump "forwprop2" } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080114-1.c b/gcc/testsuite/gcc.c-torture/compile/20080114-1.c
new file mode 100644
index 00000000000..f251c22b96e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20080114-1.c
@@ -0,0 +1,14 @@
+/* PR rtl-optimization/31944 */
+/* Origin: Aurelien Jarno <aurelien@aurel32.net> */
+
+int type;
+
+void stuck(int res)
+{
+ if (type == 1) {
+ if (res == 0) asm volatile("");
+ }
+ else if (type == 0) {
+ if (res == 0) asm volatile("" : : "i" (0));
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34993.c b/gcc/testsuite/gcc.c-torture/compile/pr34993.c
new file mode 100644
index 00000000000..ced4d5646c1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr34993.c
@@ -0,0 +1,5 @@
+/* PR c/34993 */
+
+/* { dg-do compile } */
+
+typedef int x[] __attribute((may_alias));
diff --git a/gcc/testsuite/gcc.c-torture/execute/20080408-1.c b/gcc/testsuite/gcc.c-torture/execute/20080408-1.c
new file mode 100644
index 00000000000..9e1ff639517
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20080408-1.c
@@ -0,0 +1,11 @@
+extern void abort (void);
+int main ()
+{
+ short ssi = 126;
+ unsigned short usi = 65280;
+ int fail = !(ssi < usi);
+ if (fail)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/20080813-1.c b/gcc/testsuite/gcc.c-torture/execute/20080813-1.c
new file mode 100644
index 00000000000..9ef6bc2e2c5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20080813-1.c
@@ -0,0 +1,30 @@
+/* PR middle-end/37103 */
+
+extern void abort (void);
+
+void
+foo (unsigned short x)
+{
+ signed char y = -1;
+ if (x == y)
+ abort ();
+}
+
+void
+bar (unsigned short x)
+{
+ unsigned char y = -1;
+ if (x == y)
+ abort ();
+}
+
+int
+main (void)
+{
+ if (sizeof (int) == sizeof (short))
+ return 0;
+ foo (-1);
+ if (sizeof (short) > 1)
+ bar (-1);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/chk.h b/gcc/testsuite/gcc.c-torture/execute/builtins/chk.h
index dfef410c61b..f91ec78c4ec 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/chk.h
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/chk.h
@@ -79,3 +79,11 @@ extern volatile int memset_disallowed, strcpy_disallowed, stpcpy_disallowed;
extern volatile int strncpy_disallowed, strcat_disallowed, strncat_disallowed;
extern volatile int sprintf_disallowed, vsprintf_disallowed;
extern volatile int snprintf_disallowed, vsnprintf_disallowed;
+
+/* A storage class that ensures that declarations bind locally. We want
+ to test non-static declarations where we know it is safe to do so. */
+#if __PIC__ || __pic__
+#define LOCAL static
+#else
+#define LOCAL
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c
index 95d2a9d2826..2862ab6dc91 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c
@@ -13,7 +13,7 @@ extern int sprintf (char *, const char *, ...);
#include "chk.h"
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
char p[32] = "";
char *s2 = "defg";
char *s3 = "FGH";
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.c
index b292c0aec87..6091f129359 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.c
@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t);
#include "chk.h"
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
char p[32] = "";
char *s2 = "defg";
char *s3 = "FGH";
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.c
index 002dd19500e..b3c1a3899d9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.c
@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t);
#include "chk.h"
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
char p[32] = "";
char *s2 = "defg";
char *s3 = "FGH";
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr33631.c b/gcc/testsuite/gcc.c-torture/execute/pr33631.c
new file mode 100644
index 00000000000..840fd0dc482
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr33631.c
@@ -0,0 +1,14 @@
+typedef union
+{
+ int __lock;
+} pthread_mutex_t;
+
+extern void abort (void);
+
+int main()
+{
+ struct { int c; pthread_mutex_t m; } r = { .m = 0 };
+ if (r.c != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr34130.c b/gcc/testsuite/gcc.c-torture/execute/pr34130.c
new file mode 100644
index 00000000000..b528ff22b8a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr34130.c
@@ -0,0 +1,12 @@
+extern void abort (void);
+int foo (int i)
+{
+ return -2 * __builtin_abs(i - 2);
+}
+int main()
+{
+ if (foo(1) != -2
+ || foo(3) != -2)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr34456.c b/gcc/testsuite/gcc.c-torture/execute/pr34456.c
new file mode 100644
index 00000000000..526c954e55a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr34456.c
@@ -0,0 +1,30 @@
+#include <stdlib.h>
+
+int __attribute__ ((noinline)) debug (void) { return 1; }
+int errors;
+
+struct s { int elt; int (*compare) (int); };
+
+static int
+compare (const void *x, const void *y)
+{
+ const struct s *s1 = x, *s2 = y;
+ int (*compare1) (int);
+ int elt2;
+
+ compare1 = s1->compare;
+ elt2 = s2->elt;
+ if (elt2 != 0 && debug () && compare1 (s1->elt) != 0)
+ errors++;
+ return compare1 (elt2);
+}
+
+int bad_compare (int x) { return -x; }
+struct s array[2] = { { 1, bad_compare }, { -1, bad_compare } };
+
+int
+main (void)
+{
+ qsort (array, 2, sizeof (struct s), compare);
+ return errors == 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr35163.c b/gcc/testsuite/gcc.c-torture/execute/pr35163.c
new file mode 100644
index 00000000000..4950d6d2027
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr35163.c
@@ -0,0 +1,11 @@
+extern void abort(void);
+
+int main()
+{
+ signed char a = -30;
+ signed char b = -31;
+ if (a > (unsigned short)b)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/assign-warn-3.c b/gcc/testsuite/gcc.dg/assign-warn-3.c
index 1463fce0f68..4ff7b88fa5f 100644
--- a/gcc/testsuite/gcc.dg/assign-warn-3.c
+++ b/gcc/testsuite/gcc.dg/assign-warn-3.c
@@ -5,9 +5,9 @@
/* { dg-options "-O3 -std=c99 -pedantic-errors" } */
/* This is valid to execute, so maybe shouldn't warn at all. */
-void f0(x) signed char *x; { }
+static inline void f0(x) signed char *x; { }
void g0(unsigned char *x) { f0(x); } /* { dg-warning "warning: pointer targets in passing argument 1 of 'f0' differ in signedness" } */
/* This is undefined on execution but still must compile. */
-void f1(x) int *x; { }
+static inline void f1(x) int *x; { }
void g1(unsigned int *x) { f1(x); } /* { dg-warning "warning: pointer targets in passing argument 1 of 'f1' differ in signedness" } */
diff --git a/gcc/testsuite/gcc.dg/nested-func-6.c b/gcc/testsuite/gcc.dg/nested-func-6.c
new file mode 100644
index 00000000000..3bae4db352e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/nested-func-6.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -Winline" } */
+
+static inline int foo1 (int a)
+{ /* { dg-bogus "function not inlinable" } */
+ void bar1 (int b)
+ {}
+ return a;
+}
+
+int foo2 (int a)
+{
+ return foo1 (a);
+}
diff --git a/gcc/testsuite/gcc.dg/pr33826.c b/gcc/testsuite/gcc.dg/pr33826.c
new file mode 100644
index 00000000000..3e08b14fa97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr33826.c
@@ -0,0 +1,41 @@
+/* Regression test for PR middle-end/33826 */
+/* Verify that recursive functions cannot be pure or const. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target nonpic } */
+/* { dg-options "-O1 -fdump-ipa-pure-const" } */
+
+int recurese1 (int i)
+{
+ return recurse1 (i+1);
+}
+
+int recurse2a (int i)
+{
+ return recurse2b (i+1);
+}
+
+int recurse2b (int i)
+{
+ return recurse2a (i+1);
+}
+
+int norecurse1a (int i)
+{
+ return norecurse1b (i+1);
+}
+
+int norecurse1b (int i)
+{
+ return i+1;
+}
+
+/* { dg-final { scan-ipa-dump "found to be const: norecurse1a" "pure-const" } } */
+/* { dg-final { scan-ipa-dump "found to be const: norecurse1b" "pure-const" } } */
+/* { dg-final { scan-ipa-dump-not "found to be pure: recurse1" "pure-const" } } */
+/* { dg-final { scan-ipa-dump-not "found to be pure: recurse2a" "pure-const" } } */
+/* { dg-final { scan-ipa-dump-not "found to be pure: recurse2b" "pure-const" } } */
+/* { dg-final { scan-ipa-dump-not "found to be const: recurse1" "pure-const" } } */
+/* { dg-final { scan-ipa-dump-not "found to be const: recurse2a" "pure-const" } } */
+/* { dg-final { scan-ipa-dump-not "found to be const: recurse2b" "pure-const" } } */
+/* { dg-final { cleanup-ipa-dump "pure-const" } } */
diff --git a/gcc/testsuite/gcc.dg/pr34003-1.c b/gcc/testsuite/gcc.dg/pr34003-1.c
new file mode 100644
index 00000000000..ff97fe6d23e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr34003-1.c
@@ -0,0 +1,8 @@
+/* PR bootstrap/34003 */
+/* { dg-do link } */
+/* { dg-options "-O0" } */
+/* { dg-additional-sources "pr34003-2.c" } */
+
+extern void foo (void);
+int bar (void) { foo (); return 1; }
+extern void foo (void);
diff --git a/gcc/testsuite/gcc.dg/pr34003-2.c b/gcc/testsuite/gcc.dg/pr34003-2.c
new file mode 100644
index 00000000000..a5330567f50
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr34003-2.c
@@ -0,0 +1,20 @@
+/* PR bootstrap/34003 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+extern void abort (void);
+
+int seen = 0;
+
+void foo (void)
+{
+ ++seen;
+}
+
+int main (void)
+{
+ extern int bar (void);
+ if (bar () != 1 || seen != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tf_to_di-1.c b/gcc/testsuite/gcc.dg/tf_to_di-1.c
new file mode 100644
index 00000000000..f4f478a0f7c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tf_to_di-1.c
@@ -0,0 +1,47 @@
+/* { dg-do run { target s390*-*-* } } */
+/* { dg-options "-O0 -mlong-double-128" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+check_ll (long double ld, long long ll)
+{
+ if ((long long)ld != ll)
+ {
+ printf ("ld: %Lf expect: %lld result: %lld\n",
+ ld, ll, (long long)ld);
+ abort ();
+ }
+}
+
+void
+check_ull (long double ld, unsigned long long ull)
+{
+ if ((unsigned long long)ld != ull)
+ {
+ printf ("ld: %Lf expect: %llu result: %llu\n",
+ ld, ull, (unsigned long long)ld);
+ abort ();
+ }
+}
+
+int
+main ()
+{
+ const long long ll_max = (long long)((1ULL << 63) - 1);
+ const long long ll_min = -ll_max - 1;
+
+ check_ll (206.23253, 206LL);
+ check_ull (206.23253, 206ULL);
+ check_ll ((long double)ll_max, ll_max);
+ check_ull ((long double)ll_max, ll_max);
+ check_ll ((long double)ll_min, ll_min);
+ check_ll (0.0, 0);
+ check_ull (0.0, 0);
+ check_ll (-1.0, -1);
+ check_ll ((long double)0xffffffffffffffffULL, ll_max);
+ check_ull ((long double)0xffffffffffffffffULL, 0xffffffffffffffffULL);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c
index 34fb26697d3..a48cfdb7596 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c
@@ -34,13 +34,6 @@ find_base_value (src)
}
-/* There should be four IF conditionals. */
-/* { dg-final { scan-tree-dump-times "if " 4 "dom3"} } */
-
/* There should be no casts to short unsigned int. */
/* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 0 "dom3"} } */
-/* There should be two loads of ->code. */
-/* { dg-final { scan-tree-dump-times "->code" 2 "dom3"} } */
-
-/* { dg-final { cleanup-tree-dump "dom3" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
index 82d1d2d73c5..c71791480c6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
@@ -3,7 +3,8 @@
assume something about memory addressing modes. */
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O1 -fdump-tree-vars" } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-options "-O1 -fno-pic -fno-PIC -fdump-tree-vars" } */
int arr_base[100];
diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c
index 75941d7f10f..b4a74cf9b44 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c
@@ -11,7 +11,7 @@ extern void abort(void);
int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
int B[N] = {0,0,42,42,42,0,0,0,0,0,42,42,42,42,42,0};
-void foo () __attribute__((always_inline));
+inline void foo () __attribute__((always_inline));
void foo ()
{
int i, j;
diff --git a/gcc/testsuite/gcc.target/i386/pr21291.c b/gcc/testsuite/gcc.target/i386/pr21291.c
index acfc43df67f..f7348bdf6e1 100644
--- a/gcc/testsuite/gcc.target/i386/pr21291.c
+++ b/gcc/testsuite/gcc.target/i386/pr21291.c
@@ -1,4 +1,9 @@
-/* { dg-do compile } */
+/* The asm has 2 "r" in/out operands, 1 earlyclobber "r" output, 1 "r"
+ input and 2 fixed "r" clobbers (eax and edx), so there are a total of
+ 6 registers that must not conflict. Add to that the PIC register,
+ the frame pointer, and the stack pointer, and we've run out of
+ registers on 32-bit targets. */
+/* { dg-do compile { target { { ! ilp32 } || nonpic } } } */
/* { dg-options "-O" } */
typedef unsigned long bngdigit;
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index a08a6fa6d12..ff1bf20899d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -499,6 +499,16 @@ proc check_effective_target_fpic { } {
return 0
}
+# Return 1 if the current multilib does not generate PIC by default.
+
+proc check_effective_target_nonpic { } {
+ return [check_no_compiler_messages nonpic assembly {
+ #if __PIC__ || __pic__
+ #error FOO
+ #endif
+ }]
+}
+
# Return true if iconv is supported on the target. In particular IBM1047.
proc check_iconv_available { test_what } {
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-1.mm b/gcc/testsuite/obj-c++.dg/bitfield-1.mm
index c7920251d06..8633b854db7 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-1.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-1.mm
@@ -111,3 +111,13 @@ int main(void)
return 0;
}
+
+/* { dg-bogus "included from <built-in>" "PR23610" { xfail lp64 } 0 } */
+/* { dg-bogus "padding struct to align" "PR23610" { xfail lp64 } 0 } */
+
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 40 } */
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 43 } */
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 57 } */
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 60 } */
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 75 } */
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 76 } */
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-4.mm b/gcc/testsuite/obj-c++.dg/bitfield-4.mm
index d7617bf106c..ef336f44834 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-4.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-4.mm
@@ -48,3 +48,9 @@ int main(void)
return 0;
}
+
+/* { dg-bogus "included from <built-in>" "PR23610" { xfail lp64 } 0 } */
+/* { dg-bogus "padding struct to align" "PR23610" { xfail lp64 } 0 } */
+
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 28 } */
+/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 34 } */
diff --git a/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm b/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm
index bf9ca6af44a..3a6df79ab4c 100644
--- a/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm
+++ b/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm
@@ -1,7 +1,7 @@
// Check if the '- .cxx_construct' and '-.cxx_destruct' methods get called
// and if they perform their desired function.
-// { dg-do run }
+// { dg-do run { xfail { "*-*-*" } } } PR27247/PR23681
// { dg-options "-fobjc-call-cxx-cdtors" }
#include <objc/Object.h>
diff --git a/gcc/testsuite/obj-c++.dg/encode-3.mm b/gcc/testsuite/obj-c++.dg/encode-3.mm
index c67a972ddce..842a0bf37e5 100644
--- a/gcc/testsuite/obj-c++.dg/encode-3.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-3.mm
@@ -14,16 +14,22 @@ Vec<double> dd;
const char *enc = @encode(Vec<float>);
const char *enc2 = @encode(Vec<double>);
+#ifdef __LP64__
+#define L "q"
+#else
+#define L "l"
+#endif
+
int main(void) {
- char *encode = @encode(long);
+ const char *encode = @encode(long);
- if (strcmp (encode, "l"))
+ if (strcmp (encode, L))
abort();
- if (strcmp (enc, "{Vec<float>=fflq}"))
+ if (strcmp (enc, "{Vec<float>=ff" L "q}"))
abort();
- if (strcmp (enc2, "{Vec<double>=ddlq}"))
+ if (strcmp (enc2, "{Vec<double>=dd" L "q}"))
abort();
return 0;
diff --git a/gcc/testsuite/obj-c++.dg/encode-8.mm b/gcc/testsuite/obj-c++.dg/encode-8.mm
index 5f61cb87be4..bfd34754ff4 100644
--- a/gcc/testsuite/obj-c++.dg/encode-8.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-8.mm
@@ -3,7 +3,7 @@
should be encoded as '*'). */
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-options "-lobjc" } */
-/* { dg-do run } */
+/* { dg-do run { xfail { "*-*-*" } } } PR27249 */
#include <string.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/obj-c++.dg/gnu-runtime-2.mm b/gcc/testsuite/obj-c++.dg/gnu-runtime-2.mm
index 2ead2883537..e6a1d181d90 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-runtime-2.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-runtime-2.mm
@@ -22,7 +22,7 @@
-(unsigned int) length { return len; }
@end
-int main(int argc, void **args)
+int main(int argc, const char **args)
{
if (strcmp ([@"this is a string" cString], "this is a string"))
abort ();
diff --git a/gcc/testsuite/obj-c++.dg/isa-field-1.mm b/gcc/testsuite/obj-c++.dg/isa-field-1.mm
index ce1d9ff2d8f..f6d3e6a475c 100644
--- a/gcc/testsuite/obj-c++.dg/isa-field-1.mm
+++ b/gcc/testsuite/obj-c++.dg/isa-field-1.mm
@@ -1,5 +1,6 @@
/* Ensure there are no bizarre difficulties with accessing the 'isa' field of objects. */
/* { dg-do compile } */
+/* { dg-xfail-if "PR23613" { "*-*-*" } { "*" } { "" } } */
#include <objc/Object.h>
diff --git a/gcc/testsuite/obj-c++.dg/layout-1.mm b/gcc/testsuite/obj-c++.dg/layout-1.mm
index fe8ab3d083d..6972d12539f 100644
--- a/gcc/testsuite/obj-c++.dg/layout-1.mm
+++ b/gcc/testsuite/obj-c++.dg/layout-1.mm
@@ -13,3 +13,5 @@
- (id) foo;
@end
+/* { dg-bogus "included from <built-in>" "PR23610" { xfail lp64 } 0 } */
+/* { dg-bogus "padding struct to align" "PR23610" { xfail lp64 } 0 } */
diff --git a/gcc/testsuite/obj-c++.dg/lookup-2.mm b/gcc/testsuite/obj-c++.dg/lookup-2.mm
index f694ec9301c..a14860af51c 100644
--- a/gcc/testsuite/obj-c++.dg/lookup-2.mm
+++ b/gcc/testsuite/obj-c++.dg/lookup-2.mm
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-xfail-if "PR23614" { "*-*-*" } { "*" } { "" } } */
#include <objc/Object.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-2.mm b/gcc/testsuite/obj-c++.dg/try-catch-2.mm
index 9352260ab26..7809b890db9 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-2.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-2.mm
@@ -3,6 +3,7 @@
/* Developed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-options "-fobjc-exceptions" } */
+/* { dg-xfail-if "PR23616" { "*-*-*" } { "*" } { "" } } */
/* { dg-do run } */
#include <objc/Object.h>
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-9.mm b/gcc/testsuite/obj-c++.dg/try-catch-9.mm
index 18721b4ee43..56bbdd1e554 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-9.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-9.mm
@@ -3,6 +3,7 @@
/* Developed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-options "-fobjc-exceptions -O2" } */
+/* { dg-xfail-if "PR23616" { "*-*-*" } { "*" } { "" } } */
/* { dg-do run } */
#include <objc/Object.h>
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index 169e6eb9ed9..cf741b632a5 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -750,7 +750,7 @@ check_for_nested_with_variably_modified (tree fndecl, tree orig_fndecl)
for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
{
for (arg = DECL_ARGUMENTS (cgn->decl); arg; arg = TREE_CHAIN (arg))
- if (variably_modified_type_p (TREE_TYPE (arg), 0), orig_fndecl)
+ if (variably_modified_type_p (TREE_TYPE (arg), orig_fndecl))
return true;
if (check_for_nested_with_variably_modified (cgn->decl, orig_fndecl))
diff --git a/gcc/tree.c b/gcc/tree.c
index b93f6d23969..790313b6ad1 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3361,8 +3361,9 @@ build_type_attribute_qual_variant (tree ttype, tree attribute, int quals)
hashcode = type_hash_list (TYPE_ARG_TYPES (ntype), hashcode);
break;
case ARRAY_TYPE:
- hashcode = iterative_hash_object (TYPE_HASH (TYPE_DOMAIN (ntype)),
- hashcode);
+ if (TYPE_DOMAIN (ntype))
+ hashcode = iterative_hash_object (TYPE_HASH (TYPE_DOMAIN (ntype)),
+ hashcode);
break;
case INTEGER_TYPE:
hashcode = iterative_hash_object
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 8e04a0986a4..ccdc03c87cb 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5682,9 +5682,10 @@ default_binds_local_p_1 (tree exp, int shlib)
else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
local_p = true;
/* If PIC, then assume that any global name can be overridden by
- symbols resolved from other modules. */
+ symbols resolved from other modules, unless we are compiling with
+ -fwhole-program, which assumes that names are local. */
else if (shlib)
- local_p = false;
+ local_p = flag_whole_program;
/* Uninitialized COMMON variable may be unified with symbols
resolved from other modules. */
else if (DECL_COMMON (exp)
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 42d78c02fd3..e324a806cd9 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,12 @@
+2008-01-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR libfortran/34699
+ Backport:
+ 2007-09-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR libfortran/26253
+ * intrinsics/c99_functions.c (scalbn): Use ldexp if appopriate.
+
2007-07-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/32678
diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c
index 3eabd0dc5a7..40e0ba76346 100644
--- a/libgfortran/intrinsics/c99_functions.c
+++ b/libgfortran/intrinsics/c99_functions.c
@@ -226,7 +226,11 @@ log10f(float x)
double
scalbn(double x, int y)
{
+#if (FLT_RADIX == 2) && defined(HAVE_LDEXP)
+ return ldexp (x, y);
+#else
return x * pow(FLT_RADIX, y);
+#endif
}
#endif
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2682ee6ef07..e701497eaaf 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,21 @@
+2008-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ Backport:
+ 2006-03-24 Mark Mitchell <mark@codesourcery.com>
+ Joseph S. Myers <joseph@codesourcery.com>
+
+ PR libstdc++/20448
+ PR libstdc++/20451
+ * scripts/testsuite_flags.in (--cxxflags): Don't define LOCALEDIR.
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Always define
+ LOCALEDIR to ".".
+ (v3-build_support): Build MO files.
+
+2008-02-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * testsuite/27_io/fpos/14320-1.cc: Check for "long long" and
+ remove XFAIL.
+
2007-01-24 Steve LoBasso <slobasso@yahoo.com>
Paolo Carlini <pcarlini@suse.de>
diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in
index 6f70002bcd4..8301375b332 100755
--- a/libstdc++-v3/scripts/testsuite_flags.in
+++ b/libstdc++-v3/scripts/testsuite_flags.in
@@ -49,7 +49,7 @@ case ${query} in
--cxxflags)
CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0
- @EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcxx_localedir@" '
+ @EXTRA_CXX_FLAGS@ '
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
;;
--cxxpchflags)
diff --git a/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc b/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc
index 85e1d432eb3..1e492d06d03 100644
--- a/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc
+++ b/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc
@@ -20,7 +20,7 @@
// 27.4.3 fpos
-// { dg-do run { xfail *-*-* } }
+// { dg-do run }
#include <typeinfo>
#include <limits>
@@ -36,6 +36,11 @@ void test01()
typedef istreambuf_iterator<char>::difference_type Distance;
bool found = false;
+ // The C++ standard didn't originally have "long long", however that
+ // type will be in the C++0x standard and testing for it allows
+ // ilp32 targets to pass this test when `Distance' is 64 bits.
+ if (typeid(Distance) == typeid(long long int))
+ found = true;
if (typeid(Distance) == typeid(long int))
found = true;
if (typeid(Distance) == typeid(int))
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index bba33ded55d..86be3a4d1ee 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -190,17 +190,12 @@ proc libstdc++_init { testfile } {
set cxx [transform "g++"]
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
set includes "-I${srcdir}"
- # Guess at the location of the installed locale files.
- # (It would be nice if "gcc --print-file-name" could find
- # message files, but it cannot.)
- set absolute_cxx [which $cxx]
- if { $absolute_cxx != "" } {
- set localedir "[file dirname $absolute_cxx]/../share/locale"
- }
- set cxxflags "$cxxflags -DLOCALEDIR=\"$localedir\""
}
}
+ # Always use MO files built by this test harness.
+ set cxxflags "$cxxflags -DLOCALEDIR=\".\""
+
# If a PCH file is available, use it. We must delay performing
# this check until $cxx and such have been initialized because we
# perform a test compilation. (Ideally, gcc --print-file-name would
@@ -390,6 +385,20 @@ proc v3-build_support { } {
set v3-threads 1
}
+ # Try to build the MO files that are used by some of the locale
+ # tests. If we can't build them, that's OK; it just means that
+ # those tests will fail.
+ foreach lang [list "fr" "de"] {
+ catch {
+ file mkdir "$lang/LC_MESSAGES"
+ remote_exec "build" "msgfmt" "-o $lang/LC_MESSAGES/libstdc++.mo $srcdir/../po/$lang.po"
+ if [is_remote host] {
+ remote_exec "host" "mkdir" "-p $lang/LC_MESSAGES"
+ remote_download "host" "$lang/LC_MESSAGES/libstdc++.mo" "$lang/LC_MESSAGES/libstdc++.mo"
+ }
+ }
+ }
+
# Build the support objects.
set source_files \
[list testsuite_abi.cc testsuite_allocator.cc testsuite_character.cc testsuite_hooks.cc ]