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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 7-13 does:
```
<source>:17:24:   in constexpr expansion of 'fn7(0, 0)'
<source>:17:43: error: dereferencing a null pointer
 constexpr int n3 = fn7 ((const int *) 0, 0);
                                           ^
<source>:18:24:   in constexpr expansion of 'fn7(0, 8)'
<source>:18:43: error: dereferencing a null pointer
 constexpr int n4 = fn7 ((const int *) 0, 8);
                                           ^
```

While the trunk gives:
```
<source>:17:24:   in 'constexpr' expansion of 'fn7(0, 0)'
<source>:14:14: error: dereferencing a null pointer
   14 |   return fn6 (*a, b);
      |          ~~~~^~~~~~~
<source>:18:24:   in 'constexpr' expansion of 'fn7(0, 8)'
<source>:14:14: error: dereferencing a null pointer
```

Which seems like the correct location now.

Reply via email to