[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647

2017-11-24 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #23 from Marc Glisse --- (In reply to Harald Anlauf from comment #3) > subroutine gfcbug138 (yerrmsg) > character(kind=1,len=*) :: yerrmsg > yerrmsg = 1_"bug: " // yerrmsg > end subroutine gfcbug138 [...] > gfcbug138 (character(ki

[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647

2017-11-24 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #25 from Marc Glisse --- (In reply to Dominique d'Humieres from comment #24) > The following variant does not give the warning That's because the code has become obfuscated enough that we don't have the simplification l-(l+5) anymore

[Bug target/83158] [8 regression] gcc.target/i386/pr78057.c fail

2017-11-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83158 Marc Glisse changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

2017-11-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83164 Marc Glisse changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

2017-11-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83164 --- Comment #2 from Marc Glisse --- Does it work if you remove the verification || !types_compatible_p (rhs1_type, rhs2_type) from tree-cfg.c? useless_type_conversion_p says that converting a function pointer to char* is useless (b

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

2017-11-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83164 Marc Glisse changed: What|Removed |Added CC||skpgkp1 at gmail dot com --- Comment #3 fr

[Bug c++/83166] [8 regression] error: type mismatch in pointer diff expression internal compiler error: verify_gimple failed

2017-11-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83166 Marc Glisse changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/83165] [8 regression] cannot convert ‘GPrivate’ {aka ‘_GPrivate’} to ‘GPrivate*’ {aka ‘_GPrivate*’} in return

2017-11-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83165 --- Comment #1 from Marc Glisse --- Could you explain why this code should be accepted, to save time?

[Bug tree-optimization/83194] Possibly missed simplification with strcmp(s, t) == strcmp(t, s)

2017-11-28 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83194 --- Comment #2 from Marc Glisse --- What if strcmp returns INT_MIN?

[Bug tree-optimization/83073] Range for VR_VARYING | [1, 1]

2017-11-29 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83073 --- Comment #3 from Marc Glisse --- (In reply to Richard Biener from comment #2) > The "proper" result for [MIN,MAX] | 1 is of course a set of every odd > number... Sadly, while we track may-be-nonzero bits in CCP (maybe with the VRP reorg there

[Bug tree-optimization/81165] [8 Regression] Regression in GCC-8.0.0's optimizer

2017-12-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81165 --- Comment #6 from Marc Glisse --- (In reply to Richard Biener from comment #5) > we miss to optimize (int)((short int)((unsigned short) x1.1_4 ^ 8) & 1) to > (int)(x1.1_4 & 1) as well. (untested) +/* (X |^ 8) & 1 --> X & 1 */ +(for op (bit

[Bug c++/83239] False positive from -Wstringop-overflow on simple std::vector code

2017-12-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83239 --- Comment #1 from Marc Glisse --- It is strongly related to the other PRs. IMO, all warnings like maybe-uninitialized should move from Wall to Wextra, but that's going to be a hard sell. In the mean time, we fail to find some VRP optimizations

[Bug tree-optimization/83247] New: simplify (int)a_long < 0 when we know a_long fits in int

2017-12-01 Thread glisse at gcc dot gnu.org
ion Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- This code is based on basic_string_view::_S_compare, which should probably be impro

[Bug target/83240] x86_64 vectorized sqrt of denormal yields -inf when DAZ=0

2017-12-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83240 --- Comment #4 from Marc Glisse --- (this PR is vaguely related to PR 57974) Unrelated, but I am surprised we don't end up computing at compile-time in this example. We vectorize sqrt before unrolling the first loop and getting the constants. An

[Bug middle-end/83239] False positive from -Wstringop-overflow on simple std::vector code

2017-12-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83239 --- Comment #4 from Marc Glisse --- (In reply to Marc Glisse from comment #1) > In the mean time, we fail to find some VRP optimizations that might help > with the warning. > > _1 = _186 + 18446744073709551614; > if (_1 > _186) > > _186: [3

[Bug tree-optimization/82103] spurious stringop-overflow warning

2017-12-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82103 --- Comment #3 from Marc Glisse --- This warning is "less wrong" than the other related ones. If frame_size is 0, this does call memset(,,-1). And there is an explicit test for frame_size == 0 in the function, which makes it look like 0 is not su

[Bug tree-optimization/83262] SELECT CASE slower than IF/ELSE

2017-12-03 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83262 --- Comment #1 from Marc Glisse --- What version of gcc, and what platform? With gcc-8 on x86_64 (skylake), I get GOTO costs totally 0.904 (s) SELECT CASE costs totally 0.704 (s) IF-Goto costs totally 0.706 (s)

[Bug tree-optimization/79119] absolute value of a pointer difference can be assumed to be less than or equal to PTRDIFF_MAX

2017-12-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79119 --- Comment #2 from Marc Glisse --- With POINTER_DIFF_EXPR, things may be easier. One of the things I suggested when introducing it was that VRP could always use a range of [ -PTRDIFF_MAX, PTRDIFF_MAX ] for them. If you had written __PTRDIFF_T

[Bug tree-optimization/83296] missing -Wstringop-overflow due to missing range info for MAX_EXPR

2017-12-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83296 --- Comment #1 from Marc Glisse --- Note that -fdump-tree-optimized-all includes the range information in the dump. Normally, we know how to derive a range for MAX_EXPR, but in this case the MAX_EXPR only appears in phiopt3, later than VRP2. On t

[Bug tree-optimization/83299] result of pointer addition can be assumed to be less than or equal to PTRDIFF_MAX

2017-12-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83299 --- Comment #1 from Marc Glisse --- As an implementation detail, the argument to POINTER_PLUS is always unsigned... (maintainers are in favor of changing that, but someone needs to do the work) Also, we now quickly simplify p-q to -i, which lose

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

2017-12-07 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83164 --- Comment #11 from Marc Glisse --- (In reply to Jakub Jelinek from comment #9) > Created attachment 42810 [details] > gcc8-pr83164.patch Sorry, I shouldn't have taken this long. > So like this? It makes no sense to call types_compatible_p or

[Bug middle-end/83312] [8 regression] bogus -Warray-bounds warning

2017-12-07 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83312 --- Comment #1 from Marc Glisse --- Ironically, it seems to be the same pass, VRP1, that warns that some piece of code accesses pd_threads[j] for some negative j and later notices that the corresponding path is dead. I don't know if we can shift

[Bug target/77438] MMX intrinsic on x86_64 generates bloated code

2016-08-31 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77438 --- Comment #1 from Marc Glisse --- Gcc does avoid using the stack when it is more efficient to do so (depends on the -march setting). Yes, using SSE would be better. The general advice is to stop using MMX. Using gcc's vector extension generates

[Bug tree-optimization/41244] "&data[i] - data" isn't converted to "i"

2016-09-04 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41244 --- Comment #4 from Marc Glisse --- (In reply to Andrew Pinski from comment #3) > On the trunk (on aarch64) we get: Yes, on I32P64 platforms we still have a chance to prove that the multiplication doesn't overflow. > long int _4; > long int

[Bug driver/77475] unnecessary or misleading context in reporting command line problems

2016-09-04 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77475 Marc Glisse changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIRMED

[Bug tree-optimization/77544] [Regression 6/7] segfault at -O0 - infinite loop in simplification

2016-09-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77544 --- Comment #3 from Marc Glisse --- 302806 >> 0 should have been folded first, so we are apparently calling fold on unfolded operands somewhere?

[Bug c++/77591] [6/7 Regression] decltype(auto) and ternary operator allow returning local reference without a warning

2016-09-14 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77591 --- Comment #2 from Marc Glisse --- Before delayed folding, the conditional was probably eliminated before we even reached the warning code in the front-end. The warning is duplicated in the middle-end precisely because in some cases we need opti

[Bug libstdc++/65122] std::vector doesn't honor element alignment

2016-09-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122 --- Comment #19 from Marc Glisse --- (In reply to Andrew Pinski from comment #17) > I think this is fixed for GCC 7 with -std=c++17 support. No, it isn't. new T[10] will give suitably aligned memory, but not std::allocator. Only the core part of

[Bug libstdc++/65122] std::vector doesn't honor element alignment

2016-09-26 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122 --- Comment #22 from Marc Glisse --- (In reply to Jonathan Wakely from comment #20) > In C++17 std::allocator no longer says "It is implementation-defined whether > over-aligned types are supported" and is no longer required to call operator > ne

[Bug tree-optimization/77745] Inconsistent application of aliasing rules

2016-09-26 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77745 --- Comment #3 from Marc Glisse --- I think the issue is with Deleted redundant store MEM[(long int *)c2_7(D)] = 200; It is considered as redundant with MEM[(long long int *)c2_7(D)] = 200; but they do not define the same dynamic type, so it

[Bug go/77809] New: "_LITTLE_ENDIAN" redefined

2016-09-30 Thread glisse at gcc dot gnu.org
Assignee: ian at airs dot com Reporter: glisse at gcc dot gnu.org CC: cmang at google dot com Target Milestone: --- Host: powerpc64le-unknown-linux-gnu Target: powerpc64le-unknown-linux-gnu Build: powerpc64le-unknown-linux-gnu

[Bug libgcc/77813] New: __TMC_END__ - __TMC_LIST__ == 0

2016-10-01 Thread glisse at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- Target: powerpc64le-unknown-linux-gnu In crtstuff.c, function deregister_tm_clones contains this code: if (__TMC_END__ - __TMC_LIST__ == 0) this currently gives, in the

[Bug libgcc/77813] __TMC_END__ - __TMC_LIST__ == 0

2016-10-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77813 --- Comment #1 from Marc Glisse --- Created attachment 39728 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39728&action=edit optimization patch that shows the issue

[Bug tree-optimization/59650] Inefficient vector assignment code

2016-10-02 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59650 --- Comment #2 from Marc Glisse --- Actually, we have a regression, BIT_INSERT_EXPR causes a spurious warning a.c:13:10: warning: 'tmp' is used uninitialized in this function [-Wuninitialized] tmp[0] = v[0]; ~~~^~ And we don't vec

[Bug tree-optimization/77836] New: Simplify (x>>4)*16 in gimple

2016-10-03 Thread glisse at gcc dot gnu.org
iority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- unsigned f(unsigned x){ return (x>>4)*16; } gives the optimized dump _1 = x_2(D) >> 4; _3 = _1 * 16; while (x/16

[Bug tree-optimization/77836] Simplify (x>>4)*16 in gimple

2016-10-03 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77836 --- Comment #2 from Marc Glisse --- (In reply to Andrew Pinski from comment #1) > The easy way to do this is to canonicalize the shift to a multiply or the > multiply to a shift which is what it is done on the RTL level. For unsigned types that

[Bug c++/77858] std::polar throws an exception if rho is negative

2016-10-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77858 --- Comment #1 from Marc Glisse --- The standard says "Requires: rho shall be non-negative and non-NaN. theta shall be finite." (I wasn't in favor of it, seems gratuitous, but if you want to complain about the standard, this isn't the right place

[Bug tree-optimization/77899] incorrect VR_RANGE for a signed char function argument

2016-10-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77899 --- Comment #9 from Marc Glisse --- I don't see what "signed" has to do with it. void f (unsigned char i) { char d [1260]; const char *p = &d[130]; p += i; if (p < d + 2 || d + 757 < p) __builtin_abort (); } We don't optimize thi

[Bug tree-optimization/77898] incorrect VR_ANTI_RANGE after evrp and before vrp1

2016-10-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77898 --- Comment #3 from Marc Glisse --- (In reply to Martin Sebor from comment #2) > I may also be confused about other things but below is what I see in GDB > when I call get_range_info() from plus_stmt_object_size() on the offset in > POINTER_PLUS_

[Bug tree-optimization/77898] incorrect VR_ANTI_RANGE after evrp and before vrp1

2016-10-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77898 --- Comment #5 from Marc Glisse --- (In reply to Martin Sebor from comment #4) > I suppose I was expecting that that after EVRP (and before VRP1) > get_range_info() would either succeed and return a range representing a > subrange of the the vari

[Bug tree-optimization/77898] incorrect VR_ANTI_RANGE after evrp and before vrp1

2016-10-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77898 --- Comment #7 from Marc Glisse --- (In reply to Martin Sebor from comment #6) > I meant a subrange of the i variable (i.e., a subrange of int). The range > of every variable is necessarily bounded by its type so returning a range of > [INT_MIN,

[Bug tree-optimization/77898] incorrect VR_ANTI_RANGE after evrp and before vrp1

2016-10-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77898 --- Comment #9 from Marc Glisse --- (In reply to Martin Sebor from comment #8) > I agree that in many cases there isn't enough information to tell that a > range is final and can't be further improved. But there certainly are such > cases (the t

[Bug middle-end/77964] [7 Regression] Linux kernel firmware loader miscompiled

2016-10-13 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77964 --- Comment #11 from Marc Glisse --- (In reply to Andrew Pinski from comment #5) > Looks like a kernel issue. An asm ("", "+r"(x)); is needed in the source for > __start_builtin_fw and __end_builtin_fw Shouldn't we recommend "+g" instead of "+r"

[Bug tree-optimization/77980] Regression in GCC-7.0.0's optimizer.

2016-10-13 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77980 --- Comment #1 from Marc Glisse --- To simplify 1/n to 0, we would have to notice that n cannot be ±1 (the last bit is zero since n is 2*x2), and it cannot be 0 either in that division. That seems quite specialized, but rather easy to add to matc

[Bug tree-optimization/77980] Regression in GCC-7.0.0's optimizer.

2016-10-14 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77980 --- Comment #3 from Marc Glisse --- Note that "regression in gcc-7.0.0" would mean that gcc-6 was doing better, which is not the case.

[Bug c/78000] New: -Wimplicit-function-declaration inhibited with macro from system headers

2016-10-16 Thread glisse at gcc dot gnu.org
: diagnostic Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- i/a.h: #define foo bar x.c: #include int main(){ foo(42); } $ gcc x.c -isystem i -c $ gcc x.c -I i

[Bug tree-optimization/72785] [7 Regression] kernel build error since r236831

2016-10-21 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 --- Comment #7 from Marc Glisse --- (In reply to Jakub Jelinek from comment #2) > This is undesirable, iftmp.0_2 really isn't constant, so we shouldn't turn > it into sometimes constant, sometimes non-constant. I am not sure about that. The way

[Bug tree-optimization/72785] [7 Regression] kernel build error since r236831

2016-10-21 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 --- Comment #9 from Marc Glisse --- (In reply to Jeffrey A. Law from comment #8) > I've spent a goodly part of the morning pondering this BZ. While I think > the semantics of b_c_p are under/ill defined and they will continue to cause > problems

[Bug middle-end/78071] -Os -ffast-math generates pow() for 1/(x*x)

2016-10-21 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78071 --- Comment #3 from Marc Glisse --- Dup of PR 70777? I can reproduce with gcc-6 but not with gcc-7.

[Bug target/78102] [5/6/7 regression] GCC refuses to generate PCMPEQQ instruction for SSE4.1

2016-10-24 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78102 Marc Glisse changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/78102] [5/6/7 regression] GCC refuses to generate PCMPEQQ instruction for SSE4.1

2016-10-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78102 --- Comment #3 from Marc Glisse --- (In reply to Richard Biener from comment #2) > This means using GCC vector extensions in the header for the intrinsic was > a bad idea in this particular case. Yes, the simplest fix is to revert to using the b

[Bug target/78102] [5/6/7 regression] GCC refuses to generate PCMPEQQ instruction for SSE4.1

2016-10-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78102 --- Comment #16 from Marc Glisse --- (In reply to Jakub Jelinek from comment #6) > Or, if we are ok that for SSE4.1 (and not SSE4.2) the vectorizer just won't > be able to use those V2DI equality (and gt?) comparisons, then revert part > of the r

[Bug rtl-optimization/78120] [6/7 Regression] If conversion no longer performed

2016-10-26 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78120 Marc Glisse changed: What|Removed |Added Keywords||missed-optimization Status|UNC

[Bug middle-end/78115] Missed optimization for "int modulo 2^31"

2016-10-27 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78115 --- Comment #2 from Marc Glisse --- For the first part, when we transform (X+C1)+C2 to X+(C1+C2), we check that C1+C2 doesn't overflow. But if C1+C2 would give INT_MIN, we still have the possibility to generate X-INT_MIN without going to an unsig

[Bug c++/78130] Strict overflow warning appears to be invalid

2016-10-27 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78130 --- Comment #7 from Marc Glisse --- Reduced a bit more: struct B { B(); void m_fn2(int p1) { if (p1 <= storage_) throw; } int storage_; }; void f() { B span_; int b = span_.storage_; span_.m_fn2(b - 1); } The warning see

[Bug driver/78146] "-std=c++11 -std=gnu++11" is different from "-std=gnu++11" alone

2016-10-28 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78146 --- Comment #2 from Marc Glisse --- PR 77948 ?

[Bug tree-optimization/78151] New: Fail to vectorize *min_element

2016-10-28 Thread glisse at gcc dot gnu.org
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- (from a discussion in the comments of http://stackoverflow.com/a/40284138/1918193) #include #include int return_min(std::vector &a

[Bug target/62191] extra shift generated for vector integer division by constant 2

2016-10-30 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62191 --- Comment #1 from Marc Glisse --- vector(4) int _4; _4 = x_1(D) >> 31; _5 = VIEW_CONVERT_EXPR(_4); _6 = _5 >> 31; (lshiftrt (ashiftrt X N) 31) is just (lshiftrt X 31) The scalar case is handled in combine, probably by simplify_shift_c

[Bug tree-optimization/78164] New: SLP vectorizer: prologue cost biased by redundancies

2016-10-30 Thread glisse at gcc dot gnu.org
: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- From http://stackoverflow.com/q/39947582/1918193 void testfunc_flat(double a, double b, double* dst) { dst[0

[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-02 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 Marc Glisse changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIRMED

[Bug middle-end/78203] missing warning on return of unitialized variable

2016-11-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78203 --- Comment #4 from Marc Glisse --- > In my opinion, the warning should be given Nobody contradicted you, we agree that it would be good to issue the warning. We already know about this issue (there are duplicates you can search for in bugzilla)

[Bug tree-optimization/78218] [7 Regression] wrong code at -Os and above on x86_64-linux-gnu (in both 32-bit and 64-bit modes)

2016-11-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78218 Marc Glisse changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/78295] [7 Regression] Spurious -Wuninitialized warning for vector element assignment

2016-11-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78295 Marc Glisse changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIRMED

[Bug libstdc++/78302] is_move_constructible_v> should be false

2016-11-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78302 --- Comment #1 from Marc Glisse --- See also PR 71301.

[Bug tree-optimization/78305] Wrong constant folding

2016-11-10 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78305 Marc Glisse changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIRMED

[Bug tree-optimization/78327] -Walloca-large-than false positives due to bad range info for signed integers in [-TYPE_MAX + N, N]

2016-11-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78327 Marc Glisse changed: What|Removed |Added Keywords||missed-optimization --- Comment #1 from Ma

[Bug c++/78399] g++ generates sub-optimal assembler code when structs aren't explicitly aligned.

2016-11-17 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78399 --- Comment #2 from Marc Glisse --- Related to PR 50384.

[Bug c/78408] Aggressive optimization of zeroing results in incorrect behavior

2016-11-17 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78408 --- Comment #1 from Marc Glisse --- Do you think you could produce a smaller, stand-alone testcase that reproduces the issue? Or at least attach the preprocessed sources to the report?

[Bug c/78408] C loop initial declarations generate wrong code

2016-11-17 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78408 --- Comment #6 from Marc Glisse --- I don't think this is related to the loop, a = b = (struct buf) {} loses the assignment to b even if you put it alone on its line.

[Bug libgcc/77813] __TMC_END__ - __TMC_LIST__ == 0

2016-11-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77813 --- Comment #3 from Marc Glisse --- Author: glisse Date: Sun Nov 20 13:35:27 2016 New Revision: 242635 URL: https://gcc.gnu.org/viewcvs?rev=242635&root=gcc&view=rev Log: Protect __TMC_END__ - __TMC_LIST__ == 0 2016-11-20 Marc Glisse

[Bug libgcc/77813] __TMC_END__ - __TMC_LIST__ == 0

2016-11-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77813 Marc Glisse changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug libstdc++/60621] std::vector::emplace_back generates massively more code than push_back

2014-03-23 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60621 --- Comment #1 from Marc Glisse --- Some things that help: -fabi-version=0 -fwhole-program (so it knows emplace_back won't be used anywhere else, and it can inline it and remove the unneeded paths)

[Bug c++/60625] attributes on template member function definition inside class definition not supported

2014-03-23 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60625 --- Comment #1 from Marc Glisse --- For function definitions (nothing to do with templates) the attribute has to come at the beginning, not at the end. Move it right before 'static' and it will compile.

[Bug libstdc++/60637] --fast-math breaks std::signbit function

2014-03-24 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60637 --- Comment #2 from Marc Glisse --- IIUC (with gcc-4.9), signbit is not part of C++98, and with -std=c++11 things work. In C++98 mode, libstdc++ (sometimes) provides std::signbit as an extension, which calls __builtin_signbit which takes a double

[Bug libstdc++/60711] basic_ostringstream,basic_ostream,u16string,char16_t do not work together

2014-03-30 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60711 --- Comment #4 from Marc Glisse --- uostream ucout; Where did you see in the standard that basic_ostream is default constructible? The only constructor I can find is the explicit one from basic_streambuf*.

[Bug libstdc++/60711] basic_ostringstream,basic_ostream,u16string,char16_t do not work together

2014-03-31 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60711 --- Comment #12 from Marc Glisse --- Before saying that there is a problem with libstdc++, did you try other implementations? clang++ with libc++ gives the same error. That's just not how streams are supposed to be used (pretend it is a pure virtu

[Bug rtl-optimization/60769] New: [4.8 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)

2014-04-05 Thread glisse at gcc dot gnu.org
Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Hello, the following seems already fixed in 4.9, but it would be great to backport it (I

[Bug rtl-optimization/60769] [4.8 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)

2014-04-05 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60769 --- Comment #1 from Marc Glisse --- Still present with a pure r209150. 0x98bcc9 lra_constraints(bool) /data/repos/gcc/gcc-4_8-branch/gcc/lra-constraints.c:3563 0x97c676 lra(_IO_FILE*) /data/repos/gcc/gcc-4_8-branch/gcc/lra.c:2278 0x937a82

[Bug tree-optimization/60770] New: disappearing clobbers

2014-04-05 Thread glisse at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Hello, looking at Manuel's testcase from PR 60517, I notice that EINLINE changes: D.2253 = A::getB (&a); to: D.2264 = a.b; D.2263 = D.2264; D.2253 = D.2263; (several copies, but only the o

[Bug c++/60517] warning/error for taking address of member of a temporary object

2014-04-05 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 --- Comment #10 from Marc Glisse --- Created attachment 32549 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32549&action=edit first try With -O -fdisable-tree-esra (see PR 60770), it warns on the testcase. Twice because the DSE pass is run

[Bug tree-optimization/60770] disappearing clobbers

2014-04-06 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60770 --- Comment #1 from Marc Glisse --- int f(int n){ int*p; { int q=n; p=&q; } return *p; } Here CCP turns: q = n_2(D); p_4 = &q; q ={v} {CLOBBER}; _6 = *p_4; into: q_5 = n_2(D); _6 = q_5; I guess relying on clobbers

[Bug c++/60517] warning/error for taking address of member of a temporary object

2014-04-06 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 Marc Glisse changed: What|Removed |Added Attachment #32549|0 |1 is obsolete|

[Bug c++/60517] warning/error for taking address of member of a temporary object

2014-04-06 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 --- Comment #13 from Marc Glisse --- (In reply to Manuel López-Ibáñez from comment #12) > Why do you want to remove the clobber? I am in the DSE pass, so removing the clobber as a dead store is the easiest thing to do ;-) Ok, it might not be su

[Bug tree-optimization/60770] disappearing clobbers

2014-04-07 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60770 --- Comment #4 from Marc Glisse --- Catching it earlier may be hard, even for these trivial examples we only have from einline (18) to esra (24) or from eh (10) to ccp1 (21) and in more complicated examples I fear the interval will be empty, but w

[Bug ipa/60761] [4.9 Regression] Names of all function clones in g++ are "", in both warnings and dumps

2014-04-09 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60761 --- Comment #14 from Marc Glisse --- (In reply to Manuel López-Ibáñez from comment #13) > It is not clear to me why you want to print at all. It is an > internal detail. Imagine a function void f(unsigned a, unsigned b) where gcc makes a clone s

[Bug rtl-optimization/60769] [4.8 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60769 --- Comment #5 from Marc Glisse --- Thanks! (not closing because of Jakub's comment, but it is working fine now)

[Bug rtl-optimization/60819] New: dse1 removing not-dead insn (aliasing issue?)

2014-04-11 Thread glisse at gcc dot gnu.org
Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target: x86_64-linux-gnu #include int f (__m64 const __A, int const __N) { return ((__v4hi)__A)[__N]; } compiler with -O2, produces

[Bug c/60819] dse1 removing not-dead insn (aliasing issue?)

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819 --- Comment #5 from Marc Glisse --- typedef int v2si __attribute__((vector_size (8),may_alias)); typedef short v4hi __attribute__((vector_size (8),may_alias)); int f (v2si __A, int __N) { return (*(v4hi*)&__A)[__N]; } also fails. Reading the doc

[Bug c/60819] dse1 removing not-dead insn (aliasing issue?)

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819 --- Comment #8 from Marc Glisse --- (In reply to rguent...@suse.de from comment #6) > Not exactly - it's again the wrapping that will fail. That seems strange to me. From the doc of may_alias: "Accesses through pointers to types with this attrib

[Bug c/60819] dse1 removing not-dead insn (aliasing issue?)

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819 --- Comment #10 from Marc Glisse --- Ah. So, from a user's POV, it should be valid. But internally, we convert v2si*->v4hi* (ok), v4hi*->short* (ok), we forget the intermediate step, and we end up with v2si*->short*, which is not ok since the type

[Bug c/60819] dse1 removing not-dead insn (aliasing issue?)

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819 --- Comment #11 from Marc Glisse --- (In reply to Marc Glisse from comment #10) > Maybe the patch from comment #9 could be restricted to the case where the > vector type has may_alias? Oups, that's already the case, sorry for misreading.

[Bug libstdc++/59434] [lwg/2106] move_iterator is broken for input iterators with an rvalue as reference type

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59434 --- Comment #3 from Marc Glisse --- Author: glisse Date: Fri Apr 11 19:23:49 2014 New Revision: 209323 URL: http://gcc.gnu.org/viewcvs?rev=209323&root=gcc&view=rev Log: 2014-04-11 Marc Glisse PR libstdc++/59434 * include/bits/stl_iter

[Bug libstdc++/59434] [lwg/2106] move_iterator is broken for input iterators with an rvalue as reference type

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59434 Marc Glisse changed: What|Removed |Added Status|SUSPENDED |RESOLVED Resolution|---

[Bug c++/60829] Illegal access to private base of public base granted.

2014-04-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60829 --- Comment #2 from Marc Glisse --- (In reply to arm.nahm from comment #0) > The above code compiles in g++, No it doesn't. Please make sure to copy-paste directly from a file you have tested.

[Bug c/60819] dse1 removing not-dead insn (aliasing issue?)

2014-04-12 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819 --- Comment #12 from Marc Glisse --- Created attachment 32586 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32586&action=edit Richard's small patch I regtested it (patch from comment #9 plus a testcase) on x86_64-linux-gnu and it passed. I

[Bug c/50459] alignof doesn't work on plain old constant, works with expressions containing it

2014-04-12 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50459 Marc Glisse changed: What|Removed |Added Keywords||rejects-valid Status|UNCONFIRME

[Bug c/60831] gcc-4.8.2 creates binaries with broken AVX support

2014-04-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60831 --- Comment #2 from Marc Glisse --- (In reply to mmokrejs from comment #0) > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca > cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx > pdpe1gb rdtscp lm

[Bug c/50459] alignof doesn't work on plain old constant, works with expressions containing it

2014-04-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50459 --- Comment #2 from Marc Glisse --- (In reply to Marek Polacek from comment #1) > The problem on the C side of things is that the values of the enum are > represented by CONST_DECL nodes and check_user_alignment doesn't look > through it. So mayb

[Bug c/50459] alignof doesn't work on plain old constant, works with expressions containing it

2014-04-14 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50459 --- Comment #4 from Marc Glisse --- Creating a function definitely makes sense, I should have done it when I touched the default_conversion calls. Do you think your function could also handle the call to default_conversion (with the tests that pro

[Bug c++/60852] [4.8/4.9/4.10 Regression] boost::has_complement of enum class does not compile

2014-04-16 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60852 --- Comment #15 from Marc Glisse --- Did someone file a corresponding PR for clang? It is useful for them, but also for gcc because it gives them a chance to give a different interpretation of the standard.

<    14   15   16   17   18   19   20   21   22   23   >