[PATCH][fortran] Add {l,ll}{ceil,floor,round} builtins

Steve Kargl sgk@troutmask.apl.washington.edu
Thu Dec 8 17:23:00 GMT 2005


On Thu, Dec 08, 2005 at 10:40:46AM +0100, Richard Guenther wrote:
> On Wed, 7 Dec 2005, Steve Kargl wrote:
> 
> > 
> > I haven't been able to isolate the problem.  Here's one example from
> > gfortran.log, which suggests that problem lies in your f95-lang.c
> > changes.
> 
> Interesting.  The only thing that comes to my mind is that
> long_long_integer_type_node is maybe NULL for you, but that should
> have caused breakage everywhere, not only for 112 testcases.
> 
> As I have no amd64-*-freebsd system available, it would be nice if
> you could provide a backtrace of gfortran of at least one of the
> failures.
> 
> Thanks,
> Richard.
> 
> > FAIL: gfortran.dg/array_constructor_11.f90  -O3 -fomit-frame-pointer -funroll-lo
> > ops  (test for excess errors)

It appears to be related to -funroll-loops.  f951 works with -O3
and -fomit-frame-pointer.  I get the same error with -O2 -funroll-loops.
Your patch may have some negative interaction with two recent commits

2005-12-07  Rafael <C1>vila de Esp<ED>ndola  <rafael.espindola@gmail.com>

        * Make-lang.in (fortran.all.build, fortran.install-normal): Remove.

2005-12-07  Rafael <C1>vila de Esp<ED>ndola  <rafael.espindola@gmail.com>

        * Make-lang.in: Remove all dependencies on s-gtype, except for
        gt-fortran-trans.h.



(gdb) run -O3 -fomit-frame-pointer -funroll-loops array_constructor_11.f90
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /mnt1/sgk/work/4x/libexec/gcc/amd64-unknown-freebsd7.0/4.2.0/f951 -O3 -fomit-frame-pointer -funroll-loops array_constructor_11.f90
 MAIN__ test build
Analyzing compilation unitPerforming intraprocedural optimizations
Assembling functions:
 test MAIN__ {GC 5340k -> 
Program received signal SIGSEGV, Segmentation fault.
ggc_set_mark (p=0x71be01) at ../../gcc4x/gcc/ggc-page.c:588
588       while (table->high_bits != high_bits)


(gdb) bt
#0  ggc_set_mark (p=0x71be01) at ../../gcc4x/gcc/ggc-page.c:588
#1  0x0000000000451eba in gt_ggc_mx_lang_tree_node (x_p=Variable "x_p"
    is not available.) at gt-fortran-f95-lang.h:40
#2  0x0000000000452315 in gt_ggc_mx_lang_tree_node (x_p=Variable "x_p"
    is not available.) at gt-fortran-f95-lang.h:274
#3  0x000000000045233f in gt_ggc_mx_lang_tree_node (x_p=Variable "x_p"
    is not available.) at gt-fortran-f95-lang.h:277
#4  0x000000000045219f in gt_ggc_mx_lang_tree_node (x_p=Variable "x_p"
    is not available.) at gt-fortran-f95-lang.h:178
#5  0x00000000005bb357 in gt_ggc_mx_cgraph_varpool_node (x_p=Variable "x_p"
    is not available.) at gtype-desc.c:104
#6  0x00000000005b6b36 in ggc_mark_roots () at ../../gcc4x/gcc/ggc-common.c:118
#7  0x0000000000749698 in ggc_collect () at ../../gcc4x/gcc/ggc-page.c:1880
#8  0x000000000074abe9 in execute_todo (pass=0xacb7a0, flags=3,
    use_required=Variable "use_required" is not available.)
    at ../../gcc4x/gcc/passes.c:772
#9  0x000000000074ae4f in execute_one_pass (pass=0xacb7a0)
    at ../../gcc4x/gcc/passes.c:854
#10 0x000000000074aebc in execute_pass_list (pass=0xacb7a0)
    at ../../gcc4x/gcc/passes.c:876
#11 0x000000000074aece in execute_pass_list (pass=0xacc6c0)
    at ../../gcc4x/gcc/passes.c:877
#12 0x000000000047e8da in tree_rest_of_compilation (fndecl=0x201113600) at
    ../../gcc4x/gcc/tree-optimize.c:419
#13 0x0000000000796816 in cgraph_expand_function (node=0x201118a50) at
    ../../gcc4x/gcc/cgraphunit.c:1055
#14 0x000000000079893b in cgraph_optimize () at ../../gcc4x/gcc/cgraphunit.c:1121
#15 0x00000000004545ad in gfc_be_parse_file (set_yydebug=Variable "set_yydebug"
    is not available.) at ../../gcc4x/gcc/fortran/f95-lang.c:290
#16 0x000000000071dd08 in toplev_main (argc=Variable "argc" is not available.)
    at ../../gcc4x/gcc/toplev.c:990
#17 0x00000000004044cc in _start ()


-- 
Steve



More information about the Gcc-patches mailing list