{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/5346","repository_url":"https://api.github.com/repos/arduino/Arduino","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/5346/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/5346/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/5346/events","html_url":"https://github.com/arduino/Arduino/issues/5346","id":175112910,"number":5346,"title":"Compiler optimization fails to generate code for code with section attribute.","user":{"login":"gitmeister","id":794422,"avatar_url":"https://avatars.githubusercontent.com/u/794422?v=3","gravatar_id":"","url":"https://api.github.com/users/gitmeister","html_url":"https://github.com/gitmeister","followers_url":"https://api.github.com/users/gitmeister/followers","following_url":"https://api.github.com/users/gitmeister/following{/other_user}","gists_url":"https://api.github.com/users/gitmeister/gists{/gist_id}","starred_url":"https://api.github.com/users/gitmeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitmeister/subscriptions","organizations_url":"https://api.github.com/users/gitmeister/orgs","repos_url":"https://api.github.com/users/gitmeister/repos","events_url":"https://api.github.com/users/gitmeister/events{/privacy}","received_events_url":"https://api.github.com/users/gitmeister/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-05T18:11:53Z","updated_at":"2016-09-06T16:54:03Z","closed_at":null,"body":"Removing -Os compiler option allows code to be generated.\r\n\r\nSee https://github.com/Optiboot/optiboot/issues/187"},"comment":{"url":"https://api.github.com/repos/arduino/Arduino/issues/comments/245015474","html_url":"https://github.com/arduino/Arduino/issues/5346#issuecomment-245015474","issue_url":"https://api.github.com/repos/arduino/Arduino/issues/5346","id":245015474,"user":{"login":"matthijskooijman","id":194491,"avatar_url":"https://avatars.githubusercontent.com/u/194491?v=3","gravatar_id":"","url":"https://api.github.com/users/matthijskooijman","html_url":"https://github.com/matthijskooijman","followers_url":"https://api.github.com/users/matthijskooijman/followers","following_url":"https://api.github.com/users/matthijskooijman/following{/other_user}","gists_url":"https://api.github.com/users/matthijskooijman/gists{/gist_id}","starred_url":"https://api.github.com/users/matthijskooijman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthijskooijman/subscriptions","organizations_url":"https://api.github.com/users/matthijskooijman/orgs","repos_url":"https://api.github.com/users/matthijskooijman/repos","events_url":"https://api.github.com/users/matthijskooijman/events{/privacy}","received_events_url":"https://api.github.com/users/matthijskooijman/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T16:54:03Z","updated_at":"2016-09-06T16:54:03Z","body":"One more observation: ISRs are essentially similar, in that the avr-libc init code / linker scripts arrange for them to be called, but the compiler does not know about this. Hence, the `ISR` macro also adds the `used` attribute IIRC.\r\n\r\n\r\n> EDIT: Ok, scratch that, the linker scripts already KEEP the init sections it's really an optimization thing. \r\n\r\nThat would be consistent with my earlier conclusion about LTO being the one that removes the functions - the linker never sees them.\r\n\r\nI'm closing this, thanks for forwarding to gcc (if you create a bug report, please post the link here for future reference)."}}
{"actor":{"display_login":"matthijskooijman"}}