[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 17 17:06:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #33 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---

> Could you tell me how just to run a single testcase?

Well, I figured that one out.

Quite interesting, a different error with valgrind:

| Events: event normalization mode '1'
==49974== Source and destination overlap in memcpy(0x7f3dae0, 0x7f3dae0, 176)
==49974==    at 0x408B1A8: memcpy (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64-linux.so)
==49974==    by 0x441E1A7: __shower_core_MOD_shower_converttopythia
(shower_core.f90:4010)
==49974==    by 0x440C38B: __shower_core_MOD_shower_make_particle_set
(shower_core.f90:451)
==49974==    by 0x43E915B: __shower_MOD_evt_shower_make_particle_set
(shower.f90:258)
==49974==    by 0x43F49C3: __events_MOD_event_evaluate_transforms
(events.f90:524)
==49974==    by 0x43F3843: __events_MOD_event_generate (events.f90:751)
==49974==    by 0x43739EF: __simulations_MOD_simulation_generate
(simulations.f90:1639)
==49974==    by 0x43992F7: __commands_MOD_cmd_simulate_execute
(commands.f90:4501)
==49974==    by 0x437CA6B: __commands_MOD_command_list_execute
(commands.f90:5835)
==49974==    by 0x43BD56B: __whizard_MOD_whizard_process_stream
(whizard.f90:348)
==49974==    by 0x43BCBF7: __whizard_MOD_whizard_process_file (whizard.f90:323)
==49974==    by 0x40B547B: MAIN__ (main.f90:415)
==49974== 

The code there is

       temp_parton = final_partons(i + 1)
       final_partons(i + 1) = final_partons(j)
       final_partons(j) = temp_parton

I have no idea if this is intended or not (if i + 1 is supposed to be
identical to j) , but it points to a doubtful use of memcpy with gfortran
which I will open a separate PR about.


More information about the Gcc-bugs mailing list