public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-25 20:44 ` jvdelisle at gcc dot gnu.org
  2010-11-25 21:15 ` jvdelisle at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-11-25 20:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.sagan at gmail dot
                   |                            |com

--- Comment #17 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-25 19:48:03 UTC ---
*** Bug 46339 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
  2010-11-25 20:44 ` [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer jvdelisle at gcc dot gnu.org
@ 2010-11-25 21:15 ` jvdelisle at gcc dot gnu.org
  2010-12-28 22:31 ` dfranke at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-11-25 21:15 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot
                   |                            |gnu.org

--- Comment #18 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-25 19:58:57 UTC ---
Paul,

In comment #5 you mentioned this:

"I'll have to figure out how this can be done.  No doubt 'span' will have to be
added to the parent scope and the assignment performed on function entry and
return.  Hmmm!!  Better still would be to copy in and copy out."

I too began to think of this as a fix for pre 4.7.  I do think it would be nice
if we could provide a fix or informative error message rather than ice in 4.6.
In the pr46339 which I have marked as a duplicate of this PR, I have provided
some patches that fix the ICE part, but wrong code remains. What do you think?

The patches apply to fortran-dev branch, shall I commit them there?


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
  2010-11-25 20:44 ` [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer jvdelisle at gcc dot gnu.org
  2010-11-25 21:15 ` jvdelisle at gcc dot gnu.org
@ 2010-12-28 22:31 ` dfranke at gcc dot gnu.org
  2011-05-31 14:14 ` otte.martin at epa dot gov
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: dfranke at gcc dot gnu.org @ 2010-12-28 22:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Daniel Franke <dfranke at gcc dot gnu.org> 2010-12-28 22:30:10 UTC ---
Other potential dupes: PR40737, PR45128.


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-12-28 22:31 ` dfranke at gcc dot gnu.org
@ 2011-05-31 14:14 ` otte.martin at epa dot gov
  2011-05-31 14:35 ` otte.martin at epa dot gov
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: otte.martin at epa dot gov @ 2011-05-31 14:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Martin Otte <otte.martin at epa dot gov> 2011-05-31 14:05:17 UTC ---
Created attachment 24403
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24403
Example program that causes an ICE


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-05-31 14:14 ` otte.martin at epa dot gov
@ 2011-05-31 14:35 ` otte.martin at epa dot gov
  2013-03-29  8:40 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: otte.martin at epa dot gov @ 2011-05-31 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Otte <otte.martin at epa dot gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |otte.martin at epa dot gov

--- Comment #21 from Martin Otte <otte.martin at epa dot gov> 2011-05-31 14:12:45 UTC ---
I attached a small example program that is causing an internal compiler error
for me with gfortran 4.6. I was going to submit a new bug report, but a search
suggests that I am probably running into this bug, so I'll submit my small
example code here. I have a few codes with pointers to derived type components
that don't work with gfortran 4.6, so this bug is the only thing that is
keeping me from using gfortran regularly.


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-05-31 14:35 ` otte.martin at epa dot gov
@ 2013-03-29  8:40 ` Joost.VandeVondele at mat dot ethz.ch
  2013-03-29 10:31 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-03-29  8:40 UTC (permalink / raw)
  To: gcc-bugs


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

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2009-04-06 10:57:29         |2013-03-29
                 CC|                            |Joost.VandeVondele at mat
                   |                            |dot ethz.ch

--- Comment #22 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-03-29 08:40:06 UTC ---
Still affects trunk 4.9.0

     values => d(:)%value
 ^
0x99687f crash_signal
        ../../gcc/gcc/toplev.c:332
0x610d2b gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*)
        ../../gcc/gcc/fortran/trans-expr.c:6337
0x5e0d4a trans_code
        ../../gcc/gcc/fortran/trans.c:1439
0x6083bd gfc_generate_function_code(gfc_namespace*)
        ../../gcc/gcc/fortran/trans-decl.c:5392
