chapel icon indicating copy to clipboard operation
chapel copied to clipboard

[Bug]: internal error with a call to walkDirs

Open mppf opened this issue 7 months ago • 0 comments

Summary of Problem

Description: I've run into an internal compiler error when calling walkDirs. It turns out that I wanted to call findFiles rather than walkDirs anyway. But I am filing this issue because we shouldn't be seeing internal errors.

Is this issue currently blocking your progress? No

Steps to Reproduce

Source Code:

import FileSystem;
import List;

proc main(args: [] string) throws {
  var inputFilesList: List.list(string);

  for arg in args[1..] {
    if FileSystem.isFile(arg) {
      writeln("Have file ", arg);
      inputFilesList.pushBack(arg);
    }
    if FileSystem.isDir(arg) {
      writeln("Have directory ", arg);
      for path in FileSystem.walkDirs(arg, followlinks = true) {
        writeln("found file ", path);
        if FileSystem.isFile(path) {
          inputFilesList.pushBack(path);
        }
      }
    }
  }

  return 0;
}

$ chpl aa.chpl 
internal error: LLV-CLA-TIL-2041 chpl version 2.2.0 pre-release (xxxxxxxxxx)

Internal errors indicate a bug in the Chapel compiler,
and we're sorry for the hassle.  We would appreciate your reporting this bug --
please see https://chapel-lang.org/bugs.html for instructions.
$ CHPL_LLVM=none chpl aa.chpl 
In file included from /tmp/chpl-mppf.deleteme-WTOvVA/_main.c:86:
/tmp/chpl-mppf.deleteme-WTOvVA/aa.c: In function ‘_rec_iter_loop_main_chpl’:
/tmp/chpl-mppf.deleteme-WTOvVA/aa.c:384:1: error: label ‘_endmain_chpl’ used but not defined
  384 | goto _endmain_chpl;
      | ^~~~
gmake: *** [/home/mppf/w/main/runtime/etc/Makefile.exe:39: /tmp/chpl-mppf.deleteme-WTOvVA/_main.o] Error 1
error: compiling generated source

this is with main (07f6ceb3fe56e0baeefda0624928885705685665).

Associated Future Test(s): TODO

mppf avatar Jul 26 '24 20:07 mppf