<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64391>64391</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Corrupt module error
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kiranchandramohan
</td>
</tr>
</table>
<pre>
A corrupt module error is observed while using a module containing an array initialization for an array with non-default lowerbound.
**Source**
$ cat m.f90
```
module m
integer,parameter :: MASKS(0:5) = (/ 1, 2, 3, 4, 5, 6 /)
end module
```
$ cat s.f90
```
subroutine s
use m
end subroutine
```
**Error**
$ flang-new -c m.f90
$ flang-new -c s.f90
```
error: Semantic errors in s.f90
./s.f90:2:5: error: Cannot read module file for module 'm': Module file is corrupt: ./m.mod
use m
^
```
Note: Error was observed while compiling https://github.com/MCSclimate/MCT
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VM1ymzAQfhpx2TEDEj_mwIHa4dJJL-4LLLAYtULySCKe9Ok7AjtJ0yQezZpd7a6--faT0Dl51kQ1y7-x_Bjh4idj69_Sou4n1IPF2Uyoo84Mz3UDvbF2uXiYzbAoArLWWJAOTOfIPtEA10kqgsVJfQa8p_VGe5R6jWlAa_EZpJZeopJ_0EujYTT2de8q_QTa6N1AIy7KgzJXsp1Z9BCz5MiS5mZ5WCez2J6273s8gx49zPFYJbdQkWwLNv-GbN48kNrTmSzjhwtanMmTBSYaJhp4bE7fT4zvEyaanPEKmDgC43vGW0gZPwAPRgSTBZMHUwDjLePV1p70cKPiHZh_4boAFz5McUtnzeKlJnBbZHEv6EP714RPjgjrIYzrPVGjQn3eabrCrt8Yg082v8C3CiGwdaIZtZf9Jg0HUm9lW1rMeLu5ouErn6KBl9oDam08WMI7XTAGNQVt3HzGy5nxcp3Lmwzp7soMO-GUOZ7NcBvuG6pg_bH84WOWVvvDeAptVrbgiv-puzfzRaqg5sn7iws6CcNuz9JPSxf3Zma8fTyceiVn9LQ6P6OhFkMlKoyoTosqTcoqKXk01X3Hey7yPCtxxK7HMic-UEdJuad9NewjWfOEi2SfiLRI0zSNCzFmWcFFV2BZjHzPsoRmlCpW6mmOjT1H0rmF6iITVRop7Ei59YJzvs6TiWa0RnvSA-M8XHtbh9Jdt5wdyxIlnXevzbz0an0g2rU4P8Lhg1cgWqyqv-AjtLv97S7W_KLeM96uQB3j7Yr1bwAAAP__OvNbUw">