0x5e19c1 gfc_generate_module_code(gfc_namespace*)
        ../../gcc/gcc/fortran/trans.c:1755
0x59efc8 translate_all_program_units
        ../../gcc/gcc/fortran/parse.c:4453
0x59efc8 gfc_parse_file()
        ../../gcc/gcc/fortran/parse.c:4663
0x5dc355 gfc_be_parse_file
        ../../gcc/gcc/fortran/f95-lang.c:189
Please submit a full bug report,


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2013-03-29  8:40 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-03-29 10:31 ` Joost.VandeVondele at mat dot ethz.ch
  2013-06-30 15:55 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-03-29 10:31 UTC (permalink / raw)
  To: gcc-bugs


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

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |39304
                 CC|                            |Huub.van-Dam at stfc dot
                   |                            |ac.uk

--- Comment #23 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-03-29 10:31:19 UTC ---
*** Bug 39304 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2013-03-29 10:31 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-06-30 15:55 ` dominiq at lps dot ens.fr
  2014-06-08 15:11 ` fxcoudert at gcc dot gnu.org
  2014-06-08 15:36 ` fxcoudert at gcc dot gnu.org
  9 siblings, 0 replies; 24+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-30 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nerge at informatik dot uni-hambur
                   |                            |g.de

--- Comment #24 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 57733 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2013-06-30 15:55 ` dominiq at lps dot ens.fr
@ 2014-06-08 15:11 ` fxcoudert at gcc dot gnu.org
  2014-06-08 15:36 ` fxcoudert at gcc dot gnu.org
  9 siblings, 0 replies; 24+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-08 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominiq at lps dot ens.fr

