Bug 44868 - [OOP] Error recovery: ICE after invalid TBP call
Summary: [OOP] Error recovery: ICE after invalid TBP call
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: error-recovery, ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2010-07-08 10:16 UTC by Tobias Burnus
Modified: 2010-07-21 22:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2010-07-08 10:16:11 UTC
Reported at http://gcc.gnu.org/ml/fortran/2010-07/msg00048.html by Satish.BD

The error is properly diagnosed but afterwards, an ICE occurs (on the report's system). For me, only invalid reads and writes are shown in valgrind: http://gcc.gnu.org/ml/fortran/2010-07/msg00051.html

I will fill another PR for the follow up problem.
Comment 1 Tobias Burnus 2010-07-08 10:33:47 UTC
See also PR 44869.
Comment 2 janus 2010-07-17 15:35:50 UTC
At r162275, I'm neither seeing the ICE nor any valgrind errors. Can anyone confirm this?

[My guess is that it has been fixed by the recent cleanup of generics, i.e. r162125.]
Comment 3 Dominique d'Humieres 2010-07-17 15:47:22 UTC
At revision 162276, I get


pr44868.f90:245.24:

            tst_case => self%list(i)
                        1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
pr44868.f90:231.24:

            tst_case => self%list(i)
                        1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
pr44868.f90:220.20:

        tst_case => self%list(self%cnt)
                    1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
pr44868.f90:296.11:

use fortest
           1
Fatal Error: Can't open module file 'fortest.mod' for reading at (1): No such file or directory
Comment 4 Satish.BD 2010-07-17 15:51:26 UTC
Yes Janus, Dominique. The diagnosis is correct. The error messages are valid. I think this PR can be closed.

(In reply to comment #3)
> At revision 162276, I get
> 
> 
> pr44868.f90:245.24:
> 
>             tst_case => self%list(i)
>                         1
> Error: Pointer assignment target is neither TARGET nor POINTER at (1)
> pr44868.f90:231.24:
> 
>             tst_case => self%list(i)
>                         1
> Error: Pointer assignment target is neither TARGET nor POINTER at (1)
> pr44868.f90:220.20:
> 
>         tst_case => self%list(self%cnt)
>                     1
> Error: Pointer assignment target is neither TARGET nor POINTER at (1)
> pr44868.f90:296.11:
> 
> use fortest
>            1
> Fatal Error: Can't open module file 'fortest.mod' for reading at (1): No such
> file or directory
> 
Comment 5 janus 2010-07-18 09:23:06 UTC
(In reply to comment #3)
> At revision 162276, I get
> 
> pr44868.f90:245.24:
> 
>             tst_case => self%list(i)
>                         1
> Error: Pointer assignment target is neither TARGET nor POINTER at (1)

Dominique, I think you're compiling the wrong code. There is no "tst_case" in comment #0.


On the test case in comment #0 I currently get:

c0.f90:59.22:

        call suite%add("second_test", test_b)
                      1
Error: 'add' at (1) is not a member of the 'test_suite' structure
c0.f90:70.11:

use my_test
           1
Fatal Error: Can't open module file 'my_test.mod' for reading at (1): No such file or directory


The error message is correct. As long as there is no ICE (and no valgrind errors), this PR can be closed.
Comment 6 Dominique d'Humieres 2010-07-18 10:22:17 UTC
> Dominique, I think you're compiling the wrong code.

Yes, it was the invalid version in pr44869. With the code in comment #0 I also get

Error: 'add' at (1) is not a member of the 'test_suite' structure

without ICE.
Comment 7 Tobias Burnus 2010-07-21 22:08:28 UTC
Close as fixed. I also do no longer see any valgrind errors.

BD, if you still see an ICE, please feel free to reopen this bug (or fill a new one).