aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao-ying Fu <fu@mips.com>2007-05-04 00:30:00 +0000
committerChao-ying Fu <fu@mips.com>2007-05-04 00:30:00 +0000
commitb1319141745fb4b21b294b3396e7ed3ab4734f5e (patch)
treeae428d0baf8588c3c2d9d0faa5ea81a61f99debe
parent47a185a601861c1a9f4708b32636bddec92d73a7 (diff)
Merged revisions 124240-124252 via svnmerge from
svn+ssh://chaoyingfu@sources.redhat.com/svn/gcc/trunk ........ r124240 | mrs | 2007-04-27 14:36:34 -0700 (Fri, 27 Apr 2007) | 2 lines * config/rs6000/darwin.h (ALWAYS_PUSH_CONSTS_USING_REGS_P): Remove. ........ r124242 | rguenth | 2007-04-27 14:50:04 -0700 (Fri, 27 Apr 2007) | 8 lines 2007-04-27 Richard Guenther <rguenther@suse.de> * tree-ssa-forwprop.c (forward_propagate_into_cond): Keep track if we simplified anything. (tree_ssa_forward_propagate_single_use_vars): Defer overflow warnings until we did a simplification and the stmt was not marked as TREE_NO_WARNING. ........ r124243 | paolo | 2007-04-27 15:59:36 -0700 (Fri, 27 Apr 2007) | 67 lines 2007-04-27 Paolo Carlini <pcarlini@suse.de> DR 438, [DR]. * include/bits/basic_string.h (_S_construct_aux(_InIterator, _InIterator, const _Alloc&, __true_type)): Do not cast the second argument. * include/ext/rc_string_base.h (_S_construct_aux(_Integer, _Integer, const _Alloc&, std::__true_type)): Likewise. * include/ext/sso_string_base.h (_M_construct_aux(_InIterator, _InIterator, std::__true_type)): Likewise. * include/bits/stl_deque.h (_M_initialize_dispatch(_Integer, _Integer, __true_type)): Cast the first argument. (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not cast the arguments. (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)): Likewise. * include/bits/stl_list.h (_M_initialize_dispatch(_Integer, _Integer, __true_type)): Likewise. (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not cast both arguments. * include/bits/stl_bvector.h (_M_initialize_dispatch(_Integer, _Integer, __true_type)): Cast the first argument. (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not cast the arguments. * include/bits/stl_vector.h (_M_initialize_dispatch(_Integer, _Integer, __true_type)): Cast the first argument. (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not cast the arguments. (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)): Likewise. * testsuite/21_strings/basic_string/requirements/dr438/ constructor.cc: New. * testsuite/ext/vstring/requirements/dr438/constructor.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/deque/ assign_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/deque/ constructor.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/deque/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/deque/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/deque/ insert_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/list/ assign_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/list/ constructor.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/list/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/list/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/list/ insert_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/vector/ assign_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/vector/ constructor.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/vector/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/vector/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/vector/ insert_neg.cc: Likewise. * testsuite/23_containers/requirements/sequences/dr438/vector/ bool/constructor.cc: Likewise. * docs/html/ext/howto.html: Add an entry for DR 438. ........ r124246 | gccadmin | 2007-04-27 16:17:08 -0700 (Fri, 27 Apr 2007) | 1 line Daily bump. ........ r124248 | kkojima | 2007-04-27 17:07:40 -0700 (Fri, 27 Apr 2007) | 6 lines * config/sh/sh.c (output_stack_adjust): Avoid using the frame register itself to hold the offset constant. Tell flow the use of r4 and r5 when they are used. ........ r124249 | kseitz | 2007-04-27 18:02:10 -0700 (Fri, 27 Apr 2007) | 18 lines * classpath/lib/gnu/classpath/jdwp/event/filters/ LocationOnlyFilter.class: Regenerated; * classpath/lib/gnu/classpath/jdwp/util/Location.class: Regenerated. * gnu/classpath/jdwp/VMMethod.java * classpath/lib/gnu/classpath/jdwp/VMMethod.class: Regenerated. * gnu/classpath/jdwp/VMMethod.h: Regenerated. * gnu/classpath/jdwp/util/Location.h: Regenerated. * gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java (matches): Use Location.equals to determine equality. * gnu/classpath/jdwp/VMMethod.java (equals): New method. * gnu/classpath/jdwp/util/Location.java (equals): New method. ........ r124250 | kseitz | 2007-04-27 18:05:36 -0700 (Fri, 27 Apr 2007) | 14 lines * classpath/lib/gnu/classpath/jdwp/Jdwp.class: Regenerated. * classpath/lib/gnu/classpath/jdwp/event/EventManager.class: Regenerated. * gnu/classpath/jdwp/event/EventManager.h: Regenerated. * gnu/classpath/jdwp/event/EventManager.java (getEventRequest): Rename to... (getEventRequests): ...this. Change return type to array of requests. Construct a list of all matching events and return them all. * gnu/classpath/jdwp/Jdwp.java (notify): Use getEventRequests and send event notifications for all matching requests. ........ r124251 | fitzsim | 2007-04-27 18:58:23 -0700 (Fri, 27 Apr 2007) | 13 lines 2007-04-04 Francis Kung <fkung@redhat.com> * gnu/java/awt/peer/gtk/ComponentGraphics.java (cairoDrawGlyphVector): Removed method. (cairoSetFont): Removed method. (disposeNative): Removed method. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector): Added locking. (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetFont): Added locking. (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_disposeNative): Added locking. ........ r124252 | jvdelisle | 2007-04-27 19:03:21 -0700 (Fri, 27 Apr 2007) | 13 lines 2007-04-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> * io/file_pos.c (st_backspace): Set flags.position for end of file condition and use new function update_position. (st_endfile): Use new function update_position. * io/io.h: Add prototype for new function. * io/inquire.c (inquire_via_unit): If not direct access, set NEXTREC to zero. * io/unit.c (update_position): New function to update position info used by inquire. * io/transfer.c (next_record): Fix typo and use new function. ........ git-svn-id: https://gcc.gnu.org/svn/gcc/branches/fixed-point@124402 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog19
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/config/rs6000/darwin.h3
-rw-r--r--gcc/config/sh/sh.c11
-rw-r--r--gcc/tree-ssa-forwprop.c25
-rw-r--r--libgfortran/ChangeLog13
-rw-r--r--libgfortran/io/file_pos.c8
-rw-r--r--libgfortran/io/inquire.c8
-rw-r--r--libgfortran/io/io.h3
-rw-r--r--libgfortran/io/transfer.c6
-rw-r--r--libgfortran/io/unit.c14
-rw-r--r--libjava/ChangeLog19
-rw-r--r--libjava/classpath/ChangeLog32
-rw-r--r--libjava/classpath/gnu/classpath/jdwp/Jdwp.java19
-rw-r--r--libjava/classpath/gnu/classpath/jdwp/event/EventManager.java31
-rw-r--r--libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java18
-rw-r--r--libjava/classpath/gnu/classpath/jdwp/util/Location.java14
-rw-r--r--libjava/classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java55
-rw-r--r--libjava/classpath/lib/gnu/classpath/jdwp/Jdwp.classbin5748 -> 5777 bytes
-rw-r--r--libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.classbin1983 -> 2165 bytes
-rw-r--r--libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.classbin4291 -> 4558 bytes
-rw-r--r--libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.classbin889 -> 1109 bytes
-rw-r--r--libjava/classpath/lib/gnu/classpath/jdwp/util/Location.classbin2633 -> 2867 bytes
-rw-r--r--libjava/classpath/lib/gnu/java/awt/peer/gtk/ComponentGraphics.classbin17237 -> 16536 bytes
-rw-r--r--libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c10
-rw-r--r--libjava/gnu/classpath/jdwp/VMMethod.h1
-rw-r--r--libjava/gnu/classpath/jdwp/VMMethod.java13
-rw-r--r--libjava/gnu/classpath/jdwp/event/EventManager.h4
-rw-r--r--libjava/gnu/classpath/jdwp/util/Location.h1
-rw-r--r--libstdc++-v3/ChangeLog67
-rw-r--r--libstdc++-v3/docs/html/ext/howto.html8
-rw-r--r--libstdc++-v3/include/bits/basic_string.h9
-rw-r--r--libstdc++-v3/include/bits/stl_bvector.h12
-rw-r--r--libstdc++-v3/include/bits/stl_deque.h21
-rw-r--r--libstdc++-v3/include/bits/stl_list.h18
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h30
-rw-r--r--libstdc++-v3/include/ext/rc_string_base.h9
-rw-r--r--libstdc++-v3/include/ext/sso_string_base.h10
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/requirements/dr438/constructor.cc28
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/assign_neg.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor.cc28
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_1_neg.cc30
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_2_neg.cc31
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/insert_neg.cc37
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/assign_neg.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor.cc28
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_1_neg.cc30
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_2_neg.cc31
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/insert_neg.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/assign_neg.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/bool/constructor.cc28
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor.cc28
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_1_neg.cc30
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_2_neg.cc31
-rw-r--r--libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/insert_neg.cc36
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/requirements/dr438/constructor.cc32
56 files changed, 941 insertions, 144 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9621194dcce..808197144a8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,22 @@
+2007-04-27 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/31701
+ * config/sh/sh.c (output_stack_adjust): Avoid using the frame
+ register itself to hold the offset constant. Tell flow the use
+ of r4 and r5 when they are used.
+
+2007-04-27 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-forwprop.c (forward_propagate_into_cond): Keep track
+ if we simplified anything.
+ (tree_ssa_forward_propagate_single_use_vars): Defer overflow
+ warnings until we did a simplification and the stmt was not
+ marked as TREE_NO_WARNING.
+
+2007-04-27 Mike Stump <mrs@apple.com>
+
+ * config/rs6000/darwin.h (ALWAYS_PUSH_CONSTS_USING_REGS_P): Remove.
+
2007-05-03 Chao-ying Fu <fu@mips.com>
* doc/md.texi (madd@var{m}@var{n}4): Extend to fixed-point modes.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 79c8596d243..315eb228109 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20070427
+20070428
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index 052f7313f5f..acf8b4e0e33 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -353,9 +353,6 @@
? GENERAL_REGS \
: (CLASS))
-/* Fix for emit_group_load (): force large constants to be pushed via regs. */
-#define ALWAYS_PUSH_CONSTS_USING_REGS_P 1
-
/* Compute field alignment. This is similar to the version of the
macro in the Apple version of GCC, except that version supports
'mac68k' alignment, and that version uses the computed alignment
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 0aeb764ef94..ffa25095eb4 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -5619,7 +5619,13 @@ output_stack_adjust (int size, rtx reg, int epilogue_p,
temp = scavenge_reg (&temps);
}
if (temp < 0 && live_regs_mask)
- temp = scavenge_reg (live_regs_mask);
+ {
+ HARD_REG_SET temps;
+
+ COPY_HARD_REG_SET (temps, *live_regs_mask);
+ CLEAR_HARD_REG_BIT (temps, REGNO (reg));
+ temp = scavenge_reg (&temps);
+ }
if (temp < 0)
{
rtx adj_reg, tmp_reg, mem;
@@ -5668,6 +5674,9 @@ output_stack_adjust (int size, rtx reg, int epilogue_p,
emit_move_insn (adj_reg, mem);
mem = gen_tmp_stack_mem (Pmode, gen_rtx_POST_INC (Pmode, reg));
emit_move_insn (tmp_reg, mem);
+ /* Tell flow the insns that pop r4/r5 aren't dead. */
+ emit_insn (gen_rtx_USE (VOIDmode, tmp_reg));
+ emit_insn (gen_rtx_USE (VOIDmode, adj_reg));
return;
}
const_reg = gen_rtx_REG (GET_MODE (reg), temp);
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 6d9a4678bb4..860a4c4da68 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -372,9 +372,11 @@ combine_cond_expr_cond (enum tree_code code, tree type,
/* Propagate from the ssa name definition statements of COND_EXPR
in statement STMT into the conditional if that simplifies it. */
-static void
+static bool
forward_propagate_into_cond (tree cond_expr, tree stmt)
{
+ bool did_something = false;
+
do {
tree tmp = NULL_TREE;
tree cond = COND_EXPR_COND (cond_expr);
@@ -407,7 +409,7 @@ forward_propagate_into_cond (tree cond_expr, tree stmt)
def_stmt = get_prop_source_stmt (name, false, &single_use_p);
if (def_stmt == NULL_TREE
|| !can_propagate_from (def_stmt))
- return;
+ return did_something;
rhs = GIMPLE_STMT_OPERAND (def_stmt, 1);
tmp = combine_cond_expr_cond (TREE_CODE (cond), boolean_type_node,
@@ -422,7 +424,7 @@ forward_propagate_into_cond (tree cond_expr, tree stmt)
def_stmt = get_prop_source_stmt (name, true, NULL);
if (def_stmt == NULL_TREE
|| !can_propagate_from (def_stmt))
- return;
+ return did_something;
rhs = GIMPLE_STMT_OPERAND (def_stmt, 1);
tmp = combine_cond_expr_cond (NE_EXPR, boolean_type_node, rhs,
@@ -447,12 +449,16 @@ forward_propagate_into_cond (tree cond_expr, tree stmt)
/* Remove defining statements. */
remove_prop_source_from_use (name, NULL);
+ did_something = true;
+
/* Continue combining. */
continue;
}
break;
} while (1);
+
+ return did_something;
}
/* We've just substituted an ADDR_EXPR into stmt. Update all the
@@ -986,7 +992,11 @@ tree_ssa_forward_propagate_single_use_vars (void)
}
else if (TREE_CODE (rhs) == COND_EXPR)
{
- forward_propagate_into_cond (rhs, stmt);
+ bool did_something;
+ fold_defer_overflow_warnings ();
+ did_something = forward_propagate_into_cond (rhs, stmt);
+ fold_undefer_overflow_warnings (!TREE_NO_WARNING (rhs)
+ && did_something, stmt, WARN_STRICT_OVERFLOW_CONDITIONAL);
bsi_next (&bsi);
}
else if (COMPARISON_CLASS_P (rhs))
@@ -1010,7 +1020,12 @@ tree_ssa_forward_propagate_single_use_vars (void)
}
else if (TREE_CODE (stmt) == COND_EXPR)
{
- forward_propagate_into_cond (stmt, stmt);
+ bool did_something;
+ fold_defer_overflow_warnings ();
+ did_something = forward_propagate_into_cond (stmt, stmt);
+ fold_undefer_overflow_warnings (!TREE_NO_WARNING (stmt)
+ && did_something, stmt,
+ WARN_STRICT_OVERFLOW_CONDITIONAL);
bsi_next (&bsi);
}
else
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index a884050c97d..983c64ff86b 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,16 @@
+2007-04-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/31532
+ * io/file_pos.c (st_backspace): Set flags.position for end of file
+ condition and use new function update_position.
+ (st_endfile): Use new function update_position.
+ * io/io.h: Add prototype for new function.
+ * io/inquire.c (inquire_via_unit): If not direct access, set NEXTREC
+ to zero.
+ * io/unit.c (update_position): New function to update position info
+ used by inquire.
+ * io/transfer.c (next_record): Fix typo and use new function.
+
2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/31299
diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c
index 846dae932ec..c9034e8c8ca 100644
--- a/libgfortran/io/file_pos.c
+++ b/libgfortran/io/file_pos.c
@@ -213,13 +213,17 @@ st_backspace (st_parameter_filepos *fpp)
if (u->endfile == AFTER_ENDFILE)
{
u->endfile = AT_ENDFILE;
+ u->flags.position = POSITION_APPEND;
flush (u->s);
struncate (u->s);
}
else
{
if (file_position (u->s) == 0)
- goto done; /* Common special case */
+ {
+ u->flags.position = POSITION_REWIND;
+ goto done; /* Common special case */
+ }
if (u->mode == WRITING)
{
@@ -233,6 +237,7 @@ st_backspace (st_parameter_filepos *fpp)
else
unformatted_backspace (fpp, u);
+ update_position (u);
u->endfile = NO_ENDFILE;
u->current_record = 0;
u->bytes_left = 0;
@@ -271,6 +276,7 @@ st_endfile (st_parameter_filepos *fpp)
flush (u->s);
struncate (u->s);
u->endfile = AFTER_ENDFILE;
+ update_position (u);
unlock_unit (u);
}
diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c
index 36e43c29bdf..b1f4a14f6c4 100644
--- a/libgfortran/io/inquire.c
+++ b/libgfortran/io/inquire.c
@@ -152,7 +152,13 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u)
*iqp->strm_pos_out = (u != NULL) ? u->strm_pos : 0;
if ((cf & IOPARM_INQUIRE_HAS_NEXTREC) != 0)
- *iqp->nextrec = (u != NULL) ? u->last_record + 1 : 0;
+ {
+ /* This only makes sense in the context of DIRECT access. */
+ if (u != NULL && u->flags.access == ACCESS_DIRECT)
+ *iqp->nextrec = u->last_record + 1;
+ else
+ *iqp->nextrec = 0;
+ }
if ((cf & IOPARM_INQUIRE_HAS_BLANK) != 0)
{
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h
index df006693b28..1e5a6c9fdbf 100644
--- a/libgfortran/io/io.h
+++ b/libgfortran/io/io.h
@@ -693,6 +693,9 @@ internal_proto(get_unit);
extern void unlock_unit (gfc_unit *);
internal_proto(unlock_unit);
+extern void update_position (gfc_unit *);
+internal_proto(update_position);
+
/* open.c */
extern gfc_unit *new_unit (st_parameter_open *, gfc_unit *, unit_flags *);
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index f9f6657b737..ac5f11b40ff 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -2546,8 +2546,10 @@ next_record (st_parameter_dt *dtp, int done)
if (!is_stream_io (dtp))
{
- /* keep position up to date for INQUIRE */
- dtp->u.p.current_unit->flags.position = POSITION_ASIS;
+ /* Keep position up to date for INQUIRE */
+ if (done)
+ update_position (dtp->u.p.current_unit);
+
dtp->u.p.current_unit->current_record = 0;
if (dtp->u.p.current_unit->flags.access == ACCESS_DIRECT)
{
diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c
index 2d2c7426cf6..7a4000d9fb5 100644
--- a/libgfortran/io/unit.c
+++ b/libgfortran/io/unit.c
@@ -678,3 +678,17 @@ close_units (void)
close_unit_1 (unit_root, 1);
__gthread_mutex_unlock (&unit_lock);
}
+
+
+/* update_position()-- Update the flags position for later use by inquire. */
+
+void
+update_position (gfc_unit *u)
+{
+ if (file_position (u->s) == 0)
+ u->flags.position = POSITION_REWIND;
+ else if (file_length (u->s) == file_position (u->s))
+ u->flags.position = POSITION_APPEND;
+ else
+ u->flags.position = POSITION_ASIS;
+}
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 67c1389af5e..a66338cd4a4 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,22 @@
+2007-04-27 Keith Seitz <keiths@redhat.com>
+
+ * classpath/lib/gnu/classpath/jdwp/Jdwp.class: Regenerated.
+ * classpath/lib/gnu/classpath/jdwp/event/EventManager.class:
+ Regenerated.
+ * gnu/classpath/jdwp/event/EventManager.h: Regenerated.
+
+2007-04-27 Keith Seitz <keiths@redhat.com>
+
+ * classpath/lib/gnu/classpath/jdwp/event/filters/
+ LocationOnlyFilter.class: Regenerated;
+ * classpath/lib/gnu/classpath/jdwp/util/Location.class:
+ Regenerated.
+ * gnu/classpath/jdwp/VMMethod.java
+ * classpath/lib/gnu/classpath/jdwp/VMMethod.class:
+ Regenerated.
+ * gnu/classpath/jdwp/VMMethod.h: Regenerated.
+ * gnu/classpath/jdwp/util/Location.h: Regenerated.
+
2007-04-27 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/CairoGraphics2D.h: Regenerate.
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog
index 4877b1de2f0..ad9f9082912 100644
--- a/libjava/classpath/ChangeLog
+++ b/libjava/classpath/ChangeLog
@@ -1,3 +1,35 @@
+2007-04-04 Francis Kung <fkung@redhat.com>
+
+ * gnu/java/awt/peer/gtk/ComponentGraphics.java
+ (cairoDrawGlyphVector): Removed method.
+ (cairoSetFont): Removed method.
+ (disposeNative): Removed method.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
+ (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector): Added
+ locking.
+ (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetFont): Added locking.
+ (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_disposeNative): Added locking.
+
+2007-04-27 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/event/EventManager.java
+ (getEventRequest): Rename to...
+ (getEventRequests): ...this.
+ Change return type to array of requests.
+ Construct a list of all matching events and return
+ them all.
+ * gnu/classpath/jdwp/Jdwp.java (notify): Use getEventRequests
+ and send event notifications for all matching requests.
+
+2007-04-27 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
+ (matches): Use Location.equals to determine equality.
+ * gnu/classpath/jdwp/VMMethod.java (equals):
+ New method.
+ * gnu/classpath/jdwp/util/Location.java (equals):
+ New method.
+
2007-03-16 Francis Kung <fkung@redhat.com>
* gnu/java/awt/peer/gtk/CairoGraphics2D.java
diff --git a/libjava/classpath/gnu/classpath/jdwp/Jdwp.java b/libjava/classpath/gnu/classpath/jdwp/Jdwp.java
index e63a9a353dd..ca92f2f0d55 100644
--- a/libjava/classpath/gnu/classpath/jdwp/Jdwp.java
+++ b/libjava/classpath/gnu/classpath/jdwp/Jdwp.java
@@ -1,5 +1,5 @@
/* Jdwp.java -- Virtual machine to JDWP back-end programming interface
- Copyright (C) 2005, 2006 Free Software Foundation
+ Copyright (C) 2005, 2006, 2007 Free Software Foundation
This file is part of GNU Classpath.
@@ -207,23 +207,22 @@ public class Jdwp
* The event is filtered through the event manager before being
* sent.
*
- * FIXME: Probably need logic to send multiple events
+ * FIXME: Probably need logic to send multiple (different) events
* @param event the event to report
*/
- public static void notify (Event event)
+ public static void notify(Event event)
{
- Jdwp jdwp = getDefault ();
+ Jdwp jdwp = getDefault();
if (jdwp != null)
{
- EventManager em = EventManager.getDefault ();
- EventRequest request = em.getEventRequest (event);
- if (request != null)
+ EventManager em = EventManager.getDefault();
+ EventRequest[] requests = em.getEventRequests(event);
+ for (int i = 0; i < requests.length; ++i)
{
try
{
- System.out.println ("Jdwp.notify: sending event " + event);
- sendEvent (request, event);
- jdwp._enforceSuspendPolicy (request.getSuspendPolicy ());
+ sendEvent(requests[i], event);
+ jdwp._enforceSuspendPolicy(requests[i].getSuspendPolicy());
}
catch (Exception e)
{
diff --git a/libjava/classpath/gnu/classpath/jdwp/event/EventManager.java b/libjava/classpath/gnu/classpath/jdwp/event/EventManager.java
index 02ffa241395..aa3d5d6292c 100644
--- a/libjava/classpath/gnu/classpath/jdwp/event/EventManager.java
+++ b/libjava/classpath/gnu/classpath/jdwp/event/EventManager.java
@@ -44,6 +44,7 @@ import gnu.classpath.jdwp.VMVirtualMachine;
import gnu.classpath.jdwp.exception.InvalidEventTypeException;
import gnu.classpath.jdwp.exception.JdwpException;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
@@ -146,39 +147,39 @@ public class EventManager
}
/**
- * Returns a request for the given event. This method will only
+ * Returns all requests for the given event. This method will only
* be used if the <code>EventManager</code> is handling event filtering.
*
* @param event the event
- * @return request that was interested in this event
+ * @return requests that are interested in this event
* or <code>null</code> if none (and event should not be sent)
* @throws IllegalArgumentException for invalid event kind
*/
- public EventRequest getEventRequest (Event event)
+ public EventRequest[] getEventRequests(Event event)
{
- EventRequest interestedRequest = null;
+ ArrayList interestedEvents = new ArrayList();
Hashtable requests;
- Byte kind = new Byte (event.getEventKind ());
- requests = (Hashtable) _requests.get (kind);
+ Byte kind = new Byte(event.getEventKind());
+ requests = (Hashtable) _requests.get(kind);
if (requests == null)
{
// Did not get a valid event type
- throw new IllegalArgumentException ("invalid event kind: " + kind);
+ throw new IllegalArgumentException("invalid event kind: " + kind);
}
- boolean match = false;
// Loop through the requests. Must look at ALL requests in order
// to evaluate all filters (think count filter).
- // TODO: What if multiple matches? Spec isn't so clear on this.
- Iterator rIter = requests.values().iterator ();
- while (rIter.hasNext ())
+ Iterator rIter = requests.values().iterator();
+ while (rIter.hasNext())
{
- EventRequest request = (EventRequest) rIter.next ();
- if (request.matches (event))
- interestedRequest = request;
+ EventRequest request = (EventRequest) rIter.next();
+ if (request.matches(event))
+ interestedEvents.add(request);
}
- return interestedRequest;
+ EventRequest[] r = new EventRequest[interestedEvents.size()];
+ interestedEvents.toArray(r);
+ return r;
}
/**
diff --git a/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java b/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
index 7190317a4ae..a3125371c5d 100644
--- a/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
+++ b/libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
@@ -1,5 +1,5 @@
/* LocationOnlyFilter.java -- filter on location
- Copyright (C) 2005, 2006 Free Software Foundation
+ Copyright (C) 2005, 2006, 2007 Free Software Foundation
This file is part of GNU Classpath.
@@ -49,13 +49,6 @@ import gnu.classpath.jdwp.util.Location;
* May be used with breakpoint, field access, field modification, step,
* and exception event kinds.
*
- * This "filter" is not really a filter. It is simply a way to communicate
- * location information for supported events in a generic way to ease
- * the burden of special casing several things in
- * EventReqeustCommandSet.executeSet.
- *
- * Consequently, this "filter" always matches any event.
- *
* @author Keith Seitz (keiths@redhat.com)
*/
public class LocationOnlyFilter
@@ -90,9 +83,12 @@ public class LocationOnlyFilter
*
* @param event the <code>Event</code> to scrutinize
*/
- public boolean matches (Event event)
+ public boolean matches(Event event)
{
- // This filter always matches. See comments in class javadoc.
- return true;
+ Location loc = (Location) event.getParameter(Event.EVENT_LOCATION);
+ if (loc != null)
+ return (getLocation().equals(loc));
+
+ return false;
}
}
diff --git a/libjava/classpath/gnu/classpath/jdwp/util/Location.java b/libjava/classpath/gnu/classpath/jdwp/util/Location.java
index 89e81e563a1..ff045a5eccc 100644
--- a/libjava/classpath/gnu/classpath/jdwp/util/Location.java
+++ b/libjava/classpath/gnu/classpath/jdwp/util/Location.java
@@ -1,5 +1,5 @@
/* Location.java -- class to read/write JDWP locations
- Copyright (C) 2005, 2006 Free Software Foundation
+ Copyright (C) 2005, 2006, 2007 Free Software Foundation
This file is part of GNU Classpath.
@@ -153,4 +153,16 @@ public class Location
{
return method.toString () + "." + index;
}
+
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof Location)
+ {
+ Location l = (Location) obj;
+ return (getMethod().equals(l.getMethod())
+ && getIndex() == l.getIndex());
+ }
+
+ return false;
+ }
}
diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java b/libjava/classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java
index be82f81ecbd..8adf275ad44 100644
--- a/libjava/classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java
+++ b/libjava/classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java
@@ -544,6 +544,17 @@ public class ComponentGraphics extends CairoGraphics2D
* methods ends up being called, we will deadlock. The lock is only reentrant
* when called via our lock() method.
*/
+
+ /* These methods are already locked in the superclass CairoGraphics2D
+ * so they do not need to be overridden:
+ *
+ * public void disposeNative
+ *
+ * protected void cairoDrawGlyphVector
+ *
+ * protected void cairoSetFont
+ */
+
@Override
protected long init(long pointer)
{
@@ -563,20 +574,6 @@ public class ComponentGraphics extends CairoGraphics2D
}
@Override
- public void disposeNative(long pointer)
- {
- try
- {
- lock();
- super.disposeNative(pointer);
- }
- finally
- {
- unlock();
- }
- }
-
- @Override
protected void drawPixels(long pointer, int[] pixels, int w, int h,
int stride, double[] i2u, double alpha,
int interpolation)
@@ -728,36 +725,6 @@ public class ComponentGraphics extends CairoGraphics2D
}
@Override
- protected void cairoDrawGlyphVector(long pointer, GdkFontPeer font,
- float x, float y, int n,
- int[] codes, float[] positions)
- {
- try
- {
- lock();
- super.cairoDrawGlyphVector(pointer, font, x, y, n, codes, positions);
- }
- finally
- {
- unlock();
- }
- }
-
- @Override
- protected void cairoSetFont(long pointer, GdkFontPeer font)
- {
- try
- {
- lock();
- super.cairoSetFont(pointer, font);
- }
- finally
- {
- unlock();
- }
- }
-
- @Override
protected void cairoRectangle(long pointer, double x, double y,
double width, double height)
{
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/Jdwp.class b/libjava/classpath/lib/gnu/classpath/jdwp/Jdwp.class
index e16ddb6b313..616beaa1fab 100644
--- a/libjava/classpath/lib/gnu/classpath/jdwp/Jdwp.class
+++ b/libjava/classpath/lib/gnu/classpath/jdwp/Jdwp.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.class b/libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.class
index 25cc9e0c40f..e19c61b5109 100644
--- a/libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.class
+++ b/libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.class b/libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.class
index 4d311632060..df7926f3956 100644
--- a/libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.class
+++ b/libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.class b/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.class
index 1e8d19b24e6..a76fdfdcfcc 100644
--- a/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.class
+++ b/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/util/Location.class b/libjava/classpath/lib/gnu/classpath/jdwp/util/Location.class
index 593418c29b7..ed85dd09e7d 100644
--- a/libjava/classpath/lib/gnu/classpath/jdwp/util/Location.class
+++ b/libjava/classpath/lib/gnu/classpath/jdwp/util/Location.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/java/awt/peer/gtk/ComponentGraphics.class b/libjava/classpath/lib/gnu/java/awt/peer/gtk/ComponentGraphics.class
index 54e991629c5..c5d4d009094 100644
--- a/libjava/classpath/lib/gnu/java/awt/peer/gtk/ComponentGraphics.class
+++ b/libjava/classpath/lib/gnu/java/awt/peer/gtk/ComponentGraphics.class
Binary files differ
diff --git a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
index b183a1bac77..2da68e0e4e0 100644
--- a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
+++ b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
@@ -87,7 +87,11 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_disposeNative
return;
if (gr->cr)
- cairo_destroy (gr->cr);
+ {
+ gdk_threads_enter();
+ cairo_destroy (gr->cr);
+ gdk_threads_leave();
+ }
if (gr->pattern)
cairo_pattern_destroy (gr->pattern);
@@ -343,9 +347,11 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector
(*env)->ReleaseFloatArrayElements (env, java_positions, native_positions, 0);
(*env)->ReleaseIntArrayElements (env, java_codes, native_codes, 0);
+ gdk_threads_enter ();
pango_fc_font_lock_face( (PangoFcFont *)pfont->font );
cairo_show_glyphs (gr->cr, glyphs, n);
pango_fc_font_unlock_face( (PangoFcFont *)pfont->font );
+ gdk_threads_leave ();
g_free(glyphs);
}
@@ -367,6 +373,7 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetFont
pfont = (struct peerfont *)NSA_GET_FONT_PTR (env, font);
g_assert (pfont != NULL);
+ gdk_threads_enter();
face = pango_fc_font_lock_face( (PangoFcFont *)pfont->font );
g_assert (face != NULL);
@@ -380,6 +387,7 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetFont
cairo_font_face_destroy (ft);
pango_fc_font_unlock_face((PangoFcFont *)pfont->font);
+ gdk_threads_leave();
}
JNIEXPORT void JNICALL
diff --git a/libjava/gnu/classpath/jdwp/VMMethod.h b/libjava/gnu/classpath/jdwp/VMMethod.h
index f1bf3d76cfd..00f4d874c08 100644
--- a/libjava/gnu/classpath/jdwp/VMMethod.h
+++ b/libjava/gnu/classpath/jdwp/VMMethod.h
@@ -49,6 +49,7 @@ public:
virtual ::java::lang::String * toString();
virtual void writeId(::java::io::DataOutputStream *);
static ::gnu::classpath::jdwp::VMMethod * readId(::java::lang::Class *, ::java::nio::ByteBuffer *);
+ virtual jboolean equals(::java::lang::Object *);
static const jint SIZE = 8;
private:
::java::lang::Class * __attribute__((aligned(__alignof__( ::java::lang::Object)))) _class;
diff --git a/libjava/gnu/classpath/jdwp/VMMethod.java b/libjava/gnu/classpath/jdwp/VMMethod.java
index d345bc1b515..6a2b04ecf97 100644
--- a/libjava/gnu/classpath/jdwp/VMMethod.java
+++ b/libjava/gnu/classpath/jdwp/VMMethod.java
@@ -1,5 +1,5 @@
/* VMMethod.java -- a method in a virtual machine
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -175,4 +175,15 @@ public class VMMethod
{
return VMVirtualMachine.getClassMethod(klass, bb.getLong());
}
+
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof VMMethod)
+ {
+ VMMethod m = (VMMethod) obj;
+ return (getId() == m.getId());
+ }
+
+ return false;
+ }
}
diff --git a/libjava/gnu/classpath/jdwp/event/EventManager.h b/libjava/gnu/classpath/jdwp/event/EventManager.h
index 081371148ee..45b47622c8a 100644
--- a/libjava/gnu/classpath/jdwp/event/EventManager.h
+++ b/libjava/gnu/classpath/jdwp/event/EventManager.h
@@ -7,6 +7,8 @@
#pragma interface
#include <java/lang/Object.h>
+#include <gcj/array.h>
+
extern "Java"
{
namespace gnu
@@ -34,7 +36,7 @@ public:
private:
EventManager();
public:
- virtual ::gnu::classpath::jdwp::event::EventRequest * getEventRequest(::gnu::classpath::jdwp::event::Event *);
+ virtual JArray< ::gnu::classpath::jdwp::event::EventRequest * > * getEventRequests(::gnu::classpath::jdwp::event::Event *);
virtual void requestEvent(::gnu::classpath::jdwp::event::EventRequest *);
virtual void deleteRequest(jbyte, jint);
virtual void clearRequests(jbyte);
diff --git a/libjava/gnu/classpath/jdwp/util/Location.h b/libjava/gnu/classpath/jdwp/util/Location.h
index 4b742748250..2e8710533aa 100644
--- a/libjava/gnu/classpath/jdwp/util/Location.h
+++ b/libjava/gnu/classpath/jdwp/util/Location.h
@@ -43,6 +43,7 @@ public:
virtual ::gnu::classpath::jdwp::VMMethod * getMethod();
virtual jlong getIndex();
virtual ::java::lang::String * toString();
+ virtual jboolean equals(::java::lang::Object *);
private:
::gnu::classpath::jdwp::VMMethod * __attribute__((aligned(__alignof__( ::java::lang::Object)))) method;
jlong index;
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 295a3580f72..8084c5c4c98 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,70 @@
+2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+ DR 438, [DR].
+ * include/bits/basic_string.h (_S_construct_aux(_InIterator,
+ _InIterator, const _Alloc&, __true_type)): Do not cast the
+ second argument.
+ * include/ext/rc_string_base.h (_S_construct_aux(_Integer,
+ _Integer, const _Alloc&, std::__true_type)): Likewise.
+ * include/ext/sso_string_base.h (_M_construct_aux(_InIterator,
+ _InIterator, std::__true_type)): Likewise.
+ * include/bits/stl_deque.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Cast the first argument.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
+ not cast the arguments.
+ (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
+ Likewise.
+ * include/bits/stl_list.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Likewise.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
+ not cast both arguments.
+ * include/bits/stl_bvector.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Cast the first argument.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
+ cast the arguments.
+ * include/bits/stl_vector.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Cast the first argument.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
+ cast the arguments.
+ (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
+ Likewise.
+ * testsuite/21_strings/basic_string/requirements/dr438/
+ constructor.cc: New.
+ * testsuite/ext/vstring/requirements/dr438/constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ assign_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ insert_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ assign_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ insert_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ assign_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ insert_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ bool/constructor.cc: Likewise.
+ * docs/html/ext/howto.html: Add an entry for DR 438.
+
2007-04-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_classes.h: Remove redundant inline specifiers.
diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html
index c3dcca4d213..fff3410180f 100644
--- a/libstdc++-v3/docs/html/ext/howto.html
+++ b/libstdc++-v3/docs/html/ext/howto.html
@@ -543,7 +543,7 @@
</dd>
<dt><a href="lwg-defects.html#432">432</a>:
- <em>432. stringbuf::overflow() makes only one write position
+ <em>stringbuf::overflow() makes only one write position
available</em>
</dt>
<dd>Implement the resolution, beyond DR 169.
@@ -555,6 +555,12 @@
<dd>Add three overloads, taking fewer template arguments.
</dd>
+ <dt><a href="lwg-defects.html#438">438</a>:
+ <em>Ambiguity in the "do the right thing" clause</em>
+ </dt>
+ <dd>Implement the resolution, basically cast less.
+ </dd>
+
<dt><a href="lwg-defects.html#453">453</a>:
<em>basic_stringbuf::seekoff need not always fail for an empty stream</em>
</dt>
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index a6e3d6dffaa..6317b17cab3 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -1467,12 +1467,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return _S_construct(__beg, __end, __a, _Tag());
}
- template<class _InIterator>
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<class _Integer>
static _CharT*
- _S_construct_aux(_InIterator __beg, _InIterator __end,
+ _S_construct_aux(_Integer __beg, _Integer __end,
const _Alloc& __a, __true_type)
- { return _S_construct(static_cast<size_type>(__beg),
- static_cast<value_type>(__end), __a); }
+ { return _S_construct(static_cast<size_type>(__beg), __end, __a); }
template<class _InIterator>
static _CharT*
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index ba29650831b..be0ec9075d2 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -793,11 +793,14 @@ template<typename _Alloc>
}
// Check whether it's an integral type. If so, it's not an iterator.
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
{
- _M_initialize(__n);
+ _M_initialize(static_cast<size_type>(__n));
std::fill(this->_M_impl._M_start._M_p,
this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
}
@@ -828,10 +831,12 @@ template<typename _Alloc>
std::copy(__first, __last, this->_M_impl._M_start);
}
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
- { _M_fill_assign((size_t) __n, (bool) __val); }
+ { _M_fill_assign(__n, __val); }
template<class _InputIterator>
void
@@ -888,6 +893,9 @@ template<typename _Alloc>
}
// Check whether it's an integral type. If so, it's not an iterator.
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index 2030a937e5c..0c7d7582557 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -1221,11 +1221,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal constructor functions follow.
// called by the range constructor to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
{
- _M_initialize_map(__n);
+ _M_initialize_map(static_cast<size_type>(__n));
_M_fill_initialize(__x);
}
@@ -1285,13 +1288,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// assignment work for the range versions.
// called by the range assign to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
- {
- _M_fill_assign(static_cast<size_type>(__n),
- static_cast<value_type>(__val));
- }
+ { _M_fill_assign(__n, __val); }
// called by the range assign to implement [23.1.1]/9
template<typename _InputIterator>
@@ -1364,14 +1367,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// insertion work when all shortcuts fail.
// called by the range insert to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos,
_Integer __n, _Integer __x, __true_type)
- {
- _M_fill_insert(__pos, static_cast<size_type>(__n),
- static_cast<value_type>(__x));
- }
+ { _M_fill_insert(__pos, __n, __x); }
// called by the range insert to implement [23.1.1]/9
template<typename _InputIterator>
diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h
index e37e5ee36f3..55f3208297d 100644
--- a/libstdc++-v3/include/bits/stl_list.h
+++ b/libstdc++-v3/include/bits/stl_list.h
@@ -1,6 +1,6 @@
// List implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -1098,13 +1098,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal constructor functions follow.
// Called by the range constructor to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
- {
- _M_fill_initialize(static_cast<size_type>(__n),
- static_cast<value_type>(__x));
- }
+ { _M_fill_initialize(static_cast<size_type>(__n), __x); }
// Called by the range constructor to implement [23.1.1]/9
template<typename _InputIterator>
@@ -1129,13 +1129,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal assign functions follow.
// Called by the range assign to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
- {
- _M_fill_assign(static_cast<size_type>(__n),
- static_cast<value_type>(__val));
- }
+ { _M_fill_assign(__n, __val); }
// Called by the range assign to implement [23.1.1]/9
template<typename _InputIterator>
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index f2c4b4ba9d7..93843f0a77e 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -1,6 +1,6 @@
// Vector implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -778,13 +778,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal constructor functions follow.
// Called by the range constructor to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
{
- this->_M_impl._M_start = _M_allocate(__n);
- this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
- std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
+ this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n));
+ this->_M_impl._M_end_of_storage =
+ this->_M_impl._M_start + static_cast<size_type>(__n);
+ std::__uninitialized_fill_n_a(this->_M_impl._M_start,
+ static_cast<size_type>(__n),
+ __value,
_M_get_Tp_allocator());
this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
}
@@ -830,13 +836,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// assignment work for the range versions.
// Called by the range assign to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
- {
- _M_fill_assign(static_cast<size_type>(__n),
- static_cast<value_type>(__val));
- }
+ { _M_fill_assign(__n, __val); }
// Called by the range assign to implement [23.1.1]/9
template<typename _InputIterator>
@@ -870,14 +876,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal insert functions follow.
// Called by the range insert to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
__true_type)
- {
- _M_fill_insert(__pos, static_cast<size_type>(__n),
- static_cast<value_type>(__val));
- }
+ { _M_fill_insert(__pos, __n, __val); }
// Called by the range insert to implement [23.1.1]/9
template<typename _InputIterator>
diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h
index 9a6c9a63ad6..7c0934a3084 100644
--- a/libstdc++-v3/include/ext/rc_string_base.h
+++ b/libstdc++-v3/include/ext/rc_string_base.h
@@ -231,12 +231,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return _S_construct(__beg, __end, __a, _Tag());
}
- template<typename _InIterator>
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
static _CharT*
- _S_construct_aux(_InIterator __beg, _InIterator __end,
+ _S_construct_aux(_Integer __beg, _Integer __end,
const _Alloc& __a, std::__true_type)
- { return _S_construct(static_cast<size_type>(__beg),
- static_cast<value_type>(__end), __a); }
+ { return _S_construct(static_cast<size_type>(__beg), __end, __a); }
template<typename _InIterator>
static _CharT*
diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h
index a97d1e111b6..3b87879c4ca 100644
--- a/libstdc++-v3/include/ext/sso_string_base.h
+++ b/libstdc++-v3/include/ext/sso_string_base.h
@@ -106,12 +106,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_construct(__beg, __end, _Tag());
}
- template<typename _InIterator>
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
void
- _M_construct_aux(_InIterator __beg, _InIterator __end,
- std::__true_type)
- { _M_construct(static_cast<size_type>(__beg),
- static_cast<value_type>(__end)); }
+ _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type)
+ { _M_construct(static_cast<size_type>(__beg), __end); }
template<typename _InIterator>
void
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/dr438/constructor.cc b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/dr438/constructor.cc
new file mode 100644
index 00000000000..2f16545f4c6
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/dr438/constructor.cc
@@ -0,0 +1,28 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+
+#include <string>
+
+void f()
+{
+ std::string s(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/assign_neg.cc
new file mode 100644
index 00000000000..0c47da04033
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/assign_neg.cc
@@ -0,0 +1,36 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1297 }
+// { dg-excess-errors "" }
+
+#include <deque>
+
+struct A
+{
+ explicit A(int) { }
+};
+
+void f()
+{
+ std::deque<A> d;
+ d.assign(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor.cc
new file mode 100644
index 00000000000..f378b0b1178
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor.cc
@@ -0,0 +1,28 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+
+#include <deque>
+
+void f()
+{
+ std::deque<int> v(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_1_neg.cc
new file mode 100644
index 00000000000..fc0beffae3e
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_1_neg.cc
@@ -0,0 +1,30 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1232 }
+// { dg-excess-errors "" }
+
+#include <deque>
+
+void f()
+{
+ std::deque<std::deque<int> > d(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_2_neg.cc
new file mode 100644
index 00000000000..403f6473f6b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/constructor_2_neg.cc
@@ -0,0 +1,31 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1232 }
+// { dg-excess-errors "" }
+
+#include <deque>
+#include <utility>
+
+void f()
+{
+ std::deque<std::deque<std::pair<char, char> > > d('a', 'b');
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/insert_neg.cc
new file mode 100644
index 00000000000..2e2abc56c4b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/deque/insert_neg.cc
@@ -0,0 +1,37 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1377 }
+// { dg-excess-errors "" }
+
+#include <deque>
+
+struct A
+{
+ explicit A(int) { }
+};
+
+void f()
+{
+ std::deque<A> d;
+ d.insert(d.begin(), 10, 1);
+}
+
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/assign_neg.cc
new file mode 100644
index 00000000000..4ad1127b9e5
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/assign_neg.cc
@@ -0,0 +1,36 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1138 }
+// { dg-excess-errors "" }
+
+#include <list>
+
+struct A
+{
+ explicit A(int) { }
+};
+
+void f()
+{
+ std::list<A> l;
+ l.assign(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor.cc
new file mode 100644
index 00000000000..c20ac14e202
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor.cc
@@ -0,0 +1,28 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+
+#include <list>
+
+void f()
+{
+ std::list<int> l(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_1_neg.cc
new file mode 100644
index 00000000000..5df6fc8532c
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_1_neg.cc
@@ -0,0 +1,30 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1107 }
+// { dg-excess-errors "" }
+
+#include <list>
+
+void f()
+{
+ std::list<std::list<int> > l(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_2_neg.cc
new file mode 100644
index 00000000000..6783727be7a
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/constructor_2_neg.cc
@@ -0,0 +1,31 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1107 }
+// { dg-excess-errors "" }
+
+#include <list>
+#include <utility>
+
+void f()
+{
+ std::list<std::list<std::pair<char, char> > > l('a', 'b');
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/insert_neg.cc
new file mode 100644
index 00000000000..c8f2026052e
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/list/insert_neg.cc
@@ -0,0 +1,36 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 1107 }
+// { dg-excess-errors "" }
+
+#include <list>
+
+struct A
+{
+ explicit A(int) { }
+};
+
+void f()
+{
+ std::list<A> l;
+ l.insert(l.begin(), 10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/assign_neg.cc
new file mode 100644
index 00000000000..873c27f86ed
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/assign_neg.cc
@@ -0,0 +1,36 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 845 }
+// { dg-excess-errors "" }
+
+#include <vector>
+
+struct A
+{
+ explicit A(int) { }
+};
+
+void f()
+{
+ std::vector<A> v;
+ v.assign(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/bool/constructor.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/bool/constructor.cc
new file mode 100644
index 00000000000..15b4a77a10b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/bool/constructor.cc
@@ -0,0 +1,28 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+
+#include <vector>
+
+void f()
+{
+ std::vector<bool> vb(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor.cc
new file mode 100644
index 00000000000..74968bd4b64
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor.cc
@@ -0,0 +1,28 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+
+#include <vector>
+
+void f()
+{
+ std::vector<int> v(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_1_neg.cc
new file mode 100644
index 00000000000..c66faaec941
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_1_neg.cc
@@ -0,0 +1,30 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no match" "" { target *-*-* } 706 }
+// { dg-excess-errors "" }
+
+#include <vector>
+
+void f()
+{
+ std::vector<std::vector<int> > v(10, 1);
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_2_neg.cc
new file mode 100644
index 00000000000..8e0130bc9cf
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/constructor_2_neg.cc
@@ -0,0 +1,31 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no match" "" { target *-*-* } 706 }
+// { dg-excess-errors "" }
+
+#include <vector>
+#include <utility>
+
+void f()
+{
+ std::vector<std::vector<std::pair<char, char> > > v('a', 'b');
+}
diff --git a/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/insert_neg.cc
new file mode 100644
index 00000000000..c82a5c4602d
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/requirements/sequences/dr438/vector/insert_neg.cc
@@ -0,0 +1,36 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-error "no matching" "" { target *-*-* } 886 }
+// { dg-excess-errors "" }
+
+#include <vector>
+
+struct A
+{
+ explicit A(int) { }
+};
+
+void f()
+{
+ std::vector<A> v;
+ v.insert(v.begin(), 10, 1);
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/requirements/dr438/constructor.cc b/libstdc++-v3/testsuite/ext/vstring/requirements/dr438/constructor.cc
new file mode 100644
index 00000000000..95d31db3a01
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/requirements/dr438/constructor.cc
@@ -0,0 +1,32 @@
+// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+
+#include <ext/vstring.h>
+
+void f()
+{
+ __gnu_cxx::__versa_string<char, std::char_traits<char>,
+ std::allocator<char>, __gnu_cxx::__sso_string_base> vs(10, 1);
+
+ __gnu_cxx::__versa_string<char, std::char_traits<char>,
+ std::allocator<char>, __gnu_cxx::__rc_string_base> vr(10, 1);
+}