Git Product home page Git Product logo

Comments (4)

certik avatar certik commented on June 1, 2024 1

Yes, the -g --debug-with-line-column options don't work in all cases yet. In terms of priorities we'll work on debugging symbols after we reach beta.

Regarding the T format descriptor, we just have to implement it. It needs to be added here:

char** parse_fortran_format(char* format, int *count, int *item_start) {
. Do you want to send us a patch?

from lfortran.

harperjf avatar harperjf commented on June 1, 2024

Having found that lfortran would not allow T in a format string (valid Fortran ever since f77) I wrote this little program to check my workaround, which 5 other compilers all allowed. But if I tried compiling with the -g --debug-with-line-column options as recommended when I just tried -g, I got an ICE as I did in #3900, although this time no allocatable scalar was involved. I quote the Fortran program and its outputs with various options. The output was useful only with no options at all specified!

(lf2) john:~/Test$ cat fmtbug.f90
program fmtbug
  character fmt*26, line*80
  fmt =  '(1X,A,T33,A4,6X,99(A5,6X))'
  write(line,fmt) 'a','b','c','d','e'
  print "(A)", trim(line)
  write(line,"(1X,A,A4,6X,99(A5,6X))") 'a'//repeat(' ',30), 'b','c','d','e'
  print "(A)", trim(line)
end program fmtbug
(lf2) john:~/Test$ lfortran fmtbug.f90
Unsupported or unrecognized `T` in format string
(lf2) john:~/Test$ lfortran -g  fmtbug.f90
semantic error: The `emit_debug_line_column` is not enabled; please use the `--debug-with-line-column` option to get the correct location information


Note: Please report unclear or confusing messages as bugs at
https://github.com/lfortran/lfortran/issues.
(lf2) john:~/Test$ lfortran -g --debug-with-line-column fmtbug.f90
Internal Compiler Error: Unhandled exception
Traceback (most recent call last):
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x726858
  Binary file "/lib/x86_64-linux-gnu/libc.so.6", local address: 0x29e3f
  Binary file "/lib/x86_64-linux-gnu/libc.so.6", local address: 0x29d8f
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x600a58
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x7a0a5c
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x78ded9
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x85f731
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x1c0d4b8
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x1c06678
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x1c03c9f
  Binary file "/home/john/conda_root/envs/lf2/bin/lfortran", local address: 0x1ba108d
LCompilersException: Debug information for the type: `str` is not yet implemented
(lf2) john:~/Test$ 

from lfortran.

harperjf avatar harperjf commented on June 1, 2024

Sorry, I know something about Fortran but I'm totally ignorant of LLVM and of C, which I suspect your 60d1584 is written in.

from lfortran.

certik avatar certik commented on June 1, 2024

@harperjf no worries. The best way you can help then is to report bugs, as you have been doing. Thank you.

from lfortran.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.