This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #19 from Bijan Chokoufe <bijan at chokoufe dot com> ---
So in the build with '-O2 -g' (default), valgrind tells us

==8214== Conditional jump or move depends on uninitialised value(s)
==8214==    at 0x5300201: __shower_core_MOD_shower_generate_next_isr_branching
(shower_core.f90:3089)
==8214==    by 0x5306A90: __shower_core_MOD_shower_generate_emissions
(shower_core.f90:316)
==8214==    by 0x52D3CE6: __shower_MOD_evt_shower_generate_weighted.part.2
(shower.f90:238)
==8214==    by 0x52B0BBF: __event_transforms_MOD_evt_generate_unweighted
(event_transforms.f90:203)
==8214==    by 0x52DCEA5: __events_MOD_event_evaluate_transforms
(events.f90:520)
==8214==    by 0x52DC247: __events_MOD_event_generate (events.f90:751)
==8214==    by 0x5260A2F: __simulations_MOD_simulation_generate
(simulations.f90:1639)
==8214==    by 0x5285A35: __commands_MOD_cmd_simulate_execute
(commands.f90:4501)
==8214==    by 0x5267A08: __commands_MOD_command_list_execute
(commands.f90:5835)
==8214==    by 0x52A84A5: __whizard_MOD_whizard_process_stream
(whizard.f90:348)
==8214==    by 0x52A7C25: __whizard_MOD_whizard_process_file (whizard.f90:323)
==8214==    by 0x4E3EF61: MAIN__ (main.f90:415)
==8214==

which is exactely the problematic point we also identified with print
debugging, mentioned in the description of this ticket.

In the build with '-O0 -g', valgrind does not show this error! So it seems as
if the call to integral_over_z_part_isr is optimized away although it is needed
to set the variables used in the conditional. The variables are declared as
intent(inout) therein.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]