public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198
[not found] <bug-83079-4@http.gcc.gnu.org/bugzilla/>
@ 2022-01-08 19:56 ` anlauf at gcc dot gnu.org
2022-01-11 21:18 ` anlauf at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-08 19:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #5 from anlauf at gcc dot gnu.org ---
The testcase in comment#0 is fixed by:
diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c
index af1c21047f6..9b5af8d1482 100644
--- a/gcc/fortran/target-memory.c
+++ b/gcc/fortran/target-memory.c
@@ -485,7 +485,7 @@ gfc_interpret_character (unsigned char *buffer, size_t
buffer_size,
result->value.character.string[result->value.character.length] = '\0';
- return result->value.character.length;
+ return size_character (result->value.character.length, result->ts.kind);
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198
[not found] <bug-83079-4@http.gcc.gnu.org/bugzilla/>
2022-01-08 19:56 ` [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198 anlauf at gcc dot gnu.org
@ 2022-01-11 21:18 ` anlauf at gcc dot gnu.org
2022-01-15 21:35 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-11 21:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Keywords| |wrong-code
Status|NEW |ASSIGNED
--- Comment #6 from anlauf at gcc dot gnu.org ---
Patch posted: https://gcc.gnu.org/pipermail/fortran/2022-January/057352.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198
[not found] <bug-83079-4@http.gcc.gnu.org/bugzilla/>
2022-01-08 19:56 ` [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198 anlauf at gcc dot gnu.org
2022-01-11 21:18 ` anlauf at gcc dot gnu.org
@ 2022-01-15 21:35 ` cvs-commit at gcc dot gnu.org
2022-01-23 19:39 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-15 21:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:29401b7b4581e9131e7057e263dcea8b40a6b5ab
commit r12-6604-g29401b7b4581e9131e7057e263dcea8b40a6b5ab
Author: Harald Anlauf <anlauf@gmx.de>
Date: Tue Jan 11 22:06:10 2022 +0100
Fortran: fix ICE and wrong code with TRANSFER and CHARACTER(kind=4)
gcc/fortran/ChangeLog:
PR fortran/83079
* target-memory.c (gfc_interpret_character): Result length is
in bytes and thus depends on the character kind.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Compute correct
string length for the result of the TRANSFER intrinsic and for
temporaries for the different character kinds.
gcc/testsuite/ChangeLog:
PR fortran/83079
* gfortran.dg/transfer_char_kind4.f90: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198
[not found] <bug-83079-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2022-01-15 21:35 ` cvs-commit at gcc dot gnu.org
@ 2022-01-23 19:39 ` cvs-commit at gcc dot gnu.org
2022-01-29 22:06 ` cvs-commit at gcc dot gnu.org
2022-01-29 22:32 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-23 19:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:a8c234519366b9a93a4bbc0717d609de27ccdc0e
commit r11-9487-ga8c234519366b9a93a4bbc0717d609de27ccdc0e
Author: Harald Anlauf <anlauf@gmx.de>
Date: Tue Jan 11 22:06:10 2022 +0100
Fortran: fix ICE and wrong code with TRANSFER and CHARACTER(kind=4)
gcc/fortran/ChangeLog:
PR fortran/83079
* target-memory.c (gfc_interpret_character): Result length is
in bytes and thus depends on the character kind.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Compute correct
string length for the result of the TRANSFER intrinsic and for
temporaries for the different character kinds.
gcc/testsuite/ChangeLog:
PR fortran/83079
* gfortran.dg/transfer_char_kind4.f90: New test.
(cherry picked from commit 29401b7b4581e9131e7057e263dcea8b40a6b5ab)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198
[not found] <bug-83079-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2022-01-23 19:39 ` cvs-commit at gcc dot gnu.org
@ 2022-01-29 22:06 ` cvs-commit at gcc dot gnu.org
2022-01-29 22:32 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-29 22:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:aa87c979d34bdea62586de79e8645fbddfa065b8
commit r10-10427-gaa87c979d34bdea62586de79e8645fbddfa065b8
Author: Harald Anlauf <anlauf@gmx.de>
Date: Tue Jan 11 22:06:10 2022 +0100
Fortran: fix ICE and wrong code with TRANSFER and CHARACTER(kind=4)
gcc/fortran/ChangeLog:
PR fortran/83079
* target-memory.c (gfc_interpret_character): Result length is
in bytes and thus depends on the character kind.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Compute correct
string length for the result of the TRANSFER intrinsic and for
temporaries for the different character kinds.
gcc/testsuite/ChangeLog:
PR fortran/83079
* gfortran.dg/transfer_char_kind4.f90: New test.
(cherry picked from commit 29401b7b4581e9131e7057e263dcea8b40a6b5ab)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198
[not found] <bug-83079-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2022-01-29 22:06 ` cvs-commit at gcc dot gnu.org
@ 2022-01-29 22:32 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-29 22:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|--- |10.4
Resolution|--- |FIXED
--- Comment #10 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12, and on 11- and 10-branch. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-29 22:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-83079-4@http.gcc.gnu.org/bugzilla/>
2022-01-08 19:56 ` [Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198 anlauf at gcc dot gnu.org
2022-01-11 21:18 ` anlauf at gcc dot gnu.org
2022-01-15 21:35 ` cvs-commit at gcc dot gnu.org
2022-01-23 19:39 ` cvs-commit at gcc dot gnu.org
2022-01-29 22:06 ` cvs-commit at gcc dot gnu.org
2022-01-29 22:32 ` anlauf 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).