I can confirm that this bug exists; using f2py with a Fortran code linked with libgomp exposes the bug.
I fixed by adding the attached dpatch file to the source .dep (apt-get source gcc-4.2) patch directory, including the file in rules.patch, and building a new set of packages from source. I am not sure if this works universally, but the dpatch is based on the gcc patch posted above by James, so it should work in general. This patch is supposed to be applied for gcc 4.3.0, but this at least fixes the bug for gcc 4.2.3.
I can confirm that this bug exists; using f2py with a Fortran code linked with libgomp exposes the bug.
I fixed by adding the attached dpatch file to the source .dep (apt-get source gcc-4.2) patch directory, including the file in rules.patch, and building a new set of packages from source. I am not sure if this works universally, but the dpatch is based on the gcc patch posted above by James, so it should work in general. This patch is supposed to be applied for gcc 4.3.0, but this at least fixes the bug for gcc 4.2.3.
Josh Finkbeiner