Bug 72051 - gfortran bug - internal compiler error
Summary: gfortran bug - internal compiler error
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 5.3.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-25 21:05 UTC by wadud.miah
Modified: 2016-07-26 20:16 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-07-26 00:00:00


Attachments
source code to test gfortran bug (664.83 KB, application/gzip)
2016-07-26 08:46 UTC, wadud.miah
Details
Pre-processed source file (2.68 KB, text/plain)
2016-07-26 19:59 UTC, Martin Liška
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wadud.miah 2016-07-25 21:05:43 UTC
I am using gfortran 5.3.1 and I am getting an internal compiler error:

[miahw@bengal pFUnit]$ gfortran --version
GNU Fortran (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)

gfortran -c  -I/home/miahw/pFUnit/include -I/home/miahw/pFUnit/source -g -O0 -fbacktrace -fbounds-check -fcheck=mem -I../include -DBUILD_ROBUST -DGNU -DLinux -I/home/miahw/pFUnit/include -DLONG_PTR -DGNU -o Exception.o Exception.F90
Exception.F90:321:0:

       allocate(this%exceptions(0))
 1
internal compiler error: in wide_int_to_tree, at tree.c:1464
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.

any help will be appreciated.

Best regards,
Wadud.
Comment 1 Martin Liška 2016-07-25 21:49:30 UTC
Can you please attach source code.
Comment 2 wadud.miah 2016-07-26 08:46:51 UTC
Created attachment 39018 [details]
source code to test gfortran bug

Hello,

I have attached the source code. Simply untar it and set FC to the gfortran you would like to test, and then type "make". Let me know if you would like any further information. 

Regards,
Wadud.
Comment 3 wadud.miah 2016-07-26 08:48:07 UTC
When I replied to your email, the mailing list rejected my email and flagged it as spam. Could you please allow my emails to get through?

Thanks.
Comment 4 Richard Biener 2016-07-26 09:17:34 UTC
ISTR similar bugs so this might be a duplicate
Comment 5 wadud.miah 2016-07-26 09:25:09 UTC
Hi Richard,

Thanks for the update. Do you have any time line for the next release that will (hopefully) resolve this bug?

Regards,
Wadud.
Comment 6 kargl 2016-07-26 17:07:44 UTC
(In reply to wadud.miah from comment #2)
> Created attachment 39018 [details]
> source code to test gfortran bug
> 
> Hello,
> 
> I have attached the source code. Simply untar it and set FC to the gfortran
> you would like to test, and then type "make". Let me know if you would like
> any further information. 
> 
> Regards,
> Wadud.

Bull.

% setenv FC gfortran
% make
make: no target to make.

make: stopped in /usr/home/kargl/Downloads/pFUnit-3.2.7
Comment 7 kargl 2016-07-26 17:46:03 UTC
After screwing around with the build system, I managed
to prove that both

gcc version 7.0.0 20160726 (experimental) (GCC)
gcc version 6.1.1 20160515 (GCC) 

compile the code without problems.
Comment 8 wadud.miah 2016-07-26 18:08:03 UTC
Hi kargl,

I am getting the bug with gfortran 5.3.1. could you try to reproduce the bug with that version?

Regards,
Wadud.
Comment 9 kargl 2016-07-26 19:41:39 UTC
(In reply to wadud.miah from comment #8)
> Hi kargl,
> 
> I am getting the bug with gfortran 5.3.1. could you try to reproduce the bug
> with that version?
> 
> Regards,
> Wadud.

It compiles with
gcc version 4.9.4 20160726 (prerelease) (GCC) 
gcc version 5.4.1 20160726 (GCC) 

I don't have 5.3.1 and don't intend to install it.
Comment 10 wadud.miah 2016-07-26 19:51:32 UTC
I find this a very unusual response :-( What's the purpose of testing other compilers when the bug is in version 5.3.1? I'm not happy that the ticket has been closed without asking me whether I am happy with the outcome. I would like to re-open it and assign it to someone else.

Wadud.
Comment 11 wadud.miah 2016-07-26 19:55:14 UTC
this issue has not been fully resolved. Please test with gfortran version 5.3.1
Comment 12 Martin Liška 2016-07-26 19:56:33 UTC
I can really confirm that it fails with:

$ gcc --version
gcc-5 (SUSE Linux) 5.3.1 20160412 [gcc-5-branch revision 234894]

$ make
make -C /home/marxin/Programming/testcases/pr72051/pFUnit-3.2.7/source all
make[1]: Entering directory '/home/marxin/Programming/testcases/pr72051/pFUnit-3.2.7/source'
gfortran-5 -c  -I/home/marxin/Programming/testcases/pr72051/pFUnit-3.2.7/include -I/home/marxin/Programming/testcases/pr72051/pFUnit-3.2.7/source -g -O0 -fbacktrace -fbounds-check -fcheck=mem -I../include -DBUILD_ROBUST -DGNU -DLinux -I/home/marxin/Programming/testcases/pr72051/pFUnit-3.2.7/include -DLONG_PTR -DGNU -o Exception.o Exception.F90
Exception.F90:325:0:

       allocate(this%exceptions(0))
 1
internal compiler error: in wide_int_to_tree, at tree.c:1464
Comment 13 Martin Liška 2016-07-26 19:59:09 UTC
Created attachment 39024 [details]
Pre-processed source file

Minimal command line:
gfortran-5 pr72051.f90 -fcheck=mem
Comment 14 wadud.miah 2016-07-26 20:01:26 UTC
Do I need to compile with "-fcheck=mem" to get it working?
Comment 15 kargl 2016-07-26 20:02:38 UTC
(In reply to wadud.miah from comment #11)
> this issue has not been fully resolved. Please test with gfortran version
> 5.3.1

The bug is fixed in the 5-branch!  It is fixed in all active
branches.  That is the whole point of the testing that I've
shown.
Comment 16 wadud.miah 2016-07-26 20:16:55 UTC
I guess I just have to wait for a gfortran update in Fedora Core 23?