[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-14 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.2

--- Comment #33 from kargl at gcc dot gnu.org ---
Patches now committed to 6-branch.  Closing as Fixed.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-14 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #32 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sat May 14 19:52:46 2016
New Revision: 236244

URL: https://gcc.gnu.org/viewcvs?rev=236244&root=gcc&view=rev
Log:
2016-05-14  Fritz Reese  

Backport from trunk: r236242
* gfortran.texi: Update example of DEC UNION extension.

Backport from trunk: r236241
PR fortran/71047
* expr.c (gfc_default_initializer): Avoid extra component refs in
constructors for derived types and classes.

Backport from trunk: r235999
PR fortran/56226
* module.c (dt_upper_string): Rename to gfc_dt_upper_string
(dt_lower_string): Likewise.
* gfortran.h: Make new gfc_dt_upper/lower_string global.
* class.c: Use gfc_dt_upper_string.
* decl.c: Likewise.
* symbol.c: Likewise.
* resolve.c (resolve_component): New function.
(resolve_fl_derived0): Move component loop code to resolve_component.
* parse.c (check_component): New function.
(parse_derived): Move loop code to check_component.
* lang.opt, invoke.texi, options.c : New option -fdec-structure.
* libgfortran.h (bt): New basic type BT_UNION.
* gfortran.h (gfc_option): New option -fdec-structure.
(gfc_get_union_type, gfc_compare_union_types): New prototypes.
(gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
macros.
(gfc_find_component): Change prototype.
* match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
gfc_match_structure_decl): New prototypes.
* parse.h (gfc_comp_struct): New macro.
* symbol.c (gfc_find_component): Search for components in nested unions
* class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
copy_vtab_proc_comps): Update calls to gfc_find_component.
* primary.c (gfc_convert_to_structure_constructor): Likewise.
* symbol.c (gfc_add_component): Likewise.
* resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
resolve_typebound_procedure, resolve_component, resolve_fl_derived):
Likewise.
* expr.c (get_union_init, component_init): New functions.
* decl.c (match_clist_expr, match_record_decl, get_struct_decl,
gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
* interface.c (compare_components, gfc_compare_union_types): Likewise.
* match.c (gfc_match_member_sep): Likewise.
* parse.c (check_component, parse_union, parse_struct_map): Likewise.
* resolve.c (resolve_fl_struct): Likewise.
* symbol.c (find_union_component): Likewise.
* trans-types.c (gfc_get_union_type): Likewise.
* parse.c (parse_derived): Use new functions.
* interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
* expr.c (gfc_default_initializer): Likewise.
* gfortran.texi: Support for DEC structures, unions, and maps.
* gfortran.h (gfc_statement, sym_flavor): Likewise.
* check.c (gfc_check_kill_sub): Likewise.
* expr.c (gfc_copy_expr, simplify_const_ref,
gfc_has_default_initializer): Likewise.
* decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
match_pointer_init, build_struct, variable_decl,
gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
gfc_match_end, gfc_match_derived_decl): Likewise.
* interface.c (check_interface0, check_interface1,
gfc_search_interface): Likewise.
* misc.c (gfc_basic_typename, gfc_typename): Likewise.
* module.c (add_true_name, build_tnt, bt_types, mio_typespec,
fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
gfc_get_module_backend_decl): Likewise.
* parse.h (gfc_compile_state): Likewise.
* parse.c (decode_specification_statement, decode_statement,
gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
* primary.c (gfc_match_varspec, gfc_match_structure_constructor,
gfc_match_rvalue, match_variable): Likewise.
* resolve.c (find_arglists, resolve_structure_cons,
is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
resolve_typebound_subroutine, resolve_allocate_expr,
nonscalar_typebound_assign, generate_component_assignments,
resolve_fl_variable_derived, check_defined_assignments,
resolve_component, resolve_symbol, resolve_equivalence_derived):
Likewise.
* symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
gfc_restore_last_undo_checkpoint, gfc_type_compatible,
gfc_find_dt_in_generic): Likewise.
* trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
gfc_create_module_variable, check_constant_initializer): Likewise.
* trans-expr.c (gfc_conv_compon

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-14 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #31 from Steve Kargl  ---
On Mon, May 09, 2016 at 02:48:17PM -0700, Steve Kargl wrote:
> On Mon, May 09, 2016 at 02:55:01PM +, fritzoreese at gmail dot com wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226
> > 
> > --- Comment #29 from Fritz Reese  ---
> > (In reply to Andreas Schwab from comment #25)
> > > FAIL: gfortran.dg/dec_union_4.f90   -O0  execution test
> > > FAIL: gfortran.dg/dec_union_4.f90   -O1  execution test
> > > FAIL: gfortran.dg/dec_union_4.f90   -O2  execution test
> > > FAIL: gfortran.dg/dec_union_4.f90   -O3 -fomit-frame-pointer 
> > > -funroll-loops
> > > -fpeel-loops -ftracer -finline-functions  execution test
> > > FAIL: gfortran.dg/dec_union_4.f90   -O3 -g  execution test
> > > FAIL: gfortran.dg/dec_union_4.f90   -Os  execution test
> > 
> > It was silly of me to disregard endian-ness in this test case. Fixed:
> > 
> > https://gcc.gnu.org/ml/fortran/2016-05/msg00018.html
> > 
> 
> Thanks for the patch.  I'll take care of this on Saturday,
> if no one else commits before then.
> 

Patch has been committed.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-09 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #30 from Steve Kargl  ---
On Mon, May 09, 2016 at 02:55:01PM +, fritzoreese at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226
> 
> --- Comment #29 from Fritz Reese  ---
> (In reply to Andreas Schwab from comment #25)
> > FAIL: gfortran.dg/dec_union_4.f90   -O0  execution test
> > FAIL: gfortran.dg/dec_union_4.f90   -O1  execution test
> > FAIL: gfortran.dg/dec_union_4.f90   -O2  execution test
> > FAIL: gfortran.dg/dec_union_4.f90   -O3 -fomit-frame-pointer -funroll-loops
> > -fpeel-loops -ftracer -finline-functions  execution test
> > FAIL: gfortran.dg/dec_union_4.f90   -O3 -g  execution test
> > FAIL: gfortran.dg/dec_union_4.f90   -Os  execution test
> 
> It was silly of me to disregard endian-ness in this test case. Fixed:
> 
> https://gcc.gnu.org/ml/fortran/2016-05/msg00018.html
> 

Thanks for the patch.  I'll take care of this on Saturday,
if no one else commits before then.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-09 Thread fritzoreese at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #29 from Fritz Reese  ---
(In reply to Andreas Schwab from comment #25)
> FAIL: gfortran.dg/dec_union_4.f90   -O0  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O1  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O2  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O3 -fomit-frame-pointer -funroll-loops
> -fpeel-loops -ftracer -finline-functions  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O3 -g  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -Os  execution test

It was silly of me to disregard endian-ness in this test case. Fixed:

https://gcc.gnu.org/ml/fortran/2016-05/msg00018.html

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-08 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #28 from Steve Kargl  ---
On Sun, May 08, 2016 at 03:06:39PM +, dominiq at lps dot ens.fr wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226
> 
> --- Comment #27 from Dominique d'Humieres  ---
> > WORKFORME on i686-*-freebsd and x86_64-*-freebsd.
> 
> See https://gcc.gnu.org/ml/gcc-testresults/2016-05/msg00779.html for
> m68k-unknown-linux-gnu.
> 

Why?  There is no information there that isn't in Andreas's comment
(a content-free post).

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-08 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #27 from Dominique d'Humieres  ---
> WORKFORME on i686-*-freebsd and x86_64-*-freebsd.

See https://gcc.gnu.org/ml/gcc-testresults/2016-05/msg00779.html for
m68k-unknown-linux-gnu.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-08 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #26 from Steve Kargl  ---
On Sun, May 08, 2016 at 10:09:02AM +, sch...@linux-m68k.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226
> 
> --- Comment #25 from Andreas Schwab  ---
> FAIL: gfortran.dg/dec_union_4.f90   -O0  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O1  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O2  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O3 -fomit-frame-pointer -funroll-loops
> -fpeel-loops -ftracer -finline-functions  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -O3 -g  execution test
> FAIL: gfortran.dg/dec_union_4.f90   -Os  execution test
> 

WORKFORME on i686-*-freebsd and x86_64-*-freebsd.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-08 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #25 from Andreas Schwab  ---
FAIL: gfortran.dg/dec_union_4.f90   -O0  execution test
FAIL: gfortran.dg/dec_union_4.f90   -O1  execution test
FAIL: gfortran.dg/dec_union_4.f90   -O2  execution test
FAIL: gfortran.dg/dec_union_4.f90   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/dec_union_4.f90   -O3 -g  execution test
FAIL: gfortran.dg/dec_union_4.f90   -Os  execution test

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org

--- Comment #24 from kargl at gcc dot gnu.org ---
I have attached the diffs for fortran/ChangeLog, testsuite/ChangeLog,
and code changes for revision 235999.  This is now in trunk.  I'll
commit to the 6-branch next weekend.

Please keep an eye open for bug reports.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #23 from kargl at gcc dot gnu.org ---
Created attachment 38441
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38441&action=edit
diff for revision 235999

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #22 from kargl at gcc dot gnu.org ---
Created attachment 38440
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38440&action=edit
gcc/testsuite/ChangeLog diff

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #21 from kargl at gcc dot gnu.org ---
Created attachment 38439
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38439&action=edit
fortran/ChangeLog diff

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-05-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #20 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sat May  7 23:16:23 2016
New Revision: 235999

URL: https://gcc.gnu.org/viewcvs?rev=235999&root=gcc&view=rev
Log:
2016-05-07  Fritz Reese  

PR fortran/56226
* module.c (dt_upper_string): Rename to gfc_dt_upper_string
(dt_lower_string): Likewise.
* gfortran.h: Make new gfc_dt_upper/lower_string global.
* class.c: Use gfc_dt_upper_string.
* decl.c: Likewise.
* symbol.c: Likewise.
* resolve.c (resolve_component): New function.
(resolve_fl_derived0): Move component loop code to resolve_component.
* parse.c (check_component): New function.
(parse_derived): Move loop code to check_component.
* lang.opt, invoke.texi, options.c : New option -fdec-structure.
* libgfortran.h (bt): New basic type BT_UNION.
* gfortran.h (gfc_option): New option -fdec-structure.
(gfc_get_union_type, gfc_compare_union_types): New prototypes.
(gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
macros.
(gfc_find_component): Change prototype.
* match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
gfc_match_structure_decl): New prototypes.
* parse.h (gfc_comp_struct): New macro.
* symbol.c (gfc_find_component): Search for components in nested unions
* class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
copy_vtab_proc_comps): Update calls to gfc_find_component.
* primary.c (gfc_convert_to_structure_constructor): Likewise.
* symbol.c (gfc_add_component): Likewise.
* resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
resolve_typebound_procedure, resolve_component, resolve_fl_derived):
Likewise.
* expr.c (get_union_init, component_init): New functions.
* decl.c (match_clist_expr, match_record_decl, get_struct_decl,
gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
* interface.c (compare_components, gfc_compare_union_types): Likewise.
* match.c (gfc_match_member_sep): Likewise.
* parse.c (check_component, parse_union, parse_struct_map): Likewise.
* resolve.c (resolve_fl_struct): Likewise.
* symbol.c (find_union_component): Likewise.
* trans-types.c (gfc_get_union_type): Likewise.
* parse.c (parse_derived): Use new functions.
* interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
* expr.c (gfc_default_initializer): Likewise.
* gfortran.texi: Support for DEC structures, unions, and maps.
* gfortran.h (gfc_statement, sym_flavor): Likewise.
* check.c (gfc_check_kill_sub): Likewise.
* expr.c (gfc_copy_expr, simplify_const_ref,
gfc_has_default_initializer): Likewise.
* decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
match_pointer_init, build_struct, variable_decl,
gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
gfc_match_end, gfc_match_derived_decl): Likewise.
* interface.c (check_interface0, check_interface1,
gfc_search_interface): Likewise.
* misc.c (gfc_basic_typename, gfc_typename): Likewise.
* module.c (add_true_name, build_tnt, bt_types, mio_typespec,
fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
gfc_get_module_backend_decl): Likewise.
* parse.h (gfc_compile_state): Likewise.
* parse.c (decode_specification_statement, decode_statement,
gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
* primary.c (gfc_match_varspec, gfc_match_structure_constructor,
gfc_match_rvalue, match_variable): Likewise.
* resolve.c (find_arglists, resolve_structure_cons,
is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
resolve_typebound_subroutine, resolve_allocate_expr,
nonscalar_typebound_assign, generate_component_assignments,
resolve_fl_variable_derived, check_defined_assignments,
resolve_component, resolve_symbol, resolve_equivalence_derived):
Likewise.
* symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
gfc_restore_last_undo_checkpoint, gfc_type_compatible,
gfc_find_dt_in_generic): Likewise.
* trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
gfc_create_module_variable, check_constant_initializer): Likewise.
* trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
Likewise.
* trans-io.c (transfer_namelist_element, transfer_expr,
gfc_trans_transfer): Likewise.
* trans-stmt.c (gfc_tran

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-10 Thread davejohansen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #19 from Dave Johansen  ---
(In reply to kargl from comment #18)
> (In reply to Dave Johansen from comment #17)
> > (In reply to kargl from comment #16)
> > > See the fortran@ mailinglist archive.  Fritz posted a patch against
> > > 4.8 branch.
> > 
> > Are the patches that were posted against 6.0?
> > 
> 
> What part of "Fritz posted a patch against 4.8 branch"
> is not clear?
> 
> What part of "See the fortran@ mailinglist archive"
> is not clear.
> 
> To be brutally clear:
> https://gcc.gnu.org/ml/fortran/2016-03/msg00013.html

Sorry, that was a complete oversight on my part. The recent patches were inline
text and so I didn't notice the link to the gzipped attachment at the bottom of
that email.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-10 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #18 from kargl at gcc dot gnu.org ---
(In reply to Dave Johansen from comment #17)
> (In reply to kargl from comment #16)
> > See the fortran@ mailinglist archive.  Fritz posted a patch against
> > 4.8 branch.
> 
> Are the patches that were posted against 6.0?
> 

What part of "Fritz posted a patch against 4.8 branch"
is not clear?

What part of "See the fortran@ mailinglist archive"
is not clear.

To be brutally clear:
https://gcc.gnu.org/ml/fortran/2016-03/msg00013.html

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-10 Thread davejohansen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #17 from Dave Johansen  ---
(In reply to kargl from comment #16)
> See the fortran@ mailinglist archive.  Fritz posted a patch against
> 4.8 branch.

Are the patches that were posted against 6.0?

> That patch will never be committed to the 4.8 branch because that
> branch is closed.

I understand that 4.8 is EOL and I'm not requesting that they be applied. I'm
just requesting that they be made available so that I can add them to an SCL
build that I do myself using COPR ( https://fedorahosted.org/copr/ ) so they
can be used on RHEL 6/7 (which have not been EOLed).

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-10 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #16 from kargl at gcc dot gnu.org ---
(In reply to Dave Johansen from comment #14)
> Are the patches for 4.8 available or can they be made available? I would
> like to make a Software Collection (SCL) of version of 4.8 with these
> patches so it could be used on RHEL 6/7 without having to jump to a newer
> version of the compiler.

See the fortran@ mailinglist archive.  Fritz posted a patch against
4.8 branch.

That patch will never be committed to the 4.8 branch because that
branch is closed.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-10 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #15 from Dominique d'Humieres  ---
> Are the patches for 4.8 available or can they be made available? I would like
> to make a Software Collection (SCL) of version of 4.8 with these patches so
> it could be used on RHEL 6/7 without having to jump to a newer version
> of the compiler.

4.8 is no longer supported. AFAICT this PR is not a regression and in principle
should only be applied to the coming gcc-7 branch.

The "port" maintainers (fink or macports for OS X) may want to apply the patch
on their distros.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-10 Thread davejohansen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #14 from Dave Johansen  ---
Are the patches for 4.8 available or can they be made available? I would like
to make a Software Collection (SCL) of version of 4.8 with these patches so it
could be used on RHEL 6/7 without having to jump to a newer version of the
compiler.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-01 Thread fritzoreese at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #13 from Fritz Reese  ---
I actually have a fairly in-depth set of testcases as part of the patch (based
on lots of legacy code). More are of course welcome, but check out what I've
already added as a starting point.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-01 Thread joel.matz at horizonbtc dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #12 from Joel Matz  ---
I'll see if I can put together some unit tests. Thanks for the effort,

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-01 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

Jerry DeLisle  changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot gnu.org

--- Comment #11 from Jerry DeLisle  ---
(In reply to Joel Matz from comment #8)
> Any word on this?  I would certainly be willing to help test.

Please start testing if you can.  The more testing the better.  Lots of
variations. I am not familiar with these extensions, I assume a lot of legacy
code exists.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-01 Thread russelljbrennan at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #10 from russelljbrennan at gmail dot com ---
Thanks for this Fritz!  Should make a lot of people's lives much easier.

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2016-03-01 Thread fritzoreese at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #9 from Fritz Reese  ---
I've finally submitted my patches for a -fdec-structure option which enables
STRUCTURE/RECORD and UNION/MAP support:

https://gcc.gnu.org/ml/fortran/2016-03/msg2.html

I have (4) patches, and had to submit the patches separately to avoid being
spam-blocked:
https://gcc.gnu.org/ml/fortran/2016-03/msg3.html
https://gcc.gnu.org/ml/fortran/2016-03/msg4.html
https://gcc.gnu.org/ml/fortran/2016-03/msg5.html
https://gcc.gnu.org/ml/fortran/2016-03/msg6.html

[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2015-03-23 Thread joel.matz at horizonbtc dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

Joel Matz  changed:

   What|Removed |Added

 CC||joel.matz at horizonbtc dot com

--- Comment #8 from Joel Matz  ---
Any word on this?  I would certainly be willing to help test.


[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2014-12-09 Thread fritzoreese at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

--- Comment #7 from Fritz Reese  ---
FWIW I have the patches ready against the gcc-5.0.0 dev trunk, I'm just waiting
on my employer's lawyer, who has been on vacation for several weeks, to sort
out the legal issues.

The wheels of justice spin awfully slow.


[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2014-12-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2014-12-09
 CC||fritzoreese at gmail dot com
 Ever confirmed|0   |1

--- Comment #6 from Dominique d'Humieres  ---
The discussion has started at
https://gcc.gnu.org/ml/fortran/2013-02/msg00079.html and died at
https://gcc.gnu.org/ml/fortran/2013-03/msg00048.html.

Fritz Reese has offered to implement DEC Extensions at
https://gcc.gnu.org/ml/fortran/2014-09/msg00255.html, but the thread died at
https://gcc.gnu.org/ml/fortran/2014-10/msg00081.html.

IMO f77 extensions should be frozen: bugs being documented and not fixed,
extension
requests put under 6.2 Extensions not implemented in GNU Fortran.


[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2013-02-08 Thread janus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226



janus at gcc dot gnu.org changed:



   What|Removed |Added



 CC||janus at gcc dot gnu.org



--- Comment #5 from janus at gcc dot gnu.org 2013-02-08 13:00:54 UTC ---

(In reply to comment #2)

> It seems to me that the UNION/MAP pair is analogous to a basic form of a c/c++

> union of structs.  Could the corresponding code not be ganked and fitted to

> this application?



Since GCC is a "C-centered" compiler, so to speak, the middle end is surely

able to handle unions (if the Fortran front end is taught to support them).





> It would make sense to me to allow UNION/MAP inside UDTs



Yes! (if by UDTs you mean "derived types", DT, as they are called in the

Fortran standard)





> as well as RECORDs and STRUCTUREs.



No. I would say the STRUCTURE/RECORD syntax should not be used at all, since it

can be replaced by standard DTs.





IMHO, UNION/MAP would be a useful extension to standard Fortran, while

STRUCTURE/RECORD would not (and should not be implemented in gfortran).


[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2013-02-07 Thread russelljbrennan at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226



--- Comment #4 from russelljbrennan at gmail dot com 2013-02-08 01:03:12 UTC ---

>From a memory standpoint yes, union/map can be replaced by equivalence.  From

an API standpoint it cannot afaik.  A suggestion for the former lies here

http://stackoverflow.com/questions/14733238/convert-fortran-dec-union-map-extensions-to-anything-else


[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2013-02-07 Thread pinskia at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226



--- Comment #3 from Andrew Pinski  2013-02-08 
00:46:19 UTC ---

Union can be replaced with EQUIVALENCE I think.


[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2013-02-07 Thread russelljbrennan at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226



--- Comment #2 from russelljbrennan at gmail dot com 2013-02-07 13:31:16 UTC ---

It seems to me that the UNION/MAP pair is analogous to a basic form of a c/c++

union of structs.  Could the corresponding code not be ganked and fitted to

this application?  I did notice in the IBM link that you provided that unions

are only defined in an enclosing record structure... RECORDs and STRUCTUREs are

easily replace with UDTs.  It would make sense to me to allow UNION/MAP inside

UDTs as well as RECORDs and STRUCTUREs.


[Bug fortran/56226] Add support for DEC UNION and MAP extensions

2013-02-06 Thread burnus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226



Tobias Burnus  changed:



   What|Removed |Added



 CC||burnus at gcc dot gnu.org



--- Comment #1 from Tobias Burnus  2013-02-06 
17:42:04 UTC ---

I don't think that the implementation of UNION/MAP will happen soon, given that

it is not a simple feature and most effort concentrates on supporting the

Fortran standard. However, if someone volunteers to work on this, it might

happen sooner.



For documentation, see:

-

http://publib.boulder.ibm.com/infocenter/comphelp/v101v121/topic/com.ibm.xlf121.aix.doc/language_ref/unionmap.html

-

http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-mac/GUID-1CC04793-AF79-4E0F-AC78-DD4CF985C23F.htm