This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/59700] [4.8/4.9 Regression] Misleading/buggy runtime error message: Bad integer for item 0 in list input
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Jan 2014 21:09:51 +0000
- Subject: [Bug fortran/59700] [4.8/4.9 Regression] Misleading/buggy runtime error message: Bad integer for item 0 in list input
- Auto-submitted: auto-generated
- References: <bug-59700-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59700
--- Comment #9 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Jan 09, 2014 at 08:45:19PM +0000, dominiq at lps dot ens.fr wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59700
>
> --- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Do you understand the '++' in
>
> 642 dtp->u.p.line_buffer[dtp->u.p.item_count++] = c;
>
> ?
It's C post-increment operator. If you had a->b[i++] = c and i = 2,
then you are setting a->b[2] = c and afterwards doing i = i + 1 = 3.
PS: Yes, I noticed that the testsuite has no tests for these
runtime errors.