public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
[not found] <bug-24518-4@http.gcc.gnu.org/bugzilla/>
@ 2012-05-05 8:02 ` jb at gcc dot gnu.org
0 siblings, 0 replies; 27+ messages in thread
From: jb at gcc dot gnu.org @ 2012-05-05 8:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
--- Comment #25 from Janne Blomqvist <jb at gcc dot gnu.org> 2012-05-05 07:59:30 UTC ---
Author: jb
Date: Sat May 5 07:59:22 2012
New Revision: 187191
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187191
Log:
PR 49010,24518 MOD/MODULO fixes.
gcc/fortran:
2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/49010
PR fortran/24518
* intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
* simplify.c (gfc_simplify_mod): Use mpfr_fmod.
(gfc_simplify_modulo): Likewise, use copysign to fix the result if
zero.
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
builtin_fmod is always available. For modulo, call copysign to fix
the result when signed zeros are enabled.
testsuite:
2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/49010
PR fortran/24518
* gfortran.dg/mod_sign0_1.f90: New test.
* gfortran.dg/mod_large_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/mod_large_1.f90
trunk/gcc/testsuite/gfortran.dg/mod_sign0_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/intrinsic.texi
trunk/gcc/fortran/simplify.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (24 preceding siblings ...)
2006-12-02 8:23 ` burnus at gcc dot gnu dot org
@ 2006-12-02 8:28 ` pinskia at gcc dot gnu dot org
25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-02 8:28 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (23 preceding siblings ...)
2006-12-02 8:12 ` ebotcazou at gcc dot gnu dot org
@ 2006-12-02 8:23 ` burnus at gcc dot gnu dot org
2006-12-02 8:28 ` pinskia at gcc dot gnu dot org
25 siblings, 0 replies; 27+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-12-02 8:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #24 from burnus at gcc dot gnu dot org 2006-12-02 08:23 -------
(In reply to comment #23)
> Just to let you know that the Fortran compiler has been broken for about a
> month on all Solaris versions (except release 10) with
I just filled this as PR30048.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (22 preceding siblings ...)
2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
@ 2006-12-02 8:12 ` ebotcazou at gcc dot gnu dot org
2006-12-02 8:23 ` burnus at gcc dot gnu dot org
2006-12-02 8:28 ` pinskia at gcc dot gnu dot org
25 siblings, 0 replies; 27+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-12-02 8:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from ebotcazou at gcc dot gnu dot org 2006-12-02 08:12 -------
Just to let you know that the Fortran compiler has been broken for about a
month on all Solaris versions (except release 10) with:
Undefined first referenced
symbol in file
fmodf
/opt/build/eric/gcc/sparc64-sun-solaris2.9/.
/libgfortran/.libs/libgfortran.so
fmodl
/opt/build/eric/gcc/sparc64-sun-solaris2.9/.
/libgfortran/.libs/libgfortran.so
ld: fatal: Symbol referencing errors. No output written to ./PR19754_2.exe
collect2: ld returned 1 exit status
compiler exited with status 1
NAME
fmod, fmodf, fmodl - floating-point remainder function
CONFORMING TO
SVID 3, POSIX, BSD 4.3, ISO 9899. The float and the long double vari-
ants are C99 requirements.
Given that you guys regularly break the compiler on non-C99 platforms, I'd
suggest to arrange for having your changes tested on one of them beforehand,
possibly by asking Laurent Guerby of the CompileFarm project to install
an old Linux distro on one of his old machine.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (21 preceding siblings ...)
2006-11-10 21:53 ` pault at gcc dot gnu dot org
@ 2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
2006-12-02 8:12 ` ebotcazou at gcc dot gnu dot org
` (2 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: chaoyingfu at gcc dot gnu dot org @ 2006-12-01 0:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from chaoyingfu at gcc dot gnu dot org 2006-12-01 00:07 -------
Subject: Bug 24518
Author: chaoyingfu
Date: Fri Dec 1 00:05:26 2006
New Revision: 119383
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119383
Log:
Merged revisions 118455-118543 via svnmerge from
svn+ssh://chaoyingfu@sources.redhat.com/svn/gcc/trunk
........
r118455 | fxcoudert | 2006-11-03 03:51:09 -0800 (Fri, 03 Nov 2006) | 20 lines
PR libfortran/27895
* intrinsics/reshape_generic.c (reshape_internal): Fix so that it
works correctly for zero-sized arrays.
* m4/reshape.m4: Likewise.
* generated/reshape_r16.c: Regenerate.
* generated/reshape_c4.c: Regenerate.
* generated/reshape_i4.c: Regenerate.
* generated/reshape_c16.c: Regenerate.
* generated/reshape_r10.c: Regenerate.
* generated/reshape_r8.c: Regenerate.
* generated/reshape_c10.c: Regenerate.
* generated/reshape_c8.c: Regenerate.
* generated/reshape_i8.c: Regenerate.
* generated/reshape_i16.c: Regenerate.
* generated/reshape_r4.c: Regenerate.
* gcc/testsuite/gfortran.dg/zero_sized_1.f90: Uncomment checks
for RESHAPE.
........
r118458 | amylaar | 2006-11-03 06:52:19 -0800 (Fri, 03 Nov 2006) | 97 lines
gcc:
2006-11-03 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/crt1.asm: Fix #ifdef indent.
2006-11-03 J"orn Rennecke <joern.rennecke@st.com>
Merged from STMicroelectronics sources:
2006-10-06 Andrew Stubbs <andrew.stubbs@st.com>
* config/sh/crt1.asm (vbr_600): Add missing #if.
2006-08-03 J"orn Rennecke <joern.rennecke@st.com>
* sh.opt (mfused-madd): New option.
* sh.md (mac_media, macsf3): Make conditional on TARGET_FMAC.
2006-07-04 Andrew Stubbs <andrew.stubbs@st.com>
* config/sh/crt1.asm (vbr_start): Move to new section .test.vbr.
Remove pointless handler at VBR+0.
(vbr_200, vbr_300, vbr_500): Remove pointless handler.
(vbr_600): Save and restore mach and macl, fpul and fpscr and fr0 to
fr7. Make sure the timer handler is called with the correct FPU
precision setting, according to the ABI.
2006-06-14 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/sh.opt (m2a-single, m2a-single-only): Fix Condition.
* config/sh/sh.h (SUPPORT_SH2A_NOFPU): Fix condition.
(SUPPORT_SH2A_SINGLE_ONLY, SUPPORT_SH2A_SINGLE_ONLY): Likewise.
2006-06-09 J"orn Rennecke <joern.rennecke@st.com>
* sh.md (cmpgeusi_t): Change into define_insn_and_split. Accept
zero as second operand.
2006-04-28 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/divtab-sh4-300.c, config/sh/lib1funcs-4-300.asm:
Fixed some bugs related to negative values, in particular -0
and overflow at -0x80000000.
* config/sh/divcost-analysis: Added sh4-300 figures.
2006-04-27 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/t-sh (MULTILIB_MATCHES): Add -m4-300* / -m4-340 options.
2006-04-26 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/t-sh (OPT_EXTRA_PARTS): Add libgcc-4-300.a.
($(T)div_table-4-300.o, $(T)libgcc-4-300.a): New rules.
* config/sh/divtab-sh4-300.c, config/sh/lib1funcs-4-300.asm:
New files.
* config/sh/embed-elf.h (LIBGCC_SPEC): Use -lgcc-4-300 for -m4-300* /
-m4-340.
2006-04-24 J"orn Rennecke <joern.rennecke@st.com>
SH4-300 scheduling description & fixes to SH4-[12]00 description:
* sh.md: New instruction types: fstore, movi8, fpscr_toggle, gp_mac,
mac_mem, mem_mac, dfp_mul, fp_cmp.
(insn_class, dfp_comp, any_fp_comp): Update.
(push_fpul, movsf_ie, fpu_switch, toggle_sz, toggle_pr): Update type.
(cmpgtsf_t, "cmpeqsf_t, cmpgtsf_t_i4, cmpeqsf_t_i4): Likewise.
(muldf3_i): Likewise.
(movsi_i): Split rI08 alternative into two separate alternatives.
Update type.
(movsi_ie, movsi_i_lowpart): Likewise.
(movqi_i): Split ri alternative into two separate alternatives.
Update type.
* sh1.md (sh1_load_store, sh1_fp): Update.
* sh4.md (sh4_store, sh4_mac_gp, fp_arith, fp_double_arith): Update.
(mac_mem, sh4_fpscr_toggle): New insn_reservations.
* sh4a.md (sh4a_mov, sh4a_load, sh4a_store, sh4a_fp_arith): Update.
(sh4a_fp_double_arith): Likewise.
* sh4-300.md: New file.
* sh.c (sh_handle_option): Handle m4-300* options.
(sh_adjust_cost): Fix latency of auto-increments.
Handle SH4-300 differently than other SH4s. Check for new insn
types.
* sh.h (OVERRIDE_OPTIONS): Initilize sh_branch_cost if it has not
been set by an option.
* sh.opt (m4-300, m4-100-nofpu, m4-200-nofpu): New options.
(m4-300-nofpu, -m4-340, m4-300-single, m4-300-single-only): Likewise.
(mbranch-cost=): Likewise.
* superh.h (STARTFILE_SPEC): Take -m4-340 into account.
* sh.md (mulsf3): Remove special expansion code.
(mulsf3_ie): Now a define_insn_and_split.
(macsf3): Allow for TARGET_SH4.
* sh.md (cbranchsi4, cbranchdi4, cbranchdi4_i): New patterns.
* sh.c (prepare_cbranch_operands, expand_cbranchsi4): New functions.
(expand_cbranchdi4): Likewise.
(sh_rtx_costs): Give lower cost for certain CONST_INT values and for
CONST_DOUBLE if the outer code is COMPARE.
* sh.h (OPTIMIZATION_OPTIONS): If not optimizing for size, set
TARGET_CBRANCHDI4 and TARGET_EXPAND_CBRANCHDI4.
(OVERRIDE_OPTIONS): For TARGET_SHMEDIA, clear TARGET_CBRANCHDI4.
(LEGITIMATE_CONSTANT_P): Also allow DImode and VOIDmode
CONST_DOUBLEs.
Remove redundant fp_{zero,one}_operand checks.
* sh.opt (mcbranchdi, mexpand-cbranchdi, mcmpeqdi): New options.
* sh-protos.h (prepare_cbranch_operands, expand_cbranchsi4): Declare.
(expand_cbranchdi4): Likewise.
2006-04-20 J"orn Rennecke <joern.rennecke@st.com>
* sh.h (LOCAL_ALIGNMENT): Use DATA_ALIGNMENT.
gcc/testsuite:
2006-11-03 J"orn Rennecke <joern.rennecke@st.com>
* testsuite/gcc.c-torture/execute/arith-rand-ll.c:
Also test for bogus rest sign.
........
r118459 | davidu | 2006-11-03 09:32:39 -0800 (Fri, 03 Nov 2006) | 9 lines
* config/mips/mips.h (processor_type): Removed PROCESSOR_24K, add
PROCESSOR_24KC and PROCESSOR_24KF.
* config/mips/mips.c (mips_cpu_info_table): Add processor names
and aliases for 4kec/4kem/4kep/24kec/24kef/24kex/34kc/34kf/34kx.
(mips_rtx_cost_data): Add costs for the 24kc.
* config/mips/mips.md ("cpu"): Remove 24k, add 24kc and 24kf.
* config/mips/24k.md: Remove references to 24k and replace with
uses of 24kc/24kf in the appropriate reservations.
* doc/invoke.texi (MIPS Options): Updated.
........
r118460 | davidu | 2006-11-03 09:39:44 -0800 (Fri, 03 Nov 2006) | 2 lines
typo
........
r118461 | pbrook | 2006-11-03 09:49:43 -0800 (Fri, 03 Nov 2006) | 9 lines
2006-11-03 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_file_start): New function.
(TARGET_ASM_FILE_START): Define.
(arm_default_cpu): New variable.
(arm_override_options): Set arm_default_cpu.
........
r118465 | steven | 2006-11-03 14:12:37 -0800 (Fri, 03 Nov 2006) | 15 lines
* tree-dump.c (dump_enable_all): Rename local variable
ir_type to avoid name conflicts.
* cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE
instead of using ir_type().
* profile.c (tree_register_profile_hooks): Likewise.
* value-prof.c (tree_register_value_prof_hooks): Likewise.
* basic-block.h (struct edge_def): Likewise.
* config/arm/arm.c (legitimize_pic_address): Likewise.
* coretypes.h (ir_type): New enum of all intermediate languages
used in GCC.
* cfghooks.c (ir_type): Rename to...
(current_ir_type): ...this. Distinguish between cfgrtl and
cfglayout mode when the current IR is RTL. Return enum ir_type.
* cfghooks.h (ir_type): Replace with current_ir_type prototype.
........
r118470 | gccadmin | 2006-11-03 16:17:39 -0800 (Fri, 03 Nov 2006) | 1 line
Daily bump.
........
r118472 | sayle | 2006-11-03 16:51:51 -0800 (Fri, 03 Nov 2006) | 11 lines
* call.c (build_op_delete_call): Test user-visible type against
size_type_node, instead of against the internal type, sizetype.
* class.c (type_requires_array_cookie): Likewise.
* mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
handling of TYPE_IS_SIZETYPE.
* typeck.c (type_after_usual_arithmetic_conversions): Remove
special case handling of TYPE_IS_SIZETYPE.
(comptypes): Likewise.
........
r118474 | geoffk | 2006-11-03 18:59:52 -0800 (Fri, 03 Nov 2006) | 4 lines
* c-decl.c (WANT_C99_INLINE_SEMANTICS): New, set to 1.
(merge_decls): Implement WANT_C99_INLINE_SEMANTICS.
(grokdeclarator): Likewise.
........
r118475 | bonzini | 2006-11-04 00:36:45 -0800 (Sat, 04 Nov 2006) | 30 lines
2006-11-03 Paolo Bonzini <bonzini@gnu.org>
Steven Bosscher <stevenb.gcc@gmail.com>
* fwprop.c: New file.
* Makefile.in: Add fwprop.o.
* tree-pass.h (pass_rtl_fwprop, pass_rtl_fwprop_with_addr): New.
* passes.c (init_optimization_passes): Schedule forward propagation.
* rtlanal.c (loc_mentioned_in_p): Support NULL value of the second
parameter.
* timevar.def (TV_FWPROP): New.
* common.opt (-fforward-propagate): New.
* opts.c (decode_options): Enable forward propagation at -O2.
* gcse.c (one_cprop_pass): Do not run local cprop unless touching
jumps.
* cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1,
find_best_addr,
canon_for_address, table_size): Remove.
(new_basic_block, insert, remove_from_table): Remove references to
table_size.
(fold_rtx): Process SUBREGs and MEMs with equiv_constant, make
simplification loop more straightforward by not calling fold_rtx
recursively.
(equiv_constant): Move here a small part of fold_rtx_subreg,
do not call fold_rtx. Call avoid_constant_pool_reference
to process MEMs.
* recog.c (canonicalize_change_group): New.
* recog.h (canonicalize_change_group): New.
* doc/invoke.texi (Optimization Options): Document fwprop.
* doc/passes.texi (RTL passes): Document fwprop.
........
r118478 | steven | 2006-11-04 03:13:57 -0800 (Sat, 04 Nov 2006) | 2 lines
ChangeLog fix
........
r118479 | uros | 2006-11-04 04:07:29 -0800 (Sat, 04 Nov 2006) | 4 lines
* config/i386/i386.md (*movxf_nointeger, *movxf_integer): Enable
patterns for standard 80387 constants.
........
r118481 | rearnsha | 2006-11-04 06:26:34 -0800 (Sat, 04 Nov 2006) | 2 lines
* arm.c (thumb_legitimate_addres_p): Allow any constant offset
from the soft-frame, argument and virtual registers.
........
r118483 | fxcoudert | 2006-11-04 12:58:26 -0800 (Sat, 04 Nov 2006) | 6 lines
PR fortran/29713
* expr.c (gfc_simplify_expr): Correct memory allocation.
* gfortran.dg/pr29713.f90: New test.
........
r118484 | uros | 2006-11-04 15:12:16 -0800 (Sat, 04 Nov 2006) | 14 lines
PR target/26915
* config/i386/i386.c (standard_80387_constant_p): Treat -0.0 and -1.0
as a valid 80387 constant.
(standard_80387_constant_opcode): Return "#" for -0.0 and -1.0.
* config/i386/i386.md (unnamed splitter): Split the load of
constant -0.0 or -1.0 into the load of 0.0 or 1.0, followed
by negation.
testsuite/ChangeLog:
PR target/26915
* gcc.target/i386/387-12.c: New test.
~
........
r118489 | gccadmin | 2006-11-04 16:17:22 -0800 (Sat, 04 Nov 2006) | 1 line
Daily bump.
........
r118491 | brooks | 2006-11-04 16:28:08 -0800 (Sat, 04 Nov 2006) | 6 lines
* fortran/error.c (show_locus): Add trailing colon in error messages.
(error_print): Avoid leading space in error lines.
* testsuite/lib/gfortran-dg.exp (gfortran-dg-test): Adjust pattern
for matching error messages.
........
r118492 | pault | 2006-11-04 22:27:48 -0800 (Sat, 04 Nov 2006) | 18 lines
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/24518
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
for both MOD and MODULO, if it is available.
PR fortran/29565
* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
the declarations from the unused loops by merging the block
scope for each; this ensures that the temporary is declared.
2006-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29565
* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
........
r118494 | ebotcazou | 2006-11-05 02:19:18 -0800 (Sun, 05 Nov 2006) | 1 line
Fix typos.
........
r118496 | charlet | 2006-11-05 02:58:41 -0800 (Sun, 05 Nov 2006) | 4 lines
* s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads
(To_Target_Priority): New function.
Fix PR ada/29707
........
r118497 | jakub | 2006-11-05 04:13:46 -0800 (Sun, 05 Nov 2006) | 7 lines
PR middle-end/29695
* fold-const.c (fold_ternary): Fix A < 0 ? <sign bit of A> : 0
simplification.
* gcc.c-torture/execute/pr29695-1.c: New test.
* gcc.c-torture/execute/pr29695-2.c: New test.
........
r118500 | kkojima | 2006-11-05 04:58:28 -0800 (Sun, 05 Nov 2006) | 4 lines
* config/sh/lib1funcs-4-300.asm: Guard entire file with
#if !__SHMEDIA__ .
........
r118501 | aldot | 2006-11-05 06:57:24 -0800 (Sun, 05 Nov 2006) | 9 lines
2006-11-05 Bernhard Fischer <aldot@gcc.gnu.org>
PR fortran/21061
* error.c (gfc_warning): If warnings_are_errors then treat
warnings as errors with respect to the exit code.
(gfc_notify_std): Ditto.
(gfc_warning_now): Ditto.
........
r118502 | paolo | 2006-11-05 08:17:03 -0800 (Sun, 05 Nov 2006) | 6 lines
2006-11-05 Paolo Carlini <pcarlini@suse.de>
* docs/html/ext/lwg-active.html, lwg-defects.html: Import Revision 45.
* docs/html/ext/lwg-closed.html: Add.
* docs/html/ext/howto.html: Adjust.
........
r118506 | jvdelisle | 2006-11-05 09:35:30 -0800 (Sun, 05 Nov 2006) | 10 lines
2006-11-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25545
* io/transfer.c (write_block): Cleanup code paths between
stream and non-stream I/O.
(write_buf): Cleanup.
(read_block): Cleanup.
(finalize_transfer): Call next_record for '$' edit descriptor handling
of internal unit. Cleanup code for readability.
........
r118507 | jvdelisle | 2006-11-05 09:40:42 -0800 (Sun, 05 Nov 2006) | 5 lines
2006-11-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25545
* gfortran.dg/dollar_edit_descriptor-2.f: New test.
........
r118508 | jvdelisle | 2006-11-05 09:54:17 -0800 (Sun, 05 Nov 2006) | 4 lines
2006-11-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/transfer.c (next_record_w): Fix indentation.
........
r118515 | gccadmin | 2006-11-05 16:17:47 -0800 (Sun, 05 Nov 2006) | 1 line
Daily bump.
........
r118518 | vprus | 2006-11-06 01:49:07 -0800 (Mon, 06 Nov 2006) | 10 lines
* config/arm/t-strongarm-pe: (TARGET_LIBGCC2_CFLAGS): Do no
set inhibit_libc.
* config/arm/t-strongarm-elf: Likewise.
* config/arm/t-pe: Likewise.
* config/arm/t-arm-elf: Likewise.
* config/arm/t-xscale-elf: Likewise.
* config/arm/t-arm-coff: Likewise.
* config/arm/t-xscale-coff: Likewise.
* config/arm/t-wince-pe: Likewise.
........
r118523 | fche | 2006-11-06 10:02:13 -0800 (Mon, 06 Nov 2006) | 10 lines
2006-11-06 Frank Ch. Eigler <fche@redhat.com>
* configure.ac (__libc_freeres): Look for it.
* mf-impl.h (call_libc_freeres): New configuration flag.
* mf-runtime.c (__mf_set_default_options): Set it by default.
(__mfu_report): Call it if needed.
(__mfu_unregister): Remove "unaccessed registered object" warning.
* configure, config.h.in: Regenerated.
........
r118524 | bwilson | 2006-11-06 10:50:37 -0800 (Mon, 06 Nov 2006) | 24 lines
* longlong.h (__xtensa__): Add definitions for umul_ppmm, __umulsidi3,
count_leading_zeros, and count_trailing_zeros.
* config/xtensa/xtensa.c (TARGET_INIT_BUILTINS): Define.
(TARGET_FOLD_BUILTIN): Define.
(TARGET_EXPAND_BUILTIN): Define.
(xtensa_init_builtins): New.
(xtensa_fold_builtin): New.
(xtensa_expand_builtin): New.
(xtensa_rtx_costs): Add CTZ and CLZ. Adjust costs for MULT.
* config/xtensa/xtensa.h (TARGET_MUL32_HIGH): Define.
(CLZ_DEFINED_VALUE_AT_ZERO): Define.
(CTZ_DEFINED_VALUE_AT_ZERO): Define.
* config/xtensa/xtensa.md (UNSPEC_NSAU): Remove.
(any_extend): New code macro.
(u, su): New code attributes.
(<u>mulsidi3, <u>mulsi3_highpart, clzsi2, ctzsi2): New.
(nsau): Remove; replaced by clzsi2.
(ffssi2): Use clzsi2.
* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _umulsidi3,
_clzsi2, _ctzsi2, and _ffssi2. Rename _nsau to _clz.
* config/xtensa/lib1funcs.asm (__mulsi3): Support Mul32 option.
(__umulsidi3, __clzsi2, __ctzsi2, __ffssi2): New.
(__nsau_data): Guard with ifdef L_clz instead of L_nsau.
........
r118525 | dannysmith | 2006-11-06 11:49:31 -0800 (Mon, 06 Nov 2006) | 5 lines
2006-11-06 Jan van Dijk <jan@etpmod.phys.tue.nl>
* configure.ac: Fix typo in case statement: :: changed to ;;
* configure: Regenerate.
........
r118526 | fche | 2006-11-06 12:04:14 -0800 (Mon, 06 Nov 2006) | 6 lines
2006-11-06 Frank Ch. Eigler <fche@redhat.com>
From Herman ten Brugge <hermantenbrugge@home.nl>:
* mf-runtime.c (__mf_uncache_object): Optimize the code so that
small and large objects are handled a lot faster.
........
r118528 | eedelman | 2006-11-06 14:18:54 -0800 (Mon, 06 Nov 2006) | 18 lines
fortran/
2006-11-06 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/29630
PR fortran/29679
* expr.c (find_array_section): Support vector subscripts. Don't
add sizes for dimen_type == DIMEN_ELEMENT to the shape array.
testsuite/
2006-11-06 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/29630
PR fortran/29679
* gfortran.dg/initialization_2.f90: Test PRs 29630 and 29679 too.
* gfortran.dg/initialization_3.f90: New.
........
r118530 | pinskia | 2006-11-06 15:25:19 -0800 (Mon, 06 Nov 2006) | 7 lines
2006-11-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/29439
* tree-vrp.c (vrp_int_const_binop): Use the correct tree when
checking for overflow.
........
r118531 | janis | 2006-11-06 16:08:32 -0800 (Mon, 06 Nov 2006) | 22 lines
gcc/
2006-11-06 Janis Johnson <janis187@us.ibm.com>
* gcc/doc/sourcebuild.texi (Test Directives): Add output-exists
and output-exists-not.
gcc/testsuite/
2006-11-06 Janis Johnson <janis187@us.ibm.com
Bernhard Fischer <aldot@gcc.gnu.org>
* lib/gcc-dg.exp (output-exists): New proc.
(output-exists-not): New proc.
* gcc.test-framework/test-framework.awk: Support new directives.
* gcc.test-framework/dg-outexistsnot-exp-F.c: New test.
* gcc.test-framework/dg-outexistsnot-exp-P.c: New test.
* gcc.test-framework/dg-outexists-exp-F.c: New test.
* gcc.test-framework/dg-outexists-exp-XP.c: New test.
* gcc.test-framework/dg-outexistsnot-exp-XF.c: New test.
* gcc.test-framework/dg-outexists-exp-P.c: New test.
........
r118536 | gccadmin | 2006-11-06 16:17:48 -0800 (Mon, 06 Nov 2006) | 1 line
Daily bump.
........
r118538 | brooks | 2006-11-06 17:49:55 -0800 (Mon, 06 Nov 2006) | 3 lines
* intrinsic.texi: Added documentation for FTELL, GETLOG, and HOSTNM
intrinsics.
........
r118540 | brooks | 2006-11-06 17:52:49 -0800 (Mon, 06 Nov 2006) | 2 lines
Fixed incorrect date in changelog entry.
........
r118541 | echristo | 2006-11-06 21:40:34 -0800 (Mon, 06 Nov 2006) | 7 lines
2006-11-06 Eric Christopher <echristo@apple.com>
* config.gcc: Add x86_64-darwin host support.
* config.host: Ditto.
* config/i386/darwin64.h: New file.
* config/i386/t-darwin64: Ditto.
........
r118542 | burnus | 2006-11-07 01:11:08 -0800 (Tue, 07 Nov 2006) | 21 lines
fortran/
2006-11-06 Tobias Burnus <burnus@net-b.de>
* decl.c (match_attr_spec, gfc_match_enum): Unify gfc_notify_std
message for GFC_STD_F2003.
* array.c (gfc_match_array_constructor): Unify gfc_notify_std
message for GFC_STD_F2003.
* io.c (check_io_constraints): Unify gfc_notify_std message for
GFC_STD_F2003.
* resolve.c (resolve_actual_arglist): Unify gfc_notify_std message
for GFC_STD_F2003.
testsuite/
2006-11-06 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/io_constraints_2.f90: Adjust pattern
for matching error messages.
* gfortran.dg/specifics_3.f90: Adjust pattern
for matching error messages.
........
r118543 | bkoz | 2006-11-07 04:33:20 -0800 (Tue, 07 Nov 2006) | 8 lines
2006-11-07 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/pb_ds/exception.hpp: Add translation support to
exception strings.
* include/ext/concurrence.h: Same.
* include/tr1/array: Same.
........
Added:
branches/fixed-point/gcc/config/i386/darwin64.h
- copied unchanged from r118543, trunk/gcc/config/i386/darwin64.h
branches/fixed-point/gcc/config/i386/t-darwin64
- copied unchanged from r118543, trunk/gcc/config/i386/t-darwin64
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexists-exp-F.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexists-exp-F.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexists-exp-P.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexists-exp-P.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexists-exp-XP.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexists-exp-XP.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-F.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-F.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-P.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-P.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-XF.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-XF.c
Modified:
branches/fixed-point/ (props changed)
branches/fixed-point/gcc/ChangeLog
branches/fixed-point/gcc/DATESTAMP
branches/fixed-point/gcc/Makefile.in
branches/fixed-point/gcc/ada/ChangeLog
branches/fixed-point/gcc/ada/s-osinte-linux-alpha.ads
branches/fixed-point/gcc/ada/s-osinte-linux-hppa.ads
branches/fixed-point/gcc/basic-block.h
branches/fixed-point/gcc/c-decl.c
branches/fixed-point/gcc/cfghooks.c
branches/fixed-point/gcc/cfghooks.h
branches/fixed-point/gcc/cfgloopmanip.c
branches/fixed-point/gcc/common.opt
branches/fixed-point/gcc/config.gcc
branches/fixed-point/gcc/config.host
branches/fixed-point/gcc/config/arm/arm.c
branches/fixed-point/gcc/config/arm/t-arm-coff
branches/fixed-point/gcc/config/arm/t-arm-elf
branches/fixed-point/gcc/config/arm/t-pe
branches/fixed-point/gcc/config/arm/t-strongarm-elf
branches/fixed-point/gcc/config/arm/t-strongarm-pe
branches/fixed-point/gcc/config/arm/t-wince-pe
branches/fixed-point/gcc/config/arm/t-xscale-coff
branches/fixed-point/gcc/config/arm/t-xscale-elf
branches/fixed-point/gcc/config/i386/i386.c
branches/fixed-point/gcc/config/i386/i386.md
branches/fixed-point/gcc/config/mips/24k.md
branches/fixed-point/gcc/config/mips/mips.c
branches/fixed-point/gcc/config/mips/mips.h
branches/fixed-point/gcc/config/mips/mips.md
branches/fixed-point/gcc/config/sh/crt1.asm
branches/fixed-point/gcc/config/sh/divcost-analysis
branches/fixed-point/gcc/config/sh/embed-elf.h
branches/fixed-point/gcc/config/sh/sh-protos.h
branches/fixed-point/gcc/config/sh/sh.c
branches/fixed-point/gcc/config/sh/sh.h
branches/fixed-point/gcc/config/sh/sh.md
branches/fixed-point/gcc/config/sh/sh.opt
branches/fixed-point/gcc/config/sh/sh1.md
branches/fixed-point/gcc/config/sh/sh4.md
branches/fixed-point/gcc/config/sh/sh4a.md
branches/fixed-point/gcc/config/sh/superh.h
branches/fixed-point/gcc/config/sh/t-sh
branches/fixed-point/gcc/config/xtensa/lib1funcs.asm
branches/fixed-point/gcc/config/xtensa/t-xtensa
branches/fixed-point/gcc/config/xtensa/xtensa.c
branches/fixed-point/gcc/config/xtensa/xtensa.h
branches/fixed-point/gcc/config/xtensa/xtensa.md
branches/fixed-point/gcc/configure
branches/fixed-point/gcc/configure.ac
branches/fixed-point/gcc/coretypes.h
branches/fixed-point/gcc/cp/ChangeLog
branches/fixed-point/gcc/cp/call.c
branches/fixed-point/gcc/cp/class.c
branches/fixed-point/gcc/cp/mangle.c
branches/fixed-point/gcc/cp/typeck.c
branches/fixed-point/gcc/cse.c
branches/fixed-point/gcc/doc/invoke.texi
branches/fixed-point/gcc/doc/passes.texi
branches/fixed-point/gcc/doc/sourcebuild.texi
branches/fixed-point/gcc/fold-const.c
branches/fixed-point/gcc/fortran/ChangeLog
branches/fixed-point/gcc/fortran/array.c
branches/fixed-point/gcc/fortran/decl.c
branches/fixed-point/gcc/fortran/error.c
branches/fixed-point/gcc/fortran/expr.c
branches/fixed-point/gcc/fortran/f95-lang.c
branches/fixed-point/gcc/fortran/intrinsic.texi
branches/fixed-point/gcc/fortran/io.c
branches/fixed-point/gcc/fortran/resolve.c
branches/fixed-point/gcc/fortran/trans-expr.c
branches/fixed-point/gcc/fortran/trans-intrinsic.c
branches/fixed-point/gcc/gcse.c
branches/fixed-point/gcc/longlong.h
branches/fixed-point/gcc/opts.c
branches/fixed-point/gcc/passes.c
branches/fixed-point/gcc/profile.c
branches/fixed-point/gcc/recog.c
branches/fixed-point/gcc/recog.h
branches/fixed-point/gcc/rtlanal.c
branches/fixed-point/gcc/testsuite/ChangeLog
branches/fixed-point/gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/test-framework.awk
branches/fixed-point/gcc/testsuite/gfortran.dg/initialization_2.f90
branches/fixed-point/gcc/testsuite/gfortran.dg/io_constraints_2.f90
branches/fixed-point/gcc/testsuite/gfortran.dg/specifics_3.f90
branches/fixed-point/gcc/testsuite/gfortran.dg/zero_sized_1.f90
branches/fixed-point/gcc/testsuite/lib/gcc-dg.exp
branches/fixed-point/gcc/testsuite/lib/gfortran-dg.exp
branches/fixed-point/gcc/timevar.def
branches/fixed-point/gcc/tree-dump.c
branches/fixed-point/gcc/tree-pass.h
branches/fixed-point/gcc/tree-vrp.c
branches/fixed-point/gcc/value-prof.c
branches/fixed-point/libgfortran/ChangeLog
branches/fixed-point/libgfortran/generated/reshape_c10.c
branches/fixed-point/libgfortran/generated/reshape_c16.c
branches/fixed-point/libgfortran/generated/reshape_c4.c
branches/fixed-point/libgfortran/generated/reshape_c8.c
branches/fixed-point/libgfortran/generated/reshape_i16.c
branches/fixed-point/libgfortran/generated/reshape_i4.c
branches/fixed-point/libgfortran/generated/reshape_i8.c
branches/fixed-point/libgfortran/generated/reshape_r10.c
branches/fixed-point/libgfortran/generated/reshape_r16.c
branches/fixed-point/libgfortran/generated/reshape_r4.c
branches/fixed-point/libgfortran/generated/reshape_r8.c
branches/fixed-point/libgfortran/intrinsics/reshape_generic.c
branches/fixed-point/libgfortran/io/transfer.c
branches/fixed-point/libgfortran/m4/reshape.m4
branches/fixed-point/libmudflap/ChangeLog
branches/fixed-point/libmudflap/config.h.in
branches/fixed-point/libmudflap/configure
branches/fixed-point/libmudflap/configure.ac
branches/fixed-point/libmudflap/mf-impl.h
branches/fixed-point/libmudflap/mf-runtime.c
branches/fixed-point/libstdc++-v3/ChangeLog
branches/fixed-point/libstdc++-v3/docs/html/ext/howto.html
branches/fixed-point/libstdc++-v3/docs/html/ext/lwg-active.html
branches/fixed-point/libstdc++-v3/docs/html/ext/lwg-defects.html
branches/fixed-point/libstdc++-v3/include/ext/concurrence.h
branches/fixed-point/libstdc++-v3/include/ext/pb_ds/exception.hpp
branches/fixed-point/libstdc++-v3/include/tr1/array
Propchange: branches/fixed-point/
('svnmerge-integrated' modified)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (20 preceding siblings ...)
2006-11-05 22:18 ` pault at gcc dot gnu dot org
@ 2006-11-10 21:53 ` pault at gcc dot gnu dot org
2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
` (3 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-10 21:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from pault at gcc dot gnu dot org 2006-11-10 21:52 -------
Subject: Bug 24518
Author: pault
Date: Fri Nov 10 21:52:00 2006
New Revision: 118666
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118666
Log:
2006-11-10 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline.
PR fortran/29371
* trans-expr.c (gfc_trans_pointer_assignment): Add the expression
for the assignment of null to the data field to se->pre, rather
than block.
PR fortran/29392
* data.c (create_character_intializer): Copy and simplify
the expressions for the start and end of a sub-string
reference.
PR fortran/29216
PR fortran/29314
* gfortran.h : Add EXEC_INIT_ASSIGN.
* dump-parse-tree.c (gfc_show_code_node): The same.
* trans-expr.c (gfc_trans_init_assign): New function.
* trans-stmt.h : Add prototype for gfc_trans_init_assign.
* trans.c (gfc_trans_code): Implement EXEC_INIT_ASSIGN.
* resolve.c (resolve_allocate_exp): Replace EXEC_ASSIGN by
EXEC_INIT_ASSIGN.
(resolve_code): EXEC_INIT_ASSIGN does not need resolution.
(apply_default_init): New function.
(resolve_symbol): Call it for derived types that become
defined but which do not already have an initialization
expression..
* st.c (gfc_free_statement): Include EXEC_INIT_ASSIGN.
PR fortran/29387
* trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
a specific case for EXPR_VARIABLE and, in default, build an ss
to call gfc_conv_expr_descriptor for array expressions..
PR fortran/29490
* trans-expr.c (gfc_set_interface_mapping_bounds): In the case
that GFC_TYPE_ARRAY_LBOUND is not available, use descriptor
values for it and GFC_TYPE_ARRAY_UBOUND.
PR fortran/29641
* trans-types.c (gfc_get_derived_type): If the derived type
namespace has neither a parent nor a proc_name, set NULL for
the search namespace.
PR fortran/24518
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
for both MOD and MODULO, if it is available.
PR fortran/29565
* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
the declarations from the unused loops by merging the block
scope for each; this ensures that the temporary is declared.
2006-11-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29371
* gfortran.dg/nullify_3.f90: New test.
PR fortran/29392
* gfortran.dg/data_char_3.f90: New test.
PR fortran/29216
* gfortran.dg/result_default_init_1.f90: New test.
PR fortran/29314
* gfortran.dg/automatic_default_init_1.f90: New test.
PR fortran/29387
* trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
a specific case for EXPR_VARIABLE and, in default, build an ss
to call gfc_conv_expr_descriptor for array expressions..
PR fortran/29490
* trans-expr.c (gfc_set_interface_mapping_bounds): In the case
that GFC_TYPE_ARRAY_LBOUND is not available, use descriptor
values for it and GFC_TYPE_ARRAY_UBOUND.
PR fortran/29641
* trans-types.c (gfc_get_derived_type): If the derived type
namespace has neither a parent nor a proc_name, set NULL for
the search namespace.
PR fortran/29565
* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/actual_array_interface_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/aliasing_dummy_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/automatic_default_init_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/data_char_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/intrinsic_actual_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/nullify_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/result_default_init_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_types_11.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_types_12.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/data.c
branches/gcc-4_1-branch/gcc/fortran/dump-parse-tree.c
branches/gcc-4_1-branch/gcc/fortran/f95-lang.c
branches/gcc-4_1-branch/gcc/fortran/gfortran.h
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/st.c
branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
branches/gcc-4_1-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-4_1-branch/gcc/fortran/trans-stmt.h
branches/gcc-4_1-branch/gcc/fortran/trans-types.c
branches/gcc-4_1-branch/gcc/fortran/trans.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (19 preceding siblings ...)
2006-11-05 8:46 ` pault at gcc dot gnu dot org
@ 2006-11-05 22:18 ` pault at gcc dot gnu dot org
2006-11-10 21:53 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-05 22:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from pault at gcc dot gnu dot org 2006-11-05 22:18 -------
Fixed on trunk and 4.2 - will soon be fixed on 4.1.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (18 preceding siblings ...)
2006-11-05 6:28 ` pault at gcc dot gnu dot org
@ 2006-11-05 8:46 ` pault at gcc dot gnu dot org
2006-11-05 22:18 ` pault at gcc dot gnu dot org
` (5 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-05 8:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from pault at gcc dot gnu dot org 2006-11-05 08:46 -------
Subject: Bug 24518
Author: pault
Date: Sun Nov 5 08:46:02 2006
New Revision: 118493
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118493
Log:
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/24518
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
for both MOD and MODULO, if it is available.
2006-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29565
* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
the declarations from the unused loops by merging the block
scope for each; this ensures that the temporary is declared.
PR fortran/29387
* trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
a specific case for EXPR_VARIABLE and, in default, build an ss
to call gfc_conv_expr_descriptor for array expressions..
PR fortran/29490
* trans-expr.c (gfc_set_interface_mapping_bounds): In the case
that GFC_TYPE_ARRAY_LBOUND is not available, use descriptor
values for it and GFC_TYPE_ARRAY_UBOUND.
PR fortran/29641
* trans-types.c (gfc_get_derived_type): If the derived type
namespace has neither a parent nor a proc_name, set NULL for
the search namespace.
2006-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29565
* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
PR fortran/29387
* gfortran.dg/intrinsic_actual_2.f90: New test.
PR fortran/29490
* gfortran.dg/actual_array_interface_1.f90: New test.
PR fortran/29641
* gfortran.dg/used_types_11.f90: New test.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/actual_array_interface_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/aliasing_dummy_3.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/intrinsic_actual_2.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/used_types_11.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/f95-lang.c
branches/gcc-4_2-branch/gcc/fortran/trans-expr.c
branches/gcc-4_2-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-4_2-branch/gcc/fortran/trans-types.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (17 preceding siblings ...)
2006-10-31 16:47 ` fxcoudert at gcc dot gnu dot org
@ 2006-11-05 6:28 ` pault at gcc dot gnu dot org
2006-11-05 8:46 ` pault at gcc dot gnu dot org
` (6 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-05 6:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from pault at gcc dot gnu dot org 2006-11-05 06:27 -------
Subject: Bug 24518
Author: pault
Date: Sun Nov 5 06:27:48 2006
New Revision: 118492
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118492
Log:
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/24518
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
for both MOD and MODULO, if it is available.
PR fortran/29565
* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
the declarations from the unused loops by merging the block
scope for each; this ensures that the temporary is declared.
2006-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29565
* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/aliasing_dummy_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/f95-lang.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (16 preceding siblings ...)
2006-10-31 16:21 ` pault at gcc dot gnu dot org
@ 2006-10-31 16:47 ` fxcoudert at gcc dot gnu dot org
2006-11-05 6:28 ` pault at gcc dot gnu dot org
` (7 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-31 16:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from fxcoudert at gcc dot gnu dot org 2006-10-31 16:46 -------
(In reply to comment #16)
> I understood that remainder (a, b) = a - round (a/b) * b, whereas
> mod (a, b) = a - int (a/b) * b
> and modulo (a, b) = a - floor (a/b) * b
Right you are, master. :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (15 preceding siblings ...)
2006-10-31 16:14 ` paul dot richard dot thomas at cea dot fr
@ 2006-10-31 16:21 ` pault at gcc dot gnu dot org
2006-10-31 16:47 ` fxcoudert at gcc dot gnu dot org
` (8 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-31 16:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from pault at gcc dot gnu dot org 2006-10-31 16:21 -------
The fortran version of Uros' #13:
real(8) :: x
real(8) :: t = 0.0
x = 10000000.0
do while (x > 0.0)
t = t + mod (x, 1.7e-8)
x = x - 1.0
end do
print *, t
end
Yields:
$ /irun/bin/gfortran -O2 -march=pentium -mfpmath=387 uros_test.f90
PT169137@PC-THOMAS-P /cygdrive/d/svn/pr24518
$ time ./a
8.499998368231765E-002
real 0m0.344s
user 0m0.327s
sys 0m0.015s
on a PIV running at 2.5GHz
Changing MOD => MODULO, the user time increases to 0.405s for the
implementation in the second attachment.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (14 preceding siblings ...)
2006-10-31 16:06 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-31 16:14 ` paul dot richard dot thomas at cea dot fr
2006-10-31 16:21 ` pault at gcc dot gnu dot org
` (9 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-10-31 16:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from paul dot richard dot thomas at cea dot fr 2006-10-31 16:14 -------
Subject: RE: Intrinsic MOD incorrect for large arg1/arg2 and slow.
FX,
>
> ------- Comment #15 from fxcoudert at gcc dot gnu dot org
> 2006-10-31 16:05 -------
> (In reply to comment #14)
> > It also does MODULO correctly
>
> Why not use remainder{f,,l}? Is it incorrect?
I understood that remainder (a, b) = a - round (a/b) * b, whereas
mod (a, b) = a - int (a/b) * b
and modulo (a, b) = a - floor (a/b) * b
but I am ready to stand corrected on the first. The latter two are taken from
the fortran standard.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (13 preceding siblings ...)
2006-10-31 15:56 ` pault at gcc dot gnu dot org
@ 2006-10-31 16:06 ` fxcoudert at gcc dot gnu dot org
2006-10-31 16:14 ` paul dot richard dot thomas at cea dot fr
` (10 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-31 16:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from fxcoudert at gcc dot gnu dot org 2006-10-31 16:05 -------
(In reply to comment #14)
> It also does MODULO correctly
Why not use remainder{f,,l}? Is it incorrect?
> although I am not sure that I understand why anybody
> would use this intrinsic knowingly!
Agreed :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (12 preceding siblings ...)
2006-10-26 22:22 ` uros at kss-loka dot si
@ 2006-10-31 15:56 ` pault at gcc dot gnu dot org
2006-10-31 16:06 ` fxcoudert at gcc dot gnu dot org
` (11 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-31 15:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pault at gcc dot gnu dot org 2006-10-31 15:56 -------
Created an attachment (id=12518)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12518&action=view)
A fix for the PR:
FX and Uros,
I believe that this correctly detects the presence of the built_in. It also
does MODULO correctly, although I am not sure that I understand why anybody
would use this intrinsic knowingly!
I have not done a full regtest, nor checked the timing yet, but the testsuite
cases with MOD and MODULO in them all survive.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (11 preceding siblings ...)
2006-10-26 20:09 ` pault at gcc dot gnu dot org
@ 2006-10-26 22:22 ` uros at kss-loka dot si
2006-10-31 15:56 ` pault at gcc dot gnu dot org
` (12 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: uros at kss-loka dot si @ 2006-10-26 22:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from uros at kss-loka dot si 2006-10-26 22:22 -------
Just some performance numbers (sorry for the C testcase...) on x86_64:
--cut here--
#include <math.h>
#include <stdio.h>
int main()
{
double x;
double t = 0.0;
for (x = 10000000.0; x > 0.0; x -= 1.0)
t += fmod (x, 1.7e-8);
printf("%f\n", t);
return 0;
}
--cut here--
[uros@localhost x86_64-test]$ gcc -march=k8 -O2 -lm mod.c
[uros@localhost x86_64-test]$ time ./a.out
0.089927
real 0m4.304s
user 0m4.294s
sys 0m0.009s
[uros@localhost x86_64-test]$ gcc -march=k8 -O2 -lm -mfpmath=387 mod.c
[uros@localhost x86_64-test]$ time ./a.out
0.089927
real 0m0.351s
user 0m0.349s
sys 0m0.002s
I know that this measurement depends on the library implementation, but this is
current situation, where above tests shows that intrinsic MOD is 12.3 _times_
faster.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (10 preceding siblings ...)
2006-10-26 4:04 ` sgk at troutmask dot apl dot washington dot edu
@ 2006-10-26 20:09 ` pault at gcc dot gnu dot org
2006-10-26 22:22 ` uros at kss-loka dot si
` (13 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-26 20:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pault at gcc dot gnu dot org 2006-10-26 20:08 -------
FX and Steve,
I'll dig out my version of MOD and MODULO that uses the library call, if you
like. The availability of the builtin can be tested and the existing call
used, if not present. That I already did because MODULO was not available. As
soo as I am home, I will have a root around.
Paul
PS Thanks again for remembering us Uros.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (9 preceding siblings ...)
2006-10-25 14:16 ` uros at kss-loka dot si
@ 2006-10-26 4:04 ` sgk at troutmask dot apl dot washington dot edu
2006-10-26 20:09 ` pault at gcc dot gnu dot org
` (14 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2006-10-26 4:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from sgk at troutmask dot apl dot washington dot edu 2006-10-26 04:03 -------
Subject: Re: Intrinsic MOD incorrect for large arg1/arg2 and slow.
On Wed, Oct 25, 2006 at 08:19:21AM -0000, fxcoudert at gcc dot gnu dot org
wrote:
>
> I'm adding Steve Kargl to the CC list, since he's our arithmetics expert :)
You flatter me. :-O
>
> (In reply to comment #6)
> > Revision 118024 clears the way for MOD and MODULO implementation:
> > http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg00703.html
>
> Just to be sure I understand: we are garanteed that BUILT_IN_REMAINDER{F,,L}
> and BUILT_IN_FMOD{F,,L} are always available, right?
If a target supports the builtin, then gfortran can be made to
use it. In fact, you can't disable builtins.
troutmask:sgk[274] gfc -fno-builtin -c sqrt90.f90
f951: warning: command line option "-fno-builtin" is valid for
C/C++/ObjC/ObjC++ but not for Fortran
If a target does not have builtins for fmod and remainder and
configure provides HAVE_FMOD and HAVE_REMAINDER macros, gfortranr
could punt to library routines like we do for spacing, rrspacing, etc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (8 preceding siblings ...)
2006-10-25 13:53 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-25 14:16 ` uros at kss-loka dot si
2006-10-26 4:04 ` sgk at troutmask dot apl dot washington dot edu
` (15 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: uros at kss-loka dot si @ 2006-10-25 14:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from uros at kss-loka dot si 2006-10-25 14:16 -------
(In reply to comment #9)
> > In the later case, expansion will fall-back to normal library call.
>
> OK. So on system where the math library doesn't have remainderl, for example,
> we shouldn't use BUILT_IN_REMAINDERL or it will be missing at link-time? If
> that's the case, then we can't implement MOD/MODULO with these built-ins.
You can check for TARGET_C99_FUNCTIONS before they are used.
> > Fortunatelly, no. The result will be correct. You can see the effect of
> > -fno-math-errno at http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01158.html.
>
> And now, a harder question: could we activate no-math-errno on a per-call
> basis? That is, have the front-end emit a call to BUILT_IN_FOO and specify
> that, for this call, errno doesn't have to be set?
errno expansion for this particular built-in is inhibited in line 1995 of
builtins.c. For a per-call basis, we need an argument to expand_builtin()
function to disable errno expansion. However, the rationale for this is unclear
to me. IMO - either we use errno, or we don't.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (7 preceding siblings ...)
2006-10-25 11:49 ` uros at kss-loka dot si
@ 2006-10-25 13:53 ` fxcoudert at gcc dot gnu dot org
2006-10-25 14:16 ` uros at kss-loka dot si
` (16 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-25 13:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from fxcoudert at gcc dot gnu dot org 2006-10-25 13:53 -------
(In reply to comment #8)
> In the later case, expansion will fall-back to normal library call.
OK. So on system where the math library doesn't have remainderl, for example,
we shouldn't use BUILT_IN_REMAINDERL or it will be missing at link-time? If
that's the case, then we can't implement MOD/MODULO with these built-ins.
> Fortunatelly, no. The result will be correct. You can see the effect of
> -fno-math-errno at http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01158.html.
And now, a harder question: could we activate no-math-errno on a per-call
basis? That is, have the front-end emit a call to BUILT_IN_FOO and specify
that, for this call, errno doesn't have to be set?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (6 preceding siblings ...)
2006-10-25 8:19 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-25 11:49 ` uros at kss-loka dot si
2006-10-25 13:53 ` fxcoudert at gcc dot gnu dot org
` (17 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: uros at kss-loka dot si @ 2006-10-25 11:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from uros at kss-loka dot si 2006-10-25 11:48 -------
(In reply to comment #7)
> Just to be sure I understand: we are garanteed that BUILT_IN_REMAINDER{F,,L}
> and BUILT_IN_FMOD{F,,L} are always available, right?
Yes. The expansion does not depend on -ffast-math anymore. However, the named
pattern should be present in .md files. Currently, i386 provides named pattern
for -mfpmath=387, but not for -mfpmath=sse. In the later case, expansion will
fall-back to normal library call.
> gfortran doesn't have a need for errno to be set after math functions are
> called. However, we do want that have "correct" results in all cases: Inf,
> NaN, subnormals, etc. From my reading of the manual, -fno-math-errno would
> imply that we do not get such correct results, am I right?
Fortunatelly, no. The result will be correct. You can see the effect of
-fno-math-errno at http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01158.html.
Fixup code detects NaN (as an abnormal return from builtin funcion) and calls
library function in order to set global variable errno. If global variable
errno is not needed (as I suspect is the case with fortran libraries), fixup
code is not needed, so -fno-math-errno shoul be used.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (5 preceding siblings ...)
2006-10-25 7:34 ` uros at kss-loka dot si
@ 2006-10-25 8:19 ` fxcoudert at gcc dot gnu dot org
2006-10-25 11:49 ` uros at kss-loka dot si
` (18 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-25 8:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2006-10-25 08:19 -------
I'm adding Steve Kargl to the CC list, since he's our arithmetics expert :)
(In reply to comment #6)
> Revision 118024 clears the way for MOD and MODULO implementation:
> http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg00703.html
Just to be sure I understand: we are garanteed that BUILT_IN_REMAINDER{F,,L}
and BUILT_IN_FMOD{F,,L} are always available, right?
> BTW: I don't know fortran requirements, but built-in functions produce faster
> code if errno is not needed. -mno-math-errno should be used in this case.
[Hum... I think you mean -fno-math-errno.]
gfortran doesn't have a need for errno to be set after math functions are
called. However, we do want that have "correct" results in all cases: Inf, NaN,
subnormals, etc. From my reading of the manual, -fno-math-errno would imply
that we do not get such correct results, am I right?
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu dot org
Last reconfirmed|2006-10-22 21:01:38 |2006-10-25 08:19:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (4 preceding siblings ...)
2006-10-23 6:19 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-25 7:34 ` uros at kss-loka dot si
2006-10-25 8:19 ` fxcoudert at gcc dot gnu dot org
` (19 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: uros at kss-loka dot si @ 2006-10-25 7:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from uros at kss-loka dot si 2006-10-25 07:33 -------
Revision 118024 clears the way for MOD and MODULO implementation:
http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg00703.html
BTW: I don't know fortran requirements, but built-in functions produce faster
code if errno is not needed. -mno-math-errno should be used in this case.
--
uros at kss-loka dot si changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |uros at kss-loka dot si
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (3 preceding siblings ...)
2006-10-22 21:01 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-23 6:19 ` fxcoudert at gcc dot gnu dot org
2006-10-25 7:34 ` uros at kss-loka dot si
` (20 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-23 6:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from fxcoudert at gcc dot gnu dot org 2006-10-23 06:19 -------
Created an attachment (id=12477)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12477&action=view)
Example patch
I don't know if it's giving correct results in all cases, or if it works even
on platforms without C99 math functions, but the idea is here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
` (2 preceding siblings ...)
2006-06-21 8:04 ` paul dot richard dot thomas at cea dot fr
@ 2006-10-22 21:01 ` fxcoudert at gcc dot gnu dot org
2006-10-23 6:19 ` fxcoudert at gcc dot gnu dot org
` (21 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-22 21:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2006-10-22 21:01 -------
Having thought about it some more, MODULO should be implemented using
fmod{f,,l} and MOD should use remainder{f,,l}. See how BUILT_IN_POWL is used,
for example, to emit the same kind of code in gfc_conv_intrinsic_mod.
Beginner project for someone? :)
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2006-06-20 12:22:57 |2006-10-22 21:01:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
2005-10-25 14:37 ` [Bug fortran/24518] " pinskia at gcc dot gnu dot org
2006-06-20 12:44 ` fxcoudert at gcc dot gnu dot org
@ 2006-06-21 8:04 ` paul dot richard dot thomas at cea dot fr
2006-10-22 21:01 ` fxcoudert at gcc dot gnu dot org
` (22 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-06-21 8:04 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3270 bytes --]
------- Comment #3 from paul dot richard dot thomas at cea dot fr 2006-06-21 07:19 -------
Subject: RE: Intrinsic MOD incorrect for large arg1/arg2 and slow.
FX,
I do not have the slightest idea! I wrote various versions using
BUILT_IN_FMOD and got bogged down in a discussion about the use of
built-in fast-math versions. These seem to me to have more useful
arithmetical properties, as well as being faster. I lost interest
after that.
I am stuck with a build problem that is causing me to scratch my
head. PRECISION and RANGE do not seem to be known to the build
any more and, in consequence it goes down in flames at
selected_int/real_kind.f90. This is with a completely clean build.
I cannot see any obvious culprit yet but we will see!
Paul
> -----Message d'origine-----
> De : fxcoudert at gcc dot gnu dot org
> [mailto:gcc-bugzilla@gcc.gnu.org]
> Envoyé : mardi 20 juin 2006 14:23
> À : THOMAS Paul Richard 169137
> Objet : [Bug fortran/24518] Intrinsic MOD incorrect for large
> arg1/arg2
> and slow.
>
>
>
>
> ------- Comment #2 from fxcoudert at gcc dot gnu dot org
> 2006-06-20 12:22 -------
> Why exactly aren't we using BUILT_IN_FMOD{F,,L}?
>
> $ cat a.f90
> real*8 :: x = 10.0e9
> do i = 10, 22
> x = 10d0 * x
> print '(a,i2,a,g14.8," = ",g14.8)', "mod (10**",i,", 1.7_8) = ", &
> fmod (x, 1.7_8), mod
> (x, 1.7_8);
> end do
> end
> $ cat a.c
> #include <math.h>
> double fmod_ (double *x, double *y)
> { return fmod(*x,*y); }
> $ gfortran a.f90 a.c && ./a.out
> mod (10**10, 1.7_8) = 1.3000026 = 1.3000026
> mod (10**11, 1.7_8) = 1.1000261 = 1.1000261
> mod (10**12, 1.7_8) = 0.80026120 = 0.80026150
> mod (10**13, 1.7_8) = 1.2026123 = 1.2026138
> mod (10**14, 1.7_8) = 0.12612289 = 0.12609863
> mod (10**15, 1.7_8) = 1.2612289 = 1.2607422
> mod (10**16, 1.7_8) = 0.71228945 = 5.8125000
> mod (10**17, 1.7_8) = 0.32289469 = -50.687500
> mod (10**18, 1.7_8) = 1.5289470 = 364.00000
> mod (10**19, 1.7_8) = 1.6894697 = -.70000000E+20
> mod (10**20, 1.7_8) = 1.5946971 = -.70000000E+21
> mod (10**21, 1.7_8) = 0.64697063 = -.70000000E+22
> mod (10**22, 1.7_8) = 0.86970627 = -.70000000E+23
>
> It's actually slower: 55% slower at -O0 and 230% slower at
> -O2, on a loop with
> real(kind=8) variables modulo. But then, we're already
> testing whether the
> division can be represented by an integer, we could call fmod
> only in the case
> where it's not possible. Opinions?
>
>
> --
>
> fxcoudert at gcc dot gnu dot org changed:
>
> What |Removed |Added
> --------------------------------------------------------------
> --------------
> CC| |fxcoudert at
> gcc dot gnu dot
> | |org
> Last reconfirmed|2006-01-24 04:26:11 |2006-06-20 12:22:57
> date| |
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
2005-10-25 14:37 ` [Bug fortran/24518] " pinskia at gcc dot gnu dot org
@ 2006-06-20 12:44 ` fxcoudert at gcc dot gnu dot org
2006-06-21 8:04 ` paul dot richard dot thomas at cea dot fr
` (23 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-06-20 12:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-06-20 12:22 -------
Why exactly aren't we using BUILT_IN_FMOD{F,,L}?
$ cat a.f90
real*8 :: x = 10.0e9
do i = 10, 22
x = 10d0 * x
print '(a,i2,a,g14.8," = ",g14.8)', "mod (10**",i,", 1.7_8) = ", &
fmod (x, 1.7_8), mod (x, 1.7_8);
end do
end
$ cat a.c
#include <math.h>
double fmod_ (double *x, double *y)
{ return fmod(*x,*y); }
$ gfortran a.f90 a.c && ./a.out
mod (10**10, 1.7_8) = 1.3000026 = 1.3000026
mod (10**11, 1.7_8) = 1.1000261 = 1.1000261
mod (10**12, 1.7_8) = 0.80026120 = 0.80026150
mod (10**13, 1.7_8) = 1.2026123 = 1.2026138
mod (10**14, 1.7_8) = 0.12612289 = 0.12609863
mod (10**15, 1.7_8) = 1.2612289 = 1.2607422
mod (10**16, 1.7_8) = 0.71228945 = 5.8125000
mod (10**17, 1.7_8) = 0.32289469 = -50.687500
mod (10**18, 1.7_8) = 1.5289470 = 364.00000
mod (10**19, 1.7_8) = 1.6894697 = -.70000000E+20
mod (10**20, 1.7_8) = 1.5946971 = -.70000000E+21
mod (10**21, 1.7_8) = 0.64697063 = -.70000000E+22
mod (10**22, 1.7_8) = 0.86970627 = -.70000000E+23
It's actually slower: 55% slower at -O0 and 230% slower at -O2, on a loop with
real(kind=8) variables modulo. But then, we're already testing whether the
division can be represented by an integer, we could call fmod only in the case
where it's not possible. Opinions?
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Last reconfirmed|2006-01-24 04:26:11 |2006-06-20 12:22:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
@ 2005-10-25 14:37 ` pinskia at gcc dot gnu dot org
2006-06-20 12:44 ` fxcoudert at gcc dot gnu dot org
` (24 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-25 14:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-25 14:37 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2005-10-25 14:37:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2012-05-05 8:02 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-24518-4@http.gcc.gnu.org/bugzilla/>
2012-05-05 8:02 ` [Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow jb at gcc dot gnu.org
2005-10-25 13:21 [Bug fortran/24518] New: " paul dot richard dot thomas at cea dot fr
2005-10-25 14:37 ` [Bug fortran/24518] " pinskia at gcc dot gnu dot org
2006-06-20 12:44 ` fxcoudert at gcc dot gnu dot org
2006-06-21 8:04 ` paul dot richard dot thomas at cea dot fr
2006-10-22 21:01 ` fxcoudert at gcc dot gnu dot org
2006-10-23 6:19 ` fxcoudert at gcc dot gnu dot org
2006-10-25 7:34 ` uros at kss-loka dot si
2006-10-25 8:19 ` fxcoudert at gcc dot gnu dot org
2006-10-25 11:49 ` uros at kss-loka dot si
2006-10-25 13:53 ` fxcoudert at gcc dot gnu dot org
2006-10-25 14:16 ` uros at kss-loka dot si
2006-10-26 4:04 ` sgk at troutmask dot apl dot washington dot edu
2006-10-26 20:09 ` pault at gcc dot gnu dot org
2006-10-26 22:22 ` uros at kss-loka dot si
2006-10-31 15:56 ` pault at gcc dot gnu dot org
2006-10-31 16:06 ` fxcoudert at gcc dot gnu dot org
2006-10-31 16:14 ` paul dot richard dot thomas at cea dot fr
2006-10-31 16:21 ` pault at gcc dot gnu dot org
2006-10-31 16:47 ` fxcoudert at gcc dot gnu dot org
2006-11-05 6:28 ` pault at gcc dot gnu dot org
2006-11-05 8:46 ` pault at gcc dot gnu dot org
2006-11-05 22:18 ` pault at gcc dot gnu dot org
2006-11-10 21:53 ` pault at gcc dot gnu dot org
2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
2006-12-02 8:12 ` ebotcazou at gcc dot gnu dot org
2006-12-02 8:23 ` burnus at gcc dot gnu dot org
2006-12-02 8:28 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).