title: Print Fortran variables with the same names as builtin types in gdb
body: <p>As far as I can tell, this is valid Fortran code:</p>
  <pre><code>program main
  implicit none
  
  type foo
      character(len=7) :: int = &quot;Hello, &quot;
  end type foo
  
  type(foo) :: f
  character(len=5) :: character = &quot;World&quot;
  character(len=1) :: real = &quot;!&quot;
  
  print *,f%int
  print *,character
  print *,real
  
  end program
  </code></pre>
  <p>It compiles in gfortran 9.3 and gives the expected output.</p>
  <p>However gdb (version 8.2) refuses to print single variables:</p>
  <pre><code>(gdb) p real
  Attempt to use a type name as an expression
  (gdb) p f%int
  A syntax error in expression, near `int'.
  </code></pre>
  <p>I can list all variables:</p>
  <pre><code>(gdb) info locals
  character = 'World'
  f = ( int = 'Hello, ' )
  real = '!'
  </code></pre>
  <p><code>int</code> is a curious case, because int is not actually a type name in Fortran and a local variable named <code>int</code> can be printed by gdb. But a struct member named <code>int</code> as in the example can't be printed. And if a local variable <code>int</code> does not exist, <code>p int</code> results in the same error message as <code>p real</code>, so I suspect its connected. This is also how I came across the problem, because the code base I'm working in has a struct with a member <code>int</code> that aggregates and hides some internal data that I want to look at.</p>
  <p>I tried version 9.2 and <code>f%int</code> is printable. The others are the same.</p>
  <p>I realize those variable names are questionable, but apart from changing them, which is difficult in this particular code base, is there a way to get gdb to print those variables?</p>