aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorChao-ying Fu <fu@mips.com>2007-05-08 20:46:02 +0000
committerChao-ying Fu <fu@mips.com>2007-05-08 20:46:02 +0000
commit17360d785fbe152ac0a8d11f39c416210e79a302 (patch)
treef40a143bbe56fa095c45e3f68bc3eb4e15407b9f /libgfortran
parentdb30646f6ba4baff892b6fba3df4318d50c4ad84 (diff)
Merged revisions 124403-124429 via svnmerge from
svn+ssh://chaoyingfu@sources.redhat.com/svn/gcc/trunk ........ r124403 | hubicka | 2007-05-03 17:40:20 -0700 (Thu, 03 May 2007) | 8 lines * fold-const.c (fold_unary): Convert (T1)(X op Y) into ((T1)X op (T1)Y), for pointer type in more cases than before. * gimplify.c (gimplify_expr): Fold (void *)&a + 4. * tree-object-size.c (plus_expr_object_size): When operand size is unknown, return unknown. ........ r124404 | mueller | 2007-05-03 17:46:02 -0700 (Thu, 03 May 2007) | 7 lines 2007-05-04 Dirk Mueller <dmueller@suse.de> * c.opt(Wmain,ffreestanding): Enable for C++,ObjC++. * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is not in effect. ........ r124406 | kseitz | 2007-05-03 18:04:11 -0700 (Thu, 03 May 2007) | 27 lines * include/jvmti-int.h (_Jv_ReportJVMTIExceptionThrow): Declare. * interpret.cc (_Jv_ReportJVMTIExceptionThrow): New function. (find_catch_location): New function. (REPORT_EXCEPTION): New macro. (throw_internal_error): Use REPORT_EXCEPTION. (throw_incompatible_class_change_error): Likewise. (throw_null_pointer_exception): Likewise. (throw_class_format_error): Likewise. * interpret-run.cc (INTERP_REPORT_EXCEPTION)[DEBUG]: Set to REPORT_EXCEPTION. (INTERP_REPORT_EXCEPTION)[!DEBUG]: Make nop. (insn_new): Use INTERP_REPORT_EXCEPTION. (insn_athrow): Likewise. Remove previous JVMTI exception notifications. Add JVMTI ExceptionCatch notificatin. * jni.cc (_Jv_PopSystemFrame): Notify JVMTI clients of exception throw. * gnu/gcj/jvmti/ExceptionEvent.java: Removed. * gnu/gcj/jvmti/ExceptionEvent.h: Removed. * classpath/lib/gnu/gcj/jvmti/ExceptionEvent.class: Removed. * gnu/classpath/jdwp/natVMVirtualMachine.cc (jdwpExceptionCB): New function. (jdwpVMInitCB): Set Exception event handler and enable. * sources.am: Regenerated. * Makefile.in: Regenerated. ........ r124407 | kseitz | 2007-05-03 19:08:07 -0700 (Thu, 03 May 2007) | 5 lines * interpret.cc: Don't include ExceptionEvent.h. * gnu/gcj/jvmti/natExceptionEvent.cc: Remove. * Makefile.am (nat_source_files): Remove natExceptionEvent.cc. * Makefile.in: Regenerated. ........ r124408 | krebbel | 2007-05-04 00:07:47 -0700 (Fri, 04 May 2007) | 5 lines 2007-05-04 Andreas Krebbel <krebbel1@de.ibm.com> * libgcc-std.ver (__ffssi2): Added to GCC_4.3.0 section. ........ r124409 | mkuvyrkov | 2007-05-04 00:13:28 -0700 (Fri, 04 May 2007) | 10 lines * sched-ebb.c (debug_ebb_dependencies): New static function. (init_ready_list): Use it. * sched-rgn.c (debug_dependencies): Split into 'debug_dependencies ()' with changed signature and 'debug_rgn_dependencies ()'. (debug_rgn_dependencies): New static function. (init_ready_list): Use it. * sched-int.h (debug_dependencies): Declare. ........ r124410 | mkuvyrkov | 2007-05-04 00:21:20 -0700 (Fri, 04 May 2007) | 14 lines * haifa-sched.c (rtx_vec_t): New typedef. (contributes_to_priority_p): Extract piece of priority () into new static function. (priority): Use the function. Add assertion. (rank_for_schedule, set_priorities): Add assertion to check that insn's priority is initialized. (clear_priorities, calc_priorities): Change signature. Make it update all relevant insns. Update all callers ('add_to_speculative_block ()' and 'create_block_check_twin ()'). * sched-int.h (struct haifa_insn_data): Remove field 'priority_known'. Add new field 'priority_status'. (INSN_PRIORITY_STATUS): New macro. (INSN_PRIORITY_KNOWN): Change to use INSN_PRIORITY_STATUS. ........ r124411 | burnus | 2007-05-04 00:54:06 -0700 (Fri, 04 May 2007) | 12 lines 2007-05-04 Tobias Burnus <burnus@net-b.de> * interface.c (compare_actual_formal): Check character length. 2007-05-04 Tobias Burnus <burnus@net-b.de> * gfortran.dg/char_length_3.f90: New test. * gfortran.dg/char_result_2.f90: Fix test. ........ r124412 | fxcoudert | 2007-05-04 02:26:41 -0700 (Fri, 04 May 2007) | 4 lines * simplify.c (gfc_simplify_repeat): Don't put function call with side effect in a gcc_assert(). ........ r124413 | uros | 2007-05-04 03:19:31 -0700 (Fri, 04 May 2007) | 5 lines * doc/invoke.texi (i386 and x86-64 Options) [-mpc32, -mpc64, -mpc80]: Add the note about a significant loss of accuracy of some mathematical routines when these options are used. ........ r124414 | bernds | 2007-05-04 04:00:00 -0700 (Fri, 04 May 2007) | 14 lines * config/bfin/bfin.md (<optab>di3): Now a define_expand which expands logical operations piecewise. (<optab>di_zesidi_di, <optab>di_sesidi_di, negdi2, one_cmpldi2, zero_extendsidi2, subdi_di_zesidi, subdi_zesidi_di, subdi_di_sesidi, subdi_sesidi_di): Delete. (add_with_carry): Produce carry in CC instead of a DREG to shorten the generated sequence. Allow three-reg add in constraints. Rewrite the rtl expression for carry to avoid zero_extend of a constant. (sub_with_carry): New pattern. (adddi3, subdi3): Change into define_expand. For subtract, generate a different sequence not involving jumps. (notbi): Now a named pattern. ........ r124415 | fxcoudert | 2007-05-04 04:10:06 -0700 (Fri, 04 May 2007) | 3 lines * simplify.c (gfc_simplify_len): Only simplify integer lengths. ........ r124419 | burnus | 2007-05-04 06:40:32 -0700 (Fri, 04 May 2007) | 12 lines 2007-05-04 Tobias Burnus <burnus@net-b.de> * expr.c (gfc_check_pointer_assign): Check for NULL pointer. 2007-05-04 Tobias Burnus <burnus@net-b.de> * gfortran.dg/char_pointer_assign_3.f90: New test. * gfortran.dg/char_result_2.f90: Re-enable test. ........ r124427 | paolo | 2007-05-04 08:06:46 -0700 (Fri, 04 May 2007) | 12 lines 2007-05-04 Paolo Carlini <pcarlini@suse.de> * include/bits/stl_construct.h (_Destroy(_ForwardIterator, _ForwardIterator __last, _Allocator)): Change the last parameter to _Allocator&. * include/bits/stl_uninitialized.h (__uninitialized_copy_a, __uninitialized_fill_a, __uninitialized_fill_n_a, __uninitialized_fill_copy, __uninitialized_copy_fill, __uninitialized_copy_copy): Likewise. * include/ext/rope: Adjust everywhere. * include/ext/ropeimpl.h: Likewise. ........ r124428 | fxcoudert | 2007-05-04 08:14:07 -0700 (Fri, 04 May 2007) | 5 lines * io/transfer.c (transfer_character): Avoid passing a NULL pointer as source to the transfer routines, if the string length is zero. ........ r124429 | fxcoudert | 2007-05-04 08:20:17 -0700 (Fri, 04 May 2007) | 3 lines * gfortran.dg/zero_length_1.f90: New test. ........ git-svn-id: https://gcc.gnu.org/svn/gcc/branches/fixed-point@124554 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/io/transfer.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 409c20d64a0..52f15066293 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR libfortran/31210
+ * io/transfer.c (transfer_character): Avoid passing a NULL
+ pointer as source to the transfer routines, if the string length
+ is zero.
+
2007-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/31501
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 13bb27206fd..1e90e835f88 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -1401,8 +1401,17 @@ transfer_logical (st_parameter_dt *dtp, void *p, int kind)
void
transfer_character (st_parameter_dt *dtp, void *p, int len)
{
+ static char *empty_string[0];
+
if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK)
return;
+
+ /* Strings of zero length can have p == NULL, which confuses the
+ transfer routines into thinking we need more data elements. To avoid
+ this, we give them a nice pointer. */
+ if (len == 0 && p == NULL)
+ p = empty_string;
+
/* Currently we support only 1 byte chars, and the library is a bit
confused of character kind vs. length, so we kludge it by setting
kind = length. */