Message ID | 87fuosaynf.fsf@atmel.com |
---|---|
State | New |
Headers | show |
Ping! Regards Senthil Senthil Kumar Selvaraj writes: > Hi, > > Is it ok to backport PR 65210 to gcc-5-branch? The patch is already in > 6.x and trunk. > > Regards > Senthil > > gcc/ChangeLog > > 2016-09-22 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> > > Backport from trunk r227496 > > PR target/65210 > * config/avr/avr.c (avr_eval_addr_attrib): Look for io_low > attribute as well. > > gcc/testsuite/ChangeLog > > 2016-09-22 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> > > Backport from trunk r227496 > > PR target/65210 > * gcc.target/avr/pr65210.c: New test. > > Index: gcc/config/avr/avr.c > =================================================================== > --- gcc/config/avr/avr.c (revision 240340) > +++ gcc/config/avr/avr.c (working copy) > @@ -9122,6 +9122,8 @@ > if (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO) > { > attr = lookup_attribute ("io", DECL_ATTRIBUTES (decl)); > + if (!attr || !TREE_VALUE (attr)) > + attr = lookup_attribute ("io_low", DECL_ATTRIBUTES (decl)); > gcc_assert (attr); > } > if (!attr || !TREE_VALUE (attr)) > Index: gcc/testsuite/gcc.target/avr/pr65210.c > =================================================================== > --- gcc/testsuite/gcc.target/avr/pr65210.c (nonexistent) > +++ gcc/testsuite/gcc.target/avr/pr65210.c (working copy) > @@ -0,0 +1,7 @@ > +/* { dg-do compile } */ > + > +/* This testcase exposes PR65210. Usage of the io_low attribute > + causes assertion failure because code only looks for the io > + attribute if SYMBOL_FLAG_IO is set. */ > + > +volatile char q __attribute__((io_low,address(0x81)));
Approved. Please commit. 2016-09-26 15:30 GMT+03:00 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>: > Ping! > > Regards > Senthil > Senthil Kumar Selvaraj writes: > >> Hi, >> >> Is it ok to backport PR 65210 to gcc-5-branch? The patch is already in >> 6.x and trunk. >> >> Regards >> Senthil >> >> gcc/ChangeLog >> >> 2016-09-22 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> >> >> Backport from trunk r227496 >> >> PR target/65210 >> * config/avr/avr.c (avr_eval_addr_attrib): Look for io_low >> attribute as well. >> >> gcc/testsuite/ChangeLog >> >> 2016-09-22 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> >> >> Backport from trunk r227496 >> >> PR target/65210 >> * gcc.target/avr/pr65210.c: New test. >> >> Index: gcc/config/avr/avr.c >> =================================================================== >> --- gcc/config/avr/avr.c (revision 240340) >> +++ gcc/config/avr/avr.c (working copy) >> @@ -9122,6 +9122,8 @@ >> if (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO) >> { >> attr = lookup_attribute ("io", DECL_ATTRIBUTES (decl)); >> + if (!attr || !TREE_VALUE (attr)) >> + attr = lookup_attribute ("io_low", DECL_ATTRIBUTES (decl)); >> gcc_assert (attr); >> } >> if (!attr || !TREE_VALUE (attr)) >> Index: gcc/testsuite/gcc.target/avr/pr65210.c >> =================================================================== >> --- gcc/testsuite/gcc.target/avr/pr65210.c (nonexistent) >> +++ gcc/testsuite/gcc.target/avr/pr65210.c (working copy) >> @@ -0,0 +1,7 @@ >> +/* { dg-do compile } */ >> + >> +/* This testcase exposes PR65210. Usage of the io_low attribute >> + causes assertion failure because code only looks for the io >> + attribute if SYMBOL_FLAG_IO is set. */ >> + >> +volatile char q __attribute__((io_low,address(0x81))); >
Index: gcc/config/avr/avr.c =================================================================== --- gcc/config/avr/avr.c (revision 240340) +++ gcc/config/avr/avr.c (working copy) @@ -9122,6 +9122,8 @@ if (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO) { attr = lookup_attribute ("io", DECL_ATTRIBUTES (decl)); + if (!attr || !TREE_VALUE (attr)) + attr = lookup_attribute ("io_low", DECL_ATTRIBUTES (decl)); gcc_assert (attr); } if (!attr || !TREE_VALUE (attr)) Index: gcc/testsuite/gcc.target/avr/pr65210.c =================================================================== --- gcc/testsuite/gcc.target/avr/pr65210.c (nonexistent) +++ gcc/testsuite/gcc.target/avr/pr65210.c (working copy) @@ -0,0 +1,7 @@ +/* { dg-do compile } */ + +/* This testcase exposes PR65210. Usage of the io_low attribute + causes assertion failure because code only looks for the io + attribute if SYMBOL_FLAG_IO is set. */ + +volatile char q __attribute__((io_low,address(0x81)));