lto: Fix cache partitioning to handle min_partition_size=0

Cache partitioning asserts that {min,max}_partition_size parameter
cannot be 0 to prevent later divisions by zero. This is needlessly
strict, we can clamp the value to 1 to get reasonable/expected behavior.

	PR lto/125257

gcc/lto/ChangeLog:

	* lto-partition.cc: Handle min/max_partition_size = 0 for
	cache partitioning.

gcc/testsuite/ChangeLog:

	* gcc.dg/lto/pr125257_0.c: New test.

(cherry picked from commit 6a3f305b298438091ef45f92553618d92a47f8dd)
2 files changed