[flang-commits] [flang] [flang][Runtime] Add SIGNAL intrinisic (PR #79337)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Jan 25 01:01:58 PST 2024


kiranchandramohan wrote:

> I have not found open source code using this intrinsic. 

The CFL3D code in NASA's repository uses it. https://github.com/nasa/CFL3D/blob/776d5169f34d26ae65701c87038e63b125b7d86a/source/ronnie/main.F#L136


The Windows CI is failing.
```
******************** TEST 'Flang :: Lower/Intrinsics/signal.f90' FAILED ********************
  | Exit Code: 1
  |  
  | Command Output (stdout):
  | --
  | # RUN: at line 2
  | bbc -emit-hlfir -o - C:\ws\src\flang\test\Lower\Intrinsics\signal.f90 \| c:\ws\src\build\bin\filecheck.exe C:\ws\src\flang\test\Lower\Intrinsics\signal.f90
  | # executed command: bbc -emit-hlfir -o - 'C:\ws\src\flang\test\Lower\Intrinsics\signal.f90'
  | # note: command had no output on stdout or stderr
  | # executed command: 'c:\ws\src\build\bin\filecheck.exe' 'C:\ws\src\flang\test\Lower\Intrinsics\signal.f90'
  | # .---command stderr------------
  | # \| C:\ws\src\flang\test\Lower\Intrinsics\signal.f90:52:10: error: CHECK: expected string not found in input
  | # \| ! CHECK: %[[VAL_30:.*]] = arith.constant 1 : i32
  | # \|          ^
  | # \| <stdin>:81:36: note: scanning from here
  | # \|  %c12_i32 = arith.constant 12 : i32
  | # \|                                    ^
  | # \| <stdin>:85:4: note: possible intended match here
  | # \|  %c0_i32 = arith.constant 0 : i32
  | # \|    ^
  | # \|
  | # \| Input file: <stdin>
  | # \| Check file: C:\ws\src\flang\test\Lower\Intrinsics\signal.f90
  | # \|
  | # \| -dump-input=help explains the following input dump.
  | # \|
  | # \| Input was:
  | # \| <<<<<<
  | # \|             .
  | # \|             .
  | # \|             .
  | # \|            76:  fir.global internal @_QMmFsetup_signalsECsigusr1 constant : i32 {
  | # \|            77:  %c10_i32 = arith.constant 10 : i32
  | # \|            78:  fir.has_value %c10_i32 : i32
  | # \|            79:  }
  | # \|            80:  fir.global internal @_QMmFsetup_signalsECsigusr2 constant : i32 {
  | # \|            81:  %c12_i32 = arith.constant 12 : i32
  | # \| check:52'0                                        X error: no match found
  | # \|            82:  fir.has_value %c12_i32 : i32
  | # \| check:52'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | # \|            83:  }
  | # \| check:52'0     ~~~
  | # \|            84:  fir.global internal @_QMmFsetup_signalsEstat : i32 {
  | # \| check:52'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | # \|            85:  %c0_i32 = arith.constant 0 : i32
  | # \| check:52'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | # \| check:52'1        ?                               possible intended match
  | # \|            86:  fir.has_value %c0_i32 : i32
  | # \| check:52'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | # \|            87:  }
  | # \| check:52'0     ~~~
  | # \|            88:  func.func private @_FortranASignal(i64, !fir.llvm_ptr<() -> ()>) -> i64 attributes {fir.runtime}
  | # \| check:52'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | # \|            89: }
  | # \| check:52'0     ~~
  | # \| >>>>>>
  | # `-----------------------------
  | # error: command failed with exit status: 1
 

```


https://github.com/llvm/llvm-project/pull/79337


More information about the flang-commits mailing list