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

--- Comment #1 from anlauf at gcc dot gnu.org ---
The print looks like it is coming via line 47:

  call val  (  "U++",  "U--")

which is translated here in the tree-dump:

  val (&"U++"[1]{lb: 1 sz: 1}, "U", 3, 1);

The prototype of val is:

  static void val (character(kind=1)[1:1] & restrict, character(kind=1),
integer(kind=8), integer(kind=8));

as I expect.  It appears the second argument is mishandled.  How so?


Out of curiosity: where do the arguments err1, err2 come from?
On x86_64 I get:

Breakpoint 1, p::val (x=..., c=85 'U', _x=3, _c=1) at value_9.f90:73
73          print *, "by value(kind=1): ", c
(gdb) p c
$1 = 85 'U'
(gdb) p x
$2 = 'U'

Reply via email to