public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64933] New: ASSOCIATE on a character variable does not allow substring expressions
@ 2015-02-04 10:22 olivier.marsden at ecmwf dot int
  2015-02-04 10:24 ` [Bug fortran/64933] " olivier.marsden at ecmwf dot int
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: olivier.marsden at ecmwf dot int @ 2015-02-04 10:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64933

            Bug ID: 64933
           Summary: ASSOCIATE on a character variable does not allow
                    substring expressions
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olivier.marsden at ecmwf dot int

Created attachment 34662
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34662&action=edit
gfortran 5.0  ICE output for test case

The following program is generating an ICE with gcc-5-20150201, and 
fails with 
ASSOCIATE(should_work=>char_var)                               
Error: Associate-name 'should_work' at (1) is used as array
for gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux)

The ICE output is attached.

program test_this
implicit none

character(len=15) :: char_var
ASSOCIATE(should_work=>char_var)

should_work = "test succesful"

print *, should_work(5:14)

END ASSOCIATE

end program


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/64933] ASSOCIATE on a character variable does not allow substring expressions
  2015-02-04 10:22 [Bug fortran/64933] New: ASSOCIATE on a character variable does not allow substring expressions olivier.marsden at ecmwf dot int
@ 2015-02-04 10:24 ` olivier.marsden at ecmwf dot int
  2015-02-13 13:56 ` dominiq at lps dot ens.fr
  2015-02-13 15:36 ` pault at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: olivier.marsden at ecmwf dot int @ 2015-02-04 10:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64933

--- Comment #1 from Olivier Marsden <olivier.marsden at ecmwf dot int> ---
Comment on attachment 34662
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34662
gfortran 5.0  ICE output for test case

>
> print *, should_work(5:15)
> 1
>internal compiler error: Segmentation fault
>0xb7c62f crash_signal
>        ../../gcc-5-20150201/gcc/toplev.c:383
>0x6ebf4b gfc_conv_scalarized_array_ref
>        ../../gcc-5-20150201/gcc/fortran/trans-array.c:3068
>0x6ec911 gfc_conv_array_ref(gfc_se*, gfc_array_ref*, gfc_expr*, locus*)
>        ../../gcc-5-20150201/gcc/fortran/trans-array.c:3205
>0x719865 gfc_conv_variable
>        ../../gcc-5-20150201/gcc/fortran/trans-expr.c:2203
>0x716f92 gfc_conv_expr(gfc_se*, gfc_expr*)
>        ../../gcc-5-20150201/gcc/fortran/trans-expr.c:6836
>0x71c3e4 gfc_conv_expr_reference(gfc_se*, gfc_expr*)
>        ../../gcc-5-20150201/gcc/fortran/trans-expr.c:6928
>0x742c0f gfc_trans_transfer(gfc_code*)
>        ../../gcc-5-20150201/gcc/fortran/trans-io.c:2394
>0x6e2777 trans_code
>        ../../gcc-5-20150201/gcc/fortran/trans.c:1853
>0x740670 build_dt
>        ../../gcc-5-20150201/gcc/fortran/trans-io.c:1921
>0x6e2797 trans_code
>        ../../gcc-5-20150201/gcc/fortran/trans.c:1825
>0x75a11c gfc_trans_block_construct(gfc_code*)
>        ../../gcc-5-20150201/gcc/fortran/trans-stmt.c:1457
>0x6e2887 trans_code
>        ../../gcc-5-20150201/gcc/fortran/trans.c:1755
>0x70e088 gfc_generate_function_code(gfc_namespace*)
>        ../../gcc-5-20150201/gcc/fortran/trans-decl.c:5844
>0x69f880 translate_all_program_units
>        ../../gcc-5-20150201/gcc/fortran/parse.c:5341
>0x69f880 gfc_parse_file()
>        ../../gcc-5-20150201/gcc/fortran/parse.c:5538
>0x6df605 gfc_be_parse_file
>        ../../gcc-5-20150201/gcc/fortran/f95-lang.c:228
>Please submit a full bug report,
>with preprocessed source if appropriate.
>Please include the complete backtrace with any bug report.
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/64933] ASSOCIATE on a character variable does not allow substring expressions
  2015-02-04 10:22 [Bug fortran/64933] New: ASSOCIATE on a character variable does not allow substring expressions olivier.marsden at ecmwf dot int
  2015-02-04 10:24 ` [Bug fortran/64933] " olivier.marsden at ecmwf dot int
@ 2015-02-13 13:56 ` dominiq at lps dot ens.fr
  2015-02-13 15:36 ` pault at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-02-13 13:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64933

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-13
                 CC|                            |pault at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Up to revision r219797 (2015-01-17), I get the error

pr64933.f90:5:31:

 ASSOCIATE(should_work=>char_var)
                               1
Error: Associate-name 'should_work' at (1) is used as array

Starting at r219823 (2015-01-18) I get the ICE. Likely a fall out of r219814
(pr55901). Please feel free to mark this PR as a 5.0 regression.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/64933] ASSOCIATE on a character variable does not allow substring expressions
  2015-02-04 10:22 [Bug fortran/64933] New: ASSOCIATE on a character variable does not allow substring expressions olivier.marsden at ecmwf dot int
  2015-02-04 10:24 ` [Bug fortran/64933] " olivier.marsden at ecmwf dot int
  2015-02-13 13:56 ` dominiq at lps dot ens.fr
@ 2015-02-13 15:36 ` pault at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pault at gcc dot gnu.org @ 2015-02-13 15:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64933

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #2)
> Up to revision r219797 (2015-01-17), I get the error
> 
> pr64933.f90:5:31:
> 
>  ASSOCIATE(should_work=>char_var)
>                                1
> Error: Associate-name 'should_work' at (1) is used as array
> 
> Starting at r219823 (2015-01-18) I get the ICE. Likely a fall out of r219814
> (pr55901). Please feel free to mark this PR as a 5.0 regression.

Hmm! I am not sure that it can be regarded as a regression, since the original
error was wrong. I agree that an ICE is worse.... -ish.

I'll take it though, regression or not.

Paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-13 15:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 10:22 [Bug fortran/64933] New: ASSOCIATE on a character variable does not allow substring expressions olivier.marsden at ecmwf dot int
2015-02-04 10:24 ` [Bug fortran/64933] " olivier.marsden at ecmwf dot int
2015-02-13 13:56 ` dominiq at lps dot ens.fr
2015-02-13 15:36 ` pault at gcc dot gnu.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).