# Idea Help: Simple code that demonstrates non-trivial, realistic bug

**URL:** <https://fortran-lang.discourse.group/t/idea-help-simple-code-that-demonstrates-non-trivial-realistic-bug/5974>\
**Category:** Help\
**Created:** [June 14, 2023, 9:54pm UTC](https://fortran-lang.discourse.group/t/idea-help-simple-code-that-demonstrates-non-trivial-realistic-bug/5974 "2023-06-14T21:54:20Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![FortranFan](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Post date:** [June 15, 2023, 2:36pm UTC](https://fortran-lang.discourse.group/t/idea-help-simple-code-that-demonstrates-non-trivial-realistic-bug/5974/5 "2023-06-15T14:36:14Z")

</div>

> [@jdietz224](#):
>
> … It would probably be easy to come up with a C function that could demonstrate this …

@jdietz224 , another case to consider is one involving a C-Fortran interoperating solution where a bug can lead to memory corruption and where the `PRINT` statement approach can become useless. Take a look at this [**thread**](https://fortran-lang.discourse.group/t/possible-bad-memory-management-in-fortran-c-interfacing/5963/12) (the first half of it) for an illustration.

---

_[View the full topic](https://fortran-lang.discourse.group/t/idea-help-simple-code-that-demonstrates-non-trivial-realistic-bug/5974)._