--- Comment #25 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
*** Bug 45128 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
       [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2014-06-08 15:11 ` fxcoudert at gcc dot gnu.org
@ 2014-06-08 15:36 ` fxcoudert at gcc dot gnu.org
  9 siblings, 0 replies; 24+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-08 15:36 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dh458 at oakapple dot net

--- Comment #26 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
*** Bug 41627 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (12 preceding siblings ...)
  2010-05-18 22:28 ` dfranke at gcc dot gnu dot org
@ 2010-05-18 22:30 ` dfranke at gcc dot gnu dot org
  13 siblings, 0 replies; 24+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-18 22:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from dfranke at gcc dot gnu dot org  2010-05-18 22:30 -------
The dupes PR38471 and PR42851 have more testcases, the former an equally
lengthy discussion as this PR.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (11 preceding siblings ...)
  2010-05-18 22:22 ` dfranke at gcc dot gnu dot org
@ 2010-05-18 22:28 ` dfranke at gcc dot gnu dot org
  2010-05-18 22:30 ` dfranke at gcc dot gnu dot org
  13 siblings, 0 replies; 24+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-18 22:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from dfranke at gcc dot gnu dot org  2010-05-18 22:28 -------
*** Bug 38471 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (10 preceding siblings ...)
  2010-04-27 20:08 ` dominiq at lps dot ens dot fr
@ 2010-05-18 22:22 ` dfranke at gcc dot gnu dot org
  2010-05-18 22:28 ` dfranke at gcc dot gnu dot org
  2010-05-18 22:30 ` dfranke at gcc dot gnu dot org
  13 siblings, 0 replies; 24+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-18 22:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from dfranke at gcc dot gnu dot org  2010-05-18 22:22 -------
*** Bug 42851 has been marked as a duplicate of this bug. ***


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (9 preceding siblings ...)
  2010-04-27 19:48 ` dfranke at gcc dot gnu dot org
@ 2010-04-27 20:08 ` dominiq at lps dot ens dot fr
  2010-05-18 22:22 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-04-27 20:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from dominiq at lps dot ens dot fr  2010-04-27 20:08 -------
As pointed out in comment #10 pr38471 is a duplicate of this one, as well as
pr42851 (see comment #1 of pr43091). They all give the same backtrace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000018
0x00000001000d072a in gfc_trans_pointer_assignment (expr1=0x14182ba40,
expr2=0x14182be20) at ../../work/gcc/fortran/trans-expr.c:4711
4711                  gfc_add_modify (&lse.post, GFC_DECL_SPAN(decl), tmp);
(gdb) bt
#0  0x00000001000d072a in gfc_trans_pointer_assignment (expr1=0x14182ba40,
expr2=0x14182be20) at ../../work/gcc/fortran/trans-expr.c:4711
#1  0x00000001000aa9a6 in trans_code (code=0x14182c1e0, cond=0x0) at
../../work/gcc/fortran/trans.c:1093
#2  0x00000001000c783f in gfc_generate_function_code (ns=<value temporarily
unavailable, due to optimizations>) at ../../work/gcc/fortran/trans-decl.c:4422
#3  0x00000001000aadeb in gfc_generate_module_code (ns=<value temporarily
unavailable, due to optimizations>) at ../../work/gcc/fortran/trans.c:1392
#4  0x000000010006b6df in gfc_parse_file () at
../../work/gcc/fortran/parse.c:4303
#5  0x00000001000a5bbc in gfc_be_parse_file (set_yydebug=<value temporarily
unavailable, due to optimizations>) at ../../work/gcc/fortran/f95-lang.c:239
#6  0x00000001006e447b in toplev_main (argc=2, argv=0x7fff5fbfd960) at
../../work/gcc/toplev.c:1053
#7  0x0000000100000c74 in start ()


-- 


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (8 preceding siblings ...)
  2009-04-06 10:57 ` pault at gcc dot gnu dot org
@ 2010-04-27 19:48 ` dfranke at gcc dot gnu dot org
  2010-04-27 20:08 ` dominiq at lps dot ens dot fr
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-04-27 19:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from dfranke at gcc dot gnu dot org  2010-04-27 19:48 -------
*** Bug 43091 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (7 preceding siblings ...)
  2008-12-11 16:14 ` burnus at gcc dot gnu dot org
@ 2009-04-06 10:57 ` pault at gcc dot gnu dot org
  2010-04-27 19:48 ` dfranke at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-06 10:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pault at gcc dot gnu dot org  2009-04-06 10:57 -------
Enfin, j'aborde le boulot....

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|SUSPENDED                   |ASSIGNED
   Last reconfirmed|2008-03-14 13:24:43         |2009-04-06 10:57:29
               date|                            |


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (6 preceding siblings ...)
  2008-11-06  6:27 ` pault at gcc dot gnu dot org
@ 2008-12-11 16:14 ` burnus at gcc dot gnu dot org
  2009-04-06 10:57 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-12-11 16:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from burnus at gcc dot gnu dot org  2008-12-11 16:13 -------
As fj pointed out: PR 38471 might be a duplicate of this PR.


-- 


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (5 preceding siblings ...)
  2008-11-06  6:26 ` pault at gcc dot gnu dot org
@ 2008-11-06  6:27 ` pault at gcc dot gnu dot org
  2008-12-11 16:14 ` burnus at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-06  6:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pault at gcc dot gnu dot org  2008-11-06 06:26 -------
It helps to mark it correctly!


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (4 preceding siblings ...)
  2008-10-05 20:27 ` pault at gcc dot gnu dot org
@ 2008-11-06  6:26 ` pault at gcc dot gnu dot org
  2008-11-06  6:27 ` pault at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-06  6:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2008-11-06 06:24 -------
Wait until 4.5.0 since it needs the array descriptor reform to be fixed.

Unassigning self for present until we decide who will be responsible for the
work.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pault at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (3 preceding siblings ...)
  2008-03-14 13:25 ` pault at gcc dot gnu dot org
@ 2008-10-05 20:27 ` pault at gcc dot gnu dot org
  2008-11-06  6:26 ` pault at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-10-05 20:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2008-10-05 20:26 -------
(In reply to comment #6)
> Jacques,
> 
> Now that 4.3 is out of the door, I have no excuse.  It's in the queue behind
> completing my move to Barcelona, memory leaks in allocatable components + some
> associated bugs and adding procedure pointers.  Thus, don't hold your breath
> but it's on the way.
> 

We have had some discussion on the list about reforming array descriptors,
which is what is needed here.  However, this is a big job because the early
gfortran developers made some unfortunate choices and left no 'reserved'
fields.  Quite aside from the coding job, it will wreck the gfortran API.

Paul 


-- 


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
                   ` (2 preceding siblings ...)
  2008-01-03 18:08 ` pault at gcc dot gnu dot org
@ 2008-03-14 13:25 ` pault at gcc dot gnu dot org
  2008-10-05 20:27 ` pault at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-03-14 13:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2008-03-14 13:24 -------
Jacques,

Now that 4.3 is out of the door, I have no excuse.  It's in the queue behind
completing my move to Barcelona, memory leaks in allocatable components + some
associated bugs and adding procedure pointers.  Thus, don't hold your breath
but it's on the way.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
   Last reconfirmed|2008-01-03 15:24:11         |2008-03-14 13:24:43
               date|                            |


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
  2008-01-03  9:42 ` [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer burnus at gcc dot gnu dot org
  2008-01-03 15:38 ` pault at gcc dot gnu dot org
@ 2008-01-03 18:08 ` pault at gcc dot gnu dot org
  2008-03-14 13:25 ` pault at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-03 18:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2008-01-03 17:58 -------

I'm taking a look at how it might be done.

This allows compilation to proceed:

Index: gcc/fortran/trans-decl.c
===================================================================
*** gcc/fortran/trans-decl.c    (revision 131237)
--- gcc/fortran/trans-decl.c    (working copy)
*************** gfc_get_symbol_decl (gfc_symbol * sym)
*** 951,956 ****
--- 951,970 ----
          sym->backend_decl = decl;
        }

+       if (sym->attr.subref_array_pointer)
+       {
+         tree span;
+         GFC_DECL_SUBREF_ARRAY_P (sym->backend_decl) = 1;
+         span = build_decl (VAR_DECL, create_tmp_var_name ("span"),
+                            gfc_array_index_type);
+         gfc_allocate_lang_decl (sym->backend_decl);
+         gfc_finish_var_decl (span, sym);
+         TREE_STATIC (span) = 1;
+         DECL_INITIAL (span) = build_int_cst (NULL_TREE, 0);
+
+         GFC_DECL_SPAN (sym->backend_decl) = span;
+       }
+
        TREE_USED (sym->backend_decl) = 1;
        if (sym->attr.assign && GFC_DECL_ASSIGN (sym->backend_decl) == 0)
        {

but the span is not passed back to the actual argument, as this demonstrates:

MODULE test
  IMPLICIT NONE
  TYPE :: my_type
    INTEGER :: value = 99
    INTEGER :: spacer = 199
  END TYPE
CONTAINS
  SUBROUTINE get_values(values, d)
    INTEGER,POINTER :: values(:)
    TYPE(my_type),POINTER :: d(:)
    values => d(:)%value
    print *, "in get_values  ", values
  END SUBROUTINE
END MODULE

  use test
  TYPE(my_type),POINTER :: d(:)
  INTEGER,POINTER :: values(:)
  allocate (d(2))
  call get_values (values, d)
  print *, "in MAIN        ", values
  deallocate (d)
end

I'll have to figure out how this can be done.  No doubt 'span' will have to be
added to the parent scope and the assignment performed on function entry and
return.  Hmmm!!  Better still would be to copy in and copy out.

Back to PR34431 and friends - I'll do this next.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
  2008-01-03  9:42 ` [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer burnus at gcc dot gnu dot org
@ 2008-01-03 15:38 ` pault at gcc dot gnu dot org
  2008-01-03 18:08 ` pault at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-03 15:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2008-01-03 15:24 -------
(In reply to comment #3)
> Reduced test; has nothing to do with BIND(C). I am not 100% sure it is valid.
> (Actually, glancing at the code, I had said it is invalid). However, it gives
> no error/warning (or ICE) with other compilers such as NAG f95, g95, openf95,
> ifort, which implies that it is presumably valid.

It is valid and runs OK, as long as 'values' is not a dummy. This is because
gfc_get_symbol_decl does not set GFC_DECL_SPAN for pointers.... I forgot about
it, apparently.

I'm taking a look at how it might be done.

Paul 


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-01-03 08:19:08         |2008-01-03 15:24:11
               date|                            |


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


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

* [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer
  2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
@ 2008-01-03  9:42 ` burnus at gcc dot gnu dot org
  2008-01-03 15:38 ` pault at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 24+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-03  9:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2008-01-03 09:14 -------
Reduced test; has nothing to do with BIND(C). I am not 100% sure it is valid.
(Actually, glancing at the code, I had said it is invalid). However, it gives
no error/warning (or ICE) with other compilers such as NAG f95, g95, openf95,
ifort, which implies that it is presumably valid.

MODULE test
  IMPLICIT NONE
  TYPE :: my_type
    INTEGER :: value
  END TYPE
CONTAINS
  SUBROUTINE get_values(values)
    INTEGER,POINTER :: values(:)
    TYPE(my_type),POINTER :: d(:)
    values => d(:)%value
  END SUBROUTINE
END MODULE


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|32630                       |32834
              nThis|                            |
  GCC build triplet|20080102 (experimental)     |
                   |[trunk revision 131253]     |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|GNU Fortran (GCC) 4.3.0     |
            Summary|ICE with c_f_pointer        |ICE when assigning item of a
                   |                            |derived-component to a
                   |                            |pointer


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


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

end of thread, other threads:[~2014-06-08 15:36 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-34640-4@http.gcc.gnu.org/bugzilla/>
2010-11-25 20:44 ` [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer jvdelisle at gcc dot gnu.org
2010-11-25 21:15 ` jvdelisle at gcc dot gnu.org
2010-12-28 22:31 ` dfranke at gcc dot gnu.org
2011-05-31 14:14 ` otte.martin at epa dot gov
2011-05-31 14:35 ` otte.martin at epa dot gov
2013-03-29  8:40 ` Joost.VandeVondele at mat dot ethz.ch
2013-03-29 10:31 ` Joost.VandeVondele at mat dot ethz.ch
2013-06-30 15:55 ` dominiq at lps dot ens.fr
2014-06-08 15:11 ` fxcoudert at gcc dot gnu.org
2014-06-08 15:36 ` fxcoudert at gcc dot gnu.org
2008-01-02 16:01 [Bug fortran/34640] New: ICE with c_f_pointer francois dot jacq at irsn dot fr
2008-01-03  9:42 ` [Bug fortran/34640] ICE when assigning item of a derived-component to a pointer burnus at gcc dot gnu dot org
2008-01-03 15:38 ` pault at gcc dot gnu dot org
2008-01-03 18:08 ` pault at gcc dot gnu dot org
2008-03-14 13:25 ` pault at gcc dot gnu dot org
2008-10-05 20:27 ` pault at gcc dot gnu dot org
2008-11-06  6:26 ` pault at gcc dot gnu dot org
2008-11-06  6:27 ` pault at gcc dot gnu dot org
2008-12-11 16:14 ` burnus at gcc dot gnu dot org
2009-04-06 10:57 ` pault at gcc dot gnu dot org
2010-04-27 19:48 ` dfranke at gcc dot gnu dot org
2010-04-27 20:08 ` dominiq at lps dot ens dot fr
2010-05-18 22:22 ` dfranke at gcc dot gnu dot org
2010-05-18 22:28 ` dfranke at gcc dot gnu dot org
2010-05-18 22:30 ` dfranke 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).